@qodo/design-system 0.20.23 → 0.20.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.
- package/dist/design-system.css +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -147,7 +147,7 @@ React keys must be passed directly to JSX without using spread:
|
|
|
147
147
|
*
|
|
148
148
|
* This source code is licensed under the ISC license.
|
|
149
149
|
* See the LICENSE file in the root directory of this source tree.
|
|
150
|
-
*/const uh=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ao=Se("x",uh);function U(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Pi(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function _e(...e){return t=>{let r=!1;const n=e.map(o=>{const a=Pi(o,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let o=0;o<n.length;o++){const a=n[o];typeof a=="function"?a():Pi(e[o],null)}}}}function ce(...e){return d.useCallback(_e(...e),e)}function dh(e,t){const r=d.createContext(t),n=a=>{const{children:s,...i}=a,c=d.useMemo(()=>i,Object.values(i));return l.jsx(r.Provider,{value:c,children:s})};n.displayName=e+"Provider";function o(a){const s=d.useContext(r);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,o]}function Pe(e,t=[]){let r=[];function n(a,s){const i=d.createContext(s),c=r.length;r=[...r,s];const u=p=>{var b;const{scope:m,children:g,...h}=p,v=((b=m==null?void 0:m[e])==null?void 0:b[c])||i,x=d.useMemo(()=>h,Object.values(h));return l.jsx(v.Provider,{value:x,children:g})};u.displayName=a+"Provider";function f(p,m){var v;const g=((v=m==null?void 0:m[e])==null?void 0:v[c])||i,h=d.useContext(g);if(h)return h;if(s!==void 0)return s;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[u,f]}const o=()=>{const a=r.map(s=>d.createContext(s));return function(i){const c=(i==null?void 0:i[e])||a;return d.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return o.scopeName=e,[n,fh(o,...t)]}function fh(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=n.reduce((i,{useScope:c,scopeName:u})=>{const p=c(a)[`__scope${u}`];return{...i,...p}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}function ph(e){const t=mh(e),r=d.forwardRef((n,o)=>{const{children:a,...s}=n,i=d.Children.toArray(a),c=i.find(vh);if(c){const u=c.props.children,f=i.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return l.jsx(t,{...s,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return l.jsx(t,{...s,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function mh(e){const t=d.forwardRef((r,n)=>{const{children:o,...a}=r;if(d.isValidElement(o)){const s=xh(o),i=hh(a,o.props);return o.type!==d.Fragment&&(i.ref=n?_e(n,s):s),d.cloneElement(o,i)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var gh=Symbol("radix.slottable");function vh(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===gh}function hh(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{const c=a(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function xh(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var bh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],re=bh.reduce((e,t)=>{const r=ph(`Primitive.${t}`),n=d.forwardRef((o,a)=>{const{asChild:s,...i}=o,c=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...i,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function cc(e,t){e&&no.flushSync(()=>e.dispatchEvent(t))}function ze(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function yh(e,t=globalThis==null?void 0:globalThis.document){const r=ze(e);d.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var wh="DismissableLayer",ha="dismissableLayer.update",Ch="dismissableLayer.pointerDownOutside",Sh="dismissableLayer.focusOutside",Ti,uc=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),gr=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...c}=e,u=d.useContext(uc),[f,p]=d.useState(null),m=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=d.useState({}),h=ce(t,k=>p(k)),v=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(x),y=f?v.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,S=y>=b,R=kh(k=>{const N=k.target,$=[...u.branches].some(B=>B.contains(N));!S||$||(o==null||o(k),s==null||s(k),k.defaultPrevented||i==null||i())},m),j=Nh(k=>{const N=k.target;[...u.branches].some(B=>B.contains(N))||(a==null||a(k),s==null||s(k),k.defaultPrevented||i==null||i())},m);return yh(k=>{y===u.layers.size-1&&(n==null||n(k),!k.defaultPrevented&&i&&(k.preventDefault(),i()))},m),d.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ti=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Ii(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Ti)}},[f,m,r,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Ii())},[f,u]),d.useEffect(()=>{const k=()=>g({});return document.addEventListener(ha,k),()=>document.removeEventListener(ha,k)},[]),l.jsx(re.div,{...c,ref:h,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:U(e.onFocusCapture,j.onFocusCapture),onBlurCapture:U(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:U(e.onPointerDownCapture,R.onPointerDownCapture)})});gr.displayName=wh;var Eh="DismissableLayerBranch",Rh=d.forwardRef((e,t)=>{const r=d.useContext(uc),n=d.useRef(null),o=ce(t,n);return d.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),l.jsx(re.div,{...e,ref:o})});Rh.displayName=Eh;function kh(e,t=globalThis==null?void 0:globalThis.document){const r=ze(e),n=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const a=i=>{if(i.target&&!n.current){let c=function(){dc(Ch,r,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Nh(e,t=globalThis==null?void 0:globalThis.document){const r=ze(e),n=d.useRef(!1);return d.useEffect(()=>{const o=a=>{a.target&&!n.current&&dc(Sh,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Ii(){const e=new CustomEvent(ha);document.dispatchEvent(e)}function dc(e,t,r,{discrete:n}){const o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?cc(o,a):o.dispatchEvent(a)}var je=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},jh=d[" useId ".trim().toString()]||(()=>{}),Ph=0;function ye(e){const[t,r]=d.useState(jh());return je(()=>{r(n=>n??String(Ph++))},[e]),t?`radix-${t}`:""}const Th=["top","right","bottom","left"],ht=Math.min,$e=Math.max,Vn=Math.round,kn=Math.floor,et=e=>({x:e,y:e}),Ih={left:"right",right:"left",bottom:"top",top:"bottom"},Ah={start:"end",end:"start"};function xa(e,t,r){return $e(e,ht(t,r))}function ct(e,t){return typeof e=="function"?e(t):e}function ut(e){return e.split("-")[0]}function vr(e){return e.split("-")[1]}function qa(e){return e==="x"?"y":"x"}function Ha(e){return e==="y"?"height":"width"}const _h=new Set(["top","bottom"]);function Qe(e){return _h.has(ut(e))?"y":"x"}function Ua(e){return qa(Qe(e))}function Oh(e,t,r){r===void 0&&(r=!1);const n=vr(e),o=Ua(e),a=Ha(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Bn(s)),[s,Bn(s)]}function Mh(e){const t=Bn(e);return[ba(e),t,ba(t)]}function ba(e){return e.replace(/start|end/g,t=>Ah[t])}const Ai=["left","right"],_i=["right","left"],Dh=["top","bottom"],$h=["bottom","top"];function Lh(e,t,r){switch(e){case"top":case"bottom":return r?t?_i:Ai:t?Ai:_i;case"left":case"right":return t?Dh:$h;default:return[]}}function Fh(e,t,r,n){const o=vr(e);let a=Lh(ut(e),r==="start",n);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(ba)))),a}function Bn(e){return e.replace(/left|right|bottom|top/g,t=>Ih[t])}function Vh(e){return{top:0,right:0,bottom:0,left:0,...e}}function fc(e){return typeof e!="number"?Vh(e):{top:e,right:e,bottom:e,left:e}}function Gn(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function Oi(e,t,r){let{reference:n,floating:o}=e;const a=Qe(t),s=Ua(t),i=Ha(s),c=ut(t),u=a==="y",f=n.x+n.width/2-o.width/2,p=n.y+n.height/2-o.height/2,m=n[i]/2-o[i]/2;let g;switch(c){case"top":g={x:f,y:n.y-o.height};break;case"bottom":g={x:f,y:n.y+n.height};break;case"right":g={x:n.x+n.width,y:p};break;case"left":g={x:n.x-o.width,y:p};break;default:g={x:n.x,y:n.y}}switch(vr(t)){case"start":g[s]-=m*(r&&u?-1:1);break;case"end":g[s]+=m*(r&&u?-1:1);break}return g}const Bh=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:s}=r,i=a.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=Oi(u,n,c),m=n,g={},h=0;for(let v=0;v<i.length;v++){const{name:x,fn:b}=i[v],{x:y,y:w,data:S,reset:R}=await b({x:f,y:p,initialPlacement:n,placement:m,strategy:o,middlewareData:g,rects:u,platform:s,elements:{reference:e,floating:t}});f=y??f,p=w??p,g={...g,[x]:{...g[x],...S}},R&&h<=50&&(h++,typeof R=="object"&&(R.placement&&(m=R.placement),R.rects&&(u=R.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:f,y:p}=Oi(u,m,c)),v=-1)}return{x:f,y:p,placement:m,strategy:o,middlewareData:g}};async function Wr(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:a,rects:s,elements:i,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:m=!1,padding:g=0}=ct(t,e),h=fc(g),x=i[m?p==="floating"?"reference":"floating":p],b=Gn(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(x)))==null||r?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:u,rootBoundary:f,strategy:c})),y=p==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),S=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},R=Gn(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:y,offsetParent:w,strategy:c}):y);return{top:(b.top-R.top+h.top)/S.y,bottom:(R.bottom-b.bottom+h.bottom)/S.y,left:(b.left-R.left+h.left)/S.x,right:(R.right-b.right+h.right)/S.x}}const Gh=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:s,elements:i,middlewareData:c}=t,{element:u,padding:f=0}=ct(e,t)||{};if(u==null)return{};const p=fc(f),m={x:r,y:n},g=Ua(o),h=Ha(g),v=await s.getDimensions(u),x=g==="y",b=x?"top":"left",y=x?"bottom":"right",w=x?"clientHeight":"clientWidth",S=a.reference[h]+a.reference[g]-m[g]-a.floating[h],R=m[g]-a.reference[g],j=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let k=j?j[w]:0;(!k||!await(s.isElement==null?void 0:s.isElement(j)))&&(k=i.floating[w]||a.floating[h]);const N=S/2-R/2,$=k/2-v[h]/2-1,B=ht(p[b],$),W=ht(p[y],$),Y=B,Z=k-v[h]-W,z=k/2-v[h]/2+N,D=xa(Y,z,Z),_=!c.arrow&&vr(o)!=null&&z!==D&&a.reference[h]/2-(z<Y?B:W)-v[h]/2<0,L=_?z<Y?z-Y:z-Z:0;return{[g]:m[g]+L,data:{[g]:D,centerOffset:z-D-L,..._&&{alignmentOffset:L}},reset:_}}}),Wh=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:v=!0,...x}=ct(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const b=ut(o),y=Qe(i),w=ut(i)===i,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),R=m||(w||!v?[Bn(i)]:Mh(i)),j=h!=="none";!m&&j&&R.push(...Fh(i,v,h,S));const k=[i,...R],N=await Wr(t,x),$=[];let B=((n=a.flip)==null?void 0:n.overflows)||[];if(f&&$.push(N[b]),p){const z=Oh(o,s,S);$.push(N[z[0]],N[z[1]])}if(B=[...B,{placement:o,overflows:$}],!$.every(z=>z<=0)){var W,Y;const z=(((W=a.flip)==null?void 0:W.index)||0)+1,D=k[z];if(D&&(!(p==="alignment"?y!==Qe(D):!1)||B.every(P=>Qe(P.placement)===y?P.overflows[0]>0:!0)))return{data:{index:z,overflows:B},reset:{placement:D}};let _=(Y=B.filter(L=>L.overflows[0]<=0).sort((L,P)=>L.overflows[1]-P.overflows[1])[0])==null?void 0:Y.placement;if(!_)switch(g){case"bestFit":{var Z;const L=(Z=B.filter(P=>{if(j){const O=Qe(P.placement);return O===y||O==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(O=>O>0).reduce((O,H)=>O+H,0)]).sort((P,O)=>P[1]-O[1])[0])==null?void 0:Z[0];L&&(_=L);break}case"initialPlacement":_=i;break}if(o!==_)return{reset:{placement:_}}}return{}}}};function Mi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Di(e){return Th.some(t=>e[t]>=0)}const zh=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=ct(e,t);switch(n){case"referenceHidden":{const a=await Wr(t,{...o,elementContext:"reference"}),s=Mi(a,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Di(s)}}}case"escaped":{const a=await Wr(t,{...o,altBoundary:!0}),s=Mi(a,r.floating);return{data:{escapedOffsets:s,escaped:Di(s)}}}default:return{}}}}},pc=new Set(["left","top"]);async function qh(e,t){const{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=ut(r),i=vr(r),c=Qe(r)==="y",u=pc.has(s)?-1:1,f=a&&c?-1:1,p=ct(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:h}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return i&&typeof h=="number"&&(g=i==="end"?h*-1:h),c?{x:g*f,y:m*u}:{x:m*u,y:g*f}}const Hh=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:a,placement:s,middlewareData:i}=t,c=await qh(t,e);return s===((r=i.offset)==null?void 0:r.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:s}}}}},Uh=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:i={fn:x=>{let{x:b,y}=x;return{x:b,y}}},...c}=ct(e,t),u={x:r,y:n},f=await Wr(t,c),p=Qe(ut(o)),m=qa(p);let g=u[m],h=u[p];if(a){const x=m==="y"?"top":"left",b=m==="y"?"bottom":"right",y=g+f[x],w=g-f[b];g=xa(y,g,w)}if(s){const x=p==="y"?"top":"left",b=p==="y"?"bottom":"right",y=h+f[x],w=h-f[b];h=xa(y,h,w)}const v=i.fn({...t,[m]:g,[p]:h});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[m]:a,[p]:s}}}}}},Kh=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:c=!0,crossAxis:u=!0}=ct(e,t),f={x:r,y:n},p=Qe(o),m=qa(p);let g=f[m],h=f[p];const v=ct(i,t),x=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const w=m==="y"?"height":"width",S=a.reference[m]-a.floating[w]+x.mainAxis,R=a.reference[m]+a.reference[w]-x.mainAxis;g<S?g=S:g>R&&(g=R)}if(u){var b,y;const w=m==="y"?"width":"height",S=pc.has(ut(o)),R=a.reference[p]-a.floating[w]+(S&&((b=s.offset)==null?void 0:b[p])||0)+(S?0:x.crossAxis),j=a.reference[p]+a.reference[w]+(S?0:((y=s.offset)==null?void 0:y[p])||0)-(S?x.crossAxis:0);h<R?h=R:h>j&&(h=j)}return{[m]:g,[p]:h}}}},Yh=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:a,platform:s,elements:i}=t,{apply:c=()=>{},...u}=ct(e,t),f=await Wr(t,u),p=ut(o),m=vr(o),g=Qe(o)==="y",{width:h,height:v}=a.floating;let x,b;p==="top"||p==="bottom"?(x=p,b=m===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(b=p,x=m==="end"?"top":"bottom");const y=v-f.top-f.bottom,w=h-f.left-f.right,S=ht(v-f[x],y),R=ht(h-f[b],w),j=!t.middlewareData.shift;let k=S,N=R;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(N=w),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(k=y),j&&!m){const B=$e(f.left,0),W=$e(f.right,0),Y=$e(f.top,0),Z=$e(f.bottom,0);g?N=h-2*(B!==0||W!==0?B+W:$e(f.left,f.right)):k=v-2*(Y!==0||Z!==0?Y+Z:$e(f.top,f.bottom))}await c({...t,availableWidth:N,availableHeight:k});const $=await s.getDimensions(i.floating);return h!==$.width||v!==$.height?{reset:{rects:!0}}:{}}}};function so(){return typeof window<"u"}function hr(e){return mc(e)?(e.nodeName||"").toLowerCase():"#document"}function Le(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function nt(e){var t;return(t=(mc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function mc(e){return so()?e instanceof Node||e instanceof Le(e).Node:!1}function qe(e){return so()?e instanceof Element||e instanceof Le(e).Element:!1}function tt(e){return so()?e instanceof HTMLElement||e instanceof Le(e).HTMLElement:!1}function $i(e){return!so()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Le(e).ShadowRoot}const Xh=new Set(["inline","contents"]);function Jr(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=He(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!Xh.has(o)}const Zh=new Set(["table","td","th"]);function Jh(e){return Zh.has(hr(e))}const Qh=[":popover-open",":modal"];function io(e){return Qh.some(t=>{try{return e.matches(t)}catch{return!1}})}const ex=["transform","translate","scale","rotate","perspective"],tx=["transform","translate","scale","rotate","perspective","filter"],rx=["paint","layout","strict","content"];function Ka(e){const t=Ya(),r=qe(e)?He(e):e;return ex.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||tx.some(n=>(r.willChange||"").includes(n))||rx.some(n=>(r.contain||"").includes(n))}function nx(e){let t=xt(e);for(;tt(t)&&!cr(t);){if(Ka(t))return t;if(io(t))return null;t=xt(t)}return null}function Ya(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ox=new Set(["html","body","#document"]);function cr(e){return ox.has(hr(e))}function He(e){return Le(e).getComputedStyle(e)}function lo(e){return qe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function xt(e){if(hr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$i(e)&&e.host||nt(e);return $i(t)?t.host:t}function gc(e){const t=xt(e);return cr(t)?e.ownerDocument?e.ownerDocument.body:e.body:tt(t)&&Jr(t)?t:gc(t)}function zr(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=gc(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),s=Le(o);if(a){const i=ya(s);return t.concat(s,s.visualViewport||[],Jr(o)?o:[],i&&r?zr(i):[])}return t.concat(o,zr(o,[],r))}function ya(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function vc(e){const t=He(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=tt(e),a=o?e.offsetWidth:r,s=o?e.offsetHeight:n,i=Vn(r)!==a||Vn(n)!==s;return i&&(r=a,n=s),{width:r,height:n,$:i}}function Xa(e){return qe(e)?e:e.contextElement}function ir(e){const t=Xa(e);if(!tt(t))return et(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=vc(t);let s=(a?Vn(r.width):r.width)/n,i=(a?Vn(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const ax=et(0);function hc(e){const t=Le(e);return!Ya()||!t.visualViewport?ax:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function sx(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Le(e)?!1:t}function Ot(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=Xa(e);let s=et(1);t&&(n?qe(n)&&(s=ir(n)):s=ir(e));const i=sx(a,r,n)?hc(a):et(0);let c=(o.left+i.x)/s.x,u=(o.top+i.y)/s.y,f=o.width/s.x,p=o.height/s.y;if(a){const m=Le(a),g=n&&qe(n)?Le(n):n;let h=m,v=ya(h);for(;v&&n&&g!==h;){const x=ir(v),b=v.getBoundingClientRect(),y=He(v),w=b.left+(v.clientLeft+parseFloat(y.paddingLeft))*x.x,S=b.top+(v.clientTop+parseFloat(y.paddingTop))*x.y;c*=x.x,u*=x.y,f*=x.x,p*=x.y,c+=w,u+=S,h=Le(v),v=ya(h)}}return Gn({width:f,height:p,x:c,y:u})}function co(e,t){const r=lo(e).scrollLeft;return t?t.left+r:Ot(nt(e)).left+r}function xc(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-co(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function ix(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const a=o==="fixed",s=nt(n),i=t?io(t.floating):!1;if(n===s||i&&a)return r;let c={scrollLeft:0,scrollTop:0},u=et(1);const f=et(0),p=tt(n);if((p||!p&&!a)&&((hr(n)!=="body"||Jr(s))&&(c=lo(n)),tt(n))){const g=Ot(n);u=ir(n),f.x=g.x+n.clientLeft,f.y=g.y+n.clientTop}const m=s&&!p&&!a?xc(s,c):et(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+f.x+m.x,y:r.y*u.y-c.scrollTop*u.y+f.y+m.y}}function lx(e){return Array.from(e.getClientRects())}function cx(e){const t=nt(e),r=lo(e),n=e.ownerDocument.body,o=$e(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=$e(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+co(e);const i=-r.scrollTop;return He(n).direction==="rtl"&&(s+=$e(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:s,y:i}}const Li=25;function ux(e,t){const r=Le(e),n=nt(e),o=r.visualViewport;let a=n.clientWidth,s=n.clientHeight,i=0,c=0;if(o){a=o.width,s=o.height;const f=Ya();(!f||f&&t==="fixed")&&(i=o.offsetLeft,c=o.offsetTop)}const u=co(n);if(u<=0){const f=n.ownerDocument,p=f.body,m=getComputedStyle(p),g=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,h=Math.abs(n.clientWidth-p.clientWidth-g);h<=Li&&(a-=h)}else u<=Li&&(a+=u);return{width:a,height:s,x:i,y:c}}const dx=new Set(["absolute","fixed"]);function fx(e,t){const r=Ot(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=tt(e)?ir(e):et(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,c=o*a.x,u=n*a.y;return{width:s,height:i,x:c,y:u}}function Fi(e,t,r){let n;if(t==="viewport")n=ux(e,r);else if(t==="document")n=cx(nt(e));else if(qe(t))n=fx(t,r);else{const o=hc(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Gn(n)}function bc(e,t){const r=xt(e);return r===t||!qe(r)||cr(r)?!1:He(r).position==="fixed"||bc(r,t)}function px(e,t){const r=t.get(e);if(r)return r;let n=zr(e,[],!1).filter(i=>qe(i)&&hr(i)!=="body"),o=null;const a=He(e).position==="fixed";let s=a?xt(e):e;for(;qe(s)&&!cr(s);){const i=He(s),c=Ka(s);!c&&i.position==="fixed"&&(o=null),(a?!c&&!o:!c&&i.position==="static"&&!!o&&dx.has(o.position)||Jr(s)&&!c&&bc(e,s))?n=n.filter(f=>f!==s):o=i,s=xt(s)}return t.set(e,n),n}function mx(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[...r==="clippingAncestors"?io(t)?[]:px(t,this._c):[].concat(r),n],i=s[0],c=s.reduce((u,f)=>{const p=Fi(t,f,o);return u.top=$e(p.top,u.top),u.right=ht(p.right,u.right),u.bottom=ht(p.bottom,u.bottom),u.left=$e(p.left,u.left),u},Fi(t,i,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function gx(e){const{width:t,height:r}=vc(e);return{width:t,height:r}}function vx(e,t,r){const n=tt(t),o=nt(t),a=r==="fixed",s=Ot(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const c=et(0);function u(){c.x=co(o)}if(n||!n&&!a)if((hr(t)!=="body"||Jr(o))&&(i=lo(t)),n){const g=Ot(t,!0,a,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else o&&u();a&&!n&&o&&u();const f=o&&!n&&!a?xc(o,i):et(0),p=s.left+i.scrollLeft-c.x-f.x,m=s.top+i.scrollTop-c.y-f.y;return{x:p,y:m,width:s.width,height:s.height}}function Yo(e){return He(e).position==="static"}function Vi(e,t){if(!tt(e)||He(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return nt(e)===r&&(r=r.ownerDocument.body),r}function yc(e,t){const r=Le(e);if(io(e))return r;if(!tt(e)){let o=xt(e);for(;o&&!cr(o);){if(qe(o)&&!Yo(o))return o;o=xt(o)}return r}let n=Vi(e,t);for(;n&&Jh(n)&&Yo(n);)n=Vi(n,t);return n&&cr(n)&&Yo(n)&&!Ka(n)?r:n||nx(e)||r}const hx=async function(e){const t=this.getOffsetParent||yc,r=this.getDimensions,n=await r(e.floating);return{reference:vx(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function xx(e){return He(e).direction==="rtl"}const bx={convertOffsetParentRelativeRectToViewportRelativeRect:ix,getDocumentElement:nt,getClippingRect:mx,getOffsetParent:yc,getElementRects:hx,getClientRects:lx,getDimensions:gx,getScale:ir,isElement:qe,isRTL:xx};function wc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function yx(e,t){let r=null,n;const o=nt(e);function a(){var i;clearTimeout(n),(i=r)==null||i.disconnect(),r=null}function s(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),a();const u=e.getBoundingClientRect(),{left:f,top:p,width:m,height:g}=u;if(i||t(),!m||!g)return;const h=kn(p),v=kn(o.clientWidth-(f+m)),x=kn(o.clientHeight-(p+g)),b=kn(f),w={rootMargin:-h+"px "+-v+"px "+-x+"px "+-b+"px",threshold:$e(0,ht(1,c))||1};let S=!0;function R(j){const k=j[0].intersectionRatio;if(k!==c){if(!S)return s();k?s(!1,k):n=setTimeout(()=>{s(!1,1e-7)},1e3)}k===1&&!wc(u,e.getBoundingClientRect())&&s(),S=!1}try{r=new IntersectionObserver(R,{...w,root:o.ownerDocument})}catch{r=new IntersectionObserver(R,w)}r.observe(e)}return s(!0),a}function wx(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=Xa(e),f=o||a?[...u?zr(u):[],...zr(t)]:[];f.forEach(b=>{o&&b.addEventListener("scroll",r,{passive:!0}),a&&b.addEventListener("resize",r)});const p=u&&i?yx(u,r):null;let m=-1,g=null;s&&(g=new ResizeObserver(b=>{let[y]=b;y&&y.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var w;(w=g)==null||w.observe(t)})),r()}),u&&!c&&g.observe(u),g.observe(t));let h,v=c?Ot(e):null;c&&x();function x(){const b=Ot(e);v&&!wc(v,b)&&r(),v=b,h=requestAnimationFrame(x)}return r(),()=>{var b;f.forEach(y=>{o&&y.removeEventListener("scroll",r),a&&y.removeEventListener("resize",r)}),p==null||p(),(b=g)==null||b.disconnect(),g=null,c&&cancelAnimationFrame(h)}}const Cx=Hh,Sx=Uh,Ex=Wh,Rx=Yh,kx=zh,Bi=Gh,Nx=Kh,jx=(e,t,r)=>{const n=new Map,o={platform:bx,...r},a={...o.platform,_c:n};return Bh(e,t,{...o,platform:a})};var Px=typeof document<"u",Tx=function(){},On=Px?E.useLayoutEffect:Tx;function Wn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Wn(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!Wn(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Cc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Gi(e,t){const r=Cc(e);return Math.round(t*r)/r}function Xo(e){const t=d.useRef(e);return On(()=>{t.current=e}),t}function Ix(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:c,open:u}=e,[f,p]=d.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=d.useState(n);Wn(m,n)||g(n);const[h,v]=d.useState(null),[x,b]=d.useState(null),y=d.useCallback(P=>{P!==j.current&&(j.current=P,v(P))},[]),w=d.useCallback(P=>{P!==k.current&&(k.current=P,b(P))},[]),S=a||h,R=s||x,j=d.useRef(null),k=d.useRef(null),N=d.useRef(f),$=c!=null,B=Xo(c),W=Xo(o),Y=Xo(u),Z=d.useCallback(()=>{if(!j.current||!k.current)return;const P={placement:t,strategy:r,middleware:m};W.current&&(P.platform=W.current),jx(j.current,k.current,P).then(O=>{const H={...O,isPositioned:Y.current!==!1};z.current&&!Wn(N.current,H)&&(N.current=H,no.flushSync(()=>{p(H)}))})},[m,t,r,W,Y]);On(()=>{u===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,p(P=>({...P,isPositioned:!1})))},[u]);const z=d.useRef(!1);On(()=>(z.current=!0,()=>{z.current=!1}),[]),On(()=>{if(S&&(j.current=S),R&&(k.current=R),S&&R){if(B.current)return B.current(S,R,Z);Z()}},[S,R,Z,B,$]);const D=d.useMemo(()=>({reference:j,floating:k,setReference:y,setFloating:w}),[y,w]),_=d.useMemo(()=>({reference:S,floating:R}),[S,R]),L=d.useMemo(()=>{const P={position:r,left:0,top:0};if(!_.floating)return P;const O=Gi(_.floating,f.x),H=Gi(_.floating,f.y);return i?{...P,transform:"translate("+O+"px, "+H+"px)",...Cc(_.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:O,top:H}},[r,i,_.floating,f.x,f.y]);return d.useMemo(()=>({...f,update:Z,refs:D,elements:_,floatingStyles:L}),[f,Z,D,_,L])}const Ax=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Bi({element:n.current,padding:o}).fn(r):{}:n?Bi({element:n,padding:o}).fn(r):{}}}},_x=(e,t)=>({...Cx(e),options:[e,t]}),Ox=(e,t)=>({...Sx(e),options:[e,t]}),Mx=(e,t)=>({...Nx(e),options:[e,t]}),Dx=(e,t)=>({...Ex(e),options:[e,t]}),$x=(e,t)=>({...Rx(e),options:[e,t]}),Lx=(e,t)=>({...kx(e),options:[e,t]}),Fx=(e,t)=>({...Ax(e),options:[e,t]});var Vx="Arrow",Sc=d.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...a}=e;return l.jsx(re.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});Sc.displayName=Vx;var Bx=Sc;function uo(e){const[t,r]=d.useState(void 0);return je(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,i;if("borderBoxSize"in a){const c=a.borderBoxSize,u=Array.isArray(c)?c[0]:c;s=u.inlineSize,i=u.blockSize}else s=e.offsetWidth,i=e.offsetHeight;r({width:s,height:i})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Za="Popper",[Ec,yt]=Pe(Za),[Gx,Rc]=Ec(Za),kc=e=>{const{__scopePopper:t,children:r}=e,[n,o]=d.useState(null);return l.jsx(Gx,{scope:t,anchor:n,onAnchorChange:o,children:r})};kc.displayName=Za;var Nc="PopperAnchor",jc=d.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,a=Rc(Nc,r),s=d.useRef(null),i=ce(t,s),c=d.useRef(null);return d.useEffect(()=>{const u=c.current;c.current=(n==null?void 0:n.current)||s.current,u!==c.current&&a.onAnchorChange(c.current)}),n?null:l.jsx(re.div,{...o,ref:i})});jc.displayName=Nc;var Ja="PopperContent",[Wx,zx]=Ec(Ja),Pc=d.forwardRef((e,t)=>{var A,q,J,te,se,M;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:h,...v}=e,x=Rc(Ja,r),[b,y]=d.useState(null),w=ce(t,ae=>y(ae)),[S,R]=d.useState(null),j=uo(S),k=(j==null?void 0:j.width)??0,N=(j==null?void 0:j.height)??0,$=n+(a!=="center"?"-"+a:""),B=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},W=Array.isArray(u)?u:[u],Y=W.length>0,Z={padding:B,boundary:W.filter(Hx),altBoundary:Y},{refs:z,floatingStyles:D,placement:_,isPositioned:L,middlewareData:P}=Ix({strategy:"fixed",placement:$,whileElementsMounted:(...ae)=>wx(...ae,{animationFrame:g==="always"}),elements:{reference:x.anchor},middleware:[_x({mainAxis:o+N,alignmentAxis:s}),c&&Ox({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Mx():void 0,...Z}),c&&Dx({...Z}),$x({...Z,apply:({elements:ae,rects:ie,availableWidth:de,availableHeight:pe})=>{const{width:xe,height:Ne}=ie.reference,Re=ae.floating.style;Re.setProperty("--radix-popper-available-width",`${de}px`),Re.setProperty("--radix-popper-available-height",`${pe}px`),Re.setProperty("--radix-popper-anchor-width",`${xe}px`),Re.setProperty("--radix-popper-anchor-height",`${Ne}px`)}}),S&&Fx({element:S,padding:i}),Ux({arrowWidth:k,arrowHeight:N}),m&&Lx({strategy:"referenceHidden",...Z})]}),[O,H]=Ac(_),Q=ze(h);je(()=>{L&&(Q==null||Q())},[L,Q]);const I=(A=P.arrow)==null?void 0:A.x,G=(q=P.arrow)==null?void 0:q.y,X=((J=P.arrow)==null?void 0:J.centerOffset)!==0,[K,F]=d.useState();return je(()=>{b&&F(window.getComputedStyle(b).zIndex)},[b]),l.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:L?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:K,"--radix-popper-transform-origin":[(te=P.transformOrigin)==null?void 0:te.x,(se=P.transformOrigin)==null?void 0:se.y].join(" "),...((M=P.hide)==null?void 0:M.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(Wx,{scope:r,placedSide:O,onArrowChange:R,arrowX:I,arrowY:G,shouldHideArrow:X,children:l.jsx(re.div,{"data-side":O,"data-align":H,...v,ref:w,style:{...v.style,animation:L?void 0:"none"}})})})});Pc.displayName=Ja;var Tc="PopperArrow",qx={top:"bottom",right:"left",bottom:"top",left:"right"},Ic=d.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,a=zx(Tc,n),s=qx[a.placedSide];return l.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:l.jsx(Bx,{...o,ref:r,style:{...o.style,display:"block"}})})});Ic.displayName=Tc;function Hx(e){return e!==null}var Ux=e=>({name:"transformOrigin",options:e,fn(t){var x,b,y;const{placement:r,rects:n,middlewareData:o}=t,s=((x=o.arrow)==null?void 0:x.centerOffset)!==0,i=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[u,f]=Ac(r),p={start:"0%",center:"50%",end:"100%"}[f],m=(((b=o.arrow)==null?void 0:b.x)??0)+i/2,g=(((y=o.arrow)==null?void 0:y.y)??0)+c/2;let h="",v="";return u==="bottom"?(h=s?p:`${m}px`,v=`${-c}px`):u==="top"?(h=s?p:`${m}px`,v=`${n.floating.height+c}px`):u==="right"?(h=`${-c}px`,v=s?p:`${g}px`):u==="left"&&(h=`${n.floating.width+c}px`,v=s?p:`${g}px`),{data:{x:h,y:v}}}});function Ac(e){const[t,r="center"]=e.split("-");return[t,r]}var Qr=kc,en=jc,fo=Pc,po=Ic,Kx="Portal",xr=d.forwardRef((e,t)=>{var i;const{container:r,...n}=e,[o,a]=d.useState(!1);je(()=>a(!0),[]);const s=r||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?Zr.createPortal(l.jsx(re.div,{...n,ref:t}),s):null});xr.displayName=Kx;function Yx(e,t){return d.useReducer((r,n)=>t[r][n]??r,e)}var Te=e=>{const{present:t,children:r}=e,n=Xx(t),o=typeof r=="function"?r({present:n.isPresent}):d.Children.only(r),a=ce(n.ref,Zx(o));return typeof r=="function"||n.isPresent?d.cloneElement(o,{ref:a}):null};Te.displayName="Presence";function Xx(e){const[t,r]=d.useState(),n=d.useRef(null),o=d.useRef(e),a=d.useRef("none"),s=e?"mounted":"unmounted",[i,c]=Yx(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const u=Nn(n.current);a.current=i==="mounted"?u:"none"},[i]),je(()=>{const u=n.current,f=o.current;if(f!==e){const m=a.current,g=Nn(u);e?c("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&m!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),je(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,p=g=>{const v=Nn(n.current).includes(CSS.escape(g.animationName));if(g.target===t&&v&&(c("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},m=g=>{g.target===t&&(a.current=Nn(n.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:d.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function Nn(e){return(e==null?void 0:e.animationName)||"none"}function Zx(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Jx=Symbol("radix.slottable");function Qx(e){const t=({children:r})=>l.jsx(l.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=Jx,t}var eb=d[" useInsertionEffect ".trim().toString()]||je;function ke({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,a,s]=tb({defaultProp:t,onChange:r}),i=e!==void 0,c=i?e:o;{const f=d.useRef(e!==void 0);d.useEffect(()=>{const p=f.current;p!==i&&console.warn(`${n} is changing from ${p?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=i},[i,n])}const u=d.useCallback(f=>{var p;if(i){const m=rb(f)?f(e):f;m!==e&&((p=s.current)==null||p.call(s,m))}else a(f)},[i,e,a,s]);return[c,u]}function tb({defaultProp:e,onChange:t}){const[r,n]=d.useState(e),o=d.useRef(r),a=d.useRef(t);return eb(()=>{a.current=t},[t]),d.useEffect(()=>{var s;o.current!==r&&((s=a.current)==null||s.call(a,r),o.current=r)},[r,o]),[r,n,a]}function rb(e){return typeof e=="function"}var _c=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"}),nb="VisuallyHidden",Oc=d.forwardRef((e,t)=>l.jsx(re.span,{...e,ref:t,style:{..._c,...e.style}}));Oc.displayName=nb;var ob=Oc,[mo]=Pe("Tooltip",[yt]),go=yt(),Mc="TooltipProvider",ab=700,wa="tooltip.open",[sb,Qa]=mo(Mc),Dc=e=>{const{__scopeTooltip:t,delayDuration:r=ab,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,s=d.useRef(!0),i=d.useRef(!1),c=d.useRef(0);return d.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),l.jsx(sb,{scope:t,isOpenDelayedRef:s,delayDuration:r,onOpen:d.useCallback(()=>{window.clearTimeout(c.current),s.current=!1},[]),onClose:d.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.current=!0,n)},[n]),isPointerInTransitRef:i,onPointerInTransitChange:d.useCallback(u=>{i.current=u},[]),disableHoverableContent:o,children:a})};Dc.displayName=Mc;var qr="Tooltip",[ib,tn]=mo(qr),$c=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,c=Qa(qr,e.__scopeTooltip),u=go(t),[f,p]=d.useState(null),m=ye(),g=d.useRef(0),h=s??c.disableHoverableContent,v=i??c.delayDuration,x=d.useRef(!1),[b,y]=ke({prop:n,defaultProp:o??!1,onChange:k=>{k?(c.onOpen(),document.dispatchEvent(new CustomEvent(wa))):c.onClose(),a==null||a(k)},caller:qr}),w=d.useMemo(()=>b?x.current?"delayed-open":"instant-open":"closed",[b]),S=d.useCallback(()=>{window.clearTimeout(g.current),g.current=0,x.current=!1,y(!0)},[y]),R=d.useCallback(()=>{window.clearTimeout(g.current),g.current=0,y(!1)},[y]),j=d.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{x.current=!0,y(!0),g.current=0},v)},[v,y]);return d.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),l.jsx(Qr,{...u,children:l.jsx(ib,{scope:t,contentId:m,open:b,stateAttribute:w,trigger:f,onTriggerChange:p,onTriggerEnter:d.useCallback(()=>{c.isOpenDelayedRef.current?j():S()},[c.isOpenDelayedRef,j,S]),onTriggerLeave:d.useCallback(()=>{h?R():(window.clearTimeout(g.current),g.current=0)},[R,h]),onOpen:S,onClose:R,disableHoverableContent:h,children:r})})};$c.displayName=qr;var Ca="TooltipTrigger",Lc=d.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=tn(Ca,r),a=Qa(Ca,r),s=go(r),i=d.useRef(null),c=ce(t,i,o.onTriggerChange),u=d.useRef(!1),f=d.useRef(!1),p=d.useCallback(()=>u.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),l.jsx(en,{asChild:!0,...s,children:l.jsx(re.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:c,onPointerMove:U(e.onPointerMove,m=>{m.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:U(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:U(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:U(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:U(e.onBlur,o.onClose),onClick:U(e.onClick,o.onClose)})})});Lc.displayName=Ca;var es="TooltipPortal",[lb,cb]=mo(es,{forceMount:void 0}),Fc=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,a=tn(es,t);return l.jsx(lb,{scope:t,forceMount:r,children:l.jsx(Te,{present:r||a.open,children:l.jsx(xr,{asChild:!0,container:o,children:n})})})};Fc.displayName=es;var ur="TooltipContent",Vc=d.forwardRef((e,t)=>{const r=cb(ur,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...a}=e,s=tn(ur,e.__scopeTooltip);return l.jsx(Te,{present:n||s.open,children:s.disableHoverableContent?l.jsx(Bc,{side:o,...a,ref:t}):l.jsx(ub,{side:o,...a,ref:t})})}),ub=d.forwardRef((e,t)=>{const r=tn(ur,e.__scopeTooltip),n=Qa(ur,e.__scopeTooltip),o=d.useRef(null),a=ce(t,o),[s,i]=d.useState(null),{trigger:c,onClose:u}=r,f=o.current,{onPointerInTransitChange:p}=n,m=d.useCallback(()=>{i(null),p(!1)},[p]),g=d.useCallback((h,v)=>{const x=h.currentTarget,b={x:h.clientX,y:h.clientY},y=mb(b,x.getBoundingClientRect()),w=gb(b,y),S=vb(v.getBoundingClientRect()),R=xb([...w,...S]);i(R),p(!0)},[p]);return d.useEffect(()=>()=>m(),[m]),d.useEffect(()=>{if(c&&f){const h=x=>g(x,f),v=x=>g(x,c);return c.addEventListener("pointerleave",h),f.addEventListener("pointerleave",v),()=>{c.removeEventListener("pointerleave",h),f.removeEventListener("pointerleave",v)}}},[c,f,g,m]),d.useEffect(()=>{if(s){const h=v=>{const x=v.target,b={x:v.clientX,y:v.clientY},y=(c==null?void 0:c.contains(x))||(f==null?void 0:f.contains(x)),w=!hb(b,s);y?m():w&&(m(),u())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[c,f,s,u,m]),l.jsx(Bc,{...e,ref:a})}),[db,fb]=mo(qr,{isInside:!1}),pb=Qx("TooltipContent"),Bc=d.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,c=tn(ur,r),u=go(r),{onClose:f}=c;return d.useEffect(()=>(document.addEventListener(wa,f),()=>document.removeEventListener(wa,f)),[f]),d.useEffect(()=>{if(c.trigger){const p=m=>{const g=m.target;g!=null&&g.contains(c.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[c.trigger,f]),l.jsx(gr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:l.jsxs(fo,{"data-state":c.stateAttribute,...u,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(pb,{children:n}),l.jsx(db,{scope:r,isInside:!0,children:l.jsx(ob,{id:c.contentId,role:"tooltip",children:o||n})})]})})});Vc.displayName=ur;var Gc="TooltipArrow",Wc=d.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=go(r);return fb(Gc,r).isInside?null:l.jsx(po,{...o,...n,ref:t})});Wc.displayName=Gc;function mb(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,o,a)){case a:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function gb(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function vb(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function hb(e,t){const{x:r,y:n}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],c=t[s],u=i.x,f=i.y,p=c.x,m=c.y;f>n!=m>n&&r<(p-u)*(n-f)/(m-f)+u&&(o=!o)}return o}function xb(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),bb(t)}function bb(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const a=r[r.length-1],s=r[r.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var yb=Dc,wb=$c,Cb=Lc,Sb=Fc,Eb=Vc,Rb=Wc;function zc({delayDuration:e=0,...t}){return l.jsx(yb,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function ts({...e}){return l.jsx(zc,{children:l.jsx(wb,{"data-slot":"tooltip",...e})})}function rs({...e}){return l.jsx(Cb,{"data-slot":"tooltip-trigger",...e})}function ns({className:e,sideOffset:t=0,children:r,disableArrow:n=!1,...o}){return l.jsx(Sb,{children:l.jsxs(Eb,{"data-slot":"tooltip-content",sideOffset:t,className:T("qodo qodo-tooltip-content bg-purple-muted-700 border border-purple-muted-600 text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e,{"py-2.5":n}),...o,children:[r,!n&&l.jsx(Rb,{className:"bg-purple-muted-700 fill-purple-muted-700 z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const qc=rt("qodo qodo-button inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-normal ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none cursor-pointer border border-transparent",{variants:{variant:{default:"bg-[var(--fill-action-emphasis-idle)] text-[var(--text-action-on-emphasis-idle)] hover:bg-[var(--fill-action-emphasis-hover)] focus:bg-[var(--fill-action-emphasis-hover)] active:bg-[var(--fill-action-emphasis-hover)] disabled:bg-[var(--fill-action-emphasis-disabled)]",secondary:"bg-[var(--fill-action-neutral-idle)] text-[var(--text-action-neutral-idle)] hover:bg-[var(--fill-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-[var(--fill-action-neutral-disabled)] disabled:text-[var(--text-action-neutral-disabled)]",outline:"border border-[var(--border-action-neutral-idle)] text-[var(--text-action-neutral-idle)] hover:bg-[var(--fill-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-none disabled:text-[var(--text-action-neutral-disabled)]",ghost:"text-[var(--text-action-neutral-idle)] hover:text-[var(--text-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-none disabled:text-[var(--text-action-neutral-disabled)]",link:"text-[var(--text-action-emphasis-idle)] hover:text-[var(--text-action-emphasis-hover)] active:bg-[var(--fill-action-emphasis-active)] disabled:bg-none disabled:text-[var(--text-action-emphasis-disabled)]",danger:"border border-[var(--border-action-negative-idle)] text-[var(--icon-action-negative-idle)] hover:bg-[var(--fill-action-negative-hover)] active:bg-[var(--fill-action-negative-active)] disabled:border-[var(--border-action-negative-disabled)] disabled:text-[var(--icon-action-negative-disabled)]"},size:{default:"h-10 px-4 py-2",xs:"h-fit rounded-md text-xs px-2 py-1.5",sm:"h-8 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10","icon-sm":"h-7 w-7 p-1.5 rounded-md","icon-md":"h-8 w-8 p-1.5 rounded-md","icon-lg":"h-[45px] w-[45px] p-3 rounded-md"}},defaultVariants:{variant:"default",size:"default"}}),Be=d.forwardRef(({className:e,variant:t,size:r,loading:n,children:o,disabled:a,icon:s,iconPosition:i="left",tooltip:c,tooltipProps:u,...f},p)=>{const m={lg:"w-[18px] h-[18px]",default:"w-[18px] h-[18px]",sm:"w-[18px] h-[18px]",xs:"w-3.5 h-3.5",icon:"w-[18px] h-[18px]","icon-sm":"w-3.5 h-3.5","icon-md":"w-[18px] h-[18px]","icon-lg":"w-[18px] h-[18px]"}[r??"default"],g=s&&l.jsx(s,{className:T(m,"transition-opacity",{"mr-2":o&&i==="left","ml-2":o&&i!=="left","opacity-50":a||n})}),h=l.jsxs("button",{className:T(qc({variant:t,size:r,className:e})),ref:p,disabled:a||n,...f,children:[i==="left"&&g,o,i==="right"&&g,n&&l.jsx(ic,{className:T("ml-2 animate-spin",m)})]});return c?l.jsxs(ts,{children:[l.jsx(rs,{asChild:!0,children:l.jsx("span",{className:"inline-flex",children:h})}),l.jsx(ns,{...u,children:c})]}):h});Be.displayName="Button";const kb=rt("qodo qodo-input file:text-foreground placeholder:text-purple-muted-400 selection:bg-primary selection:text-primary-foreground border-input-neutral-idle flex h-9 w-full min-w-0 rounded-md border bg-purple-muted-900 px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-none focus-visible:ring-none aria-invalid:border-red-600 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 disabled:cursor-not-allowed disabled:opacity-50 dark:disabled:bg-[var(--fill-input-neutral-idle)] disabled:border-purple-muted-500 disabled:text-purple-muted-400 read-only:cursor-default md:text-sm dark:border-input-neutral-idle dark:bg-purple-muted-900 dark:text-foreground dark:placeholder:text-[var(--color-purple-muted-400)] [:not(:placeholder-shown)]:bg-purple-muted-700 [&[readonly]]:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:border-0 [&[readonly]]:text-[var(--text-input-neutral-idle)] [&[readonly]]:hover:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:hover:border-[var(--border-input-neutral-idle)] [&[readonly]]:focus:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:focus:border-[var(--border-input-neutral-idle)] [&[readonly]]:focus-visible:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:focus-visible:border-[var(--border-input-neutral-idle)] [&[readonly][disabled]]:opacity-100 [&[readonly][disabled]]:cursor-default [&[readonly][disabled]]:bg-[var(--fill-input-neutral-idle)] [&[readonly][disabled]]:border-0 [&[readonly][disabled]]:text-[var(--text-input-neutral-idle)] [&[readonly][disabled]]:hover:bg-[var(--fill-input-neutral-idle)] [&[readonly][disabled]]:hover:border-0 [&[readonly][disabled]]:focus:bg-[var(--fill-input-neutral-idle)] [&[readonly][disabled]]:focus:border-0 [&[readonly][disabled]]:focus-visible:bg-[var(--fill-input-neutral-idle)] [&[readonly][disabled]]:focus-visible:border-0",{variants:{variant:{default:"dark:focus-visible:bg-fill-input-neutral-idle dark:hover:bg-purple-muted-700 border-purple-muted-600 hover:bg-fill-input-neutral-hover focus:bg-purple-muted-700 focus:border-purple-muted-600 focus-visible:ring-none focus-visible:ring-none [&[readonly]]:hover:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:hover:border-0 [&[readonly]]:focus:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:focus:border-0 [&[readonly]]:focus-visible:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:focus-visible:border-0",secondary:"bg-secondary border-secondary text-secondary-foreground placeholder:text-color-purple-muted-400 dark:bg-secondary dark:border-secondary dark:text-secondary-foreground dark:placeholder:text-purple-muted-400",accent:"bg-accent border-accent text-accent-foreground placeholder:text-color-purple-muted-400 dark:bg-accent dark:border-accent dark:text-accent-foreground dark:placeholder:text-purple-muted-400",success:"bg-success border-success text-success-foreground placeholder:text-success-foreground/70 dark:bg-success dark:border-success dark:text-success-foreground dark:placeholder:text-success-foreground/70",warning:"bg-warning border-warning text-warning-foreground placeholder:text-warning-foreground/70 dark:bg-warning dark:border-warning dark:text-warning-foreground dark:placeholder:text-warning-foreground/70",destructive:"border-destructive bg-purple-muted-700 text-[--var(text-input-neutral-idle)] placeholder:text-destructive-foreground/70 dark:border-destructive dark:placeholder:text-destructive-foreground/70",ghost:"bg-transparent border-purple-muted-600 focus:border-purple-muted-600 focus-visible:ring-none focus-visible:ring-none [:not(:placeholder-shown)]:bg-transparent"}},defaultVariants:{variant:"default"}}),rn=d.forwardRef(({className:e,variant:t,type:r,error:n,...o},a)=>l.jsx("input",{ref:a,type:r,"data-slot":"input","aria-invalid":n||void 0,className:T(kb({variant:t,className:e})),...o}));rn.displayName="Input";function Wi(e,[t,r]){return Math.min(r,Math.max(t,e))}function zi(e){const t=Nb(e),r=d.forwardRef((n,o)=>{const{children:a,...s}=n,i=d.Children.toArray(a),c=i.find(Pb);if(c){const u=c.props.children,f=i.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return l.jsx(t,{...s,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return l.jsx(t,{...s,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function Nb(e){const t=d.forwardRef((r,n)=>{const{children:o,...a}=r;if(d.isValidElement(o)){const s=Ib(o),i=Tb(a,o.props);return o.type!==d.Fragment&&(i.ref=n?_e(n,s):s),d.cloneElement(o,i)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var jb=Symbol("radix.slottable");function Pb(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===jb}function Tb(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{const c=a(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function Ib(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function vo(e){const t=e+"CollectionProvider",[r,n]=Pe(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=v=>{const{scope:x,children:b}=v,y=E.useRef(null),w=E.useRef(new Map).current;return l.jsx(o,{scope:x,itemMap:w,collectionRef:y,children:b})};s.displayName=t;const i=e+"CollectionSlot",c=zi(i),u=E.forwardRef((v,x)=>{const{scope:b,children:y}=v,w=a(i,b),S=ce(x,w.collectionRef);return l.jsx(c,{ref:S,children:y})});u.displayName=i;const f=e+"CollectionItemSlot",p="data-radix-collection-item",m=zi(f),g=E.forwardRef((v,x)=>{const{scope:b,children:y,...w}=v,S=E.useRef(null),R=ce(x,S),j=a(f,b);return E.useEffect(()=>(j.itemMap.set(S,{ref:S,...w}),()=>void j.itemMap.delete(S))),l.jsx(m,{[p]:"",ref:R,children:y})});g.displayName=f;function h(v){const x=a(e+"CollectionConsumer",v);return E.useCallback(()=>{const y=x.collectionRef.current;if(!y)return[];const w=Array.from(y.querySelectorAll(`[${p}]`));return Array.from(x.itemMap.values()).sort((j,k)=>w.indexOf(j.ref.current)-w.indexOf(k.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:s,Slot:u,ItemSlot:g},h,n]}var Ab=d.createContext(void 0);function Gt(e){const t=d.useContext(Ab);return e||t||"ltr"}var Zo=0;function ho(){d.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??qi()),document.body.insertAdjacentElement("beforeend",e[1]??qi()),Zo++,()=>{Zo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Zo--}},[])}function qi(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Jo="focusScope.autoFocusOnMount",Qo="focusScope.autoFocusOnUnmount",Hi={bubbles:!1,cancelable:!0},_b="FocusScope",nn=d.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,c]=d.useState(null),u=ze(o),f=ze(a),p=d.useRef(null),m=ce(t,v=>c(v)),g=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(n){let v=function(w){if(g.paused||!i)return;const S=w.target;i.contains(S)?p.current=S:mt(p.current,{select:!0})},x=function(w){if(g.paused||!i)return;const S=w.relatedTarget;S!==null&&(i.contains(S)||mt(p.current,{select:!0}))},b=function(w){if(document.activeElement===document.body)for(const R of w)R.removedNodes.length>0&&mt(i)};document.addEventListener("focusin",v),document.addEventListener("focusout",x);const y=new MutationObserver(b);return i&&y.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",x),y.disconnect()}}},[n,i,g.paused]),d.useEffect(()=>{if(i){Ki.add(g);const v=document.activeElement;if(!i.contains(v)){const b=new CustomEvent(Jo,Hi);i.addEventListener(Jo,u),i.dispatchEvent(b),b.defaultPrevented||(Ob(Fb(Hc(i)),{select:!0}),document.activeElement===v&&mt(i))}return()=>{i.removeEventListener(Jo,u),setTimeout(()=>{const b=new CustomEvent(Qo,Hi);i.addEventListener(Qo,f),i.dispatchEvent(b),b.defaultPrevented||mt(v??document.body,{select:!0}),i.removeEventListener(Qo,f),Ki.remove(g)},0)}}},[i,u,f,g]);const h=d.useCallback(v=>{if(!r&&!n||g.paused)return;const x=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,b=document.activeElement;if(x&&b){const y=v.currentTarget,[w,S]=Mb(y);w&&S?!v.shiftKey&&b===S?(v.preventDefault(),r&&mt(w,{select:!0})):v.shiftKey&&b===w&&(v.preventDefault(),r&&mt(S,{select:!0})):b===y&&v.preventDefault()}},[r,n,g.paused]);return l.jsx(re.div,{tabIndex:-1,...s,ref:m,onKeyDown:h})});nn.displayName=_b;function Ob(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(mt(n,{select:t}),document.activeElement!==r)return}function Mb(e){const t=Hc(e),r=Ui(t,e),n=Ui(t.reverse(),e);return[r,n]}function Hc(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Ui(e,t){for(const r of e)if(!Db(r,{upTo:t}))return r}function Db(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function $b(e){return e instanceof HTMLInputElement&&"select"in e}function mt(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&$b(e)&&t&&e.select()}}var Ki=Lb();function Lb(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Yi(e,t),e.unshift(t)},remove(t){var r;e=Yi(e,t),(r=e[0])==null||r.resume()}}}function Yi(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Fb(e){return e.filter(t=>t.tagName!=="A")}function Vb(e){const t=Bb(e),r=d.forwardRef((n,o)=>{const{children:a,...s}=n,i=d.Children.toArray(a),c=i.find(Wb);if(c){const u=c.props.children,f=i.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return l.jsx(t,{...s,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return l.jsx(t,{...s,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function Bb(e){const t=d.forwardRef((r,n)=>{const{children:o,...a}=r;if(d.isValidElement(o)){const s=qb(o),i=zb(a,o.props);return o.type!==d.Fragment&&(i.ref=n?_e(n,s):s),d.cloneElement(o,i)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Gb=Symbol("radix.slottable");function Wb(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Gb}function zb(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{const c=a(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function qb(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function xo(e){const t=d.useRef({value:e,previous:e});return d.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Hb=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Qt=new WeakMap,jn=new WeakMap,Pn={},ea=0,Uc=function(e){return e&&(e.host||Uc(e.parentNode))},Ub=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Uc(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Kb=function(e,t,r,n){var o=Ub(t,Array.isArray(e)?e:[e]);Pn[r]||(Pn[r]=new WeakMap);var a=Pn[r],s=[],i=new Set,c=new Set(o),u=function(p){!p||i.has(p)||(i.add(p),u(p.parentNode))};o.forEach(u);var f=function(p){!p||c.has(p)||Array.prototype.forEach.call(p.children,function(m){if(i.has(m))f(m);else try{var g=m.getAttribute(n),h=g!==null&&g!=="false",v=(Qt.get(m)||0)+1,x=(a.get(m)||0)+1;Qt.set(m,v),a.set(m,x),s.push(m),v===1&&h&&jn.set(m,!0),x===1&&m.setAttribute(r,"true"),h||m.setAttribute(n,"true")}catch(b){console.error("aria-hidden: cannot operate on ",m,b)}})};return f(t),i.clear(),ea++,function(){s.forEach(function(p){var m=Qt.get(p)-1,g=a.get(p)-1;Qt.set(p,m),a.set(p,g),m||(jn.has(p)||p.removeAttribute(n),jn.delete(p)),g||p.removeAttribute(r)}),ea--,ea||(Qt=new WeakMap,Qt=new WeakMap,jn=new WeakMap,Pn={})}},bo=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=Hb(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),Kb(n,o,r,"aria-hidden")):function(){return null}},Je=function(){return Je=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Je.apply(this,arguments)};function Kc(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Yb(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var Mn="right-scroll-bar-position",Dn="width-before-scroll-bar",Xb="with-scroll-bars-hidden",Zb="--removed-body-scroll-bar-size";function ta(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Jb(e,t){var r=E.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var Qb=typeof window<"u"?d.useLayoutEffect:d.useEffect,Xi=new WeakMap;function ey(e,t){var r=Jb(null,function(n){return e.forEach(function(o){return ta(o,n)})});return Qb(function(){var n=Xi.get(r);if(n){var o=new Set(n),a=new Set(e),s=r.current;o.forEach(function(i){a.has(i)||ta(i,null)}),a.forEach(function(i){o.has(i)||ta(i,s)})}Xi.set(r,e)},[e]),r}function ty(e){return e}function ry(e,t){t===void 0&&(t=ty);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var s=t(a,n);return r.push(s),function(){r=r.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(n=!0;r.length;){var s=r;r=[],s.forEach(a)}r={push:function(i){return a(i)},filter:function(){return r}}},assignMedium:function(a){n=!0;var s=[];if(r.length){var i=r;r=[],i.forEach(a),s=r}var c=function(){var f=s;s=[],f.forEach(a)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(f){s.push(f),u()},filter:function(f){return s=s.filter(f),r}}}};return o}function ny(e){e===void 0&&(e={});var t=ry(null);return t.options=Je({async:!0,ssr:!1},e),t}var Yc=function(e){var t=e.sideCar,r=Kc(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return d.createElement(n,Je({},r))};Yc.isSideCarExport=!0;function oy(e,t){return e.useMedium(t),Yc}var Xc=ny(),ra=function(){},yo=d.forwardRef(function(e,t){var r=d.useRef(null),n=d.useState({onScrollCapture:ra,onWheelCapture:ra,onTouchMoveCapture:ra}),o=n[0],a=n[1],s=e.forwardProps,i=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,p=e.shards,m=e.sideCar,g=e.noRelative,h=e.noIsolation,v=e.inert,x=e.allowPinchZoom,b=e.as,y=b===void 0?"div":b,w=e.gapMode,S=Kc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=m,j=ey([r,t]),k=Je(Je({},S),o);return d.createElement(d.Fragment,null,f&&d.createElement(R,{sideCar:Xc,removeScrollBar:u,shards:p,noRelative:g,noIsolation:h,inert:v,setCallbacks:a,allowPinchZoom:!!x,lockRef:r,gapMode:w}),s?d.cloneElement(d.Children.only(i),Je(Je({},k),{ref:j})):d.createElement(y,Je({},k,{className:c,ref:j}),i))});yo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};yo.classNames={fullWidth:Dn,zeroRight:Mn};var ay=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function sy(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ay();return t&&e.setAttribute("nonce",t),e}function iy(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ly(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var cy=function(){var e=0,t=null;return{add:function(r){e==0&&(t=sy())&&(iy(t,r),ly(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},uy=function(){var e=cy();return function(t,r){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Zc=function(){var e=uy(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},dy={left:0,top:0,right:0,gap:0},na=function(e){return parseInt(e||"",10)||0},fy=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[na(r),na(n),na(o)]},py=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return dy;var t=fy(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},my=Zc(),lr="data-scroll-locked",gy=function(e,t,r,n){var o=e.left,a=e.top,s=e.right,i=e.gap;return r===void 0&&(r="margin"),`
|
|
150
|
+
*/const uh=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ao=Se("x",uh);function U(e,t,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Pi(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function _e(...e){return t=>{let r=!1;const n=e.map(o=>{const a=Pi(o,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let o=0;o<n.length;o++){const a=n[o];typeof a=="function"?a():Pi(e[o],null)}}}}function ce(...e){return d.useCallback(_e(...e),e)}function dh(e,t){const r=d.createContext(t),n=a=>{const{children:s,...i}=a,c=d.useMemo(()=>i,Object.values(i));return l.jsx(r.Provider,{value:c,children:s})};n.displayName=e+"Provider";function o(a){const s=d.useContext(r);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[n,o]}function Pe(e,t=[]){let r=[];function n(a,s){const i=d.createContext(s),c=r.length;r=[...r,s];const u=p=>{var b;const{scope:m,children:g,...h}=p,v=((b=m==null?void 0:m[e])==null?void 0:b[c])||i,x=d.useMemo(()=>h,Object.values(h));return l.jsx(v.Provider,{value:x,children:g})};u.displayName=a+"Provider";function f(p,m){var v;const g=((v=m==null?void 0:m[e])==null?void 0:v[c])||i,h=d.useContext(g);if(h)return h;if(s!==void 0)return s;throw new Error(`\`${p}\` must be used within \`${a}\``)}return[u,f]}const o=()=>{const a=r.map(s=>d.createContext(s));return function(i){const c=(i==null?void 0:i[e])||a;return d.useMemo(()=>({[`__scope${e}`]:{...i,[e]:c}}),[i,c])}};return o.scopeName=e,[n,fh(o,...t)]}function fh(...e){const t=e[0];if(e.length===1)return t;const r=()=>{const n=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=n.reduce((i,{useScope:c,scopeName:u})=>{const p=c(a)[`__scope${u}`];return{...i,...p}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return r.scopeName=t.scopeName,r}function ph(e){const t=mh(e),r=d.forwardRef((n,o)=>{const{children:a,...s}=n,i=d.Children.toArray(a),c=i.find(vh);if(c){const u=c.props.children,f=i.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return l.jsx(t,{...s,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return l.jsx(t,{...s,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function mh(e){const t=d.forwardRef((r,n)=>{const{children:o,...a}=r;if(d.isValidElement(o)){const s=xh(o),i=hh(a,o.props);return o.type!==d.Fragment&&(i.ref=n?_e(n,s):s),d.cloneElement(o,i)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var gh=Symbol("radix.slottable");function vh(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===gh}function hh(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{const c=a(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function xh(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var bh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],re=bh.reduce((e,t)=>{const r=ph(`Primitive.${t}`),n=d.forwardRef((o,a)=>{const{asChild:s,...i}=o,c=s?r:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),l.jsx(c,{...i,ref:a})});return n.displayName=`Primitive.${t}`,{...e,[t]:n}},{});function cc(e,t){e&&no.flushSync(()=>e.dispatchEvent(t))}function ze(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...r)=>{var n;return(n=t.current)==null?void 0:n.call(t,...r)},[])}function yh(e,t=globalThis==null?void 0:globalThis.document){const r=ze(e);d.useEffect(()=>{const n=o=>{o.key==="Escape"&&r(o)};return t.addEventListener("keydown",n,{capture:!0}),()=>t.removeEventListener("keydown",n,{capture:!0})},[r,t])}var wh="DismissableLayer",ha="dismissableLayer.update",Ch="dismissableLayer.pointerDownOutside",Sh="dismissableLayer.focusOutside",Ti,uc=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),gr=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:n,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...c}=e,u=d.useContext(uc),[f,p]=d.useState(null),m=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,g]=d.useState({}),h=ce(t,k=>p(k)),v=Array.from(u.layers),[x]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(x),y=f?v.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,S=y>=b,R=kh(k=>{const N=k.target,$=[...u.branches].some(B=>B.contains(N));!S||$||(o==null||o(k),s==null||s(k),k.defaultPrevented||i==null||i())},m),j=Nh(k=>{const N=k.target;[...u.branches].some(B=>B.contains(N))||(a==null||a(k),s==null||s(k),k.defaultPrevented||i==null||i())},m);return yh(k=>{y===u.layers.size-1&&(n==null||n(k),!k.defaultPrevented&&i&&(k.preventDefault(),i()))},m),d.useEffect(()=>{if(f)return r&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ti=m.body.style.pointerEvents,m.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Ii(),()=>{r&&u.layersWithOutsidePointerEventsDisabled.size===1&&(m.body.style.pointerEvents=Ti)}},[f,m,r,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Ii())},[f,u]),d.useEffect(()=>{const k=()=>g({});return document.addEventListener(ha,k),()=>document.removeEventListener(ha,k)},[]),l.jsx(re.div,{...c,ref:h,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:U(e.onFocusCapture,j.onFocusCapture),onBlurCapture:U(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:U(e.onPointerDownCapture,R.onPointerDownCapture)})});gr.displayName=wh;var Eh="DismissableLayerBranch",Rh=d.forwardRef((e,t)=>{const r=d.useContext(uc),n=d.useRef(null),o=ce(t,n);return d.useEffect(()=>{const a=n.current;if(a)return r.branches.add(a),()=>{r.branches.delete(a)}},[r.branches]),l.jsx(re.div,{...e,ref:o})});Rh.displayName=Eh;function kh(e,t=globalThis==null?void 0:globalThis.document){const r=ze(e),n=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const a=i=>{if(i.target&&!n.current){let c=function(){dc(Ch,r,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);n.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,r]),{onPointerDownCapture:()=>n.current=!0}}function Nh(e,t=globalThis==null?void 0:globalThis.document){const r=ze(e),n=d.useRef(!1);return d.useEffect(()=>{const o=a=>{a.target&&!n.current&&dc(Sh,r,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}function Ii(){const e=new CustomEvent(ha);document.dispatchEvent(e)}function dc(e,t,r,{discrete:n}){const o=r.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?cc(o,a):o.dispatchEvent(a)}var je=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},jh=d[" useId ".trim().toString()]||(()=>{}),Ph=0;function ye(e){const[t,r]=d.useState(jh());return je(()=>{r(n=>n??String(Ph++))},[e]),t?`radix-${t}`:""}const Th=["top","right","bottom","left"],ht=Math.min,$e=Math.max,Vn=Math.round,kn=Math.floor,et=e=>({x:e,y:e}),Ih={left:"right",right:"left",bottom:"top",top:"bottom"},Ah={start:"end",end:"start"};function xa(e,t,r){return $e(e,ht(t,r))}function ct(e,t){return typeof e=="function"?e(t):e}function ut(e){return e.split("-")[0]}function vr(e){return e.split("-")[1]}function qa(e){return e==="x"?"y":"x"}function Ha(e){return e==="y"?"height":"width"}const _h=new Set(["top","bottom"]);function Qe(e){return _h.has(ut(e))?"y":"x"}function Ua(e){return qa(Qe(e))}function Oh(e,t,r){r===void 0&&(r=!1);const n=vr(e),o=Ua(e),a=Ha(o);let s=o==="x"?n===(r?"end":"start")?"right":"left":n==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Bn(s)),[s,Bn(s)]}function Mh(e){const t=Bn(e);return[ba(e),t,ba(t)]}function ba(e){return e.replace(/start|end/g,t=>Ah[t])}const Ai=["left","right"],_i=["right","left"],Dh=["top","bottom"],$h=["bottom","top"];function Lh(e,t,r){switch(e){case"top":case"bottom":return r?t?_i:Ai:t?Ai:_i;case"left":case"right":return t?Dh:$h;default:return[]}}function Fh(e,t,r,n){const o=vr(e);let a=Lh(ut(e),r==="start",n);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(ba)))),a}function Bn(e){return e.replace(/left|right|bottom|top/g,t=>Ih[t])}function Vh(e){return{top:0,right:0,bottom:0,left:0,...e}}function fc(e){return typeof e!="number"?Vh(e):{top:e,right:e,bottom:e,left:e}}function Gn(e){const{x:t,y:r,width:n,height:o}=e;return{width:n,height:o,top:r,left:t,right:t+n,bottom:r+o,x:t,y:r}}function Oi(e,t,r){let{reference:n,floating:o}=e;const a=Qe(t),s=Ua(t),i=Ha(s),c=ut(t),u=a==="y",f=n.x+n.width/2-o.width/2,p=n.y+n.height/2-o.height/2,m=n[i]/2-o[i]/2;let g;switch(c){case"top":g={x:f,y:n.y-o.height};break;case"bottom":g={x:f,y:n.y+n.height};break;case"right":g={x:n.x+n.width,y:p};break;case"left":g={x:n.x-o.width,y:p};break;default:g={x:n.x,y:n.y}}switch(vr(t)){case"start":g[s]-=m*(r&&u?-1:1);break;case"end":g[s]+=m*(r&&u?-1:1);break}return g}const Bh=async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:a=[],platform:s}=r,i=a.filter(Boolean),c=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:p}=Oi(u,n,c),m=n,g={},h=0;for(let v=0;v<i.length;v++){const{name:x,fn:b}=i[v],{x:y,y:w,data:S,reset:R}=await b({x:f,y:p,initialPlacement:n,placement:m,strategy:o,middlewareData:g,rects:u,platform:s,elements:{reference:e,floating:t}});f=y??f,p=w??p,g={...g,[x]:{...g[x],...S}},R&&h<=50&&(h++,typeof R=="object"&&(R.placement&&(m=R.placement),R.rects&&(u=R.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:f,y:p}=Oi(u,m,c)),v=-1)}return{x:f,y:p,placement:m,strategy:o,middlewareData:g}};async function Wr(e,t){var r;t===void 0&&(t={});const{x:n,y:o,platform:a,rects:s,elements:i,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:p="floating",altBoundary:m=!1,padding:g=0}=ct(t,e),h=fc(g),x=i[m?p==="floating"?"reference":"floating":p],b=Gn(await a.getClippingRect({element:(r=await(a.isElement==null?void 0:a.isElement(x)))==null||r?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:u,rootBoundary:f,strategy:c})),y=p==="floating"?{x:n,y:o,width:s.floating.width,height:s.floating.height}:s.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),S=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},R=Gn(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:y,offsetParent:w,strategy:c}):y);return{top:(b.top-R.top+h.top)/S.y,bottom:(R.bottom-b.bottom+h.bottom)/S.y,left:(b.left-R.left+h.left)/S.x,right:(R.right-b.right+h.right)/S.x}}const Gh=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:a,platform:s,elements:i,middlewareData:c}=t,{element:u,padding:f=0}=ct(e,t)||{};if(u==null)return{};const p=fc(f),m={x:r,y:n},g=Ua(o),h=Ha(g),v=await s.getDimensions(u),x=g==="y",b=x?"top":"left",y=x?"bottom":"right",w=x?"clientHeight":"clientWidth",S=a.reference[h]+a.reference[g]-m[g]-a.floating[h],R=m[g]-a.reference[g],j=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let k=j?j[w]:0;(!k||!await(s.isElement==null?void 0:s.isElement(j)))&&(k=i.floating[w]||a.floating[h]);const N=S/2-R/2,$=k/2-v[h]/2-1,B=ht(p[b],$),W=ht(p[y],$),Y=B,Z=k-v[h]-W,z=k/2-v[h]/2+N,D=xa(Y,z,Z),_=!c.arrow&&vr(o)!=null&&z!==D&&a.reference[h]/2-(z<Y?B:W)-v[h]/2<0,L=_?z<Y?z-Y:z-Z:0;return{[g]:m[g]+L,data:{[g]:D,centerOffset:z-D-L,..._&&{alignmentOffset:L}},reset:_}}}),Wh=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:g="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:v=!0,...x}=ct(e,t);if((r=a.arrow)!=null&&r.alignmentOffset)return{};const b=ut(o),y=Qe(i),w=ut(i)===i,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),R=m||(w||!v?[Bn(i)]:Mh(i)),j=h!=="none";!m&&j&&R.push(...Fh(i,v,h,S));const k=[i,...R],N=await Wr(t,x),$=[];let B=((n=a.flip)==null?void 0:n.overflows)||[];if(f&&$.push(N[b]),p){const z=Oh(o,s,S);$.push(N[z[0]],N[z[1]])}if(B=[...B,{placement:o,overflows:$}],!$.every(z=>z<=0)){var W,Y;const z=(((W=a.flip)==null?void 0:W.index)||0)+1,D=k[z];if(D&&(!(p==="alignment"?y!==Qe(D):!1)||B.every(P=>Qe(P.placement)===y?P.overflows[0]>0:!0)))return{data:{index:z,overflows:B},reset:{placement:D}};let _=(Y=B.filter(L=>L.overflows[0]<=0).sort((L,P)=>L.overflows[1]-P.overflows[1])[0])==null?void 0:Y.placement;if(!_)switch(g){case"bestFit":{var Z;const L=(Z=B.filter(P=>{if(j){const O=Qe(P.placement);return O===y||O==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(O=>O>0).reduce((O,H)=>O+H,0)]).sort((P,O)=>P[1]-O[1])[0])==null?void 0:Z[0];L&&(_=L);break}case"initialPlacement":_=i;break}if(o!==_)return{reset:{placement:_}}}return{}}}};function Mi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Di(e){return Th.some(t=>e[t]>=0)}const zh=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=ct(e,t);switch(n){case"referenceHidden":{const a=await Wr(t,{...o,elementContext:"reference"}),s=Mi(a,r.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Di(s)}}}case"escaped":{const a=await Wr(t,{...o,altBoundary:!0}),s=Mi(a,r.floating);return{data:{escapedOffsets:s,escaped:Di(s)}}}default:return{}}}}},pc=new Set(["left","top"]);async function qh(e,t){const{placement:r,platform:n,elements:o}=e,a=await(n.isRTL==null?void 0:n.isRTL(o.floating)),s=ut(r),i=vr(r),c=Qe(r)==="y",u=pc.has(s)?-1:1,f=a&&c?-1:1,p=ct(t,e);let{mainAxis:m,crossAxis:g,alignmentAxis:h}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return i&&typeof h=="number"&&(g=i==="end"?h*-1:h),c?{x:g*f,y:m*u}:{x:m*u,y:g*f}}const Hh=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:a,placement:s,middlewareData:i}=t,c=await qh(t,e);return s===((r=i.offset)==null?void 0:r.placement)&&(n=i.arrow)!=null&&n.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:s}}}}},Uh=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:i={fn:x=>{let{x:b,y}=x;return{x:b,y}}},...c}=ct(e,t),u={x:r,y:n},f=await Wr(t,c),p=Qe(ut(o)),m=qa(p);let g=u[m],h=u[p];if(a){const x=m==="y"?"top":"left",b=m==="y"?"bottom":"right",y=g+f[x],w=g-f[b];g=xa(y,g,w)}if(s){const x=p==="y"?"top":"left",b=p==="y"?"bottom":"right",y=h+f[x],w=h-f[b];h=xa(y,h,w)}const v=i.fn({...t,[m]:g,[p]:h});return{...v,data:{x:v.x-r,y:v.y-n,enabled:{[m]:a,[p]:s}}}}}},Kh=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:c=!0,crossAxis:u=!0}=ct(e,t),f={x:r,y:n},p=Qe(o),m=qa(p);let g=f[m],h=f[p];const v=ct(i,t),x=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const w=m==="y"?"height":"width",S=a.reference[m]-a.floating[w]+x.mainAxis,R=a.reference[m]+a.reference[w]-x.mainAxis;g<S?g=S:g>R&&(g=R)}if(u){var b,y;const w=m==="y"?"width":"height",S=pc.has(ut(o)),R=a.reference[p]-a.floating[w]+(S&&((b=s.offset)==null?void 0:b[p])||0)+(S?0:x.crossAxis),j=a.reference[p]+a.reference[w]+(S?0:((y=s.offset)==null?void 0:y[p])||0)-(S?x.crossAxis:0);h<R?h=R:h>j&&(h=j)}return{[m]:g,[p]:h}}}},Yh=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var r,n;const{placement:o,rects:a,platform:s,elements:i}=t,{apply:c=()=>{},...u}=ct(e,t),f=await Wr(t,u),p=ut(o),m=vr(o),g=Qe(o)==="y",{width:h,height:v}=a.floating;let x,b;p==="top"||p==="bottom"?(x=p,b=m===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(b=p,x=m==="end"?"top":"bottom");const y=v-f.top-f.bottom,w=h-f.left-f.right,S=ht(v-f[x],y),R=ht(h-f[b],w),j=!t.middlewareData.shift;let k=S,N=R;if((r=t.middlewareData.shift)!=null&&r.enabled.x&&(N=w),(n=t.middlewareData.shift)!=null&&n.enabled.y&&(k=y),j&&!m){const B=$e(f.left,0),W=$e(f.right,0),Y=$e(f.top,0),Z=$e(f.bottom,0);g?N=h-2*(B!==0||W!==0?B+W:$e(f.left,f.right)):k=v-2*(Y!==0||Z!==0?Y+Z:$e(f.top,f.bottom))}await c({...t,availableWidth:N,availableHeight:k});const $=await s.getDimensions(i.floating);return h!==$.width||v!==$.height?{reset:{rects:!0}}:{}}}};function so(){return typeof window<"u"}function hr(e){return mc(e)?(e.nodeName||"").toLowerCase():"#document"}function Le(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function nt(e){var t;return(t=(mc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function mc(e){return so()?e instanceof Node||e instanceof Le(e).Node:!1}function qe(e){return so()?e instanceof Element||e instanceof Le(e).Element:!1}function tt(e){return so()?e instanceof HTMLElement||e instanceof Le(e).HTMLElement:!1}function $i(e){return!so()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Le(e).ShadowRoot}const Xh=new Set(["inline","contents"]);function Jr(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=He(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!Xh.has(o)}const Zh=new Set(["table","td","th"]);function Jh(e){return Zh.has(hr(e))}const Qh=[":popover-open",":modal"];function io(e){return Qh.some(t=>{try{return e.matches(t)}catch{return!1}})}const ex=["transform","translate","scale","rotate","perspective"],tx=["transform","translate","scale","rotate","perspective","filter"],rx=["paint","layout","strict","content"];function Ka(e){const t=Ya(),r=qe(e)?He(e):e;return ex.some(n=>r[n]?r[n]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!t&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!t&&(r.filter?r.filter!=="none":!1)||tx.some(n=>(r.willChange||"").includes(n))||rx.some(n=>(r.contain||"").includes(n))}function nx(e){let t=xt(e);for(;tt(t)&&!cr(t);){if(Ka(t))return t;if(io(t))return null;t=xt(t)}return null}function Ya(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ox=new Set(["html","body","#document"]);function cr(e){return ox.has(hr(e))}function He(e){return Le(e).getComputedStyle(e)}function lo(e){return qe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function xt(e){if(hr(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$i(e)&&e.host||nt(e);return $i(t)?t.host:t}function gc(e){const t=xt(e);return cr(t)?e.ownerDocument?e.ownerDocument.body:e.body:tt(t)&&Jr(t)?t:gc(t)}function zr(e,t,r){var n;t===void 0&&(t=[]),r===void 0&&(r=!0);const o=gc(e),a=o===((n=e.ownerDocument)==null?void 0:n.body),s=Le(o);if(a){const i=ya(s);return t.concat(s,s.visualViewport||[],Jr(o)?o:[],i&&r?zr(i):[])}return t.concat(o,zr(o,[],r))}function ya(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function vc(e){const t=He(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=tt(e),a=o?e.offsetWidth:r,s=o?e.offsetHeight:n,i=Vn(r)!==a||Vn(n)!==s;return i&&(r=a,n=s),{width:r,height:n,$:i}}function Xa(e){return qe(e)?e:e.contextElement}function ir(e){const t=Xa(e);if(!tt(t))return et(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:a}=vc(t);let s=(a?Vn(r.width):r.width)/n,i=(a?Vn(r.height):r.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const ax=et(0);function hc(e){const t=Le(e);return!Ya()||!t.visualViewport?ax:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function sx(e,t,r){return t===void 0&&(t=!1),!r||t&&r!==Le(e)?!1:t}function Ot(e,t,r,n){t===void 0&&(t=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),a=Xa(e);let s=et(1);t&&(n?qe(n)&&(s=ir(n)):s=ir(e));const i=sx(a,r,n)?hc(a):et(0);let c=(o.left+i.x)/s.x,u=(o.top+i.y)/s.y,f=o.width/s.x,p=o.height/s.y;if(a){const m=Le(a),g=n&&qe(n)?Le(n):n;let h=m,v=ya(h);for(;v&&n&&g!==h;){const x=ir(v),b=v.getBoundingClientRect(),y=He(v),w=b.left+(v.clientLeft+parseFloat(y.paddingLeft))*x.x,S=b.top+(v.clientTop+parseFloat(y.paddingTop))*x.y;c*=x.x,u*=x.y,f*=x.x,p*=x.y,c+=w,u+=S,h=Le(v),v=ya(h)}}return Gn({width:f,height:p,x:c,y:u})}function co(e,t){const r=lo(e).scrollLeft;return t?t.left+r:Ot(nt(e)).left+r}function xc(e,t){const r=e.getBoundingClientRect(),n=r.left+t.scrollLeft-co(e,r),o=r.top+t.scrollTop;return{x:n,y:o}}function ix(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const a=o==="fixed",s=nt(n),i=t?io(t.floating):!1;if(n===s||i&&a)return r;let c={scrollLeft:0,scrollTop:0},u=et(1);const f=et(0),p=tt(n);if((p||!p&&!a)&&((hr(n)!=="body"||Jr(s))&&(c=lo(n)),tt(n))){const g=Ot(n);u=ir(n),f.x=g.x+n.clientLeft,f.y=g.y+n.clientTop}const m=s&&!p&&!a?xc(s,c):et(0);return{width:r.width*u.x,height:r.height*u.y,x:r.x*u.x-c.scrollLeft*u.x+f.x+m.x,y:r.y*u.y-c.scrollTop*u.y+f.y+m.y}}function lx(e){return Array.from(e.getClientRects())}function cx(e){const t=nt(e),r=lo(e),n=e.ownerDocument.body,o=$e(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),a=$e(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let s=-r.scrollLeft+co(e);const i=-r.scrollTop;return He(n).direction==="rtl"&&(s+=$e(t.clientWidth,n.clientWidth)-o),{width:o,height:a,x:s,y:i}}const Li=25;function ux(e,t){const r=Le(e),n=nt(e),o=r.visualViewport;let a=n.clientWidth,s=n.clientHeight,i=0,c=0;if(o){a=o.width,s=o.height;const f=Ya();(!f||f&&t==="fixed")&&(i=o.offsetLeft,c=o.offsetTop)}const u=co(n);if(u<=0){const f=n.ownerDocument,p=f.body,m=getComputedStyle(p),g=f.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,h=Math.abs(n.clientWidth-p.clientWidth-g);h<=Li&&(a-=h)}else u<=Li&&(a+=u);return{width:a,height:s,x:i,y:c}}const dx=new Set(["absolute","fixed"]);function fx(e,t){const r=Ot(e,!0,t==="fixed"),n=r.top+e.clientTop,o=r.left+e.clientLeft,a=tt(e)?ir(e):et(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,c=o*a.x,u=n*a.y;return{width:s,height:i,x:c,y:u}}function Fi(e,t,r){let n;if(t==="viewport")n=ux(e,r);else if(t==="document")n=cx(nt(e));else if(qe(t))n=fx(t,r);else{const o=hc(e);n={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Gn(n)}function bc(e,t){const r=xt(e);return r===t||!qe(r)||cr(r)?!1:He(r).position==="fixed"||bc(r,t)}function px(e,t){const r=t.get(e);if(r)return r;let n=zr(e,[],!1).filter(i=>qe(i)&&hr(i)!=="body"),o=null;const a=He(e).position==="fixed";let s=a?xt(e):e;for(;qe(s)&&!cr(s);){const i=He(s),c=Ka(s);!c&&i.position==="fixed"&&(o=null),(a?!c&&!o:!c&&i.position==="static"&&!!o&&dx.has(o.position)||Jr(s)&&!c&&bc(e,s))?n=n.filter(f=>f!==s):o=i,s=xt(s)}return t.set(e,n),n}function mx(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const s=[...r==="clippingAncestors"?io(t)?[]:px(t,this._c):[].concat(r),n],i=s[0],c=s.reduce((u,f)=>{const p=Fi(t,f,o);return u.top=$e(p.top,u.top),u.right=ht(p.right,u.right),u.bottom=ht(p.bottom,u.bottom),u.left=$e(p.left,u.left),u},Fi(t,i,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function gx(e){const{width:t,height:r}=vc(e);return{width:t,height:r}}function vx(e,t,r){const n=tt(t),o=nt(t),a=r==="fixed",s=Ot(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const c=et(0);function u(){c.x=co(o)}if(n||!n&&!a)if((hr(t)!=="body"||Jr(o))&&(i=lo(t)),n){const g=Ot(t,!0,a,t);c.x=g.x+t.clientLeft,c.y=g.y+t.clientTop}else o&&u();a&&!n&&o&&u();const f=o&&!n&&!a?xc(o,i):et(0),p=s.left+i.scrollLeft-c.x-f.x,m=s.top+i.scrollTop-c.y-f.y;return{x:p,y:m,width:s.width,height:s.height}}function Yo(e){return He(e).position==="static"}function Vi(e,t){if(!tt(e)||He(e).position==="fixed")return null;if(t)return t(e);let r=e.offsetParent;return nt(e)===r&&(r=r.ownerDocument.body),r}function yc(e,t){const r=Le(e);if(io(e))return r;if(!tt(e)){let o=xt(e);for(;o&&!cr(o);){if(qe(o)&&!Yo(o))return o;o=xt(o)}return r}let n=Vi(e,t);for(;n&&Jh(n)&&Yo(n);)n=Vi(n,t);return n&&cr(n)&&Yo(n)&&!Ka(n)?r:n||nx(e)||r}const hx=async function(e){const t=this.getOffsetParent||yc,r=this.getDimensions,n=await r(e.floating);return{reference:vx(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:n.width,height:n.height}}};function xx(e){return He(e).direction==="rtl"}const bx={convertOffsetParentRelativeRectToViewportRelativeRect:ix,getDocumentElement:nt,getClippingRect:mx,getOffsetParent:yc,getElementRects:hx,getClientRects:lx,getDimensions:gx,getScale:ir,isElement:qe,isRTL:xx};function wc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function yx(e,t){let r=null,n;const o=nt(e);function a(){var i;clearTimeout(n),(i=r)==null||i.disconnect(),r=null}function s(i,c){i===void 0&&(i=!1),c===void 0&&(c=1),a();const u=e.getBoundingClientRect(),{left:f,top:p,width:m,height:g}=u;if(i||t(),!m||!g)return;const h=kn(p),v=kn(o.clientWidth-(f+m)),x=kn(o.clientHeight-(p+g)),b=kn(f),w={rootMargin:-h+"px "+-v+"px "+-x+"px "+-b+"px",threshold:$e(0,ht(1,c))||1};let S=!0;function R(j){const k=j[0].intersectionRatio;if(k!==c){if(!S)return s();k?s(!1,k):n=setTimeout(()=>{s(!1,1e-7)},1e3)}k===1&&!wc(u,e.getBoundingClientRect())&&s(),S=!1}try{r=new IntersectionObserver(R,{...w,root:o.ownerDocument})}catch{r=new IntersectionObserver(R,w)}r.observe(e)}return s(!0),a}function wx(e,t,r,n){n===void 0&&(n={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:c=!1}=n,u=Xa(e),f=o||a?[...u?zr(u):[],...zr(t)]:[];f.forEach(b=>{o&&b.addEventListener("scroll",r,{passive:!0}),a&&b.addEventListener("resize",r)});const p=u&&i?yx(u,r):null;let m=-1,g=null;s&&(g=new ResizeObserver(b=>{let[y]=b;y&&y.target===u&&g&&(g.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var w;(w=g)==null||w.observe(t)})),r()}),u&&!c&&g.observe(u),g.observe(t));let h,v=c?Ot(e):null;c&&x();function x(){const b=Ot(e);v&&!wc(v,b)&&r(),v=b,h=requestAnimationFrame(x)}return r(),()=>{var b;f.forEach(y=>{o&&y.removeEventListener("scroll",r),a&&y.removeEventListener("resize",r)}),p==null||p(),(b=g)==null||b.disconnect(),g=null,c&&cancelAnimationFrame(h)}}const Cx=Hh,Sx=Uh,Ex=Wh,Rx=Yh,kx=zh,Bi=Gh,Nx=Kh,jx=(e,t,r)=>{const n=new Map,o={platform:bx,...r},a={...o.platform,_c:n};return Bh(e,t,{...o,platform:a})};var Px=typeof document<"u",Tx=function(){},On=Px?E.useLayoutEffect:Tx;function Wn(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;n--!==0;)if(!Wn(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;n--!==0;){const a=o[n];if(!(a==="_owner"&&e.$$typeof)&&!Wn(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Cc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Gi(e,t){const r=Cc(e);return Math.round(t*r)/r}function Xo(e){const t=d.useRef(e);return On(()=>{t.current=e}),t}function Ix(e){e===void 0&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:c,open:u}=e,[f,p]=d.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[m,g]=d.useState(n);Wn(m,n)||g(n);const[h,v]=d.useState(null),[x,b]=d.useState(null),y=d.useCallback(P=>{P!==j.current&&(j.current=P,v(P))},[]),w=d.useCallback(P=>{P!==k.current&&(k.current=P,b(P))},[]),S=a||h,R=s||x,j=d.useRef(null),k=d.useRef(null),N=d.useRef(f),$=c!=null,B=Xo(c),W=Xo(o),Y=Xo(u),Z=d.useCallback(()=>{if(!j.current||!k.current)return;const P={placement:t,strategy:r,middleware:m};W.current&&(P.platform=W.current),jx(j.current,k.current,P).then(O=>{const H={...O,isPositioned:Y.current!==!1};z.current&&!Wn(N.current,H)&&(N.current=H,no.flushSync(()=>{p(H)}))})},[m,t,r,W,Y]);On(()=>{u===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,p(P=>({...P,isPositioned:!1})))},[u]);const z=d.useRef(!1);On(()=>(z.current=!0,()=>{z.current=!1}),[]),On(()=>{if(S&&(j.current=S),R&&(k.current=R),S&&R){if(B.current)return B.current(S,R,Z);Z()}},[S,R,Z,B,$]);const D=d.useMemo(()=>({reference:j,floating:k,setReference:y,setFloating:w}),[y,w]),_=d.useMemo(()=>({reference:S,floating:R}),[S,R]),L=d.useMemo(()=>{const P={position:r,left:0,top:0};if(!_.floating)return P;const O=Gi(_.floating,f.x),H=Gi(_.floating,f.y);return i?{...P,transform:"translate("+O+"px, "+H+"px)",...Cc(_.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:O,top:H}},[r,i,_.floating,f.x,f.y]);return d.useMemo(()=>({...f,update:Z,refs:D,elements:_,floatingStyles:L}),[f,Z,D,_,L])}const Ax=e=>{function t(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:n,padding:o}=typeof e=="function"?e(r):e;return n&&t(n)?n.current!=null?Bi({element:n.current,padding:o}).fn(r):{}:n?Bi({element:n,padding:o}).fn(r):{}}}},_x=(e,t)=>({...Cx(e),options:[e,t]}),Ox=(e,t)=>({...Sx(e),options:[e,t]}),Mx=(e,t)=>({...Nx(e),options:[e,t]}),Dx=(e,t)=>({...Ex(e),options:[e,t]}),$x=(e,t)=>({...Rx(e),options:[e,t]}),Lx=(e,t)=>({...kx(e),options:[e,t]}),Fx=(e,t)=>({...Ax(e),options:[e,t]});var Vx="Arrow",Sc=d.forwardRef((e,t)=>{const{children:r,width:n=10,height:o=5,...a}=e;return l.jsx(re.svg,{...a,ref:t,width:n,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:l.jsx("polygon",{points:"0,0 30,0 15,10"})})});Sc.displayName=Vx;var Bx=Sc;function uo(e){const[t,r]=d.useState(void 0);return je(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const n=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,i;if("borderBoxSize"in a){const c=a.borderBoxSize,u=Array.isArray(c)?c[0]:c;s=u.inlineSize,i=u.blockSize}else s=e.offsetWidth,i=e.offsetHeight;r({width:s,height:i})});return n.observe(e,{box:"border-box"}),()=>n.unobserve(e)}else r(void 0)},[e]),t}var Za="Popper",[Ec,yt]=Pe(Za),[Gx,Rc]=Ec(Za),kc=e=>{const{__scopePopper:t,children:r}=e,[n,o]=d.useState(null);return l.jsx(Gx,{scope:t,anchor:n,onAnchorChange:o,children:r})};kc.displayName=Za;var Nc="PopperAnchor",jc=d.forwardRef((e,t)=>{const{__scopePopper:r,virtualRef:n,...o}=e,a=Rc(Nc,r),s=d.useRef(null),i=ce(t,s),c=d.useRef(null);return d.useEffect(()=>{const u=c.current;c.current=(n==null?void 0:n.current)||s.current,u!==c.current&&a.onAnchorChange(c.current)}),n?null:l.jsx(re.div,{...o,ref:i})});jc.displayName=Nc;var Ja="PopperContent",[Wx,zx]=Ec(Ja),Pc=d.forwardRef((e,t)=>{var A,q,J,te,se,M;const{__scopePopper:r,side:n="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:m=!1,updatePositionStrategy:g="optimized",onPlaced:h,...v}=e,x=Rc(Ja,r),[b,y]=d.useState(null),w=ce(t,ae=>y(ae)),[S,R]=d.useState(null),j=uo(S),k=(j==null?void 0:j.width)??0,N=(j==null?void 0:j.height)??0,$=n+(a!=="center"?"-"+a:""),B=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},W=Array.isArray(u)?u:[u],Y=W.length>0,Z={padding:B,boundary:W.filter(Hx),altBoundary:Y},{refs:z,floatingStyles:D,placement:_,isPositioned:L,middlewareData:P}=Ix({strategy:"fixed",placement:$,whileElementsMounted:(...ae)=>wx(...ae,{animationFrame:g==="always"}),elements:{reference:x.anchor},middleware:[_x({mainAxis:o+N,alignmentAxis:s}),c&&Ox({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Mx():void 0,...Z}),c&&Dx({...Z}),$x({...Z,apply:({elements:ae,rects:ie,availableWidth:de,availableHeight:pe})=>{const{width:xe,height:Ne}=ie.reference,Re=ae.floating.style;Re.setProperty("--radix-popper-available-width",`${de}px`),Re.setProperty("--radix-popper-available-height",`${pe}px`),Re.setProperty("--radix-popper-anchor-width",`${xe}px`),Re.setProperty("--radix-popper-anchor-height",`${Ne}px`)}}),S&&Fx({element:S,padding:i}),Ux({arrowWidth:k,arrowHeight:N}),m&&Lx({strategy:"referenceHidden",...Z})]}),[O,H]=Ac(_),Q=ze(h);je(()=>{L&&(Q==null||Q())},[L,Q]);const I=(A=P.arrow)==null?void 0:A.x,G=(q=P.arrow)==null?void 0:q.y,X=((J=P.arrow)==null?void 0:J.centerOffset)!==0,[K,F]=d.useState();return je(()=>{b&&F(window.getComputedStyle(b).zIndex)},[b]),l.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...D,transform:L?D.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:K,"--radix-popper-transform-origin":[(te=P.transformOrigin)==null?void 0:te.x,(se=P.transformOrigin)==null?void 0:se.y].join(" "),...((M=P.hide)==null?void 0:M.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:l.jsx(Wx,{scope:r,placedSide:O,onArrowChange:R,arrowX:I,arrowY:G,shouldHideArrow:X,children:l.jsx(re.div,{"data-side":O,"data-align":H,...v,ref:w,style:{...v.style,animation:L?void 0:"none"}})})})});Pc.displayName=Ja;var Tc="PopperArrow",qx={top:"bottom",right:"left",bottom:"top",left:"right"},Ic=d.forwardRef(function(t,r){const{__scopePopper:n,...o}=t,a=zx(Tc,n),s=qx[a.placedSide];return l.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:l.jsx(Bx,{...o,ref:r,style:{...o.style,display:"block"}})})});Ic.displayName=Tc;function Hx(e){return e!==null}var Ux=e=>({name:"transformOrigin",options:e,fn(t){var x,b,y;const{placement:r,rects:n,middlewareData:o}=t,s=((x=o.arrow)==null?void 0:x.centerOffset)!==0,i=s?0:e.arrowWidth,c=s?0:e.arrowHeight,[u,f]=Ac(r),p={start:"0%",center:"50%",end:"100%"}[f],m=(((b=o.arrow)==null?void 0:b.x)??0)+i/2,g=(((y=o.arrow)==null?void 0:y.y)??0)+c/2;let h="",v="";return u==="bottom"?(h=s?p:`${m}px`,v=`${-c}px`):u==="top"?(h=s?p:`${m}px`,v=`${n.floating.height+c}px`):u==="right"?(h=`${-c}px`,v=s?p:`${g}px`):u==="left"&&(h=`${n.floating.width+c}px`,v=s?p:`${g}px`),{data:{x:h,y:v}}}});function Ac(e){const[t,r="center"]=e.split("-");return[t,r]}var Qr=kc,en=jc,fo=Pc,po=Ic,Kx="Portal",xr=d.forwardRef((e,t)=>{var i;const{container:r,...n}=e,[o,a]=d.useState(!1);je(()=>a(!0),[]);const s=r||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?Zr.createPortal(l.jsx(re.div,{...n,ref:t}),s):null});xr.displayName=Kx;function Yx(e,t){return d.useReducer((r,n)=>t[r][n]??r,e)}var Te=e=>{const{present:t,children:r}=e,n=Xx(t),o=typeof r=="function"?r({present:n.isPresent}):d.Children.only(r),a=ce(n.ref,Zx(o));return typeof r=="function"||n.isPresent?d.cloneElement(o,{ref:a}):null};Te.displayName="Presence";function Xx(e){const[t,r]=d.useState(),n=d.useRef(null),o=d.useRef(e),a=d.useRef("none"),s=e?"mounted":"unmounted",[i,c]=Yx(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const u=Nn(n.current);a.current=i==="mounted"?u:"none"},[i]),je(()=>{const u=n.current,f=o.current;if(f!==e){const m=a.current,g=Nn(u);e?c("MOUNT"):g==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&m!==g?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),je(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,p=g=>{const v=Nn(n.current).includes(CSS.escape(g.animationName));if(g.target===t&&v&&(c("ANIMATION_END"),!o.current)){const x=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=x)})}},m=g=>{g.target===t&&(a.current=Nn(n.current))};return t.addEventListener("animationstart",m),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",m),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:d.useCallback(u=>{n.current=u?getComputedStyle(u):null,r(u)},[])}}function Nn(e){return(e==null?void 0:e.animationName)||"none"}function Zx(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Jx=Symbol("radix.slottable");function Qx(e){const t=({children:r})=>l.jsx(l.Fragment,{children:r});return t.displayName=`${e}.Slottable`,t.__radixId=Jx,t}var eb=d[" useInsertionEffect ".trim().toString()]||je;function ke({prop:e,defaultProp:t,onChange:r=()=>{},caller:n}){const[o,a,s]=tb({defaultProp:t,onChange:r}),i=e!==void 0,c=i?e:o;{const f=d.useRef(e!==void 0);d.useEffect(()=>{const p=f.current;p!==i&&console.warn(`${n} is changing from ${p?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),f.current=i},[i,n])}const u=d.useCallback(f=>{var p;if(i){const m=rb(f)?f(e):f;m!==e&&((p=s.current)==null||p.call(s,m))}else a(f)},[i,e,a,s]);return[c,u]}function tb({defaultProp:e,onChange:t}){const[r,n]=d.useState(e),o=d.useRef(r),a=d.useRef(t);return eb(()=>{a.current=t},[t]),d.useEffect(()=>{var s;o.current!==r&&((s=a.current)==null||s.call(a,r),o.current=r)},[r,o]),[r,n,a]}function rb(e){return typeof e=="function"}var _c=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"}),nb="VisuallyHidden",Oc=d.forwardRef((e,t)=>l.jsx(re.span,{...e,ref:t,style:{..._c,...e.style}}));Oc.displayName=nb;var ob=Oc,[mo]=Pe("Tooltip",[yt]),go=yt(),Mc="TooltipProvider",ab=700,wa="tooltip.open",[sb,Qa]=mo(Mc),Dc=e=>{const{__scopeTooltip:t,delayDuration:r=ab,skipDelayDuration:n=300,disableHoverableContent:o=!1,children:a}=e,s=d.useRef(!0),i=d.useRef(!1),c=d.useRef(0);return d.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),l.jsx(sb,{scope:t,isOpenDelayedRef:s,delayDuration:r,onOpen:d.useCallback(()=>{window.clearTimeout(c.current),s.current=!1},[]),onClose:d.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.current=!0,n)},[n]),isPointerInTransitRef:i,onPointerInTransitChange:d.useCallback(u=>{i.current=u},[]),disableHoverableContent:o,children:a})};Dc.displayName=Mc;var qr="Tooltip",[ib,tn]=mo(qr),$c=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:o,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,c=Qa(qr,e.__scopeTooltip),u=go(t),[f,p]=d.useState(null),m=ye(),g=d.useRef(0),h=s??c.disableHoverableContent,v=i??c.delayDuration,x=d.useRef(!1),[b,y]=ke({prop:n,defaultProp:o??!1,onChange:k=>{k?(c.onOpen(),document.dispatchEvent(new CustomEvent(wa))):c.onClose(),a==null||a(k)},caller:qr}),w=d.useMemo(()=>b?x.current?"delayed-open":"instant-open":"closed",[b]),S=d.useCallback(()=>{window.clearTimeout(g.current),g.current=0,x.current=!1,y(!0)},[y]),R=d.useCallback(()=>{window.clearTimeout(g.current),g.current=0,y(!1)},[y]),j=d.useCallback(()=>{window.clearTimeout(g.current),g.current=window.setTimeout(()=>{x.current=!0,y(!0),g.current=0},v)},[v,y]);return d.useEffect(()=>()=>{g.current&&(window.clearTimeout(g.current),g.current=0)},[]),l.jsx(Qr,{...u,children:l.jsx(ib,{scope:t,contentId:m,open:b,stateAttribute:w,trigger:f,onTriggerChange:p,onTriggerEnter:d.useCallback(()=>{c.isOpenDelayedRef.current?j():S()},[c.isOpenDelayedRef,j,S]),onTriggerLeave:d.useCallback(()=>{h?R():(window.clearTimeout(g.current),g.current=0)},[R,h]),onOpen:S,onClose:R,disableHoverableContent:h,children:r})})};$c.displayName=qr;var Ca="TooltipTrigger",Lc=d.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=tn(Ca,r),a=Qa(Ca,r),s=go(r),i=d.useRef(null),c=ce(t,i,o.onTriggerChange),u=d.useRef(!1),f=d.useRef(!1),p=d.useCallback(()=>u.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),l.jsx(en,{asChild:!0,...s,children:l.jsx(re.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...n,ref:c,onPointerMove:U(e.onPointerMove,m=>{m.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:U(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:U(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:U(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:U(e.onBlur,o.onClose),onClick:U(e.onClick,o.onClose)})})});Lc.displayName=Ca;var es="TooltipPortal",[lb,cb]=mo(es,{forceMount:void 0}),Fc=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:o}=e,a=tn(es,t);return l.jsx(lb,{scope:t,forceMount:r,children:l.jsx(Te,{present:r||a.open,children:l.jsx(xr,{asChild:!0,container:o,children:n})})})};Fc.displayName=es;var ur="TooltipContent",Vc=d.forwardRef((e,t)=>{const r=cb(ur,e.__scopeTooltip),{forceMount:n=r.forceMount,side:o="top",...a}=e,s=tn(ur,e.__scopeTooltip);return l.jsx(Te,{present:n||s.open,children:s.disableHoverableContent?l.jsx(Bc,{side:o,...a,ref:t}):l.jsx(ub,{side:o,...a,ref:t})})}),ub=d.forwardRef((e,t)=>{const r=tn(ur,e.__scopeTooltip),n=Qa(ur,e.__scopeTooltip),o=d.useRef(null),a=ce(t,o),[s,i]=d.useState(null),{trigger:c,onClose:u}=r,f=o.current,{onPointerInTransitChange:p}=n,m=d.useCallback(()=>{i(null),p(!1)},[p]),g=d.useCallback((h,v)=>{const x=h.currentTarget,b={x:h.clientX,y:h.clientY},y=mb(b,x.getBoundingClientRect()),w=gb(b,y),S=vb(v.getBoundingClientRect()),R=xb([...w,...S]);i(R),p(!0)},[p]);return d.useEffect(()=>()=>m(),[m]),d.useEffect(()=>{if(c&&f){const h=x=>g(x,f),v=x=>g(x,c);return c.addEventListener("pointerleave",h),f.addEventListener("pointerleave",v),()=>{c.removeEventListener("pointerleave",h),f.removeEventListener("pointerleave",v)}}},[c,f,g,m]),d.useEffect(()=>{if(s){const h=v=>{const x=v.target,b={x:v.clientX,y:v.clientY},y=(c==null?void 0:c.contains(x))||(f==null?void 0:f.contains(x)),w=!hb(b,s);y?m():w&&(m(),u())};return document.addEventListener("pointermove",h),()=>document.removeEventListener("pointermove",h)}},[c,f,s,u,m]),l.jsx(Bc,{...e,ref:a})}),[db,fb]=mo(qr,{isInside:!1}),pb=Qx("TooltipContent"),Bc=d.forwardRef((e,t)=>{const{__scopeTooltip:r,children:n,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,c=tn(ur,r),u=go(r),{onClose:f}=c;return d.useEffect(()=>(document.addEventListener(wa,f),()=>document.removeEventListener(wa,f)),[f]),d.useEffect(()=>{if(c.trigger){const p=m=>{const g=m.target;g!=null&&g.contains(c.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[c.trigger,f]),l.jsx(gr,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:l.jsxs(fo,{"data-state":c.stateAttribute,...u,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[l.jsx(pb,{children:n}),l.jsx(db,{scope:r,isInside:!0,children:l.jsx(ob,{id:c.contentId,role:"tooltip",children:o||n})})]})})});Vc.displayName=ur;var Gc="TooltipArrow",Wc=d.forwardRef((e,t)=>{const{__scopeTooltip:r,...n}=e,o=go(r);return fb(Gc,r).isInside?null:l.jsx(po,{...o,...n,ref:t})});Wc.displayName=Gc;function mb(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(r,n,o,a)){case a:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}function gb(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return n}function vb(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}function hb(e,t){const{x:r,y:n}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],c=t[s],u=i.x,f=i.y,p=c.x,m=c.y;f>n!=m>n&&r<(p-u)*(n-f)/(m-f)+u&&(o=!o)}return o}function xb(e){const t=e.slice();return t.sort((r,n)=>r.x<n.x?-1:r.x>n.x?1:r.y<n.y?-1:r.y>n.y?1:0),bb(t)}function bb(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const o=e[n];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const r=[];for(let n=e.length-1;n>=0;n--){const o=e[n];for(;r.length>=2;){const a=r[r.length-1],s=r[r.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))r.pop();else break}r.push(o)}return r.pop(),t.length===1&&r.length===1&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}var yb=Dc,wb=$c,Cb=Lc,Sb=Fc,Eb=Vc,Rb=Wc;function zc({delayDuration:e=0,...t}){return l.jsx(yb,{"data-slot":"tooltip-provider",delayDuration:e,...t})}function ts({...e}){return l.jsx(zc,{children:l.jsx(wb,{"data-slot":"tooltip",...e})})}function rs({...e}){return l.jsx(Cb,{"data-slot":"tooltip-trigger",...e})}function ns({className:e,sideOffset:t=0,children:r,disableArrow:n=!1,...o}){return l.jsx(Sb,{children:l.jsxs(Eb,{"data-slot":"tooltip-content",sideOffset:t,className:T("qodo qodo-tooltip-content bg-purple-muted-700 border border-purple-muted-600 text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded-md px-3 py-1.5 text-xs text-balance",e,{"py-2.5":n}),...o,children:[r,!n&&l.jsx(Rb,{className:"bg-purple-muted-700 fill-purple-muted-700 z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]"})]})})}const qc=rt("qodo qodo-button inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-normal ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none cursor-pointer border border-transparent",{variants:{variant:{default:"bg-[var(--fill-action-emphasis-idle)] text-[var(--text-action-on-emphasis-idle)] hover:bg-[var(--fill-action-emphasis-hover)] focus:bg-[var(--fill-action-emphasis-hover)] active:bg-[var(--fill-action-emphasis-hover)] disabled:bg-[var(--fill-action-emphasis-disabled)]",secondary:"bg-[var(--fill-action-neutral-idle)] text-[var(--text-action-neutral-idle)] hover:bg-[var(--fill-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-[var(--fill-action-neutral-disabled)] disabled:text-[var(--text-action-neutral-disabled)]",outline:"border border-[var(--border-action-neutral-idle)] text-[var(--text-action-neutral-idle)] hover:bg-[var(--fill-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-none disabled:text-[var(--text-action-neutral-disabled)]",ghost:"text-[var(--text-action-neutral-idle)] hover:text-[var(--text-action-neutral-hover)] active:bg-[var(--fill-action-neutral-active)] disabled:bg-none disabled:text-[var(--text-action-neutral-disabled)]",link:"text-[var(--text-action-emphasis-idle)] hover:text-[var(--text-action-emphasis-hover)] active:bg-[var(--fill-action-emphasis-active)] disabled:bg-none disabled:text-[var(--text-action-emphasis-disabled)]",danger:"border border-[var(--border-action-negative-idle)] text-[var(--icon-action-negative-idle)] hover:bg-[var(--fill-action-negative-hover)] active:bg-[var(--fill-action-negative-active)] disabled:border-[var(--border-action-negative-disabled)] disabled:text-[var(--icon-action-negative-disabled)]"},size:{default:"h-10 px-4 py-2",xs:"h-fit rounded-md text-xs px-2 py-1.5",sm:"h-8 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10","icon-sm":"h-7 w-7 p-1.5 rounded-md","icon-md":"h-8 w-8 p-1.5 rounded-md","icon-lg":"h-[45px] w-[45px] p-3 rounded-md"}},defaultVariants:{variant:"default",size:"default"}}),Be=d.forwardRef(({className:e,variant:t,size:r,loading:n,children:o,disabled:a,icon:s,iconPosition:i="left",tooltip:c,tooltipProps:u,...f},p)=>{const m={lg:"w-[18px] h-[18px]",default:"w-[18px] h-[18px]",sm:"w-[18px] h-[18px]",xs:"w-3.5 h-3.5",icon:"w-[18px] h-[18px]","icon-sm":"w-3.5 h-3.5","icon-md":"w-[18px] h-[18px]","icon-lg":"w-[18px] h-[18px]"}[r??"default"],g=s&&l.jsx(s,{className:T(m,"transition-opacity",{"mr-2":o&&i==="left","ml-2":o&&i!=="left","opacity-50":a||n})}),h=l.jsxs("button",{className:T(qc({variant:t,size:r,className:e})),ref:p,disabled:a||n,...f,children:[i==="left"&&g,o,i==="right"&&g,n&&l.jsx(ic,{className:T("ml-2 animate-spin",m)})]});return c?l.jsxs(ts,{children:[l.jsx(rs,{asChild:!0,children:l.jsx("span",{className:"inline-flex",children:h})}),l.jsx(ns,{...u,children:c})]}):h});Be.displayName="Button";const kb=rt("qodo qodo-input file:text-foreground placeholder:text-purple-muted-400 selection:bg-primary selection:text-primary-foreground border-input-neutral-idle flex h-9 w-full min-w-0 rounded-md border bg-purple-muted-900 px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:ring-none focus-visible:ring-none aria-invalid:border-red-600 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 disabled:cursor-not-allowed disabled:opacity-50 dark:disabled:bg-[var(--fill-input-neutral-idle)] disabled:border-purple-muted-500 disabled:text-purple-muted-400 read-only:cursor-default md:text-sm dark:border-input-neutral-idle dark:bg-purple-muted-900 dark:text-foreground dark:placeholder:text-[var(--color-purple-muted-400)] [:not(:placeholder-shown)]:bg-purple-muted-700 [&[readonly]]:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:border-0 [&[readonly]]:text-[var(--text-input-neutral-idle)] [&[readonly]]:hover:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:hover:border-[var(--border-input-neutral-idle)] [&[readonly]]:focus:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:focus:border-[var(--border-input-neutral-idle)] [&[readonly]]:focus-visible:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:focus-visible:border-[var(--border-input-neutral-idle)] [&[readonly][disabled]]:opacity-100 [&[readonly][disabled]]:cursor-default [&[readonly][disabled]]:bg-[var(--fill-input-neutral-idle)] [&[readonly][disabled]]:border-0 [&[readonly][disabled]]:text-[var(--text-input-neutral-idle)] [&[readonly][disabled]]:hover:bg-[var(--fill-input-neutral-idle)] [&[readonly][disabled]]:hover:border-0 [&[readonly][disabled]]:focus:bg-[var(--fill-input-neutral-idle)] [&[readonly][disabled]]:focus:border-0 [&[readonly][disabled]]:focus-visible:bg-[var(--fill-input-neutral-idle)] [&[readonly][disabled]]:focus-visible:border-0",{variants:{variant:{default:"dark:focus-visible:bg-[var(--fill-input-neutral-idle)] dark:hover:bg-purple-muted-700 border-purple-muted-600 hover:bg-fill-input-neutral-hover focus:bg-[var(--fill-input-neutral-idle)] focus:border-[var(--border-input-emphasis-active)] focus:rounded-[6px_var(--border-radius-md,6px)_6px_6px] focus:text-[var(--text-input-neutral-active)] selection:bg-[var(--fill-input-emphasis-idle)] selection:text-[var(--text-input-neutral-active)] focus-visible:ring-none focus-visible:ring-none [&[readonly]]:hover:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:hover:border-0 [&[readonly]]:focus:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:focus:border-0 [&[readonly]]:focus-visible:bg-[var(--fill-input-neutral-idle)] [&[readonly]]:focus-visible:border-0",secondary:"bg-secondary border-secondary text-secondary-foreground placeholder:text-color-purple-muted-400 dark:bg-secondary dark:border-secondary dark:text-secondary-foreground dark:placeholder:text-purple-muted-400",accent:"bg-accent border-accent text-accent-foreground placeholder:text-color-purple-muted-400 dark:bg-accent dark:border-accent dark:text-accent-foreground dark:placeholder:text-purple-muted-400",success:"bg-success border-success text-success-foreground placeholder:text-success-foreground/70 dark:bg-success dark:border-success dark:text-success-foreground dark:placeholder:text-success-foreground/70",warning:"bg-warning border-warning text-warning-foreground placeholder:text-warning-foreground/70 dark:bg-warning dark:border-warning dark:text-warning-foreground dark:placeholder:text-warning-foreground/70",destructive:"border-destructive bg-purple-muted-700 text-[--var(text-input-neutral-idle)] placeholder:text-destructive-foreground/70 dark:border-destructive dark:placeholder:text-destructive-foreground/70",ghost:"bg-transparent border-purple-muted-600 focus:border-purple-muted-600 focus-visible:ring-none focus-visible:ring-none [:not(:placeholder-shown)]:bg-transparent"}},defaultVariants:{variant:"default"}}),rn=d.forwardRef(({className:e,variant:t,type:r,error:n,...o},a)=>l.jsx("input",{ref:a,type:r,"data-slot":"input","aria-invalid":n||void 0,className:T(kb({variant:t,className:e})),...o}));rn.displayName="Input";function Wi(e,[t,r]){return Math.min(r,Math.max(t,e))}function zi(e){const t=Nb(e),r=d.forwardRef((n,o)=>{const{children:a,...s}=n,i=d.Children.toArray(a),c=i.find(Pb);if(c){const u=c.props.children,f=i.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return l.jsx(t,{...s,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return l.jsx(t,{...s,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function Nb(e){const t=d.forwardRef((r,n)=>{const{children:o,...a}=r;if(d.isValidElement(o)){const s=Ib(o),i=Tb(a,o.props);return o.type!==d.Fragment&&(i.ref=n?_e(n,s):s),d.cloneElement(o,i)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var jb=Symbol("radix.slottable");function Pb(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===jb}function Tb(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{const c=a(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function Ib(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function vo(e){const t=e+"CollectionProvider",[r,n]=Pe(t),[o,a]=r(t,{collectionRef:{current:null},itemMap:new Map}),s=v=>{const{scope:x,children:b}=v,y=E.useRef(null),w=E.useRef(new Map).current;return l.jsx(o,{scope:x,itemMap:w,collectionRef:y,children:b})};s.displayName=t;const i=e+"CollectionSlot",c=zi(i),u=E.forwardRef((v,x)=>{const{scope:b,children:y}=v,w=a(i,b),S=ce(x,w.collectionRef);return l.jsx(c,{ref:S,children:y})});u.displayName=i;const f=e+"CollectionItemSlot",p="data-radix-collection-item",m=zi(f),g=E.forwardRef((v,x)=>{const{scope:b,children:y,...w}=v,S=E.useRef(null),R=ce(x,S),j=a(f,b);return E.useEffect(()=>(j.itemMap.set(S,{ref:S,...w}),()=>void j.itemMap.delete(S))),l.jsx(m,{[p]:"",ref:R,children:y})});g.displayName=f;function h(v){const x=a(e+"CollectionConsumer",v);return E.useCallback(()=>{const y=x.collectionRef.current;if(!y)return[];const w=Array.from(y.querySelectorAll(`[${p}]`));return Array.from(x.itemMap.values()).sort((j,k)=>w.indexOf(j.ref.current)-w.indexOf(k.ref.current))},[x.collectionRef,x.itemMap])}return[{Provider:s,Slot:u,ItemSlot:g},h,n]}var Ab=d.createContext(void 0);function Gt(e){const t=d.useContext(Ab);return e||t||"ltr"}var Zo=0;function ho(){d.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??qi()),document.body.insertAdjacentElement("beforeend",e[1]??qi()),Zo++,()=>{Zo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Zo--}},[])}function qi(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var Jo="focusScope.autoFocusOnMount",Qo="focusScope.autoFocusOnUnmount",Hi={bubbles:!1,cancelable:!0},_b="FocusScope",nn=d.forwardRef((e,t)=>{const{loop:r=!1,trapped:n=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,c]=d.useState(null),u=ze(o),f=ze(a),p=d.useRef(null),m=ce(t,v=>c(v)),g=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(n){let v=function(w){if(g.paused||!i)return;const S=w.target;i.contains(S)?p.current=S:mt(p.current,{select:!0})},x=function(w){if(g.paused||!i)return;const S=w.relatedTarget;S!==null&&(i.contains(S)||mt(p.current,{select:!0}))},b=function(w){if(document.activeElement===document.body)for(const R of w)R.removedNodes.length>0&&mt(i)};document.addEventListener("focusin",v),document.addEventListener("focusout",x);const y=new MutationObserver(b);return i&&y.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",x),y.disconnect()}}},[n,i,g.paused]),d.useEffect(()=>{if(i){Ki.add(g);const v=document.activeElement;if(!i.contains(v)){const b=new CustomEvent(Jo,Hi);i.addEventListener(Jo,u),i.dispatchEvent(b),b.defaultPrevented||(Ob(Fb(Hc(i)),{select:!0}),document.activeElement===v&&mt(i))}return()=>{i.removeEventListener(Jo,u),setTimeout(()=>{const b=new CustomEvent(Qo,Hi);i.addEventListener(Qo,f),i.dispatchEvent(b),b.defaultPrevented||mt(v??document.body,{select:!0}),i.removeEventListener(Qo,f),Ki.remove(g)},0)}}},[i,u,f,g]);const h=d.useCallback(v=>{if(!r&&!n||g.paused)return;const x=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,b=document.activeElement;if(x&&b){const y=v.currentTarget,[w,S]=Mb(y);w&&S?!v.shiftKey&&b===S?(v.preventDefault(),r&&mt(w,{select:!0})):v.shiftKey&&b===w&&(v.preventDefault(),r&&mt(S,{select:!0})):b===y&&v.preventDefault()}},[r,n,g.paused]);return l.jsx(re.div,{tabIndex:-1,...s,ref:m,onKeyDown:h})});nn.displayName=_b;function Ob(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(mt(n,{select:t}),document.activeElement!==r)return}function Mb(e){const t=Hc(e),r=Ui(t,e),n=Ui(t.reverse(),e);return[r,n]}function Hc(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:n=>{const o=n.tagName==="INPUT"&&n.type==="hidden";return n.disabled||n.hidden||o?NodeFilter.FILTER_SKIP:n.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function Ui(e,t){for(const r of e)if(!Db(r,{upTo:t}))return r}function Db(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function $b(e){return e instanceof HTMLInputElement&&"select"in e}function mt(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&$b(e)&&t&&e.select()}}var Ki=Lb();function Lb(){let e=[];return{add(t){const r=e[0];t!==r&&(r==null||r.pause()),e=Yi(e,t),e.unshift(t)},remove(t){var r;e=Yi(e,t),(r=e[0])==null||r.resume()}}}function Yi(e,t){const r=[...e],n=r.indexOf(t);return n!==-1&&r.splice(n,1),r}function Fb(e){return e.filter(t=>t.tagName!=="A")}function Vb(e){const t=Bb(e),r=d.forwardRef((n,o)=>{const{children:a,...s}=n,i=d.Children.toArray(a),c=i.find(Wb);if(c){const u=c.props.children,f=i.map(p=>p===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:p);return l.jsx(t,{...s,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return l.jsx(t,{...s,ref:o,children:a})});return r.displayName=`${e}.Slot`,r}function Bb(e){const t=d.forwardRef((r,n)=>{const{children:o,...a}=r;if(d.isValidElement(o)){const s=qb(o),i=zb(a,o.props);return o.type!==d.Fragment&&(i.ref=n?_e(n,s):s),d.cloneElement(o,i)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Gb=Symbol("radix.slottable");function Wb(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Gb}function zb(e,t){const r={...t};for(const n in t){const o=e[n],a=t[n];/^on[A-Z]/.test(n)?o&&a?r[n]=(...i)=>{const c=a(...i);return o(...i),c}:o&&(r[n]=o):n==="style"?r[n]={...o,...a}:n==="className"&&(r[n]=[o,a].filter(Boolean).join(" "))}return{...e,...r}}function qb(e){var n,o;let t=(n=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:n.get,r=t&&"isReactWarning"in t&&t.isReactWarning;return r?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=t&&"isReactWarning"in t&&t.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}function xo(e){const t=d.useRef({value:e,previous:e});return d.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Hb=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Qt=new WeakMap,jn=new WeakMap,Pn={},ea=0,Uc=function(e){return e&&(e.host||Uc(e.parentNode))},Ub=function(e,t){return t.map(function(r){if(e.contains(r))return r;var n=Uc(r);return n&&e.contains(n)?n:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},Kb=function(e,t,r,n){var o=Ub(t,Array.isArray(e)?e:[e]);Pn[r]||(Pn[r]=new WeakMap);var a=Pn[r],s=[],i=new Set,c=new Set(o),u=function(p){!p||i.has(p)||(i.add(p),u(p.parentNode))};o.forEach(u);var f=function(p){!p||c.has(p)||Array.prototype.forEach.call(p.children,function(m){if(i.has(m))f(m);else try{var g=m.getAttribute(n),h=g!==null&&g!=="false",v=(Qt.get(m)||0)+1,x=(a.get(m)||0)+1;Qt.set(m,v),a.set(m,x),s.push(m),v===1&&h&&jn.set(m,!0),x===1&&m.setAttribute(r,"true"),h||m.setAttribute(n,"true")}catch(b){console.error("aria-hidden: cannot operate on ",m,b)}})};return f(t),i.clear(),ea++,function(){s.forEach(function(p){var m=Qt.get(p)-1,g=a.get(p)-1;Qt.set(p,m),a.set(p,g),m||(jn.has(p)||p.removeAttribute(n),jn.delete(p)),g||p.removeAttribute(r)}),ea--,ea||(Qt=new WeakMap,Qt=new WeakMap,jn=new WeakMap,Pn={})}},bo=function(e,t,r){r===void 0&&(r="data-aria-hidden");var n=Array.from(Array.isArray(e)?e:[e]),o=Hb(e);return o?(n.push.apply(n,Array.from(o.querySelectorAll("[aria-live], script"))),Kb(n,o,r,"aria-hidden")):function(){return null}},Je=function(){return Je=Object.assign||function(t){for(var r,n=1,o=arguments.length;n<o;n++){r=arguments[n];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Je.apply(this,arguments)};function Kc(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(e);o<n.length;o++)t.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(e,n[o])&&(r[n[o]]=e[n[o]]);return r}function Yb(e,t,r){if(r||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))}var Mn="right-scroll-bar-position",Dn="width-before-scroll-bar",Xb="with-scroll-bars-hidden",Zb="--removed-body-scroll-bar-size";function ta(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Jb(e,t){var r=E.useState(function(){return{value:e,callback:t,facade:{get current(){return r.value},set current(n){var o=r.value;o!==n&&(r.value=n,r.callback(n,o))}}}})[0];return r.callback=t,r.facade}var Qb=typeof window<"u"?d.useLayoutEffect:d.useEffect,Xi=new WeakMap;function ey(e,t){var r=Jb(null,function(n){return e.forEach(function(o){return ta(o,n)})});return Qb(function(){var n=Xi.get(r);if(n){var o=new Set(n),a=new Set(e),s=r.current;o.forEach(function(i){a.has(i)||ta(i,null)}),a.forEach(function(i){o.has(i)||ta(i,s)})}Xi.set(r,e)},[e]),r}function ty(e){return e}function ry(e,t){t===void 0&&(t=ty);var r=[],n=!1,o={read:function(){if(n)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(a){var s=t(a,n);return r.push(s),function(){r=r.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(n=!0;r.length;){var s=r;r=[],s.forEach(a)}r={push:function(i){return a(i)},filter:function(){return r}}},assignMedium:function(a){n=!0;var s=[];if(r.length){var i=r;r=[],i.forEach(a),s=r}var c=function(){var f=s;s=[],f.forEach(a)},u=function(){return Promise.resolve().then(c)};u(),r={push:function(f){s.push(f),u()},filter:function(f){return s=s.filter(f),r}}}};return o}function ny(e){e===void 0&&(e={});var t=ry(null);return t.options=Je({async:!0,ssr:!1},e),t}var Yc=function(e){var t=e.sideCar,r=Kc(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var n=t.read();if(!n)throw new Error("Sidecar medium not found");return d.createElement(n,Je({},r))};Yc.isSideCarExport=!0;function oy(e,t){return e.useMedium(t),Yc}var Xc=ny(),ra=function(){},yo=d.forwardRef(function(e,t){var r=d.useRef(null),n=d.useState({onScrollCapture:ra,onWheelCapture:ra,onTouchMoveCapture:ra}),o=n[0],a=n[1],s=e.forwardProps,i=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,p=e.shards,m=e.sideCar,g=e.noRelative,h=e.noIsolation,v=e.inert,x=e.allowPinchZoom,b=e.as,y=b===void 0?"div":b,w=e.gapMode,S=Kc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),R=m,j=ey([r,t]),k=Je(Je({},S),o);return d.createElement(d.Fragment,null,f&&d.createElement(R,{sideCar:Xc,removeScrollBar:u,shards:p,noRelative:g,noIsolation:h,inert:v,setCallbacks:a,allowPinchZoom:!!x,lockRef:r,gapMode:w}),s?d.cloneElement(d.Children.only(i),Je(Je({},k),{ref:j})):d.createElement(y,Je({},k,{className:c,ref:j}),i))});yo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};yo.classNames={fullWidth:Dn,zeroRight:Mn};var ay=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function sy(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ay();return t&&e.setAttribute("nonce",t),e}function iy(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ly(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var cy=function(){var e=0,t=null;return{add:function(r){e==0&&(t=sy())&&(iy(t,r),ly(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},uy=function(){var e=cy();return function(t,r){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&r])}},Zc=function(){var e=uy(),t=function(r){var n=r.styles,o=r.dynamic;return e(n,o),null};return t},dy={left:0,top:0,right:0,gap:0},na=function(e){return parseInt(e||"",10)||0},fy=function(e){var t=window.getComputedStyle(document.body),r=t[e==="padding"?"paddingLeft":"marginLeft"],n=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[na(r),na(n),na(o)]},py=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return dy;var t=fy(e),r=document.documentElement.clientWidth,n=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,n-r+t[2]-t[0])}},my=Zc(),lr="data-scroll-locked",gy=function(e,t,r,n){var o=e.left,a=e.top,s=e.right,i=e.gap;return r===void 0&&(r="margin"),`
|
|
151
151
|
.`.concat(Xb,` {
|
|
152
152
|
overflow: hidden `).concat(n,`;
|
|
153
153
|
padding-right: `).concat(i,"px ").concat(n,`;
|