@oniratec/onira-react-ui 3.1.0 → 3.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Wo=require("tailwind-merge"),ha=require("clsx"),l=require("react/jsx-runtime"),b=require("react"),J=require("lucide-react"),ma=require("react-dom"),Dd=require("@radix-ui/react-dropdown-menu"),Rd=require("lottie-react"),Ad=require("@radix-ui/react-select"),Md=require("@radix-ui/react-tooltip");function Br(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const h=Br(b),Zo=Br(ma),fe=Br(Dd),pe=Br(Ad),zt=Br(Md),wr=t=>{let e=0;for(let r=0;r<t.length;r++){const n=t.charCodeAt(r);e=(e<<5)-e+n,e=e&e}return Math.abs(e)},Bo=(t,e)=>Math.floor(t/Math.pow(10,e)%10),$s=(t,e)=>!(Bo(t,e)%2),Se=(t,e,r)=>{const n=t%e;return r&&Bo(t,r)%2===0?-n:n},Wt=(t,e,r)=>e[t%r],Id=t=>{t.slice(0,1)==="#"&&(t=t.slice(1));const e=parseInt(t.substr(0,2),16),r=parseInt(t.substr(2,2),16),n=parseInt(t.substr(4,2),16);return(e*299+r*587+n*114)/1e3>=128?"#000000":"#FFFFFF"},Pd=4,ue=80;function Fd(t,e){const r=wr(t),n=e&&e.length;return Array.from({length:Pd},(s,a)=>({color:Wt(r+a,e,n),translateX:Se(r*(a+1),ue/2-(a+17),1),translateY:Se(r*(a+1),ue/2-(a+17),2),rotate:Se(r*(a+1),360),isSquare:$s(r,2)}))}const di=({name:t,colors:e,title:r,square:n,size:s,...a})=>{const i=Fd(t,e),o=h.useId();return l.jsxs("svg",{viewBox:"0 0 "+ue+" "+ue,fill:"none",role:"img",xmlns:"http://www.w3.org/2000/svg",width:s,height:s,...a,children:[r&&l.jsx("title",{children:t}),l.jsx("mask",{id:o,maskUnits:"userSpaceOnUse",x:0,y:0,width:ue,height:ue,children:l.jsx("rect",{width:ue,height:ue,rx:n?void 0:ue*2,fill:"#FFFFFF"})}),l.jsxs("g",{mask:`url(#${o})`,children:[l.jsx("rect",{width:ue,height:ue,fill:i[0].color}),l.jsx("rect",{x:(ue-60)/2,y:(ue-20)/2,width:ue,height:i[1].isSquare?ue:ue/8,fill:i[1].color,transform:"translate("+i[1].translateX+" "+i[1].translateY+") rotate("+i[1].rotate+" "+ue/2+" "+ue/2+")"}),l.jsx("circle",{cx:ue/2,cy:ue/2,fill:i[2].color,r:ue/5,transform:"translate("+i[2].translateX+" "+i[2].translateY+")"}),l.jsx("line",{x1:0,y1:ue/2,x2:ue,y2:ue/2,strokeWidth:2,stroke:i[3].color,transform:"translate("+i[3].translateX+" "+i[3].translateY+") rotate("+i[3].rotate+" "+ue/2+" "+ue/2+")"})]})]})},It=90,Ld=5;function Vd(t,e){const r=wr(t),n=e&&e.length,s=Array.from({length:Ld},(i,o)=>Wt(r+o,e,n)),a=[];return a[0]=s[0],a[1]=s[1],a[2]=s[1],a[3]=s[2],a[4]=s[2],a[5]=s[3],a[6]=s[3],a[7]=s[0],a[8]=s[4],a}const $d=({name:t,colors:e,title:r,square:n,size:s,...a})=>{const i=Vd(t,e),o=b.useId();return l.jsxs("svg",{viewBox:"0 0 "+It+" "+It,fill:"none",role:"img",xmlns:"http://www.w3.org/2000/svg",width:s,height:s,...a,children:[r&&l.jsx("title",{children:t}),l.jsx("mask",{id:o,maskUnits:"userSpaceOnUse",x:0,y:0,width:It,height:It,children:l.jsx("rect",{width:It,height:It,rx:n?void 0:It*2,fill:"#FFFFFF"})}),l.jsxs("g",{mask:`url(#${o})`,children:[l.jsx("path",{d:"M0 0h90v45H0z",fill:i[0]}),l.jsx("path",{d:"M0 45h90v45H0z",fill:i[1]}),l.jsx("path",{d:"M83 45a38 38 0 00-76 0h76z",fill:i[2]}),l.jsx("path",{d:"M83 45a38 38 0 01-76 0h76z",fill:i[3]}),l.jsx("path",{d:"M77 45a32 32 0 10-64 0h64z",fill:i[4]}),l.jsx("path",{d:"M77 45a32 32 0 11-64 0h64z",fill:i[5]}),l.jsx("path",{d:"M71 45a26 26 0 00-52 0h52z",fill:i[6]}),l.jsx("path",{d:"M71 45a26 26 0 01-52 0h52z",fill:i[7]}),l.jsx("circle",{cx:45,cy:45,r:23,fill:i[8]})]})]})},zd=64,Pt=80;function Wd(t,e){const r=wr(t),n=e&&e.length;return Array.from({length:zd},(s,a)=>Wt(r%(a+1),e,n))}const Zd=({name:t,colors:e,title:r,square:n,size:s,...a})=>{const i=Wd(t,e),o=h.useId();return l.jsxs("svg",{viewBox:"0 0 "+Pt+" "+Pt,fill:"none",role:"img",xmlns:"http://www.w3.org/2000/svg",width:s,height:s,...a,children:[r&&l.jsx("title",{children:t}),l.jsx("mask",{id:o,"mask-type":"alpha",maskUnits:"userSpaceOnUse",x:0,y:0,width:Pt,height:Pt,children:l.jsx("rect",{width:Pt,height:Pt,rx:n?void 0:Pt*2,fill:"#FFFFFF"})}),l.jsxs("g",{mask:`url(#${o})`,children:[l.jsx("rect",{width:10,height:10,fill:i[0]}),l.jsx("rect",{x:20,width:10,height:10,fill:i[1]}),l.jsx("rect",{x:40,width:10,height:10,fill:i[2]}),l.jsx("rect",{x:60,width:10,height:10,fill:i[3]}),l.jsx("rect",{x:10,width:10,height:10,fill:i[4]}),l.jsx("rect",{x:30,width:10,height:10,fill:i[5]}),l.jsx("rect",{x:50,width:10,height:10,fill:i[6]}),l.jsx("rect",{x:70,width:10,height:10,fill:i[7]}),l.jsx("rect",{y:10,width:10,height:10,fill:i[8]}),l.jsx("rect",{y:20,width:10,height:10,fill:i[9]}),l.jsx("rect",{y:30,width:10,height:10,fill:i[10]}),l.jsx("rect",{y:40,width:10,height:10,fill:i[11]}),l.jsx("rect",{y:50,width:10,height:10,fill:i[12]}),l.jsx("rect",{y:60,width:10,height:10,fill:i[13]}),l.jsx("rect",{y:70,width:10,height:10,fill:i[14]}),l.jsx("rect",{x:20,y:10,width:10,height:10,fill:i[15]}),l.jsx("rect",{x:20,y:20,width:10,height:10,fill:i[16]}),l.jsx("rect",{x:20,y:30,width:10,height:10,fill:i[17]}),l.jsx("rect",{x:20,y:40,width:10,height:10,fill:i[18]}),l.jsx("rect",{x:20,y:50,width:10,height:10,fill:i[19]}),l.jsx("rect",{x:20,y:60,width:10,height:10,fill:i[20]}),l.jsx("rect",{x:20,y:70,width:10,height:10,fill:i[21]}),l.jsx("rect",{x:40,y:10,width:10,height:10,fill:i[22]}),l.jsx("rect",{x:40,y:20,width:10,height:10,fill:i[23]}),l.jsx("rect",{x:40,y:30,width:10,height:10,fill:i[24]}),l.jsx("rect",{x:40,y:40,width:10,height:10,fill:i[25]}),l.jsx("rect",{x:40,y:50,width:10,height:10,fill:i[26]}),l.jsx("rect",{x:40,y:60,width:10,height:10,fill:i[27]}),l.jsx("rect",{x:40,y:70,width:10,height:10,fill:i[28]}),l.jsx("rect",{x:60,y:10,width:10,height:10,fill:i[29]}),l.jsx("rect",{x:60,y:20,width:10,height:10,fill:i[30]}),l.jsx("rect",{x:60,y:30,width:10,height:10,fill:i[31]}),l.jsx("rect",{x:60,y:40,width:10,height:10,fill:i[32]}),l.jsx("rect",{x:60,y:50,width:10,height:10,fill:i[33]}),l.jsx("rect",{x:60,y:60,width:10,height:10,fill:i[34]}),l.jsx("rect",{x:60,y:70,width:10,height:10,fill:i[35]}),l.jsx("rect",{x:10,y:10,width:10,height:10,fill:i[36]}),l.jsx("rect",{x:10,y:20,width:10,height:10,fill:i[37]}),l.jsx("rect",{x:10,y:30,width:10,height:10,fill:i[38]}),l.jsx("rect",{x:10,y:40,width:10,height:10,fill:i[39]}),l.jsx("rect",{x:10,y:50,width:10,height:10,fill:i[40]}),l.jsx("rect",{x:10,y:60,width:10,height:10,fill:i[41]}),l.jsx("rect",{x:10,y:70,width:10,height:10,fill:i[42]}),l.jsx("rect",{x:30,y:10,width:10,height:10,fill:i[43]}),l.jsx("rect",{x:30,y:20,width:10,height:10,fill:i[44]}),l.jsx("rect",{x:30,y:30,width:10,height:10,fill:i[45]}),l.jsx("rect",{x:30,y:40,width:10,height:10,fill:i[46]}),l.jsx("rect",{x:30,y:50,width:10,height:10,fill:i[47]}),l.jsx("rect",{x:30,y:60,width:10,height:10,fill:i[48]}),l.jsx("rect",{x:30,y:70,width:10,height:10,fill:i[49]}),l.jsx("rect",{x:50,y:10,width:10,height:10,fill:i[50]}),l.jsx("rect",{x:50,y:20,width:10,height:10,fill:i[51]}),l.jsx("rect",{x:50,y:30,width:10,height:10,fill:i[52]}),l.jsx("rect",{x:50,y:40,width:10,height:10,fill:i[53]}),l.jsx("rect",{x:50,y:50,width:10,height:10,fill:i[54]}),l.jsx("rect",{x:50,y:60,width:10,height:10,fill:i[55]}),l.jsx("rect",{x:50,y:70,width:10,height:10,fill:i[56]}),l.jsx("rect",{x:70,y:10,width:10,height:10,fill:i[57]}),l.jsx("rect",{x:70,y:20,width:10,height:10,fill:i[58]}),l.jsx("rect",{x:70,y:30,width:10,height:10,fill:i[59]}),l.jsx("rect",{x:70,y:40,width:10,height:10,fill:i[60]}),l.jsx("rect",{x:70,y:50,width:10,height:10,fill:i[61]}),l.jsx("rect",{x:70,y:60,width:10,height:10,fill:i[62]}),l.jsx("rect",{x:70,y:70,width:10,height:10,fill:i[63]})]})]})},he=36;function Bd(t,e){const r=wr(t),n=e&&e.length,s=Wt(r,e,n),a=Se(r,10,1),i=a<5?a+he/9:a,o=Se(r,10,2),c=o<5?o+he/9:o;return{wrapperColor:s,faceColor:Id(s),backgroundColor:Wt(r+13,e,n),wrapperTranslateX:i,wrapperTranslateY:c,wrapperRotate:Se(r,360),wrapperScale:1+Se(r,he/12)/10,isMouthOpen:$s(r,2),isCircle:$s(r,1),eyeSpread:Se(r,5),mouthSpread:Se(r,3),faceRotate:Se(r,10,3),faceTranslateX:i>he/6?i/2:Se(r,8,1),faceTranslateY:c>he/6?c/2:Se(r,7,2)}}const fi=({name:t,colors:e,title:r,square:n,size:s,...a})=>{const i=Bd(t,e),o=h.useId();return l.jsxs("svg",{viewBox:"0 0 "+he+" "+he,fill:"none",role:"img",xmlns:"http://www.w3.org/2000/svg",width:s,height:s,...a,children:[r&&l.jsx("title",{children:t}),l.jsx("mask",{id:o,maskUnits:"userSpaceOnUse",x:0,y:0,width:he,height:he,children:l.jsx("rect",{width:he,height:he,rx:n?void 0:he*2,fill:"#FFFFFF"})}),l.jsxs("g",{mask:`url(#${o})`,children:[l.jsx("rect",{width:he,height:he,fill:i.backgroundColor}),l.jsx("rect",{x:"0",y:"0",width:he,height:he,transform:"translate("+i.wrapperTranslateX+" "+i.wrapperTranslateY+") rotate("+i.wrapperRotate+" "+he/2+" "+he/2+") scale("+i.wrapperScale+")",fill:i.wrapperColor,rx:i.isCircle?he:he/6}),l.jsxs("g",{transform:"translate("+i.faceTranslateX+" "+i.faceTranslateY+") rotate("+i.faceRotate+" "+he/2+" "+he/2+")",children:[i.isMouthOpen?l.jsx("path",{d:"M15 "+(19+i.mouthSpread)+"c2 1 4 1 6 0",stroke:i.faceColor,fill:"none",strokeLinecap:"round"}):l.jsx("path",{d:"M13,"+(19+i.mouthSpread)+" a1,0.75 0 0,0 10,0",fill:i.faceColor}),l.jsx("rect",{x:14-i.eyeSpread,y:14,width:1.5,height:2,rx:1,stroke:"none",fill:i.faceColor}),l.jsx("rect",{x:20+i.eyeSpread,y:14,width:1.5,height:2,rx:1,stroke:"none",fill:i.faceColor})]})]})]})},Ud=4,Ee=80;function Hd(t,e){const r=wr(t),n=e&&e.length;return Array.from({length:Ud},(s,a)=>Wt(r+a,e,n))}const qd=({name:t,colors:e,title:r,square:n,size:s,...a})=>{const i=Hd(t,e),o=t.replace(/\s/g,""),c=h.useId();return l.jsxs("svg",{viewBox:"0 0 "+Ee+" "+Ee,fill:"none",role:"img",xmlns:"http://www.w3.org/2000/svg",width:s,height:s,...a,children:[r&&l.jsx("title",{children:t}),l.jsx("mask",{id:c,maskUnits:"userSpaceOnUse",x:0,y:0,width:Ee,height:Ee,children:l.jsx("rect",{width:Ee,height:Ee,rx:n?void 0:Ee*2,fill:"#FFFFFF"})}),l.jsxs("g",{mask:`url(#${c})`,children:[l.jsx("path",{fill:"url(#gradient_paint0_linear_"+o+")",d:"M0 0h80v40H0z"}),l.jsx("path",{fill:"url(#gradient_paint1_linear_"+o+")",d:"M0 40h80v40H0z"})]}),l.jsxs("defs",{children:[l.jsxs("linearGradient",{id:"gradient_paint0_linear_"+o,x1:Ee/2,y1:0,x2:Ee/2,y2:Ee/2,gradientUnits:"userSpaceOnUse",children:[l.jsx("stop",{stopColor:i[0]}),l.jsx("stop",{offset:1,stopColor:i[1]})]}),l.jsxs("linearGradient",{id:"gradient_paint1_linear_"+o,x1:Ee/2,y1:Ee/2,x2:Ee/2,y2:Ee,gradientUnits:"userSpaceOnUse",children:[l.jsx("stop",{stopColor:i[2]}),l.jsx("stop",{offset:1,stopColor:i[3]})]})]})]})},Yd=3,ke=80;function Gd(t,e){const r=wr(t),n=e&&e.length;return Array.from({length:Yd},(s,a)=>({color:Wt(r+a,e,n),translateX:Se(r*(a+1),ke/10,1),translateY:Se(r*(a+1),ke/10,2),scale:1.2+Se(r*(a+1),ke/20)/10,rotate:Se(r*(a+1),360,1)}))}const Uo=({name:t,colors:e,title:r,square:n,size:s,...a})=>{const i=Gd(t,e),o=h.useId();return l.jsxs("svg",{viewBox:"0 0 "+ke+" "+ke,fill:"none",role:"img",xmlns:"http://www.w3.org/2000/svg",width:s,height:s,...a,children:[r&&l.jsx("title",{children:t}),l.jsx("mask",{id:o,maskUnits:"userSpaceOnUse",x:0,y:0,width:ke,height:ke,children:l.jsx("rect",{width:ke,height:ke,rx:n?void 0:ke*2,fill:"#FFFFFF"})}),l.jsxs("g",{mask:`url(#${o})`,children:[l.jsx("rect",{width:ke,height:ke,fill:i[0].color}),l.jsx("path",{filter:`url(#filter_${o})`,d:"M32.414 59.35L50.376 70.5H72.5v-71H33.728L26.5 13.381l19.057 27.08L32.414 59.35z",fill:i[1].color,transform:"translate("+i[1].translateX+" "+i[1].translateY+") rotate("+i[1].rotate+" "+ke/2+" "+ke/2+") scale("+i[2].scale+")"}),l.jsx("path",{filter:`url(#filter_${o})`,style:{mixBlendMode:"overlay"},d:"M22.216 24L0 46.75l14.108 38.129L78 86l-3.081-59.276-22.378 4.005 12.972 20.186-23.35 27.395L22.215 24z",fill:i[2].color,transform:"translate("+i[2].translateX+" "+i[2].translateY+") rotate("+i[2].rotate+" "+ke/2+" "+ke/2+") scale("+i[2].scale+")"})]}),l.jsx("defs",{children:l.jsxs("filter",{id:`filter_${o}`,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[l.jsx("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),l.jsx("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),l.jsx("feGaussianBlur",{stdDeviation:7,result:"effect1_foregroundBlur"})]})})]})},Xd={pixel:Zd,bauhaus:di,ring:$d,beam:fi,sunset:qd,marble:Uo,geometric:fi,abstract:di},Ho=({variant:t="marble",colors:e=["#92A1C6","#146A7C","#F0AB3D","#C271B4","#C20D90"],name:r="Clara Barton",title:n=!1,size:s="40px",square:a=!1,...i})=>{const o=Xd[t]||Uo;return l.jsx(o,{colors:e,name:r,title:n,size:s,square:a,...i})},qo=["var(--oniratec-brand)","var(--oniratec-fill-primary)","var(--oniratec-label-primary)"],Jd=({personId:t})=>l.jsx(Ho,{size:40,name:t,variant:"beam",colors:qo}),Kd=({userId:t})=>l.jsx(Ho,{size:40,name:t,variant:"bauhaus",colors:qo});function N(...t){return Wo.twMerge(ha.clsx(t))}const Qd=({children:t,className:e})=>l.jsx("div",{className:N("rounded-lg border border-[color:var(--oniratec-border-primary)] bg-[color:var(--oniratec-fill-primary)] p-4 shadow-[var(--oniratec-shadow-card-md)]",e),children:t});function hi(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Yo(...t){return e=>{let r=!1;const n=t.map(s=>{const a=hi(s,e);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let s=0;s<n.length;s++){const a=n[s];typeof a=="function"?a():hi(t[s],null)}}}}function $e(...t){return h.useCallback(Yo(...t),t)}function Zn(t){const e=ef(t),r=h.forwardRef((n,s)=>{const{children:a,...i}=n,o=h.Children.toArray(a),c=o.find(rf);if(c){const u=c.props.children,f=o.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return l.jsx(e,{...i,ref:s,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return l.jsx(e,{...i,ref:s,children:a})});return r.displayName=`${t}.Slot`,r}var Go=Zn("Slot");function ef(t){const e=h.forwardRef((r,n)=>{const{children:s,...a}=r;if(h.isValidElement(s)){const i=sf(s),o=nf(a,s.props);return s.type!==h.Fragment&&(o.ref=n?Yo(n,i):i),h.cloneElement(s,o)}return h.Children.count(s)>1?h.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var tf=Symbol("radix.slottable");function rf(t){return h.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===tf}function nf(t,e){const r={...e};for(const n in e){const s=t[n],a=e[n];/^on[A-Z]/.test(n)?s&&a?r[n]=(...o)=>{const c=a(...o);return s(...o),c}:s&&(r[n]=s):n==="style"?r[n]={...s,...a}:n==="className"&&(r[n]=[s,a].filter(Boolean).join(" "))}return{...t,...r}}function sf(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}const mi=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,pi=ha.clsx,Bn=(t,e)=>r=>{var n;if(e?.variants==null)return pi(t,r?.class,r?.className);const{variants:s,defaultVariants:a}=e,i=Object.keys(s).map(u=>{const f=r?.[u],d=a?.[u];if(f===null)return null;const m=mi(f)||mi(d);return s[u][m]}),o=r&&Object.entries(r).reduce((u,f)=>{let[d,m]=f;return m===void 0||(u[d]=m),u},{}),c=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((u,f)=>{let{class:d,className:m,...p}=f;return Object.entries(p).every(y=>{let[g,x]=y;return Array.isArray(x)?x.includes({...a,...o}[g]):{...a,...o}[g]===x})?[...u,d,m]:u},[]);return pi(t,i,c,r?.class,r?.className)},Xo=Bn("inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap rounded-lg border border-transparent text-sm font-medium transition-[background-color,border-color,color,transform,box-shadow] outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",primary:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted dark:border-input dark:bg-input/30 dark:hover:bg-input/50",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted dark:hover:bg-muted/60",link:"h-auto rounded-none border-transparent px-0 py-0 text-primary underline-offset-4 hover:underline focus-visible:border-transparent focus-visible:ring-0"},size:{xs:"h-6 rounded-md px-2 text-xs [&_svg]:size-3",sm:"h-7 rounded-md px-2.5 text-[0.8rem] [&_svg]:size-3.5",md:"h-8 px-2.5",lg:"h-9 px-3 text-sm",icon:"h-8 w-8","icon-sm":"h-7 w-7 rounded-md","icon-lg":"h-9 w-9"}},defaultVariants:{variant:"default",size:"md"}}),Le=h.forwardRef(({className:t,asChild:e=!1,variant:r="default",size:n="md",loading:s=!1,disabled:a,children:i,...o},c)=>{const u=e?Go:"button";return l.jsxs(u,{ref:c,"data-size":n??void 0,"data-variant":r??void 0,className:N(Xo({variant:r,size:n}),t),disabled:a||s,...o,children:[s&&l.jsx(J.Loader2,{className:"h-4 w-4 animate-spin"}),i]})});Le.displayName="Button";const af=({src:t,alt:e,width:r=70,height:n=70,className:s,ImageComponent:a,...i})=>{const o=a??"img";return l.jsx(o,{type:void 0,props:void 0,src:t,alt:e,width:r,height:n,className:N("inline-block object-contain",s),...i},null)},zs=({children:t,className:e,size:r="default"})=>l.jsx("div",{className:N("flex flex-col overflow-hidden rounded-xl bg-card text-card-foreground ring-1 ring-foreground/10 shadow-card-sm transition-[box-shadow,transform]",r==="sm"?"gap-3 py-3":"gap-4 py-4","hover:shadow-card-md",e),children:t}),Jo=({children:t,className:e})=>l.jsx("div",{className:N("grid gap-1 px-4",e),children:t}),Ko=({children:t,className:e})=>l.jsx("h3",{className:N("text-base font-medium leading-snug text-card-foreground",e),children:t}),of=({children:t,className:e})=>l.jsx("p",{className:N("text-sm text-muted-foreground",e),children:t}),Qo=({children:t,className:e})=>l.jsx("div",{className:N("px-4",e),children:t}),lf=({children:t,className:e})=>l.jsx("div",{className:N("ml-auto flex items-center gap-2",e),children:t}),cf=({children:t,className:e})=>l.jsx("div",{className:N("flex items-center gap-2 border-t bg-muted/50 p-4",e),children:t}),el=Bn("relative grid w-full grid-cols-[auto_1fr] items-start gap-3 rounded-xl bg-card p-4 text-sm text-card-foreground ring-1 ring-foreground/10",{variants:{variant:{info:"[&_svg]:text-muted-foreground",success:"bg-primary/5 ring-primary/15 [&_svg]:text-primary dark:bg-primary/10",warning:"bg-amber-500/10 ring-amber-500/20 [&_svg]:text-amber-600 dark:bg-amber-500/15 dark:[&_svg]:text-amber-400",error:"bg-destructive/10 ring-destructive/20 [&_svg]:text-destructive dark:bg-destructive/15"}},defaultVariants:{variant:"info"}}),uf={error:J.AlertCircle,warning:J.AlertTriangle,info:J.Info,success:J.CheckCircle},tl=h.forwardRef(({className:t,variant:e="info",children:r,...n},s)=>{const a=uf[e];return l.jsxs("div",{ref:s,role:"alert",className:N(el({variant:e}),t),...n,children:[a&&l.jsx(a,{className:"mt-0.5 h-4 w-4 shrink-0","aria-hidden":"true"}),l.jsx("div",{className:"flex-1",children:r})]})});tl.displayName="Alert";const rl=h.forwardRef(({className:t,...e},r)=>l.jsx("h5",{ref:r,className:N("mb-1 font-medium leading-none tracking-tight",t),...e}));rl.displayName="AlertTitle";const nl=h.forwardRef(({className:t,...e},r)=>l.jsx("div",{ref:r,className:N("text-sm text-muted-foreground [&_p]:leading-relaxed",t),...e}));nl.displayName="AlertDescription";const sl=Bn("inline-flex items-center rounded-md border font-medium transition-colors focus:outline-none focus-visible:ring-3 focus-visible:ring-ring/50",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",success:"border-transparent bg-emerald-500/15 text-emerald-700 dark:text-emerald-400",warning:"border-transparent bg-amber-500/10 text-amber-700 dark:text-amber-300",danger:"border-transparent bg-destructive/10 text-destructive",info:"border-transparent bg-accent text-accent-foreground",outline:"border-border bg-background text-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground"},size:{sm:"px-1.5 py-0.5 text-[11px]",md:"px-2 py-0.5 text-xs"}},defaultVariants:{variant:"default",size:"md"}}),pa=h.forwardRef(({className:t,variant:e="default",size:r="md",...n},s)=>l.jsx("span",{ref:s,className:N(sl({variant:e,size:r}),t),...n}));pa.displayName="Badge";const al=h.forwardRef(({className:t,id:e,label:r,description:n,size:s="md",indeterminate:a=!1,disabled:i,"aria-describedby":o,"aria-invalid":c,...u},f)=>{const d=h.useId(),m=e??d,p=n?`${m}-description`:void 0,y=c===!0||c==="true",g=h.useRef(null);h.useEffect(()=>{g.current&&(g.current.indeterminate=a)},[a]);const x=h.useCallback(v=>{g.current=v,typeof f=="function"?f(v):f&&(f.current=v)},[f]);return l.jsxs("label",{htmlFor:m,className:N("inline-flex w-fit items-start gap-2.5 text-sm",i&&"cursor-not-allowed opacity-60",t),children:[l.jsx("input",{ref:x,id:m,type:"checkbox",disabled:i,"aria-invalid":y||void 0,"aria-checked":a?"mixed":void 0,"aria-describedby":[o,p].filter(Boolean).join(" ")||void 0,className:"peer sr-only",...u}),l.jsx("span",{className:N("flex shrink-0 items-center justify-center rounded-[min(var(--radius-md),10px)] border border-input bg-background text-primary-foreground transition-[background-color,border-color,box-shadow,color] outline-none","peer-focus-visible:border-ring peer-focus-visible:ring-3 peer-focus-visible:ring-ring/50","peer-disabled:border-border/50 peer-disabled:bg-muted/50 peer-disabled:opacity-70",!a&&"peer-checked:border-primary peer-checked:bg-primary peer-checked:[&_svg]:opacity-100",a&&"border-primary bg-primary [&_svg]:opacity-100",y&&"border-destructive peer-focus-visible:border-destructive peer-focus-visible:ring-destructive/20",s==="sm"?"h-4 w-4":"h-5 w-5"),children:a?l.jsx(J.Minus,{className:"h-3.5 w-3.5 opacity-0 transition-opacity"}):l.jsx(J.Check,{className:"h-3.5 w-3.5 opacity-0 transition-opacity"})}),(r||n)&&l.jsxs("span",{className:"grid gap-1 leading-tight",children:[r&&l.jsx("span",{className:"font-medium text-foreground",children:r}),n&&l.jsx("span",{id:p,className:"text-sm text-muted-foreground",children:n})]})]})});al.displayName="Checkbox";function Re(t,e,{checkForDefaultPrevented:r=!0}={}){return function(s){if(t?.(s),r===!1||!s.defaultPrevented)return e?.(s)}}function df(t,e){const r=h.createContext(e),n=a=>{const{children:i,...o}=a,c=h.useMemo(()=>o,Object.values(o));return l.jsx(r.Provider,{value:c,children:i})};n.displayName=t+"Provider";function s(a){const i=h.useContext(r);if(i)return i;if(e!==void 0)return e;throw new Error(`\`${a}\` must be used within \`${t}\``)}return[n,s]}function Un(t,e=[]){let r=[];function n(a,i){const o=h.createContext(i),c=r.length;r=[...r,i];const u=d=>{const{scope:m,children:p,...y}=d,g=m?.[t]?.[c]||o,x=h.useMemo(()=>y,Object.values(y));return l.jsx(g.Provider,{value:x,children:p})};u.displayName=a+"Provider";function f(d,m){const p=m?.[t]?.[c]||o,y=h.useContext(p);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[u,f]}const s=()=>{const a=r.map(i=>h.createContext(i));return function(o){const c=o?.[t]||a;return h.useMemo(()=>({[`__scope${t}`]:{...o,[t]:c}}),[o,c])}};return s.scopeName=t,[n,ff(s,...e)]}function ff(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(a){const i=n.reduce((o,{useScope:c,scopeName:u})=>{const d=c(a)[`__scope${u}`];return{...o,...d}},{});return h.useMemo(()=>({[`__scope${e.scopeName}`]:i}),[i])}};return r.scopeName=e.scopeName,r}var hf=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_e=hf.reduce((t,e)=>{const r=Zn(`Primitive.${e}`),n=h.forwardRef((s,a)=>{const{asChild:i,...o}=s,c=i?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...o,ref:a})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function mf(t,e){t&&Zo.flushSync(()=>t.dispatchEvent(e))}function hr(t){const e=h.useRef(t);return h.useEffect(()=>{e.current=t}),h.useMemo(()=>(...r)=>e.current?.(...r),[])}function pf(t,e=globalThis?.document){const r=hr(t);h.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return e.addEventListener("keydown",n,{capture:!0}),()=>e.removeEventListener("keydown",n,{capture:!0})},[r,e])}var gf="DismissableLayer",Ws="dismissableLayer.update",yf="dismissableLayer.pointerDownOutside",vf="dismissableLayer.focusOutside",gi,il=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ga=h.forwardRef((t,e)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:a,onInteractOutside:i,onDismiss:o,...c}=t,u=h.useContext(il),[f,d]=h.useState(null),m=f?.ownerDocument??globalThis?.document,[,p]=h.useState({}),y=$e(e,T=>d(T)),g=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(x),S=f?g.indexOf(f):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,k=S>=v,w=wf(T=>{const A=T.target,$=[...u.branches].some(L=>L.contains(A));!k||$||(s?.(T),i?.(T),T.defaultPrevented||o?.())},m),j=kf(T=>{const A=T.target;[...u.branches].some(L=>L.contains(A))||(a?.(T),i?.(T),T.defaultPrevented||o?.())},m);return pf(T=>{S===u.layers.size-1&&(n?.(T),!T.defaultPrevented&&o&&(T.preventDefault(),o()))},m),h.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(gi=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),yi(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=gi)}},[f,m,r,u]),h.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),yi())},[f,u]),h.useEffect(()=>{const T=()=>p({});return document.addEventListener(Ws,T),()=>document.removeEventListener(Ws,T)},[]),l.jsx(_e.div,{...c,ref:y,style:{pointerEvents:C?k?"auto":"none":void 0,...t.style},onFocusCapture:Re(t.onFocusCapture,j.onFocusCapture),onBlurCapture:Re(t.onBlurCapture,j.onBlurCapture),onPointerDownCapture:Re(t.onPointerDownCapture,w.onPointerDownCapture)})});ga.displayName=gf;var xf="DismissableLayerBranch",bf=h.forwardRef((t,e)=>{const r=h.useContext(il),n=h.useRef(null),s=$e(e,n);return h.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),l.jsx(_e.div,{...t,ref:s})});bf.displayName=xf;function wf(t,e=globalThis?.document){const r=hr(t),n=h.useRef(!1),s=h.useRef(()=>{});return h.useEffect(()=>{const a=o=>{if(o.target&&!n.current){let c=function(){ol(yf,r,u,{discrete:!0})};const u={originalEvent:o};o.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=c,e.addEventListener("click",s.current,{once:!0})):c()}else e.removeEventListener("click",s.current);n.current=!1},i=window.setTimeout(()=>{e.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),e.removeEventListener("pointerdown",a),e.removeEventListener("click",s.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function kf(t,e=globalThis?.document){const r=hr(t),n=h.useRef(!1);return h.useEffect(()=>{const s=a=>{a.target&&!n.current&&ol(vf,r,{originalEvent:a},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function yi(){const t=new CustomEvent(Ws);document.dispatchEvent(t)}function ol(t,e,r,{discrete:n}){const s=r.originalEvent.target,a=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?mf(s,a):s.dispatchEvent(a)}var vs=0;function ll(){h.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??vi()),document.body.insertAdjacentElement("beforeend",t[1]??vi()),vs++,()=>{vs===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),vs--}},[])}function vi(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var xs="focusScope.autoFocusOnMount",bs="focusScope.autoFocusOnUnmount",xi={bubbles:!1,cancelable:!0},Sf="FocusScope",ya=h.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:a,...i}=t,[o,c]=h.useState(null),u=hr(s),f=hr(a),d=h.useRef(null),m=$e(e,g=>c(g)),p=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(n){let g=function(C){if(p.paused||!o)return;const k=C.target;o.contains(k)?d.current=k:kt(d.current,{select:!0})},x=function(C){if(p.paused||!o)return;const k=C.relatedTarget;k!==null&&(o.contains(k)||kt(d.current,{select:!0}))},v=function(C){if(document.activeElement===document.body)for(const w of C)w.removedNodes.length>0&&kt(o)};document.addEventListener("focusin",g),document.addEventListener("focusout",x);const S=new MutationObserver(v);return o&&S.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",x),S.disconnect()}}},[n,o,p.paused]),h.useEffect(()=>{if(o){wi.add(p);const g=document.activeElement;if(!o.contains(g)){const v=new CustomEvent(xs,xi);o.addEventListener(xs,u),o.dispatchEvent(v),v.defaultPrevented||(Nf(Ef(cl(o)),{select:!0}),document.activeElement===g&&kt(o))}return()=>{o.removeEventListener(xs,u),setTimeout(()=>{const v=new CustomEvent(bs,xi);o.addEventListener(bs,f),o.dispatchEvent(v),v.defaultPrevented||kt(g??document.body,{select:!0}),o.removeEventListener(bs,f),wi.remove(p)},0)}}},[o,u,f,p]);const y=h.useCallback(g=>{if(!r&&!n||p.paused)return;const x=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,v=document.activeElement;if(x&&v){const S=g.currentTarget,[C,k]=Cf(S);C&&k?!g.shiftKey&&v===k?(g.preventDefault(),r&&kt(C,{select:!0})):g.shiftKey&&v===C&&(g.preventDefault(),r&&kt(k,{select:!0})):v===S&&g.preventDefault()}},[r,n,p.paused]);return l.jsx(_e.div,{tabIndex:-1,...i,ref:m,onKeyDown:y})});ya.displayName=Sf;function Nf(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(kt(n,{select:e}),document.activeElement!==r)return}function Cf(t){const e=cl(t),r=bi(e,t),n=bi(e.reverse(),t);return[r,n]}function cl(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function bi(t,e){for(const r of t)if(!_f(r,{upTo:e}))return r}function _f(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function Tf(t){return t instanceof HTMLInputElement&&"select"in t}function kt(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&Tf(t)&&e&&t.select()}}var wi=jf();function jf(){let t=[];return{add(e){const r=t[0];e!==r&&r?.pause(),t=ki(t,e),t.unshift(e)},remove(e){t=ki(t,e),t[0]?.resume()}}}function ki(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function Ef(t){return t.filter(e=>e.tagName!=="A")}var jt=globalThis?.document?h.useLayoutEffect:()=>{},Of=h[" useId ".trim().toString()]||(()=>{}),Df=0;function xn(t){const[e,r]=h.useState(Of());return jt(()=>{r(n=>n??String(Df++))},[t]),t||(e?`radix-${e}`:"")}const Rf=["top","right","bottom","left"],Et=Math.min,Ie=Math.max,Tn=Math.round,an=Math.floor,lt=t=>({x:t,y:t}),Af={left:"right",right:"left",bottom:"top",top:"bottom"},Mf={start:"end",end:"start"};function Zs(t,e,r){return Ie(t,Et(e,r))}function pt(t,e){return typeof t=="function"?t(e):t}function gt(t){return t.split("-")[0]}function kr(t){return t.split("-")[1]}function va(t){return t==="x"?"y":"x"}function xa(t){return t==="y"?"height":"width"}const If=new Set(["top","bottom"]);function ot(t){return If.has(gt(t))?"y":"x"}function ba(t){return va(ot(t))}function Pf(t,e,r){r===void 0&&(r=!1);const n=kr(t),s=ba(t),a=xa(s);let i=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(i=jn(i)),[i,jn(i)]}function Ff(t){const e=jn(t);return[Bs(t),e,Bs(e)]}function Bs(t){return t.replace(/start|end/g,e=>Mf[e])}const Si=["left","right"],Ni=["right","left"],Lf=["top","bottom"],Vf=["bottom","top"];function $f(t,e,r){switch(t){case"top":case"bottom":return r?e?Ni:Si:e?Si:Ni;case"left":case"right":return e?Lf:Vf;default:return[]}}function zf(t,e,r,n){const s=kr(t);let a=$f(gt(t),r==="start",n);return s&&(a=a.map(i=>i+"-"+s),e&&(a=a.concat(a.map(Bs)))),a}function jn(t){return t.replace(/left|right|bottom|top/g,e=>Af[e])}function Wf(t){return{top:0,right:0,bottom:0,left:0,...t}}function ul(t){return typeof t!="number"?Wf(t):{top:t,right:t,bottom:t,left:t}}function En(t){const{x:e,y:r,width:n,height:s}=t;return{width:n,height:s,top:r,left:e,right:e+n,bottom:r+s,x:e,y:r}}function Ci(t,e,r){let{reference:n,floating:s}=t;const a=ot(e),i=ba(e),o=xa(i),c=gt(e),u=a==="y",f=n.x+n.width/2-s.width/2,d=n.y+n.height/2-s.height/2,m=n[o]/2-s[o]/2;let p;switch(c){case"top":p={x:f,y:n.y-s.height};break;case"bottom":p={x:f,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-s.width,y:d};break;default:p={x:n.x,y:n.y}}switch(kr(e)){case"start":p[i]-=m*(r&&u?-1:1);break;case"end":p[i]+=m*(r&&u?-1:1);break}return p}const Zf=async(t,e,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:a=[],platform:i}=r,o=a.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(e));let u=await i.getElementRects({reference:t,floating:e,strategy:s}),{x:f,y:d}=Ci(u,n,c),m=n,p={},y=0;for(let g=0;g<o.length;g++){const{name:x,fn:v}=o[g],{x:S,y:C,data:k,reset:w}=await v({x:f,y:d,initialPlacement:n,placement:m,strategy:s,middlewareData:p,rects:u,platform:i,elements:{reference:t,floating:e}});f=S??f,d=C??d,p={...p,[x]:{...p[x],...k}},w&&y<=50&&(y++,typeof w=="object"&&(w.placement&&(m=w.placement),w.rects&&(u=w.rects===!0?await i.getElementRects({reference:t,floating:e,strategy:s}):w.rects),{x:f,y:d}=Ci(u,m,c)),g=-1)}return{x:f,y:d,placement:m,strategy:s,middlewareData:p}};async function Fr(t,e){var r;e===void 0&&(e={});const{x:n,y:s,platform:a,rects:i,elements:o,strategy:c}=t,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:m=!1,padding:p=0}=pt(e,t),y=ul(p),x=o[m?d==="floating"?"reference":"floating":d],v=En(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(x)))==null||r?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(o.floating)),boundary:u,rootBoundary:f,strategy:c})),S=d==="floating"?{x:n,y:s,width:i.floating.width,height:i.floating.height}:i.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(o.floating)),k=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},w=En(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:S,offsetParent:C,strategy:c}):S);return{top:(v.top-w.top+y.top)/k.y,bottom:(w.bottom-v.bottom+y.bottom)/k.y,left:(v.left-w.left+y.left)/k.x,right:(w.right-v.right+y.right)/k.x}}const Bf=t=>({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:s,rects:a,platform:i,elements:o,middlewareData:c}=e,{element:u,padding:f=0}=pt(t,e)||{};if(u==null)return{};const d=ul(f),m={x:r,y:n},p=ba(s),y=xa(p),g=await i.getDimensions(u),x=p==="y",v=x?"top":"left",S=x?"bottom":"right",C=x?"clientHeight":"clientWidth",k=a.reference[y]+a.reference[p]-m[p]-a.floating[y],w=m[p]-a.reference[p],j=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let T=j?j[C]:0;(!T||!await(i.isElement==null?void 0:i.isElement(j)))&&(T=o.floating[C]||a.floating[y]);const A=k/2-w/2,$=T/2-g[y]/2-1,L=Et(d[v],$),W=Et(d[S],$),B=L,G=T-g[y]-W,Q=T/2-g[y]/2+A,H=Zs(B,Q,G),P=!c.arrow&&kr(s)!=null&&Q!==H&&a.reference[y]/2-(Q<B?L:W)-g[y]/2<0,U=P?Q<B?Q-B:Q-G:0;return{[p]:m[p]+U,data:{[p]:H,centerOffset:Q-H-U,...P&&{alignmentOffset:U}},reset:P}}}),Uf=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,n;const{placement:s,middlewareData:a,rects:i,initialPlacement:o,platform:c,elements:u}=e,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:g=!0,...x}=pt(t,e);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const v=gt(s),S=ot(o),C=gt(o)===o,k=await(c.isRTL==null?void 0:c.isRTL(u.floating)),w=m||(C||!g?[jn(o)]:Ff(o)),j=y!=="none";!m&&j&&w.push(...zf(o,g,y,k));const T=[o,...w],A=await Fr(e,x),$=[];let L=((n=a.flip)==null?void 0:n.overflows)||[];if(f&&$.push(A[v]),d){const Q=Pf(s,i,k);$.push(A[Q[0]],A[Q[1]])}if(L=[...L,{placement:s,overflows:$}],!$.every(Q=>Q<=0)){var W,B;const Q=(((W=a.flip)==null?void 0:W.index)||0)+1,H=T[Q];if(H&&(!(d==="alignment"?S!==ot(H):!1)||L.every(V=>ot(V.placement)===S?V.overflows[0]>0:!0)))return{data:{index:Q,overflows:L},reset:{placement:H}};let P=(B=L.filter(U=>U.overflows[0]<=0).sort((U,V)=>U.overflows[1]-V.overflows[1])[0])==null?void 0:B.placement;if(!P)switch(p){case"bestFit":{var G;const U=(G=L.filter(V=>{if(j){const ie=ot(V.placement);return ie===S||ie==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(ie=>ie>0).reduce((ie,F)=>ie+F,0)]).sort((V,ie)=>V[1]-ie[1])[0])==null?void 0:G[0];U&&(P=U);break}case"initialPlacement":P=o;break}if(s!==P)return{reset:{placement:P}}}return{}}}};function _i(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Ti(t){return Rf.some(e=>t[e]>=0)}const Hf=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...s}=pt(t,e);switch(n){case"referenceHidden":{const a=await Fr(e,{...s,elementContext:"reference"}),i=_i(a,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Ti(i)}}}case"escaped":{const a=await Fr(e,{...s,altBoundary:!0}),i=_i(a,r.floating);return{data:{escapedOffsets:i,escaped:Ti(i)}}}default:return{}}}}},dl=new Set(["left","top"]);async function qf(t,e){const{placement:r,platform:n,elements:s}=t,a=await(n.isRTL==null?void 0:n.isRTL(s.floating)),i=gt(r),o=kr(r),c=ot(r)==="y",u=dl.has(i)?-1:1,f=a&&c?-1:1,d=pt(e,t);let{mainAxis:m,crossAxis:p,alignmentAxis:y}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return o&&typeof y=="number"&&(p=o==="end"?y*-1:y),c?{x:p*f,y:m*u}:{x:m*u,y:p*f}}const Yf=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:s,y:a,placement:i,middlewareData:o}=e,c=await qf(e,t);return i===((r=o.offset)==null?void 0:r.placement)&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:s+c.x,y:a+c.y,data:{...c,placement:i}}}}},Gf=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:s}=e,{mainAxis:a=!0,crossAxis:i=!1,limiter:o={fn:x=>{let{x:v,y:S}=x;return{x:v,y:S}}},...c}=pt(t,e),u={x:r,y:n},f=await Fr(e,c),d=ot(gt(s)),m=va(d);let p=u[m],y=u[d];if(a){const x=m==="y"?"top":"left",v=m==="y"?"bottom":"right",S=p+f[x],C=p-f[v];p=Zs(S,p,C)}if(i){const x=d==="y"?"top":"left",v=d==="y"?"bottom":"right",S=y+f[x],C=y-f[v];y=Zs(S,y,C)}const g=o.fn({...e,[m]:p,[d]:y});return{...g,data:{x:g.x-r,y:g.y-n,enabled:{[m]:a,[d]:i}}}}}},Xf=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:s,rects:a,middlewareData:i}=e,{offset:o=0,mainAxis:c=!0,crossAxis:u=!0}=pt(t,e),f={x:r,y:n},d=ot(s),m=va(d);let p=f[m],y=f[d];const g=pt(o,e),x=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const C=m==="y"?"height":"width",k=a.reference[m]-a.floating[C]+x.mainAxis,w=a.reference[m]+a.reference[C]-x.mainAxis;p<k?p=k:p>w&&(p=w)}if(u){var v,S;const C=m==="y"?"width":"height",k=dl.has(gt(s)),w=a.reference[d]-a.floating[C]+(k&&((v=i.offset)==null?void 0:v[d])||0)+(k?0:x.crossAxis),j=a.reference[d]+a.reference[C]+(k?0:((S=i.offset)==null?void 0:S[d])||0)-(k?x.crossAxis:0);y<w?y=w:y>j&&(y=j)}return{[m]:p,[d]:y}}}},Jf=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var r,n;const{placement:s,rects:a,platform:i,elements:o}=e,{apply:c=()=>{},...u}=pt(t,e),f=await Fr(e,u),d=gt(s),m=kr(s),p=ot(s)==="y",{width:y,height:g}=a.floating;let x,v;d==="top"||d==="bottom"?(x=d,v=m===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(v=d,x=m==="end"?"top":"bottom");const S=g-f.top-f.bottom,C=y-f.left-f.right,k=Et(g-f[x],S),w=Et(y-f[v],C),j=!e.middlewareData.shift;let T=k,A=w;if((r=e.middlewareData.shift)!=null&&r.enabled.x&&(A=C),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(T=S),j&&!m){const L=Ie(f.left,0),W=Ie(f.right,0),B=Ie(f.top,0),G=Ie(f.bottom,0);p?A=y-2*(L!==0||W!==0?L+W:Ie(f.left,f.right)):T=g-2*(B!==0||G!==0?B+G:Ie(f.top,f.bottom))}await c({...e,availableWidth:A,availableHeight:T});const $=await i.getDimensions(o.floating);return y!==$.width||g!==$.height?{reset:{rects:!0}}:{}}}};function Hn(){return typeof window<"u"}function Sr(t){return fl(t)?(t.nodeName||"").toLowerCase():"#document"}function Pe(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function ft(t){var e;return(e=(fl(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function fl(t){return Hn()?t instanceof Node||t instanceof Pe(t).Node:!1}function Qe(t){return Hn()?t instanceof Element||t instanceof Pe(t).Element:!1}function ut(t){return Hn()?t instanceof HTMLElement||t instanceof Pe(t).HTMLElement:!1}function ji(t){return!Hn()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Pe(t).ShadowRoot}const Kf=new Set(["inline","contents"]);function Ur(t){const{overflow:e,overflowX:r,overflowY:n,display:s}=et(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!Kf.has(s)}const Qf=new Set(["table","td","th"]);function eh(t){return Qf.has(Sr(t))}const th=[":popover-open",":modal"];function qn(t){return th.some(e=>{try{return t.matches(e)}catch{return!1}})}const rh=["transform","translate","scale","rotate","perspective"],nh=["transform","translate","scale","rotate","perspective","filter"],sh=["paint","layout","strict","content"];function wa(t){const e=ka(),r=Qe(t)?et(t):t;return rh.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||nh.some(n=>(r.willChange||"").includes(n))||sh.some(n=>(r.contain||"").includes(n))}function ah(t){let e=Ot(t);for(;ut(e)&&!mr(e);){if(wa(e))return e;if(qn(e))return null;e=Ot(e)}return null}function ka(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ih=new Set(["html","body","#document"]);function mr(t){return ih.has(Sr(t))}function et(t){return Pe(t).getComputedStyle(t)}function Yn(t){return Qe(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ot(t){if(Sr(t)==="html")return t;const e=t.assignedSlot||t.parentNode||ji(t)&&t.host||ft(t);return ji(e)?e.host:e}function hl(t){const e=Ot(t);return mr(e)?t.ownerDocument?t.ownerDocument.body:t.body:ut(e)&&Ur(e)?e:hl(e)}function Lr(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const s=hl(t),a=s===((n=t.ownerDocument)==null?void 0:n.body),i=Pe(s);if(a){const o=Us(i);return e.concat(i,i.visualViewport||[],Ur(s)?s:[],o&&r?Lr(o):[])}return e.concat(s,Lr(s,[],r))}function Us(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ml(t){const e=et(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const s=ut(t),a=s?t.offsetWidth:r,i=s?t.offsetHeight:n,o=Tn(r)!==a||Tn(n)!==i;return o&&(r=a,n=i),{width:r,height:n,$:o}}function Sa(t){return Qe(t)?t:t.contextElement}function cr(t){const e=Sa(t);if(!ut(e))return lt(1);const r=e.getBoundingClientRect(),{width:n,height:s,$:a}=ml(e);let i=(a?Tn(r.width):r.width)/n,o=(a?Tn(r.height):r.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!o||!Number.isFinite(o))&&(o=1),{x:i,y:o}}const oh=lt(0);function pl(t){const e=Pe(t);return!ka()||!e.visualViewport?oh:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function lh(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==Pe(t)?!1:e}function Zt(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const s=t.getBoundingClientRect(),a=Sa(t);let i=lt(1);e&&(n?Qe(n)&&(i=cr(n)):i=cr(t));const o=lh(a,r,n)?pl(a):lt(0);let c=(s.left+o.x)/i.x,u=(s.top+o.y)/i.y,f=s.width/i.x,d=s.height/i.y;if(a){const m=Pe(a),p=n&&Qe(n)?Pe(n):n;let y=m,g=Us(y);for(;g&&n&&p!==y;){const x=cr(g),v=g.getBoundingClientRect(),S=et(g),C=v.left+(g.clientLeft+parseFloat(S.paddingLeft))*x.x,k=v.top+(g.clientTop+parseFloat(S.paddingTop))*x.y;c*=x.x,u*=x.y,f*=x.x,d*=x.y,c+=C,u+=k,y=Pe(g),g=Us(y)}}return En({width:f,height:d,x:c,y:u})}function Gn(t,e){const r=Yn(t).scrollLeft;return e?e.left+r:Zt(ft(t)).left+r}function gl(t,e){const r=t.getBoundingClientRect(),n=r.left+e.scrollLeft-Gn(t,r),s=r.top+e.scrollTop;return{x:n,y:s}}function ch(t){let{elements:e,rect:r,offsetParent:n,strategy:s}=t;const a=s==="fixed",i=ft(n),o=e?qn(e.floating):!1;if(n===i||o&&a)return r;let c={scrollLeft:0,scrollTop:0},u=lt(1);const f=lt(0),d=ut(n);if((d||!d&&!a)&&((Sr(n)!=="body"||Ur(i))&&(c=Yn(n)),ut(n))){const p=Zt(n);u=cr(n),f.x=p.x+n.clientLeft,f.y=p.y+n.clientTop}const m=i&&!d&&!a?gl(i,c):lt(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+f.x+m.x,y:r.y*u.y-c.scrollTop*u.y+f.y+m.y}}function uh(t){return Array.from(t.getClientRects())}function dh(t){const e=ft(t),r=Yn(t),n=t.ownerDocument.body,s=Ie(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),a=Ie(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+Gn(t);const o=-r.scrollTop;return et(n).direction==="rtl"&&(i+=Ie(e.clientWidth,n.clientWidth)-s),{width:s,height:a,x:i,y:o}}const Ei=25;function fh(t,e){const r=Pe(t),n=ft(t),s=r.visualViewport;let a=n.clientWidth,i=n.clientHeight,o=0,c=0;if(s){a=s.width,i=s.height;const f=ka();(!f||f&&e==="fixed")&&(o=s.offsetLeft,c=s.offsetTop)}const u=Gn(n);if(u<=0){const f=n.ownerDocument,d=f.body,m=getComputedStyle(d),p=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,y=Math.abs(n.clientWidth-d.clientWidth-p);y<=Ei&&(a-=y)}else u<=Ei&&(a+=u);return{width:a,height:i,x:o,y:c}}const hh=new Set(["absolute","fixed"]);function mh(t,e){const r=Zt(t,!0,e==="fixed"),n=r.top+t.clientTop,s=r.left+t.clientLeft,a=ut(t)?cr(t):lt(1),i=t.clientWidth*a.x,o=t.clientHeight*a.y,c=s*a.x,u=n*a.y;return{width:i,height:o,x:c,y:u}}function Oi(t,e,r){let n;if(e==="viewport")n=fh(t,r);else if(e==="document")n=dh(ft(t));else if(Qe(e))n=mh(e,r);else{const s=pl(t);n={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return En(n)}function yl(t,e){const r=Ot(t);return r===e||!Qe(r)||mr(r)?!1:et(r).position==="fixed"||yl(r,e)}function ph(t,e){const r=e.get(t);if(r)return r;let n=Lr(t,[],!1).filter(o=>Qe(o)&&Sr(o)!=="body"),s=null;const a=et(t).position==="fixed";let i=a?Ot(t):t;for(;Qe(i)&&!mr(i);){const o=et(i),c=wa(i);!c&&o.position==="fixed"&&(s=null),(a?!c&&!s:!c&&o.position==="static"&&!!s&&hh.has(s.position)||Ur(i)&&!c&&yl(t,i))?n=n.filter(f=>f!==i):s=o,i=Ot(i)}return e.set(t,n),n}function gh(t){let{element:e,boundary:r,rootBoundary:n,strategy:s}=t;const i=[...r==="clippingAncestors"?qn(e)?[]:ph(e,this._c):[].concat(r),n],o=i[0],c=i.reduce((u,f)=>{const d=Oi(e,f,s);return u.top=Ie(d.top,u.top),u.right=Et(d.right,u.right),u.bottom=Et(d.bottom,u.bottom),u.left=Ie(d.left,u.left),u},Oi(e,o,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function yh(t){const{width:e,height:r}=ml(t);return{width:e,height:r}}function vh(t,e,r){const n=ut(e),s=ft(e),a=r==="fixed",i=Zt(t,!0,a,e);let o={scrollLeft:0,scrollTop:0};const c=lt(0);function u(){c.x=Gn(s)}if(n||!n&&!a)if((Sr(e)!=="body"||Ur(s))&&(o=Yn(e)),n){const p=Zt(e,!0,a,e);c.x=p.x+e.clientLeft,c.y=p.y+e.clientTop}else s&&u();a&&!n&&s&&u();const f=s&&!n&&!a?gl(s,o):lt(0),d=i.left+o.scrollLeft-c.x-f.x,m=i.top+o.scrollTop-c.y-f.y;return{x:d,y:m,width:i.width,height:i.height}}function ws(t){return et(t).position==="static"}function Di(t,e){if(!ut(t)||et(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return ft(t)===r&&(r=r.ownerDocument.body),r}function vl(t,e){const r=Pe(t);if(qn(t))return r;if(!ut(t)){let s=Ot(t);for(;s&&!mr(s);){if(Qe(s)&&!ws(s))return s;s=Ot(s)}return r}let n=Di(t,e);for(;n&&eh(n)&&ws(n);)n=Di(n,e);return n&&mr(n)&&ws(n)&&!wa(n)?r:n||ah(t)||r}const xh=async function(t){const e=this.getOffsetParent||vl,r=this.getDimensions,n=await r(t.floating);return{reference:vh(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function bh(t){return et(t).direction==="rtl"}const wh={convertOffsetParentRelativeRectToViewportRelativeRect:ch,getDocumentElement:ft,getClippingRect:gh,getOffsetParent:vl,getElementRects:xh,getClientRects:uh,getDimensions:yh,getScale:cr,isElement:Qe,isRTL:bh};function xl(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function kh(t,e){let r=null,n;const s=ft(t);function a(){var o;clearTimeout(n),(o=r)==null||o.disconnect(),r=null}function i(o,c){o===void 0&&(o=!1),c===void 0&&(c=1),a();const u=t.getBoundingClientRect(),{left:f,top:d,width:m,height:p}=u;if(o||e(),!m||!p)return;const y=an(d),g=an(s.clientWidth-(f+m)),x=an(s.clientHeight-(d+p)),v=an(f),C={rootMargin:-y+"px "+-g+"px "+-x+"px "+-v+"px",threshold:Ie(0,Et(1,c))||1};let k=!0;function w(j){const T=j[0].intersectionRatio;if(T!==c){if(!k)return i();T?i(!1,T):n=setTimeout(()=>{i(!1,1e-7)},1e3)}T===1&&!xl(u,t.getBoundingClientRect())&&i(),k=!1}try{r=new IntersectionObserver(w,{...C,root:s.ownerDocument})}catch{r=new IntersectionObserver(w,C)}r.observe(t)}return i(!0),a}function Sh(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=Sa(t),f=s||a?[...u?Lr(u):[],...Lr(e)]:[];f.forEach(v=>{s&&v.addEventListener("scroll",r,{passive:!0}),a&&v.addEventListener("resize",r)});const d=u&&o?kh(u,r):null;let m=-1,p=null;i&&(p=new ResizeObserver(v=>{let[S]=v;S&&S.target===u&&p&&(p.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var C;(C=p)==null||C.observe(e)})),r()}),u&&!c&&p.observe(u),p.observe(e));let y,g=c?Zt(t):null;c&&x();function x(){const v=Zt(t);g&&!xl(g,v)&&r(),g=v,y=requestAnimationFrame(x)}return r(),()=>{var v;f.forEach(S=>{s&&S.removeEventListener("scroll",r),a&&S.removeEventListener("resize",r)}),d?.(),(v=p)==null||v.disconnect(),p=null,c&&cancelAnimationFrame(y)}}const Nh=Yf,Ch=Gf,_h=Uf,Th=Jf,jh=Hf,Ri=Bf,Eh=Xf,Oh=(t,e,r)=>{const n=new Map,s={platform:wh,...r},a={...s.platform,_c:n};return Zf(t,e,{...s,platform:a})};var Dh=typeof document<"u",Rh=function(){},bn=Dh?b.useLayoutEffect:Rh;function On(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!==e.length)return!1;for(n=r;n--!==0;)if(!On(t[n],e[n]))return!1;return!0}if(s=Object.keys(t),r=s.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,s[n]))return!1;for(n=r;n--!==0;){const a=s[n];if(!(a==="_owner"&&t.$$typeof)&&!On(t[a],e[a]))return!1}return!0}return t!==t&&e!==e}function bl(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Ai(t,e){const r=bl(t);return Math.round(e*r)/r}function ks(t){const e=h.useRef(t);return bn(()=>{e.current=t}),e}function Ah(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:a,floating:i}={},transform:o=!0,whileElementsMounted:c,open:u}=t,[f,d]=h.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[m,p]=h.useState(n);On(m,n)||p(n);const[y,g]=h.useState(null),[x,v]=h.useState(null),S=h.useCallback(V=>{V!==j.current&&(j.current=V,g(V))},[]),C=h.useCallback(V=>{V!==T.current&&(T.current=V,v(V))},[]),k=a||y,w=i||x,j=h.useRef(null),T=h.useRef(null),A=h.useRef(f),$=c!=null,L=ks(c),W=ks(s),B=ks(u),G=h.useCallback(()=>{if(!j.current||!T.current)return;const V={placement:e,strategy:r,middleware:m};W.current&&(V.platform=W.current),Oh(j.current,T.current,V).then(ie=>{const F={...ie,isPositioned:B.current!==!1};Q.current&&!On(A.current,F)&&(A.current=F,Zo.flushSync(()=>{d(F)}))})},[m,e,r,W,B]);bn(()=>{u===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,d(V=>({...V,isPositioned:!1})))},[u]);const Q=h.useRef(!1);bn(()=>(Q.current=!0,()=>{Q.current=!1}),[]),bn(()=>{if(k&&(j.current=k),w&&(T.current=w),k&&w){if(L.current)return L.current(k,w,G);G()}},[k,w,G,L,$]);const H=h.useMemo(()=>({reference:j,floating:T,setReference:S,setFloating:C}),[S,C]),P=h.useMemo(()=>({reference:k,floating:w}),[k,w]),U=h.useMemo(()=>{const V={position:r,left:0,top:0};if(!P.floating)return V;const ie=Ai(P.floating,f.x),F=Ai(P.floating,f.y);return o?{...V,transform:"translate("+ie+"px, "+F+"px)",...bl(P.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:ie,top:F}},[r,o,P.floating,f.x,f.y]);return h.useMemo(()=>({...f,update:G,refs:H,elements:P,floatingStyles:U}),[f,G,H,P,U])}const Mh=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:s}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?Ri({element:n.current,padding:s}).fn(r):{}:n?Ri({element:n,padding:s}).fn(r):{}}}},Ih=(t,e)=>({...Nh(t),options:[t,e]}),Ph=(t,e)=>({...Ch(t),options:[t,e]}),Fh=(t,e)=>({...Eh(t),options:[t,e]}),Lh=(t,e)=>({..._h(t),options:[t,e]}),Vh=(t,e)=>({...Th(t),options:[t,e]}),$h=(t,e)=>({...jh(t),options:[t,e]}),zh=(t,e)=>({...Mh(t),options:[t,e]});var Wh="Arrow",wl=h.forwardRef((t,e)=>{const{children:r,width:n=10,height:s=5,...a}=t;return l.jsx(_e.svg,{...a,ref:e,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});wl.displayName=Wh;var Zh=wl;function kl(t){const[e,r]=h.useState(void 0);return jt(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const a=s[0];let i,o;if("borderBoxSize"in a){const c=a.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,o=u.blockSize}else i=t.offsetWidth,o=t.offsetHeight;r({width:i,height:o})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}var Na="Popper",[Sl,Nl]=Un(Na),[Bh,Cl]=Sl(Na),_l=t=>{const{__scopePopper:e,children:r}=t,[n,s]=h.useState(null);return l.jsx(Bh,{scope:e,anchor:n,onAnchorChange:s,children:r})};_l.displayName=Na;var Tl="PopperAnchor",jl=h.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...s}=t,a=Cl(Tl,r),i=h.useRef(null),o=$e(e,i),c=h.useRef(null);return h.useEffect(()=>{const u=c.current;c.current=n?.current||i.current,u!==c.current&&a.onAnchorChange(c.current)}),n?null:l.jsx(_e.div,{...s,ref:o})});jl.displayName=Tl;var Ca="PopperContent",[Uh,Hh]=Sl(Ca),El=h.forwardRef((t,e)=>{const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:a="center",alignOffset:i=0,arrowPadding:o=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:m=!1,updatePositionStrategy:p="optimized",onPlaced:y,...g}=t,x=Cl(Ca,r),[v,S]=h.useState(null),C=$e(e,Te=>S(Te)),[k,w]=h.useState(null),j=kl(k),T=j?.width??0,A=j?.height??0,$=n+(a!=="center"?"-"+a:""),L=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},W=Array.isArray(u)?u:[u],B=W.length>0,G={padding:L,boundary:W.filter(Yh),altBoundary:B},{refs:Q,floatingStyles:H,placement:P,isPositioned:U,middlewareData:V}=Ah({strategy:"fixed",placement:$,whileElementsMounted:(...Te)=>Sh(...Te,{animationFrame:p==="always"}),elements:{reference:x.anchor},middleware:[Ih({mainAxis:s+A,alignmentAxis:i}),c&&Ph({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Fh():void 0,...G}),c&&Lh({...G}),Vh({...G,apply:({elements:Te,rects:le,availableWidth:vt,availableHeight:Yt})=>{const{width:Gt,height:xt}=le.reference,Xt=Te.floating.style;Xt.setProperty("--radix-popper-available-width",`${vt}px`),Xt.setProperty("--radix-popper-available-height",`${Yt}px`),Xt.setProperty("--radix-popper-anchor-width",`${Gt}px`),Xt.setProperty("--radix-popper-anchor-height",`${xt}px`)}}),k&&zh({element:k,padding:o}),Gh({arrowWidth:T,arrowHeight:A}),m&&$h({strategy:"referenceHidden",...G})]}),[ie,F]=Rl(P),D=hr(y);jt(()=>{U&&D?.()},[U,D]);const ee=V.arrow?.x,z=V.arrow?.y,oe=V.arrow?.centerOffset!==0,[ce,ve]=h.useState();return jt(()=>{v&&ve(window.getComputedStyle(v).zIndex)},[v]),l.jsx("div",{ref:Q.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:U?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ce,"--radix-popper-transform-origin":[V.transformOrigin?.x,V.transformOrigin?.y].join(" "),...V.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:l.jsx(Uh,{scope:r,placedSide:ie,onArrowChange:w,arrowX:ee,arrowY:z,shouldHideArrow:oe,children:l.jsx(_e.div,{"data-side":ie,"data-align":F,...g,ref:C,style:{...g.style,animation:U?void 0:"none"}})})})});El.displayName=Ca;var Ol="PopperArrow",qh={top:"bottom",right:"left",bottom:"top",left:"right"},Dl=h.forwardRef(function(e,r){const{__scopePopper:n,...s}=e,a=Hh(Ol,n),i=qh[a.placedSide];return l.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:l.jsx(Zh,{...s,ref:r,style:{...s.style,display:"block"}})})});Dl.displayName=Ol;function Yh(t){return t!==null}var Gh=t=>({name:"transformOrigin",options:t,fn(e){const{placement:r,rects:n,middlewareData:s}=e,i=s.arrow?.centerOffset!==0,o=i?0:t.arrowWidth,c=i?0:t.arrowHeight,[u,f]=Rl(r),d={start:"0%",center:"50%",end:"100%"}[f],m=(s.arrow?.x??0)+o/2,p=(s.arrow?.y??0)+c/2;let y="",g="";return u==="bottom"?(y=i?d:`${m}px`,g=`${-c}px`):u==="top"?(y=i?d:`${m}px`,g=`${n.floating.height+c}px`):u==="right"?(y=`${-c}px`,g=i?d:`${p}px`):u==="left"&&(y=`${n.floating.width+c}px`,g=i?d:`${p}px`),{data:{x:y,y:g}}}});function Rl(t){const[e,r="center"]=t.split("-");return[e,r]}var Xh=_l,Al=jl,Jh=El,Kh=Dl,Qh="Portal",_a=h.forwardRef((t,e)=>{const{container:r,...n}=t,[s,a]=h.useState(!1);jt(()=>a(!0),[]);const i=r||s&&globalThis?.document?.body;return i?ma.createPortal(l.jsx(_e.div,{...n,ref:e}),i):null});_a.displayName=Qh;function em(t,e){return h.useReducer((r,n)=>e[r][n]??r,t)}var Nr=t=>{const{present:e,children:r}=t,n=tm(e),s=typeof r=="function"?r({present:n.isPresent}):h.Children.only(r),a=$e(n.ref,rm(s));return typeof r=="function"||n.isPresent?h.cloneElement(s,{ref:a}):null};Nr.displayName="Presence";function tm(t){const[e,r]=h.useState(),n=h.useRef(null),s=h.useRef(t),a=h.useRef("none"),i=t?"mounted":"unmounted",[o,c]=em(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const u=on(n.current);a.current=o==="mounted"?u:"none"},[o]),jt(()=>{const u=n.current,f=s.current;if(f!==t){const m=a.current,p=on(u);t?c("MOUNT"):p==="none"||u?.display==="none"?c("UNMOUNT"):c(f&&m!==p?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,c]),jt(()=>{if(e){let u;const f=e.ownerDocument.defaultView??window,d=p=>{const g=on(n.current).includes(CSS.escape(p.animationName));if(p.target===e&&g&&(c("ANIMATION_END"),!s.current)){const x=e.style.animationFillMode;e.style.animationFillMode="forwards",u=f.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=x)})}},m=p=>{p.target===e&&(a.current=on(n.current))};return e.addEventListener("animationstart",m),e.addEventListener("animationcancel",d),e.addEventListener("animationend",d),()=>{f.clearTimeout(u),e.removeEventListener("animationstart",m),e.removeEventListener("animationcancel",d),e.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:h.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function on(t){return t?.animationName||"none"}function rm(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var nm=h[" useInsertionEffect ".trim().toString()]||jt;function Ta({prop:t,defaultProp:e,onChange:r=()=>{},caller:n}){const[s,a,i]=sm({defaultProp:e,onChange:r}),o=t!==void 0,c=o?t:s;{const f=h.useRef(t!==void 0);h.useEffect(()=>{const d=f.current;d!==o&&console.warn(`${n} is changing from ${d?"controlled":"uncontrolled"} to ${o?"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=o},[o,n])}const u=h.useCallback(f=>{if(o){const d=am(f)?f(t):f;d!==t&&i.current?.(d)}else a(f)},[o,t,a,i]);return[c,u]}function sm({defaultProp:t,onChange:e}){const[r,n]=h.useState(t),s=h.useRef(r),a=h.useRef(e);return nm(()=>{a.current=e},[e]),h.useEffect(()=>{s.current!==r&&(a.current?.(r),s.current=r)},[r,s]),[r,n,a]}function am(t){return typeof t=="function"}var im=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},er=new WeakMap,ln=new WeakMap,cn={},Ss=0,Ml=function(t){return t&&(t.host||Ml(t.parentNode))},om=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=Ml(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},lm=function(t,e,r,n){var s=om(e,Array.isArray(t)?t:[t]);cn[r]||(cn[r]=new WeakMap);var a=cn[r],i=[],o=new Set,c=new Set(s),u=function(d){!d||o.has(d)||(o.add(d),u(d.parentNode))};s.forEach(u);var f=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(m){if(o.has(m))f(m);else try{var p=m.getAttribute(n),y=p!==null&&p!=="false",g=(er.get(m)||0)+1,x=(a.get(m)||0)+1;er.set(m,g),a.set(m,x),i.push(m),g===1&&y&&ln.set(m,!0),x===1&&m.setAttribute(r,"true"),y||m.setAttribute(n,"true")}catch(v){console.error("aria-hidden: cannot operate on ",m,v)}})};return f(e),o.clear(),Ss++,function(){i.forEach(function(d){var m=er.get(d)-1,p=a.get(d)-1;er.set(d,m),a.set(d,p),m||(ln.has(d)||d.removeAttribute(n),ln.delete(d)),p||d.removeAttribute(r)}),Ss--,Ss||(er=new WeakMap,er=new WeakMap,ln=new WeakMap,cn={})}},Il=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),s=im(t);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live], script"))),lm(n,s,r,"aria-hidden")):function(){return null}},it=function(){return it=Object.assign||function(e){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},it.apply(this,arguments)};function Pl(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]]);return r}function cm(t,e,r){if(r||arguments.length===2)for(var n=0,s=e.length,a;n<s;n++)(a||!(n in e))&&(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return t.concat(a||Array.prototype.slice.call(e))}var wn="right-scroll-bar-position",kn="width-before-scroll-bar",um="with-scroll-bars-hidden",dm="--removed-body-scroll-bar-size";function Ns(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function fm(t,e){var r=b.useState(function(){return{value:t,callback:e,facade:{get current(){return r.value},set current(n){var s=r.value;s!==n&&(r.value=n,r.callback(n,s))}}}})[0];return r.callback=e,r.facade}var hm=typeof window<"u"?h.useLayoutEffect:h.useEffect,Mi=new WeakMap;function mm(t,e){var r=fm(null,function(n){return t.forEach(function(s){return Ns(s,n)})});return hm(function(){var n=Mi.get(r);if(n){var s=new Set(n),a=new Set(t),i=r.current;s.forEach(function(o){a.has(o)||Ns(o,null)}),a.forEach(function(o){s.has(o)||Ns(o,i)})}Mi.set(r,t)},[t]),r}function pm(t){return t}function gm(t,e){e===void 0&&(e=pm);var r=[],n=!1,s={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]:t},useMedium:function(a){var i=e(a,n);return r.push(i),function(){r=r.filter(function(o){return o!==i})}},assignSyncMedium:function(a){for(n=!0;r.length;){var i=r;r=[],i.forEach(a)}r={push:function(o){return a(o)},filter:function(){return r}}},assignMedium:function(a){n=!0;var i=[];if(r.length){var o=r;r=[],o.forEach(a),i=r}var c=function(){var f=i;i=[],f.forEach(a)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(f){i.push(f),u()},filter:function(f){return i=i.filter(f),r}}}};return s}function ym(t){t===void 0&&(t={});var e=gm(null);return e.options=it({async:!0,ssr:!1},t),e}var Fl=function(t){var e=t.sideCar,r=Pl(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=e.read();if(!n)throw new Error("Sidecar medium not found");return h.createElement(n,it({},r))};Fl.isSideCarExport=!0;function vm(t,e){return t.useMedium(e),Fl}var Ll=ym(),Cs=function(){},Xn=h.forwardRef(function(t,e){var r=h.useRef(null),n=h.useState({onScrollCapture:Cs,onWheelCapture:Cs,onTouchMoveCapture:Cs}),s=n[0],a=n[1],i=t.forwardProps,o=t.children,c=t.className,u=t.removeScrollBar,f=t.enabled,d=t.shards,m=t.sideCar,p=t.noRelative,y=t.noIsolation,g=t.inert,x=t.allowPinchZoom,v=t.as,S=v===void 0?"div":v,C=t.gapMode,k=Pl(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=m,j=mm([r,e]),T=it(it({},k),s);return h.createElement(h.Fragment,null,f&&h.createElement(w,{sideCar:Ll,removeScrollBar:u,shards:d,noRelative:p,noIsolation:y,inert:g,setCallbacks:a,allowPinchZoom:!!x,lockRef:r,gapMode:C}),i?h.cloneElement(h.Children.only(o),it(it({},T),{ref:j})):h.createElement(S,it({},T,{className:c,ref:j}),o))});Xn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Xn.classNames={fullWidth:kn,zeroRight:wn};var xm=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function bm(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=xm();return e&&t.setAttribute("nonce",e),t}function wm(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function km(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var Sm=function(){var t=0,e=null;return{add:function(r){t==0&&(e=bm())&&(wm(e,r),km(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},Nm=function(){var t=Sm();return function(e,r){h.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&r])}},Vl=function(){var t=Nm(),e=function(r){var n=r.styles,s=r.dynamic;return t(n,s),null};return e},Cm={left:0,top:0,right:0,gap:0},_s=function(t){return parseInt(t||"",10)||0},_m=function(t){var e=window.getComputedStyle(document.body),r=e[t==="padding"?"paddingLeft":"marginLeft"],n=e[t==="padding"?"paddingTop":"marginTop"],s=e[t==="padding"?"paddingRight":"marginRight"];return[_s(r),_s(n),_s(s)]},Tm=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return Cm;var e=_m(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}},jm=Vl(),ur="data-scroll-locked",Em=function(t,e,r,n){var s=t.left,a=t.top,i=t.right,o=t.gap;return r===void 0&&(r="margin"),`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Wo=require("tailwind-merge"),ha=require("clsx"),l=require("react/jsx-runtime"),b=require("react"),J=require("lucide-react"),ma=require("react-dom"),Dd=require("@radix-ui/react-dropdown-menu"),Rd=require("lottie-react"),Ad=require("@radix-ui/react-select"),Md=require("@radix-ui/react-tooltip");function Br(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const h=Br(b),Zo=Br(ma),fe=Br(Dd),pe=Br(Ad),zt=Br(Md),wr=t=>{let e=0;for(let r=0;r<t.length;r++){const n=t.charCodeAt(r);e=(e<<5)-e+n,e=e&e}return Math.abs(e)},Bo=(t,e)=>Math.floor(t/Math.pow(10,e)%10),$s=(t,e)=>!(Bo(t,e)%2),Se=(t,e,r)=>{const n=t%e;return r&&Bo(t,r)%2===0?-n:n},Wt=(t,e,r)=>e[t%r],Id=t=>{t.slice(0,1)==="#"&&(t=t.slice(1));const e=parseInt(t.substr(0,2),16),r=parseInt(t.substr(2,2),16),n=parseInt(t.substr(4,2),16);return(e*299+r*587+n*114)/1e3>=128?"#000000":"#FFFFFF"},Pd=4,ue=80;function Fd(t,e){const r=wr(t),n=e&&e.length;return Array.from({length:Pd},(s,a)=>({color:Wt(r+a,e,n),translateX:Se(r*(a+1),ue/2-(a+17),1),translateY:Se(r*(a+1),ue/2-(a+17),2),rotate:Se(r*(a+1),360),isSquare:$s(r,2)}))}const di=({name:t,colors:e,title:r,square:n,size:s,...a})=>{const i=Fd(t,e),o=h.useId();return l.jsxs("svg",{viewBox:"0 0 "+ue+" "+ue,fill:"none",role:"img",xmlns:"http://www.w3.org/2000/svg",width:s,height:s,...a,children:[r&&l.jsx("title",{children:t}),l.jsx("mask",{id:o,maskUnits:"userSpaceOnUse",x:0,y:0,width:ue,height:ue,children:l.jsx("rect",{width:ue,height:ue,rx:n?void 0:ue*2,fill:"#FFFFFF"})}),l.jsxs("g",{mask:`url(#${o})`,children:[l.jsx("rect",{width:ue,height:ue,fill:i[0].color}),l.jsx("rect",{x:(ue-60)/2,y:(ue-20)/2,width:ue,height:i[1].isSquare?ue:ue/8,fill:i[1].color,transform:"translate("+i[1].translateX+" "+i[1].translateY+") rotate("+i[1].rotate+" "+ue/2+" "+ue/2+")"}),l.jsx("circle",{cx:ue/2,cy:ue/2,fill:i[2].color,r:ue/5,transform:"translate("+i[2].translateX+" "+i[2].translateY+")"}),l.jsx("line",{x1:0,y1:ue/2,x2:ue,y2:ue/2,strokeWidth:2,stroke:i[3].color,transform:"translate("+i[3].translateX+" "+i[3].translateY+") rotate("+i[3].rotate+" "+ue/2+" "+ue/2+")"})]})]})},It=90,Ld=5;function Vd(t,e){const r=wr(t),n=e&&e.length,s=Array.from({length:Ld},(i,o)=>Wt(r+o,e,n)),a=[];return a[0]=s[0],a[1]=s[1],a[2]=s[1],a[3]=s[2],a[4]=s[2],a[5]=s[3],a[6]=s[3],a[7]=s[0],a[8]=s[4],a}const $d=({name:t,colors:e,title:r,square:n,size:s,...a})=>{const i=Vd(t,e),o=b.useId();return l.jsxs("svg",{viewBox:"0 0 "+It+" "+It,fill:"none",role:"img",xmlns:"http://www.w3.org/2000/svg",width:s,height:s,...a,children:[r&&l.jsx("title",{children:t}),l.jsx("mask",{id:o,maskUnits:"userSpaceOnUse",x:0,y:0,width:It,height:It,children:l.jsx("rect",{width:It,height:It,rx:n?void 0:It*2,fill:"#FFFFFF"})}),l.jsxs("g",{mask:`url(#${o})`,children:[l.jsx("path",{d:"M0 0h90v45H0z",fill:i[0]}),l.jsx("path",{d:"M0 45h90v45H0z",fill:i[1]}),l.jsx("path",{d:"M83 45a38 38 0 00-76 0h76z",fill:i[2]}),l.jsx("path",{d:"M83 45a38 38 0 01-76 0h76z",fill:i[3]}),l.jsx("path",{d:"M77 45a32 32 0 10-64 0h64z",fill:i[4]}),l.jsx("path",{d:"M77 45a32 32 0 11-64 0h64z",fill:i[5]}),l.jsx("path",{d:"M71 45a26 26 0 00-52 0h52z",fill:i[6]}),l.jsx("path",{d:"M71 45a26 26 0 01-52 0h52z",fill:i[7]}),l.jsx("circle",{cx:45,cy:45,r:23,fill:i[8]})]})]})},zd=64,Pt=80;function Wd(t,e){const r=wr(t),n=e&&e.length;return Array.from({length:zd},(s,a)=>Wt(r%(a+1),e,n))}const Zd=({name:t,colors:e,title:r,square:n,size:s,...a})=>{const i=Wd(t,e),o=h.useId();return l.jsxs("svg",{viewBox:"0 0 "+Pt+" "+Pt,fill:"none",role:"img",xmlns:"http://www.w3.org/2000/svg",width:s,height:s,...a,children:[r&&l.jsx("title",{children:t}),l.jsx("mask",{id:o,"mask-type":"alpha",maskUnits:"userSpaceOnUse",x:0,y:0,width:Pt,height:Pt,children:l.jsx("rect",{width:Pt,height:Pt,rx:n?void 0:Pt*2,fill:"#FFFFFF"})}),l.jsxs("g",{mask:`url(#${o})`,children:[l.jsx("rect",{width:10,height:10,fill:i[0]}),l.jsx("rect",{x:20,width:10,height:10,fill:i[1]}),l.jsx("rect",{x:40,width:10,height:10,fill:i[2]}),l.jsx("rect",{x:60,width:10,height:10,fill:i[3]}),l.jsx("rect",{x:10,width:10,height:10,fill:i[4]}),l.jsx("rect",{x:30,width:10,height:10,fill:i[5]}),l.jsx("rect",{x:50,width:10,height:10,fill:i[6]}),l.jsx("rect",{x:70,width:10,height:10,fill:i[7]}),l.jsx("rect",{y:10,width:10,height:10,fill:i[8]}),l.jsx("rect",{y:20,width:10,height:10,fill:i[9]}),l.jsx("rect",{y:30,width:10,height:10,fill:i[10]}),l.jsx("rect",{y:40,width:10,height:10,fill:i[11]}),l.jsx("rect",{y:50,width:10,height:10,fill:i[12]}),l.jsx("rect",{y:60,width:10,height:10,fill:i[13]}),l.jsx("rect",{y:70,width:10,height:10,fill:i[14]}),l.jsx("rect",{x:20,y:10,width:10,height:10,fill:i[15]}),l.jsx("rect",{x:20,y:20,width:10,height:10,fill:i[16]}),l.jsx("rect",{x:20,y:30,width:10,height:10,fill:i[17]}),l.jsx("rect",{x:20,y:40,width:10,height:10,fill:i[18]}),l.jsx("rect",{x:20,y:50,width:10,height:10,fill:i[19]}),l.jsx("rect",{x:20,y:60,width:10,height:10,fill:i[20]}),l.jsx("rect",{x:20,y:70,width:10,height:10,fill:i[21]}),l.jsx("rect",{x:40,y:10,width:10,height:10,fill:i[22]}),l.jsx("rect",{x:40,y:20,width:10,height:10,fill:i[23]}),l.jsx("rect",{x:40,y:30,width:10,height:10,fill:i[24]}),l.jsx("rect",{x:40,y:40,width:10,height:10,fill:i[25]}),l.jsx("rect",{x:40,y:50,width:10,height:10,fill:i[26]}),l.jsx("rect",{x:40,y:60,width:10,height:10,fill:i[27]}),l.jsx("rect",{x:40,y:70,width:10,height:10,fill:i[28]}),l.jsx("rect",{x:60,y:10,width:10,height:10,fill:i[29]}),l.jsx("rect",{x:60,y:20,width:10,height:10,fill:i[30]}),l.jsx("rect",{x:60,y:30,width:10,height:10,fill:i[31]}),l.jsx("rect",{x:60,y:40,width:10,height:10,fill:i[32]}),l.jsx("rect",{x:60,y:50,width:10,height:10,fill:i[33]}),l.jsx("rect",{x:60,y:60,width:10,height:10,fill:i[34]}),l.jsx("rect",{x:60,y:70,width:10,height:10,fill:i[35]}),l.jsx("rect",{x:10,y:10,width:10,height:10,fill:i[36]}),l.jsx("rect",{x:10,y:20,width:10,height:10,fill:i[37]}),l.jsx("rect",{x:10,y:30,width:10,height:10,fill:i[38]}),l.jsx("rect",{x:10,y:40,width:10,height:10,fill:i[39]}),l.jsx("rect",{x:10,y:50,width:10,height:10,fill:i[40]}),l.jsx("rect",{x:10,y:60,width:10,height:10,fill:i[41]}),l.jsx("rect",{x:10,y:70,width:10,height:10,fill:i[42]}),l.jsx("rect",{x:30,y:10,width:10,height:10,fill:i[43]}),l.jsx("rect",{x:30,y:20,width:10,height:10,fill:i[44]}),l.jsx("rect",{x:30,y:30,width:10,height:10,fill:i[45]}),l.jsx("rect",{x:30,y:40,width:10,height:10,fill:i[46]}),l.jsx("rect",{x:30,y:50,width:10,height:10,fill:i[47]}),l.jsx("rect",{x:30,y:60,width:10,height:10,fill:i[48]}),l.jsx("rect",{x:30,y:70,width:10,height:10,fill:i[49]}),l.jsx("rect",{x:50,y:10,width:10,height:10,fill:i[50]}),l.jsx("rect",{x:50,y:20,width:10,height:10,fill:i[51]}),l.jsx("rect",{x:50,y:30,width:10,height:10,fill:i[52]}),l.jsx("rect",{x:50,y:40,width:10,height:10,fill:i[53]}),l.jsx("rect",{x:50,y:50,width:10,height:10,fill:i[54]}),l.jsx("rect",{x:50,y:60,width:10,height:10,fill:i[55]}),l.jsx("rect",{x:50,y:70,width:10,height:10,fill:i[56]}),l.jsx("rect",{x:70,y:10,width:10,height:10,fill:i[57]}),l.jsx("rect",{x:70,y:20,width:10,height:10,fill:i[58]}),l.jsx("rect",{x:70,y:30,width:10,height:10,fill:i[59]}),l.jsx("rect",{x:70,y:40,width:10,height:10,fill:i[60]}),l.jsx("rect",{x:70,y:50,width:10,height:10,fill:i[61]}),l.jsx("rect",{x:70,y:60,width:10,height:10,fill:i[62]}),l.jsx("rect",{x:70,y:70,width:10,height:10,fill:i[63]})]})]})},he=36;function Bd(t,e){const r=wr(t),n=e&&e.length,s=Wt(r,e,n),a=Se(r,10,1),i=a<5?a+he/9:a,o=Se(r,10,2),c=o<5?o+he/9:o;return{wrapperColor:s,faceColor:Id(s),backgroundColor:Wt(r+13,e,n),wrapperTranslateX:i,wrapperTranslateY:c,wrapperRotate:Se(r,360),wrapperScale:1+Se(r,he/12)/10,isMouthOpen:$s(r,2),isCircle:$s(r,1),eyeSpread:Se(r,5),mouthSpread:Se(r,3),faceRotate:Se(r,10,3),faceTranslateX:i>he/6?i/2:Se(r,8,1),faceTranslateY:c>he/6?c/2:Se(r,7,2)}}const fi=({name:t,colors:e,title:r,square:n,size:s,...a})=>{const i=Bd(t,e),o=h.useId();return l.jsxs("svg",{viewBox:"0 0 "+he+" "+he,fill:"none",role:"img",xmlns:"http://www.w3.org/2000/svg",width:s,height:s,...a,children:[r&&l.jsx("title",{children:t}),l.jsx("mask",{id:o,maskUnits:"userSpaceOnUse",x:0,y:0,width:he,height:he,children:l.jsx("rect",{width:he,height:he,rx:n?void 0:he*2,fill:"#FFFFFF"})}),l.jsxs("g",{mask:`url(#${o})`,children:[l.jsx("rect",{width:he,height:he,fill:i.backgroundColor}),l.jsx("rect",{x:"0",y:"0",width:he,height:he,transform:"translate("+i.wrapperTranslateX+" "+i.wrapperTranslateY+") rotate("+i.wrapperRotate+" "+he/2+" "+he/2+") scale("+i.wrapperScale+")",fill:i.wrapperColor,rx:i.isCircle?he:he/6}),l.jsxs("g",{transform:"translate("+i.faceTranslateX+" "+i.faceTranslateY+") rotate("+i.faceRotate+" "+he/2+" "+he/2+")",children:[i.isMouthOpen?l.jsx("path",{d:"M15 "+(19+i.mouthSpread)+"c2 1 4 1 6 0",stroke:i.faceColor,fill:"none",strokeLinecap:"round"}):l.jsx("path",{d:"M13,"+(19+i.mouthSpread)+" a1,0.75 0 0,0 10,0",fill:i.faceColor}),l.jsx("rect",{x:14-i.eyeSpread,y:14,width:1.5,height:2,rx:1,stroke:"none",fill:i.faceColor}),l.jsx("rect",{x:20+i.eyeSpread,y:14,width:1.5,height:2,rx:1,stroke:"none",fill:i.faceColor})]})]})]})},Ud=4,Ee=80;function Hd(t,e){const r=wr(t),n=e&&e.length;return Array.from({length:Ud},(s,a)=>Wt(r+a,e,n))}const qd=({name:t,colors:e,title:r,square:n,size:s,...a})=>{const i=Hd(t,e),o=t.replace(/\s/g,""),c=h.useId();return l.jsxs("svg",{viewBox:"0 0 "+Ee+" "+Ee,fill:"none",role:"img",xmlns:"http://www.w3.org/2000/svg",width:s,height:s,...a,children:[r&&l.jsx("title",{children:t}),l.jsx("mask",{id:c,maskUnits:"userSpaceOnUse",x:0,y:0,width:Ee,height:Ee,children:l.jsx("rect",{width:Ee,height:Ee,rx:n?void 0:Ee*2,fill:"#FFFFFF"})}),l.jsxs("g",{mask:`url(#${c})`,children:[l.jsx("path",{fill:"url(#gradient_paint0_linear_"+o+")",d:"M0 0h80v40H0z"}),l.jsx("path",{fill:"url(#gradient_paint1_linear_"+o+")",d:"M0 40h80v40H0z"})]}),l.jsxs("defs",{children:[l.jsxs("linearGradient",{id:"gradient_paint0_linear_"+o,x1:Ee/2,y1:0,x2:Ee/2,y2:Ee/2,gradientUnits:"userSpaceOnUse",children:[l.jsx("stop",{stopColor:i[0]}),l.jsx("stop",{offset:1,stopColor:i[1]})]}),l.jsxs("linearGradient",{id:"gradient_paint1_linear_"+o,x1:Ee/2,y1:Ee/2,x2:Ee/2,y2:Ee,gradientUnits:"userSpaceOnUse",children:[l.jsx("stop",{stopColor:i[2]}),l.jsx("stop",{offset:1,stopColor:i[3]})]})]})]})},Yd=3,ke=80;function Gd(t,e){const r=wr(t),n=e&&e.length;return Array.from({length:Yd},(s,a)=>({color:Wt(r+a,e,n),translateX:Se(r*(a+1),ke/10,1),translateY:Se(r*(a+1),ke/10,2),scale:1.2+Se(r*(a+1),ke/20)/10,rotate:Se(r*(a+1),360,1)}))}const Uo=({name:t,colors:e,title:r,square:n,size:s,...a})=>{const i=Gd(t,e),o=h.useId();return l.jsxs("svg",{viewBox:"0 0 "+ke+" "+ke,fill:"none",role:"img",xmlns:"http://www.w3.org/2000/svg",width:s,height:s,...a,children:[r&&l.jsx("title",{children:t}),l.jsx("mask",{id:o,maskUnits:"userSpaceOnUse",x:0,y:0,width:ke,height:ke,children:l.jsx("rect",{width:ke,height:ke,rx:n?void 0:ke*2,fill:"#FFFFFF"})}),l.jsxs("g",{mask:`url(#${o})`,children:[l.jsx("rect",{width:ke,height:ke,fill:i[0].color}),l.jsx("path",{filter:`url(#filter_${o})`,d:"M32.414 59.35L50.376 70.5H72.5v-71H33.728L26.5 13.381l19.057 27.08L32.414 59.35z",fill:i[1].color,transform:"translate("+i[1].translateX+" "+i[1].translateY+") rotate("+i[1].rotate+" "+ke/2+" "+ke/2+") scale("+i[2].scale+")"}),l.jsx("path",{filter:`url(#filter_${o})`,style:{mixBlendMode:"overlay"},d:"M22.216 24L0 46.75l14.108 38.129L78 86l-3.081-59.276-22.378 4.005 12.972 20.186-23.35 27.395L22.215 24z",fill:i[2].color,transform:"translate("+i[2].translateX+" "+i[2].translateY+") rotate("+i[2].rotate+" "+ke/2+" "+ke/2+") scale("+i[2].scale+")"})]}),l.jsx("defs",{children:l.jsxs("filter",{id:`filter_${o}`,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB",children:[l.jsx("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),l.jsx("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),l.jsx("feGaussianBlur",{stdDeviation:7,result:"effect1_foregroundBlur"})]})})]})},Xd={pixel:Zd,bauhaus:di,ring:$d,beam:fi,sunset:qd,marble:Uo,geometric:fi,abstract:di},Ho=({variant:t="marble",colors:e=["#92A1C6","#146A7C","#F0AB3D","#C271B4","#C20D90"],name:r="Clara Barton",title:n=!1,size:s="40px",square:a=!1,...i})=>{const o=Xd[t]||Uo;return l.jsx(o,{colors:e,name:r,title:n,size:s,square:a,...i})},qo=["var(--oniratec-brand)","var(--oniratec-fill-primary)","var(--oniratec-label-primary)"],Jd=({personId:t})=>l.jsx(Ho,{size:40,name:t,variant:"beam",colors:qo}),Kd=({userId:t})=>l.jsx(Ho,{size:40,name:t,variant:"bauhaus",colors:qo});function N(...t){return Wo.twMerge(ha.clsx(t))}const Qd=({children:t,className:e})=>l.jsx("div",{className:N("rounded-lg border border-[color:var(--oniratec-border-primary)] bg-[color:var(--oniratec-fill-primary)] p-4 shadow-[var(--oniratec-shadow-card-md)]",e),children:t});function hi(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Yo(...t){return e=>{let r=!1;const n=t.map(s=>{const a=hi(s,e);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let s=0;s<n.length;s++){const a=n[s];typeof a=="function"?a():hi(t[s],null)}}}}function $e(...t){return h.useCallback(Yo(...t),t)}function Zn(t){const e=ef(t),r=h.forwardRef((n,s)=>{const{children:a,...i}=n,o=h.Children.toArray(a),c=o.find(rf);if(c){const u=c.props.children,f=o.map(d=>d===c?h.Children.count(u)>1?h.Children.only(null):h.isValidElement(u)?u.props.children:null:d);return l.jsx(e,{...i,ref:s,children:h.isValidElement(u)?h.cloneElement(u,void 0,f):null})}return l.jsx(e,{...i,ref:s,children:a})});return r.displayName=`${t}.Slot`,r}var Go=Zn("Slot");function ef(t){const e=h.forwardRef((r,n)=>{const{children:s,...a}=r;if(h.isValidElement(s)){const i=sf(s),o=nf(a,s.props);return s.type!==h.Fragment&&(o.ref=n?Yo(n,i):i),h.cloneElement(s,o)}return h.Children.count(s)>1?h.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var tf=Symbol("radix.slottable");function rf(t){return h.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===tf}function nf(t,e){const r={...e};for(const n in e){const s=t[n],a=e[n];/^on[A-Z]/.test(n)?s&&a?r[n]=(...o)=>{const c=a(...o);return s(...o),c}:s&&(r[n]=s):n==="style"?r[n]={...s,...a}:n==="className"&&(r[n]=[s,a].filter(Boolean).join(" "))}return{...t,...r}}function sf(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}const mi=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,pi=ha.clsx,Bn=(t,e)=>r=>{var n;if(e?.variants==null)return pi(t,r?.class,r?.className);const{variants:s,defaultVariants:a}=e,i=Object.keys(s).map(u=>{const f=r?.[u],d=a?.[u];if(f===null)return null;const m=mi(f)||mi(d);return s[u][m]}),o=r&&Object.entries(r).reduce((u,f)=>{let[d,m]=f;return m===void 0||(u[d]=m),u},{}),c=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((u,f)=>{let{class:d,className:m,...p}=f;return Object.entries(p).every(y=>{let[g,x]=y;return Array.isArray(x)?x.includes({...a,...o}[g]):{...a,...o}[g]===x})?[...u,d,m]:u},[]);return pi(t,i,c,r?.class,r?.className)},Xo=Bn("inline-flex shrink-0 items-center justify-center gap-1.5 whitespace-nowrap rounded-lg border border-transparent text-sm font-medium transition-[background-color,border-color,color,transform,box-shadow] outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg]:size-4",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",primary:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary",destructive:"bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40",outline:"border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted dark:border-input dark:bg-input/30 dark:hover:bg-input/50",ghost:"hover:bg-muted hover:text-foreground aria-expanded:bg-muted dark:hover:bg-muted/60",link:"h-auto rounded-none border-transparent px-0 py-0 text-primary underline-offset-4 hover:underline focus-visible:border-transparent focus-visible:ring-0"},size:{xs:"h-6 rounded-md px-2 text-xs [&_svg]:size-3",sm:"h-7 rounded-md px-2.5 text-[0.8rem] [&_svg]:size-3.5",md:"h-8 px-2.5",lg:"h-9 px-3 text-sm",icon:"h-8 w-8","icon-sm":"h-7 w-7 rounded-md","icon-lg":"h-9 w-9"}},defaultVariants:{variant:"default",size:"md"}}),Le=h.forwardRef(({className:t,asChild:e=!1,variant:r="default",size:n="md",loading:s=!1,disabled:a,children:i,...o},c)=>{const u=e?Go:"button";return l.jsxs(u,{ref:c,"data-size":n??void 0,"data-variant":r??void 0,className:N(Xo({variant:r,size:n}),t),disabled:a||s,...o,children:[s&&l.jsx(J.Loader2,{className:"h-4 w-4 animate-spin"}),i]})});Le.displayName="Button";const af=({src:t,alt:e,width:r=70,height:n=70,className:s,ImageComponent:a,...i})=>{const o=a??"img";return l.jsx(o,{type:void 0,props:void 0,src:t,alt:e,width:r,height:n,className:N("inline-block object-contain",s),...i},null)},zs=({children:t,className:e,size:r="default"})=>l.jsx("div",{className:N("flex flex-col overflow-hidden rounded-xl border border-border bg-card text-card-foreground shadow-card-sm transition-[box-shadow,transform]",r==="sm"?"gap-3 py-3":"gap-4 py-4","hover:shadow-card-md",e),children:t}),Jo=({children:t,className:e})=>l.jsx("div",{className:N("grid gap-1 px-4",e),children:t}),Ko=({children:t,className:e})=>l.jsx("h3",{className:N("text-base font-medium leading-snug text-card-foreground",e),children:t}),of=({children:t,className:e})=>l.jsx("p",{className:N("text-sm text-muted-foreground",e),children:t}),Qo=({children:t,className:e})=>l.jsx("div",{className:N("px-4",e),children:t}),lf=({children:t,className:e})=>l.jsx("div",{className:N("ml-auto flex items-center gap-2",e),children:t}),cf=({children:t,className:e})=>l.jsx("div",{className:N("flex items-center gap-2 border-t bg-muted/50 p-4",e),children:t}),el=Bn("relative grid w-full grid-cols-[auto_1fr] items-start gap-3 rounded-xl bg-card p-4 text-sm text-card-foreground ring-1 ring-foreground/10",{variants:{variant:{info:"[&_svg]:text-muted-foreground",success:"bg-primary/5 ring-primary/15 [&_svg]:text-primary dark:bg-primary/10",warning:"bg-amber-500/10 ring-amber-500/20 [&_svg]:text-amber-600 dark:bg-amber-500/15 dark:[&_svg]:text-amber-400",error:"bg-destructive/10 ring-destructive/20 [&_svg]:text-destructive dark:bg-destructive/15"}},defaultVariants:{variant:"info"}}),uf={error:J.AlertCircle,warning:J.AlertTriangle,info:J.Info,success:J.CheckCircle},tl=h.forwardRef(({className:t,variant:e="info",children:r,...n},s)=>{const a=uf[e];return l.jsxs("div",{ref:s,role:"alert",className:N(el({variant:e}),t),...n,children:[a&&l.jsx(a,{className:"mt-0.5 h-4 w-4 shrink-0","aria-hidden":"true"}),l.jsx("div",{className:"flex-1",children:r})]})});tl.displayName="Alert";const rl=h.forwardRef(({className:t,...e},r)=>l.jsx("h5",{ref:r,className:N("mb-1 font-medium leading-none tracking-tight",t),...e}));rl.displayName="AlertTitle";const nl=h.forwardRef(({className:t,...e},r)=>l.jsx("div",{ref:r,className:N("text-sm text-muted-foreground [&_p]:leading-relaxed",t),...e}));nl.displayName="AlertDescription";const sl=Bn("inline-flex items-center rounded-md border font-medium transition-colors focus:outline-none focus-visible:ring-3 focus-visible:ring-ring/50",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground",success:"border-transparent bg-emerald-500/15 text-emerald-700 dark:text-emerald-400",warning:"border-transparent bg-amber-500/10 text-amber-700 dark:text-amber-300",danger:"border-transparent bg-destructive/10 text-destructive",info:"border-transparent bg-accent text-accent-foreground",outline:"border-border bg-background text-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground"},size:{sm:"px-1.5 py-0.5 text-[11px]",md:"px-2 py-0.5 text-xs"}},defaultVariants:{variant:"default",size:"md"}}),pa=h.forwardRef(({className:t,variant:e="default",size:r="md",...n},s)=>l.jsx("span",{ref:s,className:N(sl({variant:e,size:r}),t),...n}));pa.displayName="Badge";const al=h.forwardRef(({className:t,id:e,label:r,description:n,size:s="md",indeterminate:a=!1,disabled:i,"aria-describedby":o,"aria-invalid":c,...u},f)=>{const d=h.useId(),m=e??d,p=n?`${m}-description`:void 0,y=c===!0||c==="true",g=h.useRef(null);h.useEffect(()=>{g.current&&(g.current.indeterminate=a)},[a]);const x=h.useCallback(v=>{g.current=v,typeof f=="function"?f(v):f&&(f.current=v)},[f]);return l.jsxs("label",{htmlFor:m,className:N("inline-flex w-fit items-start gap-2.5 text-sm",i&&"cursor-not-allowed opacity-60",t),children:[l.jsx("input",{ref:x,id:m,type:"checkbox",disabled:i,"aria-invalid":y||void 0,"aria-checked":a?"mixed":void 0,"aria-describedby":[o,p].filter(Boolean).join(" ")||void 0,className:"peer sr-only",...u}),l.jsx("span",{className:N("flex shrink-0 items-center justify-center rounded-[min(var(--radius-md),10px)] border border-input bg-background text-primary-foreground transition-[background-color,border-color,box-shadow,color] outline-none","peer-focus-visible:border-ring peer-focus-visible:ring-3 peer-focus-visible:ring-ring/50","peer-disabled:border-border/50 peer-disabled:bg-muted/50 peer-disabled:opacity-70",!a&&"peer-checked:border-primary peer-checked:bg-primary peer-checked:[&_svg]:opacity-100",a&&"border-primary bg-primary [&_svg]:opacity-100",y&&"border-destructive peer-focus-visible:border-destructive peer-focus-visible:ring-destructive/20",s==="sm"?"h-4 w-4":"h-5 w-5"),children:a?l.jsx(J.Minus,{className:"h-3.5 w-3.5 opacity-0 transition-opacity"}):l.jsx(J.Check,{className:"h-3.5 w-3.5 opacity-0 transition-opacity"})}),(r||n)&&l.jsxs("span",{className:"grid gap-1 leading-tight",children:[r&&l.jsx("span",{className:"font-medium text-foreground",children:r}),n&&l.jsx("span",{id:p,className:"text-sm text-muted-foreground",children:n})]})]})});al.displayName="Checkbox";function Re(t,e,{checkForDefaultPrevented:r=!0}={}){return function(s){if(t?.(s),r===!1||!s.defaultPrevented)return e?.(s)}}function df(t,e){const r=h.createContext(e),n=a=>{const{children:i,...o}=a,c=h.useMemo(()=>o,Object.values(o));return l.jsx(r.Provider,{value:c,children:i})};n.displayName=t+"Provider";function s(a){const i=h.useContext(r);if(i)return i;if(e!==void 0)return e;throw new Error(`\`${a}\` must be used within \`${t}\``)}return[n,s]}function Un(t,e=[]){let r=[];function n(a,i){const o=h.createContext(i),c=r.length;r=[...r,i];const u=d=>{const{scope:m,children:p,...y}=d,g=m?.[t]?.[c]||o,x=h.useMemo(()=>y,Object.values(y));return l.jsx(g.Provider,{value:x,children:p})};u.displayName=a+"Provider";function f(d,m){const p=m?.[t]?.[c]||o,y=h.useContext(p);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${a}\``)}return[u,f]}const s=()=>{const a=r.map(i=>h.createContext(i));return function(o){const c=o?.[t]||a;return h.useMemo(()=>({[`__scope${t}`]:{...o,[t]:c}}),[o,c])}};return s.scopeName=t,[n,ff(s,...e)]}function ff(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const n=t.map(s=>({useScope:s(),scopeName:s.scopeName}));return function(a){const i=n.reduce((o,{useScope:c,scopeName:u})=>{const d=c(a)[`__scope${u}`];return{...o,...d}},{});return h.useMemo(()=>({[`__scope${e.scopeName}`]:i}),[i])}};return r.scopeName=e.scopeName,r}var hf=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_e=hf.reduce((t,e)=>{const r=Zn(`Primitive.${e}`),n=h.forwardRef((s,a)=>{const{asChild:i,...o}=s,c=i?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...o,ref:a})});return n.displayName=`Primitive.${e}`,{...t,[e]:n}},{});function mf(t,e){t&&Zo.flushSync(()=>t.dispatchEvent(e))}function hr(t){const e=h.useRef(t);return h.useEffect(()=>{e.current=t}),h.useMemo(()=>(...r)=>e.current?.(...r),[])}function pf(t,e=globalThis?.document){const r=hr(t);h.useEffect(()=>{const n=s=>{s.key==="Escape"&&r(s)};return e.addEventListener("keydown",n,{capture:!0}),()=>e.removeEventListener("keydown",n,{capture:!0})},[r,e])}var gf="DismissableLayer",Ws="dismissableLayer.update",yf="dismissableLayer.pointerDownOutside",vf="dismissableLayer.focusOutside",gi,il=h.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ga=h.forwardRef((t,e)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:s,onFocusOutside:a,onInteractOutside:i,onDismiss:o,...c}=t,u=h.useContext(il),[f,d]=h.useState(null),m=f?.ownerDocument??globalThis?.document,[,p]=h.useState({}),y=$e(e,T=>d(T)),g=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=g.indexOf(x),S=f?g.indexOf(f):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,k=S>=v,w=wf(T=>{const A=T.target,$=[...u.branches].some(L=>L.contains(A));!k||$||(s?.(T),i?.(T),T.defaultPrevented||o?.())},m),j=kf(T=>{const A=T.target;[...u.branches].some(L=>L.contains(A))||(a?.(T),i?.(T),T.defaultPrevented||o?.())},m);return pf(T=>{S===u.layers.size-1&&(n?.(T),!T.defaultPrevented&&o&&(T.preventDefault(),o()))},m),h.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(gi=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),yi(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=gi)}},[f,m,r,u]),h.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),yi())},[f,u]),h.useEffect(()=>{const T=()=>p({});return document.addEventListener(Ws,T),()=>document.removeEventListener(Ws,T)},[]),l.jsx(_e.div,{...c,ref:y,style:{pointerEvents:C?k?"auto":"none":void 0,...t.style},onFocusCapture:Re(t.onFocusCapture,j.onFocusCapture),onBlurCapture:Re(t.onBlurCapture,j.onBlurCapture),onPointerDownCapture:Re(t.onPointerDownCapture,w.onPointerDownCapture)})});ga.displayName=gf;var xf="DismissableLayerBranch",bf=h.forwardRef((t,e)=>{const r=h.useContext(il),n=h.useRef(null),s=$e(e,n);return h.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),l.jsx(_e.div,{...t,ref:s})});bf.displayName=xf;function wf(t,e=globalThis?.document){const r=hr(t),n=h.useRef(!1),s=h.useRef(()=>{});return h.useEffect(()=>{const a=o=>{if(o.target&&!n.current){let c=function(){ol(yf,r,u,{discrete:!0})};const u={originalEvent:o};o.pointerType==="touch"?(e.removeEventListener("click",s.current),s.current=c,e.addEventListener("click",s.current,{once:!0})):c()}else e.removeEventListener("click",s.current);n.current=!1},i=window.setTimeout(()=>{e.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),e.removeEventListener("pointerdown",a),e.removeEventListener("click",s.current)}},[e,r]),{onPointerDownCapture:()=>n.current=!0}}function kf(t,e=globalThis?.document){const r=hr(t),n=h.useRef(!1);return h.useEffect(()=>{const s=a=>{a.target&&!n.current&&ol(vf,r,{originalEvent:a},{discrete:!1})};return e.addEventListener("focusin",s),()=>e.removeEventListener("focusin",s)},[e,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function yi(){const t=new CustomEvent(Ws);document.dispatchEvent(t)}function ol(t,e,r,{discrete:n}){const s=r.originalEvent.target,a=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&s.addEventListener(t,e,{once:!0}),n?mf(s,a):s.dispatchEvent(a)}var vs=0;function ll(){h.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??vi()),document.body.insertAdjacentElement("beforeend",t[1]??vi()),vs++,()=>{vs===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),vs--}},[])}function vi(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var xs="focusScope.autoFocusOnMount",bs="focusScope.autoFocusOnUnmount",xi={bubbles:!1,cancelable:!0},Sf="FocusScope",ya=h.forwardRef((t,e)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:s,onUnmountAutoFocus:a,...i}=t,[o,c]=h.useState(null),u=hr(s),f=hr(a),d=h.useRef(null),m=$e(e,g=>c(g)),p=h.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;h.useEffect(()=>{if(n){let g=function(C){if(p.paused||!o)return;const k=C.target;o.contains(k)?d.current=k:kt(d.current,{select:!0})},x=function(C){if(p.paused||!o)return;const k=C.relatedTarget;k!==null&&(o.contains(k)||kt(d.current,{select:!0}))},v=function(C){if(document.activeElement===document.body)for(const w of C)w.removedNodes.length>0&&kt(o)};document.addEventListener("focusin",g),document.addEventListener("focusout",x);const S=new MutationObserver(v);return o&&S.observe(o,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",x),S.disconnect()}}},[n,o,p.paused]),h.useEffect(()=>{if(o){wi.add(p);const g=document.activeElement;if(!o.contains(g)){const v=new CustomEvent(xs,xi);o.addEventListener(xs,u),o.dispatchEvent(v),v.defaultPrevented||(Nf(Ef(cl(o)),{select:!0}),document.activeElement===g&&kt(o))}return()=>{o.removeEventListener(xs,u),setTimeout(()=>{const v=new CustomEvent(bs,xi);o.addEventListener(bs,f),o.dispatchEvent(v),v.defaultPrevented||kt(g??document.body,{select:!0}),o.removeEventListener(bs,f),wi.remove(p)},0)}}},[o,u,f,p]);const y=h.useCallback(g=>{if(!r&&!n||p.paused)return;const x=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,v=document.activeElement;if(x&&v){const S=g.currentTarget,[C,k]=Cf(S);C&&k?!g.shiftKey&&v===k?(g.preventDefault(),r&&kt(C,{select:!0})):g.shiftKey&&v===C&&(g.preventDefault(),r&&kt(k,{select:!0})):v===S&&g.preventDefault()}},[r,n,p.paused]);return l.jsx(_e.div,{tabIndex:-1,...i,ref:m,onKeyDown:y})});ya.displayName=Sf;function Nf(t,{select:e=!1}={}){const r=document.activeElement;for(const n of t)if(kt(n,{select:e}),document.activeElement!==r)return}function Cf(t){const e=cl(t),r=bi(e,t),n=bi(e.reverse(),t);return[r,n]}function cl(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const s=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||s?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function bi(t,e){for(const r of t)if(!_f(r,{upTo:e}))return r}function _f(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function Tf(t){return t instanceof HTMLInputElement&&"select"in t}function kt(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&Tf(t)&&e&&t.select()}}var wi=jf();function jf(){let t=[];return{add(e){const r=t[0];e!==r&&r?.pause(),t=ki(t,e),t.unshift(e)},remove(e){t=ki(t,e),t[0]?.resume()}}}function ki(t,e){const r=[...t],n=r.indexOf(e);return n!==-1&&r.splice(n,1),r}function Ef(t){return t.filter(e=>e.tagName!=="A")}var jt=globalThis?.document?h.useLayoutEffect:()=>{},Of=h[" useId ".trim().toString()]||(()=>{}),Df=0;function xn(t){const[e,r]=h.useState(Of());return jt(()=>{r(n=>n??String(Df++))},[t]),t||(e?`radix-${e}`:"")}const Rf=["top","right","bottom","left"],Et=Math.min,Ie=Math.max,Tn=Math.round,an=Math.floor,lt=t=>({x:t,y:t}),Af={left:"right",right:"left",bottom:"top",top:"bottom"},Mf={start:"end",end:"start"};function Zs(t,e,r){return Ie(t,Et(e,r))}function pt(t,e){return typeof t=="function"?t(e):t}function gt(t){return t.split("-")[0]}function kr(t){return t.split("-")[1]}function va(t){return t==="x"?"y":"x"}function xa(t){return t==="y"?"height":"width"}const If=new Set(["top","bottom"]);function ot(t){return If.has(gt(t))?"y":"x"}function ba(t){return va(ot(t))}function Pf(t,e,r){r===void 0&&(r=!1);const n=kr(t),s=ba(t),a=xa(s);let i=s==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return e.reference[a]>e.floating[a]&&(i=jn(i)),[i,jn(i)]}function Ff(t){const e=jn(t);return[Bs(t),e,Bs(e)]}function Bs(t){return t.replace(/start|end/g,e=>Mf[e])}const Si=["left","right"],Ni=["right","left"],Lf=["top","bottom"],Vf=["bottom","top"];function $f(t,e,r){switch(t){case"top":case"bottom":return r?e?Ni:Si:e?Si:Ni;case"left":case"right":return e?Lf:Vf;default:return[]}}function zf(t,e,r,n){const s=kr(t);let a=$f(gt(t),r==="start",n);return s&&(a=a.map(i=>i+"-"+s),e&&(a=a.concat(a.map(Bs)))),a}function jn(t){return t.replace(/left|right|bottom|top/g,e=>Af[e])}function Wf(t){return{top:0,right:0,bottom:0,left:0,...t}}function ul(t){return typeof t!="number"?Wf(t):{top:t,right:t,bottom:t,left:t}}function En(t){const{x:e,y:r,width:n,height:s}=t;return{width:n,height:s,top:r,left:e,right:e+n,bottom:r+s,x:e,y:r}}function Ci(t,e,r){let{reference:n,floating:s}=t;const a=ot(e),i=ba(e),o=xa(i),c=gt(e),u=a==="y",f=n.x+n.width/2-s.width/2,d=n.y+n.height/2-s.height/2,m=n[o]/2-s[o]/2;let p;switch(c){case"top":p={x:f,y:n.y-s.height};break;case"bottom":p={x:f,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-s.width,y:d};break;default:p={x:n.x,y:n.y}}switch(kr(e)){case"start":p[i]-=m*(r&&u?-1:1);break;case"end":p[i]+=m*(r&&u?-1:1);break}return p}const Zf=async(t,e,r)=>{const{placement:n="bottom",strategy:s="absolute",middleware:a=[],platform:i}=r,o=a.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(e));let u=await i.getElementRects({reference:t,floating:e,strategy:s}),{x:f,y:d}=Ci(u,n,c),m=n,p={},y=0;for(let g=0;g<o.length;g++){const{name:x,fn:v}=o[g],{x:S,y:C,data:k,reset:w}=await v({x:f,y:d,initialPlacement:n,placement:m,strategy:s,middlewareData:p,rects:u,platform:i,elements:{reference:t,floating:e}});f=S??f,d=C??d,p={...p,[x]:{...p[x],...k}},w&&y<=50&&(y++,typeof w=="object"&&(w.placement&&(m=w.placement),w.rects&&(u=w.rects===!0?await i.getElementRects({reference:t,floating:e,strategy:s}):w.rects),{x:f,y:d}=Ci(u,m,c)),g=-1)}return{x:f,y:d,placement:m,strategy:s,middlewareData:p}};async function Fr(t,e){var r;e===void 0&&(e={});const{x:n,y:s,platform:a,rects:i,elements:o,strategy:c}=t,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:d="floating",altBoundary:m=!1,padding:p=0}=pt(e,t),y=ul(p),x=o[m?d==="floating"?"reference":"floating":d],v=En(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(x)))==null||r?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(o.floating)),boundary:u,rootBoundary:f,strategy:c})),S=d==="floating"?{x:n,y:s,width:i.floating.width,height:i.floating.height}:i.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(o.floating)),k=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},w=En(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:S,offsetParent:C,strategy:c}):S);return{top:(v.top-w.top+y.top)/k.y,bottom:(w.bottom-v.bottom+y.bottom)/k.y,left:(v.left-w.left+y.left)/k.x,right:(w.right-v.right+y.right)/k.x}}const Bf=t=>({name:"arrow",options:t,async fn(e){const{x:r,y:n,placement:s,rects:a,platform:i,elements:o,middlewareData:c}=e,{element:u,padding:f=0}=pt(t,e)||{};if(u==null)return{};const d=ul(f),m={x:r,y:n},p=ba(s),y=xa(p),g=await i.getDimensions(u),x=p==="y",v=x?"top":"left",S=x?"bottom":"right",C=x?"clientHeight":"clientWidth",k=a.reference[y]+a.reference[p]-m[p]-a.floating[y],w=m[p]-a.reference[p],j=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let T=j?j[C]:0;(!T||!await(i.isElement==null?void 0:i.isElement(j)))&&(T=o.floating[C]||a.floating[y]);const A=k/2-w/2,$=T/2-g[y]/2-1,L=Et(d[v],$),W=Et(d[S],$),B=L,G=T-g[y]-W,Q=T/2-g[y]/2+A,H=Zs(B,Q,G),P=!c.arrow&&kr(s)!=null&&Q!==H&&a.reference[y]/2-(Q<B?L:W)-g[y]/2<0,U=P?Q<B?Q-B:Q-G:0;return{[p]:m[p]+U,data:{[p]:H,centerOffset:Q-H-U,...P&&{alignmentOffset:U}},reset:P}}}),Uf=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var r,n;const{placement:s,middlewareData:a,rects:i,initialPlacement:o,platform:c,elements:u}=e,{mainAxis:f=!0,crossAxis:d=!0,fallbackPlacements:m,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:g=!0,...x}=pt(t,e);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const v=gt(s),S=ot(o),C=gt(o)===o,k=await(c.isRTL==null?void 0:c.isRTL(u.floating)),w=m||(C||!g?[jn(o)]:Ff(o)),j=y!=="none";!m&&j&&w.push(...zf(o,g,y,k));const T=[o,...w],A=await Fr(e,x),$=[];let L=((n=a.flip)==null?void 0:n.overflows)||[];if(f&&$.push(A[v]),d){const Q=Pf(s,i,k);$.push(A[Q[0]],A[Q[1]])}if(L=[...L,{placement:s,overflows:$}],!$.every(Q=>Q<=0)){var W,B;const Q=(((W=a.flip)==null?void 0:W.index)||0)+1,H=T[Q];if(H&&(!(d==="alignment"?S!==ot(H):!1)||L.every(V=>ot(V.placement)===S?V.overflows[0]>0:!0)))return{data:{index:Q,overflows:L},reset:{placement:H}};let P=(B=L.filter(U=>U.overflows[0]<=0).sort((U,V)=>U.overflows[1]-V.overflows[1])[0])==null?void 0:B.placement;if(!P)switch(p){case"bestFit":{var G;const U=(G=L.filter(V=>{if(j){const ie=ot(V.placement);return ie===S||ie==="y"}return!0}).map(V=>[V.placement,V.overflows.filter(ie=>ie>0).reduce((ie,F)=>ie+F,0)]).sort((V,ie)=>V[1]-ie[1])[0])==null?void 0:G[0];U&&(P=U);break}case"initialPlacement":P=o;break}if(s!==P)return{reset:{placement:P}}}return{}}}};function _i(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Ti(t){return Rf.some(e=>t[e]>=0)}const Hf=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:n="referenceHidden",...s}=pt(t,e);switch(n){case"referenceHidden":{const a=await Fr(e,{...s,elementContext:"reference"}),i=_i(a,r.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Ti(i)}}}case"escaped":{const a=await Fr(e,{...s,altBoundary:!0}),i=_i(a,r.floating);return{data:{escapedOffsets:i,escaped:Ti(i)}}}default:return{}}}}},dl=new Set(["left","top"]);async function qf(t,e){const{placement:r,platform:n,elements:s}=t,a=await(n.isRTL==null?void 0:n.isRTL(s.floating)),i=gt(r),o=kr(r),c=ot(r)==="y",u=dl.has(i)?-1:1,f=a&&c?-1:1,d=pt(e,t);let{mainAxis:m,crossAxis:p,alignmentAxis:y}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return o&&typeof y=="number"&&(p=o==="end"?y*-1:y),c?{x:p*f,y:m*u}:{x:m*u,y:p*f}}const Yf=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,n;const{x:s,y:a,placement:i,middlewareData:o}=e,c=await qf(e,t);return i===((r=o.offset)==null?void 0:r.placement)&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:s+c.x,y:a+c.y,data:{...c,placement:i}}}}},Gf=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:n,placement:s}=e,{mainAxis:a=!0,crossAxis:i=!1,limiter:o={fn:x=>{let{x:v,y:S}=x;return{x:v,y:S}}},...c}=pt(t,e),u={x:r,y:n},f=await Fr(e,c),d=ot(gt(s)),m=va(d);let p=u[m],y=u[d];if(a){const x=m==="y"?"top":"left",v=m==="y"?"bottom":"right",S=p+f[x],C=p-f[v];p=Zs(S,p,C)}if(i){const x=d==="y"?"top":"left",v=d==="y"?"bottom":"right",S=y+f[x],C=y-f[v];y=Zs(S,y,C)}const g=o.fn({...e,[m]:p,[d]:y});return{...g,data:{x:g.x-r,y:g.y-n,enabled:{[m]:a,[d]:i}}}}}},Xf=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:n,placement:s,rects:a,middlewareData:i}=e,{offset:o=0,mainAxis:c=!0,crossAxis:u=!0}=pt(t,e),f={x:r,y:n},d=ot(s),m=va(d);let p=f[m],y=f[d];const g=pt(o,e),x=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const C=m==="y"?"height":"width",k=a.reference[m]-a.floating[C]+x.mainAxis,w=a.reference[m]+a.reference[C]-x.mainAxis;p<k?p=k:p>w&&(p=w)}if(u){var v,S;const C=m==="y"?"width":"height",k=dl.has(gt(s)),w=a.reference[d]-a.floating[C]+(k&&((v=i.offset)==null?void 0:v[d])||0)+(k?0:x.crossAxis),j=a.reference[d]+a.reference[C]+(k?0:((S=i.offset)==null?void 0:S[d])||0)-(k?x.crossAxis:0);y<w?y=w:y>j&&(y=j)}return{[m]:p,[d]:y}}}},Jf=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var r,n;const{placement:s,rects:a,platform:i,elements:o}=e,{apply:c=()=>{},...u}=pt(t,e),f=await Fr(e,u),d=gt(s),m=kr(s),p=ot(s)==="y",{width:y,height:g}=a.floating;let x,v;d==="top"||d==="bottom"?(x=d,v=m===(await(i.isRTL==null?void 0:i.isRTL(o.floating))?"start":"end")?"left":"right"):(v=d,x=m==="end"?"top":"bottom");const S=g-f.top-f.bottom,C=y-f.left-f.right,k=Et(g-f[x],S),w=Et(y-f[v],C),j=!e.middlewareData.shift;let T=k,A=w;if((r=e.middlewareData.shift)!=null&&r.enabled.x&&(A=C),(n=e.middlewareData.shift)!=null&&n.enabled.y&&(T=S),j&&!m){const L=Ie(f.left,0),W=Ie(f.right,0),B=Ie(f.top,0),G=Ie(f.bottom,0);p?A=y-2*(L!==0||W!==0?L+W:Ie(f.left,f.right)):T=g-2*(B!==0||G!==0?B+G:Ie(f.top,f.bottom))}await c({...e,availableWidth:A,availableHeight:T});const $=await i.getDimensions(o.floating);return y!==$.width||g!==$.height?{reset:{rects:!0}}:{}}}};function Hn(){return typeof window<"u"}function Sr(t){return fl(t)?(t.nodeName||"").toLowerCase():"#document"}function Pe(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function ft(t){var e;return(e=(fl(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function fl(t){return Hn()?t instanceof Node||t instanceof Pe(t).Node:!1}function Qe(t){return Hn()?t instanceof Element||t instanceof Pe(t).Element:!1}function ut(t){return Hn()?t instanceof HTMLElement||t instanceof Pe(t).HTMLElement:!1}function ji(t){return!Hn()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Pe(t).ShadowRoot}const Kf=new Set(["inline","contents"]);function Ur(t){const{overflow:e,overflowX:r,overflowY:n,display:s}=et(t);return/auto|scroll|overlay|hidden|clip/.test(e+n+r)&&!Kf.has(s)}const Qf=new Set(["table","td","th"]);function eh(t){return Qf.has(Sr(t))}const th=[":popover-open",":modal"];function qn(t){return th.some(e=>{try{return t.matches(e)}catch{return!1}})}const rh=["transform","translate","scale","rotate","perspective"],nh=["transform","translate","scale","rotate","perspective","filter"],sh=["paint","layout","strict","content"];function wa(t){const e=ka(),r=Qe(t)?et(t):t;return rh.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||nh.some(n=>(r.willChange||"").includes(n))||sh.some(n=>(r.contain||"").includes(n))}function ah(t){let e=Ot(t);for(;ut(e)&&!mr(e);){if(wa(e))return e;if(qn(e))return null;e=Ot(e)}return null}function ka(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ih=new Set(["html","body","#document"]);function mr(t){return ih.has(Sr(t))}function et(t){return Pe(t).getComputedStyle(t)}function Yn(t){return Qe(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function Ot(t){if(Sr(t)==="html")return t;const e=t.assignedSlot||t.parentNode||ji(t)&&t.host||ft(t);return ji(e)?e.host:e}function hl(t){const e=Ot(t);return mr(e)?t.ownerDocument?t.ownerDocument.body:t.body:ut(e)&&Ur(e)?e:hl(e)}function Lr(t,e,r){var n;e===void 0&&(e=[]),r===void 0&&(r=!0);const s=hl(t),a=s===((n=t.ownerDocument)==null?void 0:n.body),i=Pe(s);if(a){const o=Us(i);return e.concat(i,i.visualViewport||[],Ur(s)?s:[],o&&r?Lr(o):[])}return e.concat(s,Lr(s,[],r))}function Us(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ml(t){const e=et(t);let r=parseFloat(e.width)||0,n=parseFloat(e.height)||0;const s=ut(t),a=s?t.offsetWidth:r,i=s?t.offsetHeight:n,o=Tn(r)!==a||Tn(n)!==i;return o&&(r=a,n=i),{width:r,height:n,$:o}}function Sa(t){return Qe(t)?t:t.contextElement}function cr(t){const e=Sa(t);if(!ut(e))return lt(1);const r=e.getBoundingClientRect(),{width:n,height:s,$:a}=ml(e);let i=(a?Tn(r.width):r.width)/n,o=(a?Tn(r.height):r.height)/s;return(!i||!Number.isFinite(i))&&(i=1),(!o||!Number.isFinite(o))&&(o=1),{x:i,y:o}}const oh=lt(0);function pl(t){const e=Pe(t);return!ka()||!e.visualViewport?oh:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function lh(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==Pe(t)?!1:e}function Zt(t,e,r,n){e===void 0&&(e=!1),r===void 0&&(r=!1);const s=t.getBoundingClientRect(),a=Sa(t);let i=lt(1);e&&(n?Qe(n)&&(i=cr(n)):i=cr(t));const o=lh(a,r,n)?pl(a):lt(0);let c=(s.left+o.x)/i.x,u=(s.top+o.y)/i.y,f=s.width/i.x,d=s.height/i.y;if(a){const m=Pe(a),p=n&&Qe(n)?Pe(n):n;let y=m,g=Us(y);for(;g&&n&&p!==y;){const x=cr(g),v=g.getBoundingClientRect(),S=et(g),C=v.left+(g.clientLeft+parseFloat(S.paddingLeft))*x.x,k=v.top+(g.clientTop+parseFloat(S.paddingTop))*x.y;c*=x.x,u*=x.y,f*=x.x,d*=x.y,c+=C,u+=k,y=Pe(g),g=Us(y)}}return En({width:f,height:d,x:c,y:u})}function Gn(t,e){const r=Yn(t).scrollLeft;return e?e.left+r:Zt(ft(t)).left+r}function gl(t,e){const r=t.getBoundingClientRect(),n=r.left+e.scrollLeft-Gn(t,r),s=r.top+e.scrollTop;return{x:n,y:s}}function ch(t){let{elements:e,rect:r,offsetParent:n,strategy:s}=t;const a=s==="fixed",i=ft(n),o=e?qn(e.floating):!1;if(n===i||o&&a)return r;let c={scrollLeft:0,scrollTop:0},u=lt(1);const f=lt(0),d=ut(n);if((d||!d&&!a)&&((Sr(n)!=="body"||Ur(i))&&(c=Yn(n)),ut(n))){const p=Zt(n);u=cr(n),f.x=p.x+n.clientLeft,f.y=p.y+n.clientTop}const m=i&&!d&&!a?gl(i,c):lt(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+f.x+m.x,y:r.y*u.y-c.scrollTop*u.y+f.y+m.y}}function uh(t){return Array.from(t.getClientRects())}function dh(t){const e=ft(t),r=Yn(t),n=t.ownerDocument.body,s=Ie(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),a=Ie(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight);let i=-r.scrollLeft+Gn(t);const o=-r.scrollTop;return et(n).direction==="rtl"&&(i+=Ie(e.clientWidth,n.clientWidth)-s),{width:s,height:a,x:i,y:o}}const Ei=25;function fh(t,e){const r=Pe(t),n=ft(t),s=r.visualViewport;let a=n.clientWidth,i=n.clientHeight,o=0,c=0;if(s){a=s.width,i=s.height;const f=ka();(!f||f&&e==="fixed")&&(o=s.offsetLeft,c=s.offsetTop)}const u=Gn(n);if(u<=0){const f=n.ownerDocument,d=f.body,m=getComputedStyle(d),p=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,y=Math.abs(n.clientWidth-d.clientWidth-p);y<=Ei&&(a-=y)}else u<=Ei&&(a+=u);return{width:a,height:i,x:o,y:c}}const hh=new Set(["absolute","fixed"]);function mh(t,e){const r=Zt(t,!0,e==="fixed"),n=r.top+t.clientTop,s=r.left+t.clientLeft,a=ut(t)?cr(t):lt(1),i=t.clientWidth*a.x,o=t.clientHeight*a.y,c=s*a.x,u=n*a.y;return{width:i,height:o,x:c,y:u}}function Oi(t,e,r){let n;if(e==="viewport")n=fh(t,r);else if(e==="document")n=dh(ft(t));else if(Qe(e))n=mh(e,r);else{const s=pl(t);n={x:e.x-s.x,y:e.y-s.y,width:e.width,height:e.height}}return En(n)}function yl(t,e){const r=Ot(t);return r===e||!Qe(r)||mr(r)?!1:et(r).position==="fixed"||yl(r,e)}function ph(t,e){const r=e.get(t);if(r)return r;let n=Lr(t,[],!1).filter(o=>Qe(o)&&Sr(o)!=="body"),s=null;const a=et(t).position==="fixed";let i=a?Ot(t):t;for(;Qe(i)&&!mr(i);){const o=et(i),c=wa(i);!c&&o.position==="fixed"&&(s=null),(a?!c&&!s:!c&&o.position==="static"&&!!s&&hh.has(s.position)||Ur(i)&&!c&&yl(t,i))?n=n.filter(f=>f!==i):s=o,i=Ot(i)}return e.set(t,n),n}function gh(t){let{element:e,boundary:r,rootBoundary:n,strategy:s}=t;const i=[...r==="clippingAncestors"?qn(e)?[]:ph(e,this._c):[].concat(r),n],o=i[0],c=i.reduce((u,f)=>{const d=Oi(e,f,s);return u.top=Ie(d.top,u.top),u.right=Et(d.right,u.right),u.bottom=Et(d.bottom,u.bottom),u.left=Ie(d.left,u.left),u},Oi(e,o,s));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function yh(t){const{width:e,height:r}=ml(t);return{width:e,height:r}}function vh(t,e,r){const n=ut(e),s=ft(e),a=r==="fixed",i=Zt(t,!0,a,e);let o={scrollLeft:0,scrollTop:0};const c=lt(0);function u(){c.x=Gn(s)}if(n||!n&&!a)if((Sr(e)!=="body"||Ur(s))&&(o=Yn(e)),n){const p=Zt(e,!0,a,e);c.x=p.x+e.clientLeft,c.y=p.y+e.clientTop}else s&&u();a&&!n&&s&&u();const f=s&&!n&&!a?gl(s,o):lt(0),d=i.left+o.scrollLeft-c.x-f.x,m=i.top+o.scrollTop-c.y-f.y;return{x:d,y:m,width:i.width,height:i.height}}function ws(t){return et(t).position==="static"}function Di(t,e){if(!ut(t)||et(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return ft(t)===r&&(r=r.ownerDocument.body),r}function vl(t,e){const r=Pe(t);if(qn(t))return r;if(!ut(t)){let s=Ot(t);for(;s&&!mr(s);){if(Qe(s)&&!ws(s))return s;s=Ot(s)}return r}let n=Di(t,e);for(;n&&eh(n)&&ws(n);)n=Di(n,e);return n&&mr(n)&&ws(n)&&!wa(n)?r:n||ah(t)||r}const xh=async function(t){const e=this.getOffsetParent||vl,r=this.getDimensions,n=await r(t.floating);return{reference:vh(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function bh(t){return et(t).direction==="rtl"}const wh={convertOffsetParentRelativeRectToViewportRelativeRect:ch,getDocumentElement:ft,getClippingRect:gh,getOffsetParent:vl,getElementRects:xh,getClientRects:uh,getDimensions:yh,getScale:cr,isElement:Qe,isRTL:bh};function xl(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function kh(t,e){let r=null,n;const s=ft(t);function a(){var o;clearTimeout(n),(o=r)==null||o.disconnect(),r=null}function i(o,c){o===void 0&&(o=!1),c===void 0&&(c=1),a();const u=t.getBoundingClientRect(),{left:f,top:d,width:m,height:p}=u;if(o||e(),!m||!p)return;const y=an(d),g=an(s.clientWidth-(f+m)),x=an(s.clientHeight-(d+p)),v=an(f),C={rootMargin:-y+"px "+-g+"px "+-x+"px "+-v+"px",threshold:Ie(0,Et(1,c))||1};let k=!0;function w(j){const T=j[0].intersectionRatio;if(T!==c){if(!k)return i();T?i(!1,T):n=setTimeout(()=>{i(!1,1e-7)},1e3)}T===1&&!xl(u,t.getBoundingClientRect())&&i(),k=!1}try{r=new IntersectionObserver(w,{...C,root:s.ownerDocument})}catch{r=new IntersectionObserver(w,C)}r.observe(t)}return i(!0),a}function Sh(t,e,r,n){n===void 0&&(n={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=Sa(t),f=s||a?[...u?Lr(u):[],...Lr(e)]:[];f.forEach(v=>{s&&v.addEventListener("scroll",r,{passive:!0}),a&&v.addEventListener("resize",r)});const d=u&&o?kh(u,r):null;let m=-1,p=null;i&&(p=new ResizeObserver(v=>{let[S]=v;S&&S.target===u&&p&&(p.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var C;(C=p)==null||C.observe(e)})),r()}),u&&!c&&p.observe(u),p.observe(e));let y,g=c?Zt(t):null;c&&x();function x(){const v=Zt(t);g&&!xl(g,v)&&r(),g=v,y=requestAnimationFrame(x)}return r(),()=>{var v;f.forEach(S=>{s&&S.removeEventListener("scroll",r),a&&S.removeEventListener("resize",r)}),d?.(),(v=p)==null||v.disconnect(),p=null,c&&cancelAnimationFrame(y)}}const Nh=Yf,Ch=Gf,_h=Uf,Th=Jf,jh=Hf,Ri=Bf,Eh=Xf,Oh=(t,e,r)=>{const n=new Map,s={platform:wh,...r},a={...s.platform,_c:n};return Zf(t,e,{...s,platform:a})};var Dh=typeof document<"u",Rh=function(){},bn=Dh?b.useLayoutEffect:Rh;function On(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,n,s;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!==e.length)return!1;for(n=r;n--!==0;)if(!On(t[n],e[n]))return!1;return!0}if(s=Object.keys(t),r=s.length,r!==Object.keys(e).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(e,s[n]))return!1;for(n=r;n--!==0;){const a=s[n];if(!(a==="_owner"&&t.$$typeof)&&!On(t[a],e[a]))return!1}return!0}return t!==t&&e!==e}function bl(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Ai(t,e){const r=bl(t);return Math.round(e*r)/r}function ks(t){const e=h.useRef(t);return bn(()=>{e.current=t}),e}function Ah(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:n=[],platform:s,elements:{reference:a,floating:i}={},transform:o=!0,whileElementsMounted:c,open:u}=t,[f,d]=h.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[m,p]=h.useState(n);On(m,n)||p(n);const[y,g]=h.useState(null),[x,v]=h.useState(null),S=h.useCallback(V=>{V!==j.current&&(j.current=V,g(V))},[]),C=h.useCallback(V=>{V!==T.current&&(T.current=V,v(V))},[]),k=a||y,w=i||x,j=h.useRef(null),T=h.useRef(null),A=h.useRef(f),$=c!=null,L=ks(c),W=ks(s),B=ks(u),G=h.useCallback(()=>{if(!j.current||!T.current)return;const V={placement:e,strategy:r,middleware:m};W.current&&(V.platform=W.current),Oh(j.current,T.current,V).then(ie=>{const F={...ie,isPositioned:B.current!==!1};Q.current&&!On(A.current,F)&&(A.current=F,Zo.flushSync(()=>{d(F)}))})},[m,e,r,W,B]);bn(()=>{u===!1&&A.current.isPositioned&&(A.current.isPositioned=!1,d(V=>({...V,isPositioned:!1})))},[u]);const Q=h.useRef(!1);bn(()=>(Q.current=!0,()=>{Q.current=!1}),[]),bn(()=>{if(k&&(j.current=k),w&&(T.current=w),k&&w){if(L.current)return L.current(k,w,G);G()}},[k,w,G,L,$]);const H=h.useMemo(()=>({reference:j,floating:T,setReference:S,setFloating:C}),[S,C]),P=h.useMemo(()=>({reference:k,floating:w}),[k,w]),U=h.useMemo(()=>{const V={position:r,left:0,top:0};if(!P.floating)return V;const ie=Ai(P.floating,f.x),F=Ai(P.floating,f.y);return o?{...V,transform:"translate("+ie+"px, "+F+"px)",...bl(P.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:ie,top:F}},[r,o,P.floating,f.x,f.y]);return h.useMemo(()=>({...f,update:G,refs:H,elements:P,floatingStyles:U}),[f,G,H,P,U])}const Mh=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:n,padding:s}=typeof t=="function"?t(r):t;return n&&e(n)?n.current!=null?Ri({element:n.current,padding:s}).fn(r):{}:n?Ri({element:n,padding:s}).fn(r):{}}}},Ih=(t,e)=>({...Nh(t),options:[t,e]}),Ph=(t,e)=>({...Ch(t),options:[t,e]}),Fh=(t,e)=>({...Eh(t),options:[t,e]}),Lh=(t,e)=>({..._h(t),options:[t,e]}),Vh=(t,e)=>({...Th(t),options:[t,e]}),$h=(t,e)=>({...jh(t),options:[t,e]}),zh=(t,e)=>({...Mh(t),options:[t,e]});var Wh="Arrow",wl=h.forwardRef((t,e)=>{const{children:r,width:n=10,height:s=5,...a}=t;return l.jsx(_e.svg,{...a,ref:e,width:n,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});wl.displayName=Wh;var Zh=wl;function kl(t){const[e,r]=h.useState(void 0);return jt(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const n=new ResizeObserver(s=>{if(!Array.isArray(s)||!s.length)return;const a=s[0];let i,o;if("borderBoxSize"in a){const c=a.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,o=u.blockSize}else i=t.offsetWidth,o=t.offsetHeight;r({width:i,height:o})});return n.observe(t,{box:"border-box"}),()=>n.unobserve(t)}else r(void 0)},[t]),e}var Na="Popper",[Sl,Nl]=Un(Na),[Bh,Cl]=Sl(Na),_l=t=>{const{__scopePopper:e,children:r}=t,[n,s]=h.useState(null);return l.jsx(Bh,{scope:e,anchor:n,onAnchorChange:s,children:r})};_l.displayName=Na;var Tl="PopperAnchor",jl=h.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:n,...s}=t,a=Cl(Tl,r),i=h.useRef(null),o=$e(e,i),c=h.useRef(null);return h.useEffect(()=>{const u=c.current;c.current=n?.current||i.current,u!==c.current&&a.onAnchorChange(c.current)}),n?null:l.jsx(_e.div,{...s,ref:o})});jl.displayName=Tl;var Ca="PopperContent",[Uh,Hh]=Sl(Ca),El=h.forwardRef((t,e)=>{const{__scopePopper:r,side:n="bottom",sideOffset:s=0,align:a="center",alignOffset:i=0,arrowPadding:o=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:d="partial",hideWhenDetached:m=!1,updatePositionStrategy:p="optimized",onPlaced:y,...g}=t,x=Cl(Ca,r),[v,S]=h.useState(null),C=$e(e,Te=>S(Te)),[k,w]=h.useState(null),j=kl(k),T=j?.width??0,A=j?.height??0,$=n+(a!=="center"?"-"+a:""),L=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},W=Array.isArray(u)?u:[u],B=W.length>0,G={padding:L,boundary:W.filter(Yh),altBoundary:B},{refs:Q,floatingStyles:H,placement:P,isPositioned:U,middlewareData:V}=Ah({strategy:"fixed",placement:$,whileElementsMounted:(...Te)=>Sh(...Te,{animationFrame:p==="always"}),elements:{reference:x.anchor},middleware:[Ih({mainAxis:s+A,alignmentAxis:i}),c&&Ph({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Fh():void 0,...G}),c&&Lh({...G}),Vh({...G,apply:({elements:Te,rects:le,availableWidth:vt,availableHeight:Yt})=>{const{width:Gt,height:xt}=le.reference,Xt=Te.floating.style;Xt.setProperty("--radix-popper-available-width",`${vt}px`),Xt.setProperty("--radix-popper-available-height",`${Yt}px`),Xt.setProperty("--radix-popper-anchor-width",`${Gt}px`),Xt.setProperty("--radix-popper-anchor-height",`${xt}px`)}}),k&&zh({element:k,padding:o}),Gh({arrowWidth:T,arrowHeight:A}),m&&$h({strategy:"referenceHidden",...G})]}),[ie,F]=Rl(P),D=hr(y);jt(()=>{U&&D?.()},[U,D]);const ee=V.arrow?.x,z=V.arrow?.y,oe=V.arrow?.centerOffset!==0,[ce,ve]=h.useState();return jt(()=>{v&&ve(window.getComputedStyle(v).zIndex)},[v]),l.jsx("div",{ref:Q.setFloating,"data-radix-popper-content-wrapper":"",style:{...H,transform:U?H.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ce,"--radix-popper-transform-origin":[V.transformOrigin?.x,V.transformOrigin?.y].join(" "),...V.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:l.jsx(Uh,{scope:r,placedSide:ie,onArrowChange:w,arrowX:ee,arrowY:z,shouldHideArrow:oe,children:l.jsx(_e.div,{"data-side":ie,"data-align":F,...g,ref:C,style:{...g.style,animation:U?void 0:"none"}})})})});El.displayName=Ca;var Ol="PopperArrow",qh={top:"bottom",right:"left",bottom:"top",left:"right"},Dl=h.forwardRef(function(e,r){const{__scopePopper:n,...s}=e,a=Hh(Ol,n),i=qh[a.placedSide];return l.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:l.jsx(Zh,{...s,ref:r,style:{...s.style,display:"block"}})})});Dl.displayName=Ol;function Yh(t){return t!==null}var Gh=t=>({name:"transformOrigin",options:t,fn(e){const{placement:r,rects:n,middlewareData:s}=e,i=s.arrow?.centerOffset!==0,o=i?0:t.arrowWidth,c=i?0:t.arrowHeight,[u,f]=Rl(r),d={start:"0%",center:"50%",end:"100%"}[f],m=(s.arrow?.x??0)+o/2,p=(s.arrow?.y??0)+c/2;let y="",g="";return u==="bottom"?(y=i?d:`${m}px`,g=`${-c}px`):u==="top"?(y=i?d:`${m}px`,g=`${n.floating.height+c}px`):u==="right"?(y=`${-c}px`,g=i?d:`${p}px`):u==="left"&&(y=`${n.floating.width+c}px`,g=i?d:`${p}px`),{data:{x:y,y:g}}}});function Rl(t){const[e,r="center"]=t.split("-");return[e,r]}var Xh=_l,Al=jl,Jh=El,Kh=Dl,Qh="Portal",_a=h.forwardRef((t,e)=>{const{container:r,...n}=t,[s,a]=h.useState(!1);jt(()=>a(!0),[]);const i=r||s&&globalThis?.document?.body;return i?ma.createPortal(l.jsx(_e.div,{...n,ref:e}),i):null});_a.displayName=Qh;function em(t,e){return h.useReducer((r,n)=>e[r][n]??r,t)}var Nr=t=>{const{present:e,children:r}=t,n=tm(e),s=typeof r=="function"?r({present:n.isPresent}):h.Children.only(r),a=$e(n.ref,rm(s));return typeof r=="function"||n.isPresent?h.cloneElement(s,{ref:a}):null};Nr.displayName="Presence";function tm(t){const[e,r]=h.useState(),n=h.useRef(null),s=h.useRef(t),a=h.useRef("none"),i=t?"mounted":"unmounted",[o,c]=em(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return h.useEffect(()=>{const u=on(n.current);a.current=o==="mounted"?u:"none"},[o]),jt(()=>{const u=n.current,f=s.current;if(f!==t){const m=a.current,p=on(u);t?c("MOUNT"):p==="none"||u?.display==="none"?c("UNMOUNT"):c(f&&m!==p?"ANIMATION_OUT":"UNMOUNT"),s.current=t}},[t,c]),jt(()=>{if(e){let u;const f=e.ownerDocument.defaultView??window,d=p=>{const g=on(n.current).includes(CSS.escape(p.animationName));if(p.target===e&&g&&(c("ANIMATION_END"),!s.current)){const x=e.style.animationFillMode;e.style.animationFillMode="forwards",u=f.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=x)})}},m=p=>{p.target===e&&(a.current=on(n.current))};return e.addEventListener("animationstart",m),e.addEventListener("animationcancel",d),e.addEventListener("animationend",d),()=>{f.clearTimeout(u),e.removeEventListener("animationstart",m),e.removeEventListener("animationcancel",d),e.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[e,c]),{isPresent:["mounted","unmountSuspended"].includes(o),ref:h.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function on(t){return t?.animationName||"none"}function rm(t){let e=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=Object.getOwnPropertyDescriptor(t,"ref")?.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var nm=h[" useInsertionEffect ".trim().toString()]||jt;function Ta({prop:t,defaultProp:e,onChange:r=()=>{},caller:n}){const[s,a,i]=sm({defaultProp:e,onChange:r}),o=t!==void 0,c=o?t:s;{const f=h.useRef(t!==void 0);h.useEffect(()=>{const d=f.current;d!==o&&console.warn(`${n} is changing from ${d?"controlled":"uncontrolled"} to ${o?"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=o},[o,n])}const u=h.useCallback(f=>{if(o){const d=am(f)?f(t):f;d!==t&&i.current?.(d)}else a(f)},[o,t,a,i]);return[c,u]}function sm({defaultProp:t,onChange:e}){const[r,n]=h.useState(t),s=h.useRef(r),a=h.useRef(e);return nm(()=>{a.current=e},[e]),h.useEffect(()=>{s.current!==r&&(a.current?.(r),s.current=r)},[r,s]),[r,n,a]}function am(t){return typeof t=="function"}var im=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},er=new WeakMap,ln=new WeakMap,cn={},Ss=0,Ml=function(t){return t&&(t.host||Ml(t.parentNode))},om=function(t,e){return e.map(function(r){if(t.contains(r))return r;var n=Ml(r);return n&&t.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},lm=function(t,e,r,n){var s=om(e,Array.isArray(t)?t:[t]);cn[r]||(cn[r]=new WeakMap);var a=cn[r],i=[],o=new Set,c=new Set(s),u=function(d){!d||o.has(d)||(o.add(d),u(d.parentNode))};s.forEach(u);var f=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(m){if(o.has(m))f(m);else try{var p=m.getAttribute(n),y=p!==null&&p!=="false",g=(er.get(m)||0)+1,x=(a.get(m)||0)+1;er.set(m,g),a.set(m,x),i.push(m),g===1&&y&&ln.set(m,!0),x===1&&m.setAttribute(r,"true"),y||m.setAttribute(n,"true")}catch(v){console.error("aria-hidden: cannot operate on ",m,v)}})};return f(e),o.clear(),Ss++,function(){i.forEach(function(d){var m=er.get(d)-1,p=a.get(d)-1;er.set(d,m),a.set(d,p),m||(ln.has(d)||d.removeAttribute(n),ln.delete(d)),p||d.removeAttribute(r)}),Ss--,Ss||(er=new WeakMap,er=new WeakMap,ln=new WeakMap,cn={})}},Il=function(t,e,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(t)?t:[t]),s=im(t);return s?(n.push.apply(n,Array.from(s.querySelectorAll("[aria-live], script"))),lm(n,s,r,"aria-hidden")):function(){return null}},it=function(){return it=Object.assign||function(e){for(var r,n=1,s=arguments.length;n<s;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},it.apply(this,arguments)};function Pl(t,e){var r={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(r[n]=t[n]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(t);s<n.length;s++)e.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(t,n[s])&&(r[n[s]]=t[n[s]]);return r}function cm(t,e,r){if(r||arguments.length===2)for(var n=0,s=e.length,a;n<s;n++)(a||!(n in e))&&(a||(a=Array.prototype.slice.call(e,0,n)),a[n]=e[n]);return t.concat(a||Array.prototype.slice.call(e))}var wn="right-scroll-bar-position",kn="width-before-scroll-bar",um="with-scroll-bars-hidden",dm="--removed-body-scroll-bar-size";function Ns(t,e){return typeof t=="function"?t(e):t&&(t.current=e),t}function fm(t,e){var r=b.useState(function(){return{value:t,callback:e,facade:{get current(){return r.value},set current(n){var s=r.value;s!==n&&(r.value=n,r.callback(n,s))}}}})[0];return r.callback=e,r.facade}var hm=typeof window<"u"?h.useLayoutEffect:h.useEffect,Mi=new WeakMap;function mm(t,e){var r=fm(null,function(n){return t.forEach(function(s){return Ns(s,n)})});return hm(function(){var n=Mi.get(r);if(n){var s=new Set(n),a=new Set(t),i=r.current;s.forEach(function(o){a.has(o)||Ns(o,null)}),a.forEach(function(o){s.has(o)||Ns(o,i)})}Mi.set(r,t)},[t]),r}function pm(t){return t}function gm(t,e){e===void 0&&(e=pm);var r=[],n=!1,s={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]:t},useMedium:function(a){var i=e(a,n);return r.push(i),function(){r=r.filter(function(o){return o!==i})}},assignSyncMedium:function(a){for(n=!0;r.length;){var i=r;r=[],i.forEach(a)}r={push:function(o){return a(o)},filter:function(){return r}}},assignMedium:function(a){n=!0;var i=[];if(r.length){var o=r;r=[],o.forEach(a),i=r}var c=function(){var f=i;i=[],f.forEach(a)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(f){i.push(f),u()},filter:function(f){return i=i.filter(f),r}}}};return s}function ym(t){t===void 0&&(t={});var e=gm(null);return e.options=it({async:!0,ssr:!1},t),e}var Fl=function(t){var e=t.sideCar,r=Pl(t,["sideCar"]);if(!e)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=e.read();if(!n)throw new Error("Sidecar medium not found");return h.createElement(n,it({},r))};Fl.isSideCarExport=!0;function vm(t,e){return t.useMedium(e),Fl}var Ll=ym(),Cs=function(){},Xn=h.forwardRef(function(t,e){var r=h.useRef(null),n=h.useState({onScrollCapture:Cs,onWheelCapture:Cs,onTouchMoveCapture:Cs}),s=n[0],a=n[1],i=t.forwardProps,o=t.children,c=t.className,u=t.removeScrollBar,f=t.enabled,d=t.shards,m=t.sideCar,p=t.noRelative,y=t.noIsolation,g=t.inert,x=t.allowPinchZoom,v=t.as,S=v===void 0?"div":v,C=t.gapMode,k=Pl(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=m,j=mm([r,e]),T=it(it({},k),s);return h.createElement(h.Fragment,null,f&&h.createElement(w,{sideCar:Ll,removeScrollBar:u,shards:d,noRelative:p,noIsolation:y,inert:g,setCallbacks:a,allowPinchZoom:!!x,lockRef:r,gapMode:C}),i?h.cloneElement(h.Children.only(o),it(it({},T),{ref:j})):h.createElement(S,it({},T,{className:c,ref:j}),o))});Xn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Xn.classNames={fullWidth:kn,zeroRight:wn};var xm=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function bm(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var e=xm();return e&&t.setAttribute("nonce",e),t}function wm(t,e){t.styleSheet?t.styleSheet.cssText=e:t.appendChild(document.createTextNode(e))}function km(t){var e=document.head||document.getElementsByTagName("head")[0];e.appendChild(t)}var Sm=function(){var t=0,e=null;return{add:function(r){t==0&&(e=bm())&&(wm(e,r),km(e)),t++},remove:function(){t--,!t&&e&&(e.parentNode&&e.parentNode.removeChild(e),e=null)}}},Nm=function(){var t=Sm();return function(e,r){h.useEffect(function(){return t.add(e),function(){t.remove()}},[e&&r])}},Vl=function(){var t=Nm(),e=function(r){var n=r.styles,s=r.dynamic;return t(n,s),null};return e},Cm={left:0,top:0,right:0,gap:0},_s=function(t){return parseInt(t||"",10)||0},_m=function(t){var e=window.getComputedStyle(document.body),r=e[t==="padding"?"paddingLeft":"marginLeft"],n=e[t==="padding"?"paddingTop":"marginTop"],s=e[t==="padding"?"paddingRight":"marginRight"];return[_s(r),_s(n),_s(s)]},Tm=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return Cm;var e=_m(t),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,n-r+e[2]-e[0])}},jm=Vl(),ur="data-scroll-locked",Em=function(t,e,r,n){var s=t.left,a=t.top,i=t.right,o=t.gap;return r===void 0&&(r="margin"),`
2
2
  .`.concat(um,` {
3
3
  overflow: hidden `).concat(n,`;
4
4
  padding-right: `).concat(o,"px ").concat(n,`;