@ai-sdk/devtools 1.0.0-canary.22 → 1.0.0-canary.24
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.
|
@@ -132,7 +132,7 @@ Error generating stack: `+d.message+`
|
|
|
132
132
|
*
|
|
133
133
|
* This source code is licensed under the ISC license.
|
|
134
134
|
* See the LICENSE file in the root directory of this source tree.
|
|
135
|
-
*/const b0=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Dp=ht("zap",b0),C0=()=>f.jsxs("svg",{width:"55.28888888888889",height:"16",viewBox:"0 0 311 90",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M2.97269 86L32.6687 3.64H51.1127L80.8087 86H65.0327L58.1887 66.512H25.5927L18.7487 86H2.97269ZM30.0007 53.636H53.7807L41.9487 18.836L30.0007 53.636ZM130.894 3.64V16.748H117.67V72.892H131.59V86H88.5544V72.892H102.59V16.748H89.2504V3.64H130.894Z",fill:"currentColor"}),f.jsx("rect",{x:"153",y:"7.5",width:"154",height:"75",rx:"37.5",stroke:"currentColor",strokeWidth:"8"}),f.jsx("path",{d:"M183.603 51.8472C184.393 56.468 187.677 59.508 193.088 59.508C197.222 59.508 200.019 57.8664 199.958 54.7048C199.897 51.5432 197.222 49.7192 190.473 48.0776C181.11 45.828 175.091 42.0584 175.091 35.1272C175.091 27.284 181.657 22.3592 191.507 22.3592C201.113 22.3592 207.68 28.2568 208.713 36.9512L199.472 37.4376C198.985 32.8776 195.824 30.02 191.264 30.02C187.251 30.02 184.393 32.0872 184.576 35.2488C184.697 38.8968 188.953 40.1128 193.574 41.268C203.241 43.396 209.382 47.5304 209.382 54.4008C209.382 62.6088 202.147 67.2296 192.845 67.2296C182.326 67.2296 174.909 61.3928 174.301 52.2728L183.603 51.8472ZM226.773 23.332C240.757 23.332 248.601 31.1144 248.601 44.9768C248.601 58.7784 240.879 66.5 227.138 66.5H211.877V23.332H226.773ZM221.119 58.7176H226.773C235.164 58.7176 239.177 54.2792 239.177 44.916C239.177 35.5528 235.164 31.1144 226.773 31.1144H221.119V58.7176ZM250.431 23.332H259.672V42.18L275.359 23.332H286.12L270.252 42.3624L287.093 66.5H276.575L264.172 48.564L259.672 53.7928V66.5H250.431V23.332Z",fill:"currentColor"})]});function Hf(n,l){if(typeof n=="function")return n(l);n!=null&&(n.current=l)}function Ru(...n){return l=>{let o=!1;const s=n.map(u=>{const c=Hf(u,l);return!o&&typeof c=="function"&&(o=!0),c});if(o)return()=>{for(let u=0;u<s.length;u++){const c=s[u];typeof c=="function"?c():Hf(n[u],null)}}}}function rt(...n){return w.useCallback(Ru(...n),n)}var k0=Symbol.for("react.lazy"),Ui=ju[" use ".trim().toString()];function E0(n){return typeof n=="object"&&n!==null&&"then"in n}function Lp(n){return n!=null&&typeof n=="object"&&"$$typeof"in n&&n.$$typeof===k0&&"_payload"in n&&E0(n._payload)}function N0(n){const l=j0(n),o=w.forwardRef((s,u)=>{let{children:c,...p}=s;Lp(c)&&typeof Ui=="function"&&(c=Ui(c._payload));const m=w.Children.toArray(c),h=m.find(T0);if(h){const y=h.props.children,v=m.map(x=>x===h?w.Children.count(y)>1?w.Children.only(null):w.isValidElement(y)?y.props.children:null:x);return f.jsx(l,{...p,ref:u,children:w.isValidElement(y)?w.cloneElement(y,void 0,v):null})}return f.jsx(l,{...p,ref:u,children:c})});return o.displayName=`${n}.Slot`,o}var zp=N0("Slot");function j0(n){const l=w.forwardRef((o,s)=>{let{children:u,...c}=o;if(Lp(u)&&typeof Ui=="function"&&(u=Ui(u._payload)),w.isValidElement(u)){const p=_0(u),m=P0(c,u.props);return u.type!==w.Fragment&&(m.ref=s?Ru(s,p):p),w.cloneElement(u,m)}return w.Children.count(u)>1?w.Children.only(null):null});return l.displayName=`${n}.SlotClone`,l}var R0=Symbol("radix.slottable");function T0(n){return w.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===R0}function P0(n,l){const o={...l};for(const s in l){const u=n[s],c=l[s];/^on[A-Z]/.test(s)?u&&c?o[s]=(...m)=>{const h=c(...m);return u(...m),h}:u&&(o[s]=u):s==="style"?o[s]={...u,...c}:s==="className"&&(o[s]=[u,c].filter(Boolean).join(" "))}return{...n,...o}}function _0(n){var s,u;let l=(s=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:s.get,o=l&&"isReactWarning"in l&&l.isReactWarning;return o?n.ref:(l=(u=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:u.get,o=l&&"isReactWarning"in l&&l.isReactWarning,o?n.props.ref:n.props.ref||n.ref)}function Ip(n){var l,o,s="";if(typeof n=="string"||typeof n=="number")s+=n;else if(typeof n=="object")if(Array.isArray(n)){var u=n.length;for(l=0;l<u;l++)n[l]&&(o=Ip(n[l]))&&(s&&(s+=" "),s+=o)}else for(o in n)n[o]&&(s&&(s+=" "),s+=o);return s}function $p(){for(var n,l,o=0,s="",u=arguments.length;o<u;o++)(n=arguments[o])&&(l=Ip(n))&&(s&&(s+=" "),s+=l);return s}const Vf=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,Uf=$p,Fp=(n,l)=>o=>{var s;if((l==null?void 0:l.variants)==null)return Uf(n,o==null?void 0:o.class,o==null?void 0:o.className);const{variants:u,defaultVariants:c}=l,p=Object.keys(u).map(y=>{const v=o==null?void 0:o[y],x=c==null?void 0:c[y];if(v===null)return null;const S=Vf(v)||Vf(x);return u[y][S]}),m=o&&Object.entries(o).reduce((y,v)=>{let[x,S]=v;return S===void 0||(y[x]=S),y},{}),h=l==null||(s=l.compoundVariants)===null||s===void 0?void 0:s.reduce((y,v)=>{let{class:x,className:S,...C}=v;return Object.entries(C).every(P=>{let[k,E]=P;return Array.isArray(E)?E.includes({...c,...m}[k]):{...c,...m}[k]===E})?[...y,x,S]:y},[]);return Uf(n,p,h,o==null?void 0:o.class,o==null?void 0:o.className)},A0=(n,l)=>{const o=new Array(n.length+l.length);for(let s=0;s<n.length;s++)o[s]=n[s];for(let s=0;s<l.length;s++)o[n.length+s]=l[s];return o},O0=(n,l)=>({classGroupId:n,validator:l}),Wp=(n=new Map,l=null,o)=>({nextPart:n,validators:l,classGroupId:o}),Yi="-",Yf=[],M0="arbitrary..",D0=n=>{const l=z0(n),{conflictingClassGroups:o,conflictingClassGroupModifiers:s}=n;return{getClassGroupId:p=>{if(p.startsWith("[")&&p.endsWith("]"))return L0(p);const m=p.split(Yi),h=m[0]===""&&m.length>1?1:0;return Bp(m,h,l)},getConflictingClassGroupIds:(p,m)=>{if(m){const h=s[p],y=o[p];return h?y?A0(y,h):h:y||Yf}return o[p]||Yf}}},Bp=(n,l,o)=>{if(n.length-l===0)return o.classGroupId;const u=n[l],c=o.nextPart.get(u);if(c){const y=Bp(n,l+1,c);if(y)return y}const p=o.validators;if(p===null)return;const m=l===0?n.join(Yi):n.slice(l).join(Yi),h=p.length;for(let y=0;y<h;y++){const v=p[y];if(v.validator(m))return v.classGroupId}},L0=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const l=n.slice(1,-1),o=l.indexOf(":"),s=l.slice(0,o);return s?M0+s:void 0})(),z0=n=>{const{theme:l,classGroups:o}=n;return I0(o,l)},I0=(n,l)=>{const o=Wp();for(const s in n){const u=n[s];Tu(u,o,s,l)}return o},Tu=(n,l,o,s)=>{const u=n.length;for(let c=0;c<u;c++){const p=n[c];$0(p,l,o,s)}},$0=(n,l,o,s)=>{if(typeof n=="string"){F0(n,l,o);return}if(typeof n=="function"){W0(n,l,o,s);return}B0(n,l,o,s)},F0=(n,l,o)=>{const s=n===""?l:Hp(l,n);s.classGroupId=o},W0=(n,l,o,s)=>{if(H0(n)){Tu(n(s),l,o,s);return}l.validators===null&&(l.validators=[]),l.validators.push(O0(o,n))},B0=(n,l,o,s)=>{const u=Object.entries(n),c=u.length;for(let p=0;p<c;p++){const[m,h]=u[p];Tu(h,Hp(l,m),o,s)}},Hp=(n,l)=>{let o=n;const s=l.split(Yi),u=s.length;for(let c=0;c<u;c++){const p=s[c];let m=o.nextPart.get(p);m||(m=Wp(),o.nextPart.set(p,m)),o=m}return o},H0=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,V0=n=>{if(n<1)return{get:()=>{},set:()=>{}};let l=0,o=Object.create(null),s=Object.create(null);const u=(c,p)=>{o[c]=p,l++,l>n&&(l=0,s=o,o=Object.create(null))};return{get(c){let p=o[c];if(p!==void 0)return p;if((p=s[c])!==void 0)return u(c,p),p},set(c,p){c in o?o[c]=p:u(c,p)}}},hu="!",Xf=":",U0=[],Qf=(n,l,o,s,u)=>({modifiers:n,hasImportantModifier:l,baseClassName:o,maybePostfixModifierPosition:s,isExternal:u}),Y0=n=>{const{prefix:l,experimentalParseClassName:o}=n;let s=u=>{const c=[];let p=0,m=0,h=0,y;const v=u.length;for(let k=0;k<v;k++){const E=u[k];if(p===0&&m===0){if(E===Xf){c.push(u.slice(h,k)),h=k+1;continue}if(E==="/"){y=k;continue}}E==="["?p++:E==="]"?p--:E==="("?m++:E===")"&&m--}const x=c.length===0?u:u.slice(h);let S=x,C=!1;x.endsWith(hu)?(S=x.slice(0,-1),C=!0):x.startsWith(hu)&&(S=x.slice(1),C=!0);const P=y&&y>h?y-h:void 0;return Qf(c,C,S,P)};if(l){const u=l+Xf,c=s;s=p=>p.startsWith(u)?c(p.slice(u.length)):Qf(U0,!1,p,void 0,!0)}if(o){const u=s;s=c=>o({className:c,parseClassName:u})}return s},X0=n=>{const l=new Map;return n.orderSensitiveModifiers.forEach((o,s)=>{l.set(o,1e6+s)}),o=>{const s=[];let u=[];for(let c=0;c<o.length;c++){const p=o[c],m=p[0]==="[",h=l.has(p);m||h?(u.length>0&&(u.sort(),s.push(...u),u=[]),s.push(p)):u.push(p)}return u.length>0&&(u.sort(),s.push(...u)),s}},Q0=n=>({cache:V0(n.cacheSize),parseClassName:Y0(n),sortModifiers:X0(n),...D0(n)}),G0=/\s+/,K0=(n,l)=>{const{parseClassName:o,getClassGroupId:s,getConflictingClassGroupIds:u,sortModifiers:c}=l,p=[],m=n.trim().split(G0);let h="";for(let y=m.length-1;y>=0;y-=1){const v=m[y],{isExternal:x,modifiers:S,hasImportantModifier:C,baseClassName:P,maybePostfixModifierPosition:k}=o(v);if(x){h=v+(h.length>0?" "+h:h);continue}let E=!!k,A=s(E?P.substring(0,k):P);if(!A){if(!E){h=v+(h.length>0?" "+h:h);continue}if(A=s(P),!A){h=v+(h.length>0?" "+h:h);continue}E=!1}const D=S.length===0?"":S.length===1?S[0]:c(S).join(":"),$=C?D+hu:D,N=$+A;if(p.indexOf(N)>-1)continue;p.push(N);const F=u(A,E);for(let V=0;V<F.length;++V){const L=F[V];p.push($+L)}h=v+(h.length>0?" "+h:h)}return h},q0=(...n)=>{let l=0,o,s,u="";for(;l<n.length;)(o=n[l++])&&(s=Vp(o))&&(u&&(u+=" "),u+=s);return u},Vp=n=>{if(typeof n=="string")return n;let l,o="";for(let s=0;s<n.length;s++)n[s]&&(l=Vp(n[s]))&&(o&&(o+=" "),o+=l);return o},Z0=(n,...l)=>{let o,s,u,c;const p=h=>{const y=l.reduce((v,x)=>x(v),n());return o=Q0(y),s=o.cache.get,u=o.cache.set,c=m,m(h)},m=h=>{const y=s(h);if(y)return y;const v=K0(h,o);return u(h,v),v};return c=p,(...h)=>c(q0(...h))},J0=[],qe=n=>{const l=o=>o[n]||J0;return l.isThemeGetter=!0,l},Up=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Yp=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ey=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ty=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ny=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ry=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,oy=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ly=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Zn=n=>ey.test(n),Ee=n=>!!n&&!Number.isNaN(Number(n)),Jn=n=>!!n&&Number.isInteger(Number(n)),tu=n=>n.endsWith("%")&&Ee(n.slice(0,-1)),Nn=n=>ty.test(n),Xp=()=>!0,iy=n=>ny.test(n)&&!ry.test(n),Pu=()=>!1,sy=n=>oy.test(n),ay=n=>ly.test(n),uy=n=>!se(n)&&!ae(n),cy=n=>lr(n,Kp,Pu),se=n=>Up.test(n),Cr=n=>lr(n,qp,iy),Gf=n=>lr(n,yy,Ee),dy=n=>lr(n,Jp,Xp),fy=n=>lr(n,Zp,Pu),Kf=n=>lr(n,Qp,Pu),py=n=>lr(n,Gp,ay),Ni=n=>lr(n,em,sy),ae=n=>Yp.test(n),tl=n=>jr(n,qp),my=n=>jr(n,Zp),qf=n=>jr(n,Qp),hy=n=>jr(n,Kp),gy=n=>jr(n,Gp),ji=n=>jr(n,em,!0),vy=n=>jr(n,Jp,!0),lr=(n,l,o)=>{const s=Up.exec(n);return s?s[1]?l(s[1]):o(s[2]):!1},jr=(n,l,o=!1)=>{const s=Yp.exec(n);return s?s[1]?l(s[1]):o:!1},Qp=n=>n==="position"||n==="percentage",Gp=n=>n==="image"||n==="url",Kp=n=>n==="length"||n==="size"||n==="bg-size",qp=n=>n==="length",yy=n=>n==="number",Zp=n=>n==="family-name",Jp=n=>n==="number"||n==="weight",em=n=>n==="shadow",xy=()=>{const n=qe("color"),l=qe("font"),o=qe("text"),s=qe("font-weight"),u=qe("tracking"),c=qe("leading"),p=qe("breakpoint"),m=qe("container"),h=qe("spacing"),y=qe("radius"),v=qe("shadow"),x=qe("inset-shadow"),S=qe("text-shadow"),C=qe("drop-shadow"),P=qe("blur"),k=qe("perspective"),E=qe("aspect"),A=qe("ease"),D=qe("animate"),$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],F=()=>[...N(),ae,se],V=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto","contain","none"],R=()=>[ae,se,h],W=()=>[Zn,"full","auto",...R()],Q=()=>[Jn,"none","subgrid",ae,se],ee=()=>["auto",{span:["full",Jn,ae,se]},Jn,ae,se],ce=()=>[Jn,"auto",ae,se],U=()=>["auto","min","max","fr",ae,se],q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],te=()=>["start","end","center","stretch","center-safe","end-safe"],J=()=>["auto",...R()],ne=()=>[Zn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],B=()=>[Zn,"screen","full","dvw","lvw","svw","min","max","fit",...R()],K=()=>[Zn,"screen","full","lh","dvh","lvh","svh","min","max","fit",...R()],I=()=>[n,ae,se],_=()=>[...N(),qf,Kf,{position:[ae,se]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],fe=()=>["auto","cover","contain",hy,cy,{size:[ae,se]}],we=()=>[tu,tl,Cr],pe=()=>["","none","full",y,ae,se],me=()=>["",Ee,tl,Cr],Ce=()=>["solid","dashed","dotted","double"],be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],xe=()=>[Ee,tu,qf,Kf],ze=()=>["","none",P,ae,se],Qe=()=>["none",Ee,ae,se],Ct=()=>["none",Ee,ae,se],ot=()=>[Ee,ae,se],he=()=>[Zn,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Nn],breakpoint:[Nn],color:[Xp],container:[Nn],"drop-shadow":[Nn],ease:["in","out","in-out"],font:[uy],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Nn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Nn],shadow:[Nn],spacing:["px",Ee],text:[Nn],"text-shadow":[Nn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Zn,se,ae,E]}],container:["container"],columns:[{columns:[Ee,se,ae,m]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:F()}],overflow:[{overflow:V()}],"overflow-x":[{"overflow-x":V()}],"overflow-y":[{"overflow-y":V()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:W()}],"inset-x":[{"inset-x":W()}],"inset-y":[{"inset-y":W()}],start:[{"inset-s":W(),start:W()}],end:[{"inset-e":W(),end:W()}],"inset-bs":[{"inset-bs":W()}],"inset-be":[{"inset-be":W()}],top:[{top:W()}],right:[{right:W()}],bottom:[{bottom:W()}],left:[{left:W()}],visibility:["visible","invisible","collapse"],z:[{z:[Jn,"auto",ae,se]}],basis:[{basis:[Zn,"full","auto",m,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ee,Zn,"auto","initial","none",se]}],grow:[{grow:["",Ee,ae,se]}],shrink:[{shrink:["",Ee,ae,se]}],order:[{order:[Jn,"first","last","none",ae,se]}],"grid-cols":[{"grid-cols":Q()}],"col-start-end":[{col:ee()}],"col-start":[{"col-start":ce()}],"col-end":[{"col-end":ce()}],"grid-rows":[{"grid-rows":Q()}],"row-start-end":[{row:ee()}],"row-start":[{"row-start":ce()}],"row-end":[{"row-end":ce()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...q(),"normal"]}],"justify-items":[{"justify-items":[...te(),"normal"]}],"justify-self":[{"justify-self":["auto",...te()]}],"align-content":[{content:["normal",...q()]}],"align-items":[{items:[...te(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...te(),{baseline:["","last"]}]}],"place-content":[{"place-content":q()}],"place-items":[{"place-items":[...te(),"baseline"]}],"place-self":[{"place-self":["auto",...te()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pbs:[{pbs:R()}],pbe:[{pbe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:J()}],mx:[{mx:J()}],my:[{my:J()}],ms:[{ms:J()}],me:[{me:J()}],mbs:[{mbs:J()}],mbe:[{mbe:J()}],mt:[{mt:J()}],mr:[{mr:J()}],mb:[{mb:J()}],ml:[{ml:J()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:ne()}],"inline-size":[{inline:["auto",...B()]}],"min-inline-size":[{"min-inline":["auto",...B()]}],"max-inline-size":[{"max-inline":["none",...B()]}],"block-size":[{block:["auto",...K()]}],"min-block-size":[{"min-block":["auto",...K()]}],"max-block-size":[{"max-block":["none",...K()]}],w:[{w:[m,"screen",...ne()]}],"min-w":[{"min-w":[m,"screen","none",...ne()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[p]},...ne()]}],h:[{h:["screen","lh",...ne()]}],"min-h":[{"min-h":["screen","lh","none",...ne()]}],"max-h":[{"max-h":["screen","lh",...ne()]}],"font-size":[{text:["base",o,tl,Cr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,vy,dy]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",tu,se]}],"font-family":[{font:[my,fy,l]}],"font-features":[{"font-features":[se]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[u,ae,se]}],"line-clamp":[{"line-clamp":[Ee,"none",ae,Gf]}],leading:[{leading:[c,...R()]}],"list-image":[{"list-image":["none",ae,se]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ae,se]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ce(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ee,"from-font","auto",ae,Cr]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[Ee,"auto",ae,se]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ae,se]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ae,se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:_()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:fe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Jn,ae,se],radial:["",ae,se],conic:[Jn,ae,se]},gy,py]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:we()}],"gradient-via-pos":[{via:we()}],"gradient-to-pos":[{to:we()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:pe()}],"rounded-s":[{"rounded-s":pe()}],"rounded-e":[{"rounded-e":pe()}],"rounded-t":[{"rounded-t":pe()}],"rounded-r":[{"rounded-r":pe()}],"rounded-b":[{"rounded-b":pe()}],"rounded-l":[{"rounded-l":pe()}],"rounded-ss":[{"rounded-ss":pe()}],"rounded-se":[{"rounded-se":pe()}],"rounded-ee":[{"rounded-ee":pe()}],"rounded-es":[{"rounded-es":pe()}],"rounded-tl":[{"rounded-tl":pe()}],"rounded-tr":[{"rounded-tr":pe()}],"rounded-br":[{"rounded-br":pe()}],"rounded-bl":[{"rounded-bl":pe()}],"border-w":[{border:me()}],"border-w-x":[{"border-x":me()}],"border-w-y":[{"border-y":me()}],"border-w-s":[{"border-s":me()}],"border-w-e":[{"border-e":me()}],"border-w-bs":[{"border-bs":me()}],"border-w-be":[{"border-be":me()}],"border-w-t":[{"border-t":me()}],"border-w-r":[{"border-r":me()}],"border-w-b":[{"border-b":me()}],"border-w-l":[{"border-l":me()}],"divide-x":[{"divide-x":me()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":me()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ce(),"hidden","none"]}],"divide-style":[{divide:[...Ce(),"hidden","none"]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...Ce(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ee,ae,se]}],"outline-w":[{outline:["",Ee,tl,Cr]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",v,ji,Ni]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",x,ji,Ni]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:me()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[Ee,Cr]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":me()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",S,ji,Ni]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[Ee,ae,se]}],"mix-blend":[{"mix-blend":[...be(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":be()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ee]}],"mask-image-linear-from-pos":[{"mask-linear-from":xe()}],"mask-image-linear-to-pos":[{"mask-linear-to":xe()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":xe()}],"mask-image-t-to-pos":[{"mask-t-to":xe()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":xe()}],"mask-image-r-to-pos":[{"mask-r-to":xe()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":xe()}],"mask-image-b-to-pos":[{"mask-b-to":xe()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":xe()}],"mask-image-l-to-pos":[{"mask-l-to":xe()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":xe()}],"mask-image-x-to-pos":[{"mask-x-to":xe()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":xe()}],"mask-image-y-to-pos":[{"mask-y-to":xe()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[ae,se]}],"mask-image-radial-from-pos":[{"mask-radial-from":xe()}],"mask-image-radial-to-pos":[{"mask-radial-to":xe()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":N()}],"mask-image-conic-pos":[{"mask-conic":[Ee]}],"mask-image-conic-from-pos":[{"mask-conic-from":xe()}],"mask-image-conic-to-pos":[{"mask-conic-to":xe()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:_()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:fe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ae,se]}],filter:[{filter:["","none",ae,se]}],blur:[{blur:ze()}],brightness:[{brightness:[Ee,ae,se]}],contrast:[{contrast:[Ee,ae,se]}],"drop-shadow":[{"drop-shadow":["","none",C,ji,Ni]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",Ee,ae,se]}],"hue-rotate":[{"hue-rotate":[Ee,ae,se]}],invert:[{invert:["",Ee,ae,se]}],saturate:[{saturate:[Ee,ae,se]}],sepia:[{sepia:["",Ee,ae,se]}],"backdrop-filter":[{"backdrop-filter":["","none",ae,se]}],"backdrop-blur":[{"backdrop-blur":ze()}],"backdrop-brightness":[{"backdrop-brightness":[Ee,ae,se]}],"backdrop-contrast":[{"backdrop-contrast":[Ee,ae,se]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ee,ae,se]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ee,ae,se]}],"backdrop-invert":[{"backdrop-invert":["",Ee,ae,se]}],"backdrop-opacity":[{"backdrop-opacity":[Ee,ae,se]}],"backdrop-saturate":[{"backdrop-saturate":[Ee,ae,se]}],"backdrop-sepia":[{"backdrop-sepia":["",Ee,ae,se]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ae,se]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ee,"initial",ae,se]}],ease:[{ease:["linear","initial",A,ae,se]}],delay:[{delay:[Ee,ae,se]}],animate:[{animate:["none",D,ae,se]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,ae,se]}],"perspective-origin":[{"perspective-origin":F()}],rotate:[{rotate:Qe()}],"rotate-x":[{"rotate-x":Qe()}],"rotate-y":[{"rotate-y":Qe()}],"rotate-z":[{"rotate-z":Qe()}],scale:[{scale:Ct()}],"scale-x":[{"scale-x":Ct()}],"scale-y":[{"scale-y":Ct()}],"scale-z":[{"scale-z":Ct()}],"scale-3d":["scale-3d"],skew:[{skew:ot()}],"skew-x":[{"skew-x":ot()}],"skew-y":[{"skew-y":ot()}],transform:[{transform:[ae,se,"","none","gpu","cpu"]}],"transform-origin":[{origin:F()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:he()}],"translate-x":[{"translate-x":he()}],"translate-y":[{"translate-y":he()}],"translate-z":[{"translate-z":he()}],"translate-none":["translate-none"],accent:[{accent:I()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ae,se]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mbs":[{"scroll-mbs":R()}],"scroll-mbe":[{"scroll-mbe":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pbs":[{"scroll-pbs":R()}],"scroll-pbe":[{"scroll-pbe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ae,se]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[Ee,tl,Cr,Gf]}],stroke:[{stroke:["none",...I()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},wy=Z0(xy);function fn(...n){return wy($p(n))}const Sy=Fp("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Zf({className:n,variant:l,size:o,asChild:s=!1,...u}){const c=s?zp:"button";return f.jsx(c,{"data-slot":"button",className:fn(Sy({variant:l,size:o,className:n})),...u})}const by=Fp("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function gu({className:n,variant:l,asChild:o=!1,...s}){const u=o?zp:"span";return f.jsx(u,{"data-slot":"badge",className:fn(by({variant:l}),n),...s})}var _u=_p();const Cy=Pp(_u);function tm(n){const l=ky(n),o=w.forwardRef((s,u)=>{const{children:c,...p}=s,m=w.Children.toArray(c),h=m.find(Ny);if(h){const y=h.props.children,v=m.map(x=>x===h?w.Children.count(y)>1?w.Children.only(null):w.isValidElement(y)?y.props.children:null:x);return f.jsx(l,{...p,ref:u,children:w.isValidElement(y)?w.cloneElement(y,void 0,v):null})}return f.jsx(l,{...p,ref:u,children:c})});return o.displayName=`${n}.Slot`,o}function ky(n){const l=w.forwardRef((o,s)=>{const{children:u,...c}=o;if(w.isValidElement(u)){const p=Ry(u),m=jy(c,u.props);return u.type!==w.Fragment&&(m.ref=s?Ru(s,p):p),w.cloneElement(u,m)}return w.Children.count(u)>1?w.Children.only(null):null});return l.displayName=`${n}.SlotClone`,l}var nm=Symbol("radix.slottable");function Ey(n){const l=({children:o})=>f.jsx(f.Fragment,{children:o});return l.displayName=`${n}.Slottable`,l.__radixId=nm,l}function Ny(n){return w.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===nm}function jy(n,l){const o={...l};for(const s in l){const u=n[s],c=l[s];/^on[A-Z]/.test(s)?u&&c?o[s]=(...m)=>{const h=c(...m);return u(...m),h}:u&&(o[s]=u):s==="style"?o[s]={...u,...c}:s==="className"&&(o[s]=[u,c].filter(Boolean).join(" "))}return{...n,...o}}function Ry(n){var s,u;let l=(s=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:s.get,o=l&&"isReactWarning"in l&&l.isReactWarning;return o?n.ref:(l=(u=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:u.get,o=l&&"isReactWarning"in l&&l.isReactWarning,o?n.props.ref:n.props.ref||n.ref)}var Ty=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],He=Ty.reduce((n,l)=>{const o=tm(`Primitive.${l}`),s=w.forwardRef((u,c)=>{const{asChild:p,...m}=u,h=p?o:l;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(h,{...m,ref:c})});return s.displayName=`Primitive.${l}`,{...n,[l]:s}},{});function Py(n,l){n&&_u.flushSync(()=>n.dispatchEvent(l))}var cn=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{};function _y(n,l){return w.useReducer((o,s)=>l[o][s]??o,n)}var Zt=n=>{const{present:l,children:o}=n,s=Ay(l),u=typeof o=="function"?o({present:s.isPresent}):w.Children.only(o),c=rt(s.ref,Oy(u));return typeof o=="function"||s.isPresent?w.cloneElement(u,{ref:c}):null};Zt.displayName="Presence";function Ay(n){const[l,o]=w.useState(),s=w.useRef(null),u=w.useRef(n),c=w.useRef("none"),p=n?"mounted":"unmounted",[m,h]=_y(p,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const y=Ri(s.current);c.current=m==="mounted"?y:"none"},[m]),cn(()=>{const y=s.current,v=u.current;if(v!==n){const S=c.current,C=Ri(y);n?h("MOUNT"):C==="none"||(y==null?void 0:y.display)==="none"?h("UNMOUNT"):h(v&&S!==C?"ANIMATION_OUT":"UNMOUNT"),u.current=n}},[n,h]),cn(()=>{if(l){let y;const v=l.ownerDocument.defaultView??window,x=C=>{const k=Ri(s.current).includes(CSS.escape(C.animationName));if(C.target===l&&k&&(h("ANIMATION_END"),!u.current)){const E=l.style.animationFillMode;l.style.animationFillMode="forwards",y=v.setTimeout(()=>{l.style.animationFillMode==="forwards"&&(l.style.animationFillMode=E)})}},S=C=>{C.target===l&&(c.current=Ri(s.current))};return l.addEventListener("animationstart",S),l.addEventListener("animationcancel",x),l.addEventListener("animationend",x),()=>{v.clearTimeout(y),l.removeEventListener("animationstart",S),l.removeEventListener("animationcancel",x),l.removeEventListener("animationend",x)}}else h("ANIMATION_END")},[l,h]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:w.useCallback(y=>{s.current=y?getComputedStyle(y):null,o(y)},[])}}function Ri(n){return(n==null?void 0:n.animationName)||"none"}function Oy(n){var s,u;let l=(s=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:s.get,o=l&&"isReactWarning"in l&&l.isReactWarning;return o?n.ref:(l=(u=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:u.get,o=l&&"isReactWarning"in l&&l.isReactWarning,o?n.props.ref:n.props.ref||n.ref)}function My(n,l){const o=w.createContext(l),s=c=>{const{children:p,...m}=c,h=w.useMemo(()=>m,Object.values(m));return f.jsx(o.Provider,{value:h,children:p})};s.displayName=n+"Provider";function u(c){const p=w.useContext(o);if(p)return p;if(l!==void 0)return l;throw new Error(`\`${c}\` must be used within \`${n}\``)}return[s,u]}function cl(n,l=[]){let o=[];function s(c,p){const m=w.createContext(p),h=o.length;o=[...o,p];const y=x=>{var A;const{scope:S,children:C,...P}=x,k=((A=S==null?void 0:S[n])==null?void 0:A[h])||m,E=w.useMemo(()=>P,Object.values(P));return f.jsx(k.Provider,{value:E,children:C})};y.displayName=c+"Provider";function v(x,S){var k;const C=((k=S==null?void 0:S[n])==null?void 0:k[h])||m,P=w.useContext(C);if(P)return P;if(p!==void 0)return p;throw new Error(`\`${x}\` must be used within \`${c}\``)}return[y,v]}const u=()=>{const c=o.map(p=>w.createContext(p));return function(m){const h=(m==null?void 0:m[n])||c;return w.useMemo(()=>({[`__scope${n}`]:{...m,[n]:h}}),[m,h])}};return u.scopeName=n,[s,Dy(u,...l)]}function Dy(...n){const l=n[0];if(n.length===1)return l;const o=()=>{const s=n.map(u=>({useScope:u(),scopeName:u.scopeName}));return function(c){const p=s.reduce((m,{useScope:h,scopeName:y})=>{const x=h(c)[`__scope${y}`];return{...m,...x}},{});return w.useMemo(()=>({[`__scope${l.scopeName}`]:p}),[p])}};return o.scopeName=l.scopeName,o}function Tt(n){const l=w.useRef(n);return w.useEffect(()=>{l.current=n}),w.useMemo(()=>(...o)=>{var s;return(s=l.current)==null?void 0:s.call(l,...o)},[])}var Ly=w.createContext(void 0);function zy(n){const l=w.useContext(Ly);return n||l||"ltr"}function Iy(n,[l,o]){return Math.min(o,Math.max(l,n))}function Be(n,l,{checkForDefaultPrevented:o=!0}={}){return function(u){if(n==null||n(u),o===!1||!u.defaultPrevented)return l==null?void 0:l(u)}}function $y(n,l){return w.useReducer((o,s)=>l[o][s]??o,n)}var Au="ScrollArea",[rm,Nb]=cl(Au),[Fy,$t]=rm(Au),om=w.forwardRef((n,l)=>{const{__scopeScrollArea:o,type:s="hover",dir:u,scrollHideDelay:c=600,...p}=n,[m,h]=w.useState(null),[y,v]=w.useState(null),[x,S]=w.useState(null),[C,P]=w.useState(null),[k,E]=w.useState(null),[A,D]=w.useState(0),[$,N]=w.useState(0),[F,V]=w.useState(!1),[L,R]=w.useState(!1),W=rt(l,ee=>h(ee)),Q=zy(u);return f.jsx(Fy,{scope:o,type:s,dir:Q,scrollHideDelay:c,scrollArea:m,viewport:y,onViewportChange:v,content:x,onContentChange:S,scrollbarX:C,onScrollbarXChange:P,scrollbarXEnabled:F,onScrollbarXEnabledChange:V,scrollbarY:k,onScrollbarYChange:E,scrollbarYEnabled:L,onScrollbarYEnabledChange:R,onCornerWidthChange:D,onCornerHeightChange:N,children:f.jsx(He.div,{dir:Q,...p,ref:W,style:{position:"relative","--radix-scroll-area-corner-width":A+"px","--radix-scroll-area-corner-height":$+"px",...n.style}})})});om.displayName=Au;var lm="ScrollAreaViewport",im=w.forwardRef((n,l)=>{const{__scopeScrollArea:o,children:s,nonce:u,...c}=n,p=$t(lm,o),m=w.useRef(null),h=rt(l,m,p.onViewportChange);return f.jsxs(f.Fragment,{children:[f.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:u}),f.jsx(He.div,{"data-radix-scroll-area-viewport":"",...c,ref:h,style:{overflowX:p.scrollbarXEnabled?"scroll":"hidden",overflowY:p.scrollbarYEnabled?"scroll":"hidden",...n.style},children:f.jsx("div",{ref:p.onContentChange,style:{minWidth:"100%",display:"table"},children:s})})]})});im.displayName=lm;var pn="ScrollAreaScrollbar",sm=w.forwardRef((n,l)=>{const{forceMount:o,...s}=n,u=$t(pn,n.__scopeScrollArea),{onScrollbarXEnabledChange:c,onScrollbarYEnabledChange:p}=u,m=n.orientation==="horizontal";return w.useEffect(()=>(m?c(!0):p(!0),()=>{m?c(!1):p(!1)}),[m,c,p]),u.type==="hover"?f.jsx(Wy,{...s,ref:l,forceMount:o}):u.type==="scroll"?f.jsx(By,{...s,ref:l,forceMount:o}):u.type==="auto"?f.jsx(am,{...s,ref:l,forceMount:o}):u.type==="always"?f.jsx(Ou,{...s,ref:l}):null});sm.displayName=pn;var Wy=w.forwardRef((n,l)=>{const{forceMount:o,...s}=n,u=$t(pn,n.__scopeScrollArea),[c,p]=w.useState(!1);return w.useEffect(()=>{const m=u.scrollArea;let h=0;if(m){const y=()=>{window.clearTimeout(h),p(!0)},v=()=>{h=window.setTimeout(()=>p(!1),u.scrollHideDelay)};return m.addEventListener("pointerenter",y),m.addEventListener("pointerleave",v),()=>{window.clearTimeout(h),m.removeEventListener("pointerenter",y),m.removeEventListener("pointerleave",v)}}},[u.scrollArea,u.scrollHideDelay]),f.jsx(Zt,{present:o||c,children:f.jsx(am,{"data-state":c?"visible":"hidden",...s,ref:l})})}),By=w.forwardRef((n,l)=>{const{forceMount:o,...s}=n,u=$t(pn,n.__scopeScrollArea),c=n.orientation==="horizontal",p=os(()=>h("SCROLL_END"),100),[m,h]=$y("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return w.useEffect(()=>{if(m==="idle"){const y=window.setTimeout(()=>h("HIDE"),u.scrollHideDelay);return()=>window.clearTimeout(y)}},[m,u.scrollHideDelay,h]),w.useEffect(()=>{const y=u.viewport,v=c?"scrollLeft":"scrollTop";if(y){let x=y[v];const S=()=>{const C=y[v];x!==C&&(h("SCROLL"),p()),x=C};return y.addEventListener("scroll",S),()=>y.removeEventListener("scroll",S)}},[u.viewport,c,h,p]),f.jsx(Zt,{present:o||m!=="hidden",children:f.jsx(Ou,{"data-state":m==="hidden"?"hidden":"visible",...s,ref:l,onPointerEnter:Be(n.onPointerEnter,()=>h("POINTER_ENTER")),onPointerLeave:Be(n.onPointerLeave,()=>h("POINTER_LEAVE"))})})}),am=w.forwardRef((n,l)=>{const o=$t(pn,n.__scopeScrollArea),{forceMount:s,...u}=n,[c,p]=w.useState(!1),m=n.orientation==="horizontal",h=os(()=>{if(o.viewport){const y=o.viewport.offsetWidth<o.viewport.scrollWidth,v=o.viewport.offsetHeight<o.viewport.scrollHeight;p(m?y:v)}},10);return io(o.viewport,h),io(o.content,h),f.jsx(Zt,{present:s||c,children:f.jsx(Ou,{"data-state":c?"visible":"hidden",...u,ref:l})})}),Ou=w.forwardRef((n,l)=>{const{orientation:o="vertical",...s}=n,u=$t(pn,n.__scopeScrollArea),c=w.useRef(null),p=w.useRef(0),[m,h]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),y=pm(m.viewport,m.content),v={...s,sizes:m,onSizesChange:h,hasThumb:y>0&&y<1,onThumbChange:S=>c.current=S,onThumbPointerUp:()=>p.current=0,onThumbPointerDown:S=>p.current=S};function x(S,C){return Qy(S,p.current,m,C)}return o==="horizontal"?f.jsx(Hy,{...v,ref:l,onThumbPositionChange:()=>{if(u.viewport&&c.current){const S=u.viewport.scrollLeft,C=Jf(S,m,u.dir);c.current.style.transform=`translate3d(${C}px, 0, 0)`}},onWheelScroll:S=>{u.viewport&&(u.viewport.scrollLeft=S)},onDragScroll:S=>{u.viewport&&(u.viewport.scrollLeft=x(S,u.dir))}}):o==="vertical"?f.jsx(Vy,{...v,ref:l,onThumbPositionChange:()=>{if(u.viewport&&c.current){const S=u.viewport.scrollTop,C=Jf(S,m);c.current.style.transform=`translate3d(0, ${C}px, 0)`}},onWheelScroll:S=>{u.viewport&&(u.viewport.scrollTop=S)},onDragScroll:S=>{u.viewport&&(u.viewport.scrollTop=x(S))}}):null}),Hy=w.forwardRef((n,l)=>{const{sizes:o,onSizesChange:s,...u}=n,c=$t(pn,n.__scopeScrollArea),[p,m]=w.useState(),h=w.useRef(null),y=rt(l,h,c.onScrollbarXChange);return w.useEffect(()=>{h.current&&m(getComputedStyle(h.current))},[h]),f.jsx(cm,{"data-orientation":"horizontal",...u,ref:y,sizes:o,style:{bottom:0,left:c.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:c.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":rs(o)+"px",...n.style},onThumbPointerDown:v=>n.onThumbPointerDown(v.x),onDragScroll:v=>n.onDragScroll(v.x),onWheelScroll:(v,x)=>{if(c.viewport){const S=c.viewport.scrollLeft+v.deltaX;n.onWheelScroll(S),hm(S,x)&&v.preventDefault()}},onResize:()=>{h.current&&c.viewport&&p&&s({content:c.viewport.scrollWidth,viewport:c.viewport.offsetWidth,scrollbar:{size:h.current.clientWidth,paddingStart:Qi(p.paddingLeft),paddingEnd:Qi(p.paddingRight)}})}})}),Vy=w.forwardRef((n,l)=>{const{sizes:o,onSizesChange:s,...u}=n,c=$t(pn,n.__scopeScrollArea),[p,m]=w.useState(),h=w.useRef(null),y=rt(l,h,c.onScrollbarYChange);return w.useEffect(()=>{h.current&&m(getComputedStyle(h.current))},[h]),f.jsx(cm,{"data-orientation":"vertical",...u,ref:y,sizes:o,style:{top:0,right:c.dir==="ltr"?0:void 0,left:c.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":rs(o)+"px",...n.style},onThumbPointerDown:v=>n.onThumbPointerDown(v.y),onDragScroll:v=>n.onDragScroll(v.y),onWheelScroll:(v,x)=>{if(c.viewport){const S=c.viewport.scrollTop+v.deltaY;n.onWheelScroll(S),hm(S,x)&&v.preventDefault()}},onResize:()=>{h.current&&c.viewport&&p&&s({content:c.viewport.scrollHeight,viewport:c.viewport.offsetHeight,scrollbar:{size:h.current.clientHeight,paddingStart:Qi(p.paddingTop),paddingEnd:Qi(p.paddingBottom)}})}})}),[Uy,um]=rm(pn),cm=w.forwardRef((n,l)=>{const{__scopeScrollArea:o,sizes:s,hasThumb:u,onThumbChange:c,onThumbPointerUp:p,onThumbPointerDown:m,onThumbPositionChange:h,onDragScroll:y,onWheelScroll:v,onResize:x,...S}=n,C=$t(pn,o),[P,k]=w.useState(null),E=rt(l,W=>k(W)),A=w.useRef(null),D=w.useRef(""),$=C.viewport,N=s.content-s.viewport,F=Tt(v),V=Tt(h),L=os(x,10);function R(W){if(A.current){const Q=W.clientX-A.current.left,ee=W.clientY-A.current.top;y({x:Q,y:ee})}}return w.useEffect(()=>{const W=Q=>{const ee=Q.target;(P==null?void 0:P.contains(ee))&&F(Q,N)};return document.addEventListener("wheel",W,{passive:!1}),()=>document.removeEventListener("wheel",W,{passive:!1})},[$,P,N,F]),w.useEffect(V,[s,V]),io(P,L),io(C.content,L),f.jsx(Uy,{scope:o,scrollbar:P,hasThumb:u,onThumbChange:Tt(c),onThumbPointerUp:Tt(p),onThumbPositionChange:V,onThumbPointerDown:Tt(m),children:f.jsx(He.div,{...S,ref:E,style:{position:"absolute",...S.style},onPointerDown:Be(n.onPointerDown,W=>{W.button===0&&(W.target.setPointerCapture(W.pointerId),A.current=P.getBoundingClientRect(),D.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",C.viewport&&(C.viewport.style.scrollBehavior="auto"),R(W))}),onPointerMove:Be(n.onPointerMove,R),onPointerUp:Be(n.onPointerUp,W=>{const Q=W.target;Q.hasPointerCapture(W.pointerId)&&Q.releasePointerCapture(W.pointerId),document.body.style.webkitUserSelect=D.current,C.viewport&&(C.viewport.style.scrollBehavior=""),A.current=null})})})}),Xi="ScrollAreaThumb",dm=w.forwardRef((n,l)=>{const{forceMount:o,...s}=n,u=um(Xi,n.__scopeScrollArea);return f.jsx(Zt,{present:o||u.hasThumb,children:f.jsx(Yy,{ref:l,...s})})}),Yy=w.forwardRef((n,l)=>{const{__scopeScrollArea:o,style:s,...u}=n,c=$t(Xi,o),p=um(Xi,o),{onThumbPositionChange:m}=p,h=rt(l,x=>p.onThumbChange(x)),y=w.useRef(void 0),v=os(()=>{y.current&&(y.current(),y.current=void 0)},100);return w.useEffect(()=>{const x=c.viewport;if(x){const S=()=>{if(v(),!y.current){const C=Gy(x,m);y.current=C,m()}};return m(),x.addEventListener("scroll",S),()=>x.removeEventListener("scroll",S)}},[c.viewport,v,m]),f.jsx(He.div,{"data-state":p.hasThumb?"visible":"hidden",...u,ref:h,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...s},onPointerDownCapture:Be(n.onPointerDownCapture,x=>{const C=x.target.getBoundingClientRect(),P=x.clientX-C.left,k=x.clientY-C.top;p.onThumbPointerDown({x:P,y:k})}),onPointerUp:Be(n.onPointerUp,p.onThumbPointerUp)})});dm.displayName=Xi;var Mu="ScrollAreaCorner",fm=w.forwardRef((n,l)=>{const o=$t(Mu,n.__scopeScrollArea),s=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&s?f.jsx(Xy,{...n,ref:l}):null});fm.displayName=Mu;var Xy=w.forwardRef((n,l)=>{const{__scopeScrollArea:o,...s}=n,u=$t(Mu,o),[c,p]=w.useState(0),[m,h]=w.useState(0),y=!!(c&&m);return io(u.scrollbarX,()=>{var x;const v=((x=u.scrollbarX)==null?void 0:x.offsetHeight)||0;u.onCornerHeightChange(v),h(v)}),io(u.scrollbarY,()=>{var x;const v=((x=u.scrollbarY)==null?void 0:x.offsetWidth)||0;u.onCornerWidthChange(v),p(v)}),y?f.jsx(He.div,{...s,ref:l,style:{width:c,height:m,position:"absolute",right:u.dir==="ltr"?0:void 0,left:u.dir==="rtl"?0:void 0,bottom:0,...n.style}}):null});function Qi(n){return n?parseInt(n,10):0}function pm(n,l){const o=n/l;return isNaN(o)?0:o}function rs(n){const l=pm(n.viewport,n.content),o=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,s=(n.scrollbar.size-o)*l;return Math.max(s,18)}function Qy(n,l,o,s="ltr"){const u=rs(o),c=u/2,p=l||c,m=u-p,h=o.scrollbar.paddingStart+p,y=o.scrollbar.size-o.scrollbar.paddingEnd-m,v=o.content-o.viewport,x=s==="ltr"?[0,v]:[v*-1,0];return mm([h,y],x)(n)}function Jf(n,l,o="ltr"){const s=rs(l),u=l.scrollbar.paddingStart+l.scrollbar.paddingEnd,c=l.scrollbar.size-u,p=l.content-l.viewport,m=c-s,h=o==="ltr"?[0,p]:[p*-1,0],y=Iy(n,h);return mm([0,p],[0,m])(y)}function mm(n,l){return o=>{if(n[0]===n[1]||l[0]===l[1])return l[0];const s=(l[1]-l[0])/(n[1]-n[0]);return l[0]+s*(o-n[0])}}function hm(n,l){return n>0&&n<l}var Gy=(n,l=()=>{})=>{let o={left:n.scrollLeft,top:n.scrollTop},s=0;return(function u(){const c={left:n.scrollLeft,top:n.scrollTop},p=o.left!==c.left,m=o.top!==c.top;(p||m)&&l(),o=c,s=window.requestAnimationFrame(u)})(),()=>window.cancelAnimationFrame(s)};function os(n,l){const o=Tt(n),s=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(s.current),[]),w.useCallback(()=>{window.clearTimeout(s.current),s.current=window.setTimeout(o,l)},[o,l])}function io(n,l){const o=Tt(l);cn(()=>{let s=0;if(n){const u=new ResizeObserver(()=>{cancelAnimationFrame(s),s=window.requestAnimationFrame(o)});return u.observe(n),()=>{window.cancelAnimationFrame(s),u.unobserve(n)}}},[n,o])}var Ky=om,qy=im,Zy=fm;function ep({className:n,children:l,...o}){return f.jsxs(Ky,{"data-slot":"scroll-area",className:fn("relative",n),...o,children:[f.jsx(qy,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:l}),f.jsx(Jy,{}),f.jsx(Zy,{})]})}function Jy({className:n,orientation:l="vertical",...o}){return f.jsx(sm,{"data-slot":"scroll-area-scrollbar",orientation:l,className:fn("flex touch-none p-px transition-colors select-none",l==="vertical"&&"h-full w-2.5 border-l border-l-transparent",l==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",n),...o,children:f.jsx(dm,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}function ex(n,l=globalThis==null?void 0:globalThis.document){const o=Tt(n);w.useEffect(()=>{const s=u=>{u.key==="Escape"&&o(u)};return l.addEventListener("keydown",s,{capture:!0}),()=>l.removeEventListener("keydown",s,{capture:!0})},[o,l])}var tx="DismissableLayer",vu="dismissableLayer.update",nx="dismissableLayer.pointerDownOutside",rx="dismissableLayer.focusOutside",tp,gm=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Du=w.forwardRef((n,l)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:c,onInteractOutside:p,onDismiss:m,...h}=n,y=w.useContext(gm),[v,x]=w.useState(null),S=(v==null?void 0:v.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,C]=w.useState({}),P=rt(l,L=>x(L)),k=Array.from(y.layers),[E]=[...y.layersWithOutsidePointerEventsDisabled].slice(-1),A=k.indexOf(E),D=v?k.indexOf(v):-1,$=y.layersWithOutsidePointerEventsDisabled.size>0,N=D>=A,F=ix(L=>{const R=L.target,W=[...y.branches].some(Q=>Q.contains(R));!N||W||(u==null||u(L),p==null||p(L),L.defaultPrevented||m==null||m())},S),V=sx(L=>{const R=L.target;[...y.branches].some(Q=>Q.contains(R))||(c==null||c(L),p==null||p(L),L.defaultPrevented||m==null||m())},S);return ex(L=>{D===y.layers.size-1&&(s==null||s(L),!L.defaultPrevented&&m&&(L.preventDefault(),m()))},S),w.useEffect(()=>{if(v)return o&&(y.layersWithOutsidePointerEventsDisabled.size===0&&(tp=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),y.layersWithOutsidePointerEventsDisabled.add(v)),y.layers.add(v),np(),()=>{o&&y.layersWithOutsidePointerEventsDisabled.size===1&&(S.body.style.pointerEvents=tp)}},[v,S,o,y]),w.useEffect(()=>()=>{v&&(y.layers.delete(v),y.layersWithOutsidePointerEventsDisabled.delete(v),np())},[v,y]),w.useEffect(()=>{const L=()=>C({});return document.addEventListener(vu,L),()=>document.removeEventListener(vu,L)},[]),f.jsx(He.div,{...h,ref:P,style:{pointerEvents:$?N?"auto":"none":void 0,...n.style},onFocusCapture:Be(n.onFocusCapture,V.onFocusCapture),onBlurCapture:Be(n.onBlurCapture,V.onBlurCapture),onPointerDownCapture:Be(n.onPointerDownCapture,F.onPointerDownCapture)})});Du.displayName=tx;var ox="DismissableLayerBranch",lx=w.forwardRef((n,l)=>{const o=w.useContext(gm),s=w.useRef(null),u=rt(l,s);return w.useEffect(()=>{const c=s.current;if(c)return o.branches.add(c),()=>{o.branches.delete(c)}},[o.branches]),f.jsx(He.div,{...n,ref:u})});lx.displayName=ox;function ix(n,l=globalThis==null?void 0:globalThis.document){const o=Tt(n),s=w.useRef(!1),u=w.useRef(()=>{});return w.useEffect(()=>{const c=m=>{if(m.target&&!s.current){let h=function(){vm(nx,o,y,{discrete:!0})};const y={originalEvent:m};m.pointerType==="touch"?(l.removeEventListener("click",u.current),u.current=h,l.addEventListener("click",u.current,{once:!0})):h()}else l.removeEventListener("click",u.current);s.current=!1},p=window.setTimeout(()=>{l.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(p),l.removeEventListener("pointerdown",c),l.removeEventListener("click",u.current)}},[l,o]),{onPointerDownCapture:()=>s.current=!0}}function sx(n,l=globalThis==null?void 0:globalThis.document){const o=Tt(n),s=w.useRef(!1);return w.useEffect(()=>{const u=c=>{c.target&&!s.current&&vm(rx,o,{originalEvent:c},{discrete:!1})};return l.addEventListener("focusin",u),()=>l.removeEventListener("focusin",u)},[l,o]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function np(){const n=new CustomEvent(vu);document.dispatchEvent(n)}function vm(n,l,o,{discrete:s}){const u=o.originalEvent.target,c=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:o});l&&u.addEventListener(n,l,{once:!0}),s?Py(u,c):u.dispatchEvent(c)}var ax=ju[" useId ".trim().toString()]||(()=>{}),ux=0;function ol(n){const[l,o]=w.useState(ax());return cn(()=>{o(s=>s??String(ux++))},[n]),l?`radix-${l}`:""}const cx=["top","right","bottom","left"],tr=Math.min,Rt=Math.max,Gi=Math.round,Ti=Math.floor,un=n=>({x:n,y:n}),dx={left:"right",right:"left",bottom:"top",top:"bottom"},fx={start:"end",end:"start"};function yu(n,l,o){return Rt(n,tr(l,o))}function jn(n,l){return typeof n=="function"?n(l):n}function Rn(n){return n.split("-")[0]}function uo(n){return n.split("-")[1]}function Lu(n){return n==="x"?"y":"x"}function zu(n){return n==="y"?"height":"width"}const px=new Set(["top","bottom"]);function an(n){return px.has(Rn(n))?"y":"x"}function Iu(n){return Lu(an(n))}function mx(n,l,o){o===void 0&&(o=!1);const s=uo(n),u=Iu(n),c=zu(u);let p=u==="x"?s===(o?"end":"start")?"right":"left":s==="start"?"bottom":"top";return l.reference[c]>l.floating[c]&&(p=Ki(p)),[p,Ki(p)]}function hx(n){const l=Ki(n);return[xu(n),l,xu(l)]}function xu(n){return n.replace(/start|end/g,l=>fx[l])}const rp=["left","right"],op=["right","left"],gx=["top","bottom"],vx=["bottom","top"];function yx(n,l,o){switch(n){case"top":case"bottom":return o?l?op:rp:l?rp:op;case"left":case"right":return l?gx:vx;default:return[]}}function xx(n,l,o,s){const u=uo(n);let c=yx(Rn(n),o==="start",s);return u&&(c=c.map(p=>p+"-"+u),l&&(c=c.concat(c.map(xu)))),c}function Ki(n){return n.replace(/left|right|bottom|top/g,l=>dx[l])}function wx(n){return{top:0,right:0,bottom:0,left:0,...n}}function ym(n){return typeof n!="number"?wx(n):{top:n,right:n,bottom:n,left:n}}function qi(n){const{x:l,y:o,width:s,height:u}=n;return{width:s,height:u,top:o,left:l,right:l+s,bottom:o+u,x:l,y:o}}function lp(n,l,o){let{reference:s,floating:u}=n;const c=an(l),p=Iu(l),m=zu(p),h=Rn(l),y=c==="y",v=s.x+s.width/2-u.width/2,x=s.y+s.height/2-u.height/2,S=s[m]/2-u[m]/2;let C;switch(h){case"top":C={x:v,y:s.y-u.height};break;case"bottom":C={x:v,y:s.y+s.height};break;case"right":C={x:s.x+s.width,y:x};break;case"left":C={x:s.x-u.width,y:x};break;default:C={x:s.x,y:s.y}}switch(uo(l)){case"start":C[p]-=S*(o&&y?-1:1);break;case"end":C[p]+=S*(o&&y?-1:1);break}return C}const Sx=async(n,l,o)=>{const{placement:s="bottom",strategy:u="absolute",middleware:c=[],platform:p}=o,m=c.filter(Boolean),h=await(p.isRTL==null?void 0:p.isRTL(l));let y=await p.getElementRects({reference:n,floating:l,strategy:u}),{x:v,y:x}=lp(y,s,h),S=s,C={},P=0;for(let k=0;k<m.length;k++){const{name:E,fn:A}=m[k],{x:D,y:$,data:N,reset:F}=await A({x:v,y:x,initialPlacement:s,placement:S,strategy:u,middlewareData:C,rects:y,platform:p,elements:{reference:n,floating:l}});v=D??v,x=$??x,C={...C,[E]:{...C[E],...N}},F&&P<=50&&(P++,typeof F=="object"&&(F.placement&&(S=F.placement),F.rects&&(y=F.rects===!0?await p.getElementRects({reference:n,floating:l,strategy:u}):F.rects),{x:v,y:x}=lp(y,S,h)),k=-1)}return{x:v,y:x,placement:S,strategy:u,middlewareData:C}};async function sl(n,l){var o;l===void 0&&(l={});const{x:s,y:u,platform:c,rects:p,elements:m,strategy:h}=n,{boundary:y="clippingAncestors",rootBoundary:v="viewport",elementContext:x="floating",altBoundary:S=!1,padding:C=0}=jn(l,n),P=ym(C),E=m[S?x==="floating"?"reference":"floating":x],A=qi(await c.getClippingRect({element:(o=await(c.isElement==null?void 0:c.isElement(E)))==null||o?E:E.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(m.floating)),boundary:y,rootBoundary:v,strategy:h})),D=x==="floating"?{x:s,y:u,width:p.floating.width,height:p.floating.height}:p.reference,$=await(c.getOffsetParent==null?void 0:c.getOffsetParent(m.floating)),N=await(c.isElement==null?void 0:c.isElement($))?await(c.getScale==null?void 0:c.getScale($))||{x:1,y:1}:{x:1,y:1},F=qi(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:D,offsetParent:$,strategy:h}):D);return{top:(A.top-F.top+P.top)/N.y,bottom:(F.bottom-A.bottom+P.bottom)/N.y,left:(A.left-F.left+P.left)/N.x,right:(F.right-A.right+P.right)/N.x}}const bx=n=>({name:"arrow",options:n,async fn(l){const{x:o,y:s,placement:u,rects:c,platform:p,elements:m,middlewareData:h}=l,{element:y,padding:v=0}=jn(n,l)||{};if(y==null)return{};const x=ym(v),S={x:o,y:s},C=Iu(u),P=zu(C),k=await p.getDimensions(y),E=C==="y",A=E?"top":"left",D=E?"bottom":"right",$=E?"clientHeight":"clientWidth",N=c.reference[P]+c.reference[C]-S[C]-c.floating[P],F=S[C]-c.reference[C],V=await(p.getOffsetParent==null?void 0:p.getOffsetParent(y));let L=V?V[$]:0;(!L||!await(p.isElement==null?void 0:p.isElement(V)))&&(L=m.floating[$]||c.floating[P]);const R=N/2-F/2,W=L/2-k[P]/2-1,Q=tr(x[A],W),ee=tr(x[D],W),ce=Q,U=L-k[P]-ee,q=L/2-k[P]/2+R,te=yu(ce,q,U),J=!h.arrow&&uo(u)!=null&&q!==te&&c.reference[P]/2-(q<ce?Q:ee)-k[P]/2<0,ne=J?q<ce?q-ce:q-U:0;return{[C]:S[C]+ne,data:{[C]:te,centerOffset:q-te-ne,...J&&{alignmentOffset:ne}},reset:J}}}),Cx=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(l){var o,s;const{placement:u,middlewareData:c,rects:p,initialPlacement:m,platform:h,elements:y}=l,{mainAxis:v=!0,crossAxis:x=!0,fallbackPlacements:S,fallbackStrategy:C="bestFit",fallbackAxisSideDirection:P="none",flipAlignment:k=!0,...E}=jn(n,l);if((o=c.arrow)!=null&&o.alignmentOffset)return{};const A=Rn(u),D=an(m),$=Rn(m)===m,N=await(h.isRTL==null?void 0:h.isRTL(y.floating)),F=S||($||!k?[Ki(m)]:hx(m)),V=P!=="none";!S&&V&&F.push(...xx(m,k,P,N));const L=[m,...F],R=await sl(l,E),W=[];let Q=((s=c.flip)==null?void 0:s.overflows)||[];if(v&&W.push(R[A]),x){const q=mx(u,p,N);W.push(R[q[0]],R[q[1]])}if(Q=[...Q,{placement:u,overflows:W}],!W.every(q=>q<=0)){var ee,ce;const q=(((ee=c.flip)==null?void 0:ee.index)||0)+1,te=L[q];if(te&&(!(x==="alignment"?D!==an(te):!1)||Q.every(B=>an(B.placement)===D?B.overflows[0]>0:!0)))return{data:{index:q,overflows:Q},reset:{placement:te}};let J=(ce=Q.filter(ne=>ne.overflows[0]<=0).sort((ne,B)=>ne.overflows[1]-B.overflows[1])[0])==null?void 0:ce.placement;if(!J)switch(C){case"bestFit":{var U;const ne=(U=Q.filter(B=>{if(V){const K=an(B.placement);return K===D||K==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(K=>K>0).reduce((K,I)=>K+I,0)]).sort((B,K)=>B[1]-K[1])[0])==null?void 0:U[0];ne&&(J=ne);break}case"initialPlacement":J=m;break}if(u!==J)return{reset:{placement:J}}}return{}}}};function ip(n,l){return{top:n.top-l.height,right:n.right-l.width,bottom:n.bottom-l.height,left:n.left-l.width}}function sp(n){return cx.some(l=>n[l]>=0)}const kx=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(l){const{rects:o}=l,{strategy:s="referenceHidden",...u}=jn(n,l);switch(s){case"referenceHidden":{const c=await sl(l,{...u,elementContext:"reference"}),p=ip(c,o.reference);return{data:{referenceHiddenOffsets:p,referenceHidden:sp(p)}}}case"escaped":{const c=await sl(l,{...u,altBoundary:!0}),p=ip(c,o.floating);return{data:{escapedOffsets:p,escaped:sp(p)}}}default:return{}}}}},xm=new Set(["left","top"]);async function Ex(n,l){const{placement:o,platform:s,elements:u}=n,c=await(s.isRTL==null?void 0:s.isRTL(u.floating)),p=Rn(o),m=uo(o),h=an(o)==="y",y=xm.has(p)?-1:1,v=c&&h?-1:1,x=jn(l,n);let{mainAxis:S,crossAxis:C,alignmentAxis:P}=typeof x=="number"?{mainAxis:x,crossAxis:0,alignmentAxis:null}:{mainAxis:x.mainAxis||0,crossAxis:x.crossAxis||0,alignmentAxis:x.alignmentAxis};return m&&typeof P=="number"&&(C=m==="end"?P*-1:P),h?{x:C*v,y:S*y}:{x:S*y,y:C*v}}const Nx=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(l){var o,s;const{x:u,y:c,placement:p,middlewareData:m}=l,h=await Ex(l,n);return p===((o=m.offset)==null?void 0:o.placement)&&(s=m.arrow)!=null&&s.alignmentOffset?{}:{x:u+h.x,y:c+h.y,data:{...h,placement:p}}}}},jx=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(l){const{x:o,y:s,placement:u}=l,{mainAxis:c=!0,crossAxis:p=!1,limiter:m={fn:E=>{let{x:A,y:D}=E;return{x:A,y:D}}},...h}=jn(n,l),y={x:o,y:s},v=await sl(l,h),x=an(Rn(u)),S=Lu(x);let C=y[S],P=y[x];if(c){const E=S==="y"?"top":"left",A=S==="y"?"bottom":"right",D=C+v[E],$=C-v[A];C=yu(D,C,$)}if(p){const E=x==="y"?"top":"left",A=x==="y"?"bottom":"right",D=P+v[E],$=P-v[A];P=yu(D,P,$)}const k=m.fn({...l,[S]:C,[x]:P});return{...k,data:{x:k.x-o,y:k.y-s,enabled:{[S]:c,[x]:p}}}}}},Rx=function(n){return n===void 0&&(n={}),{options:n,fn(l){const{x:o,y:s,placement:u,rects:c,middlewareData:p}=l,{offset:m=0,mainAxis:h=!0,crossAxis:y=!0}=jn(n,l),v={x:o,y:s},x=an(u),S=Lu(x);let C=v[S],P=v[x];const k=jn(m,l),E=typeof k=="number"?{mainAxis:k,crossAxis:0}:{mainAxis:0,crossAxis:0,...k};if(h){const $=S==="y"?"height":"width",N=c.reference[S]-c.floating[$]+E.mainAxis,F=c.reference[S]+c.reference[$]-E.mainAxis;C<N?C=N:C>F&&(C=F)}if(y){var A,D;const $=S==="y"?"width":"height",N=xm.has(Rn(u)),F=c.reference[x]-c.floating[$]+(N&&((A=p.offset)==null?void 0:A[x])||0)+(N?0:E.crossAxis),V=c.reference[x]+c.reference[$]+(N?0:((D=p.offset)==null?void 0:D[x])||0)-(N?E.crossAxis:0);P<F?P=F:P>V&&(P=V)}return{[S]:C,[x]:P}}}},Tx=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(l){var o,s;const{placement:u,rects:c,platform:p,elements:m}=l,{apply:h=()=>{},...y}=jn(n,l),v=await sl(l,y),x=Rn(u),S=uo(u),C=an(u)==="y",{width:P,height:k}=c.floating;let E,A;x==="top"||x==="bottom"?(E=x,A=S===(await(p.isRTL==null?void 0:p.isRTL(m.floating))?"start":"end")?"left":"right"):(A=x,E=S==="end"?"top":"bottom");const D=k-v.top-v.bottom,$=P-v.left-v.right,N=tr(k-v[E],D),F=tr(P-v[A],$),V=!l.middlewareData.shift;let L=N,R=F;if((o=l.middlewareData.shift)!=null&&o.enabled.x&&(R=$),(s=l.middlewareData.shift)!=null&&s.enabled.y&&(L=D),V&&!S){const Q=Rt(v.left,0),ee=Rt(v.right,0),ce=Rt(v.top,0),U=Rt(v.bottom,0);C?R=P-2*(Q!==0||ee!==0?Q+ee:Rt(v.left,v.right)):L=k-2*(ce!==0||U!==0?ce+U:Rt(v.top,v.bottom))}await h({...l,availableWidth:R,availableHeight:L});const W=await p.getDimensions(m.floating);return P!==W.width||k!==W.height?{reset:{rects:!0}}:{}}}};function ls(){return typeof window<"u"}function co(n){return wm(n)?(n.nodeName||"").toLowerCase():"#document"}function Pt(n){var l;return(n==null||(l=n.ownerDocument)==null?void 0:l.defaultView)||window}function mn(n){var l;return(l=(wm(n)?n.ownerDocument:n.document)||window.document)==null?void 0:l.documentElement}function wm(n){return ls()?n instanceof Node||n instanceof Pt(n).Node:!1}function Kt(n){return ls()?n instanceof Element||n instanceof Pt(n).Element:!1}function dn(n){return ls()?n instanceof HTMLElement||n instanceof Pt(n).HTMLElement:!1}function ap(n){return!ls()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Pt(n).ShadowRoot}const Px=new Set(["inline","contents"]);function dl(n){const{overflow:l,overflowX:o,overflowY:s,display:u}=qt(n);return/auto|scroll|overlay|hidden|clip/.test(l+s+o)&&!Px.has(u)}const _x=new Set(["table","td","th"]);function Ax(n){return _x.has(co(n))}const Ox=[":popover-open",":modal"];function is(n){return Ox.some(l=>{try{return n.matches(l)}catch{return!1}})}const Mx=["transform","translate","scale","rotate","perspective"],Dx=["transform","translate","scale","rotate","perspective","filter"],Lx=["paint","layout","strict","content"];function $u(n){const l=Fu(),o=Kt(n)?qt(n):n;return Mx.some(s=>o[s]?o[s]!=="none":!1)||(o.containerType?o.containerType!=="normal":!1)||!l&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!l&&(o.filter?o.filter!=="none":!1)||Dx.some(s=>(o.willChange||"").includes(s))||Lx.some(s=>(o.contain||"").includes(s))}function zx(n){let l=nr(n);for(;dn(l)&&!so(l);){if($u(l))return l;if(is(l))return null;l=nr(l)}return null}function Fu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ix=new Set(["html","body","#document"]);function so(n){return Ix.has(co(n))}function qt(n){return Pt(n).getComputedStyle(n)}function ss(n){return Kt(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function nr(n){if(co(n)==="html")return n;const l=n.assignedSlot||n.parentNode||ap(n)&&n.host||mn(n);return ap(l)?l.host:l}function Sm(n){const l=nr(n);return so(l)?n.ownerDocument?n.ownerDocument.body:n.body:dn(l)&&dl(l)?l:Sm(l)}function al(n,l,o){var s;l===void 0&&(l=[]),o===void 0&&(o=!0);const u=Sm(n),c=u===((s=n.ownerDocument)==null?void 0:s.body),p=Pt(u);if(c){const m=wu(p);return l.concat(p,p.visualViewport||[],dl(u)?u:[],m&&o?al(m):[])}return l.concat(u,al(u,[],o))}function wu(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function bm(n){const l=qt(n);let o=parseFloat(l.width)||0,s=parseFloat(l.height)||0;const u=dn(n),c=u?n.offsetWidth:o,p=u?n.offsetHeight:s,m=Gi(o)!==c||Gi(s)!==p;return m&&(o=c,s=p),{width:o,height:s,$:m}}function Wu(n){return Kt(n)?n:n.contextElement}function eo(n){const l=Wu(n);if(!dn(l))return un(1);const o=l.getBoundingClientRect(),{width:s,height:u,$:c}=bm(l);let p=(c?Gi(o.width):o.width)/s,m=(c?Gi(o.height):o.height)/u;return(!p||!Number.isFinite(p))&&(p=1),(!m||!Number.isFinite(m))&&(m=1),{x:p,y:m}}const $x=un(0);function Cm(n){const l=Pt(n);return!Fu()||!l.visualViewport?$x:{x:l.visualViewport.offsetLeft,y:l.visualViewport.offsetTop}}function Fx(n,l,o){return l===void 0&&(l=!1),!o||l&&o!==Pt(n)?!1:l}function Er(n,l,o,s){l===void 0&&(l=!1),o===void 0&&(o=!1);const u=n.getBoundingClientRect(),c=Wu(n);let p=un(1);l&&(s?Kt(s)&&(p=eo(s)):p=eo(n));const m=Fx(c,o,s)?Cm(c):un(0);let h=(u.left+m.x)/p.x,y=(u.top+m.y)/p.y,v=u.width/p.x,x=u.height/p.y;if(c){const S=Pt(c),C=s&&Kt(s)?Pt(s):s;let P=S,k=wu(P);for(;k&&s&&C!==P;){const E=eo(k),A=k.getBoundingClientRect(),D=qt(k),$=A.left+(k.clientLeft+parseFloat(D.paddingLeft))*E.x,N=A.top+(k.clientTop+parseFloat(D.paddingTop))*E.y;h*=E.x,y*=E.y,v*=E.x,x*=E.y,h+=$,y+=N,P=Pt(k),k=wu(P)}}return qi({width:v,height:x,x:h,y})}function as(n,l){const o=ss(n).scrollLeft;return l?l.left+o:Er(mn(n)).left+o}function km(n,l){const o=n.getBoundingClientRect(),s=o.left+l.scrollLeft-as(n,o),u=o.top+l.scrollTop;return{x:s,y:u}}function Wx(n){let{elements:l,rect:o,offsetParent:s,strategy:u}=n;const c=u==="fixed",p=mn(s),m=l?is(l.floating):!1;if(s===p||m&&c)return o;let h={scrollLeft:0,scrollTop:0},y=un(1);const v=un(0),x=dn(s);if((x||!x&&!c)&&((co(s)!=="body"||dl(p))&&(h=ss(s)),dn(s))){const C=Er(s);y=eo(s),v.x=C.x+s.clientLeft,v.y=C.y+s.clientTop}const S=p&&!x&&!c?km(p,h):un(0);return{width:o.width*y.x,height:o.height*y.y,x:o.x*y.x-h.scrollLeft*y.x+v.x+S.x,y:o.y*y.y-h.scrollTop*y.y+v.y+S.y}}function Bx(n){return Array.from(n.getClientRects())}function Hx(n){const l=mn(n),o=ss(n),s=n.ownerDocument.body,u=Rt(l.scrollWidth,l.clientWidth,s.scrollWidth,s.clientWidth),c=Rt(l.scrollHeight,l.clientHeight,s.scrollHeight,s.clientHeight);let p=-o.scrollLeft+as(n);const m=-o.scrollTop;return qt(s).direction==="rtl"&&(p+=Rt(l.clientWidth,s.clientWidth)-u),{width:u,height:c,x:p,y:m}}const up=25;function Vx(n,l){const o=Pt(n),s=mn(n),u=o.visualViewport;let c=s.clientWidth,p=s.clientHeight,m=0,h=0;if(u){c=u.width,p=u.height;const v=Fu();(!v||v&&l==="fixed")&&(m=u.offsetLeft,h=u.offsetTop)}const y=as(s);if(y<=0){const v=s.ownerDocument,x=v.body,S=getComputedStyle(x),C=v.compatMode==="CSS1Compat"&&parseFloat(S.marginLeft)+parseFloat(S.marginRight)||0,P=Math.abs(s.clientWidth-x.clientWidth-C);P<=up&&(c-=P)}else y<=up&&(c+=y);return{width:c,height:p,x:m,y:h}}const Ux=new Set(["absolute","fixed"]);function Yx(n,l){const o=Er(n,!0,l==="fixed"),s=o.top+n.clientTop,u=o.left+n.clientLeft,c=dn(n)?eo(n):un(1),p=n.clientWidth*c.x,m=n.clientHeight*c.y,h=u*c.x,y=s*c.y;return{width:p,height:m,x:h,y}}function cp(n,l,o){let s;if(l==="viewport")s=Vx(n,o);else if(l==="document")s=Hx(mn(n));else if(Kt(l))s=Yx(l,o);else{const u=Cm(n);s={x:l.x-u.x,y:l.y-u.y,width:l.width,height:l.height}}return qi(s)}function Em(n,l){const o=nr(n);return o===l||!Kt(o)||so(o)?!1:qt(o).position==="fixed"||Em(o,l)}function Xx(n,l){const o=l.get(n);if(o)return o;let s=al(n,[],!1).filter(m=>Kt(m)&&co(m)!=="body"),u=null;const c=qt(n).position==="fixed";let p=c?nr(n):n;for(;Kt(p)&&!so(p);){const m=qt(p),h=$u(p);!h&&m.position==="fixed"&&(u=null),(c?!h&&!u:!h&&m.position==="static"&&!!u&&Ux.has(u.position)||dl(p)&&!h&&Em(n,p))?s=s.filter(v=>v!==p):u=m,p=nr(p)}return l.set(n,s),s}function Qx(n){let{element:l,boundary:o,rootBoundary:s,strategy:u}=n;const p=[...o==="clippingAncestors"?is(l)?[]:Xx(l,this._c):[].concat(o),s],m=p[0],h=p.reduce((y,v)=>{const x=cp(l,v,u);return y.top=Rt(x.top,y.top),y.right=tr(x.right,y.right),y.bottom=tr(x.bottom,y.bottom),y.left=Rt(x.left,y.left),y},cp(l,m,u));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}}function Gx(n){const{width:l,height:o}=bm(n);return{width:l,height:o}}function Kx(n,l,o){const s=dn(l),u=mn(l),c=o==="fixed",p=Er(n,!0,c,l);let m={scrollLeft:0,scrollTop:0};const h=un(0);function y(){h.x=as(u)}if(s||!s&&!c)if((co(l)!=="body"||dl(u))&&(m=ss(l)),s){const C=Er(l,!0,c,l);h.x=C.x+l.clientLeft,h.y=C.y+l.clientTop}else u&&y();c&&!s&&u&&y();const v=u&&!s&&!c?km(u,m):un(0),x=p.left+m.scrollLeft-h.x-v.x,S=p.top+m.scrollTop-h.y-v.y;return{x,y:S,width:p.width,height:p.height}}function nu(n){return qt(n).position==="static"}function dp(n,l){if(!dn(n)||qt(n).position==="fixed")return null;if(l)return l(n);let o=n.offsetParent;return mn(n)===o&&(o=o.ownerDocument.body),o}function Nm(n,l){const o=Pt(n);if(is(n))return o;if(!dn(n)){let u=nr(n);for(;u&&!so(u);){if(Kt(u)&&!nu(u))return u;u=nr(u)}return o}let s=dp(n,l);for(;s&&Ax(s)&&nu(s);)s=dp(s,l);return s&&so(s)&&nu(s)&&!$u(s)?o:s||zx(n)||o}const qx=async function(n){const l=this.getOffsetParent||Nm,o=this.getDimensions,s=await o(n.floating);return{reference:Kx(n.reference,await l(n.floating),n.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function Zx(n){return qt(n).direction==="rtl"}const Jx={convertOffsetParentRelativeRectToViewportRelativeRect:Wx,getDocumentElement:mn,getClippingRect:Qx,getOffsetParent:Nm,getElementRects:qx,getClientRects:Bx,getDimensions:Gx,getScale:eo,isElement:Kt,isRTL:Zx};function jm(n,l){return n.x===l.x&&n.y===l.y&&n.width===l.width&&n.height===l.height}function ew(n,l){let o=null,s;const u=mn(n);function c(){var m;clearTimeout(s),(m=o)==null||m.disconnect(),o=null}function p(m,h){m===void 0&&(m=!1),h===void 0&&(h=1),c();const y=n.getBoundingClientRect(),{left:v,top:x,width:S,height:C}=y;if(m||l(),!S||!C)return;const P=Ti(x),k=Ti(u.clientWidth-(v+S)),E=Ti(u.clientHeight-(x+C)),A=Ti(v),$={rootMargin:-P+"px "+-k+"px "+-E+"px "+-A+"px",threshold:Rt(0,tr(1,h))||1};let N=!0;function F(V){const L=V[0].intersectionRatio;if(L!==h){if(!N)return p();L?p(!1,L):s=setTimeout(()=>{p(!1,1e-7)},1e3)}L===1&&!jm(y,n.getBoundingClientRect())&&p(),N=!1}try{o=new IntersectionObserver(F,{...$,root:u.ownerDocument})}catch{o=new IntersectionObserver(F,$)}o.observe(n)}return p(!0),c}function tw(n,l,o,s){s===void 0&&(s={});const{ancestorScroll:u=!0,ancestorResize:c=!0,elementResize:p=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:h=!1}=s,y=Wu(n),v=u||c?[...y?al(y):[],...al(l)]:[];v.forEach(A=>{u&&A.addEventListener("scroll",o,{passive:!0}),c&&A.addEventListener("resize",o)});const x=y&&m?ew(y,o):null;let S=-1,C=null;p&&(C=new ResizeObserver(A=>{let[D]=A;D&&D.target===y&&C&&(C.unobserve(l),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{var $;($=C)==null||$.observe(l)})),o()}),y&&!h&&C.observe(y),C.observe(l));let P,k=h?Er(n):null;h&&E();function E(){const A=Er(n);k&&!jm(k,A)&&o(),k=A,P=requestAnimationFrame(E)}return o(),()=>{var A;v.forEach(D=>{u&&D.removeEventListener("scroll",o),c&&D.removeEventListener("resize",o)}),x==null||x(),(A=C)==null||A.disconnect(),C=null,h&&cancelAnimationFrame(P)}}const nw=Nx,rw=jx,ow=Cx,lw=Tx,iw=kx,fp=bx,sw=Rx,aw=(n,l,o)=>{const s=new Map,u={platform:Jx,...o},c={...u.platform,_c:s};return Sx(n,l,{...u,platform:c})};var uw=typeof document<"u",cw=function(){},zi=uw?w.useLayoutEffect:cw;function Zi(n,l){if(n===l)return!0;if(typeof n!=typeof l)return!1;if(typeof n=="function"&&n.toString()===l.toString())return!0;let o,s,u;if(n&&l&&typeof n=="object"){if(Array.isArray(n)){if(o=n.length,o!==l.length)return!1;for(s=o;s--!==0;)if(!Zi(n[s],l[s]))return!1;return!0}if(u=Object.keys(n),o=u.length,o!==Object.keys(l).length)return!1;for(s=o;s--!==0;)if(!{}.hasOwnProperty.call(l,u[s]))return!1;for(s=o;s--!==0;){const c=u[s];if(!(c==="_owner"&&n.$$typeof)&&!Zi(n[c],l[c]))return!1}return!0}return n!==n&&l!==l}function Rm(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function pp(n,l){const o=Rm(n);return Math.round(l*o)/o}function ru(n){const l=w.useRef(n);return zi(()=>{l.current=n}),l}function dw(n){n===void 0&&(n={});const{placement:l="bottom",strategy:o="absolute",middleware:s=[],platform:u,elements:{reference:c,floating:p}={},transform:m=!0,whileElementsMounted:h,open:y}=n,[v,x]=w.useState({x:0,y:0,strategy:o,placement:l,middlewareData:{},isPositioned:!1}),[S,C]=w.useState(s);Zi(S,s)||C(s);const[P,k]=w.useState(null),[E,A]=w.useState(null),D=w.useCallback(B=>{B!==V.current&&(V.current=B,k(B))},[]),$=w.useCallback(B=>{B!==L.current&&(L.current=B,A(B))},[]),N=c||P,F=p||E,V=w.useRef(null),L=w.useRef(null),R=w.useRef(v),W=h!=null,Q=ru(h),ee=ru(u),ce=ru(y),U=w.useCallback(()=>{if(!V.current||!L.current)return;const B={placement:l,strategy:o,middleware:S};ee.current&&(B.platform=ee.current),aw(V.current,L.current,B).then(K=>{const I={...K,isPositioned:ce.current!==!1};q.current&&!Zi(R.current,I)&&(R.current=I,_u.flushSync(()=>{x(I)}))})},[S,l,o,ee,ce]);zi(()=>{y===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,x(B=>({...B,isPositioned:!1})))},[y]);const q=w.useRef(!1);zi(()=>(q.current=!0,()=>{q.current=!1}),[]),zi(()=>{if(N&&(V.current=N),F&&(L.current=F),N&&F){if(Q.current)return Q.current(N,F,U);U()}},[N,F,U,Q,W]);const te=w.useMemo(()=>({reference:V,floating:L,setReference:D,setFloating:$}),[D,$]),J=w.useMemo(()=>({reference:N,floating:F}),[N,F]),ne=w.useMemo(()=>{const B={position:o,left:0,top:0};if(!J.floating)return B;const K=pp(J.floating,v.x),I=pp(J.floating,v.y);return m?{...B,transform:"translate("+K+"px, "+I+"px)",...Rm(J.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:K,top:I}},[o,m,J.floating,v.x,v.y]);return w.useMemo(()=>({...v,update:U,refs:te,elements:J,floatingStyles:ne}),[v,U,te,J,ne])}const fw=n=>{function l(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:n,fn(o){const{element:s,padding:u}=typeof n=="function"?n(o):n;return s&&l(s)?s.current!=null?fp({element:s.current,padding:u}).fn(o):{}:s?fp({element:s,padding:u}).fn(o):{}}}},pw=(n,l)=>({...nw(n),options:[n,l]}),mw=(n,l)=>({...rw(n),options:[n,l]}),hw=(n,l)=>({...sw(n),options:[n,l]}),gw=(n,l)=>({...ow(n),options:[n,l]}),vw=(n,l)=>({...lw(n),options:[n,l]}),yw=(n,l)=>({...iw(n),options:[n,l]}),xw=(n,l)=>({...fw(n),options:[n,l]});var ww="Arrow",Tm=w.forwardRef((n,l)=>{const{children:o,width:s=10,height:u=5,...c}=n;return f.jsx(He.svg,{...c,ref:l,width:s,height:u,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?o:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});Tm.displayName=ww;var Sw=Tm;function bw(n){const[l,o]=w.useState(void 0);return cn(()=>{if(n){o({width:n.offsetWidth,height:n.offsetHeight});const s=new ResizeObserver(u=>{if(!Array.isArray(u)||!u.length)return;const c=u[0];let p,m;if("borderBoxSize"in c){const h=c.borderBoxSize,y=Array.isArray(h)?h[0]:h;p=y.inlineSize,m=y.blockSize}else p=n.offsetWidth,m=n.offsetHeight;o({width:p,height:m})});return s.observe(n,{box:"border-box"}),()=>s.unobserve(n)}else o(void 0)},[n]),l}var Bu="Popper",[Pm,_m]=cl(Bu),[Cw,Am]=Pm(Bu),Om=n=>{const{__scopePopper:l,children:o}=n,[s,u]=w.useState(null);return f.jsx(Cw,{scope:l,anchor:s,onAnchorChange:u,children:o})};Om.displayName=Bu;var Mm="PopperAnchor",Dm=w.forwardRef((n,l)=>{const{__scopePopper:o,virtualRef:s,...u}=n,c=Am(Mm,o),p=w.useRef(null),m=rt(l,p),h=w.useRef(null);return w.useEffect(()=>{const y=h.current;h.current=(s==null?void 0:s.current)||p.current,y!==h.current&&c.onAnchorChange(h.current)}),s?null:f.jsx(He.div,{...u,ref:m})});Dm.displayName=Mm;var Hu="PopperContent",[kw,Ew]=Pm(Hu),Lm=w.forwardRef((n,l)=>{var Ce,be,xe,ze,Qe,Ct;const{__scopePopper:o,side:s="bottom",sideOffset:u=0,align:c="center",alignOffset:p=0,arrowPadding:m=0,avoidCollisions:h=!0,collisionBoundary:y=[],collisionPadding:v=0,sticky:x="partial",hideWhenDetached:S=!1,updatePositionStrategy:C="optimized",onPlaced:P,...k}=n,E=Am(Hu,o),[A,D]=w.useState(null),$=rt(l,ot=>D(ot)),[N,F]=w.useState(null),V=bw(N),L=(V==null?void 0:V.width)??0,R=(V==null?void 0:V.height)??0,W=s+(c!=="center"?"-"+c:""),Q=typeof v=="number"?v:{top:0,right:0,bottom:0,left:0,...v},ee=Array.isArray(y)?y:[y],ce=ee.length>0,U={padding:Q,boundary:ee.filter(jw),altBoundary:ce},{refs:q,floatingStyles:te,placement:J,isPositioned:ne,middlewareData:B}=dw({strategy:"fixed",placement:W,whileElementsMounted:(...ot)=>tw(...ot,{animationFrame:C==="always"}),elements:{reference:E.anchor},middleware:[pw({mainAxis:u+R,alignmentAxis:p}),h&&mw({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?hw():void 0,...U}),h&&gw({...U}),vw({...U,apply:({elements:ot,rects:he,availableWidth:ir,availableHeight:sr})=>{const{width:hn,height:Rr}=he.reference,en=ot.floating.style;en.setProperty("--radix-popper-available-width",`${ir}px`),en.setProperty("--radix-popper-available-height",`${sr}px`),en.setProperty("--radix-popper-anchor-width",`${hn}px`),en.setProperty("--radix-popper-anchor-height",`${Rr}px`)}}),N&&xw({element:N,padding:m}),Rw({arrowWidth:L,arrowHeight:R}),S&&yw({strategy:"referenceHidden",...U})]}),[K,I]=$m(J),_=Tt(P);cn(()=>{ne&&(_==null||_())},[ne,_]);const H=(Ce=B.arrow)==null?void 0:Ce.x,fe=(be=B.arrow)==null?void 0:be.y,we=((xe=B.arrow)==null?void 0:xe.centerOffset)!==0,[pe,me]=w.useState();return cn(()=>{A&&me(window.getComputedStyle(A).zIndex)},[A]),f.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...te,transform:ne?te.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:pe,"--radix-popper-transform-origin":[(ze=B.transformOrigin)==null?void 0:ze.x,(Qe=B.transformOrigin)==null?void 0:Qe.y].join(" "),...((Ct=B.hide)==null?void 0:Ct.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:f.jsx(kw,{scope:o,placedSide:K,onArrowChange:F,arrowX:H,arrowY:fe,shouldHideArrow:we,children:f.jsx(He.div,{"data-side":K,"data-align":I,...k,ref:$,style:{...k.style,animation:ne?void 0:"none"}})})})});Lm.displayName=Hu;var zm="PopperArrow",Nw={top:"bottom",right:"left",bottom:"top",left:"right"},Im=w.forwardRef(function(l,o){const{__scopePopper:s,...u}=l,c=Ew(zm,s),p=Nw[c.placedSide];return f.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[p]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:f.jsx(Sw,{...u,ref:o,style:{...u.style,display:"block"}})})});Im.displayName=zm;function jw(n){return n!==null}var Rw=n=>({name:"transformOrigin",options:n,fn(l){var E,A,D;const{placement:o,rects:s,middlewareData:u}=l,p=((E=u.arrow)==null?void 0:E.centerOffset)!==0,m=p?0:n.arrowWidth,h=p?0:n.arrowHeight,[y,v]=$m(o),x={start:"0%",center:"50%",end:"100%"}[v],S=(((A=u.arrow)==null?void 0:A.x)??0)+m/2,C=(((D=u.arrow)==null?void 0:D.y)??0)+h/2;let P="",k="";return y==="bottom"?(P=p?x:`${S}px`,k=`${-h}px`):y==="top"?(P=p?x:`${S}px`,k=`${s.floating.height+h}px`):y==="right"?(P=`${-h}px`,k=p?x:`${C}px`):y==="left"&&(P=`${s.floating.width+h}px`,k=p?x:`${C}px`),{data:{x:P,y:k}}}});function $m(n){const[l,o="center"]=n.split("-");return[l,o]}var Tw=Om,Pw=Dm,_w=Lm,Aw=Im,Ow="Portal",Vu=w.forwardRef((n,l)=>{var m;const{container:o,...s}=n,[u,c]=w.useState(!1);cn(()=>c(!0),[]);const p=o||u&&((m=globalThis==null?void 0:globalThis.document)==null?void 0:m.body);return p?Cy.createPortal(f.jsx(He.div,{...s,ref:l}),p):null});Vu.displayName=Ow;var Mw=ju[" useInsertionEffect ".trim().toString()]||cn;function Uu({prop:n,defaultProp:l,onChange:o=()=>{},caller:s}){const[u,c,p]=Dw({defaultProp:l,onChange:o}),m=n!==void 0,h=m?n:u;{const v=w.useRef(n!==void 0);w.useEffect(()=>{const x=v.current;x!==m&&console.warn(`${s} is changing from ${x?"controlled":"uncontrolled"} to ${m?"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.`),v.current=m},[m,s])}const y=w.useCallback(v=>{var x;if(m){const S=Lw(v)?v(n):v;S!==n&&((x=p.current)==null||x.call(p,S))}else c(v)},[m,n,c,p]);return[h,y]}function Dw({defaultProp:n,onChange:l}){const[o,s]=w.useState(n),u=w.useRef(o),c=w.useRef(l);return Mw(()=>{c.current=l},[l]),w.useEffect(()=>{var p;u.current!==o&&((p=c.current)==null||p.call(c,o),u.current=o)},[o,u]),[o,s,c]}function Lw(n){return typeof n=="function"}var zw=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Iw="VisuallyHidden",Fm=w.forwardRef((n,l)=>f.jsx(He.span,{...n,ref:l,style:{...zw,...n.style}}));Fm.displayName=Iw;var $w=Fm,[us,jb]=cl("Tooltip",[_m]),cs=_m(),Wm="TooltipProvider",Fw=700,Su="tooltip.open",[Ww,Yu]=us(Wm),Bm=n=>{const{__scopeTooltip:l,delayDuration:o=Fw,skipDelayDuration:s=300,disableHoverableContent:u=!1,children:c}=n,p=w.useRef(!0),m=w.useRef(!1),h=w.useRef(0);return w.useEffect(()=>{const y=h.current;return()=>window.clearTimeout(y)},[]),f.jsx(Ww,{scope:l,isOpenDelayedRef:p,delayDuration:o,onOpen:w.useCallback(()=>{window.clearTimeout(h.current),p.current=!1},[]),onClose:w.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>p.current=!0,s)},[s]),isPointerInTransitRef:m,onPointerInTransitChange:w.useCallback(y=>{m.current=y},[]),disableHoverableContent:u,children:c})};Bm.displayName=Wm;var ul="Tooltip",[Bw,fl]=us(ul),Hm=n=>{const{__scopeTooltip:l,children:o,open:s,defaultOpen:u,onOpenChange:c,disableHoverableContent:p,delayDuration:m}=n,h=Yu(ul,n.__scopeTooltip),y=cs(l),[v,x]=w.useState(null),S=ol(),C=w.useRef(0),P=p??h.disableHoverableContent,k=m??h.delayDuration,E=w.useRef(!1),[A,D]=Uu({prop:s,defaultProp:u??!1,onChange:L=>{L?(h.onOpen(),document.dispatchEvent(new CustomEvent(Su))):h.onClose(),c==null||c(L)},caller:ul}),$=w.useMemo(()=>A?E.current?"delayed-open":"instant-open":"closed",[A]),N=w.useCallback(()=>{window.clearTimeout(C.current),C.current=0,E.current=!1,D(!0)},[D]),F=w.useCallback(()=>{window.clearTimeout(C.current),C.current=0,D(!1)},[D]),V=w.useCallback(()=>{window.clearTimeout(C.current),C.current=window.setTimeout(()=>{E.current=!0,D(!0),C.current=0},k)},[k,D]);return w.useEffect(()=>()=>{C.current&&(window.clearTimeout(C.current),C.current=0)},[]),f.jsx(Tw,{...y,children:f.jsx(Bw,{scope:l,contentId:S,open:A,stateAttribute:$,trigger:v,onTriggerChange:x,onTriggerEnter:w.useCallback(()=>{h.isOpenDelayedRef.current?V():N()},[h.isOpenDelayedRef,V,N]),onTriggerLeave:w.useCallback(()=>{P?F():(window.clearTimeout(C.current),C.current=0)},[F,P]),onOpen:N,onClose:F,disableHoverableContent:P,children:o})})};Hm.displayName=ul;var bu="TooltipTrigger",Vm=w.forwardRef((n,l)=>{const{__scopeTooltip:o,...s}=n,u=fl(bu,o),c=Yu(bu,o),p=cs(o),m=w.useRef(null),h=rt(l,m,u.onTriggerChange),y=w.useRef(!1),v=w.useRef(!1),x=w.useCallback(()=>y.current=!1,[]);return w.useEffect(()=>()=>document.removeEventListener("pointerup",x),[x]),f.jsx(Pw,{asChild:!0,...p,children:f.jsx(He.button,{"aria-describedby":u.open?u.contentId:void 0,"data-state":u.stateAttribute,...s,ref:h,onPointerMove:Be(n.onPointerMove,S=>{S.pointerType!=="touch"&&!v.current&&!c.isPointerInTransitRef.current&&(u.onTriggerEnter(),v.current=!0)}),onPointerLeave:Be(n.onPointerLeave,()=>{u.onTriggerLeave(),v.current=!1}),onPointerDown:Be(n.onPointerDown,()=>{u.open&&u.onClose(),y.current=!0,document.addEventListener("pointerup",x,{once:!0})}),onFocus:Be(n.onFocus,()=>{y.current||u.onOpen()}),onBlur:Be(n.onBlur,u.onClose),onClick:Be(n.onClick,u.onClose)})})});Vm.displayName=bu;var Xu="TooltipPortal",[Hw,Vw]=us(Xu,{forceMount:void 0}),Um=n=>{const{__scopeTooltip:l,forceMount:o,children:s,container:u}=n,c=fl(Xu,l);return f.jsx(Hw,{scope:l,forceMount:o,children:f.jsx(Zt,{present:o||c.open,children:f.jsx(Vu,{asChild:!0,container:u,children:s})})})};Um.displayName=Xu;var ao="TooltipContent",Ym=w.forwardRef((n,l)=>{const o=Vw(ao,n.__scopeTooltip),{forceMount:s=o.forceMount,side:u="top",...c}=n,p=fl(ao,n.__scopeTooltip);return f.jsx(Zt,{present:s||p.open,children:p.disableHoverableContent?f.jsx(Xm,{side:u,...c,ref:l}):f.jsx(Uw,{side:u,...c,ref:l})})}),Uw=w.forwardRef((n,l)=>{const o=fl(ao,n.__scopeTooltip),s=Yu(ao,n.__scopeTooltip),u=w.useRef(null),c=rt(l,u),[p,m]=w.useState(null),{trigger:h,onClose:y}=o,v=u.current,{onPointerInTransitChange:x}=s,S=w.useCallback(()=>{m(null),x(!1)},[x]),C=w.useCallback((P,k)=>{const E=P.currentTarget,A={x:P.clientX,y:P.clientY},D=Kw(A,E.getBoundingClientRect()),$=qw(A,D),N=Zw(k.getBoundingClientRect()),F=e1([...$,...N]);m(F),x(!0)},[x]);return w.useEffect(()=>()=>S(),[S]),w.useEffect(()=>{if(h&&v){const P=E=>C(E,v),k=E=>C(E,h);return h.addEventListener("pointerleave",P),v.addEventListener("pointerleave",k),()=>{h.removeEventListener("pointerleave",P),v.removeEventListener("pointerleave",k)}}},[h,v,C,S]),w.useEffect(()=>{if(p){const P=k=>{const E=k.target,A={x:k.clientX,y:k.clientY},D=(h==null?void 0:h.contains(E))||(v==null?void 0:v.contains(E)),$=!Jw(A,p);D?S():$&&(S(),y())};return document.addEventListener("pointermove",P),()=>document.removeEventListener("pointermove",P)}},[h,v,p,y,S]),f.jsx(Xm,{...n,ref:c})}),[Yw,Xw]=us(ul,{isInside:!1}),Qw=Ey("TooltipContent"),Xm=w.forwardRef((n,l)=>{const{__scopeTooltip:o,children:s,"aria-label":u,onEscapeKeyDown:c,onPointerDownOutside:p,...m}=n,h=fl(ao,o),y=cs(o),{onClose:v}=h;return w.useEffect(()=>(document.addEventListener(Su,v),()=>document.removeEventListener(Su,v)),[v]),w.useEffect(()=>{if(h.trigger){const x=S=>{const C=S.target;C!=null&&C.contains(h.trigger)&&v()};return window.addEventListener("scroll",x,{capture:!0}),()=>window.removeEventListener("scroll",x,{capture:!0})}},[h.trigger,v]),f.jsx(Du,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:c,onPointerDownOutside:p,onFocusOutside:x=>x.preventDefault(),onDismiss:v,children:f.jsxs(_w,{"data-state":h.stateAttribute,...y,...m,ref:l,style:{...m.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[f.jsx(Qw,{children:s}),f.jsx(Yw,{scope:o,isInside:!0,children:f.jsx($w,{id:h.contentId,role:"tooltip",children:u||s})})]})})});Ym.displayName=ao;var Qm="TooltipArrow",Gw=w.forwardRef((n,l)=>{const{__scopeTooltip:o,...s}=n,u=cs(o);return Xw(Qm,o).isInside?null:f.jsx(Aw,{...u,...s,ref:l})});Gw.displayName=Qm;function Kw(n,l){const o=Math.abs(l.top-n.y),s=Math.abs(l.bottom-n.y),u=Math.abs(l.right-n.x),c=Math.abs(l.left-n.x);switch(Math.min(o,s,u,c)){case c:return"left";case u:return"right";case o:return"top";case s:return"bottom";default:throw new Error("unreachable")}}function qw(n,l,o=5){const s=[];switch(l){case"top":s.push({x:n.x-o,y:n.y+o},{x:n.x+o,y:n.y+o});break;case"bottom":s.push({x:n.x-o,y:n.y-o},{x:n.x+o,y:n.y-o});break;case"left":s.push({x:n.x+o,y:n.y-o},{x:n.x+o,y:n.y+o});break;case"right":s.push({x:n.x-o,y:n.y-o},{x:n.x-o,y:n.y+o});break}return s}function Zw(n){const{top:l,right:o,bottom:s,left:u}=n;return[{x:u,y:l},{x:o,y:l},{x:o,y:s},{x:u,y:s}]}function Jw(n,l){const{x:o,y:s}=n;let u=!1;for(let c=0,p=l.length-1;c<l.length;p=c++){const m=l[c],h=l[p],y=m.x,v=m.y,x=h.x,S=h.y;v>s!=S>s&&o<(x-y)*(s-v)/(S-v)+y&&(u=!u)}return u}function e1(n){const l=n.slice();return l.sort((o,s)=>o.x<s.x?-1:o.x>s.x?1:o.y<s.y?-1:o.y>s.y?1:0),t1(l)}function t1(n){if(n.length<=1)return n.slice();const l=[];for(let s=0;s<n.length;s++){const u=n[s];for(;l.length>=2;){const c=l[l.length-1],p=l[l.length-2];if((c.x-p.x)*(u.y-p.y)>=(c.y-p.y)*(u.x-p.x))l.pop();else break}l.push(u)}l.pop();const o=[];for(let s=n.length-1;s>=0;s--){const u=n[s];for(;o.length>=2;){const c=o[o.length-1],p=o[o.length-2];if((c.x-p.x)*(u.y-p.y)>=(c.y-p.y)*(u.x-p.x))o.pop();else break}o.push(u)}return o.pop(),l.length===1&&o.length===1&&l[0].x===o[0].x&&l[0].y===o[0].y?l:l.concat(o)}var n1=Bm,r1=Hm,o1=Vm,l1=Um,i1=Ym;function s1({delayDuration:n=0,...l}){return f.jsx(n1,{"data-slot":"tooltip-provider",delayDuration:n,...l})}function to({...n}){return f.jsx(s1,{children:f.jsx(r1,{"data-slot":"tooltip",...n})})}function no({...n}){return f.jsx(o1,{"data-slot":"tooltip-trigger",...n})}function ro({className:n,sideOffset:l=4,children:o,...s}){return f.jsx(l1,{children:f.jsx(i1,{"data-slot":"tooltip-content",sideOffset:l,className:fn("bg-background text-foreground border border-border animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",n),...s,children:o})})}function a1(n){const l=n.reduce((c,p)=>(c[p.toolName]=(c[p.toolName]||0)+1,c),{}),o=Object.keys(l),s=c=>{const p=l[c]??0;return p>1?`${c} (x${p})`:c},u=o.map(s);return o.length===1&&o[0]?{label:s(o[0]),details:""}:o.length===2?{label:`${s(o[0])}, ${s(o[1])}`,details:u.join(", ")}:{label:`${s(o[0])}, ${s(o[1])}, ...`,details:u.join(", ")}}function mp(n,l=30){return n.length<=l?n:n.slice(0,l).trim()+"…"}function hp(n){const{content:l}=n;if(typeof l=="string")return l;if(Array.isArray(l)){const o=l.find(s=>s.type==="text");return(o==null?void 0:o.text)??null}return null}function u1(n,l){const o=n==null?void 0:n.prompt;if(!Array.isArray(o))return null;if(l){const m=o.filter(y=>y.role==="user"),h=m[m.length-1];if(h){const y=hp(h);if(y)return{type:"user",label:`"${mp(y)}"`,fullText:y}}return null}const s=o.filter(m=>m.role==="tool");if(s.length>0){const m=s[s.length-1],h={},y=m==null?void 0:m.content;if(Array.isArray(y))for(const C of y)C.type==="tool-result"&&"toolName"in C&&C.toolName&&(h[C.toolName]=(h[C.toolName]||0)+1);const v=Object.keys(h);if(v.length===0)return{type:"tool",label:"tool result"};const x=C=>{const P=h[C];return P!=null&&P>1?`${C} (x${P})`:C},S=v.map(x);return v.length===1?{type:"tool",label:x(v[0])}:v.length===2?{type:"tool",label:`${x(v[0])}, ${x(v[1])}`,toolDetails:S.join(", ")}:{type:"tool",label:`${x(v[0])}, ${x(v[1])}, ...`,toolDetails:S.join(", ")}}const u=o.filter(m=>m.role==="user"),c=u[u.length-1];if(!c)return null;const p=hp(c);return p?{type:"user",label:`"${mp(p)}"`,fullText:p}:null}function c1(n,l){var s,u;if(l)return{type:"error",icon:"alert",label:"Error"};if((typeof(n==null?void 0:n.finishReason)=="string"?n.finishReason:typeof(n==null?void 0:n.finishReason)=="object"?(s=n.finishReason)==null?void 0:s.unified:void 0)==="tool-calls"){const c=(n==null?void 0:n.toolCalls)||(((u=n==null?void 0:n.content)==null?void 0:u.filter(h=>h.type==="tool-call"))??[]),{label:p,details:m}=a1(c);return{type:"tool-calls",icon:"wrench",label:p,toolDetails:m||void 0}}return{type:"response",icon:"message",label:"Response"}}function rr(n){if(typeof n=="string")try{return JSON.parse(n)}catch{return n}return n}function Ji(n){return n==null?{total:0}:typeof n=="number"?{total:n}:typeof n=="object"?{total:"total"in n&&typeof n.total=="number"?n.total:0,...typeof n.noCache=="number"&&{noCache:n.noCache},...typeof n.cacheRead=="number"&&{cacheRead:n.cacheRead},...typeof n.cacheWrite=="number"&&{cacheWrite:n.cacheWrite}}:{total:0}}function es(n){return n==null?{total:0}:typeof n=="number"?{total:n}:typeof n=="object"?{total:"total"in n&&typeof n.total=="number"?n.total:0,...typeof n.text=="number"&&{text:n.text},...typeof n.reasoning=="number"&&{reasoning:n.reasoning}}:{total:0}}function Gm(n){const{total:l,cacheRead:o}=n;return o&&o>0?`${l} (${o} cached)`:String(l)}function Km(n){const{total:l,reasoning:o}=n;return o&&o>0?`${l} (${o} reasoning)`:String(l)}function qm(n,l=40){if(!n||typeof n!="object")return"";const o=Object.entries(n);if(o.length===0)return"";const s=(h,y=20)=>h===null?"null":h===void 0?"undefined":typeof h=="object"?Array.isArray(h)?`[${h.length}]`:"{…}":typeof h=="string"?h.length>y?`"${h.slice(0,y)}…"`:`"${h}"`:String(h),u=o[0];if(!u)return"";const[c,p]=u,m=`${c}: ${s(p)}`;return o.length===1?`{ ${m} }`:`{ ${m}, … }`}function d1(n){if(!n||typeof n!="object")return"";const l=Object.entries(n);if(l.length===0)return"";const o=(m,h=20)=>m===null?"null":m===void 0?"undefined":typeof m=="object"?Array.isArray(m)?`[${m.length}]`:"{…}":typeof m=="string"?m.length>h?`"${m.slice(0,h)}…"`:`"${m}"`:String(m),s=l[0];if(!s)return"";const[u,c]=s,p=`${u}: ${o(c)}`;return l.length===1?`{ ${p} }`:`{ ${p}, … }`}function f1(n){if(n===null)return"null";if(n===void 0)return"undefined";if(typeof n=="string")return n.length>30?`"${n.slice(0,30)}…"`:`"${n}"`;if(Array.isArray(n))return`[${n.length}]`;if(typeof n=="object"){const l=Object.entries(n);if(l.length===0)return"{}";const o=l[0];if(!o)return"{…}";const[s,u]=o;let c;return typeof u=="string"&&u.length>15?c=`"${u.slice(0,15)}…"`:typeof u=="string"?c=`"${u}"`:typeof u=="object"?c=Array.isArray(u)?`[${u.length}]`:"{…}":c=String(u),l.length===1?`{ ${s}: ${c} }`:`{ ${s}: ${c}, … }`}return String(n)}const p1={step:"bg-blue-500","child-run":"bg-cyan-500",thinking:"bg-amber-500","tool-call":"bg-purple-500",text:"bg-emerald-500",error:"bg-red-500"},m1={step:"bg-blue-500/20","child-run":"bg-cyan-500/20",thinking:"bg-amber-500/20","tool-call":"bg-purple-500/20",text:"bg-emerald-500/20",error:"bg-red-500/20"};function h1(n,l){const o=[],s=new Date(n.run.started_at).getTime(),u=(c,p,m,h)=>{var y,v;for(const x of c){const C=new Date(x.started_at).getTime()-s,P=x.duration_ms??0,k=C+P,E=l(x.usage),A=l(x.output),D=h||x.model_id||"LLM call",$=h?x.model_id:void 0,N=(A==null?void 0:A.content)??[],F=N.length>0||x.error,V=E?{input:typeof E.inputTokens=="number"?E.inputTokens:((y=E.inputTokens)==null?void 0:y.total)??0,output:typeof E.outputTokens=="number"?E.outputTokens:((v=E.outputTokens)==null?void 0:v.total)??0}:void 0;if(o.push({id:x.id,stepId:x.id,label:D,sublabel:F?$:x.duration_ms===null&&!x.error?"streaming...":$||"Response",startMs:C,durationMs:P,depth:p,kind:"step",tokens:V,modelId:x.model_id,isInProgress:x.duration_ms===null&&!x.error}),!F){const q=m.filter(te=>te.run.parent_step_id===x.id);for(const te of q)u(te.steps,p+1,te.childRuns??[],te.run.function_id);continue}const R=[...m.filter(q=>q.run.parent_step_id===x.id)].sort((q,te)=>new Date(q.run.started_at).getTime()-new Date(te.run.started_at).getTime()),W=N.filter(q=>q.type==="tool-call"),Q=new Map,ee=[];if(W.length>0&&R.length>0){let q=0;for(const te of W){const J=te.toolCallId;if(!J)continue;if(N.find(B=>B.type==="tool-result"&&"toolCallId"in B&&B.toolCallId===J)&&q<R.length){const B=R[q];if(B){const K=Q.get(J)??[];K.push(B),Q.set(J,K),q++}}}for(let te=q;te<R.length;te++){const J=R[te];J&&ee.push(J)}}else ee.push(...R);const ce=[];for(const q of W){const te=q.toolCallId;if(!te)continue;const J=Q.get(te)??[];if(J.length>0){const ne=Math.min(...J.map(K=>new Date(K.run.started_at).getTime()-s)),B=Math.max(...J.map(K=>{const I=new Date(K.run.started_at).getTime()-s,_=K.steps.reduce((H,fe)=>H+(fe.duration_ms||0),0);return I+_}));ce.push({toolCallId:te,startMs:ne,endMs:B})}}let U=C;for(const q of N)if(q.type==="reasoning"||q.type==="thinking"){const te=q.text||q.thinking||q.reasoning||"",J=ce.length>0?Math.min(...ce.map(K=>K.startMs)):k,ne=Math.max(U,J),B=Math.max(0,ne-U);o.push({id:`${x.id}-thinking-${q.toolCallId||U}`,stepId:x.id,label:"Thinking",sublabel:te.length>50?te.slice(0,50)+"...":te,startMs:U,durationMs:B,depth:p+1,kind:"thinking",thinkingText:te}),U=U+B}else if(q.type==="tool-call"){const te=q.toolName||"unknown",J=q.input??q.args,ne=J&&typeof J=="object"?Object.entries(J).slice(0,3).map(([,H])=>{const fe=typeof H=="string"?H:JSON.stringify(H)??String(H);return fe.length>30?fe.slice(0,30)+"…":fe}).join(", "):typeof J=="string"?J.slice(0,60):"",B=Q.get(q.toolCallId??"")??[],K=ce.find(H=>H.toolCallId===q.toolCallId);let I,_;K?(I=K.startMs,_=K.endMs-K.startMs):(I=U,_=0),o.push({id:`${x.id}-tool-${q.toolCallId||U}`,stepId:x.id,label:te,sublabel:ne?`(${ne})`:void 0,startMs:I,durationMs:_,depth:p+1,kind:"tool-call",toolCallId:q.toolCallId});for(const H of B)u(H.steps,p+2,H.childRuns??[],H.run.function_id);U=Math.max(U,I+_)}else if(q.type==="text"){const te=q.text||"",J=Math.max(0,k-U);o.push({id:`${x.id}-text-${U}`,stepId:x.id,label:"Text",sublabel:te.length>60?te.slice(0,60)+"...":te,startMs:U,durationMs:J,depth:p+1,kind:"text",textContent:te}),U=U+J}if(x.error){const q=Math.max(0,k-U);o.push({id:`${x.id}-error`,stepId:x.id,label:"Error",sublabel:x.error.length>60?x.error.slice(0,60)+"...":x.error,startMs:U,durationMs:q,depth:p+1,kind:"error"})}for(const q of ee)u(q.steps,p+1,q.childRuns??[],q.run.function_id)}};return u(n.steps,0,n.childRuns??[],n.run.function_id),o}var ou="focusScope.autoFocusOnMount",lu="focusScope.autoFocusOnUnmount",gp={bubbles:!1,cancelable:!0},g1="FocusScope",Zm=w.forwardRef((n,l)=>{const{loop:o=!1,trapped:s=!1,onMountAutoFocus:u,onUnmountAutoFocus:c,...p}=n,[m,h]=w.useState(null),y=Tt(u),v=Tt(c),x=w.useRef(null),S=rt(l,k=>h(k)),C=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(s){let k=function($){if(C.paused||!m)return;const N=$.target;m.contains(N)?x.current=N:er(x.current,{select:!0})},E=function($){if(C.paused||!m)return;const N=$.relatedTarget;N!==null&&(m.contains(N)||er(x.current,{select:!0}))},A=function($){if(document.activeElement===document.body)for(const F of $)F.removedNodes.length>0&&er(m)};document.addEventListener("focusin",k),document.addEventListener("focusout",E);const D=new MutationObserver(A);return m&&D.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",E),D.disconnect()}}},[s,m,C.paused]),w.useEffect(()=>{if(m){yp.add(C);const k=document.activeElement;if(!m.contains(k)){const A=new CustomEvent(ou,gp);m.addEventListener(ou,y),m.dispatchEvent(A),A.defaultPrevented||(v1(b1(Jm(m)),{select:!0}),document.activeElement===k&&er(m))}return()=>{m.removeEventListener(ou,y),setTimeout(()=>{const A=new CustomEvent(lu,gp);m.addEventListener(lu,v),m.dispatchEvent(A),A.defaultPrevented||er(k??document.body,{select:!0}),m.removeEventListener(lu,v),yp.remove(C)},0)}}},[m,y,v,C]);const P=w.useCallback(k=>{if(!o&&!s||C.paused)return;const E=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,A=document.activeElement;if(E&&A){const D=k.currentTarget,[$,N]=y1(D);$&&N?!k.shiftKey&&A===N?(k.preventDefault(),o&&er($,{select:!0})):k.shiftKey&&A===$&&(k.preventDefault(),o&&er(N,{select:!0})):A===D&&k.preventDefault()}},[o,s,C.paused]);return f.jsx(He.div,{tabIndex:-1,...p,ref:S,onKeyDown:P})});Zm.displayName=g1;function v1(n,{select:l=!1}={}){const o=document.activeElement;for(const s of n)if(er(s,{select:l}),document.activeElement!==o)return}function y1(n){const l=Jm(n),o=vp(l,n),s=vp(l.reverse(),n);return[o,s]}function Jm(n){const l=[],o=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const u=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||u?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)l.push(o.currentNode);return l}function vp(n,l){for(const o of n)if(!x1(o,{upTo:l}))return o}function x1(n,{upTo:l}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(l!==void 0&&n===l)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function w1(n){return n instanceof HTMLInputElement&&"select"in n}function er(n,{select:l=!1}={}){if(n&&n.focus){const o=document.activeElement;n.focus({preventScroll:!0}),n!==o&&w1(n)&&l&&n.select()}}var yp=S1();function S1(){let n=[];return{add(l){const o=n[0];l!==o&&(o==null||o.pause()),n=xp(n,l),n.unshift(l)},remove(l){var o;n=xp(n,l),(o=n[0])==null||o.resume()}}}function xp(n,l){const o=[...n],s=o.indexOf(l);return s!==-1&&o.splice(s,1),o}function b1(n){return n.filter(l=>l.tagName!=="A")}var iu=0;function C1(){w.useEffect(()=>{const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",n[0]??wp()),document.body.insertAdjacentElement("beforeend",n[1]??wp()),iu++,()=>{iu===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(l=>l.remove()),iu--}},[])}function wp(){const n=document.createElement("span");return n.setAttribute("data-radix-focus-guard",""),n.tabIndex=0,n.style.outline="none",n.style.opacity="0",n.style.position="fixed",n.style.pointerEvents="none",n}var sn=function(){return sn=Object.assign||function(l){for(var o,s=1,u=arguments.length;s<u;s++){o=arguments[s];for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&(l[c]=o[c])}return l},sn.apply(this,arguments)};function eh(n,l){var o={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&l.indexOf(s)<0&&(o[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var u=0,s=Object.getOwnPropertySymbols(n);u<s.length;u++)l.indexOf(s[u])<0&&Object.prototype.propertyIsEnumerable.call(n,s[u])&&(o[s[u]]=n[s[u]]);return o}function k1(n,l,o){if(o||arguments.length===2)for(var s=0,u=l.length,c;s<u;s++)(c||!(s in l))&&(c||(c=Array.prototype.slice.call(l,0,s)),c[s]=l[s]);return n.concat(c||Array.prototype.slice.call(l))}var Ii="right-scroll-bar-position",$i="width-before-scroll-bar",E1="with-scroll-bars-hidden",N1="--removed-body-scroll-bar-size";function su(n,l){return typeof n=="function"?n(l):n&&(n.current=l),n}function j1(n,l){var o=w.useState(function(){return{value:n,callback:l,facade:{get current(){return o.value},set current(s){var u=o.value;u!==s&&(o.value=s,o.callback(s,u))}}}})[0];return o.callback=l,o.facade}var R1=typeof window<"u"?w.useLayoutEffect:w.useEffect,Sp=new WeakMap;function T1(n,l){var o=j1(null,function(s){return n.forEach(function(u){return su(u,s)})});return R1(function(){var s=Sp.get(o);if(s){var u=new Set(s),c=new Set(n),p=o.current;u.forEach(function(m){c.has(m)||su(m,null)}),c.forEach(function(m){u.has(m)||su(m,p)})}Sp.set(o,n)},[n]),o}function P1(n){return n}function _1(n,l){l===void 0&&(l=P1);var o=[],s=!1,u={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:n},useMedium:function(c){var p=l(c,s);return o.push(p),function(){o=o.filter(function(m){return m!==p})}},assignSyncMedium:function(c){for(s=!0;o.length;){var p=o;o=[],p.forEach(c)}o={push:function(m){return c(m)},filter:function(){return o}}},assignMedium:function(c){s=!0;var p=[];if(o.length){var m=o;o=[],m.forEach(c),p=o}var h=function(){var v=p;p=[],v.forEach(c)},y=function(){return Promise.resolve().then(h)};y(),o={push:function(v){p.push(v),y()},filter:function(v){return p=p.filter(v),o}}}};return u}function A1(n){n===void 0&&(n={});var l=_1(null);return l.options=sn({async:!0,ssr:!1},n),l}var th=function(n){var l=n.sideCar,o=eh(n,["sideCar"]);if(!l)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=l.read();if(!s)throw new Error("Sidecar medium not found");return w.createElement(s,sn({},o))};th.isSideCarExport=!0;function O1(n,l){return n.useMedium(l),th}var nh=A1(),au=function(){},ds=w.forwardRef(function(n,l){var o=w.useRef(null),s=w.useState({onScrollCapture:au,onWheelCapture:au,onTouchMoveCapture:au}),u=s[0],c=s[1],p=n.forwardProps,m=n.children,h=n.className,y=n.removeScrollBar,v=n.enabled,x=n.shards,S=n.sideCar,C=n.noRelative,P=n.noIsolation,k=n.inert,E=n.allowPinchZoom,A=n.as,D=A===void 0?"div":A,$=n.gapMode,N=eh(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),F=S,V=T1([o,l]),L=sn(sn({},N),u);return w.createElement(w.Fragment,null,v&&w.createElement(F,{sideCar:nh,removeScrollBar:y,shards:x,noRelative:C,noIsolation:P,inert:k,setCallbacks:c,allowPinchZoom:!!E,lockRef:o,gapMode:$}),p?w.cloneElement(w.Children.only(m),sn(sn({},L),{ref:V})):w.createElement(D,sn({},L,{className:h,ref:V}),m))});ds.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ds.classNames={fullWidth:$i,zeroRight:Ii};var M1=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function D1(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var l=M1();return l&&n.setAttribute("nonce",l),n}function L1(n,l){n.styleSheet?n.styleSheet.cssText=l:n.appendChild(document.createTextNode(l))}function z1(n){var l=document.head||document.getElementsByTagName("head")[0];l.appendChild(n)}var I1=function(){var n=0,l=null;return{add:function(o){n==0&&(l=D1())&&(L1(l,o),z1(l)),n++},remove:function(){n--,!n&&l&&(l.parentNode&&l.parentNode.removeChild(l),l=null)}}},$1=function(){var n=I1();return function(l,o){w.useEffect(function(){return n.add(l),function(){n.remove()}},[l&&o])}},rh=function(){var n=$1(),l=function(o){var s=o.styles,u=o.dynamic;return n(s,u),null};return l},F1={left:0,top:0,right:0,gap:0},uu=function(n){return parseInt(n||"",10)||0},W1=function(n){var l=window.getComputedStyle(document.body),o=l[n==="padding"?"paddingLeft":"marginLeft"],s=l[n==="padding"?"paddingTop":"marginTop"],u=l[n==="padding"?"paddingRight":"marginRight"];return[uu(o),uu(s),uu(u)]},B1=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return F1;var l=W1(n),o=document.documentElement.clientWidth,s=window.innerWidth;return{left:l[0],top:l[1],right:l[2],gap:Math.max(0,s-o+l[2]-l[0])}},H1=rh(),oo="data-scroll-locked",V1=function(n,l,o,s){var u=n.left,c=n.top,p=n.right,m=n.gap;return o===void 0&&(o="margin"),`
|
|
135
|
+
*/const b0=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Dp=ht("zap",b0),C0=()=>f.jsxs("svg",{width:"55.28888888888889",height:"16",viewBox:"0 0 311 90",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("path",{d:"M2.97269 86L32.6687 3.64H51.1127L80.8087 86H65.0327L58.1887 66.512H25.5927L18.7487 86H2.97269ZM30.0007 53.636H53.7807L41.9487 18.836L30.0007 53.636ZM130.894 3.64V16.748H117.67V72.892H131.59V86H88.5544V72.892H102.59V16.748H89.2504V3.64H130.894Z",fill:"currentColor"}),f.jsx("rect",{x:"153",y:"7.5",width:"154",height:"75",rx:"37.5",stroke:"currentColor",strokeWidth:"8"}),f.jsx("path",{d:"M183.603 51.8472C184.393 56.468 187.677 59.508 193.088 59.508C197.222 59.508 200.019 57.8664 199.958 54.7048C199.897 51.5432 197.222 49.7192 190.473 48.0776C181.11 45.828 175.091 42.0584 175.091 35.1272C175.091 27.284 181.657 22.3592 191.507 22.3592C201.113 22.3592 207.68 28.2568 208.713 36.9512L199.472 37.4376C198.985 32.8776 195.824 30.02 191.264 30.02C187.251 30.02 184.393 32.0872 184.576 35.2488C184.697 38.8968 188.953 40.1128 193.574 41.268C203.241 43.396 209.382 47.5304 209.382 54.4008C209.382 62.6088 202.147 67.2296 192.845 67.2296C182.326 67.2296 174.909 61.3928 174.301 52.2728L183.603 51.8472ZM226.773 23.332C240.757 23.332 248.601 31.1144 248.601 44.9768C248.601 58.7784 240.879 66.5 227.138 66.5H211.877V23.332H226.773ZM221.119 58.7176H226.773C235.164 58.7176 239.177 54.2792 239.177 44.916C239.177 35.5528 235.164 31.1144 226.773 31.1144H221.119V58.7176ZM250.431 23.332H259.672V42.18L275.359 23.332H286.12L270.252 42.3624L287.093 66.5H276.575L264.172 48.564L259.672 53.7928V66.5H250.431V23.332Z",fill:"currentColor"})]});function Hf(n,l){if(typeof n=="function")return n(l);n!=null&&(n.current=l)}function Ru(...n){return l=>{let o=!1;const s=n.map(u=>{const c=Hf(u,l);return!o&&typeof c=="function"&&(o=!0),c});if(o)return()=>{for(let u=0;u<s.length;u++){const c=s[u];typeof c=="function"?c():Hf(n[u],null)}}}}function rt(...n){return w.useCallback(Ru(...n),n)}var k0=Symbol.for("react.lazy"),Ui=ju[" use ".trim().toString()];function E0(n){return typeof n=="object"&&n!==null&&"then"in n}function Lp(n){return n!=null&&typeof n=="object"&&"$$typeof"in n&&n.$$typeof===k0&&"_payload"in n&&E0(n._payload)}function N0(n){const l=j0(n),o=w.forwardRef((s,u)=>{let{children:c,...p}=s;Lp(c)&&typeof Ui=="function"&&(c=Ui(c._payload));const m=w.Children.toArray(c),h=m.find(T0);if(h){const y=h.props.children,v=m.map(x=>x===h?w.Children.count(y)>1?w.Children.only(null):w.isValidElement(y)?y.props.children:null:x);return f.jsx(l,{...p,ref:u,children:w.isValidElement(y)?w.cloneElement(y,void 0,v):null})}return f.jsx(l,{...p,ref:u,children:c})});return o.displayName=`${n}.Slot`,o}var zp=N0("Slot");function j0(n){const l=w.forwardRef((o,s)=>{let{children:u,...c}=o;if(Lp(u)&&typeof Ui=="function"&&(u=Ui(u._payload)),w.isValidElement(u)){const p=_0(u),m=P0(c,u.props);return u.type!==w.Fragment&&(m.ref=s?Ru(s,p):p),w.cloneElement(u,m)}return w.Children.count(u)>1?w.Children.only(null):null});return l.displayName=`${n}.SlotClone`,l}var R0=Symbol("radix.slottable");function T0(n){return w.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===R0}function P0(n,l){const o={...l};for(const s in l){const u=n[s],c=l[s];/^on[A-Z]/.test(s)?u&&c?o[s]=(...m)=>{const h=c(...m);return u(...m),h}:u&&(o[s]=u):s==="style"?o[s]={...u,...c}:s==="className"&&(o[s]=[u,c].filter(Boolean).join(" "))}return{...n,...o}}function _0(n){var s,u;let l=(s=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:s.get,o=l&&"isReactWarning"in l&&l.isReactWarning;return o?n.ref:(l=(u=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:u.get,o=l&&"isReactWarning"in l&&l.isReactWarning,o?n.props.ref:n.props.ref||n.ref)}function Ip(n){var l,o,s="";if(typeof n=="string"||typeof n=="number")s+=n;else if(typeof n=="object")if(Array.isArray(n)){var u=n.length;for(l=0;l<u;l++)n[l]&&(o=Ip(n[l]))&&(s&&(s+=" "),s+=o)}else for(o in n)n[o]&&(s&&(s+=" "),s+=o);return s}function $p(){for(var n,l,o=0,s="",u=arguments.length;o<u;o++)(n=arguments[o])&&(l=Ip(n))&&(s&&(s+=" "),s+=l);return s}const Vf=n=>typeof n=="boolean"?`${n}`:n===0?"0":n,Uf=$p,Fp=(n,l)=>o=>{var s;if((l==null?void 0:l.variants)==null)return Uf(n,o==null?void 0:o.class,o==null?void 0:o.className);const{variants:u,defaultVariants:c}=l,p=Object.keys(u).map(y=>{const v=o==null?void 0:o[y],x=c==null?void 0:c[y];if(v===null)return null;const S=Vf(v)||Vf(x);return u[y][S]}),m=o&&Object.entries(o).reduce((y,v)=>{let[x,S]=v;return S===void 0||(y[x]=S),y},{}),h=l==null||(s=l.compoundVariants)===null||s===void 0?void 0:s.reduce((y,v)=>{let{class:x,className:S,...C}=v;return Object.entries(C).every(P=>{let[k,E]=P;return Array.isArray(E)?E.includes({...c,...m}[k]):{...c,...m}[k]===E})?[...y,x,S]:y},[]);return Uf(n,p,h,o==null?void 0:o.class,o==null?void 0:o.className)},A0=(n,l)=>{const o=new Array(n.length+l.length);for(let s=0;s<n.length;s++)o[s]=n[s];for(let s=0;s<l.length;s++)o[n.length+s]=l[s];return o},O0=(n,l)=>({classGroupId:n,validator:l}),Wp=(n=new Map,l=null,o)=>({nextPart:n,validators:l,classGroupId:o}),Yi="-",Yf=[],M0="arbitrary..",D0=n=>{const l=z0(n),{conflictingClassGroups:o,conflictingClassGroupModifiers:s}=n;return{getClassGroupId:p=>{if(p.startsWith("[")&&p.endsWith("]"))return L0(p);const m=p.split(Yi),h=m[0]===""&&m.length>1?1:0;return Bp(m,h,l)},getConflictingClassGroupIds:(p,m)=>{if(m){const h=s[p],y=o[p];return h?y?A0(y,h):h:y||Yf}return o[p]||Yf}}},Bp=(n,l,o)=>{if(n.length-l===0)return o.classGroupId;const u=n[l],c=o.nextPart.get(u);if(c){const y=Bp(n,l+1,c);if(y)return y}const p=o.validators;if(p===null)return;const m=l===0?n.join(Yi):n.slice(l).join(Yi),h=p.length;for(let y=0;y<h;y++){const v=p[y];if(v.validator(m))return v.classGroupId}},L0=n=>n.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const l=n.slice(1,-1),o=l.indexOf(":"),s=l.slice(0,o);return s?M0+s:void 0})(),z0=n=>{const{theme:l,classGroups:o}=n;return I0(o,l)},I0=(n,l)=>{const o=Wp();for(const s in n){const u=n[s];Tu(u,o,s,l)}return o},Tu=(n,l,o,s)=>{const u=n.length;for(let c=0;c<u;c++){const p=n[c];$0(p,l,o,s)}},$0=(n,l,o,s)=>{if(typeof n=="string"){F0(n,l,o);return}if(typeof n=="function"){W0(n,l,o,s);return}B0(n,l,o,s)},F0=(n,l,o)=>{const s=n===""?l:Hp(l,n);s.classGroupId=o},W0=(n,l,o,s)=>{if(H0(n)){Tu(n(s),l,o,s);return}l.validators===null&&(l.validators=[]),l.validators.push(O0(o,n))},B0=(n,l,o,s)=>{const u=Object.entries(n),c=u.length;for(let p=0;p<c;p++){const[m,h]=u[p];Tu(h,Hp(l,m),o,s)}},Hp=(n,l)=>{let o=n;const s=l.split(Yi),u=s.length;for(let c=0;c<u;c++){const p=s[c];let m=o.nextPart.get(p);m||(m=Wp(),o.nextPart.set(p,m)),o=m}return o},H0=n=>"isThemeGetter"in n&&n.isThemeGetter===!0,V0=n=>{if(n<1)return{get:()=>{},set:()=>{}};let l=0,o=Object.create(null),s=Object.create(null);const u=(c,p)=>{o[c]=p,l++,l>n&&(l=0,s=o,o=Object.create(null))};return{get(c){let p=o[c];if(p!==void 0)return p;if((p=s[c])!==void 0)return u(c,p),p},set(c,p){c in o?o[c]=p:u(c,p)}}},hu="!",Xf=":",U0=[],Qf=(n,l,o,s,u)=>({modifiers:n,hasImportantModifier:l,baseClassName:o,maybePostfixModifierPosition:s,isExternal:u}),Y0=n=>{const{prefix:l,experimentalParseClassName:o}=n;let s=u=>{const c=[];let p=0,m=0,h=0,y;const v=u.length;for(let k=0;k<v;k++){const E=u[k];if(p===0&&m===0){if(E===Xf){c.push(u.slice(h,k)),h=k+1;continue}if(E==="/"){y=k;continue}}E==="["?p++:E==="]"?p--:E==="("?m++:E===")"&&m--}const x=c.length===0?u:u.slice(h);let S=x,C=!1;x.endsWith(hu)?(S=x.slice(0,-1),C=!0):x.startsWith(hu)&&(S=x.slice(1),C=!0);const P=y&&y>h?y-h:void 0;return Qf(c,C,S,P)};if(l){const u=l+Xf,c=s;s=p=>p.startsWith(u)?c(p.slice(u.length)):Qf(U0,!1,p,void 0,!0)}if(o){const u=s;s=c=>o({className:c,parseClassName:u})}return s},X0=n=>{const l=new Map;return n.orderSensitiveModifiers.forEach((o,s)=>{l.set(o,1e6+s)}),o=>{const s=[];let u=[];for(let c=0;c<o.length;c++){const p=o[c],m=p[0]==="[",h=l.has(p);m||h?(u.length>0&&(u.sort(),s.push(...u),u=[]),s.push(p)):u.push(p)}return u.length>0&&(u.sort(),s.push(...u)),s}},Q0=n=>({cache:V0(n.cacheSize),parseClassName:Y0(n),sortModifiers:X0(n),...D0(n)}),G0=/\s+/,K0=(n,l)=>{const{parseClassName:o,getClassGroupId:s,getConflictingClassGroupIds:u,sortModifiers:c}=l,p=[],m=n.trim().split(G0);let h="";for(let y=m.length-1;y>=0;y-=1){const v=m[y],{isExternal:x,modifiers:S,hasImportantModifier:C,baseClassName:P,maybePostfixModifierPosition:k}=o(v);if(x){h=v+(h.length>0?" "+h:h);continue}let E=!!k,A=s(E?P.substring(0,k):P);if(!A){if(!E){h=v+(h.length>0?" "+h:h);continue}if(A=s(P),!A){h=v+(h.length>0?" "+h:h);continue}E=!1}const D=S.length===0?"":S.length===1?S[0]:c(S).join(":"),$=C?D+hu:D,N=$+A;if(p.indexOf(N)>-1)continue;p.push(N);const F=u(A,E);for(let V=0;V<F.length;++V){const L=F[V];p.push($+L)}h=v+(h.length>0?" "+h:h)}return h},q0=(...n)=>{let l=0,o,s,u="";for(;l<n.length;)(o=n[l++])&&(s=Vp(o))&&(u&&(u+=" "),u+=s);return u},Vp=n=>{if(typeof n=="string")return n;let l,o="";for(let s=0;s<n.length;s++)n[s]&&(l=Vp(n[s]))&&(o&&(o+=" "),o+=l);return o},Z0=(n,...l)=>{let o,s,u,c;const p=h=>{const y=l.reduce((v,x)=>x(v),n());return o=Q0(y),s=o.cache.get,u=o.cache.set,c=m,m(h)},m=h=>{const y=s(h);if(y)return y;const v=K0(h,o);return u(h,v),v};return c=p,(...h)=>c(q0(...h))},J0=[],qe=n=>{const l=o=>o[n]||J0;return l.isThemeGetter=!0,l},Up=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Yp=/^\((?:(\w[\w-]*):)?(.+)\)$/i,ey=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ty=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ny=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ry=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,oy=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ly=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Zn=n=>ey.test(n),Ee=n=>!!n&&!Number.isNaN(Number(n)),Jn=n=>!!n&&Number.isInteger(Number(n)),tu=n=>n.endsWith("%")&&Ee(n.slice(0,-1)),Nn=n=>ty.test(n),Xp=()=>!0,iy=n=>ny.test(n)&&!ry.test(n),Pu=()=>!1,sy=n=>oy.test(n),ay=n=>ly.test(n),uy=n=>!se(n)&&!ae(n),cy=n=>lr(n,Kp,Pu),se=n=>Up.test(n),Cr=n=>lr(n,qp,iy),Gf=n=>lr(n,yy,Ee),dy=n=>lr(n,Jp,Xp),fy=n=>lr(n,Zp,Pu),Kf=n=>lr(n,Qp,Pu),py=n=>lr(n,Gp,ay),Ni=n=>lr(n,em,sy),ae=n=>Yp.test(n),tl=n=>jr(n,qp),my=n=>jr(n,Zp),qf=n=>jr(n,Qp),hy=n=>jr(n,Kp),gy=n=>jr(n,Gp),ji=n=>jr(n,em,!0),vy=n=>jr(n,Jp,!0),lr=(n,l,o)=>{const s=Up.exec(n);return s?s[1]?l(s[1]):o(s[2]):!1},jr=(n,l,o=!1)=>{const s=Yp.exec(n);return s?s[1]?l(s[1]):o:!1},Qp=n=>n==="position"||n==="percentage",Gp=n=>n==="image"||n==="url",Kp=n=>n==="length"||n==="size"||n==="bg-size",qp=n=>n==="length",yy=n=>n==="number",Zp=n=>n==="family-name",Jp=n=>n==="number"||n==="weight",em=n=>n==="shadow",xy=()=>{const n=qe("color"),l=qe("font"),o=qe("text"),s=qe("font-weight"),u=qe("tracking"),c=qe("leading"),p=qe("breakpoint"),m=qe("container"),h=qe("spacing"),y=qe("radius"),v=qe("shadow"),x=qe("inset-shadow"),S=qe("text-shadow"),C=qe("drop-shadow"),P=qe("blur"),k=qe("perspective"),E=qe("aspect"),A=qe("ease"),D=qe("animate"),$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],F=()=>[...N(),ae,se],V=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto","contain","none"],R=()=>[ae,se,h],W=()=>[Zn,"full","auto",...R()],Q=()=>[Jn,"none","subgrid",ae,se],ee=()=>["auto",{span:["full",Jn,ae,se]},Jn,ae,se],ce=()=>[Jn,"auto",ae,se],U=()=>["auto","min","max","fr",ae,se],q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],te=()=>["start","end","center","stretch","center-safe","end-safe"],J=()=>["auto",...R()],ne=()=>[Zn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],B=()=>[Zn,"screen","full","dvw","lvw","svw","min","max","fit",...R()],K=()=>[Zn,"screen","full","lh","dvh","lvh","svh","min","max","fit",...R()],I=()=>[n,ae,se],_=()=>[...N(),qf,Kf,{position:[ae,se]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],fe=()=>["auto","cover","contain",hy,cy,{size:[ae,se]}],we=()=>[tu,tl,Cr],pe=()=>["","none","full",y,ae,se],me=()=>["",Ee,tl,Cr],Ce=()=>["solid","dashed","dotted","double"],be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],xe=()=>[Ee,tu,qf,Kf],ze=()=>["","none",P,ae,se],Qe=()=>["none",Ee,ae,se],Ct=()=>["none",Ee,ae,se],ot=()=>[Ee,ae,se],he=()=>[Zn,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Nn],breakpoint:[Nn],color:[Xp],container:[Nn],"drop-shadow":[Nn],ease:["in","out","in-out"],font:[uy],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Nn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Nn],shadow:[Nn],spacing:["px",Ee],text:[Nn],"text-shadow":[Nn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Zn,se,ae,E]}],container:["container"],columns:[{columns:[Ee,se,ae,m]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:F()}],overflow:[{overflow:V()}],"overflow-x":[{"overflow-x":V()}],"overflow-y":[{"overflow-y":V()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:W()}],"inset-x":[{"inset-x":W()}],"inset-y":[{"inset-y":W()}],start:[{"inset-s":W(),start:W()}],end:[{"inset-e":W(),end:W()}],"inset-bs":[{"inset-bs":W()}],"inset-be":[{"inset-be":W()}],top:[{top:W()}],right:[{right:W()}],bottom:[{bottom:W()}],left:[{left:W()}],visibility:["visible","invisible","collapse"],z:[{z:[Jn,"auto",ae,se]}],basis:[{basis:[Zn,"full","auto",m,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ee,Zn,"auto","initial","none",se]}],grow:[{grow:["",Ee,ae,se]}],shrink:[{shrink:["",Ee,ae,se]}],order:[{order:[Jn,"first","last","none",ae,se]}],"grid-cols":[{"grid-cols":Q()}],"col-start-end":[{col:ee()}],"col-start":[{"col-start":ce()}],"col-end":[{"col-end":ce()}],"grid-rows":[{"grid-rows":Q()}],"row-start-end":[{row:ee()}],"row-start":[{"row-start":ce()}],"row-end":[{"row-end":ce()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...q(),"normal"]}],"justify-items":[{"justify-items":[...te(),"normal"]}],"justify-self":[{"justify-self":["auto",...te()]}],"align-content":[{content:["normal",...q()]}],"align-items":[{items:[...te(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...te(),{baseline:["","last"]}]}],"place-content":[{"place-content":q()}],"place-items":[{"place-items":[...te(),"baseline"]}],"place-self":[{"place-self":["auto",...te()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pbs:[{pbs:R()}],pbe:[{pbe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],m:[{m:J()}],mx:[{mx:J()}],my:[{my:J()}],ms:[{ms:J()}],me:[{me:J()}],mbs:[{mbs:J()}],mbe:[{mbe:J()}],mt:[{mt:J()}],mr:[{mr:J()}],mb:[{mb:J()}],ml:[{ml:J()}],"space-x":[{"space-x":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:ne()}],"inline-size":[{inline:["auto",...B()]}],"min-inline-size":[{"min-inline":["auto",...B()]}],"max-inline-size":[{"max-inline":["none",...B()]}],"block-size":[{block:["auto",...K()]}],"min-block-size":[{"min-block":["auto",...K()]}],"max-block-size":[{"max-block":["none",...K()]}],w:[{w:[m,"screen",...ne()]}],"min-w":[{"min-w":[m,"screen","none",...ne()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[p]},...ne()]}],h:[{h:["screen","lh",...ne()]}],"min-h":[{"min-h":["screen","lh","none",...ne()]}],"max-h":[{"max-h":["screen","lh",...ne()]}],"font-size":[{text:["base",o,tl,Cr]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[s,vy,dy]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",tu,se]}],"font-family":[{font:[my,fy,l]}],"font-features":[{"font-features":[se]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[u,ae,se]}],"line-clamp":[{"line-clamp":[Ee,"none",ae,Gf]}],leading:[{leading:[c,...R()]}],"list-image":[{"list-image":["none",ae,se]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ae,se]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Ce(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ee,"from-font","auto",ae,Cr]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[Ee,"auto",ae,se]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ae,se]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ae,se]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:_()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:fe()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Jn,ae,se],radial:["",ae,se],conic:[Jn,ae,se]},gy,py]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:we()}],"gradient-via-pos":[{via:we()}],"gradient-to-pos":[{to:we()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:pe()}],"rounded-s":[{"rounded-s":pe()}],"rounded-e":[{"rounded-e":pe()}],"rounded-t":[{"rounded-t":pe()}],"rounded-r":[{"rounded-r":pe()}],"rounded-b":[{"rounded-b":pe()}],"rounded-l":[{"rounded-l":pe()}],"rounded-ss":[{"rounded-ss":pe()}],"rounded-se":[{"rounded-se":pe()}],"rounded-ee":[{"rounded-ee":pe()}],"rounded-es":[{"rounded-es":pe()}],"rounded-tl":[{"rounded-tl":pe()}],"rounded-tr":[{"rounded-tr":pe()}],"rounded-br":[{"rounded-br":pe()}],"rounded-bl":[{"rounded-bl":pe()}],"border-w":[{border:me()}],"border-w-x":[{"border-x":me()}],"border-w-y":[{"border-y":me()}],"border-w-s":[{"border-s":me()}],"border-w-e":[{"border-e":me()}],"border-w-bs":[{"border-bs":me()}],"border-w-be":[{"border-be":me()}],"border-w-t":[{"border-t":me()}],"border-w-r":[{"border-r":me()}],"border-w-b":[{"border-b":me()}],"border-w-l":[{"border-l":me()}],"divide-x":[{"divide-x":me()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":me()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...Ce(),"hidden","none"]}],"divide-style":[{divide:[...Ce(),"hidden","none"]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...Ce(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ee,ae,se]}],"outline-w":[{outline:["",Ee,tl,Cr]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",v,ji,Ni]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",x,ji,Ni]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:me()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[Ee,Cr]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":me()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",S,ji,Ni]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[Ee,ae,se]}],"mix-blend":[{"mix-blend":[...be(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":be()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Ee]}],"mask-image-linear-from-pos":[{"mask-linear-from":xe()}],"mask-image-linear-to-pos":[{"mask-linear-to":xe()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":xe()}],"mask-image-t-to-pos":[{"mask-t-to":xe()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":xe()}],"mask-image-r-to-pos":[{"mask-r-to":xe()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":xe()}],"mask-image-b-to-pos":[{"mask-b-to":xe()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":xe()}],"mask-image-l-to-pos":[{"mask-l-to":xe()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":xe()}],"mask-image-x-to-pos":[{"mask-x-to":xe()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":xe()}],"mask-image-y-to-pos":[{"mask-y-to":xe()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[ae,se]}],"mask-image-radial-from-pos":[{"mask-radial-from":xe()}],"mask-image-radial-to-pos":[{"mask-radial-to":xe()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":N()}],"mask-image-conic-pos":[{"mask-conic":[Ee]}],"mask-image-conic-from-pos":[{"mask-conic-from":xe()}],"mask-image-conic-to-pos":[{"mask-conic-to":xe()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:_()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:fe()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ae,se]}],filter:[{filter:["","none",ae,se]}],blur:[{blur:ze()}],brightness:[{brightness:[Ee,ae,se]}],contrast:[{contrast:[Ee,ae,se]}],"drop-shadow":[{"drop-shadow":["","none",C,ji,Ni]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",Ee,ae,se]}],"hue-rotate":[{"hue-rotate":[Ee,ae,se]}],invert:[{invert:["",Ee,ae,se]}],saturate:[{saturate:[Ee,ae,se]}],sepia:[{sepia:["",Ee,ae,se]}],"backdrop-filter":[{"backdrop-filter":["","none",ae,se]}],"backdrop-blur":[{"backdrop-blur":ze()}],"backdrop-brightness":[{"backdrop-brightness":[Ee,ae,se]}],"backdrop-contrast":[{"backdrop-contrast":[Ee,ae,se]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ee,ae,se]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ee,ae,se]}],"backdrop-invert":[{"backdrop-invert":["",Ee,ae,se]}],"backdrop-opacity":[{"backdrop-opacity":[Ee,ae,se]}],"backdrop-saturate":[{"backdrop-saturate":[Ee,ae,se]}],"backdrop-sepia":[{"backdrop-sepia":["",Ee,ae,se]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ae,se]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ee,"initial",ae,se]}],ease:[{ease:["linear","initial",A,ae,se]}],delay:[{delay:[Ee,ae,se]}],animate:[{animate:["none",D,ae,se]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,ae,se]}],"perspective-origin":[{"perspective-origin":F()}],rotate:[{rotate:Qe()}],"rotate-x":[{"rotate-x":Qe()}],"rotate-y":[{"rotate-y":Qe()}],"rotate-z":[{"rotate-z":Qe()}],scale:[{scale:Ct()}],"scale-x":[{"scale-x":Ct()}],"scale-y":[{"scale-y":Ct()}],"scale-z":[{"scale-z":Ct()}],"scale-3d":["scale-3d"],skew:[{skew:ot()}],"skew-x":[{"skew-x":ot()}],"skew-y":[{"skew-y":ot()}],transform:[{transform:[ae,se,"","none","gpu","cpu"]}],"transform-origin":[{origin:F()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:he()}],"translate-x":[{"translate-x":he()}],"translate-y":[{"translate-y":he()}],"translate-z":[{"translate-z":he()}],"translate-none":["translate-none"],accent:[{accent:I()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ae,se]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mbs":[{"scroll-mbs":R()}],"scroll-mbe":[{"scroll-mbe":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pbs":[{"scroll-pbs":R()}],"scroll-pbe":[{"scroll-pbe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ae,se]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[Ee,tl,Cr,Gf]}],stroke:[{stroke:["none",...I()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},wy=Z0(xy);function fn(...n){return wy($p(n))}const Sy=Fp("inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",icon:"size-9","icon-sm":"size-8","icon-lg":"size-10"}},defaultVariants:{variant:"default",size:"default"}});function Zf({className:n,variant:l,size:o,asChild:s=!1,...u}){const c=s?zp:"button";return f.jsx(c,{"data-slot":"button",className:fn(Sy({variant:l,size:o,className:n})),...u})}const by=Fp("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function gu({className:n,variant:l,asChild:o=!1,...s}){const u=o?zp:"span";return f.jsx(u,{"data-slot":"badge",className:fn(by({variant:l}),n),...s})}var _u=_p();const Cy=Pp(_u);function tm(n){const l=ky(n),o=w.forwardRef((s,u)=>{const{children:c,...p}=s,m=w.Children.toArray(c),h=m.find(Ny);if(h){const y=h.props.children,v=m.map(x=>x===h?w.Children.count(y)>1?w.Children.only(null):w.isValidElement(y)?y.props.children:null:x);return f.jsx(l,{...p,ref:u,children:w.isValidElement(y)?w.cloneElement(y,void 0,v):null})}return f.jsx(l,{...p,ref:u,children:c})});return o.displayName=`${n}.Slot`,o}function ky(n){const l=w.forwardRef((o,s)=>{const{children:u,...c}=o;if(w.isValidElement(u)){const p=Ry(u),m=jy(c,u.props);return u.type!==w.Fragment&&(m.ref=s?Ru(s,p):p),w.cloneElement(u,m)}return w.Children.count(u)>1?w.Children.only(null):null});return l.displayName=`${n}.SlotClone`,l}var nm=Symbol("radix.slottable");function Ey(n){const l=({children:o})=>f.jsx(f.Fragment,{children:o});return l.displayName=`${n}.Slottable`,l.__radixId=nm,l}function Ny(n){return w.isValidElement(n)&&typeof n.type=="function"&&"__radixId"in n.type&&n.type.__radixId===nm}function jy(n,l){const o={...l};for(const s in l){const u=n[s],c=l[s];/^on[A-Z]/.test(s)?u&&c?o[s]=(...m)=>{const h=c(...m);return u(...m),h}:u&&(o[s]=u):s==="style"?o[s]={...u,...c}:s==="className"&&(o[s]=[u,c].filter(Boolean).join(" "))}return{...n,...o}}function Ry(n){var s,u;let l=(s=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:s.get,o=l&&"isReactWarning"in l&&l.isReactWarning;return o?n.ref:(l=(u=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:u.get,o=l&&"isReactWarning"in l&&l.isReactWarning,o?n.props.ref:n.props.ref||n.ref)}var Ty=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],He=Ty.reduce((n,l)=>{const o=tm(`Primitive.${l}`),s=w.forwardRef((u,c)=>{const{asChild:p,...m}=u,h=p?o:l;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),f.jsx(h,{...m,ref:c})});return s.displayName=`Primitive.${l}`,{...n,[l]:s}},{});function Py(n,l){n&&_u.flushSync(()=>n.dispatchEvent(l))}var cn=globalThis!=null&&globalThis.document?w.useLayoutEffect:()=>{};function _y(n,l){return w.useReducer((o,s)=>l[o][s]??o,n)}var Zt=n=>{const{present:l,children:o}=n,s=Ay(l),u=typeof o=="function"?o({present:s.isPresent}):w.Children.only(o),c=rt(s.ref,Oy(u));return typeof o=="function"||s.isPresent?w.cloneElement(u,{ref:c}):null};Zt.displayName="Presence";function Ay(n){const[l,o]=w.useState(),s=w.useRef(null),u=w.useRef(n),c=w.useRef("none"),p=n?"mounted":"unmounted",[m,h]=_y(p,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return w.useEffect(()=>{const y=Ri(s.current);c.current=m==="mounted"?y:"none"},[m]),cn(()=>{const y=s.current,v=u.current;if(v!==n){const S=c.current,C=Ri(y);n?h("MOUNT"):C==="none"||(y==null?void 0:y.display)==="none"?h("UNMOUNT"):h(v&&S!==C?"ANIMATION_OUT":"UNMOUNT"),u.current=n}},[n,h]),cn(()=>{if(l){let y;const v=l.ownerDocument.defaultView??window,x=C=>{const k=Ri(s.current).includes(CSS.escape(C.animationName));if(C.target===l&&k&&(h("ANIMATION_END"),!u.current)){const E=l.style.animationFillMode;l.style.animationFillMode="forwards",y=v.setTimeout(()=>{l.style.animationFillMode==="forwards"&&(l.style.animationFillMode=E)})}},S=C=>{C.target===l&&(c.current=Ri(s.current))};return l.addEventListener("animationstart",S),l.addEventListener("animationcancel",x),l.addEventListener("animationend",x),()=>{v.clearTimeout(y),l.removeEventListener("animationstart",S),l.removeEventListener("animationcancel",x),l.removeEventListener("animationend",x)}}else h("ANIMATION_END")},[l,h]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:w.useCallback(y=>{s.current=y?getComputedStyle(y):null,o(y)},[])}}function Ri(n){return(n==null?void 0:n.animationName)||"none"}function Oy(n){var s,u;let l=(s=Object.getOwnPropertyDescriptor(n.props,"ref"))==null?void 0:s.get,o=l&&"isReactWarning"in l&&l.isReactWarning;return o?n.ref:(l=(u=Object.getOwnPropertyDescriptor(n,"ref"))==null?void 0:u.get,o=l&&"isReactWarning"in l&&l.isReactWarning,o?n.props.ref:n.props.ref||n.ref)}function My(n,l){const o=w.createContext(l),s=c=>{const{children:p,...m}=c,h=w.useMemo(()=>m,Object.values(m));return f.jsx(o.Provider,{value:h,children:p})};s.displayName=n+"Provider";function u(c){const p=w.useContext(o);if(p)return p;if(l!==void 0)return l;throw new Error(`\`${c}\` must be used within \`${n}\``)}return[s,u]}function cl(n,l=[]){let o=[];function s(c,p){const m=w.createContext(p),h=o.length;o=[...o,p];const y=x=>{var A;const{scope:S,children:C,...P}=x,k=((A=S==null?void 0:S[n])==null?void 0:A[h])||m,E=w.useMemo(()=>P,Object.values(P));return f.jsx(k.Provider,{value:E,children:C})};y.displayName=c+"Provider";function v(x,S){var k;const C=((k=S==null?void 0:S[n])==null?void 0:k[h])||m,P=w.useContext(C);if(P)return P;if(p!==void 0)return p;throw new Error(`\`${x}\` must be used within \`${c}\``)}return[y,v]}const u=()=>{const c=o.map(p=>w.createContext(p));return function(m){const h=(m==null?void 0:m[n])||c;return w.useMemo(()=>({[`__scope${n}`]:{...m,[n]:h}}),[m,h])}};return u.scopeName=n,[s,Dy(u,...l)]}function Dy(...n){const l=n[0];if(n.length===1)return l;const o=()=>{const s=n.map(u=>({useScope:u(),scopeName:u.scopeName}));return function(c){const p=s.reduce((m,{useScope:h,scopeName:y})=>{const x=h(c)[`__scope${y}`];return{...m,...x}},{});return w.useMemo(()=>({[`__scope${l.scopeName}`]:p}),[p])}};return o.scopeName=l.scopeName,o}function Tt(n){const l=w.useRef(n);return w.useEffect(()=>{l.current=n}),w.useMemo(()=>(...o)=>{var s;return(s=l.current)==null?void 0:s.call(l,...o)},[])}var Ly=w.createContext(void 0);function zy(n){const l=w.useContext(Ly);return n||l||"ltr"}function Iy(n,[l,o]){return Math.min(o,Math.max(l,n))}function Be(n,l,{checkForDefaultPrevented:o=!0}={}){return function(u){if(n==null||n(u),o===!1||!u.defaultPrevented)return l==null?void 0:l(u)}}function $y(n,l){return w.useReducer((o,s)=>l[o][s]??o,n)}var Au="ScrollArea",[rm,Nb]=cl(Au),[Fy,$t]=rm(Au),om=w.forwardRef((n,l)=>{const{__scopeScrollArea:o,type:s="hover",dir:u,scrollHideDelay:c=600,...p}=n,[m,h]=w.useState(null),[y,v]=w.useState(null),[x,S]=w.useState(null),[C,P]=w.useState(null),[k,E]=w.useState(null),[A,D]=w.useState(0),[$,N]=w.useState(0),[F,V]=w.useState(!1),[L,R]=w.useState(!1),W=rt(l,ee=>h(ee)),Q=zy(u);return f.jsx(Fy,{scope:o,type:s,dir:Q,scrollHideDelay:c,scrollArea:m,viewport:y,onViewportChange:v,content:x,onContentChange:S,scrollbarX:C,onScrollbarXChange:P,scrollbarXEnabled:F,onScrollbarXEnabledChange:V,scrollbarY:k,onScrollbarYChange:E,scrollbarYEnabled:L,onScrollbarYEnabledChange:R,onCornerWidthChange:D,onCornerHeightChange:N,children:f.jsx(He.div,{dir:Q,...p,ref:W,style:{position:"relative","--radix-scroll-area-corner-width":A+"px","--radix-scroll-area-corner-height":$+"px",...n.style}})})});om.displayName=Au;var lm="ScrollAreaViewport",im=w.forwardRef((n,l)=>{const{__scopeScrollArea:o,children:s,nonce:u,...c}=n,p=$t(lm,o),m=w.useRef(null),h=rt(l,m,p.onViewportChange);return f.jsxs(f.Fragment,{children:[f.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:u}),f.jsx(He.div,{"data-radix-scroll-area-viewport":"",...c,ref:h,style:{overflowX:p.scrollbarXEnabled?"scroll":"hidden",overflowY:p.scrollbarYEnabled?"scroll":"hidden",...n.style},children:f.jsx("div",{ref:p.onContentChange,style:{minWidth:"100%",display:"table"},children:s})})]})});im.displayName=lm;var pn="ScrollAreaScrollbar",sm=w.forwardRef((n,l)=>{const{forceMount:o,...s}=n,u=$t(pn,n.__scopeScrollArea),{onScrollbarXEnabledChange:c,onScrollbarYEnabledChange:p}=u,m=n.orientation==="horizontal";return w.useEffect(()=>(m?c(!0):p(!0),()=>{m?c(!1):p(!1)}),[m,c,p]),u.type==="hover"?f.jsx(Wy,{...s,ref:l,forceMount:o}):u.type==="scroll"?f.jsx(By,{...s,ref:l,forceMount:o}):u.type==="auto"?f.jsx(am,{...s,ref:l,forceMount:o}):u.type==="always"?f.jsx(Ou,{...s,ref:l}):null});sm.displayName=pn;var Wy=w.forwardRef((n,l)=>{const{forceMount:o,...s}=n,u=$t(pn,n.__scopeScrollArea),[c,p]=w.useState(!1);return w.useEffect(()=>{const m=u.scrollArea;let h=0;if(m){const y=()=>{window.clearTimeout(h),p(!0)},v=()=>{h=window.setTimeout(()=>p(!1),u.scrollHideDelay)};return m.addEventListener("pointerenter",y),m.addEventListener("pointerleave",v),()=>{window.clearTimeout(h),m.removeEventListener("pointerenter",y),m.removeEventListener("pointerleave",v)}}},[u.scrollArea,u.scrollHideDelay]),f.jsx(Zt,{present:o||c,children:f.jsx(am,{"data-state":c?"visible":"hidden",...s,ref:l})})}),By=w.forwardRef((n,l)=>{const{forceMount:o,...s}=n,u=$t(pn,n.__scopeScrollArea),c=n.orientation==="horizontal",p=os(()=>h("SCROLL_END"),100),[m,h]=$y("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return w.useEffect(()=>{if(m==="idle"){const y=window.setTimeout(()=>h("HIDE"),u.scrollHideDelay);return()=>window.clearTimeout(y)}},[m,u.scrollHideDelay,h]),w.useEffect(()=>{const y=u.viewport,v=c?"scrollLeft":"scrollTop";if(y){let x=y[v];const S=()=>{const C=y[v];x!==C&&(h("SCROLL"),p()),x=C};return y.addEventListener("scroll",S),()=>y.removeEventListener("scroll",S)}},[u.viewport,c,h,p]),f.jsx(Zt,{present:o||m!=="hidden",children:f.jsx(Ou,{"data-state":m==="hidden"?"hidden":"visible",...s,ref:l,onPointerEnter:Be(n.onPointerEnter,()=>h("POINTER_ENTER")),onPointerLeave:Be(n.onPointerLeave,()=>h("POINTER_LEAVE"))})})}),am=w.forwardRef((n,l)=>{const o=$t(pn,n.__scopeScrollArea),{forceMount:s,...u}=n,[c,p]=w.useState(!1),m=n.orientation==="horizontal",h=os(()=>{if(o.viewport){const y=o.viewport.offsetWidth<o.viewport.scrollWidth,v=o.viewport.offsetHeight<o.viewport.scrollHeight;p(m?y:v)}},10);return io(o.viewport,h),io(o.content,h),f.jsx(Zt,{present:s||c,children:f.jsx(Ou,{"data-state":c?"visible":"hidden",...u,ref:l})})}),Ou=w.forwardRef((n,l)=>{const{orientation:o="vertical",...s}=n,u=$t(pn,n.__scopeScrollArea),c=w.useRef(null),p=w.useRef(0),[m,h]=w.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),y=pm(m.viewport,m.content),v={...s,sizes:m,onSizesChange:h,hasThumb:y>0&&y<1,onThumbChange:S=>c.current=S,onThumbPointerUp:()=>p.current=0,onThumbPointerDown:S=>p.current=S};function x(S,C){return Qy(S,p.current,m,C)}return o==="horizontal"?f.jsx(Hy,{...v,ref:l,onThumbPositionChange:()=>{if(u.viewport&&c.current){const S=u.viewport.scrollLeft,C=Jf(S,m,u.dir);c.current.style.transform=`translate3d(${C}px, 0, 0)`}},onWheelScroll:S=>{u.viewport&&(u.viewport.scrollLeft=S)},onDragScroll:S=>{u.viewport&&(u.viewport.scrollLeft=x(S,u.dir))}}):o==="vertical"?f.jsx(Vy,{...v,ref:l,onThumbPositionChange:()=>{if(u.viewport&&c.current){const S=u.viewport.scrollTop,C=Jf(S,m);c.current.style.transform=`translate3d(0, ${C}px, 0)`}},onWheelScroll:S=>{u.viewport&&(u.viewport.scrollTop=S)},onDragScroll:S=>{u.viewport&&(u.viewport.scrollTop=x(S))}}):null}),Hy=w.forwardRef((n,l)=>{const{sizes:o,onSizesChange:s,...u}=n,c=$t(pn,n.__scopeScrollArea),[p,m]=w.useState(),h=w.useRef(null),y=rt(l,h,c.onScrollbarXChange);return w.useEffect(()=>{h.current&&m(getComputedStyle(h.current))},[h]),f.jsx(cm,{"data-orientation":"horizontal",...u,ref:y,sizes:o,style:{bottom:0,left:c.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:c.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":rs(o)+"px",...n.style},onThumbPointerDown:v=>n.onThumbPointerDown(v.x),onDragScroll:v=>n.onDragScroll(v.x),onWheelScroll:(v,x)=>{if(c.viewport){const S=c.viewport.scrollLeft+v.deltaX;n.onWheelScroll(S),hm(S,x)&&v.preventDefault()}},onResize:()=>{h.current&&c.viewport&&p&&s({content:c.viewport.scrollWidth,viewport:c.viewport.offsetWidth,scrollbar:{size:h.current.clientWidth,paddingStart:Qi(p.paddingLeft),paddingEnd:Qi(p.paddingRight)}})}})}),Vy=w.forwardRef((n,l)=>{const{sizes:o,onSizesChange:s,...u}=n,c=$t(pn,n.__scopeScrollArea),[p,m]=w.useState(),h=w.useRef(null),y=rt(l,h,c.onScrollbarYChange);return w.useEffect(()=>{h.current&&m(getComputedStyle(h.current))},[h]),f.jsx(cm,{"data-orientation":"vertical",...u,ref:y,sizes:o,style:{top:0,right:c.dir==="ltr"?0:void 0,left:c.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":rs(o)+"px",...n.style},onThumbPointerDown:v=>n.onThumbPointerDown(v.y),onDragScroll:v=>n.onDragScroll(v.y),onWheelScroll:(v,x)=>{if(c.viewport){const S=c.viewport.scrollTop+v.deltaY;n.onWheelScroll(S),hm(S,x)&&v.preventDefault()}},onResize:()=>{h.current&&c.viewport&&p&&s({content:c.viewport.scrollHeight,viewport:c.viewport.offsetHeight,scrollbar:{size:h.current.clientHeight,paddingStart:Qi(p.paddingTop),paddingEnd:Qi(p.paddingBottom)}})}})}),[Uy,um]=rm(pn),cm=w.forwardRef((n,l)=>{const{__scopeScrollArea:o,sizes:s,hasThumb:u,onThumbChange:c,onThumbPointerUp:p,onThumbPointerDown:m,onThumbPositionChange:h,onDragScroll:y,onWheelScroll:v,onResize:x,...S}=n,C=$t(pn,o),[P,k]=w.useState(null),E=rt(l,W=>k(W)),A=w.useRef(null),D=w.useRef(""),$=C.viewport,N=s.content-s.viewport,F=Tt(v),V=Tt(h),L=os(x,10);function R(W){if(A.current){const Q=W.clientX-A.current.left,ee=W.clientY-A.current.top;y({x:Q,y:ee})}}return w.useEffect(()=>{const W=Q=>{const ee=Q.target;(P==null?void 0:P.contains(ee))&&F(Q,N)};return document.addEventListener("wheel",W,{passive:!1}),()=>document.removeEventListener("wheel",W,{passive:!1})},[$,P,N,F]),w.useEffect(V,[s,V]),io(P,L),io(C.content,L),f.jsx(Uy,{scope:o,scrollbar:P,hasThumb:u,onThumbChange:Tt(c),onThumbPointerUp:Tt(p),onThumbPositionChange:V,onThumbPointerDown:Tt(m),children:f.jsx(He.div,{...S,ref:E,style:{position:"absolute",...S.style},onPointerDown:Be(n.onPointerDown,W=>{W.button===0&&(W.target.setPointerCapture(W.pointerId),A.current=P.getBoundingClientRect(),D.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",C.viewport&&(C.viewport.style.scrollBehavior="auto"),R(W))}),onPointerMove:Be(n.onPointerMove,R),onPointerUp:Be(n.onPointerUp,W=>{const Q=W.target;Q.hasPointerCapture(W.pointerId)&&Q.releasePointerCapture(W.pointerId),document.body.style.webkitUserSelect=D.current,C.viewport&&(C.viewport.style.scrollBehavior=""),A.current=null})})})}),Xi="ScrollAreaThumb",dm=w.forwardRef((n,l)=>{const{forceMount:o,...s}=n,u=um(Xi,n.__scopeScrollArea);return f.jsx(Zt,{present:o||u.hasThumb,children:f.jsx(Yy,{ref:l,...s})})}),Yy=w.forwardRef((n,l)=>{const{__scopeScrollArea:o,style:s,...u}=n,c=$t(Xi,o),p=um(Xi,o),{onThumbPositionChange:m}=p,h=rt(l,x=>p.onThumbChange(x)),y=w.useRef(void 0),v=os(()=>{y.current&&(y.current(),y.current=void 0)},100);return w.useEffect(()=>{const x=c.viewport;if(x){const S=()=>{if(v(),!y.current){const C=Gy(x,m);y.current=C,m()}};return m(),x.addEventListener("scroll",S),()=>x.removeEventListener("scroll",S)}},[c.viewport,v,m]),f.jsx(He.div,{"data-state":p.hasThumb?"visible":"hidden",...u,ref:h,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...s},onPointerDownCapture:Be(n.onPointerDownCapture,x=>{const C=x.target.getBoundingClientRect(),P=x.clientX-C.left,k=x.clientY-C.top;p.onThumbPointerDown({x:P,y:k})}),onPointerUp:Be(n.onPointerUp,p.onThumbPointerUp)})});dm.displayName=Xi;var Mu="ScrollAreaCorner",fm=w.forwardRef((n,l)=>{const o=$t(Mu,n.__scopeScrollArea),s=!!(o.scrollbarX&&o.scrollbarY);return o.type!=="scroll"&&s?f.jsx(Xy,{...n,ref:l}):null});fm.displayName=Mu;var Xy=w.forwardRef((n,l)=>{const{__scopeScrollArea:o,...s}=n,u=$t(Mu,o),[c,p]=w.useState(0),[m,h]=w.useState(0),y=!!(c&&m);return io(u.scrollbarX,()=>{var x;const v=((x=u.scrollbarX)==null?void 0:x.offsetHeight)||0;u.onCornerHeightChange(v),h(v)}),io(u.scrollbarY,()=>{var x;const v=((x=u.scrollbarY)==null?void 0:x.offsetWidth)||0;u.onCornerWidthChange(v),p(v)}),y?f.jsx(He.div,{...s,ref:l,style:{width:c,height:m,position:"absolute",right:u.dir==="ltr"?0:void 0,left:u.dir==="rtl"?0:void 0,bottom:0,...n.style}}):null});function Qi(n){return n?parseInt(n,10):0}function pm(n,l){const o=n/l;return isNaN(o)?0:o}function rs(n){const l=pm(n.viewport,n.content),o=n.scrollbar.paddingStart+n.scrollbar.paddingEnd,s=(n.scrollbar.size-o)*l;return Math.max(s,18)}function Qy(n,l,o,s="ltr"){const u=rs(o),c=u/2,p=l||c,m=u-p,h=o.scrollbar.paddingStart+p,y=o.scrollbar.size-o.scrollbar.paddingEnd-m,v=o.content-o.viewport,x=s==="ltr"?[0,v]:[v*-1,0];return mm([h,y],x)(n)}function Jf(n,l,o="ltr"){const s=rs(l),u=l.scrollbar.paddingStart+l.scrollbar.paddingEnd,c=l.scrollbar.size-u,p=l.content-l.viewport,m=c-s,h=o==="ltr"?[0,p]:[p*-1,0],y=Iy(n,h);return mm([0,p],[0,m])(y)}function mm(n,l){return o=>{if(n[0]===n[1]||l[0]===l[1])return l[0];const s=(l[1]-l[0])/(n[1]-n[0]);return l[0]+s*(o-n[0])}}function hm(n,l){return n>0&&n<l}var Gy=(n,l=()=>{})=>{let o={left:n.scrollLeft,top:n.scrollTop},s=0;return(function u(){const c={left:n.scrollLeft,top:n.scrollTop},p=o.left!==c.left,m=o.top!==c.top;(p||m)&&l(),o=c,s=window.requestAnimationFrame(u)})(),()=>window.cancelAnimationFrame(s)};function os(n,l){const o=Tt(n),s=w.useRef(0);return w.useEffect(()=>()=>window.clearTimeout(s.current),[]),w.useCallback(()=>{window.clearTimeout(s.current),s.current=window.setTimeout(o,l)},[o,l])}function io(n,l){const o=Tt(l);cn(()=>{let s=0;if(n){const u=new ResizeObserver(()=>{cancelAnimationFrame(s),s=window.requestAnimationFrame(o)});return u.observe(n),()=>{window.cancelAnimationFrame(s),u.unobserve(n)}}},[n,o])}var Ky=om,qy=im,Zy=fm;function ep({className:n,children:l,...o}){return f.jsxs(Ky,{"data-slot":"scroll-area",className:fn("relative",n),...o,children:[f.jsx(qy,{"data-slot":"scroll-area-viewport",className:"focus-visible:ring-ring/50 size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:outline-1",children:l}),f.jsx(Jy,{}),f.jsx(Zy,{})]})}function Jy({className:n,orientation:l="vertical",...o}){return f.jsx(sm,{"data-slot":"scroll-area-scrollbar",orientation:l,className:fn("flex touch-none p-px transition-colors select-none",l==="vertical"&&"h-full w-2.5 border-l border-l-transparent",l==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent",n),...o,children:f.jsx(dm,{"data-slot":"scroll-area-thumb",className:"bg-border relative flex-1 rounded-full"})})}function ex(n,l=globalThis==null?void 0:globalThis.document){const o=Tt(n);w.useEffect(()=>{const s=u=>{u.key==="Escape"&&o(u)};return l.addEventListener("keydown",s,{capture:!0}),()=>l.removeEventListener("keydown",s,{capture:!0})},[o,l])}var tx="DismissableLayer",vu="dismissableLayer.update",nx="dismissableLayer.pointerDownOutside",rx="dismissableLayer.focusOutside",tp,gm=w.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Du=w.forwardRef((n,l)=>{const{disableOutsidePointerEvents:o=!1,onEscapeKeyDown:s,onPointerDownOutside:u,onFocusOutside:c,onInteractOutside:p,onDismiss:m,...h}=n,y=w.useContext(gm),[v,x]=w.useState(null),S=(v==null?void 0:v.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,C]=w.useState({}),P=rt(l,L=>x(L)),k=Array.from(y.layers),[E]=[...y.layersWithOutsidePointerEventsDisabled].slice(-1),A=k.indexOf(E),D=v?k.indexOf(v):-1,$=y.layersWithOutsidePointerEventsDisabled.size>0,N=D>=A,F=ix(L=>{const R=L.target,W=[...y.branches].some(Q=>Q.contains(R));!N||W||(u==null||u(L),p==null||p(L),L.defaultPrevented||m==null||m())},S),V=sx(L=>{const R=L.target;[...y.branches].some(Q=>Q.contains(R))||(c==null||c(L),p==null||p(L),L.defaultPrevented||m==null||m())},S);return ex(L=>{D===y.layers.size-1&&(s==null||s(L),!L.defaultPrevented&&m&&(L.preventDefault(),m()))},S),w.useEffect(()=>{if(v)return o&&(y.layersWithOutsidePointerEventsDisabled.size===0&&(tp=S.body.style.pointerEvents,S.body.style.pointerEvents="none"),y.layersWithOutsidePointerEventsDisabled.add(v)),y.layers.add(v),np(),()=>{o&&y.layersWithOutsidePointerEventsDisabled.size===1&&(S.body.style.pointerEvents=tp)}},[v,S,o,y]),w.useEffect(()=>()=>{v&&(y.layers.delete(v),y.layersWithOutsidePointerEventsDisabled.delete(v),np())},[v,y]),w.useEffect(()=>{const L=()=>C({});return document.addEventListener(vu,L),()=>document.removeEventListener(vu,L)},[]),f.jsx(He.div,{...h,ref:P,style:{pointerEvents:$?N?"auto":"none":void 0,...n.style},onFocusCapture:Be(n.onFocusCapture,V.onFocusCapture),onBlurCapture:Be(n.onBlurCapture,V.onBlurCapture),onPointerDownCapture:Be(n.onPointerDownCapture,F.onPointerDownCapture)})});Du.displayName=tx;var ox="DismissableLayerBranch",lx=w.forwardRef((n,l)=>{const o=w.useContext(gm),s=w.useRef(null),u=rt(l,s);return w.useEffect(()=>{const c=s.current;if(c)return o.branches.add(c),()=>{o.branches.delete(c)}},[o.branches]),f.jsx(He.div,{...n,ref:u})});lx.displayName=ox;function ix(n,l=globalThis==null?void 0:globalThis.document){const o=Tt(n),s=w.useRef(!1),u=w.useRef(()=>{});return w.useEffect(()=>{const c=m=>{if(m.target&&!s.current){let h=function(){vm(nx,o,y,{discrete:!0})};const y={originalEvent:m};m.pointerType==="touch"?(l.removeEventListener("click",u.current),u.current=h,l.addEventListener("click",u.current,{once:!0})):h()}else l.removeEventListener("click",u.current);s.current=!1},p=window.setTimeout(()=>{l.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(p),l.removeEventListener("pointerdown",c),l.removeEventListener("click",u.current)}},[l,o]),{onPointerDownCapture:()=>s.current=!0}}function sx(n,l=globalThis==null?void 0:globalThis.document){const o=Tt(n),s=w.useRef(!1);return w.useEffect(()=>{const u=c=>{c.target&&!s.current&&vm(rx,o,{originalEvent:c},{discrete:!1})};return l.addEventListener("focusin",u),()=>l.removeEventListener("focusin",u)},[l,o]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function np(){const n=new CustomEvent(vu);document.dispatchEvent(n)}function vm(n,l,o,{discrete:s}){const u=o.originalEvent.target,c=new CustomEvent(n,{bubbles:!1,cancelable:!0,detail:o});l&&u.addEventListener(n,l,{once:!0}),s?Py(u,c):u.dispatchEvent(c)}var ax=ju[" useId ".trim().toString()]||(()=>{}),ux=0;function ol(n){const[l,o]=w.useState(ax());return cn(()=>{o(s=>s??String(ux++))},[n]),l?`radix-${l}`:""}const cx=["top","right","bottom","left"],tr=Math.min,Rt=Math.max,Gi=Math.round,Ti=Math.floor,un=n=>({x:n,y:n}),dx={left:"right",right:"left",bottom:"top",top:"bottom"},fx={start:"end",end:"start"};function yu(n,l,o){return Rt(n,tr(l,o))}function jn(n,l){return typeof n=="function"?n(l):n}function Rn(n){return n.split("-")[0]}function uo(n){return n.split("-")[1]}function Lu(n){return n==="x"?"y":"x"}function zu(n){return n==="y"?"height":"width"}const px=new Set(["top","bottom"]);function an(n){return px.has(Rn(n))?"y":"x"}function Iu(n){return Lu(an(n))}function mx(n,l,o){o===void 0&&(o=!1);const s=uo(n),u=Iu(n),c=zu(u);let p=u==="x"?s===(o?"end":"start")?"right":"left":s==="start"?"bottom":"top";return l.reference[c]>l.floating[c]&&(p=Ki(p)),[p,Ki(p)]}function hx(n){const l=Ki(n);return[xu(n),l,xu(l)]}function xu(n){return n.replace(/start|end/g,l=>fx[l])}const rp=["left","right"],op=["right","left"],gx=["top","bottom"],vx=["bottom","top"];function yx(n,l,o){switch(n){case"top":case"bottom":return o?l?op:rp:l?rp:op;case"left":case"right":return l?gx:vx;default:return[]}}function xx(n,l,o,s){const u=uo(n);let c=yx(Rn(n),o==="start",s);return u&&(c=c.map(p=>p+"-"+u),l&&(c=c.concat(c.map(xu)))),c}function Ki(n){return n.replace(/left|right|bottom|top/g,l=>dx[l])}function wx(n){return{top:0,right:0,bottom:0,left:0,...n}}function ym(n){return typeof n!="number"?wx(n):{top:n,right:n,bottom:n,left:n}}function qi(n){const{x:l,y:o,width:s,height:u}=n;return{width:s,height:u,top:o,left:l,right:l+s,bottom:o+u,x:l,y:o}}function lp(n,l,o){let{reference:s,floating:u}=n;const c=an(l),p=Iu(l),m=zu(p),h=Rn(l),y=c==="y",v=s.x+s.width/2-u.width/2,x=s.y+s.height/2-u.height/2,S=s[m]/2-u[m]/2;let C;switch(h){case"top":C={x:v,y:s.y-u.height};break;case"bottom":C={x:v,y:s.y+s.height};break;case"right":C={x:s.x+s.width,y:x};break;case"left":C={x:s.x-u.width,y:x};break;default:C={x:s.x,y:s.y}}switch(uo(l)){case"start":C[p]-=S*(o&&y?-1:1);break;case"end":C[p]+=S*(o&&y?-1:1);break}return C}const Sx=async(n,l,o)=>{const{placement:s="bottom",strategy:u="absolute",middleware:c=[],platform:p}=o,m=c.filter(Boolean),h=await(p.isRTL==null?void 0:p.isRTL(l));let y=await p.getElementRects({reference:n,floating:l,strategy:u}),{x:v,y:x}=lp(y,s,h),S=s,C={},P=0;for(let k=0;k<m.length;k++){const{name:E,fn:A}=m[k],{x:D,y:$,data:N,reset:F}=await A({x:v,y:x,initialPlacement:s,placement:S,strategy:u,middlewareData:C,rects:y,platform:p,elements:{reference:n,floating:l}});v=D??v,x=$??x,C={...C,[E]:{...C[E],...N}},F&&P<=50&&(P++,typeof F=="object"&&(F.placement&&(S=F.placement),F.rects&&(y=F.rects===!0?await p.getElementRects({reference:n,floating:l,strategy:u}):F.rects),{x:v,y:x}=lp(y,S,h)),k=-1)}return{x:v,y:x,placement:S,strategy:u,middlewareData:C}};async function sl(n,l){var o;l===void 0&&(l={});const{x:s,y:u,platform:c,rects:p,elements:m,strategy:h}=n,{boundary:y="clippingAncestors",rootBoundary:v="viewport",elementContext:x="floating",altBoundary:S=!1,padding:C=0}=jn(l,n),P=ym(C),E=m[S?x==="floating"?"reference":"floating":x],A=qi(await c.getClippingRect({element:(o=await(c.isElement==null?void 0:c.isElement(E)))==null||o?E:E.contextElement||await(c.getDocumentElement==null?void 0:c.getDocumentElement(m.floating)),boundary:y,rootBoundary:v,strategy:h})),D=x==="floating"?{x:s,y:u,width:p.floating.width,height:p.floating.height}:p.reference,$=await(c.getOffsetParent==null?void 0:c.getOffsetParent(m.floating)),N=await(c.isElement==null?void 0:c.isElement($))?await(c.getScale==null?void 0:c.getScale($))||{x:1,y:1}:{x:1,y:1},F=qi(c.convertOffsetParentRelativeRectToViewportRelativeRect?await c.convertOffsetParentRelativeRectToViewportRelativeRect({elements:m,rect:D,offsetParent:$,strategy:h}):D);return{top:(A.top-F.top+P.top)/N.y,bottom:(F.bottom-A.bottom+P.bottom)/N.y,left:(A.left-F.left+P.left)/N.x,right:(F.right-A.right+P.right)/N.x}}const bx=n=>({name:"arrow",options:n,async fn(l){const{x:o,y:s,placement:u,rects:c,platform:p,elements:m,middlewareData:h}=l,{element:y,padding:v=0}=jn(n,l)||{};if(y==null)return{};const x=ym(v),S={x:o,y:s},C=Iu(u),P=zu(C),k=await p.getDimensions(y),E=C==="y",A=E?"top":"left",D=E?"bottom":"right",$=E?"clientHeight":"clientWidth",N=c.reference[P]+c.reference[C]-S[C]-c.floating[P],F=S[C]-c.reference[C],V=await(p.getOffsetParent==null?void 0:p.getOffsetParent(y));let L=V?V[$]:0;(!L||!await(p.isElement==null?void 0:p.isElement(V)))&&(L=m.floating[$]||c.floating[P]);const R=N/2-F/2,W=L/2-k[P]/2-1,Q=tr(x[A],W),ee=tr(x[D],W),ce=Q,U=L-k[P]-ee,q=L/2-k[P]/2+R,te=yu(ce,q,U),J=!h.arrow&&uo(u)!=null&&q!==te&&c.reference[P]/2-(q<ce?Q:ee)-k[P]/2<0,ne=J?q<ce?q-ce:q-U:0;return{[C]:S[C]+ne,data:{[C]:te,centerOffset:q-te-ne,...J&&{alignmentOffset:ne}},reset:J}}}),Cx=function(n){return n===void 0&&(n={}),{name:"flip",options:n,async fn(l){var o,s;const{placement:u,middlewareData:c,rects:p,initialPlacement:m,platform:h,elements:y}=l,{mainAxis:v=!0,crossAxis:x=!0,fallbackPlacements:S,fallbackStrategy:C="bestFit",fallbackAxisSideDirection:P="none",flipAlignment:k=!0,...E}=jn(n,l);if((o=c.arrow)!=null&&o.alignmentOffset)return{};const A=Rn(u),D=an(m),$=Rn(m)===m,N=await(h.isRTL==null?void 0:h.isRTL(y.floating)),F=S||($||!k?[Ki(m)]:hx(m)),V=P!=="none";!S&&V&&F.push(...xx(m,k,P,N));const L=[m,...F],R=await sl(l,E),W=[];let Q=((s=c.flip)==null?void 0:s.overflows)||[];if(v&&W.push(R[A]),x){const q=mx(u,p,N);W.push(R[q[0]],R[q[1]])}if(Q=[...Q,{placement:u,overflows:W}],!W.every(q=>q<=0)){var ee,ce;const q=(((ee=c.flip)==null?void 0:ee.index)||0)+1,te=L[q];if(te&&(!(x==="alignment"?D!==an(te):!1)||Q.every(B=>an(B.placement)===D?B.overflows[0]>0:!0)))return{data:{index:q,overflows:Q},reset:{placement:te}};let J=(ce=Q.filter(ne=>ne.overflows[0]<=0).sort((ne,B)=>ne.overflows[1]-B.overflows[1])[0])==null?void 0:ce.placement;if(!J)switch(C){case"bestFit":{var U;const ne=(U=Q.filter(B=>{if(V){const K=an(B.placement);return K===D||K==="y"}return!0}).map(B=>[B.placement,B.overflows.filter(K=>K>0).reduce((K,I)=>K+I,0)]).sort((B,K)=>B[1]-K[1])[0])==null?void 0:U[0];ne&&(J=ne);break}case"initialPlacement":J=m;break}if(u!==J)return{reset:{placement:J}}}return{}}}};function ip(n,l){return{top:n.top-l.height,right:n.right-l.width,bottom:n.bottom-l.height,left:n.left-l.width}}function sp(n){return cx.some(l=>n[l]>=0)}const kx=function(n){return n===void 0&&(n={}),{name:"hide",options:n,async fn(l){const{rects:o}=l,{strategy:s="referenceHidden",...u}=jn(n,l);switch(s){case"referenceHidden":{const c=await sl(l,{...u,elementContext:"reference"}),p=ip(c,o.reference);return{data:{referenceHiddenOffsets:p,referenceHidden:sp(p)}}}case"escaped":{const c=await sl(l,{...u,altBoundary:!0}),p=ip(c,o.floating);return{data:{escapedOffsets:p,escaped:sp(p)}}}default:return{}}}}},xm=new Set(["left","top"]);async function Ex(n,l){const{placement:o,platform:s,elements:u}=n,c=await(s.isRTL==null?void 0:s.isRTL(u.floating)),p=Rn(o),m=uo(o),h=an(o)==="y",y=xm.has(p)?-1:1,v=c&&h?-1:1,x=jn(l,n);let{mainAxis:S,crossAxis:C,alignmentAxis:P}=typeof x=="number"?{mainAxis:x,crossAxis:0,alignmentAxis:null}:{mainAxis:x.mainAxis||0,crossAxis:x.crossAxis||0,alignmentAxis:x.alignmentAxis};return m&&typeof P=="number"&&(C=m==="end"?P*-1:P),h?{x:C*v,y:S*y}:{x:S*y,y:C*v}}const Nx=function(n){return n===void 0&&(n=0),{name:"offset",options:n,async fn(l){var o,s;const{x:u,y:c,placement:p,middlewareData:m}=l,h=await Ex(l,n);return p===((o=m.offset)==null?void 0:o.placement)&&(s=m.arrow)!=null&&s.alignmentOffset?{}:{x:u+h.x,y:c+h.y,data:{...h,placement:p}}}}},jx=function(n){return n===void 0&&(n={}),{name:"shift",options:n,async fn(l){const{x:o,y:s,placement:u}=l,{mainAxis:c=!0,crossAxis:p=!1,limiter:m={fn:E=>{let{x:A,y:D}=E;return{x:A,y:D}}},...h}=jn(n,l),y={x:o,y:s},v=await sl(l,h),x=an(Rn(u)),S=Lu(x);let C=y[S],P=y[x];if(c){const E=S==="y"?"top":"left",A=S==="y"?"bottom":"right",D=C+v[E],$=C-v[A];C=yu(D,C,$)}if(p){const E=x==="y"?"top":"left",A=x==="y"?"bottom":"right",D=P+v[E],$=P-v[A];P=yu(D,P,$)}const k=m.fn({...l,[S]:C,[x]:P});return{...k,data:{x:k.x-o,y:k.y-s,enabled:{[S]:c,[x]:p}}}}}},Rx=function(n){return n===void 0&&(n={}),{options:n,fn(l){const{x:o,y:s,placement:u,rects:c,middlewareData:p}=l,{offset:m=0,mainAxis:h=!0,crossAxis:y=!0}=jn(n,l),v={x:o,y:s},x=an(u),S=Lu(x);let C=v[S],P=v[x];const k=jn(m,l),E=typeof k=="number"?{mainAxis:k,crossAxis:0}:{mainAxis:0,crossAxis:0,...k};if(h){const $=S==="y"?"height":"width",N=c.reference[S]-c.floating[$]+E.mainAxis,F=c.reference[S]+c.reference[$]-E.mainAxis;C<N?C=N:C>F&&(C=F)}if(y){var A,D;const $=S==="y"?"width":"height",N=xm.has(Rn(u)),F=c.reference[x]-c.floating[$]+(N&&((A=p.offset)==null?void 0:A[x])||0)+(N?0:E.crossAxis),V=c.reference[x]+c.reference[$]+(N?0:((D=p.offset)==null?void 0:D[x])||0)-(N?E.crossAxis:0);P<F?P=F:P>V&&(P=V)}return{[S]:C,[x]:P}}}},Tx=function(n){return n===void 0&&(n={}),{name:"size",options:n,async fn(l){var o,s;const{placement:u,rects:c,platform:p,elements:m}=l,{apply:h=()=>{},...y}=jn(n,l),v=await sl(l,y),x=Rn(u),S=uo(u),C=an(u)==="y",{width:P,height:k}=c.floating;let E,A;x==="top"||x==="bottom"?(E=x,A=S===(await(p.isRTL==null?void 0:p.isRTL(m.floating))?"start":"end")?"left":"right"):(A=x,E=S==="end"?"top":"bottom");const D=k-v.top-v.bottom,$=P-v.left-v.right,N=tr(k-v[E],D),F=tr(P-v[A],$),V=!l.middlewareData.shift;let L=N,R=F;if((o=l.middlewareData.shift)!=null&&o.enabled.x&&(R=$),(s=l.middlewareData.shift)!=null&&s.enabled.y&&(L=D),V&&!S){const Q=Rt(v.left,0),ee=Rt(v.right,0),ce=Rt(v.top,0),U=Rt(v.bottom,0);C?R=P-2*(Q!==0||ee!==0?Q+ee:Rt(v.left,v.right)):L=k-2*(ce!==0||U!==0?ce+U:Rt(v.top,v.bottom))}await h({...l,availableWidth:R,availableHeight:L});const W=await p.getDimensions(m.floating);return P!==W.width||k!==W.height?{reset:{rects:!0}}:{}}}};function ls(){return typeof window<"u"}function co(n){return wm(n)?(n.nodeName||"").toLowerCase():"#document"}function Pt(n){var l;return(n==null||(l=n.ownerDocument)==null?void 0:l.defaultView)||window}function mn(n){var l;return(l=(wm(n)?n.ownerDocument:n.document)||window.document)==null?void 0:l.documentElement}function wm(n){return ls()?n instanceof Node||n instanceof Pt(n).Node:!1}function Kt(n){return ls()?n instanceof Element||n instanceof Pt(n).Element:!1}function dn(n){return ls()?n instanceof HTMLElement||n instanceof Pt(n).HTMLElement:!1}function ap(n){return!ls()||typeof ShadowRoot>"u"?!1:n instanceof ShadowRoot||n instanceof Pt(n).ShadowRoot}const Px=new Set(["inline","contents"]);function dl(n){const{overflow:l,overflowX:o,overflowY:s,display:u}=qt(n);return/auto|scroll|overlay|hidden|clip/.test(l+s+o)&&!Px.has(u)}const _x=new Set(["table","td","th"]);function Ax(n){return _x.has(co(n))}const Ox=[":popover-open",":modal"];function is(n){return Ox.some(l=>{try{return n.matches(l)}catch{return!1}})}const Mx=["transform","translate","scale","rotate","perspective"],Dx=["transform","translate","scale","rotate","perspective","filter"],Lx=["paint","layout","strict","content"];function $u(n){const l=Fu(),o=Kt(n)?qt(n):n;return Mx.some(s=>o[s]?o[s]!=="none":!1)||(o.containerType?o.containerType!=="normal":!1)||!l&&(o.backdropFilter?o.backdropFilter!=="none":!1)||!l&&(o.filter?o.filter!=="none":!1)||Dx.some(s=>(o.willChange||"").includes(s))||Lx.some(s=>(o.contain||"").includes(s))}function zx(n){let l=nr(n);for(;dn(l)&&!so(l);){if($u(l))return l;if(is(l))return null;l=nr(l)}return null}function Fu(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Ix=new Set(["html","body","#document"]);function so(n){return Ix.has(co(n))}function qt(n){return Pt(n).getComputedStyle(n)}function ss(n){return Kt(n)?{scrollLeft:n.scrollLeft,scrollTop:n.scrollTop}:{scrollLeft:n.scrollX,scrollTop:n.scrollY}}function nr(n){if(co(n)==="html")return n;const l=n.assignedSlot||n.parentNode||ap(n)&&n.host||mn(n);return ap(l)?l.host:l}function Sm(n){const l=nr(n);return so(l)?n.ownerDocument?n.ownerDocument.body:n.body:dn(l)&&dl(l)?l:Sm(l)}function al(n,l,o){var s;l===void 0&&(l=[]),o===void 0&&(o=!0);const u=Sm(n),c=u===((s=n.ownerDocument)==null?void 0:s.body),p=Pt(u);if(c){const m=wu(p);return l.concat(p,p.visualViewport||[],dl(u)?u:[],m&&o?al(m):[])}return l.concat(u,al(u,[],o))}function wu(n){return n.parent&&Object.getPrototypeOf(n.parent)?n.frameElement:null}function bm(n){const l=qt(n);let o=parseFloat(l.width)||0,s=parseFloat(l.height)||0;const u=dn(n),c=u?n.offsetWidth:o,p=u?n.offsetHeight:s,m=Gi(o)!==c||Gi(s)!==p;return m&&(o=c,s=p),{width:o,height:s,$:m}}function Wu(n){return Kt(n)?n:n.contextElement}function eo(n){const l=Wu(n);if(!dn(l))return un(1);const o=l.getBoundingClientRect(),{width:s,height:u,$:c}=bm(l);let p=(c?Gi(o.width):o.width)/s,m=(c?Gi(o.height):o.height)/u;return(!p||!Number.isFinite(p))&&(p=1),(!m||!Number.isFinite(m))&&(m=1),{x:p,y:m}}const $x=un(0);function Cm(n){const l=Pt(n);return!Fu()||!l.visualViewport?$x:{x:l.visualViewport.offsetLeft,y:l.visualViewport.offsetTop}}function Fx(n,l,o){return l===void 0&&(l=!1),!o||l&&o!==Pt(n)?!1:l}function Er(n,l,o,s){l===void 0&&(l=!1),o===void 0&&(o=!1);const u=n.getBoundingClientRect(),c=Wu(n);let p=un(1);l&&(s?Kt(s)&&(p=eo(s)):p=eo(n));const m=Fx(c,o,s)?Cm(c):un(0);let h=(u.left+m.x)/p.x,y=(u.top+m.y)/p.y,v=u.width/p.x,x=u.height/p.y;if(c){const S=Pt(c),C=s&&Kt(s)?Pt(s):s;let P=S,k=wu(P);for(;k&&s&&C!==P;){const E=eo(k),A=k.getBoundingClientRect(),D=qt(k),$=A.left+(k.clientLeft+parseFloat(D.paddingLeft))*E.x,N=A.top+(k.clientTop+parseFloat(D.paddingTop))*E.y;h*=E.x,y*=E.y,v*=E.x,x*=E.y,h+=$,y+=N,P=Pt(k),k=wu(P)}}return qi({width:v,height:x,x:h,y})}function as(n,l){const o=ss(n).scrollLeft;return l?l.left+o:Er(mn(n)).left+o}function km(n,l){const o=n.getBoundingClientRect(),s=o.left+l.scrollLeft-as(n,o),u=o.top+l.scrollTop;return{x:s,y:u}}function Wx(n){let{elements:l,rect:o,offsetParent:s,strategy:u}=n;const c=u==="fixed",p=mn(s),m=l?is(l.floating):!1;if(s===p||m&&c)return o;let h={scrollLeft:0,scrollTop:0},y=un(1);const v=un(0),x=dn(s);if((x||!x&&!c)&&((co(s)!=="body"||dl(p))&&(h=ss(s)),dn(s))){const C=Er(s);y=eo(s),v.x=C.x+s.clientLeft,v.y=C.y+s.clientTop}const S=p&&!x&&!c?km(p,h):un(0);return{width:o.width*y.x,height:o.height*y.y,x:o.x*y.x-h.scrollLeft*y.x+v.x+S.x,y:o.y*y.y-h.scrollTop*y.y+v.y+S.y}}function Bx(n){return Array.from(n.getClientRects())}function Hx(n){const l=mn(n),o=ss(n),s=n.ownerDocument.body,u=Rt(l.scrollWidth,l.clientWidth,s.scrollWidth,s.clientWidth),c=Rt(l.scrollHeight,l.clientHeight,s.scrollHeight,s.clientHeight);let p=-o.scrollLeft+as(n);const m=-o.scrollTop;return qt(s).direction==="rtl"&&(p+=Rt(l.clientWidth,s.clientWidth)-u),{width:u,height:c,x:p,y:m}}const up=25;function Vx(n,l){const o=Pt(n),s=mn(n),u=o.visualViewport;let c=s.clientWidth,p=s.clientHeight,m=0,h=0;if(u){c=u.width,p=u.height;const v=Fu();(!v||v&&l==="fixed")&&(m=u.offsetLeft,h=u.offsetTop)}const y=as(s);if(y<=0){const v=s.ownerDocument,x=v.body,S=getComputedStyle(x),C=v.compatMode==="CSS1Compat"&&parseFloat(S.marginLeft)+parseFloat(S.marginRight)||0,P=Math.abs(s.clientWidth-x.clientWidth-C);P<=up&&(c-=P)}else y<=up&&(c+=y);return{width:c,height:p,x:m,y:h}}const Ux=new Set(["absolute","fixed"]);function Yx(n,l){const o=Er(n,!0,l==="fixed"),s=o.top+n.clientTop,u=o.left+n.clientLeft,c=dn(n)?eo(n):un(1),p=n.clientWidth*c.x,m=n.clientHeight*c.y,h=u*c.x,y=s*c.y;return{width:p,height:m,x:h,y}}function cp(n,l,o){let s;if(l==="viewport")s=Vx(n,o);else if(l==="document")s=Hx(mn(n));else if(Kt(l))s=Yx(l,o);else{const u=Cm(n);s={x:l.x-u.x,y:l.y-u.y,width:l.width,height:l.height}}return qi(s)}function Em(n,l){const o=nr(n);return o===l||!Kt(o)||so(o)?!1:qt(o).position==="fixed"||Em(o,l)}function Xx(n,l){const o=l.get(n);if(o)return o;let s=al(n,[],!1).filter(m=>Kt(m)&&co(m)!=="body"),u=null;const c=qt(n).position==="fixed";let p=c?nr(n):n;for(;Kt(p)&&!so(p);){const m=qt(p),h=$u(p);!h&&m.position==="fixed"&&(u=null),(c?!h&&!u:!h&&m.position==="static"&&!!u&&Ux.has(u.position)||dl(p)&&!h&&Em(n,p))?s=s.filter(v=>v!==p):u=m,p=nr(p)}return l.set(n,s),s}function Qx(n){let{element:l,boundary:o,rootBoundary:s,strategy:u}=n;const p=[...o==="clippingAncestors"?is(l)?[]:Xx(l,this._c):[].concat(o),s],m=p[0],h=p.reduce((y,v)=>{const x=cp(l,v,u);return y.top=Rt(x.top,y.top),y.right=tr(x.right,y.right),y.bottom=tr(x.bottom,y.bottom),y.left=Rt(x.left,y.left),y},cp(l,m,u));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}}function Gx(n){const{width:l,height:o}=bm(n);return{width:l,height:o}}function Kx(n,l,o){const s=dn(l),u=mn(l),c=o==="fixed",p=Er(n,!0,c,l);let m={scrollLeft:0,scrollTop:0};const h=un(0);function y(){h.x=as(u)}if(s||!s&&!c)if((co(l)!=="body"||dl(u))&&(m=ss(l)),s){const C=Er(l,!0,c,l);h.x=C.x+l.clientLeft,h.y=C.y+l.clientTop}else u&&y();c&&!s&&u&&y();const v=u&&!s&&!c?km(u,m):un(0),x=p.left+m.scrollLeft-h.x-v.x,S=p.top+m.scrollTop-h.y-v.y;return{x,y:S,width:p.width,height:p.height}}function nu(n){return qt(n).position==="static"}function dp(n,l){if(!dn(n)||qt(n).position==="fixed")return null;if(l)return l(n);let o=n.offsetParent;return mn(n)===o&&(o=o.ownerDocument.body),o}function Nm(n,l){const o=Pt(n);if(is(n))return o;if(!dn(n)){let u=nr(n);for(;u&&!so(u);){if(Kt(u)&&!nu(u))return u;u=nr(u)}return o}let s=dp(n,l);for(;s&&Ax(s)&&nu(s);)s=dp(s,l);return s&&so(s)&&nu(s)&&!$u(s)?o:s||zx(n)||o}const qx=async function(n){const l=this.getOffsetParent||Nm,o=this.getDimensions,s=await o(n.floating);return{reference:Kx(n.reference,await l(n.floating),n.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function Zx(n){return qt(n).direction==="rtl"}const Jx={convertOffsetParentRelativeRectToViewportRelativeRect:Wx,getDocumentElement:mn,getClippingRect:Qx,getOffsetParent:Nm,getElementRects:qx,getClientRects:Bx,getDimensions:Gx,getScale:eo,isElement:Kt,isRTL:Zx};function jm(n,l){return n.x===l.x&&n.y===l.y&&n.width===l.width&&n.height===l.height}function ew(n,l){let o=null,s;const u=mn(n);function c(){var m;clearTimeout(s),(m=o)==null||m.disconnect(),o=null}function p(m,h){m===void 0&&(m=!1),h===void 0&&(h=1),c();const y=n.getBoundingClientRect(),{left:v,top:x,width:S,height:C}=y;if(m||l(),!S||!C)return;const P=Ti(x),k=Ti(u.clientWidth-(v+S)),E=Ti(u.clientHeight-(x+C)),A=Ti(v),$={rootMargin:-P+"px "+-k+"px "+-E+"px "+-A+"px",threshold:Rt(0,tr(1,h))||1};let N=!0;function F(V){const L=V[0].intersectionRatio;if(L!==h){if(!N)return p();L?p(!1,L):s=setTimeout(()=>{p(!1,1e-7)},1e3)}L===1&&!jm(y,n.getBoundingClientRect())&&p(),N=!1}try{o=new IntersectionObserver(F,{...$,root:u.ownerDocument})}catch{o=new IntersectionObserver(F,$)}o.observe(n)}return p(!0),c}function tw(n,l,o,s){s===void 0&&(s={});const{ancestorScroll:u=!0,ancestorResize:c=!0,elementResize:p=typeof ResizeObserver=="function",layoutShift:m=typeof IntersectionObserver=="function",animationFrame:h=!1}=s,y=Wu(n),v=u||c?[...y?al(y):[],...al(l)]:[];v.forEach(A=>{u&&A.addEventListener("scroll",o,{passive:!0}),c&&A.addEventListener("resize",o)});const x=y&&m?ew(y,o):null;let S=-1,C=null;p&&(C=new ResizeObserver(A=>{let[D]=A;D&&D.target===y&&C&&(C.unobserve(l),cancelAnimationFrame(S),S=requestAnimationFrame(()=>{var $;($=C)==null||$.observe(l)})),o()}),y&&!h&&C.observe(y),C.observe(l));let P,k=h?Er(n):null;h&&E();function E(){const A=Er(n);k&&!jm(k,A)&&o(),k=A,P=requestAnimationFrame(E)}return o(),()=>{var A;v.forEach(D=>{u&&D.removeEventListener("scroll",o),c&&D.removeEventListener("resize",o)}),x==null||x(),(A=C)==null||A.disconnect(),C=null,h&&cancelAnimationFrame(P)}}const nw=Nx,rw=jx,ow=Cx,lw=Tx,iw=kx,fp=bx,sw=Rx,aw=(n,l,o)=>{const s=new Map,u={platform:Jx,...o},c={...u.platform,_c:s};return Sx(n,l,{...u,platform:c})};var uw=typeof document<"u",cw=function(){},zi=uw?w.useLayoutEffect:cw;function Zi(n,l){if(n===l)return!0;if(typeof n!=typeof l)return!1;if(typeof n=="function"&&n.toString()===l.toString())return!0;let o,s,u;if(n&&l&&typeof n=="object"){if(Array.isArray(n)){if(o=n.length,o!==l.length)return!1;for(s=o;s--!==0;)if(!Zi(n[s],l[s]))return!1;return!0}if(u=Object.keys(n),o=u.length,o!==Object.keys(l).length)return!1;for(s=o;s--!==0;)if(!{}.hasOwnProperty.call(l,u[s]))return!1;for(s=o;s--!==0;){const c=u[s];if(!(c==="_owner"&&n.$$typeof)&&!Zi(n[c],l[c]))return!1}return!0}return n!==n&&l!==l}function Rm(n){return typeof window>"u"?1:(n.ownerDocument.defaultView||window).devicePixelRatio||1}function pp(n,l){const o=Rm(n);return Math.round(l*o)/o}function ru(n){const l=w.useRef(n);return zi(()=>{l.current=n}),l}function dw(n){n===void 0&&(n={});const{placement:l="bottom",strategy:o="absolute",middleware:s=[],platform:u,elements:{reference:c,floating:p}={},transform:m=!0,whileElementsMounted:h,open:y}=n,[v,x]=w.useState({x:0,y:0,strategy:o,placement:l,middlewareData:{},isPositioned:!1}),[S,C]=w.useState(s);Zi(S,s)||C(s);const[P,k]=w.useState(null),[E,A]=w.useState(null),D=w.useCallback(B=>{B!==V.current&&(V.current=B,k(B))},[]),$=w.useCallback(B=>{B!==L.current&&(L.current=B,A(B))},[]),N=c||P,F=p||E,V=w.useRef(null),L=w.useRef(null),R=w.useRef(v),W=h!=null,Q=ru(h),ee=ru(u),ce=ru(y),U=w.useCallback(()=>{if(!V.current||!L.current)return;const B={placement:l,strategy:o,middleware:S};ee.current&&(B.platform=ee.current),aw(V.current,L.current,B).then(K=>{const I={...K,isPositioned:ce.current!==!1};q.current&&!Zi(R.current,I)&&(R.current=I,_u.flushSync(()=>{x(I)}))})},[S,l,o,ee,ce]);zi(()=>{y===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,x(B=>({...B,isPositioned:!1})))},[y]);const q=w.useRef(!1);zi(()=>(q.current=!0,()=>{q.current=!1}),[]),zi(()=>{if(N&&(V.current=N),F&&(L.current=F),N&&F){if(Q.current)return Q.current(N,F,U);U()}},[N,F,U,Q,W]);const te=w.useMemo(()=>({reference:V,floating:L,setReference:D,setFloating:$}),[D,$]),J=w.useMemo(()=>({reference:N,floating:F}),[N,F]),ne=w.useMemo(()=>{const B={position:o,left:0,top:0};if(!J.floating)return B;const K=pp(J.floating,v.x),I=pp(J.floating,v.y);return m?{...B,transform:"translate("+K+"px, "+I+"px)",...Rm(J.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:K,top:I}},[o,m,J.floating,v.x,v.y]);return w.useMemo(()=>({...v,update:U,refs:te,elements:J,floatingStyles:ne}),[v,U,te,J,ne])}const fw=n=>{function l(o){return{}.hasOwnProperty.call(o,"current")}return{name:"arrow",options:n,fn(o){const{element:s,padding:u}=typeof n=="function"?n(o):n;return s&&l(s)?s.current!=null?fp({element:s.current,padding:u}).fn(o):{}:s?fp({element:s,padding:u}).fn(o):{}}}},pw=(n,l)=>({...nw(n),options:[n,l]}),mw=(n,l)=>({...rw(n),options:[n,l]}),hw=(n,l)=>({...sw(n),options:[n,l]}),gw=(n,l)=>({...ow(n),options:[n,l]}),vw=(n,l)=>({...lw(n),options:[n,l]}),yw=(n,l)=>({...iw(n),options:[n,l]}),xw=(n,l)=>({...fw(n),options:[n,l]});var ww="Arrow",Tm=w.forwardRef((n,l)=>{const{children:o,width:s=10,height:u=5,...c}=n;return f.jsx(He.svg,{...c,ref:l,width:s,height:u,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:n.asChild?o:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});Tm.displayName=ww;var Sw=Tm;function bw(n){const[l,o]=w.useState(void 0);return cn(()=>{if(n){o({width:n.offsetWidth,height:n.offsetHeight});const s=new ResizeObserver(u=>{if(!Array.isArray(u)||!u.length)return;const c=u[0];let p,m;if("borderBoxSize"in c){const h=c.borderBoxSize,y=Array.isArray(h)?h[0]:h;p=y.inlineSize,m=y.blockSize}else p=n.offsetWidth,m=n.offsetHeight;o({width:p,height:m})});return s.observe(n,{box:"border-box"}),()=>s.unobserve(n)}else o(void 0)},[n]),l}var Bu="Popper",[Pm,_m]=cl(Bu),[Cw,Am]=Pm(Bu),Om=n=>{const{__scopePopper:l,children:o}=n,[s,u]=w.useState(null);return f.jsx(Cw,{scope:l,anchor:s,onAnchorChange:u,children:o})};Om.displayName=Bu;var Mm="PopperAnchor",Dm=w.forwardRef((n,l)=>{const{__scopePopper:o,virtualRef:s,...u}=n,c=Am(Mm,o),p=w.useRef(null),m=rt(l,p),h=w.useRef(null);return w.useEffect(()=>{const y=h.current;h.current=(s==null?void 0:s.current)||p.current,y!==h.current&&c.onAnchorChange(h.current)}),s?null:f.jsx(He.div,{...u,ref:m})});Dm.displayName=Mm;var Hu="PopperContent",[kw,Ew]=Pm(Hu),Lm=w.forwardRef((n,l)=>{var Ce,be,xe,ze,Qe,Ct;const{__scopePopper:o,side:s="bottom",sideOffset:u=0,align:c="center",alignOffset:p=0,arrowPadding:m=0,avoidCollisions:h=!0,collisionBoundary:y=[],collisionPadding:v=0,sticky:x="partial",hideWhenDetached:S=!1,updatePositionStrategy:C="optimized",onPlaced:P,...k}=n,E=Am(Hu,o),[A,D]=w.useState(null),$=rt(l,ot=>D(ot)),[N,F]=w.useState(null),V=bw(N),L=(V==null?void 0:V.width)??0,R=(V==null?void 0:V.height)??0,W=s+(c!=="center"?"-"+c:""),Q=typeof v=="number"?v:{top:0,right:0,bottom:0,left:0,...v},ee=Array.isArray(y)?y:[y],ce=ee.length>0,U={padding:Q,boundary:ee.filter(jw),altBoundary:ce},{refs:q,floatingStyles:te,placement:J,isPositioned:ne,middlewareData:B}=dw({strategy:"fixed",placement:W,whileElementsMounted:(...ot)=>tw(...ot,{animationFrame:C==="always"}),elements:{reference:E.anchor},middleware:[pw({mainAxis:u+R,alignmentAxis:p}),h&&mw({mainAxis:!0,crossAxis:!1,limiter:x==="partial"?hw():void 0,...U}),h&&gw({...U}),vw({...U,apply:({elements:ot,rects:he,availableWidth:ir,availableHeight:sr})=>{const{width:hn,height:Rr}=he.reference,en=ot.floating.style;en.setProperty("--radix-popper-available-width",`${ir}px`),en.setProperty("--radix-popper-available-height",`${sr}px`),en.setProperty("--radix-popper-anchor-width",`${hn}px`),en.setProperty("--radix-popper-anchor-height",`${Rr}px`)}}),N&&xw({element:N,padding:m}),Rw({arrowWidth:L,arrowHeight:R}),S&&yw({strategy:"referenceHidden",...U})]}),[K,I]=$m(J),_=Tt(P);cn(()=>{ne&&(_==null||_())},[ne,_]);const H=(Ce=B.arrow)==null?void 0:Ce.x,fe=(be=B.arrow)==null?void 0:be.y,we=((xe=B.arrow)==null?void 0:xe.centerOffset)!==0,[pe,me]=w.useState();return cn(()=>{A&&me(window.getComputedStyle(A).zIndex)},[A]),f.jsx("div",{ref:q.setFloating,"data-radix-popper-content-wrapper":"",style:{...te,transform:ne?te.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:pe,"--radix-popper-transform-origin":[(ze=B.transformOrigin)==null?void 0:ze.x,(Qe=B.transformOrigin)==null?void 0:Qe.y].join(" "),...((Ct=B.hide)==null?void 0:Ct.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:n.dir,children:f.jsx(kw,{scope:o,placedSide:K,onArrowChange:F,arrowX:H,arrowY:fe,shouldHideArrow:we,children:f.jsx(He.div,{"data-side":K,"data-align":I,...k,ref:$,style:{...k.style,animation:ne?void 0:"none"}})})})});Lm.displayName=Hu;var zm="PopperArrow",Nw={top:"bottom",right:"left",bottom:"top",left:"right"},Im=w.forwardRef(function(l,o){const{__scopePopper:s,...u}=l,c=Ew(zm,s),p=Nw[c.placedSide];return f.jsx("span",{ref:c.onArrowChange,style:{position:"absolute",left:c.arrowX,top:c.arrowY,[p]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[c.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[c.placedSide],visibility:c.shouldHideArrow?"hidden":void 0},children:f.jsx(Sw,{...u,ref:o,style:{...u.style,display:"block"}})})});Im.displayName=zm;function jw(n){return n!==null}var Rw=n=>({name:"transformOrigin",options:n,fn(l){var E,A,D;const{placement:o,rects:s,middlewareData:u}=l,p=((E=u.arrow)==null?void 0:E.centerOffset)!==0,m=p?0:n.arrowWidth,h=p?0:n.arrowHeight,[y,v]=$m(o),x={start:"0%",center:"50%",end:"100%"}[v],S=(((A=u.arrow)==null?void 0:A.x)??0)+m/2,C=(((D=u.arrow)==null?void 0:D.y)??0)+h/2;let P="",k="";return y==="bottom"?(P=p?x:`${S}px`,k=`${-h}px`):y==="top"?(P=p?x:`${S}px`,k=`${s.floating.height+h}px`):y==="right"?(P=`${-h}px`,k=p?x:`${C}px`):y==="left"&&(P=`${s.floating.width+h}px`,k=p?x:`${C}px`),{data:{x:P,y:k}}}});function $m(n){const[l,o="center"]=n.split("-");return[l,o]}var Tw=Om,Pw=Dm,_w=Lm,Aw=Im,Ow="Portal",Vu=w.forwardRef((n,l)=>{var m;const{container:o,...s}=n,[u,c]=w.useState(!1);cn(()=>c(!0),[]);const p=o||u&&((m=globalThis==null?void 0:globalThis.document)==null?void 0:m.body);return p?Cy.createPortal(f.jsx(He.div,{...s,ref:l}),p):null});Vu.displayName=Ow;var Mw=ju[" useInsertionEffect ".trim().toString()]||cn;function Uu({prop:n,defaultProp:l,onChange:o=()=>{},caller:s}){const[u,c,p]=Dw({defaultProp:l,onChange:o}),m=n!==void 0,h=m?n:u;{const v=w.useRef(n!==void 0);w.useEffect(()=>{const x=v.current;x!==m&&console.warn(`${s} is changing from ${x?"controlled":"uncontrolled"} to ${m?"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.`),v.current=m},[m,s])}const y=w.useCallback(v=>{var x;if(m){const S=Lw(v)?v(n):v;S!==n&&((x=p.current)==null||x.call(p,S))}else c(v)},[m,n,c,p]);return[h,y]}function Dw({defaultProp:n,onChange:l}){const[o,s]=w.useState(n),u=w.useRef(o),c=w.useRef(l);return Mw(()=>{c.current=l},[l]),w.useEffect(()=>{var p;u.current!==o&&((p=c.current)==null||p.call(c,o),u.current=o)},[o,u]),[o,s,c]}function Lw(n){return typeof n=="function"}var zw=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Iw="VisuallyHidden",Fm=w.forwardRef((n,l)=>f.jsx(He.span,{...n,ref:l,style:{...zw,...n.style}}));Fm.displayName=Iw;var $w=Fm,[us,jb]=cl("Tooltip",[_m]),cs=_m(),Wm="TooltipProvider",Fw=700,Su="tooltip.open",[Ww,Yu]=us(Wm),Bm=n=>{const{__scopeTooltip:l,delayDuration:o=Fw,skipDelayDuration:s=300,disableHoverableContent:u=!1,children:c}=n,p=w.useRef(!0),m=w.useRef(!1),h=w.useRef(0);return w.useEffect(()=>{const y=h.current;return()=>window.clearTimeout(y)},[]),f.jsx(Ww,{scope:l,isOpenDelayedRef:p,delayDuration:o,onOpen:w.useCallback(()=>{window.clearTimeout(h.current),p.current=!1},[]),onClose:w.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>p.current=!0,s)},[s]),isPointerInTransitRef:m,onPointerInTransitChange:w.useCallback(y=>{m.current=y},[]),disableHoverableContent:u,children:c})};Bm.displayName=Wm;var ul="Tooltip",[Bw,fl]=us(ul),Hm=n=>{const{__scopeTooltip:l,children:o,open:s,defaultOpen:u,onOpenChange:c,disableHoverableContent:p,delayDuration:m}=n,h=Yu(ul,n.__scopeTooltip),y=cs(l),[v,x]=w.useState(null),S=ol(),C=w.useRef(0),P=p??h.disableHoverableContent,k=m??h.delayDuration,E=w.useRef(!1),[A,D]=Uu({prop:s,defaultProp:u??!1,onChange:L=>{L?(h.onOpen(),document.dispatchEvent(new CustomEvent(Su))):h.onClose(),c==null||c(L)},caller:ul}),$=w.useMemo(()=>A?E.current?"delayed-open":"instant-open":"closed",[A]),N=w.useCallback(()=>{window.clearTimeout(C.current),C.current=0,E.current=!1,D(!0)},[D]),F=w.useCallback(()=>{window.clearTimeout(C.current),C.current=0,D(!1)},[D]),V=w.useCallback(()=>{window.clearTimeout(C.current),C.current=window.setTimeout(()=>{E.current=!0,D(!0),C.current=0},k)},[k,D]);return w.useEffect(()=>()=>{C.current&&(window.clearTimeout(C.current),C.current=0)},[]),f.jsx(Tw,{...y,children:f.jsx(Bw,{scope:l,contentId:S,open:A,stateAttribute:$,trigger:v,onTriggerChange:x,onTriggerEnter:w.useCallback(()=>{h.isOpenDelayedRef.current?V():N()},[h.isOpenDelayedRef,V,N]),onTriggerLeave:w.useCallback(()=>{P?F():(window.clearTimeout(C.current),C.current=0)},[F,P]),onOpen:N,onClose:F,disableHoverableContent:P,children:o})})};Hm.displayName=ul;var bu="TooltipTrigger",Vm=w.forwardRef((n,l)=>{const{__scopeTooltip:o,...s}=n,u=fl(bu,o),c=Yu(bu,o),p=cs(o),m=w.useRef(null),h=rt(l,m,u.onTriggerChange),y=w.useRef(!1),v=w.useRef(!1),x=w.useCallback(()=>y.current=!1,[]);return w.useEffect(()=>()=>document.removeEventListener("pointerup",x),[x]),f.jsx(Pw,{asChild:!0,...p,children:f.jsx(He.button,{"aria-describedby":u.open?u.contentId:void 0,"data-state":u.stateAttribute,...s,ref:h,onPointerMove:Be(n.onPointerMove,S=>{S.pointerType!=="touch"&&!v.current&&!c.isPointerInTransitRef.current&&(u.onTriggerEnter(),v.current=!0)}),onPointerLeave:Be(n.onPointerLeave,()=>{u.onTriggerLeave(),v.current=!1}),onPointerDown:Be(n.onPointerDown,()=>{u.open&&u.onClose(),y.current=!0,document.addEventListener("pointerup",x,{once:!0})}),onFocus:Be(n.onFocus,()=>{y.current||u.onOpen()}),onBlur:Be(n.onBlur,u.onClose),onClick:Be(n.onClick,u.onClose)})})});Vm.displayName=bu;var Xu="TooltipPortal",[Hw,Vw]=us(Xu,{forceMount:void 0}),Um=n=>{const{__scopeTooltip:l,forceMount:o,children:s,container:u}=n,c=fl(Xu,l);return f.jsx(Hw,{scope:l,forceMount:o,children:f.jsx(Zt,{present:o||c.open,children:f.jsx(Vu,{asChild:!0,container:u,children:s})})})};Um.displayName=Xu;var ao="TooltipContent",Ym=w.forwardRef((n,l)=>{const o=Vw(ao,n.__scopeTooltip),{forceMount:s=o.forceMount,side:u="top",...c}=n,p=fl(ao,n.__scopeTooltip);return f.jsx(Zt,{present:s||p.open,children:p.disableHoverableContent?f.jsx(Xm,{side:u,...c,ref:l}):f.jsx(Uw,{side:u,...c,ref:l})})}),Uw=w.forwardRef((n,l)=>{const o=fl(ao,n.__scopeTooltip),s=Yu(ao,n.__scopeTooltip),u=w.useRef(null),c=rt(l,u),[p,m]=w.useState(null),{trigger:h,onClose:y}=o,v=u.current,{onPointerInTransitChange:x}=s,S=w.useCallback(()=>{m(null),x(!1)},[x]),C=w.useCallback((P,k)=>{const E=P.currentTarget,A={x:P.clientX,y:P.clientY},D=Kw(A,E.getBoundingClientRect()),$=qw(A,D),N=Zw(k.getBoundingClientRect()),F=e1([...$,...N]);m(F),x(!0)},[x]);return w.useEffect(()=>()=>S(),[S]),w.useEffect(()=>{if(h&&v){const P=E=>C(E,v),k=E=>C(E,h);return h.addEventListener("pointerleave",P),v.addEventListener("pointerleave",k),()=>{h.removeEventListener("pointerleave",P),v.removeEventListener("pointerleave",k)}}},[h,v,C,S]),w.useEffect(()=>{if(p){const P=k=>{const E=k.target,A={x:k.clientX,y:k.clientY},D=(h==null?void 0:h.contains(E))||(v==null?void 0:v.contains(E)),$=!Jw(A,p);D?S():$&&(S(),y())};return document.addEventListener("pointermove",P),()=>document.removeEventListener("pointermove",P)}},[h,v,p,y,S]),f.jsx(Xm,{...n,ref:c})}),[Yw,Xw]=us(ul,{isInside:!1}),Qw=Ey("TooltipContent"),Xm=w.forwardRef((n,l)=>{const{__scopeTooltip:o,children:s,"aria-label":u,onEscapeKeyDown:c,onPointerDownOutside:p,...m}=n,h=fl(ao,o),y=cs(o),{onClose:v}=h;return w.useEffect(()=>(document.addEventListener(Su,v),()=>document.removeEventListener(Su,v)),[v]),w.useEffect(()=>{if(h.trigger){const x=S=>{const C=S.target;C!=null&&C.contains(h.trigger)&&v()};return window.addEventListener("scroll",x,{capture:!0}),()=>window.removeEventListener("scroll",x,{capture:!0})}},[h.trigger,v]),f.jsx(Du,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:c,onPointerDownOutside:p,onFocusOutside:x=>x.preventDefault(),onDismiss:v,children:f.jsxs(_w,{"data-state":h.stateAttribute,...y,...m,ref:l,style:{...m.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[f.jsx(Qw,{children:s}),f.jsx(Yw,{scope:o,isInside:!0,children:f.jsx($w,{id:h.contentId,role:"tooltip",children:u||s})})]})})});Ym.displayName=ao;var Qm="TooltipArrow",Gw=w.forwardRef((n,l)=>{const{__scopeTooltip:o,...s}=n,u=cs(o);return Xw(Qm,o).isInside?null:f.jsx(Aw,{...u,...s,ref:l})});Gw.displayName=Qm;function Kw(n,l){const o=Math.abs(l.top-n.y),s=Math.abs(l.bottom-n.y),u=Math.abs(l.right-n.x),c=Math.abs(l.left-n.x);switch(Math.min(o,s,u,c)){case c:return"left";case u:return"right";case o:return"top";case s:return"bottom";default:throw new Error("unreachable")}}function qw(n,l,o=5){const s=[];switch(l){case"top":s.push({x:n.x-o,y:n.y+o},{x:n.x+o,y:n.y+o});break;case"bottom":s.push({x:n.x-o,y:n.y-o},{x:n.x+o,y:n.y-o});break;case"left":s.push({x:n.x+o,y:n.y-o},{x:n.x+o,y:n.y+o});break;case"right":s.push({x:n.x-o,y:n.y-o},{x:n.x-o,y:n.y+o});break}return s}function Zw(n){const{top:l,right:o,bottom:s,left:u}=n;return[{x:u,y:l},{x:o,y:l},{x:o,y:s},{x:u,y:s}]}function Jw(n,l){const{x:o,y:s}=n;let u=!1;for(let c=0,p=l.length-1;c<l.length;p=c++){const m=l[c],h=l[p],y=m.x,v=m.y,x=h.x,S=h.y;v>s!=S>s&&o<(x-y)*(s-v)/(S-v)+y&&(u=!u)}return u}function e1(n){const l=n.slice();return l.sort((o,s)=>o.x<s.x?-1:o.x>s.x?1:o.y<s.y?-1:o.y>s.y?1:0),t1(l)}function t1(n){if(n.length<=1)return n.slice();const l=[];for(let s=0;s<n.length;s++){const u=n[s];for(;l.length>=2;){const c=l[l.length-1],p=l[l.length-2];if((c.x-p.x)*(u.y-p.y)>=(c.y-p.y)*(u.x-p.x))l.pop();else break}l.push(u)}l.pop();const o=[];for(let s=n.length-1;s>=0;s--){const u=n[s];for(;o.length>=2;){const c=o[o.length-1],p=o[o.length-2];if((c.x-p.x)*(u.y-p.y)>=(c.y-p.y)*(u.x-p.x))o.pop();else break}o.push(u)}return o.pop(),l.length===1&&o.length===1&&l[0].x===o[0].x&&l[0].y===o[0].y?l:l.concat(o)}var n1=Bm,r1=Hm,o1=Vm,l1=Um,i1=Ym;function s1({delayDuration:n=0,...l}){return f.jsx(n1,{"data-slot":"tooltip-provider",delayDuration:n,...l})}function to({...n}){return f.jsx(s1,{children:f.jsx(r1,{"data-slot":"tooltip",...n})})}function no({...n}){return f.jsx(o1,{"data-slot":"tooltip-trigger",...n})}function ro({className:n,sideOffset:l=4,children:o,...s}){return f.jsx(l1,{children:f.jsx(i1,{"data-slot":"tooltip-content",sideOffset:l,className:fn("bg-background text-foreground border border-border animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",n),...s,children:o})})}function a1(n){const l=n.reduce((c,p)=>(c[p.toolName]=(c[p.toolName]||0)+1,c),{}),o=Object.keys(l),s=c=>{const p=l[c]??0;return p>1?`${c} (x${p})`:c},u=o.map(s);return o.length===1&&o[0]?{label:s(o[0]),details:""}:o.length===2?{label:`${s(o[0])}, ${s(o[1])}`,details:u.join(", ")}:{label:`${s(o[0])}, ${s(o[1])}, ...`,details:u.join(", ")}}function mp(n,l=30){return n.length<=l?n:n.slice(0,l).trim()+"…"}function hp(n){const{content:l}=n;if(typeof l=="string")return l;if(Array.isArray(l)){const o=l.find(s=>s.type==="text");return(o==null?void 0:o.text)??null}return null}function u1(n,l){const o=n==null?void 0:n.prompt;if(!Array.isArray(o))return null;if(l){const m=o.filter(y=>y.role==="user"),h=m[m.length-1];if(h){const y=hp(h);if(y)return{type:"user",label:`"${mp(y)}"`,fullText:y}}return null}const s=o.filter(m=>m.role==="tool");if(s.length>0){const m=s[s.length-1],h={},y=m==null?void 0:m.content;if(Array.isArray(y))for(const C of y)C.type==="tool-result"&&"toolName"in C&&C.toolName&&(h[C.toolName]=(h[C.toolName]||0)+1);const v=Object.keys(h);if(v.length===0)return{type:"tool",label:"tool result"};const x=C=>{const P=h[C];return P!=null&&P>1?`${C} (x${P})`:C},S=v.map(x);return v.length===1?{type:"tool",label:x(v[0])}:v.length===2?{type:"tool",label:`${x(v[0])}, ${x(v[1])}`,toolDetails:S.join(", ")}:{type:"tool",label:`${x(v[0])}, ${x(v[1])}, ...`,toolDetails:S.join(", ")}}const u=o.filter(m=>m.role==="user"),c=u[u.length-1];if(!c)return null;const p=hp(c);return p?{type:"user",label:`"${mp(p)}"`,fullText:p}:null}function c1(n,l){var s,u;if(l)return{type:"error",icon:"alert",label:"Error"};if((typeof(n==null?void 0:n.finishReason)=="string"?n.finishReason:typeof(n==null?void 0:n.finishReason)=="object"?(s=n.finishReason)==null?void 0:s.unified:void 0)==="tool-calls"){const c=(n==null?void 0:n.toolCalls)||(((u=n==null?void 0:n.content)==null?void 0:u.filter(h=>h.type==="tool-call"))??[]),{label:p,details:m}=a1(c);return{type:"tool-calls",icon:"wrench",label:p,toolDetails:m||void 0}}return{type:"response",icon:"message",label:"Response"}}function rr(n){if(typeof n=="string")try{return JSON.parse(n)}catch{return n}return n}function Ji(n){return n==null?{total:0}:typeof n=="number"?{total:n}:typeof n=="object"?{total:"total"in n&&typeof n.total=="number"?n.total:0,...typeof n.noCache=="number"&&{noCache:n.noCache},...typeof n.cacheRead=="number"&&{cacheRead:n.cacheRead},...typeof n.cacheWrite=="number"&&{cacheWrite:n.cacheWrite}}:{total:0}}function es(n){return n==null?{total:0}:typeof n=="number"?{total:n}:typeof n=="object"?{total:"total"in n&&typeof n.total=="number"?n.total:0,...typeof n.text=="number"&&{text:n.text},...typeof n.reasoning=="number"&&{reasoning:n.reasoning}}:{total:0}}function Gm(n){const{total:l,cacheRead:o}=n;return o&&o>0?`${l} (${o} cached)`:String(l)}function Km(n){const{total:l,reasoning:o}=n;return o&&o>0?`${l} (${o} reasoning)`:String(l)}function qm(n,l=40){if(!n||typeof n!="object")return"";const o=Object.entries(n);if(o.length===0)return"";const s=(h,y=20)=>h===null?"null":h===void 0?"undefined":typeof h=="object"?Array.isArray(h)?`[${h.length}]`:"{…}":typeof h=="string"?h.length>y?`"${h.slice(0,y)}…"`:`"${h}"`:String(h),u=o[0];if(!u)return"";const[c,p]=u,m=`${c}: ${s(p)}`;return o.length===1?`{ ${m} }`:`{ ${m}, … }`}function d1(n){if(!n||typeof n!="object")return"";const l=Object.entries(n);if(l.length===0)return"";const o=(m,h=20)=>m===null?"null":m===void 0?"undefined":typeof m=="object"?Array.isArray(m)?`[${m.length}]`:"{…}":typeof m=="string"?m.length>h?`"${m.slice(0,h)}…"`:`"${m}"`:String(m),s=l[0];if(!s)return"";const[u,c]=s,p=`${u}: ${o(c)}`;return l.length===1?`{ ${p} }`:`{ ${p}, … }`}function f1(n){if(n===null)return"null";if(n===void 0)return"undefined";if(typeof n=="string")return n.length>30?`"${n.slice(0,30)}…"`:`"${n}"`;if(Array.isArray(n))return`[${n.length}]`;if(typeof n=="object"){const l=Object.entries(n);if(l.length===0)return"{}";const o=l[0];if(!o)return"{…}";const[s,u]=o;let c;return typeof u=="string"&&u.length>15?c=`"${u.slice(0,15)}…"`:typeof u=="string"?c=`"${u}"`:typeof u=="object"?c=Array.isArray(u)?`[${u.length}]`:"{…}":c=String(u),l.length===1?`{ ${s}: ${c} }`:`{ ${s}: ${c}, … }`}return String(n)}const p1={step:"bg-blue-500","child-run":"bg-cyan-500",thinking:"bg-amber-500","tool-call":"bg-purple-500",text:"bg-emerald-500",error:"bg-red-500"},m1={step:"bg-blue-500/20","child-run":"bg-cyan-500/20",thinking:"bg-amber-500/20","tool-call":"bg-purple-500/20",text:"bg-emerald-500/20",error:"bg-red-500/20"};function h1(n,l){const o=[],s=new Date(n.run.started_at).getTime(),u=(c,p,m,h)=>{var y,v;for(const x of c){const C=new Date(x.started_at).getTime()-s,P=x.duration_ms??0,k=C+P,E=l(x.usage),A=l(x.output),D=h||x.model_id||"LLM call",$=h?x.model_id:void 0,N=(A==null?void 0:A.content)??[],F=N.length>0||x.error,V=E?{input:typeof E.inputTokens=="number"?E.inputTokens:((y=E.inputTokens)==null?void 0:y.total)??0,output:typeof E.outputTokens=="number"?E.outputTokens:((v=E.outputTokens)==null?void 0:v.total)??0}:void 0;if(o.push({id:x.id,stepId:x.id,label:D,sublabel:F?$:x.duration_ms===null&&!x.error?"streaming...":$||"Response",startMs:C,durationMs:P,depth:p,kind:"step",tokens:V,modelId:x.model_id,isInProgress:x.duration_ms===null&&!x.error}),!F){const q=m.filter(te=>te.run.parent_step_id===x.id);for(const te of q)u(te.steps,p+1,te.childRuns??[],te.run.function_id);continue}const R=[...m.filter(q=>q.run.parent_step_id===x.id)].sort((q,te)=>new Date(q.run.started_at).getTime()-new Date(te.run.started_at).getTime()),W=N.filter(q=>q.type==="tool-call"),Q=new Map,ee=[];if(W.length>0&&R.length>0){let q=0;for(const te of W){const J=te.toolCallId;if(!J)continue;if(N.find(B=>B.type==="tool-result"&&"toolCallId"in B&&B.toolCallId===J)&&q<R.length){const B=R[q];if(B){const K=Q.get(J)??[];K.push(B),Q.set(J,K),q++}}}for(let te=q;te<R.length;te++){const J=R[te];J&&ee.push(J)}}else ee.push(...R);const ce=[];for(const q of W){const te=q.toolCallId;if(!te)continue;const J=Q.get(te)??[];if(J.length>0){const ne=Math.min(...J.map(K=>new Date(K.run.started_at).getTime()-s)),B=Math.max(...J.map(K=>{const I=new Date(K.run.started_at).getTime()-s,_=K.steps.reduce((H,fe)=>H+(fe.duration_ms||0),0);return I+_}));ce.push({toolCallId:te,startMs:ne,endMs:B})}}let U=C;for(const q of N)if(q.type==="reasoning"||q.type==="thinking"){const te=q.text||q.thinking||q.reasoning||"",J=ce.length>0?Math.min(...ce.map(K=>K.startMs)):k,ne=Math.max(U,J),B=Math.max(0,ne-U);o.push({id:`${x.id}-thinking-${q.toolCallId||U}`,stepId:x.id,label:"Thinking",sublabel:te.length>50?te.slice(0,50)+"...":te,startMs:U,durationMs:B,depth:p+1,kind:"thinking",thinkingText:te}),U=U+B}else if(q.type==="tool-call"){const te=q.toolName||"unknown",J=q.input??q.args,ne=J&&typeof J=="object"?Object.entries(J).slice(0,3).map(([,H])=>{const fe=typeof H=="string"?H:JSON.stringify(H)??String(H);return fe.length>30?fe.slice(0,30)+"…":fe}).join(", "):typeof J=="string"?J.slice(0,60):"",B=Q.get(q.toolCallId??"")??[],K=ce.find(H=>H.toolCallId===q.toolCallId);let I,_;K?(I=K.startMs,_=K.endMs-K.startMs):(I=U,_=0),o.push({id:`${x.id}-tool-${q.toolCallId||U}`,stepId:x.id,label:te,sublabel:ne?`(${ne})`:void 0,startMs:I,durationMs:_,depth:p+1,kind:"tool-call",toolCallId:q.toolCallId});for(const H of B)u(H.steps,p+2,H.childRuns??[],H.run.function_id);U=Math.max(U,I+_)}else if(q.type==="text"){const te=q.text||"",J=Math.max(0,k-U);o.push({id:`${x.id}-text-${U}`,stepId:x.id,label:"Text",sublabel:te.length>60?te.slice(0,60)+"...":te,startMs:U,durationMs:J,depth:p+1,kind:"text",textContent:te}),U=U+J}if(x.error){const q=Math.max(0,k-U);o.push({id:`${x.id}-error`,stepId:x.id,label:"Error",sublabel:x.error.length>60?x.error.slice(0,60)+"...":x.error,startMs:U,durationMs:q,depth:p+1,kind:"error"})}for(const q of ee)u(q.steps,p+1,q.childRuns??[],q.run.function_id)}};return u(n.steps,0,n.childRuns??[],n.run.function_id),o}var ou="focusScope.autoFocusOnMount",lu="focusScope.autoFocusOnUnmount",gp={bubbles:!1,cancelable:!0},g1="FocusScope",Zm=w.forwardRef((n,l)=>{const{loop:o=!1,trapped:s=!1,onMountAutoFocus:u,onUnmountAutoFocus:c,...p}=n,[m,h]=w.useState(null),y=Tt(u),v=Tt(c),x=w.useRef(null),S=rt(l,k=>h(k)),C=w.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;w.useEffect(()=>{if(s){let k=function($){if(C.paused||!m)return;const N=$.target;m.contains(N)?x.current=N:er(x.current,{select:!0})},E=function($){if(C.paused||!m)return;const N=$.relatedTarget;N!==null&&(m.contains(N)||er(x.current,{select:!0}))},A=function($){if(document.activeElement===document.body)for(const F of $)F.removedNodes.length>0&&er(m)};document.addEventListener("focusin",k),document.addEventListener("focusout",E);const D=new MutationObserver(A);return m&&D.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",k),document.removeEventListener("focusout",E),D.disconnect()}}},[s,m,C.paused]),w.useEffect(()=>{if(m){yp.add(C);const k=document.activeElement;if(!m.contains(k)){const A=new CustomEvent(ou,gp);m.addEventListener(ou,y),m.dispatchEvent(A),A.defaultPrevented||(v1(b1(Jm(m)),{select:!0}),document.activeElement===k&&er(m))}return()=>{m.removeEventListener(ou,y),setTimeout(()=>{const A=new CustomEvent(lu,gp);m.addEventListener(lu,v),m.dispatchEvent(A),A.defaultPrevented||er(k??document.body,{select:!0}),m.removeEventListener(lu,v),yp.remove(C)},0)}}},[m,y,v,C]);const P=w.useCallback(k=>{if(!o&&!s||C.paused)return;const E=k.key==="Tab"&&!k.altKey&&!k.ctrlKey&&!k.metaKey,A=document.activeElement;if(E&&A){const D=k.currentTarget,[$,N]=y1(D);$&&N?!k.shiftKey&&A===N?(k.preventDefault(),o&&er($,{select:!0})):k.shiftKey&&A===$&&(k.preventDefault(),o&&er(N,{select:!0})):A===D&&k.preventDefault()}},[o,s,C.paused]);return f.jsx(He.div,{tabIndex:-1,...p,ref:S,onKeyDown:P})});Zm.displayName=g1;function v1(n,{select:l=!1}={}){const o=document.activeElement;for(const s of n)if(er(s,{select:l}),document.activeElement!==o)return}function y1(n){const l=Jm(n),o=vp(l,n),s=vp(l.reverse(),n);return[o,s]}function Jm(n){const l=[],o=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const u=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||u?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;o.nextNode();)l.push(o.currentNode);return l}function vp(n,l){for(const o of n)if(!x1(o,{upTo:l}))return o}function x1(n,{upTo:l}){if(getComputedStyle(n).visibility==="hidden")return!0;for(;n;){if(l!==void 0&&n===l)return!1;if(getComputedStyle(n).display==="none")return!0;n=n.parentElement}return!1}function w1(n){return n instanceof HTMLInputElement&&"select"in n}function er(n,{select:l=!1}={}){if(n&&n.focus){const o=document.activeElement;n.focus({preventScroll:!0}),n!==o&&w1(n)&&l&&n.select()}}var yp=S1();function S1(){let n=[];return{add(l){const o=n[0];l!==o&&(o==null||o.pause()),n=xp(n,l),n.unshift(l)},remove(l){var o;n=xp(n,l),(o=n[0])==null||o.resume()}}}function xp(n,l){const o=[...n],s=o.indexOf(l);return s!==-1&&o.splice(s,1),o}function b1(n){return n.filter(l=>l.tagName!=="A")}var iu=0;function C1(){w.useEffect(()=>{const n=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",n[0]??wp()),document.body.insertAdjacentElement("beforeend",n[1]??wp()),iu++,()=>{iu===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(l=>l.remove()),iu--}},[])}function wp(){const n=document.createElement("span");return n.setAttribute("data-radix-focus-guard",""),n.tabIndex=0,n.style.outline="none",n.style.opacity="0",n.style.position="fixed",n.style.pointerEvents="none",n}var sn=function(){return sn=Object.assign||function(l){for(var o,s=1,u=arguments.length;s<u;s++){o=arguments[s];for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&(l[c]=o[c])}return l},sn.apply(this,arguments)};function eh(n,l){var o={};for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&l.indexOf(s)<0&&(o[s]=n[s]);if(n!=null&&typeof Object.getOwnPropertySymbols=="function")for(var u=0,s=Object.getOwnPropertySymbols(n);u<s.length;u++)l.indexOf(s[u])<0&&Object.prototype.propertyIsEnumerable.call(n,s[u])&&(o[s[u]]=n[s[u]]);return o}function k1(n,l,o){if(o||arguments.length===2)for(var s=0,u=l.length,c;s<u;s++)(c||!(s in l))&&(c||(c=Array.prototype.slice.call(l,0,s)),c[s]=l[s]);return n.concat(c||Array.prototype.slice.call(l))}var Ii="right-scroll-bar-position",$i="width-before-scroll-bar",E1="with-scroll-bars-hidden",N1="--removed-body-scroll-bar-size";function su(n,l){return typeof n=="function"?n(l):n&&(n.current=l),n}function j1(n,l){var o=w.useState(function(){return{value:n,callback:l,facade:{get current(){return o.value},set current(s){var u=o.value;u!==s&&(o.value=s,o.callback(s,u))}}}})[0];return o.callback=l,o.facade}var R1=typeof window<"u"?w.useLayoutEffect:w.useEffect,Sp=new WeakMap;function T1(n,l){var o=j1(null,function(s){return n.forEach(function(u){return su(u,s)})});return R1(function(){var s=Sp.get(o);if(s){var u=new Set(s),c=new Set(n),p=o.current;u.forEach(function(m){c.has(m)||su(m,null)}),c.forEach(function(m){u.has(m)||su(m,p)})}Sp.set(o,n)},[n]),o}function P1(n){return n}function _1(n,l){l===void 0&&(l=P1);var o=[],s=!1,u={read:function(){if(s)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return o.length?o[o.length-1]:n},useMedium:function(c){var p=l(c,s);return o.push(p),function(){o=o.filter(function(m){return m!==p})}},assignSyncMedium:function(c){for(s=!0;o.length;){var p=o;o=[],p.forEach(c)}o={push:function(m){return c(m)},filter:function(){return o}}},assignMedium:function(c){s=!0;var p=[];if(o.length){var m=o;o=[],m.forEach(c),p=o}var h=function(){var v=p;p=[],v.forEach(c)},y=function(){return Promise.resolve().then(h)};y(),o={push:function(v){p.push(v),y()},filter:function(v){return p=p.filter(v),o}}}};return u}function A1(n){n===void 0&&(n={});var l=_1(null);return l.options=sn({async:!0,ssr:!1},n),l}var th=function(n){var l=n.sideCar,o=eh(n,["sideCar"]);if(!l)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var s=l.read();if(!s)throw new Error("Sidecar medium not found");return w.createElement(s,sn({},o))};th.isSideCarExport=!0;function O1(n,l){return n.useMedium(l),th}var nh=A1(),au=function(){},ds=w.forwardRef(function(n,l){var o=w.useRef(null),s=w.useState({onScrollCapture:au,onWheelCapture:au,onTouchMoveCapture:au}),u=s[0],c=s[1],p=n.forwardProps,m=n.children,h=n.className,y=n.removeScrollBar,v=n.enabled,x=n.shards,S=n.sideCar,C=n.noRelative,P=n.noIsolation,k=n.inert,E=n.allowPinchZoom,A=n.as,D=A===void 0?"div":A,$=n.gapMode,N=eh(n,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),F=S,V=T1([o,l]),L=sn(sn({},N),u);return w.createElement(w.Fragment,null,v&&w.createElement(F,{sideCar:nh,removeScrollBar:y,shards:x,noRelative:C,noIsolation:P,inert:k,setCallbacks:c,allowPinchZoom:!!E,lockRef:o,gapMode:$}),p?w.cloneElement(w.Children.only(m),sn(sn({},L),{ref:V})):w.createElement(D,sn({},L,{className:h,ref:V}),m))});ds.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ds.classNames={fullWidth:$i,zeroRight:Ii};var M1=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function D1(){if(!document)return null;var n=document.createElement("style");n.type="text/css";var l=M1();return l&&n.setAttribute("nonce",l),n}function L1(n,l){n.styleSheet?n.styleSheet.cssText=l:n.appendChild(document.createTextNode(l))}function z1(n){var l=document.head||document.getElementsByTagName("head")[0];l.appendChild(n)}var I1=function(){var n=0,l=null;return{add:function(o){n==0&&(l=D1())&&(L1(l,o),z1(l)),n++},remove:function(){n--,!n&&l&&(l.parentNode&&l.parentNode.removeChild(l),l=null)}}},$1=function(){var n=I1();return function(l,o){w.useEffect(function(){return n.add(l),function(){n.remove()}},[l&&o])}},rh=function(){var n=$1(),l=function(o){var s=o.styles,u=o.dynamic;return n(s,u),null};return l},F1={left:0,top:0,right:0,gap:0},uu=function(n){return parseInt(n||"",10)||0},W1=function(n){var l=window.getComputedStyle(document.body),o=l[n==="padding"?"paddingLeft":"marginLeft"],s=l[n==="padding"?"paddingTop":"marginTop"],u=l[n==="padding"?"paddingRight":"marginRight"];return[uu(o),uu(s),uu(u)]},B1=function(n){if(n===void 0&&(n="margin"),typeof window>"u")return F1;var l=W1(n),o=document.documentElement.clientWidth,s=window.innerWidth;return{left:l[0],top:l[1],right:l[2],gap:Math.max(0,s-o+l[2]-l[0])}},H1=rh(),oo="data-scroll-locked",V1=function(n,l,o,s){var u=n.left,c=n.top,p=n.right,m=n.gap;return o===void 0&&(o="margin"),`
|
|
136
136
|
.`.concat(E1,` {
|
|
137
137
|
overflow: hidden `).concat(s,`;
|
|
138
138
|
padding-right: `).concat(m,"px ").concat(s,`;
|
package/dist/client/index.html
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
href="https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600;700&display=swap"
|
|
11
11
|
rel="stylesheet"
|
|
12
12
|
/>
|
|
13
|
-
<script type="module" crossorigin src="/assets/index-
|
|
13
|
+
<script type="module" crossorigin src="/assets/index-DJUnsFup.js"></script>
|
|
14
14
|
<link rel="stylesheet" crossorigin href="/assets/index-DGv_Z9xV.css">
|
|
15
15
|
</head>
|
|
16
16
|
<body>
|
package/dist/index.js
CHANGED
|
@@ -501,9 +501,7 @@ function DevToolsTelemetry() {
|
|
|
501
501
|
const startTime = Date.now();
|
|
502
502
|
const stepState = {
|
|
503
503
|
stepId,
|
|
504
|
-
startTime
|
|
505
|
-
streamChunks: [],
|
|
506
|
-
rawStreamChunks: []
|
|
504
|
+
startTime
|
|
507
505
|
};
|
|
508
506
|
const stepNumber = stepStartEvent.steps.length;
|
|
509
507
|
state.stepStates.set(stepNumber, stepState);
|
|
@@ -544,9 +542,7 @@ function DevToolsTelemetry() {
|
|
|
544
542
|
const startTime = Date.now();
|
|
545
543
|
const stepState = {
|
|
546
544
|
stepId,
|
|
547
|
-
startTime
|
|
548
|
-
streamChunks: [],
|
|
549
|
-
rawStreamChunks: []
|
|
545
|
+
startTime
|
|
550
546
|
};
|
|
551
547
|
state.stepStates.set(stepStartEvent.stepNumber, stepState);
|
|
552
548
|
activeSteps2.set(stepId, stepState);
|
|
@@ -571,50 +567,6 @@ function DevToolsTelemetry() {
|
|
|
571
567
|
provider_options: stepStartEvent.providerOptions ? JSON.stringify(stepStartEvent.providerOptions) : null
|
|
572
568
|
});
|
|
573
569
|
},
|
|
574
|
-
onChunk: async (event) => {
|
|
575
|
-
const { chunk } = event;
|
|
576
|
-
if (chunk.type === "raw") {
|
|
577
|
-
const rawValue = chunk.rawValue;
|
|
578
|
-
for (const [, state] of callStates) {
|
|
579
|
-
let latestStepState;
|
|
580
|
-
let latestStepNumber = -1;
|
|
581
|
-
for (const [stepNumber, ss] of state.stepStates) {
|
|
582
|
-
if (stepNumber > latestStepNumber) {
|
|
583
|
-
latestStepNumber = stepNumber;
|
|
584
|
-
latestStepState = ss;
|
|
585
|
-
}
|
|
586
|
-
}
|
|
587
|
-
if (latestStepState) {
|
|
588
|
-
latestStepState.rawStreamChunks.push(rawValue);
|
|
589
|
-
return;
|
|
590
|
-
}
|
|
591
|
-
}
|
|
592
|
-
return;
|
|
593
|
-
}
|
|
594
|
-
if ("callId" in chunk && "stepNumber" in chunk) {
|
|
595
|
-
const typed = chunk;
|
|
596
|
-
const state = callStates.get(typed.callId);
|
|
597
|
-
if (!state) return;
|
|
598
|
-
const stepState = state.stepStates.get(typed.stepNumber);
|
|
599
|
-
if (!stepState) return;
|
|
600
|
-
stepState.streamChunks.push(chunk);
|
|
601
|
-
return;
|
|
602
|
-
}
|
|
603
|
-
for (const [, state] of callStates) {
|
|
604
|
-
let latestStepState;
|
|
605
|
-
let latestStepNumber = -1;
|
|
606
|
-
for (const [stepNumber, ss] of state.stepStates) {
|
|
607
|
-
if (stepNumber > latestStepNumber) {
|
|
608
|
-
latestStepNumber = stepNumber;
|
|
609
|
-
latestStepState = ss;
|
|
610
|
-
}
|
|
611
|
-
}
|
|
612
|
-
if (latestStepState) {
|
|
613
|
-
latestStepState.streamChunks.push(chunk);
|
|
614
|
-
return;
|
|
615
|
-
}
|
|
616
|
-
}
|
|
617
|
-
},
|
|
618
570
|
onStepFinish: async (event) => {
|
|
619
571
|
const stepResult = event;
|
|
620
572
|
const state = callStates.get(stepResult.callId);
|
|
@@ -633,16 +585,14 @@ function DevToolsTelemetry() {
|
|
|
633
585
|
messages: stepResult.response.messages
|
|
634
586
|
}
|
|
635
587
|
};
|
|
636
|
-
const hasStreamChunks = stepState.streamChunks.length > 0;
|
|
637
|
-
const hasRawStreamChunks = stepState.rawStreamChunks.length > 0;
|
|
638
588
|
await updateStepResult(stepState.stepId, {
|
|
639
589
|
duration_ms: durationMs,
|
|
640
590
|
output: JSON.stringify(output),
|
|
641
591
|
usage: stepResult.usage ? JSON.stringify(stepResult.usage) : null,
|
|
642
592
|
error: null,
|
|
643
593
|
raw_request: stepResult.request?.body ? JSON.stringify(stepResult.request.body) : null,
|
|
644
|
-
raw_response: stepResult.response?.body ? JSON.stringify(stepResult.response.body) :
|
|
645
|
-
raw_chunks:
|
|
594
|
+
raw_response: stepResult.response?.body ? JSON.stringify(stepResult.response.body) : null,
|
|
595
|
+
raw_chunks: null
|
|
646
596
|
});
|
|
647
597
|
state.stepStates.delete(stepResult.stepNumber);
|
|
648
598
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-sdk/devtools",
|
|
3
|
-
"version": "1.0.0-canary.
|
|
3
|
+
"version": "1.0.0-canary.24",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"vaul": "^1.1.2",
|
|
57
57
|
"vite": "^6.0.3",
|
|
58
58
|
"zod": "3.25.76",
|
|
59
|
-
"ai": "7.0.0-canary.
|
|
59
|
+
"ai": "7.0.0-canary.138"
|
|
60
60
|
},
|
|
61
61
|
"publishConfig": {
|
|
62
62
|
"access": "public",
|
package/src/integration.ts
CHANGED
|
@@ -2,7 +2,6 @@ import type {
|
|
|
2
2
|
GenerateTextStartEvent,
|
|
3
3
|
GenerateTextStepStartEvent,
|
|
4
4
|
GenerateTextStepEndEvent,
|
|
5
|
-
StreamTextChunkEvent,
|
|
6
5
|
GenerateObjectStartEvent,
|
|
7
6
|
GenerateObjectStepStartEvent,
|
|
8
7
|
GenerateObjectStepEndEvent,
|
|
@@ -21,8 +20,6 @@ type OperationType = 'generate' | 'stream';
|
|
|
21
20
|
interface StepState {
|
|
22
21
|
stepId: string;
|
|
23
22
|
startTime: number;
|
|
24
|
-
streamChunks: unknown[];
|
|
25
|
-
rawStreamChunks: unknown[];
|
|
26
23
|
}
|
|
27
24
|
|
|
28
25
|
interface CallState {
|
|
@@ -231,8 +228,6 @@ export function DevToolsTelemetry(): Telemetry {
|
|
|
231
228
|
const stepState: StepState = {
|
|
232
229
|
stepId,
|
|
233
230
|
startTime,
|
|
234
|
-
streamChunks: [],
|
|
235
|
-
rawStreamChunks: [],
|
|
236
231
|
};
|
|
237
232
|
const stepNumber = stepStartEvent.steps.length;
|
|
238
233
|
state.stepStates.set(stepNumber, stepState);
|
|
@@ -286,8 +281,6 @@ export function DevToolsTelemetry(): Telemetry {
|
|
|
286
281
|
const stepState: StepState = {
|
|
287
282
|
stepId,
|
|
288
283
|
startTime,
|
|
289
|
-
streamChunks: [],
|
|
290
|
-
rawStreamChunks: [],
|
|
291
284
|
};
|
|
292
285
|
state.stepStates.set(stepStartEvent.stepNumber, stepState);
|
|
293
286
|
activeSteps.set(stepId, stepState);
|
|
@@ -316,54 +309,6 @@ export function DevToolsTelemetry(): Telemetry {
|
|
|
316
309
|
});
|
|
317
310
|
},
|
|
318
311
|
|
|
319
|
-
onChunk: async event => {
|
|
320
|
-
const { chunk } = event as StreamTextChunkEvent;
|
|
321
|
-
|
|
322
|
-
if (chunk.type === 'raw') {
|
|
323
|
-
const rawValue = (chunk as { rawValue: unknown }).rawValue;
|
|
324
|
-
for (const [, state] of callStates) {
|
|
325
|
-
let latestStepState: StepState | undefined;
|
|
326
|
-
let latestStepNumber = -1;
|
|
327
|
-
for (const [stepNumber, ss] of state.stepStates) {
|
|
328
|
-
if (stepNumber > latestStepNumber) {
|
|
329
|
-
latestStepNumber = stepNumber;
|
|
330
|
-
latestStepState = ss;
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
if (latestStepState) {
|
|
334
|
-
latestStepState.rawStreamChunks.push(rawValue);
|
|
335
|
-
return;
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
return;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
if ('callId' in chunk && 'stepNumber' in chunk) {
|
|
342
|
-
const typed = chunk as { callId: string; stepNumber: number };
|
|
343
|
-
const state = callStates.get(typed.callId);
|
|
344
|
-
if (!state) return;
|
|
345
|
-
const stepState = state.stepStates.get(typed.stepNumber);
|
|
346
|
-
if (!stepState) return;
|
|
347
|
-
stepState.streamChunks.push(chunk);
|
|
348
|
-
return;
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
for (const [, state] of callStates) {
|
|
352
|
-
let latestStepState: StepState | undefined;
|
|
353
|
-
let latestStepNumber = -1;
|
|
354
|
-
for (const [stepNumber, ss] of state.stepStates) {
|
|
355
|
-
if (stepNumber > latestStepNumber) {
|
|
356
|
-
latestStepNumber = stepNumber;
|
|
357
|
-
latestStepState = ss;
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
if (latestStepState) {
|
|
361
|
-
latestStepState.streamChunks.push(chunk);
|
|
362
|
-
return;
|
|
363
|
-
}
|
|
364
|
-
}
|
|
365
|
-
},
|
|
366
|
-
|
|
367
312
|
onStepFinish: async event => {
|
|
368
313
|
const stepResult = event as GenerateTextStepEndEvent<ToolSet>;
|
|
369
314
|
|
|
@@ -388,9 +333,6 @@ export function DevToolsTelemetry(): Telemetry {
|
|
|
388
333
|
},
|
|
389
334
|
};
|
|
390
335
|
|
|
391
|
-
const hasStreamChunks = stepState.streamChunks.length > 0;
|
|
392
|
-
const hasRawStreamChunks = stepState.rawStreamChunks.length > 0;
|
|
393
|
-
|
|
394
336
|
await updateStepResult(stepState.stepId, {
|
|
395
337
|
duration_ms: durationMs,
|
|
396
338
|
output: JSON.stringify(output),
|
|
@@ -401,12 +343,8 @@ export function DevToolsTelemetry(): Telemetry {
|
|
|
401
343
|
: null,
|
|
402
344
|
raw_response: stepResult.response?.body
|
|
403
345
|
? JSON.stringify(stepResult.response.body)
|
|
404
|
-
: hasStreamChunks
|
|
405
|
-
? JSON.stringify(stepState.streamChunks)
|
|
406
|
-
: null,
|
|
407
|
-
raw_chunks: hasRawStreamChunks
|
|
408
|
-
? JSON.stringify(stepState.rawStreamChunks)
|
|
409
346
|
: null,
|
|
347
|
+
raw_chunks: null,
|
|
410
348
|
});
|
|
411
349
|
|
|
412
350
|
state.stepStates.delete(stepResult.stepNumber);
|
|
@@ -4,7 +4,7 @@ import { cva, type VariantProps } from 'class-variance-authority';
|
|
|
4
4
|
import { cn } from '@/lib/utils';
|
|
5
5
|
|
|
6
6
|
const buttonVariants = cva(
|
|
7
|
-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
7
|
+
"inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|