@collective-intelligence/ui-react 0.1.26 → 0.1.27

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.
@@ -1,4 +1,4 @@
1
- import{Wt,e}from"./index-fwsd4nes.js";import*as ze from"react";import*as Jr from"react";var Uc=Object.defineProperty,Zn=(t,f)=>Uc(t,"name",{value:f,configurable:!0});function Xn(t,f){if(typeof t==="function")return t(f);else if(t!==null&&t!==void 0)t.current=f}Zn(Xn,"setRef");function xe(...t){return(f)=>{let m=!1,h=t.map((v)=>{let R=Xn(v,f);if(!m&&typeof R=="function")m=!0;return R});if(m)return()=>{for(let v=0;v<h.length;v++){let R=h[v];if(typeof R=="function")R();else Xn(t[v],null)}}}}Zn(xe,"composeRefs");function a(...t){return Jr.useCallback(xe(...t),t)}Zn(a,"useComposedRefs");var Gc=Object.defineProperty,nt=(t,f)=>Gc(t,"name",{value:f,configurable:!0});function x(t){let f=ze.forwardRef((m,h)=>{let{children:v,...R}=m,w=null,b=!1,E=[];if(qn(v)&&typeof yn==="function")v=yn(v._payload);if(ze.Children.forEach(v,(O)=>{if(ro(O)){b=!0;let M=O,T="child"in M.props?M.props.child:M.props.children;if(qn(T)&&typeof yn==="function")T=yn(T._payload);w=Kc(M,T),E.push(w?.props?.children)}else E.push(O)}),w)w=ze.cloneElement(w,void 0,E);else if(!b&&ze.Children.count(v)===1&&ze.isValidElement(v))w=v;let A=w?no(w):void 0,I=a(h,A);if(!w){if(v||v===0)throw Error(b?Zc(t):Xc(t));return v}let S=to(R,w.props??{});if(w.type!==ze.Fragment)S.ref=h?I:A;return ze.cloneElement(w,S)});return f.displayName=`${t}.Slot`,f}nt(x,"createSlot");var P=x("Slot"),eo=Symbol.for("radix.slottable");function lr(t){let f=nt((m)=>("child"in m)?m.children(m.child):m.children,"Slottable");return f.displayName=`${t}.Slottable`,f.__radixId=eo,f}nt(lr,"createSlottable");var Kc=nt((t,f)=>{if("child"in t.props){let m=t.props.child;if(!ze.isValidElement(m))return null;return ze.cloneElement(m,void 0,t.props.children(m.props.children))}return ze.isValidElement(f)?f:null},"getSlottableElementFromSlottable");function to(t,f){let m={...f};for(let h in f){let v=t[h],R=f[h];if(/^on[A-Z]/.test(h)){if(v&&R)m[h]=(...b)=>{let E=R(...b);return v(...b),E};else if(v)m[h]=v}else if(h==="style")m[h]={...v,...R};else if(h==="className")m[h]=[v,R].filter(Boolean).join(" ")}return{...t,...m}}nt(to,"mergeProps");function no(t){let f=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,m=f&&"isReactWarning"in f&&f.isReactWarning;if(m)return t.ref;if(f=Object.getOwnPropertyDescriptor(t,"ref")?.get,m=f&&"isReactWarning"in f&&f.isReactWarning,m)return t.props.ref;return t.props.ref||t.ref}nt(no,"getElementRef");function ro(t){return ze.isValidElement(t)&&typeof t.type==="function"&&"__radixId"in t.type&&t.type.__radixId===eo}nt(ro,"isSlottable");var Yc=Symbol.for("react.lazy");function qn(t){return t!=null&&typeof t==="object"&&"$$typeof"in t&&t.$$typeof===Yc&&"_payload"in t&&oo(t._payload)}nt(qn,"isLazyComponent");function oo(t){return typeof t==="object"&&t!==null&&"then"in t}nt(oo,"isPromiseLike");var Xc=nt((t)=>`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),Zc=nt((t)=>`${t} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),yn=ze[" use ".trim().toString()];var io=(t)=>typeof t==="boolean"?`${t}`:t===0?"0":t,co=Wt,p=(t,f)=>(m)=>{var h;if((f===null||f===void 0?void 0:f.variants)==null)return co(t,m===null||m===void 0?void 0:m.class,m===null||m===void 0?void 0:m.className);let{variants:v,defaultVariants:R}=f,w=Object.keys(v).map((A)=>{let I=m===null||m===void 0?void 0:m[A],S=R===null||R===void 0?void 0:R[A];if(I===null)return null;let O=io(I)||io(S);return v[A][O]}),b=m&&Object.entries(m).reduce((A,I)=>{let[S,O]=I;if(O===void 0)return A;return A[S]=O,A},{}),E=f===null||f===void 0?void 0:(h=f.compoundVariants)===null||h===void 0?void 0:h.reduce((A,I)=>{let{class:S,className:O,...M}=I;return Object.entries(M).every((T)=>{let[L,F]=T;return Array.isArray(F)?F.includes({...R,...b}[L]):{...R,...b}[L]===F})?[...A,S,O]:A},[]);return co(t,w,E,m===null||m===void 0?void 0:m.class,m===null||m===void 0?void 0:m.className)};import{jsx as qc}from"react/jsx-runtime";var G=p("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{defaultVariants:{size:"default",variant:"default"},variants:{size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",icon:"size-9",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5"},variant:{default:"bg-primary !text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80"}}}),n=({className:t,variant:f,size:m,asChild:h=!1,...v})=>qc(h?P:"button",{"data-slot":"button",className:e(G({className:t,size:m,variant:f})),...v});var Q=!1;var Qc=Object.defineProperty,Vt=(t,f)=>Qc(t,"name",{value:f,configurable:!0}),so=!!(typeof window<"u"&&window.document&&window.document.createElement);function r(t,f,{checkForDefaultPrevented:m=!0}={}){return Vt(function(v){if(t?.(v),m===!1||!v||!v.defaultPrevented)return f?.(v)},"handleEvent")}Vt(r,"composeEventHandlers");function Jc(t){if(!so)throw Error("Cannot access window outside of the DOM");return t?.ownerDocument?.defaultView??window}Vt(Jc,"getOwnerWindow");function Qn(t){if(!so)throw Error("Cannot access document outside of the DOM");return t?.ownerDocument??document}Vt(Qn,"getOwnerDocument");function ao(t,f=!1){let{activeElement:m}=Qn(t);if(!m?.nodeName)return null;if(uo(m)&&m.contentDocument)return ao(m.contentDocument.body,f);if(f){let h=m.getAttribute("aria-activedescendant");if(h){let v=Qn(m).getElementById(h);if(v)return v}}return m}Vt(ao,"getActiveElement");function uo(t){return t.tagName==="IFRAME"}Vt(uo,"isFrame");import*as Je from"react";import{jsx as lo}from"react/jsx-runtime";var es=Object.defineProperty,Qe=(t,f)=>es(t,"name",{value:f,configurable:!0});function ts(t,f){let m=Je.createContext(f);m.displayName=t+"Context";let h=Qe((R)=>{let{children:w,...b}=R,E=Je.useMemo(()=>b,Object.values(b));return lo(m.Provider,{value:E,children:w})},"Provider");h.displayName=t+"Provider";function v(R,w={}){let{optional:b=!1}=w,E=Je.useContext(m);if(E)return E;if(f!==void 0)return f;if(b)return;throw Error(`\`${R}\` must be used within \`${t}\``)}return Qe(v,"useContext"),[h,v]}Qe(ts,"createContext");function i(t,f=[]){let m=[];function h(R,w){let b=Je.createContext(w);b.displayName=R+"Context";let E=m.length;m=[...m,w];let A=Qe((S)=>{let{scope:O,children:M,...T}=S,L=O?.[t]?.[E]||b,F=Je.useMemo(()=>T,Object.values(T));return lo(L.Provider,{value:F,children:M})},"Provider");A.displayName=R+"Provider";function I(S,O,M={}){let{optional:T=!1}=M,L=O?.[t]?.[E]||b,F=Je.useContext(L);if(F)return F;if(w!==void 0)return w;if(T)return;throw Error(`\`${S}\` must be used within \`${R}\``)}return Qe(I,"useContext"),[A,I]}Qe(h,"createContext");let v=Qe(()=>{let R=m.map((w)=>Je.createContext(w));return Qe(function(b){let E=b?.[t]||R;return Je.useMemo(()=>({[`__scope${t}`]:{...b,[t]:E}}),[b,E])},"useScope")},"createScope");return v.scopeName=t,[h,fo(v,...f)]}Qe(i,"createContextScope");function fo(...t){let f=t[0];if(t.length===1)return f;let m=Qe(()=>{let h=t.map((v)=>({useScope:v(),scopeName:v.scopeName}));return Qe(function(R){let w=h.reduce((b,{useScope:E,scopeName:A})=>{let S=E(R)[`__scope${A}`];return{...b,...S}},{});return Je.useMemo(()=>({[`__scope${f.scopeName}`]:w}),[w])},"useComposedScopes")},"createScope");return m.scopeName=f.scopeName,m}Qe(fo,"composeContextScopes");import*as mo from"react";import*as po from"react-dom";import{jsx as os}from"react/jsx-runtime";var ns=Object.defineProperty,rs=(t,f)=>ns(t,"name",{value:f,configurable:!0}),is=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],o=is.reduce((t,f)=>{let m=x(`Primitive.${f}`),h=mo.forwardRef((v,R)=>{let{asChild:w,...b}=v,E=w?m:f;if(typeof window<"u")window[Symbol.for("radix-ui")]=!0;return os(E,{...b,ref:R})});return h.displayName=`Primitive.${f}`,{...t,[f]:h}},{});function be(t,f){if(t)po.flushSync(()=>t.dispatchEvent(f))}rs(be,"dispatchDiscreteCustomEvent");import*as X from"react";import*as rt from"react";import{jsx as Jn}from"react/jsx-runtime";import*as Ze from"react";import{jsx as $t}from"react/jsx-runtime";var cs=Object.defineProperty,We=(t,f)=>cs(t,"name",{value:f,configurable:!0});function y(t){let f=t+"CollectionProvider",[m,h]=i(f),[v,R]=m(f,{collectionRef:{current:null},itemMap:new Map}),w=We((L)=>{let{scope:F,children:B}=L,k=rt.useRef(null),j=rt.useRef(new Map).current;return Jn(v,{scope:F,itemMap:j,collectionRef:k,children:B})},"CollectionProvider");w.displayName=f;let b=t+"CollectionSlot",E=x(b),A=rt.forwardRef((L,F)=>{let{scope:B,children:k}=L,j=R(b,B),V=a(F,j.collectionRef);return Jn(E,{ref:V,children:k})});A.displayName=b;let I=t+"CollectionItemSlot",S="data-radix-collection-item",O=x(I),M=rt.forwardRef((L,F)=>{let{scope:B,children:k,...j}=L,V=rt.useRef(null),H=a(F,V),U=R(I,B);return rt.useEffect(()=>(U.itemMap.set(V,{ref:V,...j}),()=>void U.itemMap.delete(V))),Jn(O,{...{[S]:""},ref:H,children:k})});M.displayName=I;function T(L){let F=R(t+"CollectionConsumer",L);return rt.useCallback(()=>{let k=F.collectionRef.current;if(!k)return[];let j=Array.from(k.querySelectorAll(`[${S}]`));return Array.from(F.itemMap.values()).sort((U,Y)=>j.indexOf(U.ref.current)-j.indexOf(Y.ref.current))},[F.collectionRef,F.itemMap])}return We(T,"useCollection"),[{Provider:w,Slot:A,ItemSlot:M},T,h]}We(y,"createCollection");var ho=new WeakMap,er=class t extends Map{static{We(this,"OrderedDict")}#e;constructor(f){super(f);this.#e=[...super.keys()],ho.set(this,!0)}set(f,m){if(ho.get(this))if(this.has(f))this.#e[this.#e.indexOf(f)]=f;else this.#e.push(f);return super.set(f,m),this}insert(f,m,h){let v=this.has(m),R=this.#e.length,w=nr(f),b=w>=0?w:R+w,E=b<0||b>=R?-1:b;if(E===this.size||v&&E===this.size-1||E===-1)return this.set(m,h),this;let A=this.size+(v?0:1);if(w<0)b++;let I=[...this.#e],S,O=!1;for(let M=b;M<A;M++)if(b===M){let T=I[M];if(I[M]===m)T=I[M+1];if(v)this.delete(m);S=this.get(T),this.set(m,h)}else{if(!O&&I[M-1]===m)O=!0;let T=I[O?M:M-1],L=S;S=this.get(T),this.delete(T),this.set(T,L)}return this}with(f,m,h){let v=new t(this);return v.insert(f,m,h),v}before(f){let m=this.#e.indexOf(f)-1;if(m<0)return;return this.entryAt(m)}setBefore(f,m,h){let v=this.#e.indexOf(f);if(v===-1)return this;return this.insert(v,m,h)}after(f){let m=this.#e.indexOf(f);if(m=m===-1||m===this.size-1?-1:m+1,m===-1)return;return this.entryAt(m)}setAfter(f,m,h){let v=this.#e.indexOf(f);if(v===-1)return this;return this.insert(v+1,m,h)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(f){let m=super.delete(f);if(m)this.#e.splice(this.#e.indexOf(f),1);return m}deleteAt(f){let m=this.keyAt(f);if(m!==void 0)return this.delete(m);return!1}at(f){let m=Rn(this.#e,f);if(m!==void 0)return this.get(m)}entryAt(f){let m=Rn(this.#e,f);if(m!==void 0)return[m,this.get(m)]}indexOf(f){return this.#e.indexOf(f)}keyAt(f){return Rn(this.#e,f)}from(f,m){let h=this.indexOf(f);if(h===-1)return;let v=h+m;if(v<0)v=0;if(v>=this.size)v=this.size-1;return this.at(v)}keyFrom(f,m){let h=this.indexOf(f);if(h===-1)return;let v=h+m;if(v<0)v=0;if(v>=this.size)v=this.size-1;return this.keyAt(v)}find(f,m){let h=0;for(let v of this){if(Reflect.apply(f,m,[v,h,this]))return v;h++}return}findIndex(f,m){let h=0;for(let v of this){if(Reflect.apply(f,m,[v,h,this]))return h;h++}return-1}filter(f,m){let h=[],v=0;for(let R of this){if(Reflect.apply(f,m,[R,v,this]))h.push(R);v++}return new t(h)}map(f,m){let h=[],v=0;for(let R of this)h.push([R[0],Reflect.apply(f,m,[R,v,this])]),v++;return new t(h)}reduce(...f){let[m,h]=f,v=0,R=h??this.at(0);for(let w of this){if(v===0&&f.length===1)R=w;else R=Reflect.apply(m,this,[R,w,v,this]);v++}return R}reduceRight(...f){let[m,h]=f,v=h??this.at(-1);for(let R=this.size-1;R>=0;R--){let w=this.at(R);if(R===this.size-1&&f.length===1)v=w;else v=Reflect.apply(m,this,[v,w,R,this])}return v}toSorted(f){let m=[...this.entries()].sort(f);return new t(m)}toReversed(){let f=new t;for(let m=this.size-1;m>=0;m--){let h=this.keyAt(m),v=this.get(h);f.set(h,v)}return f}toSpliced(...f){let m=[...this.entries()];return m.splice(...f),new t(m)}slice(f,m){let h=new t,v=this.size-1;if(f===void 0)return h;if(f<0)f=f+this.size;if(m!==void 0&&m>0)v=m-1;for(let R=f;R<=v;R++){let w=this.keyAt(R),b=this.get(w);h.set(w,b)}return h}every(f,m){let h=0;for(let v of this){if(!Reflect.apply(f,m,[v,h,this]))return!1;h++}return!0}some(f,m){let h=0;for(let v of this){if(Reflect.apply(f,m,[v,h,this]))return!0;h++}return!1}};function Rn(t,f){if("at"in Array.prototype)return Array.prototype.at.call(t,f);let m=vo(t,f);return m===-1?void 0:t[m]}We(Rn,"at");function vo(t,f){let m=t.length,h=nr(f),v=h>=0?h:m+h;return v<0||v>=m?-1:v}We(vo,"toSafeIndex");function nr(t){return t!==t||t===0?0:Math.trunc(t)}We(nr,"toSafeInteger");function ss(t){let f=t+"CollectionProvider",[m,h]=i(f),[v,R]=m(f,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new er,setItemMap:We(()=>{return},"setItemMap")}),w=We(({state:j,...V})=>j?$t(E,{...V,state:j}):$t(b,{...V}),"CollectionProvider");w.displayName=f;let b=We((j)=>{let V=F();return $t(E,{...j,state:V})},"CollectionInit");b.displayName=f+"Init";let E=We((j)=>{let{scope:V,children:H,state:U}=j,Y=Ze.useRef(null),[re,Z]=Ze.useState(null),ae=a(Y,Z),[he,oe]=U;return Ze.useEffect(()=>{if(!re)return;let ue=Ro(()=>{});return ue.observe(re,{childList:!0,subtree:!0}),()=>{ue.disconnect()}},[re]),$t(v,{scope:V,itemMap:he,setItemMap:oe,collectionRef:ae,collectionRefObject:Y,collectionElement:re,children:H})},"CollectionProviderImpl");E.displayName=f+"Impl";let A=t+"CollectionSlot",I=x(A),S=Ze.forwardRef((j,V)=>{let{scope:H,children:U}=j,Y=R(A,H),re=a(V,Y.collectionRef);return $t(I,{ref:re,children:U})});S.displayName=A;let O=t+"CollectionItemSlot",M="data-radix-collection-item",T=x(O),L=Ze.forwardRef((j,V)=>{let{scope:H,children:U,...Y}=j,re=Ze.useRef(null),[Z,ae]=Ze.useState(null),he=a(V,re,ae),oe=R(O,H),{setItemMap:ue}=oe,pe=Ze.useRef(Y);if(!go(pe.current,Y))pe.current=Y;let je=pe.current;return Ze.useEffect(()=>{let ge=je;return ue((fe)=>{if(!Z)return fe;if(!fe.has(Z))return fe.set(Z,{...ge,element:Z}),fe.toSorted(tr);return fe.set(Z,{...ge,element:Z}).toSorted(tr)}),()=>{ue((fe)=>{if(!Z||!fe.has(Z))return fe;return fe.delete(Z),new er(fe)})}},[Z,je,ue]),$t(T,{...{[M]:""},ref:he,children:U})});L.displayName=O;function F(){return Ze.useState(new er)}We(F,"useInitCollection");function B(j){let{itemMap:V}=R(t+"CollectionConsumer",j);return V}return We(B,"useCollection"),[{Provider:w,Slot:S,ItemSlot:L},{createCollectionScope:h,useCollection:B,useInitCollection:F}]}We(ss,"createCollection");function go(t,f){if(t===f)return!0;if(typeof t!=="object"||typeof f!=="object")return!1;if(t==null||f==null)return!1;let m=Object.keys(t),h=Object.keys(f);if(m.length!==h.length)return!1;for(let v of m){if(!Object.prototype.hasOwnProperty.call(f,v))return!1;if(t[v]!==f[v])return!1}return!0}We(go,"shallowEqual");function yo(t,f){return!!(f.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)}We(yo,"isElementPreceding");function tr(t,f){return!t[1].element||!f[1].element?0:yo(t[1].element,f[1].element)?-1:1}We(tr,"sortByDocumentPosition");function Ro(t){return new MutationObserver((m)=>{for(let h of m)if(h.type==="childList"){t();return}})}We(Ro,"getChildListObserver");import*as wn from"react";import{jsx as yl}from"react/jsx-runtime";var as=Object.defineProperty,us=(t,f)=>as(t,"name",{value:f,configurable:!0}),ls=wn.createContext(void 0);function g(t){let f=wn.useContext(ls);return t||f||"ltr"}us(g,"useDirection");import*as ve from"react";import*as zt from"react";var fs=Object.defineProperty,ds=(t,f)=>fs(t,"name",{value:f,configurable:!0});function u(t){let f=zt.useRef(t);return zt.useEffect(()=>{f.current=t}),zt.useMemo(()=>(...m)=>f.current?.(...m),[])}ds(u,"useCallbackRef");import{jsx as ps}from"react/jsx-runtime";var ms=Object.defineProperty,Ve=(t,f)=>ms(t,"name",{value:f,configurable:!0}),rr="dismissableLayer.update",hs="dismissableLayer.pointerDownOutside",vs="dismissableLayer.focusOutside",wo,bo=ve.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),D=ve.forwardRef(Ve(function(f,m){let{disableOutsidePointerEvents:h=!1,deferPointerDownOutside:v=!1,onEscapeKeyDown:R,onPointerDownOutside:w,onFocusOutside:b,onInteractOutside:E,onDismiss:A,...I}=f,S=ve.useContext(bo),[O,M]=ve.useState(null),T=O?.ownerDocument??globalThis?.document,[,L]=ve.useState({}),F=a(m,M),B=Array.from(S.layers),[k]=[...S.layersWithOutsidePointerEventsDisabled].slice(-1),j=k?B.indexOf(k):-1,V=O?B.indexOf(O):-1,H=S.layersWithOutsidePointerEventsDisabled.size>0,U=V>=j,Y=ve.useRef(!1),re=xo((oe)=>{if(w?.(oe),E?.(oe),!oe.defaultPrevented)A?.()},{ownerDocument:T,deferPointerDownOutside:v,isDeferredPointerDownOutsideRef:Y,dismissableSurfaces:S.dismissableSurfaces,shouldHandlePointerDownOutside:ve.useCallback((oe)=>{if(!(oe instanceof Node))return!1;let ue=[...S.branches].some((pe)=>pe.contains(oe));return U&&!ue},[S.branches,U])}),Z=So((oe)=>{if(v&&Y.current)return;let ue=oe.target;if([...S.branches].some((je)=>je.contains(ue)))return;if(b?.(oe),E?.(oe),!oe.defaultPrevented)A?.()},T),ae=O?V===B.length-1:!1,he=u((oe)=>{if(oe.key!=="Escape")return;if(R?.(oe),!oe.defaultPrevented&&A)oe.preventDefault(),A()});return ve.useEffect(()=>{if(!ae)return;return T.addEventListener("keydown",he,{capture:!0}),()=>T.removeEventListener("keydown",he,{capture:!0})},[T,ae,he]),ve.useEffect(()=>{if(!O)return;if(h){if(S.layersWithOutsidePointerEventsDisabled.size===0)wo=T.body.style.pointerEvents,T.body.style.pointerEvents="none";S.layersWithOutsidePointerEventsDisabled.add(O)}return S.layers.add(O),or(),()=>{if(h){if(S.layersWithOutsidePointerEventsDisabled.delete(O),S.layersWithOutsidePointerEventsDisabled.size===0)T.body.style.pointerEvents=wo}}},[O,T,h,S]),ve.useEffect(()=>()=>{if(!O)return;S.layers.delete(O),S.layersWithOutsidePointerEventsDisabled.delete(O),or()},[O,S]),ve.useEffect(()=>{let oe=Ve(()=>L({}),"handleUpdate");return document.addEventListener(rr,oe),()=>document.removeEventListener(rr,oe)},[]),ps(o.div,{...I,ref:F,style:{pointerEvents:H?U?"auto":"none":void 0,...f.style},onFocusCapture:r(f.onFocusCapture,Z.onFocusCapture),onBlurCapture:r(f.onBlurCapture,Z.onBlurCapture),onPointerDownCapture:r(f.onPointerDownCapture,re.onPointerDownCapture)})},"DismissableLayer"));function cr(){let t=ve.useContext(bo),[f,m]=ve.useState(null);return ve.useEffect(()=>{if(!f)return;return t.dismissableSurfaces.add(f),()=>{t.dismissableSurfaces.delete(f)}},[f,t.dismissableSurfaces]),m}Ve(cr,"useDismissableLayerSurface");var gs=Ve(()=>!0,"IS_TRUE");function xo(t,f){let{ownerDocument:m=globalThis?.document,deferPointerDownOutside:h=!1,isDeferredPointerDownOutsideRef:v,dismissableSurfaces:R,shouldHandlePointerDownOutside:w=gs}=f,b=u(t),E=ve.useRef(!1),A=ve.useRef(!1),I=ve.useRef(new Map),S=ve.useRef(()=>{});return ve.useEffect(()=>{function O(){A.current=!1,v.current=!1,I.current.clear()}Ve(O,"resetOutsideInteraction");function M(){return Array.from(I.current.values()).some(Boolean)}Ve(M,"isOutsideInteractionIntercepted");function T(j){if(!A.current)return;let V=j.target;if(!(V instanceof Node&&[...R].some((U)=>U.contains(V))))I.current.set(j.type,!0);if(j.type==="click")window.setTimeout(()=>{if(A.current)S.current()},0)}Ve(T,"handleInteractionCapture");function L(j){if(A.current)I.current.set(j.type,!1)}Ve(L,"handleInteractionBubble");let F=Ve((j)=>{if(j.target&&!E.current){let H=function(){m.removeEventListener("click",S.current);let Y=M();if(O(),!Y)ir(hs,b,U,{discrete:!0})};var V=H;if(Ve(H,"handleAndDispatchPointerDownOutsideEvent"),!w(j.target)){m.removeEventListener("click",S.current),O(),E.current=!1;return}let U={originalEvent:j};if(A.current=!0,v.current=h&&j.button===0,I.current.clear(),!h||j.button!==0)H();else m.removeEventListener("click",S.current),S.current=H,m.addEventListener("click",S.current,{once:!0})}else m.removeEventListener("click",S.current),O();E.current=!1},"handlePointerDown"),B=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(let j of B)m.addEventListener(j,T,!0),m.addEventListener(j,L);let k=window.setTimeout(()=>{m.addEventListener("pointerdown",F)},0);return()=>{window.clearTimeout(k),m.removeEventListener("pointerdown",F),m.removeEventListener("click",S.current);for(let j of B)m.removeEventListener(j,T,!0),m.removeEventListener(j,L)}},[m,b,h,v,R,w]),{onPointerDownCapture:Ve(()=>E.current=!0,"onPointerDownCapture")}}Ve(xo,"usePointerDownOutside");function So(t,f=globalThis?.document){let m=u(t),h=ve.useRef(!1);return ve.useEffect(()=>{let v=Ve((R)=>{if(R.target&&!h.current)ir(vs,m,{originalEvent:R},{discrete:!1})},"handleFocus");return f.addEventListener("focusin",v),()=>f.removeEventListener("focusin",v)},[f,m]),{onFocusCapture:Ve(()=>h.current=!0,"onFocusCapture"),onBlurCapture:Ve(()=>h.current=!1,"onBlurCapture")}}Ve(So,"useFocusOutside");function or(){let t=new CustomEvent(rr);document.dispatchEvent(t)}Ve(or,"dispatchUpdate");function ir(t,f,m,{discrete:h}){let v=m.originalEvent.target,R=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:m});if(f)v.addEventListener(t,f,{once:!0});if(h)be(v,R);else v.dispatchEvent(R)}Ve(ir,"handleAndDispatchCustomEvent");import*as Co from"react";var ys=Object.defineProperty,ar=(t,f)=>ys(t,"name",{value:f,configurable:!0}),bn=0,Ht=null;function Rs(t){return z(),t.children}ar(Rs,"FocusGuards");function z(){Co.useEffect(()=>{if(!Ht)Ht={start:sr(),end:sr()};let{start:t,end:f}=Ht;if(document.body.firstElementChild!==t)document.body.insertAdjacentElement("afterbegin",t);if(document.body.lastElementChild!==f)document.body.insertAdjacentElement("beforeend",f);return bn++,()=>{if(bn===1)Ht?.start.remove(),Ht?.end.remove(),Ht=null;bn=Math.max(0,bn-1)}},[])}ar(z,"useFocusGuards");function sr(){let t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}ar(sr,"createFocusGuard");import*as et from"react";import{jsx as bs}from"react/jsx-runtime";var ws=Object.defineProperty,Ye=(t,f)=>ws(t,"name",{value:f,configurable:!0}),ur="focusScope.autoFocusOnMount",fr="focusScope.autoFocusOnUnmount",Eo={bubbles:!1,cancelable:!0},ne=et.forwardRef(Ye(function(f,m){let{loop:h=!1,trapped:v=!1,onMountAutoFocus:R,onUnmountAutoFocus:w,...b}=f,[E,A]=et.useState(null),I=u(R),S=u(w),O=et.useRef(null),M=a(m,A),T=et.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;et.useEffect(()=>{if(v){let j=function(Y){if(T.paused||!E)return;let re=Y.target;if(E.contains(re))O.current=re;else vt(O.current,{select:!0})},V=function(Y){if(T.paused||!E)return;let re=Y.relatedTarget;if(re===null)return;if(!E.contains(re))vt(O.current,{select:!0})},H=function(Y){if(document.activeElement!==document.body)return;for(let Z of Y)if(Z.removedNodes.length>0)vt(E)};var F=j,B=V,k=H;Ye(j,"handleFocusIn"),Ye(V,"handleFocusOut"),Ye(H,"handleMutations"),document.addEventListener("focusin",j),document.addEventListener("focusout",V);let U=new MutationObserver(H);if(E)U.observe(E,{childList:!0,subtree:!0});return()=>{document.removeEventListener("focusin",j),document.removeEventListener("focusout",V),U.disconnect()}}},[v,E,T.paused]),et.useEffect(()=>{if(E){Po.add(T);let F=document.activeElement;if(!E.contains(F)){let k=new CustomEvent(ur,Eo);if(E.addEventListener(ur,I),E.dispatchEvent(k),!k.defaultPrevented){if(Oo(To(pr(E)),{select:!0}),document.activeElement===F)vt(E)}}return()=>{E.removeEventListener(ur,I),setTimeout(()=>{let k=new CustomEvent(fr,Eo);if(E.addEventListener(fr,S),E.dispatchEvent(k),!k.defaultPrevented)vt(F??document.body,{select:!0});E.removeEventListener(fr,S),Po.remove(T)},0)}}},[E,I,S,T]);let L=et.useCallback((F)=>{if(!h&&!v)return;if(T.paused)return;let B=F.key==="Tab"&&!F.altKey&&!F.ctrlKey&&!F.metaKey,k=document.activeElement;if(B&&k){let j=F.currentTarget,[V,H]=_o(j);if(!(V&&H)){if(k===j)F.preventDefault()}else if(!F.shiftKey&&k===H){if(F.preventDefault(),h)vt(V,{select:!0})}else if(F.shiftKey&&k===V){if(F.preventDefault(),h)vt(H,{select:!0})}}},[h,v,T.paused]);return bs(o.div,{tabIndex:-1,...b,ref:M,onKeyDown:L})},"FocusScope"));function Oo(t,{select:f=!1}={}){let m=document.activeElement;for(let h of t)if(vt(h,{select:f}),document.activeElement!==m)return}Ye(Oo,"focusFirst");function _o(t){let f=pr(t),m=dr(f,t),h=dr(f.reverse(),t);return[m,h]}Ye(_o,"getTabbableEdges");function pr(t){let f=[],m=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:Ye((h)=>{let v=h.tagName==="INPUT"&&h.type==="hidden";if(h.disabled||h.hidden||v)return NodeFilter.FILTER_SKIP;return h.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});while(m.nextNode())f.push(m.currentNode);return f}Ye(pr,"getTabbableCandidates");function dr(t,f){let m=typeof f.checkVisibility==="function"&&f.checkVisibility({checkVisibilityCSS:!0});for(let h of t)if(!(m?!h.checkVisibility({checkVisibilityCSS:!0}):Ao(h,{upTo:f})))return h}Ye(dr,"findVisible");function Ao(t,{upTo:f}){if(getComputedStyle(t).visibility==="hidden")return!0;while(t){if(f!==void 0&&t===f)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}Ye(Ao,"isHidden");function Mo(t){return t instanceof HTMLInputElement&&"select"in t}Ye(Mo,"isSelectableInput");function vt(t,{select:f=!1}={}){if(t&&t.focus){let m=document.activeElement;if(t.focus({preventScroll:!0}),t!==m&&Mo(t)&&f)t.select()}}Ye(vt,"focus");var Po=Io();function Io(){let t=[];return{add(f){let m=t[0];if(f!==m)m?.pause();t=mr(t,f),t.unshift(f)},remove(f){t=mr(t,f),t[0]?.resume()}}}Ye(Io,"createFocusScopesStack");function mr(t,f){let m=[...t],h=m.indexOf(f);if(h!==-1)m.splice(h,1);return m}Ye(mr,"arrayRemove");function To(t){return t.filter((f)=>f.tagName!=="A")}Ye(To,"removeLinks");import*as hr from"react";import*as Do from"react";var l=globalThis?.document?Do.useLayoutEffect:()=>{};var xs=Object.defineProperty,Ss=(t,f)=>xs(t,"name",{value:f,configurable:!0}),Cs=hr[" useId ".trim().toString()]||(()=>{return}),Es=0;function c(t){let[f,m]=hr.useState(Cs());return l(()=>{if(!t)m((h)=>h??String(Es++))},[t]),t||(f?`radix-${f}`:"")}Ss(c,"useId");import*as He from"react";var Fo=["top","right","bottom","left"];var{min:ft,max:ot,round:on,floor:cn}=Math,dt=(t)=>({x:t,y:t}),Ps={left:"right",right:"left",bottom:"top",top:"bottom"};function vr(t,f,m){return ot(t,ft(f,m))}function mt(t,f){return typeof t==="function"?t(f):t}function gt(t){return t.split("-")[0]}function Pt(t){return t.split("-")[1]}function Sn(t){return t==="x"?"y":"x"}function Cn(t){return t==="y"?"height":"width"}function it(t){let f=t[0];return f==="t"||f==="b"?"y":"x"}function En(t){return Sn(it(t))}function ko(t,f,m){if(m===void 0)m=!1;let h=Pt(t),v=En(t),R=Cn(v),w=v==="x"?h===(m?"end":"start")?"right":"left":h==="start"?"bottom":"top";if(f.reference[R]>f.floating[R])w=rn(w);return[w,rn(w)]}function jo(t){let f=rn(t);return[xn(t),f,xn(f)]}function xn(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}var Lo=["left","right"],No=["right","left"],Os=["top","bottom"],_s=["bottom","top"];function As(t,f,m){switch(t){case"top":case"bottom":if(m)return f?No:Lo;return f?Lo:No;case"left":case"right":return f?Os:_s;default:return[]}}function Bo(t,f,m,h){let v=Pt(t),R=As(gt(t),m==="start",h);if(v){if(R=R.map((w)=>w+"-"+v),f)R=R.concat(R.map(xn))}return R}function rn(t){let f=gt(t);return Ps[f]+t.slice(f.length)}function Ms(t){var f,m,h,v;return{top:(f=t.top)!=null?f:0,right:(m=t.right)!=null?m:0,bottom:(h=t.bottom)!=null?h:0,left:(v=t.left)!=null?v:0}}function gr(t){return typeof t!=="number"?Ms(t):{top:t,right:t,bottom:t,left:t}}function Ot(t){let{x:f,y:m,width:h,height:v}=t;return{width:h,height:v,top:m,left:f,right:f+h,bottom:m+v,x:f,y:m}}function Wo(t,f,m){let{reference:h,floating:v}=t,R=it(f),w=En(f),b=Cn(w),E=gt(f),A=R==="y",I=h.x+h.width/2-v.width/2,S=h.y+h.height/2-v.height/2,O=h[b]/2-v[b]/2,M;switch(E){case"top":M={x:I,y:h.y-v.height};break;case"bottom":M={x:I,y:h.y+h.height};break;case"right":M={x:h.x+h.width,y:S};break;case"left":M={x:h.x-v.width,y:S};break;default:M={x:h.x,y:h.y}}let T=Pt(f);if(T)M[w]+=O*(T==="end"?1:-1)*(m&&A?-1:1);return M}async function zo(t,f){var m;if(f===void 0)f={};let{x:h,y:v,platform:R,rects:w,elements:b,strategy:E}=t,{boundary:A="clippingAncestors",rootBoundary:I="viewport",elementContext:S="floating",altBoundary:O=!1,padding:M=0}=mt(f,t),T=gr(M),F=b[O?S==="floating"?"reference":"floating":S],B=Ot(await R.getClippingRect({element:((m=await(R.isElement==null?void 0:R.isElement(F)))!=null?m:!0)?F:F.contextElement||await(R.getDocumentElement==null?void 0:R.getDocumentElement(b.floating)),boundary:A,rootBoundary:I,strategy:E})),k=S==="floating"?{x:h,y:v,width:w.floating.width,height:w.floating.height}:w.reference,j=await(R.getOffsetParent==null?void 0:R.getOffsetParent(b.floating)),V=await(R.isElement==null?void 0:R.isElement(j))&&await(R.getScale==null?void 0:R.getScale(j))||{x:1,y:1},H=Ot(R.convertOffsetParentRelativeRectToViewportRelativeRect?await R.convertOffsetParentRelativeRectToViewportRelativeRect({elements:b,rect:k,offsetParent:j,strategy:E}):k);return{top:(B.top-H.top+T.top)/V.y,bottom:(H.bottom-B.bottom+T.bottom)/V.y,left:(B.left-H.left+T.left)/V.x,right:(H.right-B.right+T.right)/V.x}}var Is=50,Ho=async(t,f,m)=>{let{placement:h="bottom",strategy:v="absolute",middleware:R=[],platform:w}=m,b=w.detectOverflow?w:{...w,detectOverflow:zo},E=await(w.isRTL==null?void 0:w.isRTL(f)),A=await w.getElementRects({reference:t,floating:f,strategy:v}),{x:I,y:S}=Wo(A,h,E),O=h,M=0,T={};for(let L=0;L<R.length;L++){let F=R[L];if(!F)continue;let{name:B,fn:k}=F,{x:j,y:V,data:H,reset:U}=await k({x:I,y:S,initialPlacement:h,placement:O,strategy:v,middlewareData:T,rects:A,platform:b,elements:{reference:t,floating:f}});if(I=j!=null?j:I,S=V!=null?V:S,T[B]={...T[B],...H},U&&M<Is){if(M++,typeof U==="object"){if(U.placement)O=U.placement;if(U.rects)A=U.rects===!0?await w.getElementRects({reference:t,floating:f,strategy:v}):U.rects;({x:I,y:S}=Wo(A,O,E))}L=-1}}return{x:I,y:S,placement:O,strategy:v,middlewareData:T}},Uo=(t)=>({name:"arrow",options:t,async fn(f){let{x:m,y:h,placement:v,rects:R,platform:w,elements:b,middlewareData:E}=f,{element:A,padding:I=0}=mt(t,f)||{};if(A==null)return{};let S=gr(I),O={x:m,y:h},M=En(v),T=Cn(M),L=await w.getDimensions(A),F=M==="y",B=F?"top":"left",k=F?"bottom":"right",j=F?"clientHeight":"clientWidth",V=R.reference[T]+R.reference[M]-O[M]-R.floating[T],H=O[M]-R.reference[M],U=await(w.getOffsetParent==null?void 0:w.getOffsetParent(A)),Y=U?U[j]:0;if(!Y||!await(w.isElement==null?void 0:w.isElement(U)))Y=b.floating[j]||R.floating[T];let re=V/2-H/2,Z=Y/2-L[T]/2-1,ae=ft(S[B],Z),he=ft(S[k],Z),oe=Y-L[T]-he,ue=Y/2-L[T]/2+re,pe=vr(ae,ue,oe),je=!E.arrow&&Pt(v)!=null&&ue!==pe&&R.reference[T]/2-(ue<ae?ae:he)-L[T]/2<0,ge=je?ue<ae?ue-ae:ue-oe:0;return{[M]:O[M]+ge,data:{[M]:pe,centerOffset:ue-pe-ge,...je&&{alignmentOffset:ge}},reset:je}}});var Go=function(t){if(t===void 0)t={};return{name:"flip",options:t,async fn(f){var m,h;let{placement:v,middlewareData:R,rects:w,initialPlacement:b,platform:E,elements:A}=f,{mainAxis:I=!0,crossAxis:S=!0,fallbackPlacements:O,fallbackStrategy:M="bestFit",fallbackAxisSideDirection:T="none",flipAlignment:L=!0,...F}=mt(t,f);if((m=R.arrow)!=null&&m.alignmentOffset)return{};let B=gt(v),k=it(b),j=gt(b)===b,V=await(E.isRTL==null?void 0:E.isRTL(A.floating)),H=O||(j||!L?[rn(b)]:jo(b)),U=T!=="none";if(!O&&U)H.push(...Bo(b,L,T,V));let Y=[b,...H],re=await E.detectOverflow(f,F),Z=[],ae=((h=R.flip)==null?void 0:h.overflows)||[];if(I)Z.push(re[B]);if(S){let pe=ko(v,w,V);Z.push(re[pe[0]],re[pe[1]])}if(ae=[...ae,{placement:v,overflows:Z}],!Z.every((pe)=>pe<=0)){var he,oe;let pe=(((he=R.flip)==null?void 0:he.index)||0)+1,je=Y[pe];if(je){if(!(S==="alignment"?k!==it(je):!1)||ae.every((me)=>it(me.placement)===k?me.overflows[0]>0:!0))return{data:{index:pe,overflows:ae},reset:{placement:je}}}let ge=(oe=ae.filter((fe)=>fe.overflows[0]<=0).sort((fe,me)=>fe.overflows[1]-me.overflows[1])[0])==null?void 0:oe.placement;if(!ge)switch(M){case"bestFit":{var ue;let fe=(ue=ae.filter((me)=>{if(U){let Oe=it(me.placement);return Oe===k||Oe==="y"}return!0}).map((me)=>[me.placement,me.overflows.filter((Oe)=>Oe>0).reduce((Oe,te)=>Oe+te,0)]).sort((me,Oe)=>me[1]-Oe[1])[0])==null?void 0:ue[0];if(fe)ge=fe;break}case"initialPlacement":ge=b;break}if(v!==ge)return{reset:{placement:ge}}}return{}}}};function Vo(t,f){return{top:t.top-f.height,right:t.right-f.width,bottom:t.bottom-f.height,left:t.left-f.width}}function $o(t){return Fo.some((f)=>t[f]>=0)}var Ko=function(t){if(t===void 0)t={};return{name:"hide",options:t,async fn(f){let{rects:m,platform:h}=f,{strategy:v="referenceHidden",...R}=mt(t,f);switch(v){case"referenceHidden":{let w=await h.detectOverflow(f,{...R,elementContext:"reference"}),b=Vo(w,m.reference);return{data:{referenceHiddenOffsets:b,referenceHidden:$o(b)}}}case"escaped":{let w=await h.detectOverflow(f,{...R,altBoundary:!0}),b=Vo(w,m.floating);return{data:{escapedOffsets:b,escaped:$o(b)}}}default:return{}}}}};var Yo=new Set(["left","top"]);async function Ts(t,f){let{placement:m,platform:h,elements:v}=t,R=await(h.isRTL==null?void 0:h.isRTL(v.floating)),w=gt(m),b=Pt(m),E=it(m)==="y",A=Yo.has(w)?-1:1,I=R&&E?-1:1,S=mt(f,t),{mainAxis:O,crossAxis:M,alignmentAxis:T}=typeof S==="number"?{mainAxis:S,crossAxis:0,alignmentAxis:null}:{mainAxis:S.mainAxis||0,crossAxis:S.crossAxis||0,alignmentAxis:S.alignmentAxis};if(b&&typeof T==="number")M=b==="end"?T*-1:T;return E?{x:M*I,y:O*A}:{x:O*A,y:M*I}}var Xo=function(t){if(t===void 0)t=0;return{name:"offset",options:t,async fn(f){var m,h;let{x:v,y:R,placement:w,middlewareData:b}=f,E=await Ts(f,t);if(w===((m=b.offset)==null?void 0:m.placement)&&(h=b.arrow)!=null&&h.alignmentOffset)return{};return{x:v+E.x,y:R+E.y,data:{...E,placement:w}}}}},Zo=function(t){if(t===void 0)t={};return{name:"shift",options:t,async fn(f){let{x:m,y:h,placement:v,platform:R}=f,{mainAxis:w=!0,crossAxis:b=!1,limiter:E={fn:(k)=>{let{x:j,y:V}=k;return{x:j,y:V}}},...A}=mt(t,f),I={x:m,y:h},S=await R.detectOverflow(f,A),O=it(v),M=Sn(O),T=I[M],L=I[O],F=(k,j)=>vr(j+S[k==="y"?"top":"left"],j,j-S[k==="y"?"bottom":"right"]);if(w)T=F(M,T);if(b)L=F(O,L);let B=E.fn({...f,[M]:T,[O]:L});return{...B,data:{x:B.x-m,y:B.y-h,enabled:{[M]:w,[O]:b}}}}}},qo=function(t){if(t===void 0)t={};return{options:t,fn(f){var m,h;let{x:v,y:R,placement:w,rects:b,middlewareData:E}=f,{offset:A=0,mainAxis:I=!0,crossAxis:S=!0}=mt(t,f),O={x:v,y:R},M=it(w),T=Sn(M),L=O[T],F=O[M],B=mt(A,f),k=typeof B==="number"?{mainAxis:B,crossAxis:0}:{mainAxis:(m=B.mainAxis)!=null?m:0,crossAxis:(h=B.crossAxis)!=null?h:0};if(I){let H=T==="y"?"height":"width",U=b.reference[T]-b.floating[H]+k.mainAxis,Y=b.reference[T]+b.reference[H]-k.mainAxis;if(L<U)L=U;else if(L>Y)L=Y}if(S){var j,V;let H=T==="y"?"width":"height",U=Yo.has(gt(w)),Y=b.reference[M]-b.floating[H]+(U?((j=E.offset)==null?void 0:j[M])||0:0)+(U?0:k.crossAxis),re=b.reference[M]+b.reference[H]+(U?0:((V=E.offset)==null?void 0:V[M])||0)-(U?k.crossAxis:0);if(F<Y)F=Y;else if(F>re)F=re}return{[T]:L,[M]:F}}}},Qo=function(t){if(t===void 0)t={};return{name:"size",options:t,async fn(f){let{placement:m,rects:h,platform:v,elements:R}=f,{apply:w=()=>{},...b}=mt(t,f),E=await v.detectOverflow(f,b),A=gt(m),I=Pt(m),S=it(m)==="y",{width:O,height:M}=h.floating,T,L;if(A==="top"||A==="bottom")T=A,L=I===(await(v.isRTL==null?void 0:v.isRTL(R.floating))?"start":"end")?"left":"right";else L=A,T=I==="end"?"top":"bottom";let F=M-E.top-E.bottom,B=O-E.left-E.right,k=ft(M-E[T],F),j=ft(O-E[L],B),V=f.middlewareData.shift,H=!V,U=k,Y=j;if(V!=null&&V.enabled.x)Y=B;if(V!=null&&V.enabled.y)U=F;if(H&&!I)if(S)Y=O-2*ot(E.left,E.right);else U=M-2*ot(E.top,E.bottom);await w({...f,availableWidth:Y,availableHeight:U});let re=await v.getDimensions(R.floating);if(O!==re.width||M!==re.height)return{reset:{rects:!0}};return{}}}};function Pn(){return typeof window<"u"}function Mt(t){if(ei(t))return(t.nodeName||"").toLowerCase();return"#document"}function Xe(t){var f;return(t==null||(f=t.ownerDocument)==null?void 0:f.defaultView)||window}function pt(t){var f;return(f=(ei(t)?t.ownerDocument:t.document)||window.document)==null?void 0:f.documentElement}function ei(t){if(!Pn())return!1;return t instanceof Node||t instanceof Xe(t).Node}function ct(t){if(!Pn())return!1;return t instanceof Element||t instanceof Xe(t).Element}function yt(t){if(!Pn())return!1;return t instanceof HTMLElement||t instanceof Xe(t).HTMLElement}function Jo(t){if(!Pn()||typeof ShadowRoot>"u")return!1;return t instanceof ShadowRoot||t instanceof Xe(t).ShadowRoot}function sn(t){let{overflow:f,overflowX:m,overflowY:h,display:v}=st(t);return/auto|scroll|overlay|hidden|clip/.test(f+h+m)&&v!=="inline"&&v!=="contents"}function ti(t){return/^(table|td|th)$/.test(Mt(t))}function an(t){try{if(t.matches(":popover-open"))return!0}catch(f){}try{return t.matches(":modal")}catch(f){return!1}}var Ds=/transform|translate|scale|rotate|perspective|filter/,Ls=/paint|layout|strict|content/,_t=(t)=>!!t&&t!=="none",yr;function On(t){let f=ct(t)?st(t):t;return _t(f.transform)||_t(f.translate)||_t(f.scale)||_t(f.rotate)||_t(f.perspective)||!_n()&&(_t(f.backdropFilter)||_t(f.filter))||Ds.test(f.willChange||"")||Ls.test(f.contain||"")}function ni(t){let f=St(t);while(yt(f)&&!Ut(f)){if(On(f))return f;else if(an(f))return null;f=St(f)}return null}function _n(){if(yr==null)yr=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none");return yr}function Ut(t){return/^(html|body|#document)$/.test(Mt(t))}function st(t){return Xe(t).getComputedStyle(t)}function un(t){if(ct(t))return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop};return{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function St(t){if(Mt(t)==="html")return t;let f=t.assignedSlot||t.parentNode||Jo(t)&&t.host||pt(t);return Jo(f)?f.host:f}function ri(t){let f=St(t);if(Ut(f))return(t.ownerDocument||t).body;if(yt(f)&&sn(f))return f;return ri(f)}function At(t,f,m){var h;if(f===void 0)f=[];if(m===void 0)m=!0;let v=ri(t),R=v===((h=t.ownerDocument)==null?void 0:h.body),w=Xe(v);if(R){let b=An(w);return f.concat(w,w.visualViewport||[],sn(v)?v:[],b&&m?At(b):[])}else return f.concat(v,At(v,[],m))}function An(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ci(t){let f=st(t),m=parseFloat(f.width)||0,h=parseFloat(f.height)||0,v=yt(t),R=v?t.offsetWidth:m,w=v?t.offsetHeight:h,b=on(m)!==R||on(h)!==w;if(b)m=R,h=w;return{width:m,height:h,$:b}}function wr(t){return!ct(t)?t.contextElement:t}function Gt(t){let f=wr(t);if(!yt(f))return dt(1);let m=f.getBoundingClientRect(),{width:h,height:v,$:R}=ci(f),w=(R?on(m.width):m.width)/h,b=(R?on(m.height):m.height)/v;if(!w||!Number.isFinite(w))w=1;if(!b||!Number.isFinite(b))b=1;return{x:w,y:b}}var Ns=dt(0);function si(t){let f=Xe(t);if(!_n()||!f.visualViewport)return Ns;return{x:f.visualViewport.offsetLeft,y:f.visualViewport.offsetTop}}function Fs(t,f,m){if(f===void 0)f=!1;return!!m&&f&&m===Xe(t)}function It(t,f,m,h){if(f===void 0)f=!1;if(m===void 0)m=!1;let v=t.getBoundingClientRect(),R=wr(t),w=dt(1);if(f)if(h){if(ct(h))w=Gt(h)}else w=Gt(t);let b=Fs(R,m,h)?si(R):dt(0),E=(v.left+b.x)/w.x,A=(v.top+b.y)/w.y,I=v.width/w.x,S=v.height/w.y;if(R&&h){let O=Xe(R),M=ct(h)?Xe(h):h,T=O,L=An(T);while(L&&M!==T){let F=Gt(L),B=L.getBoundingClientRect(),k=st(L),j=B.left+(L.clientLeft+parseFloat(k.paddingLeft))*F.x,V=B.top+(L.clientTop+parseFloat(k.paddingTop))*F.y;E*=F.x,A*=F.y,I*=F.x,S*=F.y,E+=j,A+=V,T=Xe(L),L=An(T)}}return Ot({width:I,height:S,x:E,y:A})}function Mn(t,f){let m=un(t).scrollLeft;if(!f)return It(pt(t)).left+m;return f.left+m}function ai(t,f){let m=t.getBoundingClientRect(),h=m.left+f.scrollLeft-Mn(t,m),v=m.top+f.scrollTop;return{x:h,y:v}}function ks(t){let{elements:f,rect:m,offsetParent:h,strategy:v}=t,R=v==="fixed",w=pt(h),b=f?an(f.floating):!1;if(h===w||b&&R)return m;let E={scrollLeft:0,scrollTop:0},A=dt(1),I=dt(0),S=yt(h);if(S||!R){if(Mt(h)!=="body"||sn(w))E=un(h);if(S){let M=It(h);A=Gt(h),I.x=M.x+h.clientLeft,I.y=M.y+h.clientTop}}let O=w&&!S&&!R?ai(w,E):dt(0);return{width:m.width*A.x,height:m.height*A.y,x:m.x*A.x-E.scrollLeft*A.x+I.x+O.x,y:m.y*A.y-E.scrollTop*A.y+I.y+O.y}}function js(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function Bs(t){let f=un(t),m=t.ownerDocument.body,h=ot(t.scrollWidth,t.clientWidth,m.scrollWidth,m.clientWidth),v=ot(t.scrollHeight,t.clientHeight,m.scrollHeight,m.clientHeight),R=-f.scrollLeft+Mn(t),w=-f.scrollTop;if(st(m).direction==="rtl")R+=ot(t.clientWidth,m.clientWidth)-h;return{width:h,height:v,x:R,y:w}}var Ws=25;function Vs(t,f,m){if(m===void 0)m="viewport";let h=m==="layoutViewport",v=Xe(t),R=pt(t),w=v.visualViewport,{clientWidth:b,clientHeight:E}=R,A=0,I=0;if(w){let O=!_n()||f==="fixed";if(h){if(!O)A=-w.offsetLeft,I=-w.offsetTop}else if(b=w.width,E=w.height,O)A=w.offsetLeft,I=w.offsetTop}if(Mn(R)<=0){let O=R.ownerDocument,M=O.body,T=getComputedStyle(M),L=O.compatMode==="CSS1Compat"?parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0:0,F=Math.abs(R.clientWidth-M.clientWidth-L),B=getComputedStyle(R).scrollbarGutter==="stable both-edges"?F/2:F;if(B<=Ws)b-=B}return{width:b,height:E,x:A,y:I}}function $s(t,f){let m=It(t,!0,f==="fixed"),h=m.top+t.clientTop,v=m.left+t.clientLeft,R=Gt(t),w=t.clientWidth*R.x,b=t.clientHeight*R.y,E=v*R.x,A=h*R.y;return{width:w,height:b,x:E,y:A}}function oi(t,f,m){let h;if(f==="viewport"||f==="layoutViewport")h=Vs(t,m,f);else if(f==="document")h=Bs(pt(t));else if(ct(f))h=$s(f,m);else{let v=si(t);h={x:f.x-v.x,y:f.y-v.y,width:f.width,height:f.height}}return Ot(h)}function zs(t,f){let m=f.get(t);if(m)return m;let h=At(t,[],!1).filter((b)=>ct(b)&&Mt(b)!=="body"),v=null,R=st(t).position==="fixed",w=R?St(t):t;while(ct(w)&&!Ut(w)){let b=st(w),E=On(w),A=v?v.position:R?"fixed":"";if(!E&&(A==="fixed"||A==="absolute"&&b.position==="static"))h=h.filter((S)=>S!==w);else v=b;w=St(w)}return f.set(t,h),h}function Hs(t){let{element:f,boundary:m,rootBoundary:h,strategy:v}=t,w=[...m==="clippingAncestors"?an(f)?[]:zs(f,this._c):[].concat(m),h],b=oi(f,w[0],v),{top:E,right:A,bottom:I,left:S}=b;for(let O=1;O<w.length;O++){let M=oi(f,w[O],v);E=ot(M.top,E),A=ft(M.right,A),I=ft(M.bottom,I),S=ot(M.left,S)}return{width:A-S,height:I-E,x:S,y:E}}function Us(t){let{width:f,height:m}=ci(t);return{width:f,height:m}}function Gs(t,f,m){let h=yt(f),v=pt(f),R=m==="fixed",w=It(t,!0,R,f),b={scrollLeft:0,scrollTop:0},E=dt(0);if(h||!R){if(Mt(f)!=="body"||sn(v))b=un(f);if(h){let O=It(f,!0,R,f);E.x=O.x+f.clientLeft,E.y=O.y+f.clientTop}}if(!h&&v)E.x=Mn(v);let A=v&&!h&&!R?ai(v,b):dt(0),I=w.left+b.scrollLeft-E.x-A.x,S=w.top+b.scrollTop-E.y-A.y;return{x:I,y:S,width:w.width,height:w.height}}function Rr(t){return st(t).position==="static"}function ii(t,f){if(!yt(t)||st(t).position==="fixed")return null;if(f)return f(t);let m=t.offsetParent;if(pt(t)===m)m=m.ownerDocument.body;return m}function ui(t,f){let m=Xe(t);if(an(t))return m;if(!yt(t)){let v=St(t);while(v&&!Ut(v)){if(ct(v)&&!Rr(v))return v;v=St(v)}return m}let h=ii(t,f);while(h&&ti(h)&&Rr(h))h=ii(h,f);if(h&&Ut(h)&&Rr(h)&&!On(h))return m;return h||ni(t)||m}var Ks=async function(t){let f=this.getOffsetParent||ui,m=this.getDimensions,h=await m(t.floating);return{reference:Gs(t.reference,await f(t.floating),t.strategy),floating:{x:0,y:0,width:h.width,height:h.height}}};function Ys(t){return st(t).direction==="rtl"}var li={convertOffsetParentRelativeRectToViewportRelativeRect:ks,getDocumentElement:pt,getClippingRect:Hs,getOffsetParent:ui,getElementRects:Ks,getClientRects:js,getDimensions:Us,getScale:Gt,isElement:ct,isRTL:Ys};function fi(t,f){return t.x===f.x&&t.y===f.y&&t.width===f.width&&t.height===f.height}function Xs(t,f,m){let h=null,v,R=pt(t);function w(){var I;clearTimeout(v),(I=h)==null||I.disconnect(),h=null}function b(I,S){if(I===void 0)I=!1;if(S===void 0)S=1;w();let O=t.getBoundingClientRect(),{left:M,top:T,width:L,height:F}=O;if(!I)f();if(!L||!F)return;let B=cn(T),k=cn(R.clientWidth-(M+L)),j=cn(R.clientHeight-(T+F)),V=cn(M),U={rootMargin:-B+"px "+-k+"px "+-j+"px "+-V+"px",threshold:ot(0,ft(1,S))||1},Y=!0;function re(Z){let ae=Z[0].intersectionRatio;if(!fi(O,t.getBoundingClientRect()))return b();if(ae!==S){if(!Y)return b();if(!ae)v=setTimeout(()=>{b(!1,0.0000001)},1000);else b(!1,ae)}Y=!1}try{h=new IntersectionObserver(re,{...U,root:R.ownerDocument})}catch(Z){h=new IntersectionObserver(re,U)}h.observe(t)}let E=Xe(t),A=()=>b(m);return E.addEventListener("resize",A),b(!0),()=>{E.removeEventListener("resize",A),w()}}function br(t,f,m,h){if(h===void 0)h={};let{ancestorScroll:v=!0,ancestorResize:R=!0,elementResize:w=typeof ResizeObserver==="function",layoutShift:b=typeof IntersectionObserver==="function",animationFrame:E=!1}=h,A=wr(t),I=v||R?[...A?At(A):[],...f?At(f):[]]:[];I.forEach((B)=>{v&&B.addEventListener("scroll",m),R&&B.addEventListener("resize",m)});let S=A&&b?Xs(A,m,R):null,O=-1,M=null;if(w){if(M=new ResizeObserver((B)=>{let[k]=B;if(k&&k.target===A&&M&&f)M.unobserve(f),cancelAnimationFrame(O),O=requestAnimationFrame(()=>{var j;(j=M)==null||j.observe(f)});m()}),A&&!E)M.observe(A);if(f)M.observe(f)}let T,L=E?It(t):null;if(E)F();function F(){let B=It(t);if(L&&!fi(L,B))m();L=B,T=requestAnimationFrame(F)}return m(),()=>{var B;if(I.forEach((k)=>{v&&k.removeEventListener("scroll",m),R&&k.removeEventListener("resize",m)}),S==null||S(),(B=M)==null||B.disconnect(),M=null,E)cancelAnimationFrame(T)}}var di=Xo;var mi=Zo,pi=Go,hi=Qo,vi=Ko,xr=Uo;var gi=qo,Sr=(t,f,m)=>{let h=new Map,v=m!=null?m:{},R={...li,...v.platform,_c:h};return Ho(t,f,{...v,platform:R})};import*as Be from"react";import{useLayoutEffect as Zs}from"react";import*as Ri from"react-dom";var qs=typeof document<"u",Qs=function(){},In=qs?Zs:Qs;function Tn(t,f){if(t===f)return!0;if(typeof t!==typeof f)return!1;if(typeof t==="function"&&t.toString()===f.toString())return!0;let m,h,v;if(t&&f&&typeof t==="object"){if(Array.isArray(t)){if(m=t.length,m!==f.length)return!1;for(h=m;h--!==0;)if(!Tn(t[h],f[h]))return!1;return!0}if(v=Object.keys(t),m=v.length,m!==Object.keys(f).length)return!1;for(h=m;h--!==0;)if(!{}.hasOwnProperty.call(f,v[h]))return!1;for(h=m;h--!==0;){let R=v[h];if(R==="_owner"&&t.$$typeof)continue;if(!Tn(t[R],f[R]))return!1}return!0}return t!==t&&f!==f}function wi(t){if(typeof window>"u")return 1;return(t.ownerDocument.defaultView||window).devicePixelRatio||1}function yi(t,f){let m=wi(t);return Math.round(f*m)/m}function Cr(t){let f=Be.useRef(t);return In(()=>{f.current=t}),f}function bi(t){if(t===void 0)t={};let{placement:f="bottom",strategy:m="absolute",middleware:h=[],platform:v,elements:{reference:R,floating:w}={},transform:b=!0,whileElementsMounted:E,open:A}=t,[I,S]=Be.useState({x:0,y:0,strategy:m,placement:f,middlewareData:{},isPositioned:!1}),[O,M]=Be.useState(h);if(!Tn(O,h))M(h);let[T,L]=Be.useState(null),[F,B]=Be.useState(null),k=Be.useCallback((me)=>{if(me!==U.current)U.current=me,L(me)},[]),j=Be.useCallback((me)=>{if(me!==Y.current)Y.current=me,B(me)},[]),V=R||T,H=w||F,U=Be.useRef(null),Y=Be.useRef(null),re=Be.useRef(I),Z=E!=null,ae=Cr(E),he=Cr(v),oe=Cr(A),ue=Be.useCallback(()=>{if(!U.current||!Y.current)return;let me={placement:f,strategy:m,middleware:O};if(he.current)me.platform=he.current;Sr(U.current,Y.current,me).then((Oe)=>{let te={...Oe,isPositioned:oe.current!==!1};if(pe.current&&!Tn(re.current,te))re.current=te,Ri.flushSync(()=>{S(te)})})},[O,f,m,he,oe]);In(()=>{if(A===!1&&re.current.isPositioned)re.current.isPositioned=!1,S((me)=>({...me,isPositioned:!1}))},[A]);let pe=Be.useRef(!1);In(()=>(pe.current=!0,()=>{pe.current=!1}),[]),In(()=>{if(V)U.current=V;if(H)Y.current=H;if(V&&H){if(ae.current)return ae.current(V,H,ue);ue()}},[V,H,ue,ae,Z]);let je=Be.useMemo(()=>({reference:U,floating:Y,setReference:k,setFloating:j}),[k,j]),ge=Be.useMemo(()=>({reference:V,floating:H}),[V,H]),fe=Be.useMemo(()=>{let me={position:m,left:0,top:0};if(!ge.floating)return me;let Oe=yi(ge.floating,I.x),te=yi(ge.floating,I.y);if(b)return{...me,transform:"translate("+Oe+"px, "+te+"px)",...wi(ge.floating)>=1.5&&{willChange:"transform"}};return{position:m,left:Oe,top:te}},[m,b,ge.floating,I.x,I.y]);return Be.useMemo(()=>({...I,update:ue,refs:je,elements:ge,floatingStyles:fe}),[I,ue,je,ge,fe])}var Js=(t)=>{function f(m){return{}.hasOwnProperty.call(m,"current")}return{name:"arrow",options:t,fn(m){let{element:h,padding:v}=typeof t==="function"?t(m):t;if(h&&f(h)){if(h.current!=null)return xr({element:h.current,padding:v}).fn(m);return{}}if(h)return xr({element:h,padding:v}).fn(m);return{}}}},xi=(t,f)=>{let m=di(t);return{name:m.name,fn:m.fn,options:[t,f]}},Si=(t,f)=>{let m=mi(t);return{name:m.name,fn:m.fn,options:[t,f]}},Ci=(t,f)=>({fn:gi(t).fn,options:[t,f]}),Ei=(t,f)=>{let m=pi(t);return{name:m.name,fn:m.fn,options:[t,f]}},Pi=(t,f)=>{let m=hi(t);return{name:m.name,fn:m.fn,options:[t,f]}};var Oi=(t,f)=>{let m=vi(t);return{name:m.name,fn:m.fn,options:[t,f]}};var _i=(t,f)=>{let m=Js(t);return{name:m.name,fn:m.fn,options:[t,f]}};import*as Mi from"react";import{jsx as Ai}from"react/jsx-runtime";var ea=Object.defineProperty,ta=(t,f)=>ea(t,"name",{value:f,configurable:!0}),na=Mi.forwardRef(ta(function(f,m){let{children:h,width:v=10,height:R=5,...w}=f;return Ai(o.svg,{...w,ref:m,width:v,height:R,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:f.asChild?h:Ai("polygon",{points:"0,0 30,0 15,10"})})},"Arrow")),Ii=na;import*as Ti from"react";var oa=Object.defineProperty,ia=(t,f)=>oa(t,"name",{value:f,configurable:!0});function N(t){let[f,m]=Ti.useState(void 0);return l(()=>{if(t){m({width:t.offsetWidth,height:t.offsetHeight});let h=new ResizeObserver((v)=>{if(!Array.isArray(v))return;if(!v.length)return;let R=v[0],w,b;if("borderBoxSize"in R){let E=R.borderBoxSize,A=Array.isArray(E)?E[0]:E;w=A.inlineSize,b=A.blockSize}else w=t.offsetWidth,b=t.offsetHeight;m({width:w,height:b})});return h.observe(t,{box:"border-box"}),()=>h.unobserve(t)}else m(void 0)},[t]),f}ia(N,"useSize");import{jsx as Tt}from"react/jsx-runtime";var ca=Object.defineProperty,Rt=(t,f)=>ca(t,"name",{value:f,configurable:!0});var Di="Popper",[Li,_]=i(Di),[sa,Ni]=Li(Di),aa=Rt((t)=>{let{__scopePopper:f,children:m}=t,[h,v]=He.useState(null),[R,w]=He.useState(void 0);return Tt(sa,{scope:f,anchor:h,onAnchorChange:v,placementState:R,setPlacementState:w,children:m})},"Popper"),ua="PopperAnchor",la=He.forwardRef(Rt(function(f,m){let{__scopePopper:h,virtualRef:v,...R}=f,w=Ni(ua,h),b=He.useRef(null),E=w.onAnchorChange,A=He.useCallback((L)=>{if(b.current=L,L)E(L)},[E]),I=a(m,A),S=He.useRef(null);He.useEffect(()=>{if(!v)return;let L=S.current;if(S.current=v.current,L!==S.current)E(S.current)});let O=w.placementState&&Dn(w.placementState),M=O?.[0],T=O?.[1];return v?null:Tt(o.div,{"data-radix-popper-side":M,"data-radix-popper-align":T,...R,ref:I})},"PopperAnchor")),Fi="PopperContent",[fa,da]=Li(Fi),ma=He.forwardRef(Rt(function(f,m){let{__scopePopper:h,side:v="bottom",sideOffset:R=0,align:w="center",alignOffset:b=0,arrowPadding:E=0,avoidCollisions:A=!0,collisionBoundary:I=[],collisionPadding:S=0,sticky:O="partial",hideWhenDetached:M=!1,updatePositionStrategy:T="optimized",onPlaced:L,...F}=f,B=Ni(Fi,h),[k,j]=He.useState(null),V=a(m,j),[H,U]=He.useState(null),Y=N(H),re=Y?.width??0,Z=Y?.height??0,ae=v+(w!=="center"?"-"+w:""),he=typeof S==="number"?S:{top:0,right:0,bottom:0,left:0,...S},oe=Array.isArray(I)?I:[I],ue=oe.length>0,pe={padding:he,boundary:oe.filter(ki),altBoundary:ue},{refs:je,floatingStyles:ge,placement:fe,isPositioned:me,middlewareData:Oe}=bi({strategy:"fixed",placement:ae,whileElementsMounted:Rt((...Bt)=>br(...Bt,{animationFrame:T==="always"}),"whileElementsMounted"),elements:{reference:B.anchor},middleware:[xi({mainAxis:R+Z,alignmentAxis:b}),A&&Si({mainAxis:!0,crossAxis:!1,limiter:O==="partial"?Ci():void 0,...pe}),A&&Ei({...pe}),Pi({...pe,apply:Rt(({elements:Bt,rects:Qr,availableWidth:Vc,availableHeight:$c})=>{let{width:zc,height:Hc}=Qr.reference,gn=Bt.floating.style;gn.setProperty("--radix-popper-available-width",`${Vc}px`),gn.setProperty("--radix-popper-available-height",`${$c}px`),gn.setProperty("--radix-popper-anchor-width",`${zc}px`),gn.setProperty("--radix-popper-anchor-height",`${Hc}px`)},"apply")}),H&&_i({element:H,padding:E}),ga({arrowWidth:re,arrowHeight:Z}),M&&Oi({strategy:"referenceHidden",...pe,boundary:ue?pe.boundary:void 0})]}),te=B.setPlacementState;l(()=>(te(fe),()=>{te(void 0)}),[fe,te]);let[ht,lt]=Dn(fe),bt=u(L);l(()=>{if(me)bt?.()},[me,bt]);let tn=Oe.arrow?.x,nn=Oe.arrow?.y,vn=Oe.arrow?.centerOffset!==0,[Et,Ke]=He.useState();return l(()=>{if(k)Ke(window.getComputedStyle(k).zIndex)},[k]),Tt("div",{ref:je.setFloating,"data-radix-popper-content-wrapper":"",style:{...ge,transform:me?ge.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Et,"--radix-popper-transform-origin":[Oe.transformOrigin?.x,Oe.transformOrigin?.y].join(" "),...Oe.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:f.dir,children:Tt(fa,{scope:h,placedSide:ht,placedAlign:lt,onArrowChange:U,arrowX:tn,arrowY:nn,shouldHideArrow:vn,children:Tt(o.div,{"data-side":ht,"data-align":lt,...F,ref:V,style:{...F.style,animation:!me?"none":F.style?.animation}})})})},"PopperContent")),pa="PopperArrow",ha={top:"bottom",right:"left",bottom:"top",left:"right"},va=He.forwardRef(Rt(function(f,m){let{__scopePopper:h,...v}=f,R=da(pa,h),w=ha[R.placedSide];return Tt("span",{ref:R.onArrowChange,style:{position:"absolute",left:R.arrowX,top:R.arrowY,[w]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[R.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[R.placedSide],visibility:R.shouldHideArrow?"hidden":void 0},children:Tt(Ii,{...v,ref:m,style:{...v.style,display:"block"}})})},"PopperArrow"));function ki(t){return t!==null}Rt(ki,"isNotNull");var ga=Rt((t)=>({name:"transformOrigin",options:t,fn(f){let{placement:m,rects:h,middlewareData:v}=f,w=v.arrow?.centerOffset!==0,b=w?0:t.arrowWidth,E=w?0:t.arrowHeight,[A,I]=Dn(m),S={start:"0%",center:"50%",end:"100%"}[I],O=(v.arrow?.x??0)+b/2,M=(v.arrow?.y??0)+E/2,T="",L="";if(A==="bottom")T=w?S:`${O}px`,L=`${-E}px`;else if(A==="top")T=w?S:`${O}px`,L=`${h.floating.height+E}px`;else if(A==="right")T=`${-E}px`,L=w?S:`${M}px`;else if(A==="left")T=`${h.floating.width+E}px`,L=w?S:`${M}px`;return{data:{x:T,y:L}}}}),"transformOrigin");function Dn(t){let[f,m="center"]=t.split("-");return[f,m]}Rt(Dn,"getSideAndAlignFromPlacement");var ie=aa,se=la,ye=ma,xt=va;import*as Ln from"react";import*as ji from"react-dom";import{jsx as ba}from"react/jsx-runtime";var Ra=Object.defineProperty,wa=(t,f)=>Ra(t,"name",{value:f,configurable:!0}),W=Ln.forwardRef(wa(function(f,m){let{container:h,...v}=f,[R,w]=Ln.useState(!1);l(()=>w(!0),[]);let b=h||R&&globalThis?.document?.body;return b?ji.createPortal(ba(o.div,{...v,ref:m}),b):null},"Portal"));import*as Ue from"react";import*as Bi from"react";var xa=Object.defineProperty,wt=(t,f)=>xa(t,"name",{value:f,configurable:!0});function Wi(t,f){return Bi.useReducer((m,h)=>f[m][h]??m,t)}wt(Wi,"useStateMachine");var d=wt((t)=>{let{present:f,children:m}=t,h=Vi(f),v=typeof m==="function"?m({present:h.isPresent}):Ue.Children.only(m),R=$i(h.ref,zi(v));return typeof m==="function"||h.isPresent?Ue.cloneElement(v,{ref:R}):null},"Presence");function Vi(t){let[f,m]=Ue.useState(),h=Ue.useRef(null),v=Ue.useRef(t),R=Ue.useRef("none"),w=Ue.useRef(void 0),b=t?"mounted":"unmounted",[E,A]=Wi(b,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Ue.useEffect(()=>{if(E==="mounted")R.current=w.current??Kt(h.current),w.current=void 0;else R.current="none"},[E]),l(()=>{let I=h.current,S=v.current;if(S!==t){let M=R.current,T=Kt(I);if(t)w.current=T,A("MOUNT");else if(T==="none"||I?.display==="none")A("UNMOUNT");else if(S&&M!==T)A("ANIMATION_OUT");else A("UNMOUNT");v.current=t}},[t,A]),l(()=>{if(f){let I,S=f.ownerDocument.defaultView??window,O=wt((T)=>{let F=Kt(h.current).includes(CSS.escape(T.animationName));if(T.target===f&&F){if(A("ANIMATION_END"),!v.current){let B=f.style.animationFillMode;f.style.animationFillMode="forwards",I=S.setTimeout(()=>{if(f.style.animationFillMode==="forwards")f.style.animationFillMode=B})}}},"handleAnimationEnd"),M=wt((T)=>{if(T.target===f)R.current=Kt(h.current)},"handleAnimationStart");return f.addEventListener("animationstart",M),f.addEventListener("animationcancel",O),f.addEventListener("animationend",O),()=>{S.clearTimeout(I),f.removeEventListener("animationstart",M),f.removeEventListener("animationcancel",O),f.removeEventListener("animationend",O)}}else A("ANIMATION_END")},[f,A]),{isPresent:["mounted","unmountSuspended"].includes(E),ref:Ue.useCallback((I)=>{if(I){let S=getComputedStyle(I);h.current=S,w.current=Kt(S)}else h.current=null;m(I)},[])}}wt(Vi,"usePresence");function Er(t,f){if(typeof t==="function")return t(f);else if(t!==null&&t!==void 0)t.current=f}wt(Er,"setRef");function $i(...t){let f=Ue.useRef(t);return f.current=t,Ue.useCallback((m)=>{let h=f.current,v=!1,R=h.map((w)=>{let b=Er(w,m);if(!v&&typeof b==="function")v=!0;return b});if(v)return()=>{for(let w=0;w<R.length;w++){let b=R[w];if(typeof b==="function")b();else Er(h[w],null)}}},[])}wt($i,"useStableComposedRefs");function Kt(t){return t?.animationName||"none"}wt(Kt,"getAnimationName");function zi(t){let f=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,m=f&&"isReactWarning"in f&&f.isReactWarning;if(m)return t.ref;if(f=Object.getOwnPropertyDescriptor(t,"ref")?.get,m=f&&"isReactWarning"in f&&f.isReactWarning,m)return t.props.ref;return t.props.ref||t.ref}wt(zi,"getElementRef");import*as $e from"react";import*as tt from"react";import*as at from"react";import*as Yt from"react";var Sa=Object.defineProperty,Ca=(t,f)=>Sa(t,"name",{value:f,configurable:!0}),Hi=Yt[" useEffectEvent ".trim().toString()],Ui=Yt[" useInsertionEffect ".trim().toString()];function Pr(t){if(typeof Hi==="function")return Hi(t);let f=Yt.useRef(()=>{throw Error("Cannot call an event handler while rendering.")});if(typeof Ui==="function")Ui(()=>{f.current=t});else l(()=>{f.current=t});return Yt.useMemo(()=>(...m)=>f.current?.(...m),[])}Ca(Pr,"useEffectEvent");var Ea=Object.defineProperty,ln=(t,f)=>Ea(t,"name",{value:f,configurable:!0}),Pa=tt[" useInsertionEffect ".trim().toString()]||l;function s({prop:t,defaultProp:f,onChange:m=ln(()=>{},"onChange"),caller:h}){let[v,R,w]=Ki({defaultProp:f,onChange:m}),b=t!==void 0,E=b?t:v;if(Q){let I=tt.useRef(t!==void 0);tt.useEffect(()=>{let S=I.current;if(S!==b)console.warn(`${h} is changing from ${S?"controlled":"uncontrolled"} to ${b?"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.`);I.current=b},[b,h])}let A=tt.useCallback((I)=>{if(b){let S=Yi(I)?I(t):I;if(S!==t)w.current?.(S)}else R(I)},[b,t,R,w]);return[E,A]}ln(s,"useControllableState");function Ki({defaultProp:t,onChange:f}){let[m,h]=tt.useState(t),v=tt.useRef(m),R=tt.useRef(f);return Pa(()=>{R.current=f},[f]),tt.useEffect(()=>{if(v.current!==m)R.current?.(m),v.current=m},[m,v]),[m,h,R]}ln(Ki,"useUncontrolledState");function Yi(t){return typeof t==="function"}ln(Yi,"isFunction");var Gi=Symbol("RADIX:SYNC_STATE");function Oa(t,f,m,h){let{prop:v,defaultProp:R,onChange:w,caller:b}=f,E=v!==void 0,A=Pr(w);if(Q){let F=at.useRef(v!==void 0);at.useEffect(()=>{let B=F.current;if(B!==E)console.warn(`${b} is changing from ${B?"controlled":"uncontrolled"} to ${E?"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=E},[E,b])}let I=[{...m,state:R}];if(h)I.push(h);let[S,O]=at.useReducer((F,B)=>{if(B.type===Gi)return{...F,state:B.state};let k=t(F,B);if(E&&!Object.is(k.state,F.state))A(k.state);return k},...I),M=S.state,T=at.useRef(M);at.useEffect(()=>{if(T.current!==M){if(T.current=M,!E)A(M)}},[M,T,E]);let L=at.useMemo(()=>{if(v!==void 0)return{...S,state:v};return S},[S,v]);return at.useEffect(()=>{if(E&&!Object.is(v,S.state))O({type:Gi,state:v})},[v,S.state,E]),[L,O]}ln(Oa,"useControllableStateReducer");import*as Aa from"react";import*as Nn from"react";var _a=Object.defineProperty,_r=(t,f)=>_a(t,"name",{value:f,configurable:!0}),Or=!1;function Xi(){let[t,f]=Nn.useState(Or);return Nn.useEffect(()=>{if(!Or)Or=!0,f(!0)},[]),t}_r(Xi,"useIsHydrated");var Zi=Aa[" useSyncExternalStore ".trim().toString()];function qi(){return()=>{}}_r(qi,"subscribe");function Qi(){return Zi(qi,()=>!0,()=>!1)}_r(Qi,"useIsHydratedModern");var Ji=typeof Zi==="function"?Qi:Xi;import{jsx as Dt}from"react/jsx-runtime";var Ma=Object.defineProperty,Lt=(t,f)=>Ma(t,"name",{value:f,configurable:!0}),Ar="rovingFocusGroup.onEntryFocus",Ia={bubbles:!1,cancelable:!0},Fn="RovingFocusGroup",[Mr,ec,Ta]=y(Fn),[Da,C]=i(Fn,[Ta]),[La,Na]=Da(Fn),Fa=$e.forwardRef(Lt(function(f,m){return Dt(Mr.Provider,{scope:f.__scopeRovingFocusGroup,children:Dt(Mr.Slot,{scope:f.__scopeRovingFocusGroup,children:Dt(ka,{...f,ref:m})})})},"RovingFocusGroup")),ka=$e.forwardRef(Lt(function(f,m){let{__scopeRovingFocusGroup:h,orientation:v,loop:R=!1,dir:w,currentTabStopId:b,defaultCurrentTabStopId:E,onCurrentTabStopIdChange:A,onEntryFocus:I,preventScrollOnEntryFocus:S=!1,...O}=f,M=$e.useRef(null),T=a(m,M),L=g(w),[F,B]=s({prop:b,defaultProp:E??null,onChange:A,caller:Fn}),[k,j]=$e.useState(!1),V=u(I),H=ec(h),U=$e.useRef(!1),[Y,re]=$e.useState(0);return $e.useEffect(()=>{let Z=M.current;if(Z)return Z.addEventListener(Ar,V),()=>Z.removeEventListener(Ar,V)},[V]),Dt(La,{scope:h,orientation:v,dir:L,loop:R,currentTabStopId:F,onItemFocus:$e.useCallback((Z)=>B(Z),[B]),onItemShiftTab:$e.useCallback(()=>j(!0),[]),onFocusableItemAdd:$e.useCallback(()=>re((Z)=>Z+1),[]),onFocusableItemRemove:$e.useCallback(()=>re((Z)=>Z-1),[]),children:Dt(o.div,{tabIndex:k||Y===0?-1:0,"data-orientation":v,...O,ref:T,style:{outline:"none",...f.style},onMouseDown:r(f.onMouseDown,()=>{U.current=!0}),onFocus:r(f.onFocus,(Z)=>{let ae=!U.current;if(Z.target===Z.currentTarget&&ae&&!k){let he=new CustomEvent(Ar,Ia);if(Z.currentTarget.dispatchEvent(he),!he.defaultPrevented){let oe=H().filter((fe)=>fe.focusable),ue=oe.find((fe)=>fe.active),pe=oe.find((fe)=>fe.id===F),ge=[ue,pe,...oe].filter(Boolean).map((fe)=>fe.ref.current);Ir(ge,S)}}U.current=!1}),onBlur:r(f.onBlur,()=>j(!1))})})},"RovingFocusGroupImpl")),ja="RovingFocusGroupItem",Ba=$e.forwardRef(Lt(function(f,m){let{__scopeRovingFocusGroup:h,focusable:v=!0,active:R=!1,tabStopId:w,children:b,...E}=f,A=c(),I=w||A,S=Na(ja,h),O=S.currentTabStopId===I,M=ec(h),{onFocusableItemAdd:T,onFocusableItemRemove:L,currentTabStopId:F}=S,B=Ji();return l(()=>{if(!B||!v)return;return T(),()=>L()},[B,v,T,L]),$e.useEffect(()=>{if(B||!v)return;return T(),()=>L()},[B,v,T,L]),Dt(Mr.ItemSlot,{scope:h,id:I,focusable:v,active:R,children:Dt(o.span,{tabIndex:O?0:-1,"data-orientation":S.orientation,...E,ref:m,onMouseDown:r(f.onMouseDown,(k)=>{if(!v)k.preventDefault();else S.onItemFocus(I)}),onFocus:r(f.onFocus,()=>S.onItemFocus(I)),onKeyDown:r(f.onKeyDown,(k)=>{if(k.key==="Tab"&&k.shiftKey){S.onItemShiftTab();return}if(k.target!==k.currentTarget)return;let j=nc(k,S.orientation,S.dir);if(j!==void 0){if(k.metaKey||k.ctrlKey||k.altKey||k.shiftKey)return;k.preventDefault();let H=M().filter((U)=>U.focusable).map((U)=>U.ref.current);if(j==="last")H.reverse();else if(j==="prev"||j==="next"){if(j==="prev")H.reverse();let U=H.indexOf(k.currentTarget);H=S.loop?rc(H,U+1):H.slice(U+1)}setTimeout(()=>Ir(H))}}),children:typeof b==="function"?b({isCurrentTabStop:O,hasTabStop:F!=null}):b})})},"RovingFocusGroupItem")),Wa={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function tc(t,f){if(f!=="rtl")return t;return t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}Lt(tc,"getDirectionAwareKey");function nc(t,f,m){let h=tc(t.key,m);if(f==="vertical"&&["ArrowLeft","ArrowRight"].includes(h))return;if(f==="horizontal"&&["ArrowUp","ArrowDown"].includes(h))return;return Wa[h]}Lt(nc,"getFocusIntent");function Ir(t,f=!1){let m=document.activeElement;for(let h of t){if(h===m)return;if(h.focus({preventScroll:f}),document.activeElement!==m)return}}Lt(Ir,"focusFirst");function rc(t,f){return t.map((m,h)=>t[(f+h)%t.length])}Lt(rc,"wrapArray");var q=Fa,K=Ba;var $a=function(t){if(typeof document>"u")return null;var f=Array.isArray(t)?t[0]:t;return f.ownerDocument.body},Xt=new WeakMap,kn=new WeakMap,jn={},Tr=0,oc=function(t){return t&&(t.host||oc(t.parentNode))},za=function(t,f){return f.map(function(m){if(t.contains(m))return m;var h=oc(m);if(h&&t.contains(h))return h;return console.error("aria-hidden",m,"in not contained inside",t,". Doing nothing"),null}).filter(function(m){return Boolean(m)})},Ha=function(t,f,m,h){var v=za(f,Array.isArray(t)?t:[t]);if(!jn[m])jn[m]=new WeakMap;var R=jn[m],w=[],b=new Set,E=new Set(v),A=function(S){if(!S||b.has(S))return;b.add(S),A(S.parentNode)};v.forEach(A);var I=function(S){if(!S||E.has(S))return;Array.prototype.forEach.call(S.children,function(O){if(b.has(O))I(O);else try{var M=O.getAttribute(h),T=M!==null&&M!=="false",L=(Xt.get(O)||0)+1,F=(R.get(O)||0)+1;if(Xt.set(O,L),R.set(O,F),w.push(O),L===1&&T)kn.set(O,!0);if(F===1)O.setAttribute(m,"true");if(!T)O.setAttribute(h,"true")}catch(B){console.error("aria-hidden: cannot operate on ",O,B)}})};return I(f),b.clear(),Tr++,function(){if(w.forEach(function(S){var O=Xt.get(S)-1,M=R.get(S)-1;if(Xt.set(S,O),R.set(S,M),!O){if(!kn.has(S))S.removeAttribute(h);kn.delete(S)}if(!M)S.removeAttribute(m)}),Tr--,!Tr)Xt=new WeakMap,Xt=new WeakMap,kn=new WeakMap,jn={}}},le=function(t,f,m){if(m===void 0)m="data-aria-hidden";var h=Array.from(Array.isArray(t)?t:[t]),v=f||$a(t);if(!v)return function(){return null};return h.push.apply(h,Array.from(v.querySelectorAll("[aria-live], script"))),Ha(h,v,m,"aria-hidden")};var qe=function(){return qe=Object.assign||function(f){for(var m,h=1,v=arguments.length;h<v;h++){m=arguments[h];for(var R in m)if(Object.prototype.hasOwnProperty.call(m,R))f[R]=m[R]}return f},qe.apply(this,arguments)};function Bn(t,f){var m={};for(var h in t)if(Object.prototype.hasOwnProperty.call(t,h)&&f.indexOf(h)<0)m[h]=t[h];if(t!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var v=0,h=Object.getOwnPropertySymbols(t);v<h.length;v++)if(f.indexOf(h[v])<0&&Object.prototype.propertyIsEnumerable.call(t,h[v]))m[h[v]]=t[h[v]]}return m}function ic(t,f,m){if(m||arguments.length===2){for(var h=0,v=f.length,R;h<v;h++)if(R||!(h in f)){if(!R)R=Array.prototype.slice.call(f,0,h);R[h]=f[h]}}return t.concat(R||Array.prototype.slice.call(f))}import*as Hn from"react";import*as Ge from"react";var Nt="right-scroll-bar-position",Ft="width-before-scroll-bar",Dr="with-scroll-bars-hidden",Lr="--removed-body-scroll-bar-size";import*as Vn from"react";function Wn(t,f){if(typeof t==="function")t(f);else if(t)t.current=f;return t}import{useState as Ua}from"react";function cc(t,f){var m=Ua(function(){return{value:t,callback:f,facade:{get current(){return m.value},set current(h){var v=m.value;if(v!==h)m.value=h,m.callback(h,v)}}}})[0];return m.callback=f,m.facade}var Ga=typeof window<"u"?Vn.useLayoutEffect:Vn.useEffect,sc=new WeakMap;function Nr(t,f){var m=cc(f||null,function(h){return t.forEach(function(v){return Wn(v,h)})});return Ga(function(){var h=sc.get(m);if(h){var v=new Set(h),R=new Set(t),w=m.current;v.forEach(function(b){if(!R.has(b))Wn(b,null)}),R.forEach(function(b){if(!v.has(b))Wn(b,w)})}sc.set(m,t)},[t]),m}function Ka(t){return t}function Ya(t,f){if(f===void 0)f=Ka;var m=[],h=!1,v={read:function(){if(h)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");if(m.length)return m[m.length-1];return t},useMedium:function(R){var w=f(R,h);return m.push(w),function(){m=m.filter(function(b){return b!==w})}},assignSyncMedium:function(R){h=!0;while(m.length){var w=m;m=[],w.forEach(R)}m={push:function(b){return R(b)},filter:function(){return m}}},assignMedium:function(R){h=!0;var w=[];if(m.length){var b=m;m=[],b.forEach(R),w=m}var E=function(){var I=w;w=[],I.forEach(R)},A=function(){return Promise.resolve().then(E)};A(),m={push:function(I){w.push(I),A()},filter:function(I){return w=w.filter(I),m}}}};return v}function Fr(t){if(t===void 0)t={};var f=Ya(null);return f.options=qe({async:!0,ssr:!1},t),f}import*as ac from"react";var uc=function(t){var f=t.sideCar,m=Bn(t,["sideCar"]);if(!f)throw Error("Sidecar: please provide `sideCar` property to import the right car");var h=f.read();if(!h)throw Error("Sidecar medium not found");return ac.createElement(h,qe({},m))};uc.isSideCarExport=!0;function kr(t,f){return t.useMedium(f),uc}var $n=Fr();var jr=function(){return},fn=Ge.forwardRef(function(t,f){var m=Ge.useRef(null),h=Ge.useState({onScrollCapture:jr,onWheelCapture:jr,onTouchMoveCapture:jr}),v=h[0],R=h[1],{forwardProps:w,children:b,className:E,removeScrollBar:A,enabled:I,shards:S,sideCar:O,noRelative:M,noIsolation:T,inert:L,allowPinchZoom:F,as:B}=t,k=B===void 0?"div":B,j=t.gapMode,V=Bn(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),H=O,U=Nr([m,f]),Y=qe(qe({},V),v);return Ge.createElement(Ge.Fragment,null,I&&Ge.createElement(H,{sideCar:$n,removeScrollBar:A,shards:S,noRelative:M,noIsolation:T,inert:L,setCallbacks:R,allowPinchZoom:!!F,lockRef:m,gapMode:j}),w?Ge.cloneElement(Ge.Children.only(b),qe(qe({},Y),{ref:U})):Ge.createElement(k,qe({},Y,{className:E,ref:U}),b))});fn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};fn.classNames={fullWidth:Ft,zeroRight:Nt};import*as Fe from"react";import*as qt from"react";import*as dc from"react";var lc;var fc=function(){if(lc)return lc;if(typeof __webpack_nonce__<"u")return __webpack_nonce__;return};function Xa(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var f=fc();if(f)t.setAttribute("nonce",f);return t}function Za(t,f){if(t.styleSheet)t.styleSheet.cssText=f;else t.appendChild(document.createTextNode(f))}function qa(t){var f=document.head||document.getElementsByTagName("head")[0];f.appendChild(t)}var Br=function(){var t=0,f=null;return{add:function(m){if(t==0){if(f=Xa())Za(f,m),qa(f)}t++},remove:function(){if(t--,!t&&f)f.parentNode&&f.parentNode.removeChild(f),f=null}}};var Wr=function(){var t=Br();return function(f,m){dc.useEffect(function(){return t.add(f),function(){t.remove()}},[f&&m])}};var dn=function(){var t=Wr(),f=function(m){var{styles:h,dynamic:v}=m;return t(h,v),null};return f};var Qa={left:0,top:0,right:0,gap:0},Vr=function(t){return parseInt(t||"",10)||0},Ja=function(t){var f=window.getComputedStyle(document.body),m=f[t==="padding"?"paddingLeft":"marginLeft"],h=f[t==="padding"?"paddingTop":"marginTop"],v=f[t==="padding"?"paddingRight":"marginRight"];return[Vr(m),Vr(h),Vr(v)]},$r=function(t){if(t===void 0)t="margin";if(typeof window>"u")return Qa;var f=Ja(t),m=document.documentElement.clientWidth,h=window.innerWidth;return{left:f[0],top:f[1],right:f[2],gap:Math.max(0,h-m+f[2]-f[0])}};var eu=dn(),Zt="data-scroll-locked",tu=function(t,f,m,h){var{left:v,top:R,right:w,gap:b}=t;if(m===void 0)m="margin";return`
1
+ import{Wt,e}from"./index-fwsd4nes.js";import*as ze from"react";import*as Jr from"react";var Uc=Object.defineProperty,Zn=(t,f)=>Uc(t,"name",{value:f,configurable:!0});function Xn(t,f){if(typeof t==="function")return t(f);else if(t!==null&&t!==void 0)t.current=f}Zn(Xn,"setRef");function xe(...t){return(f)=>{let m=!1,h=t.map((v)=>{let R=Xn(v,f);if(!m&&typeof R=="function")m=!0;return R});if(m)return()=>{for(let v=0;v<h.length;v++){let R=h[v];if(typeof R=="function")R();else Xn(t[v],null)}}}}Zn(xe,"composeRefs");function a(...t){return Jr.useCallback(xe(...t),t)}Zn(a,"useComposedRefs");var Gc=Object.defineProperty,nt=(t,f)=>Gc(t,"name",{value:f,configurable:!0});function x(t){let f=ze.forwardRef((m,h)=>{let{children:v,...R}=m,w=null,b=!1,E=[];if(qn(v)&&typeof yn==="function")v=yn(v._payload);if(ze.Children.forEach(v,(A)=>{if(ro(A)){b=!0;let I=A,L="child"in I.props?I.props.child:I.props.children;if(qn(L)&&typeof yn==="function")L=yn(L._payload);w=Kc(I,L),E.push(w?.props?.children)}else E.push(A)}),w)w=ze.cloneElement(w,void 0,E);else if(!b&&ze.Children.count(v)===1&&ze.isValidElement(v))w=v;let M=w?no(w):void 0,T=a(h,M);if(!w){if(v||v===0)throw Error(b?Zc(t):Xc(t));return v}let S=to(R,w.props??{});if(w.type!==ze.Fragment)S.ref=h?T:M;return ze.cloneElement(w,S)});return f.displayName=`${t}.Slot`,f}nt(x,"createSlot");var P=x("Slot"),eo=Symbol.for("radix.slottable");function lr(t){let f=nt((m)=>("child"in m)?m.children(m.child):m.children,"Slottable");return f.displayName=`${t}.Slottable`,f.__radixId=eo,f}nt(lr,"createSlottable");var Kc=nt((t,f)=>{if("child"in t.props){let m=t.props.child;if(!ze.isValidElement(m))return null;return ze.cloneElement(m,void 0,t.props.children(m.props.children))}return ze.isValidElement(f)?f:null},"getSlottableElementFromSlottable");function to(t,f){let m={...f};for(let h in f){let v=t[h],R=f[h];if(/^on[A-Z]/.test(h)){if(v&&R)m[h]=(...b)=>{let E=R(...b);return v(...b),E};else if(v)m[h]=v}else if(h==="style")m[h]={...v,...R};else if(h==="className")m[h]=[v,R].filter(Boolean).join(" ")}return{...t,...m}}nt(to,"mergeProps");function no(t){let f=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,m=f&&"isReactWarning"in f&&f.isReactWarning;if(m)return t.ref;if(f=Object.getOwnPropertyDescriptor(t,"ref")?.get,m=f&&"isReactWarning"in f&&f.isReactWarning,m)return t.props.ref;return t.props.ref||t.ref}nt(no,"getElementRef");function ro(t){return ze.isValidElement(t)&&typeof t.type==="function"&&"__radixId"in t.type&&t.type.__radixId===eo}nt(ro,"isSlottable");var Yc=Symbol.for("react.lazy");function qn(t){return t!=null&&typeof t==="object"&&"$$typeof"in t&&t.$$typeof===Yc&&"_payload"in t&&oo(t._payload)}nt(qn,"isLazyComponent");function oo(t){return typeof t==="object"&&t!==null&&"then"in t}nt(oo,"isPromiseLike");var Xc=nt((t)=>`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),Zc=nt((t)=>`${t} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),yn=ze[" use ".trim().toString()];var io=(t)=>typeof t==="boolean"?`${t}`:t===0?"0":t,co=Wt,p=(t,f)=>(m)=>{var h;if((f===null||f===void 0?void 0:f.variants)==null)return co(t,m===null||m===void 0?void 0:m.class,m===null||m===void 0?void 0:m.className);let{variants:v,defaultVariants:R}=f,w=Object.keys(v).map((M)=>{let T=m===null||m===void 0?void 0:m[M],S=R===null||R===void 0?void 0:R[M];if(T===null)return null;let A=io(T)||io(S);return v[M][A]}),b=m&&Object.entries(m).reduce((M,T)=>{let[S,A]=T;if(A===void 0)return M;return M[S]=A,M},{}),E=f===null||f===void 0?void 0:(h=f.compoundVariants)===null||h===void 0?void 0:h.reduce((M,T)=>{let{class:S,className:A,...I}=T;return Object.entries(I).every((L)=>{let[N,F]=L;return Array.isArray(F)?F.includes({...R,...b}[N]):{...R,...b}[N]===F})?[...M,S,A]:M},[]);return co(t,w,E,m===null||m===void 0?void 0:m.class,m===null||m===void 0?void 0:m.className)};import{jsx as qc}from"react/jsx-runtime";var z=p("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",{defaultVariants:{size:"default",variant:"default"},variants:{size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",icon:"size-9",lg:"h-10 rounded-md px-6 has-[>svg]:px-4",sm:"h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5"},variant:{default:"bg-primary !text-primary-foreground shadow-xs hover:bg-primary/90",destructive:"bg-destructive text-white shadow-xs hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",ghost:"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",link:"text-primary underline-offset-4 hover:underline",outline:"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",secondary:"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80"}}}),n=({className:t,variant:f,size:m,asChild:h=!1,...v})=>qc(h?P:"button",{"data-slot":"button",className:e(z({className:t,size:m,variant:f})),...v});var Q=!1;var Qc=Object.defineProperty,Vt=(t,f)=>Qc(t,"name",{value:f,configurable:!0}),so=!!(typeof window<"u"&&window.document&&window.document.createElement);function r(t,f,{checkForDefaultPrevented:m=!0}={}){return Vt(function(v){if(t?.(v),m===!1||!v||!v.defaultPrevented)return f?.(v)},"handleEvent")}Vt(r,"composeEventHandlers");function Jc(t){if(!so)throw Error("Cannot access window outside of the DOM");return t?.ownerDocument?.defaultView??window}Vt(Jc,"getOwnerWindow");function Qn(t){if(!so)throw Error("Cannot access document outside of the DOM");return t?.ownerDocument??document}Vt(Qn,"getOwnerDocument");function ao(t,f=!1){let{activeElement:m}=Qn(t);if(!m?.nodeName)return null;if(uo(m)&&m.contentDocument)return ao(m.contentDocument.body,f);if(f){let h=m.getAttribute("aria-activedescendant");if(h){let v=Qn(m).getElementById(h);if(v)return v}}return m}Vt(ao,"getActiveElement");function uo(t){return t.tagName==="IFRAME"}Vt(uo,"isFrame");import*as Je from"react";import{jsx as lo}from"react/jsx-runtime";var es=Object.defineProperty,Qe=(t,f)=>es(t,"name",{value:f,configurable:!0});function ts(t,f){let m=Je.createContext(f);m.displayName=t+"Context";let h=Qe((R)=>{let{children:w,...b}=R,E=Je.useMemo(()=>b,Object.values(b));return lo(m.Provider,{value:E,children:w})},"Provider");h.displayName=t+"Provider";function v(R,w={}){let{optional:b=!1}=w,E=Je.useContext(m);if(E)return E;if(f!==void 0)return f;if(b)return;throw Error(`\`${R}\` must be used within \`${t}\``)}return Qe(v,"useContext"),[h,v]}Qe(ts,"createContext");function i(t,f=[]){let m=[];function h(R,w){let b=Je.createContext(w);b.displayName=R+"Context";let E=m.length;m=[...m,w];let M=Qe((S)=>{let{scope:A,children:I,...L}=S,N=A?.[t]?.[E]||b,F=Je.useMemo(()=>L,Object.values(L));return lo(N.Provider,{value:F,children:I})},"Provider");M.displayName=R+"Provider";function T(S,A,I={}){let{optional:L=!1}=I,N=A?.[t]?.[E]||b,F=Je.useContext(N);if(F)return F;if(w!==void 0)return w;if(L)return;throw Error(`\`${S}\` must be used within \`${R}\``)}return Qe(T,"useContext"),[M,T]}Qe(h,"createContext");let v=Qe(()=>{let R=m.map((w)=>Je.createContext(w));return Qe(function(b){let E=b?.[t]||R;return Je.useMemo(()=>({[`__scope${t}`]:{...b,[t]:E}}),[b,E])},"useScope")},"createScope");return v.scopeName=t,[h,fo(v,...f)]}Qe(i,"createContextScope");function fo(...t){let f=t[0];if(t.length===1)return f;let m=Qe(()=>{let h=t.map((v)=>({useScope:v(),scopeName:v.scopeName}));return Qe(function(R){let w=h.reduce((b,{useScope:E,scopeName:M})=>{let S=E(R)[`__scope${M}`];return{...b,...S}},{});return Je.useMemo(()=>({[`__scope${f.scopeName}`]:w}),[w])},"useComposedScopes")},"createScope");return m.scopeName=f.scopeName,m}Qe(fo,"composeContextScopes");import*as mo from"react";import*as po from"react-dom";import{jsx as os}from"react/jsx-runtime";var ns=Object.defineProperty,rs=(t,f)=>ns(t,"name",{value:f,configurable:!0}),is=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],o=is.reduce((t,f)=>{let m=x(`Primitive.${f}`),h=mo.forwardRef((v,R)=>{let{asChild:w,...b}=v,E=w?m:f;if(typeof window<"u")window[Symbol.for("radix-ui")]=!0;return os(E,{...b,ref:R})});return h.displayName=`Primitive.${f}`,{...t,[f]:h}},{});function be(t,f){if(t)po.flushSync(()=>t.dispatchEvent(f))}rs(be,"dispatchDiscreteCustomEvent");import*as X from"react";import*as rt from"react";import{jsx as Jn}from"react/jsx-runtime";import*as Ze from"react";import{jsx as $t}from"react/jsx-runtime";var cs=Object.defineProperty,We=(t,f)=>cs(t,"name",{value:f,configurable:!0});function y(t){let f=t+"CollectionProvider",[m,h]=i(f),[v,R]=m(f,{collectionRef:{current:null},itemMap:new Map}),w=We((N)=>{let{scope:F,children:V}=N,k=rt.useRef(null),B=rt.useRef(new Map).current;return Jn(v,{scope:F,itemMap:B,collectionRef:k,children:V})},"CollectionProvider");w.displayName=f;let b=t+"CollectionSlot",E=x(b),M=rt.forwardRef((N,F)=>{let{scope:V,children:k}=N,B=R(b,V),H=a(F,B.collectionRef);return Jn(E,{ref:H,children:k})});M.displayName=b;let T=t+"CollectionItemSlot",S="data-radix-collection-item",A=x(T),I=rt.forwardRef((N,F)=>{let{scope:V,children:k,...B}=N,H=rt.useRef(null),U=a(F,H),G=R(T,V);return rt.useEffect(()=>(G.itemMap.set(H,{ref:H,...B}),()=>void G.itemMap.delete(H))),Jn(A,{...{[S]:""},ref:U,children:k})});I.displayName=T;function L(N){let F=R(t+"CollectionConsumer",N);return rt.useCallback(()=>{let k=F.collectionRef.current;if(!k)return[];let B=Array.from(k.querySelectorAll(`[${S}]`));return Array.from(F.itemMap.values()).sort((G,Y)=>B.indexOf(G.ref.current)-B.indexOf(Y.ref.current))},[F.collectionRef,F.itemMap])}return We(L,"useCollection"),[{Provider:w,Slot:M,ItemSlot:I},L,h]}We(y,"createCollection");var ho=new WeakMap,er=class t extends Map{static{We(this,"OrderedDict")}#e;constructor(f){super(f);this.#e=[...super.keys()],ho.set(this,!0)}set(f,m){if(ho.get(this))if(this.has(f))this.#e[this.#e.indexOf(f)]=f;else this.#e.push(f);return super.set(f,m),this}insert(f,m,h){let v=this.has(m),R=this.#e.length,w=nr(f),b=w>=0?w:R+w,E=b<0||b>=R?-1:b;if(E===this.size||v&&E===this.size-1||E===-1)return this.set(m,h),this;let M=this.size+(v?0:1);if(w<0)b++;let T=[...this.#e],S,A=!1;for(let I=b;I<M;I++)if(b===I){let L=T[I];if(T[I]===m)L=T[I+1];if(v)this.delete(m);S=this.get(L),this.set(m,h)}else{if(!A&&T[I-1]===m)A=!0;let L=T[A?I:I-1],N=S;S=this.get(L),this.delete(L),this.set(L,N)}return this}with(f,m,h){let v=new t(this);return v.insert(f,m,h),v}before(f){let m=this.#e.indexOf(f)-1;if(m<0)return;return this.entryAt(m)}setBefore(f,m,h){let v=this.#e.indexOf(f);if(v===-1)return this;return this.insert(v,m,h)}after(f){let m=this.#e.indexOf(f);if(m=m===-1||m===this.size-1?-1:m+1,m===-1)return;return this.entryAt(m)}setAfter(f,m,h){let v=this.#e.indexOf(f);if(v===-1)return this;return this.insert(v+1,m,h)}first(){return this.entryAt(0)}last(){return this.entryAt(-1)}clear(){return this.#e=[],super.clear()}delete(f){let m=super.delete(f);if(m)this.#e.splice(this.#e.indexOf(f),1);return m}deleteAt(f){let m=this.keyAt(f);if(m!==void 0)return this.delete(m);return!1}at(f){let m=Rn(this.#e,f);if(m!==void 0)return this.get(m)}entryAt(f){let m=Rn(this.#e,f);if(m!==void 0)return[m,this.get(m)]}indexOf(f){return this.#e.indexOf(f)}keyAt(f){return Rn(this.#e,f)}from(f,m){let h=this.indexOf(f);if(h===-1)return;let v=h+m;if(v<0)v=0;if(v>=this.size)v=this.size-1;return this.at(v)}keyFrom(f,m){let h=this.indexOf(f);if(h===-1)return;let v=h+m;if(v<0)v=0;if(v>=this.size)v=this.size-1;return this.keyAt(v)}find(f,m){let h=0;for(let v of this){if(Reflect.apply(f,m,[v,h,this]))return v;h++}return}findIndex(f,m){let h=0;for(let v of this){if(Reflect.apply(f,m,[v,h,this]))return h;h++}return-1}filter(f,m){let h=[],v=0;for(let R of this){if(Reflect.apply(f,m,[R,v,this]))h.push(R);v++}return new t(h)}map(f,m){let h=[],v=0;for(let R of this)h.push([R[0],Reflect.apply(f,m,[R,v,this])]),v++;return new t(h)}reduce(...f){let[m,h]=f,v=0,R=h??this.at(0);for(let w of this){if(v===0&&f.length===1)R=w;else R=Reflect.apply(m,this,[R,w,v,this]);v++}return R}reduceRight(...f){let[m,h]=f,v=h??this.at(-1);for(let R=this.size-1;R>=0;R--){let w=this.at(R);if(R===this.size-1&&f.length===1)v=w;else v=Reflect.apply(m,this,[v,w,R,this])}return v}toSorted(f){let m=[...this.entries()].sort(f);return new t(m)}toReversed(){let f=new t;for(let m=this.size-1;m>=0;m--){let h=this.keyAt(m),v=this.get(h);f.set(h,v)}return f}toSpliced(...f){let m=[...this.entries()];return m.splice(...f),new t(m)}slice(f,m){let h=new t,v=this.size-1;if(f===void 0)return h;if(f<0)f=f+this.size;if(m!==void 0&&m>0)v=m-1;for(let R=f;R<=v;R++){let w=this.keyAt(R),b=this.get(w);h.set(w,b)}return h}every(f,m){let h=0;for(let v of this){if(!Reflect.apply(f,m,[v,h,this]))return!1;h++}return!0}some(f,m){let h=0;for(let v of this){if(Reflect.apply(f,m,[v,h,this]))return!0;h++}return!1}};function Rn(t,f){if("at"in Array.prototype)return Array.prototype.at.call(t,f);let m=vo(t,f);return m===-1?void 0:t[m]}We(Rn,"at");function vo(t,f){let m=t.length,h=nr(f),v=h>=0?h:m+h;return v<0||v>=m?-1:v}We(vo,"toSafeIndex");function nr(t){return t!==t||t===0?0:Math.trunc(t)}We(nr,"toSafeInteger");function ss(t){let f=t+"CollectionProvider",[m,h]=i(f),[v,R]=m(f,{collectionElement:null,collectionRef:{current:null},collectionRefObject:{current:null},itemMap:new er,setItemMap:We(()=>{return},"setItemMap")}),w=We(({state:B,...H})=>B?$t(E,{...H,state:B}):$t(b,{...H}),"CollectionProvider");w.displayName=f;let b=We((B)=>{let H=F();return $t(E,{...B,state:H})},"CollectionInit");b.displayName=f+"Init";let E=We((B)=>{let{scope:H,children:U,state:G}=B,Y=Ze.useRef(null),[re,Z]=Ze.useState(null),ae=a(Y,Z),[he,oe]=G;return Ze.useEffect(()=>{if(!re)return;let ue=Ro(()=>{});return ue.observe(re,{childList:!0,subtree:!0}),()=>{ue.disconnect()}},[re]),$t(v,{scope:H,itemMap:he,setItemMap:oe,collectionRef:ae,collectionRefObject:Y,collectionElement:re,children:U})},"CollectionProviderImpl");E.displayName=f+"Impl";let M=t+"CollectionSlot",T=x(M),S=Ze.forwardRef((B,H)=>{let{scope:U,children:G}=B,Y=R(M,U),re=a(H,Y.collectionRef);return $t(T,{ref:re,children:G})});S.displayName=M;let A=t+"CollectionItemSlot",I="data-radix-collection-item",L=x(A),N=Ze.forwardRef((B,H)=>{let{scope:U,children:G,...Y}=B,re=Ze.useRef(null),[Z,ae]=Ze.useState(null),he=a(H,re,ae),oe=R(A,U),{setItemMap:ue}=oe,pe=Ze.useRef(Y);if(!go(pe.current,Y))pe.current=Y;let je=pe.current;return Ze.useEffect(()=>{let ge=je;return ue((fe)=>{if(!Z)return fe;if(!fe.has(Z))return fe.set(Z,{...ge,element:Z}),fe.toSorted(tr);return fe.set(Z,{...ge,element:Z}).toSorted(tr)}),()=>{ue((fe)=>{if(!Z||!fe.has(Z))return fe;return fe.delete(Z),new er(fe)})}},[Z,je,ue]),$t(L,{...{[I]:""},ref:he,children:G})});N.displayName=A;function F(){return Ze.useState(new er)}We(F,"useInitCollection");function V(B){let{itemMap:H}=R(t+"CollectionConsumer",B);return H}return We(V,"useCollection"),[{Provider:w,Slot:S,ItemSlot:N},{createCollectionScope:h,useCollection:V,useInitCollection:F}]}We(ss,"createCollection");function go(t,f){if(t===f)return!0;if(typeof t!=="object"||typeof f!=="object")return!1;if(t==null||f==null)return!1;let m=Object.keys(t),h=Object.keys(f);if(m.length!==h.length)return!1;for(let v of m){if(!Object.prototype.hasOwnProperty.call(f,v))return!1;if(t[v]!==f[v])return!1}return!0}We(go,"shallowEqual");function yo(t,f){return!!(f.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING)}We(yo,"isElementPreceding");function tr(t,f){return!t[1].element||!f[1].element?0:yo(t[1].element,f[1].element)?-1:1}We(tr,"sortByDocumentPosition");function Ro(t){return new MutationObserver((m)=>{for(let h of m)if(h.type==="childList"){t();return}})}We(Ro,"getChildListObserver");import*as wn from"react";import{jsx as yl}from"react/jsx-runtime";var as=Object.defineProperty,us=(t,f)=>as(t,"name",{value:f,configurable:!0}),ls=wn.createContext(void 0);function g(t){let f=wn.useContext(ls);return t||f||"ltr"}us(g,"useDirection");import*as ve from"react";import*as zt from"react";var fs=Object.defineProperty,ds=(t,f)=>fs(t,"name",{value:f,configurable:!0});function u(t){let f=zt.useRef(t);return zt.useEffect(()=>{f.current=t}),zt.useMemo(()=>(...m)=>f.current?.(...m),[])}ds(u,"useCallbackRef");import{jsx as ps}from"react/jsx-runtime";var ms=Object.defineProperty,Ve=(t,f)=>ms(t,"name",{value:f,configurable:!0}),rr="dismissableLayer.update",hs="dismissableLayer.pointerDownOutside",vs="dismissableLayer.focusOutside",wo,bo=ve.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),D=ve.forwardRef(Ve(function(f,m){let{disableOutsidePointerEvents:h=!1,deferPointerDownOutside:v=!1,onEscapeKeyDown:R,onPointerDownOutside:w,onFocusOutside:b,onInteractOutside:E,onDismiss:M,...T}=f,S=ve.useContext(bo),[A,I]=ve.useState(null),L=A?.ownerDocument??globalThis?.document,[,N]=ve.useState({}),F=a(m,I),V=Array.from(S.layers),[k]=[...S.layersWithOutsidePointerEventsDisabled].slice(-1),B=k?V.indexOf(k):-1,H=A?V.indexOf(A):-1,U=S.layersWithOutsidePointerEventsDisabled.size>0,G=H>=B,Y=ve.useRef(!1),re=xo((oe)=>{if(w?.(oe),E?.(oe),!oe.defaultPrevented)M?.()},{ownerDocument:L,deferPointerDownOutside:v,isDeferredPointerDownOutsideRef:Y,dismissableSurfaces:S.dismissableSurfaces,shouldHandlePointerDownOutside:ve.useCallback((oe)=>{if(!(oe instanceof Node))return!1;let ue=[...S.branches].some((pe)=>pe.contains(oe));return G&&!ue},[S.branches,G])}),Z=So((oe)=>{if(v&&Y.current)return;let ue=oe.target;if([...S.branches].some((je)=>je.contains(ue)))return;if(b?.(oe),E?.(oe),!oe.defaultPrevented)M?.()},L),ae=A?H===V.length-1:!1,he=u((oe)=>{if(oe.key!=="Escape")return;if(R?.(oe),!oe.defaultPrevented&&M)oe.preventDefault(),M()});return ve.useEffect(()=>{if(!ae)return;return L.addEventListener("keydown",he,{capture:!0}),()=>L.removeEventListener("keydown",he,{capture:!0})},[L,ae,he]),ve.useEffect(()=>{if(!A)return;if(h){if(S.layersWithOutsidePointerEventsDisabled.size===0)wo=L.body.style.pointerEvents,L.body.style.pointerEvents="none";S.layersWithOutsidePointerEventsDisabled.add(A)}return S.layers.add(A),or(),()=>{if(h){if(S.layersWithOutsidePointerEventsDisabled.delete(A),S.layersWithOutsidePointerEventsDisabled.size===0)L.body.style.pointerEvents=wo}}},[A,L,h,S]),ve.useEffect(()=>()=>{if(!A)return;S.layers.delete(A),S.layersWithOutsidePointerEventsDisabled.delete(A),or()},[A,S]),ve.useEffect(()=>{let oe=Ve(()=>N({}),"handleUpdate");return document.addEventListener(rr,oe),()=>document.removeEventListener(rr,oe)},[]),ps(o.div,{...T,ref:F,style:{pointerEvents:U?G?"auto":"none":void 0,...f.style},onFocusCapture:r(f.onFocusCapture,Z.onFocusCapture),onBlurCapture:r(f.onBlurCapture,Z.onBlurCapture),onPointerDownCapture:r(f.onPointerDownCapture,re.onPointerDownCapture)})},"DismissableLayer"));function cr(){let t=ve.useContext(bo),[f,m]=ve.useState(null);return ve.useEffect(()=>{if(!f)return;return t.dismissableSurfaces.add(f),()=>{t.dismissableSurfaces.delete(f)}},[f,t.dismissableSurfaces]),m}Ve(cr,"useDismissableLayerSurface");var gs=Ve(()=>!0,"IS_TRUE");function xo(t,f){let{ownerDocument:m=globalThis?.document,deferPointerDownOutside:h=!1,isDeferredPointerDownOutsideRef:v,dismissableSurfaces:R,shouldHandlePointerDownOutside:w=gs}=f,b=u(t),E=ve.useRef(!1),M=ve.useRef(!1),T=ve.useRef(new Map),S=ve.useRef(()=>{});return ve.useEffect(()=>{function A(){M.current=!1,v.current=!1,T.current.clear()}Ve(A,"resetOutsideInteraction");function I(){return Array.from(T.current.values()).some(Boolean)}Ve(I,"isOutsideInteractionIntercepted");function L(B){if(!M.current)return;let H=B.target;if(!(H instanceof Node&&[...R].some((G)=>G.contains(H))))T.current.set(B.type,!0);if(B.type==="click")window.setTimeout(()=>{if(M.current)S.current()},0)}Ve(L,"handleInteractionCapture");function N(B){if(M.current)T.current.set(B.type,!1)}Ve(N,"handleInteractionBubble");let F=Ve((B)=>{if(B.target&&!E.current){let U=function(){m.removeEventListener("click",S.current);let Y=I();if(A(),!Y)ir(hs,b,G,{discrete:!0})};var H=U;if(Ve(U,"handleAndDispatchPointerDownOutsideEvent"),!w(B.target)){m.removeEventListener("click",S.current),A(),E.current=!1;return}let G={originalEvent:B};if(M.current=!0,v.current=h&&B.button===0,T.current.clear(),!h||B.button!==0)U();else m.removeEventListener("click",S.current),S.current=U,m.addEventListener("click",S.current,{once:!0})}else m.removeEventListener("click",S.current),A();E.current=!1},"handlePointerDown"),V=["pointerup","mousedown","mouseup","touchstart","touchend","click"];for(let B of V)m.addEventListener(B,L,!0),m.addEventListener(B,N);let k=window.setTimeout(()=>{m.addEventListener("pointerdown",F)},0);return()=>{window.clearTimeout(k),m.removeEventListener("pointerdown",F),m.removeEventListener("click",S.current);for(let B of V)m.removeEventListener(B,L,!0),m.removeEventListener(B,N)}},[m,b,h,v,R,w]),{onPointerDownCapture:Ve(()=>E.current=!0,"onPointerDownCapture")}}Ve(xo,"usePointerDownOutside");function So(t,f=globalThis?.document){let m=u(t),h=ve.useRef(!1);return ve.useEffect(()=>{let v=Ve((R)=>{if(R.target&&!h.current)ir(vs,m,{originalEvent:R},{discrete:!1})},"handleFocus");return f.addEventListener("focusin",v),()=>f.removeEventListener("focusin",v)},[f,m]),{onFocusCapture:Ve(()=>h.current=!0,"onFocusCapture"),onBlurCapture:Ve(()=>h.current=!1,"onBlurCapture")}}Ve(So,"useFocusOutside");function or(){let t=new CustomEvent(rr);document.dispatchEvent(t)}Ve(or,"dispatchUpdate");function ir(t,f,m,{discrete:h}){let v=m.originalEvent.target,R=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:m});if(f)v.addEventListener(t,f,{once:!0});if(h)be(v,R);else v.dispatchEvent(R)}Ve(ir,"handleAndDispatchCustomEvent");import*as Co from"react";var ys=Object.defineProperty,ar=(t,f)=>ys(t,"name",{value:f,configurable:!0}),bn=0,Ht=null;function Rs(t){return W(),t.children}ar(Rs,"FocusGuards");function W(){Co.useEffect(()=>{if(!Ht)Ht={start:sr(),end:sr()};let{start:t,end:f}=Ht;if(document.body.firstElementChild!==t)document.body.insertAdjacentElement("afterbegin",t);if(document.body.lastElementChild!==f)document.body.insertAdjacentElement("beforeend",f);return bn++,()=>{if(bn===1)Ht?.start.remove(),Ht?.end.remove(),Ht=null;bn=Math.max(0,bn-1)}},[])}ar(W,"useFocusGuards");function sr(){let t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}ar(sr,"createFocusGuard");import*as et from"react";import{jsx as bs}from"react/jsx-runtime";var ws=Object.defineProperty,Ye=(t,f)=>ws(t,"name",{value:f,configurable:!0}),ur="focusScope.autoFocusOnMount",fr="focusScope.autoFocusOnUnmount",Eo={bubbles:!1,cancelable:!0},ne=et.forwardRef(Ye(function(f,m){let{loop:h=!1,trapped:v=!1,onMountAutoFocus:R,onUnmountAutoFocus:w,...b}=f,[E,M]=et.useState(null),T=u(R),S=u(w),A=et.useRef(null),I=a(m,M),L=et.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;et.useEffect(()=>{if(v){let B=function(Y){if(L.paused||!E)return;let re=Y.target;if(E.contains(re))A.current=re;else vt(A.current,{select:!0})},H=function(Y){if(L.paused||!E)return;let re=Y.relatedTarget;if(re===null)return;if(!E.contains(re))vt(A.current,{select:!0})},U=function(Y){if(document.activeElement!==document.body)return;for(let Z of Y)if(Z.removedNodes.length>0)vt(E)};var F=B,V=H,k=U;Ye(B,"handleFocusIn"),Ye(H,"handleFocusOut"),Ye(U,"handleMutations"),document.addEventListener("focusin",B),document.addEventListener("focusout",H);let G=new MutationObserver(U);if(E)G.observe(E,{childList:!0,subtree:!0});return()=>{document.removeEventListener("focusin",B),document.removeEventListener("focusout",H),G.disconnect()}}},[v,E,L.paused]),et.useEffect(()=>{if(E){Po.add(L);let F=document.activeElement;if(!E.contains(F)){let k=new CustomEvent(ur,Eo);if(E.addEventListener(ur,T),E.dispatchEvent(k),!k.defaultPrevented){if(Oo(To(pr(E)),{select:!0}),document.activeElement===F)vt(E)}}return()=>{E.removeEventListener(ur,T),setTimeout(()=>{let k=new CustomEvent(fr,Eo);if(E.addEventListener(fr,S),E.dispatchEvent(k),!k.defaultPrevented)vt(F??document.body,{select:!0});E.removeEventListener(fr,S),Po.remove(L)},0)}}},[E,T,S,L]);let N=et.useCallback((F)=>{if(!h&&!v)return;if(L.paused)return;let V=F.key==="Tab"&&!F.altKey&&!F.ctrlKey&&!F.metaKey,k=document.activeElement;if(V&&k){let B=F.currentTarget,[H,U]=_o(B);if(!(H&&U)){if(k===B)F.preventDefault()}else if(!F.shiftKey&&k===U){if(F.preventDefault(),h)vt(H,{select:!0})}else if(F.shiftKey&&k===H){if(F.preventDefault(),h)vt(U,{select:!0})}}},[h,v,L.paused]);return bs(o.div,{tabIndex:-1,...b,ref:I,onKeyDown:N})},"FocusScope"));function Oo(t,{select:f=!1}={}){let m=document.activeElement;for(let h of t)if(vt(h,{select:f}),document.activeElement!==m)return}Ye(Oo,"focusFirst");function _o(t){let f=pr(t),m=dr(f,t),h=dr(f.reverse(),t);return[m,h]}Ye(_o,"getTabbableEdges");function pr(t){let f=[],m=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:Ye((h)=>{let v=h.tagName==="INPUT"&&h.type==="hidden";if(h.disabled||h.hidden||v)return NodeFilter.FILTER_SKIP;return h.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},"acceptNode")});while(m.nextNode())f.push(m.currentNode);return f}Ye(pr,"getTabbableCandidates");function dr(t,f){let m=typeof f.checkVisibility==="function"&&f.checkVisibility({checkVisibilityCSS:!0});for(let h of t)if(!(m?!h.checkVisibility({checkVisibilityCSS:!0}):Ao(h,{upTo:f})))return h}Ye(dr,"findVisible");function Ao(t,{upTo:f}){if(getComputedStyle(t).visibility==="hidden")return!0;while(t){if(f!==void 0&&t===f)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}Ye(Ao,"isHidden");function Mo(t){return t instanceof HTMLInputElement&&"select"in t}Ye(Mo,"isSelectableInput");function vt(t,{select:f=!1}={}){if(t&&t.focus){let m=document.activeElement;if(t.focus({preventScroll:!0}),t!==m&&Mo(t)&&f)t.select()}}Ye(vt,"focus");var Po=Io();function Io(){let t=[];return{add(f){let m=t[0];if(f!==m)m?.pause();t=mr(t,f),t.unshift(f)},remove(f){t=mr(t,f),t[0]?.resume()}}}Ye(Io,"createFocusScopesStack");function mr(t,f){let m=[...t],h=m.indexOf(f);if(h!==-1)m.splice(h,1);return m}Ye(mr,"arrayRemove");function To(t){return t.filter((f)=>f.tagName!=="A")}Ye(To,"removeLinks");import*as hr from"react";import*as Do from"react";var l=globalThis?.document?Do.useLayoutEffect:()=>{};var xs=Object.defineProperty,Ss=(t,f)=>xs(t,"name",{value:f,configurable:!0}),Cs=hr[" useId ".trim().toString()]||(()=>{return}),Es=0;function c(t){let[f,m]=hr.useState(Cs());return l(()=>{if(!t)m((h)=>h??String(Es++))},[t]),t||(f?`radix-${f}`:"")}Ss(c,"useId");import*as He from"react";var Fo=["top","right","bottom","left"];var{min:ft,max:ot,round:on,floor:cn}=Math,dt=(t)=>({x:t,y:t}),Ps={left:"right",right:"left",bottom:"top",top:"bottom"};function vr(t,f,m){return ot(t,ft(f,m))}function mt(t,f){return typeof t==="function"?t(f):t}function gt(t){return t.split("-")[0]}function Pt(t){return t.split("-")[1]}function Sn(t){return t==="x"?"y":"x"}function Cn(t){return t==="y"?"height":"width"}function it(t){let f=t[0];return f==="t"||f==="b"?"y":"x"}function En(t){return Sn(it(t))}function ko(t,f,m){if(m===void 0)m=!1;let h=Pt(t),v=En(t),R=Cn(v),w=v==="x"?h===(m?"end":"start")?"right":"left":h==="start"?"bottom":"top";if(f.reference[R]>f.floating[R])w=rn(w);return[w,rn(w)]}function jo(t){let f=rn(t);return[xn(t),f,xn(f)]}function xn(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}var Lo=["left","right"],No=["right","left"],Os=["top","bottom"],_s=["bottom","top"];function As(t,f,m){switch(t){case"top":case"bottom":if(m)return f?No:Lo;return f?Lo:No;case"left":case"right":return f?Os:_s;default:return[]}}function Bo(t,f,m,h){let v=Pt(t),R=As(gt(t),m==="start",h);if(v){if(R=R.map((w)=>w+"-"+v),f)R=R.concat(R.map(xn))}return R}function rn(t){let f=gt(t);return Ps[f]+t.slice(f.length)}function Ms(t){var f,m,h,v;return{top:(f=t.top)!=null?f:0,right:(m=t.right)!=null?m:0,bottom:(h=t.bottom)!=null?h:0,left:(v=t.left)!=null?v:0}}function gr(t){return typeof t!=="number"?Ms(t):{top:t,right:t,bottom:t,left:t}}function Ot(t){let{x:f,y:m,width:h,height:v}=t;return{width:h,height:v,top:m,left:f,right:f+h,bottom:m+v,x:f,y:m}}function Wo(t,f,m){let{reference:h,floating:v}=t,R=it(f),w=En(f),b=Cn(w),E=gt(f),M=R==="y",T=h.x+h.width/2-v.width/2,S=h.y+h.height/2-v.height/2,A=h[b]/2-v[b]/2,I;switch(E){case"top":I={x:T,y:h.y-v.height};break;case"bottom":I={x:T,y:h.y+h.height};break;case"right":I={x:h.x+h.width,y:S};break;case"left":I={x:h.x-v.width,y:S};break;default:I={x:h.x,y:h.y}}let L=Pt(f);if(L)I[w]+=A*(L==="end"?1:-1)*(m&&M?-1:1);return I}async function zo(t,f){var m;if(f===void 0)f={};let{x:h,y:v,platform:R,rects:w,elements:b,strategy:E}=t,{boundary:M="clippingAncestors",rootBoundary:T="viewport",elementContext:S="floating",altBoundary:A=!1,padding:I=0}=mt(f,t),L=gr(I),F=b[A?S==="floating"?"reference":"floating":S],V=Ot(await R.getClippingRect({element:((m=await(R.isElement==null?void 0:R.isElement(F)))!=null?m:!0)?F:F.contextElement||await(R.getDocumentElement==null?void 0:R.getDocumentElement(b.floating)),boundary:M,rootBoundary:T,strategy:E})),k=S==="floating"?{x:h,y:v,width:w.floating.width,height:w.floating.height}:w.reference,B=await(R.getOffsetParent==null?void 0:R.getOffsetParent(b.floating)),H=await(R.isElement==null?void 0:R.isElement(B))&&await(R.getScale==null?void 0:R.getScale(B))||{x:1,y:1},U=Ot(R.convertOffsetParentRelativeRectToViewportRelativeRect?await R.convertOffsetParentRelativeRectToViewportRelativeRect({elements:b,rect:k,offsetParent:B,strategy:E}):k);return{top:(V.top-U.top+L.top)/H.y,bottom:(U.bottom-V.bottom+L.bottom)/H.y,left:(V.left-U.left+L.left)/H.x,right:(U.right-V.right+L.right)/H.x}}var Is=50,Ho=async(t,f,m)=>{let{placement:h="bottom",strategy:v="absolute",middleware:R=[],platform:w}=m,b=w.detectOverflow?w:{...w,detectOverflow:zo},E=await(w.isRTL==null?void 0:w.isRTL(f)),M=await w.getElementRects({reference:t,floating:f,strategy:v}),{x:T,y:S}=Wo(M,h,E),A=h,I=0,L={};for(let N=0;N<R.length;N++){let F=R[N];if(!F)continue;let{name:V,fn:k}=F,{x:B,y:H,data:U,reset:G}=await k({x:T,y:S,initialPlacement:h,placement:A,strategy:v,middlewareData:L,rects:M,platform:b,elements:{reference:t,floating:f}});if(T=B!=null?B:T,S=H!=null?H:S,L[V]={...L[V],...U},G&&I<Is){if(I++,typeof G==="object"){if(G.placement)A=G.placement;if(G.rects)M=G.rects===!0?await w.getElementRects({reference:t,floating:f,strategy:v}):G.rects;({x:T,y:S}=Wo(M,A,E))}N=-1}}return{x:T,y:S,placement:A,strategy:v,middlewareData:L}},Uo=(t)=>({name:"arrow",options:t,async fn(f){let{x:m,y:h,placement:v,rects:R,platform:w,elements:b,middlewareData:E}=f,{element:M,padding:T=0}=mt(t,f)||{};if(M==null)return{};let S=gr(T),A={x:m,y:h},I=En(v),L=Cn(I),N=await w.getDimensions(M),F=I==="y",V=F?"top":"left",k=F?"bottom":"right",B=F?"clientHeight":"clientWidth",H=R.reference[L]+R.reference[I]-A[I]-R.floating[L],U=A[I]-R.reference[I],G=await(w.getOffsetParent==null?void 0:w.getOffsetParent(M)),Y=G?G[B]:0;if(!Y||!await(w.isElement==null?void 0:w.isElement(G)))Y=b.floating[B]||R.floating[L];let re=H/2-U/2,Z=Y/2-N[L]/2-1,ae=ft(S[V],Z),he=ft(S[k],Z),oe=Y-N[L]-he,ue=Y/2-N[L]/2+re,pe=vr(ae,ue,oe),je=!E.arrow&&Pt(v)!=null&&ue!==pe&&R.reference[L]/2-(ue<ae?ae:he)-N[L]/2<0,ge=je?ue<ae?ue-ae:ue-oe:0;return{[I]:A[I]+ge,data:{[I]:pe,centerOffset:ue-pe-ge,...je&&{alignmentOffset:ge}},reset:je}}});var Go=function(t){if(t===void 0)t={};return{name:"flip",options:t,async fn(f){var m,h;let{placement:v,middlewareData:R,rects:w,initialPlacement:b,platform:E,elements:M}=f,{mainAxis:T=!0,crossAxis:S=!0,fallbackPlacements:A,fallbackStrategy:I="bestFit",fallbackAxisSideDirection:L="none",flipAlignment:N=!0,...F}=mt(t,f);if((m=R.arrow)!=null&&m.alignmentOffset)return{};let V=gt(v),k=it(b),B=gt(b)===b,H=await(E.isRTL==null?void 0:E.isRTL(M.floating)),U=A||(B||!N?[rn(b)]:jo(b)),G=L!=="none";if(!A&&G)U.push(...Bo(b,N,L,H));let Y=[b,...U],re=await E.detectOverflow(f,F),Z=[],ae=((h=R.flip)==null?void 0:h.overflows)||[];if(T)Z.push(re[V]);if(S){let pe=ko(v,w,H);Z.push(re[pe[0]],re[pe[1]])}if(ae=[...ae,{placement:v,overflows:Z}],!Z.every((pe)=>pe<=0)){var he,oe;let pe=(((he=R.flip)==null?void 0:he.index)||0)+1,je=Y[pe];if(je){if(!(S==="alignment"?k!==it(je):!1)||ae.every((me)=>it(me.placement)===k?me.overflows[0]>0:!0))return{data:{index:pe,overflows:ae},reset:{placement:je}}}let ge=(oe=ae.filter((fe)=>fe.overflows[0]<=0).sort((fe,me)=>fe.overflows[1]-me.overflows[1])[0])==null?void 0:oe.placement;if(!ge)switch(I){case"bestFit":{var ue;let fe=(ue=ae.filter((me)=>{if(G){let Oe=it(me.placement);return Oe===k||Oe==="y"}return!0}).map((me)=>[me.placement,me.overflows.filter((Oe)=>Oe>0).reduce((Oe,te)=>Oe+te,0)]).sort((me,Oe)=>me[1]-Oe[1])[0])==null?void 0:ue[0];if(fe)ge=fe;break}case"initialPlacement":ge=b;break}if(v!==ge)return{reset:{placement:ge}}}return{}}}};function Vo(t,f){return{top:t.top-f.height,right:t.right-f.width,bottom:t.bottom-f.height,left:t.left-f.width}}function $o(t){return Fo.some((f)=>t[f]>=0)}var Ko=function(t){if(t===void 0)t={};return{name:"hide",options:t,async fn(f){let{rects:m,platform:h}=f,{strategy:v="referenceHidden",...R}=mt(t,f);switch(v){case"referenceHidden":{let w=await h.detectOverflow(f,{...R,elementContext:"reference"}),b=Vo(w,m.reference);return{data:{referenceHiddenOffsets:b,referenceHidden:$o(b)}}}case"escaped":{let w=await h.detectOverflow(f,{...R,altBoundary:!0}),b=Vo(w,m.floating);return{data:{escapedOffsets:b,escaped:$o(b)}}}default:return{}}}}};var Yo=new Set(["left","top"]);async function Ts(t,f){let{placement:m,platform:h,elements:v}=t,R=await(h.isRTL==null?void 0:h.isRTL(v.floating)),w=gt(m),b=Pt(m),E=it(m)==="y",M=Yo.has(w)?-1:1,T=R&&E?-1:1,S=mt(f,t),{mainAxis:A,crossAxis:I,alignmentAxis:L}=typeof S==="number"?{mainAxis:S,crossAxis:0,alignmentAxis:null}:{mainAxis:S.mainAxis||0,crossAxis:S.crossAxis||0,alignmentAxis:S.alignmentAxis};if(b&&typeof L==="number")I=b==="end"?L*-1:L;return E?{x:I*T,y:A*M}:{x:A*M,y:I*T}}var Xo=function(t){if(t===void 0)t=0;return{name:"offset",options:t,async fn(f){var m,h;let{x:v,y:R,placement:w,middlewareData:b}=f,E=await Ts(f,t);if(w===((m=b.offset)==null?void 0:m.placement)&&(h=b.arrow)!=null&&h.alignmentOffset)return{};return{x:v+E.x,y:R+E.y,data:{...E,placement:w}}}}},Zo=function(t){if(t===void 0)t={};return{name:"shift",options:t,async fn(f){let{x:m,y:h,placement:v,platform:R}=f,{mainAxis:w=!0,crossAxis:b=!1,limiter:E={fn:(k)=>{let{x:B,y:H}=k;return{x:B,y:H}}},...M}=mt(t,f),T={x:m,y:h},S=await R.detectOverflow(f,M),A=it(v),I=Sn(A),L=T[I],N=T[A],F=(k,B)=>vr(B+S[k==="y"?"top":"left"],B,B-S[k==="y"?"bottom":"right"]);if(w)L=F(I,L);if(b)N=F(A,N);let V=E.fn({...f,[I]:L,[A]:N});return{...V,data:{x:V.x-m,y:V.y-h,enabled:{[I]:w,[A]:b}}}}}},qo=function(t){if(t===void 0)t={};return{options:t,fn(f){var m,h;let{x:v,y:R,placement:w,rects:b,middlewareData:E}=f,{offset:M=0,mainAxis:T=!0,crossAxis:S=!0}=mt(t,f),A={x:v,y:R},I=it(w),L=Sn(I),N=A[L],F=A[I],V=mt(M,f),k=typeof V==="number"?{mainAxis:V,crossAxis:0}:{mainAxis:(m=V.mainAxis)!=null?m:0,crossAxis:(h=V.crossAxis)!=null?h:0};if(T){let U=L==="y"?"height":"width",G=b.reference[L]-b.floating[U]+k.mainAxis,Y=b.reference[L]+b.reference[U]-k.mainAxis;if(N<G)N=G;else if(N>Y)N=Y}if(S){var B,H;let U=L==="y"?"width":"height",G=Yo.has(gt(w)),Y=b.reference[I]-b.floating[U]+(G?((B=E.offset)==null?void 0:B[I])||0:0)+(G?0:k.crossAxis),re=b.reference[I]+b.reference[U]+(G?0:((H=E.offset)==null?void 0:H[I])||0)-(G?k.crossAxis:0);if(F<Y)F=Y;else if(F>re)F=re}return{[L]:N,[I]:F}}}},Qo=function(t){if(t===void 0)t={};return{name:"size",options:t,async fn(f){let{placement:m,rects:h,platform:v,elements:R}=f,{apply:w=()=>{},...b}=mt(t,f),E=await v.detectOverflow(f,b),M=gt(m),T=Pt(m),S=it(m)==="y",{width:A,height:I}=h.floating,L,N;if(M==="top"||M==="bottom")L=M,N=T===(await(v.isRTL==null?void 0:v.isRTL(R.floating))?"start":"end")?"left":"right";else N=M,L=T==="end"?"top":"bottom";let F=I-E.top-E.bottom,V=A-E.left-E.right,k=ft(I-E[L],F),B=ft(A-E[N],V),H=f.middlewareData.shift,U=!H,G=k,Y=B;if(H!=null&&H.enabled.x)Y=V;if(H!=null&&H.enabled.y)G=F;if(U&&!T)if(S)Y=A-2*ot(E.left,E.right);else G=I-2*ot(E.top,E.bottom);await w({...f,availableWidth:Y,availableHeight:G});let re=await v.getDimensions(R.floating);if(A!==re.width||I!==re.height)return{reset:{rects:!0}};return{}}}};function Pn(){return typeof window<"u"}function Mt(t){if(ei(t))return(t.nodeName||"").toLowerCase();return"#document"}function Xe(t){var f;return(t==null||(f=t.ownerDocument)==null?void 0:f.defaultView)||window}function pt(t){var f;return(f=(ei(t)?t.ownerDocument:t.document)||window.document)==null?void 0:f.documentElement}function ei(t){if(!Pn())return!1;return t instanceof Node||t instanceof Xe(t).Node}function ct(t){if(!Pn())return!1;return t instanceof Element||t instanceof Xe(t).Element}function yt(t){if(!Pn())return!1;return t instanceof HTMLElement||t instanceof Xe(t).HTMLElement}function Jo(t){if(!Pn()||typeof ShadowRoot>"u")return!1;return t instanceof ShadowRoot||t instanceof Xe(t).ShadowRoot}function sn(t){let{overflow:f,overflowX:m,overflowY:h,display:v}=st(t);return/auto|scroll|overlay|hidden|clip/.test(f+h+m)&&v!=="inline"&&v!=="contents"}function ti(t){return/^(table|td|th)$/.test(Mt(t))}function an(t){try{if(t.matches(":popover-open"))return!0}catch(f){}try{return t.matches(":modal")}catch(f){return!1}}var Ds=/transform|translate|scale|rotate|perspective|filter/,Ls=/paint|layout|strict|content/,_t=(t)=>!!t&&t!=="none",yr;function On(t){let f=ct(t)?st(t):t;return _t(f.transform)||_t(f.translate)||_t(f.scale)||_t(f.rotate)||_t(f.perspective)||!_n()&&(_t(f.backdropFilter)||_t(f.filter))||Ds.test(f.willChange||"")||Ls.test(f.contain||"")}function ni(t){let f=St(t);while(yt(f)&&!Ut(f)){if(On(f))return f;else if(an(f))return null;f=St(f)}return null}function _n(){if(yr==null)yr=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none");return yr}function Ut(t){return/^(html|body|#document)$/.test(Mt(t))}function st(t){return Xe(t).getComputedStyle(t)}function un(t){if(ct(t))return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop};return{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function St(t){if(Mt(t)==="html")return t;let f=t.assignedSlot||t.parentNode||Jo(t)&&t.host||pt(t);return Jo(f)?f.host:f}function ri(t){let f=St(t);if(Ut(f))return(t.ownerDocument||t).body;if(yt(f)&&sn(f))return f;return ri(f)}function At(t,f,m){var h;if(f===void 0)f=[];if(m===void 0)m=!0;let v=ri(t),R=v===((h=t.ownerDocument)==null?void 0:h.body),w=Xe(v);if(R){let b=An(w);return f.concat(w,w.visualViewport||[],sn(v)?v:[],b&&m?At(b):[])}else return f.concat(v,At(v,[],m))}function An(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ci(t){let f=st(t),m=parseFloat(f.width)||0,h=parseFloat(f.height)||0,v=yt(t),R=v?t.offsetWidth:m,w=v?t.offsetHeight:h,b=on(m)!==R||on(h)!==w;if(b)m=R,h=w;return{width:m,height:h,$:b}}function wr(t){return!ct(t)?t.contextElement:t}function Gt(t){let f=wr(t);if(!yt(f))return dt(1);let m=f.getBoundingClientRect(),{width:h,height:v,$:R}=ci(f),w=(R?on(m.width):m.width)/h,b=(R?on(m.height):m.height)/v;if(!w||!Number.isFinite(w))w=1;if(!b||!Number.isFinite(b))b=1;return{x:w,y:b}}var Ns=dt(0);function si(t){let f=Xe(t);if(!_n()||!f.visualViewport)return Ns;return{x:f.visualViewport.offsetLeft,y:f.visualViewport.offsetTop}}function Fs(t,f,m){if(f===void 0)f=!1;return!!m&&f&&m===Xe(t)}function It(t,f,m,h){if(f===void 0)f=!1;if(m===void 0)m=!1;let v=t.getBoundingClientRect(),R=wr(t),w=dt(1);if(f)if(h){if(ct(h))w=Gt(h)}else w=Gt(t);let b=Fs(R,m,h)?si(R):dt(0),E=(v.left+b.x)/w.x,M=(v.top+b.y)/w.y,T=v.width/w.x,S=v.height/w.y;if(R&&h){let A=Xe(R),I=ct(h)?Xe(h):h,L=A,N=An(L);while(N&&I!==L){let F=Gt(N),V=N.getBoundingClientRect(),k=st(N),B=V.left+(N.clientLeft+parseFloat(k.paddingLeft))*F.x,H=V.top+(N.clientTop+parseFloat(k.paddingTop))*F.y;E*=F.x,M*=F.y,T*=F.x,S*=F.y,E+=B,M+=H,L=Xe(N),N=An(L)}}return Ot({width:T,height:S,x:E,y:M})}function Mn(t,f){let m=un(t).scrollLeft;if(!f)return It(pt(t)).left+m;return f.left+m}function ai(t,f){let m=t.getBoundingClientRect(),h=m.left+f.scrollLeft-Mn(t,m),v=m.top+f.scrollTop;return{x:h,y:v}}function ks(t){let{elements:f,rect:m,offsetParent:h,strategy:v}=t,R=v==="fixed",w=pt(h),b=f?an(f.floating):!1;if(h===w||b&&R)return m;let E={scrollLeft:0,scrollTop:0},M=dt(1),T=dt(0),S=yt(h);if(S||!R){if(Mt(h)!=="body"||sn(w))E=un(h);if(S){let I=It(h);M=Gt(h),T.x=I.x+h.clientLeft,T.y=I.y+h.clientTop}}let A=w&&!S&&!R?ai(w,E):dt(0);return{width:m.width*M.x,height:m.height*M.y,x:m.x*M.x-E.scrollLeft*M.x+T.x+A.x,y:m.y*M.y-E.scrollTop*M.y+T.y+A.y}}function js(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function Bs(t){let f=un(t),m=t.ownerDocument.body,h=ot(t.scrollWidth,t.clientWidth,m.scrollWidth,m.clientWidth),v=ot(t.scrollHeight,t.clientHeight,m.scrollHeight,m.clientHeight),R=-f.scrollLeft+Mn(t),w=-f.scrollTop;if(st(m).direction==="rtl")R+=ot(t.clientWidth,m.clientWidth)-h;return{width:h,height:v,x:R,y:w}}var Ws=25;function Vs(t,f,m){if(m===void 0)m="viewport";let h=m==="layoutViewport",v=Xe(t),R=pt(t),w=v.visualViewport,{clientWidth:b,clientHeight:E}=R,M=0,T=0;if(w){let A=!_n()||f==="fixed";if(h){if(!A)M=-w.offsetLeft,T=-w.offsetTop}else if(b=w.width,E=w.height,A)M=w.offsetLeft,T=w.offsetTop}if(Mn(R)<=0){let A=R.ownerDocument,I=A.body,L=getComputedStyle(I),N=A.compatMode==="CSS1Compat"?parseFloat(L.marginLeft)+parseFloat(L.marginRight)||0:0,F=Math.abs(R.clientWidth-I.clientWidth-N),V=getComputedStyle(R).scrollbarGutter==="stable both-edges"?F/2:F;if(V<=Ws)b-=V}return{width:b,height:E,x:M,y:T}}function $s(t,f){let m=It(t,!0,f==="fixed"),h=m.top+t.clientTop,v=m.left+t.clientLeft,R=Gt(t),w=t.clientWidth*R.x,b=t.clientHeight*R.y,E=v*R.x,M=h*R.y;return{width:w,height:b,x:E,y:M}}function oi(t,f,m){let h;if(f==="viewport"||f==="layoutViewport")h=Vs(t,m,f);else if(f==="document")h=Bs(pt(t));else if(ct(f))h=$s(f,m);else{let v=si(t);h={x:f.x-v.x,y:f.y-v.y,width:f.width,height:f.height}}return Ot(h)}function zs(t,f){let m=f.get(t);if(m)return m;let h=At(t,[],!1).filter((b)=>ct(b)&&Mt(b)!=="body"),v=null,R=st(t).position==="fixed",w=R?St(t):t;while(ct(w)&&!Ut(w)){let b=st(w),E=On(w),M=v?v.position:R?"fixed":"";if(!E&&(M==="fixed"||M==="absolute"&&b.position==="static"))h=h.filter((S)=>S!==w);else v=b;w=St(w)}return f.set(t,h),h}function Hs(t){let{element:f,boundary:m,rootBoundary:h,strategy:v}=t,w=[...m==="clippingAncestors"?an(f)?[]:zs(f,this._c):[].concat(m),h],b=oi(f,w[0],v),{top:E,right:M,bottom:T,left:S}=b;for(let A=1;A<w.length;A++){let I=oi(f,w[A],v);E=ot(I.top,E),M=ft(I.right,M),T=ft(I.bottom,T),S=ot(I.left,S)}return{width:M-S,height:T-E,x:S,y:E}}function Us(t){let{width:f,height:m}=ci(t);return{width:f,height:m}}function Gs(t,f,m){let h=yt(f),v=pt(f),R=m==="fixed",w=It(t,!0,R,f),b={scrollLeft:0,scrollTop:0},E=dt(0);if(h||!R){if(Mt(f)!=="body"||sn(v))b=un(f);if(h){let A=It(f,!0,R,f);E.x=A.x+f.clientLeft,E.y=A.y+f.clientTop}}if(!h&&v)E.x=Mn(v);let M=v&&!h&&!R?ai(v,b):dt(0),T=w.left+b.scrollLeft-E.x-M.x,S=w.top+b.scrollTop-E.y-M.y;return{x:T,y:S,width:w.width,height:w.height}}function Rr(t){return st(t).position==="static"}function ii(t,f){if(!yt(t)||st(t).position==="fixed")return null;if(f)return f(t);let m=t.offsetParent;if(pt(t)===m)m=m.ownerDocument.body;return m}function ui(t,f){let m=Xe(t);if(an(t))return m;if(!yt(t)){let v=St(t);while(v&&!Ut(v)){if(ct(v)&&!Rr(v))return v;v=St(v)}return m}let h=ii(t,f);while(h&&ti(h)&&Rr(h))h=ii(h,f);if(h&&Ut(h)&&Rr(h)&&!On(h))return m;return h||ni(t)||m}var Ks=async function(t){let f=this.getOffsetParent||ui,m=this.getDimensions,h=await m(t.floating);return{reference:Gs(t.reference,await f(t.floating),t.strategy),floating:{x:0,y:0,width:h.width,height:h.height}}};function Ys(t){return st(t).direction==="rtl"}var li={convertOffsetParentRelativeRectToViewportRelativeRect:ks,getDocumentElement:pt,getClippingRect:Hs,getOffsetParent:ui,getElementRects:Ks,getClientRects:js,getDimensions:Us,getScale:Gt,isElement:ct,isRTL:Ys};function fi(t,f){return t.x===f.x&&t.y===f.y&&t.width===f.width&&t.height===f.height}function Xs(t,f,m){let h=null,v,R=pt(t);function w(){var T;clearTimeout(v),(T=h)==null||T.disconnect(),h=null}function b(T,S){if(T===void 0)T=!1;if(S===void 0)S=1;w();let A=t.getBoundingClientRect(),{left:I,top:L,width:N,height:F}=A;if(!T)f();if(!N||!F)return;let V=cn(L),k=cn(R.clientWidth-(I+N)),B=cn(R.clientHeight-(L+F)),H=cn(I),G={rootMargin:-V+"px "+-k+"px "+-B+"px "+-H+"px",threshold:ot(0,ft(1,S))||1},Y=!0;function re(Z){let ae=Z[0].intersectionRatio;if(!fi(A,t.getBoundingClientRect()))return b();if(ae!==S){if(!Y)return b();if(!ae)v=setTimeout(()=>{b(!1,0.0000001)},1000);else b(!1,ae)}Y=!1}try{h=new IntersectionObserver(re,{...G,root:R.ownerDocument})}catch(Z){h=new IntersectionObserver(re,G)}h.observe(t)}let E=Xe(t),M=()=>b(m);return E.addEventListener("resize",M),b(!0),()=>{E.removeEventListener("resize",M),w()}}function br(t,f,m,h){if(h===void 0)h={};let{ancestorScroll:v=!0,ancestorResize:R=!0,elementResize:w=typeof ResizeObserver==="function",layoutShift:b=typeof IntersectionObserver==="function",animationFrame:E=!1}=h,M=wr(t),T=v||R?[...M?At(M):[],...f?At(f):[]]:[];T.forEach((V)=>{v&&V.addEventListener("scroll",m),R&&V.addEventListener("resize",m)});let S=M&&b?Xs(M,m,R):null,A=-1,I=null;if(w){if(I=new ResizeObserver((V)=>{let[k]=V;if(k&&k.target===M&&I&&f)I.unobserve(f),cancelAnimationFrame(A),A=requestAnimationFrame(()=>{var B;(B=I)==null||B.observe(f)});m()}),M&&!E)I.observe(M);if(f)I.observe(f)}let L,N=E?It(t):null;if(E)F();function F(){let V=It(t);if(N&&!fi(N,V))m();N=V,L=requestAnimationFrame(F)}return m(),()=>{var V;if(T.forEach((k)=>{v&&k.removeEventListener("scroll",m),R&&k.removeEventListener("resize",m)}),S==null||S(),(V=I)==null||V.disconnect(),I=null,E)cancelAnimationFrame(L)}}var di=Xo;var mi=Zo,pi=Go,hi=Qo,vi=Ko,xr=Uo;var gi=qo,Sr=(t,f,m)=>{let h=new Map,v=m!=null?m:{},R={...li,...v.platform,_c:h};return Ho(t,f,{...v,platform:R})};import*as Be from"react";import{useLayoutEffect as Zs}from"react";import*as Ri from"react-dom";var qs=typeof document<"u",Qs=function(){},In=qs?Zs:Qs;function Tn(t,f){if(t===f)return!0;if(typeof t!==typeof f)return!1;if(typeof t==="function"&&t.toString()===f.toString())return!0;let m,h,v;if(t&&f&&typeof t==="object"){if(Array.isArray(t)){if(m=t.length,m!==f.length)return!1;for(h=m;h--!==0;)if(!Tn(t[h],f[h]))return!1;return!0}if(v=Object.keys(t),m=v.length,m!==Object.keys(f).length)return!1;for(h=m;h--!==0;)if(!{}.hasOwnProperty.call(f,v[h]))return!1;for(h=m;h--!==0;){let R=v[h];if(R==="_owner"&&t.$$typeof)continue;if(!Tn(t[R],f[R]))return!1}return!0}return t!==t&&f!==f}function wi(t){if(typeof window>"u")return 1;return(t.ownerDocument.defaultView||window).devicePixelRatio||1}function yi(t,f){let m=wi(t);return Math.round(f*m)/m}function Cr(t){let f=Be.useRef(t);return In(()=>{f.current=t}),f}function bi(t){if(t===void 0)t={};let{placement:f="bottom",strategy:m="absolute",middleware:h=[],platform:v,elements:{reference:R,floating:w}={},transform:b=!0,whileElementsMounted:E,open:M}=t,[T,S]=Be.useState({x:0,y:0,strategy:m,placement:f,middlewareData:{},isPositioned:!1}),[A,I]=Be.useState(h);if(!Tn(A,h))I(h);let[L,N]=Be.useState(null),[F,V]=Be.useState(null),k=Be.useCallback((me)=>{if(me!==G.current)G.current=me,N(me)},[]),B=Be.useCallback((me)=>{if(me!==Y.current)Y.current=me,V(me)},[]),H=R||L,U=w||F,G=Be.useRef(null),Y=Be.useRef(null),re=Be.useRef(T),Z=E!=null,ae=Cr(E),he=Cr(v),oe=Cr(M),ue=Be.useCallback(()=>{if(!G.current||!Y.current)return;let me={placement:f,strategy:m,middleware:A};if(he.current)me.platform=he.current;Sr(G.current,Y.current,me).then((Oe)=>{let te={...Oe,isPositioned:oe.current!==!1};if(pe.current&&!Tn(re.current,te))re.current=te,Ri.flushSync(()=>{S(te)})})},[A,f,m,he,oe]);In(()=>{if(M===!1&&re.current.isPositioned)re.current.isPositioned=!1,S((me)=>({...me,isPositioned:!1}))},[M]);let pe=Be.useRef(!1);In(()=>(pe.current=!0,()=>{pe.current=!1}),[]),In(()=>{if(H)G.current=H;if(U)Y.current=U;if(H&&U){if(ae.current)return ae.current(H,U,ue);ue()}},[H,U,ue,ae,Z]);let je=Be.useMemo(()=>({reference:G,floating:Y,setReference:k,setFloating:B}),[k,B]),ge=Be.useMemo(()=>({reference:H,floating:U}),[H,U]),fe=Be.useMemo(()=>{let me={position:m,left:0,top:0};if(!ge.floating)return me;let Oe=yi(ge.floating,T.x),te=yi(ge.floating,T.y);if(b)return{...me,transform:"translate("+Oe+"px, "+te+"px)",...wi(ge.floating)>=1.5&&{willChange:"transform"}};return{position:m,left:Oe,top:te}},[m,b,ge.floating,T.x,T.y]);return Be.useMemo(()=>({...T,update:ue,refs:je,elements:ge,floatingStyles:fe}),[T,ue,je,ge,fe])}var Js=(t)=>{function f(m){return{}.hasOwnProperty.call(m,"current")}return{name:"arrow",options:t,fn(m){let{element:h,padding:v}=typeof t==="function"?t(m):t;if(h&&f(h)){if(h.current!=null)return xr({element:h.current,padding:v}).fn(m);return{}}if(h)return xr({element:h,padding:v}).fn(m);return{}}}},xi=(t,f)=>{let m=di(t);return{name:m.name,fn:m.fn,options:[t,f]}},Si=(t,f)=>{let m=mi(t);return{name:m.name,fn:m.fn,options:[t,f]}},Ci=(t,f)=>({fn:gi(t).fn,options:[t,f]}),Ei=(t,f)=>{let m=pi(t);return{name:m.name,fn:m.fn,options:[t,f]}},Pi=(t,f)=>{let m=hi(t);return{name:m.name,fn:m.fn,options:[t,f]}};var Oi=(t,f)=>{let m=vi(t);return{name:m.name,fn:m.fn,options:[t,f]}};var _i=(t,f)=>{let m=Js(t);return{name:m.name,fn:m.fn,options:[t,f]}};import*as Mi from"react";import{jsx as Ai}from"react/jsx-runtime";var ea=Object.defineProperty,ta=(t,f)=>ea(t,"name",{value:f,configurable:!0}),na=Mi.forwardRef(ta(function(f,m){let{children:h,width:v=10,height:R=5,...w}=f;return Ai(o.svg,{...w,ref:m,width:v,height:R,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:f.asChild?h:Ai("polygon",{points:"0,0 30,0 15,10"})})},"Arrow")),Ii=na;import*as Ti from"react";var oa=Object.defineProperty,ia=(t,f)=>oa(t,"name",{value:f,configurable:!0});function _(t){let[f,m]=Ti.useState(void 0);return l(()=>{if(t){m({width:t.offsetWidth,height:t.offsetHeight});let h=new ResizeObserver((v)=>{if(!Array.isArray(v))return;if(!v.length)return;let R=v[0],w,b;if("borderBoxSize"in R){let E=R.borderBoxSize,M=Array.isArray(E)?E[0]:E;w=M.inlineSize,b=M.blockSize}else w=t.offsetWidth,b=t.offsetHeight;m({width:w,height:b})});return h.observe(t,{box:"border-box"}),()=>h.unobserve(t)}else m(void 0)},[t]),f}ia(_,"useSize");import{jsx as Tt}from"react/jsx-runtime";var ca=Object.defineProperty,Rt=(t,f)=>ca(t,"name",{value:f,configurable:!0});var Di="Popper",[Li,O]=i(Di),[sa,Ni]=Li(Di),aa=Rt((t)=>{let{__scopePopper:f,children:m}=t,[h,v]=He.useState(null),[R,w]=He.useState(void 0);return Tt(sa,{scope:f,anchor:h,onAnchorChange:v,placementState:R,setPlacementState:w,children:m})},"Popper"),ua="PopperAnchor",la=He.forwardRef(Rt(function(f,m){let{__scopePopper:h,virtualRef:v,...R}=f,w=Ni(ua,h),b=He.useRef(null),E=w.onAnchorChange,M=He.useCallback((N)=>{if(b.current=N,N)E(N)},[E]),T=a(m,M),S=He.useRef(null);He.useEffect(()=>{if(!v)return;let N=S.current;if(S.current=v.current,N!==S.current)E(S.current)});let A=w.placementState&&Dn(w.placementState),I=A?.[0],L=A?.[1];return v?null:Tt(o.div,{"data-radix-popper-side":I,"data-radix-popper-align":L,...R,ref:T})},"PopperAnchor")),Fi="PopperContent",[fa,da]=Li(Fi),ma=He.forwardRef(Rt(function(f,m){let{__scopePopper:h,side:v="bottom",sideOffset:R=0,align:w="center",alignOffset:b=0,arrowPadding:E=0,avoidCollisions:M=!0,collisionBoundary:T=[],collisionPadding:S=0,sticky:A="partial",hideWhenDetached:I=!1,updatePositionStrategy:L="optimized",onPlaced:N,...F}=f,V=Ni(Fi,h),[k,B]=He.useState(null),H=a(m,B),[U,G]=He.useState(null),Y=_(U),re=Y?.width??0,Z=Y?.height??0,ae=v+(w!=="center"?"-"+w:""),he=typeof S==="number"?S:{top:0,right:0,bottom:0,left:0,...S},oe=Array.isArray(T)?T:[T],ue=oe.length>0,pe={padding:he,boundary:oe.filter(ki),altBoundary:ue},{refs:je,floatingStyles:ge,placement:fe,isPositioned:me,middlewareData:Oe}=bi({strategy:"fixed",placement:ae,whileElementsMounted:Rt((...Bt)=>br(...Bt,{animationFrame:L==="always"}),"whileElementsMounted"),elements:{reference:V.anchor},middleware:[xi({mainAxis:R+Z,alignmentAxis:b}),M&&Si({mainAxis:!0,crossAxis:!1,limiter:A==="partial"?Ci():void 0,...pe}),M&&Ei({...pe}),Pi({...pe,apply:Rt(({elements:Bt,rects:Qr,availableWidth:Vc,availableHeight:$c})=>{let{width:zc,height:Hc}=Qr.reference,gn=Bt.floating.style;gn.setProperty("--radix-popper-available-width",`${Vc}px`),gn.setProperty("--radix-popper-available-height",`${$c}px`),gn.setProperty("--radix-popper-anchor-width",`${zc}px`),gn.setProperty("--radix-popper-anchor-height",`${Hc}px`)},"apply")}),U&&_i({element:U,padding:E}),ga({arrowWidth:re,arrowHeight:Z}),I&&Oi({strategy:"referenceHidden",...pe,boundary:ue?pe.boundary:void 0})]}),te=V.setPlacementState;l(()=>(te(fe),()=>{te(void 0)}),[fe,te]);let[ht,lt]=Dn(fe),bt=u(N);l(()=>{if(me)bt?.()},[me,bt]);let tn=Oe.arrow?.x,nn=Oe.arrow?.y,vn=Oe.arrow?.centerOffset!==0,[Et,Ke]=He.useState();return l(()=>{if(k)Ke(window.getComputedStyle(k).zIndex)},[k]),Tt("div",{ref:je.setFloating,"data-radix-popper-content-wrapper":"",style:{...ge,transform:me?ge.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Et,"--radix-popper-transform-origin":[Oe.transformOrigin?.x,Oe.transformOrigin?.y].join(" "),...Oe.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:f.dir,children:Tt(fa,{scope:h,placedSide:ht,placedAlign:lt,onArrowChange:G,arrowX:tn,arrowY:nn,shouldHideArrow:vn,children:Tt(o.div,{"data-side":ht,"data-align":lt,...F,ref:H,style:{...F.style,animation:!me?"none":F.style?.animation}})})})},"PopperContent")),pa="PopperArrow",ha={top:"bottom",right:"left",bottom:"top",left:"right"},va=He.forwardRef(Rt(function(f,m){let{__scopePopper:h,...v}=f,R=da(pa,h),w=ha[R.placedSide];return Tt("span",{ref:R.onArrowChange,style:{position:"absolute",left:R.arrowX,top:R.arrowY,[w]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[R.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[R.placedSide],visibility:R.shouldHideArrow?"hidden":void 0},children:Tt(Ii,{...v,ref:m,style:{...v.style,display:"block"}})})},"PopperArrow"));function ki(t){return t!==null}Rt(ki,"isNotNull");var ga=Rt((t)=>({name:"transformOrigin",options:t,fn(f){let{placement:m,rects:h,middlewareData:v}=f,w=v.arrow?.centerOffset!==0,b=w?0:t.arrowWidth,E=w?0:t.arrowHeight,[M,T]=Dn(m),S={start:"0%",center:"50%",end:"100%"}[T],A=(v.arrow?.x??0)+b/2,I=(v.arrow?.y??0)+E/2,L="",N="";if(M==="bottom")L=w?S:`${A}px`,N=`${-E}px`;else if(M==="top")L=w?S:`${A}px`,N=`${h.floating.height+E}px`;else if(M==="right")L=`${-E}px`,N=w?S:`${I}px`;else if(M==="left")L=`${h.floating.width+E}px`,N=w?S:`${I}px`;return{data:{x:L,y:N}}}}),"transformOrigin");function Dn(t){let[f,m="center"]=t.split("-");return[f,m]}Rt(Dn,"getSideAndAlignFromPlacement");var ie=aa,se=la,ye=ma,xt=va;import*as Ln from"react";import*as ji from"react-dom";import{jsx as ba}from"react/jsx-runtime";var Ra=Object.defineProperty,wa=(t,f)=>Ra(t,"name",{value:f,configurable:!0}),q=Ln.forwardRef(wa(function(f,m){let{container:h,...v}=f,[R,w]=Ln.useState(!1);l(()=>w(!0),[]);let b=h||R&&globalThis?.document?.body;return b?ji.createPortal(ba(o.div,{...v,ref:m}),b):null},"Portal"));import*as Ue from"react";import*as Bi from"react";var xa=Object.defineProperty,wt=(t,f)=>xa(t,"name",{value:f,configurable:!0});function Wi(t,f){return Bi.useReducer((m,h)=>f[m][h]??m,t)}wt(Wi,"useStateMachine");var d=wt((t)=>{let{present:f,children:m}=t,h=Vi(f),v=typeof m==="function"?m({present:h.isPresent}):Ue.Children.only(m),R=$i(h.ref,zi(v));return typeof m==="function"||h.isPresent?Ue.cloneElement(v,{ref:R}):null},"Presence");function Vi(t){let[f,m]=Ue.useState(),h=Ue.useRef(null),v=Ue.useRef(t),R=Ue.useRef("none"),w=Ue.useRef(void 0),b=t?"mounted":"unmounted",[E,M]=Wi(b,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return Ue.useEffect(()=>{if(E==="mounted")R.current=w.current??Kt(h.current),w.current=void 0;else R.current="none"},[E]),l(()=>{let T=h.current,S=v.current;if(S!==t){let I=R.current,L=Kt(T);if(t)w.current=L,M("MOUNT");else if(L==="none"||T?.display==="none")M("UNMOUNT");else if(S&&I!==L)M("ANIMATION_OUT");else M("UNMOUNT");v.current=t}},[t,M]),l(()=>{if(f){let T,S=f.ownerDocument.defaultView??window,A=wt((L)=>{let F=Kt(h.current).includes(CSS.escape(L.animationName));if(L.target===f&&F){if(M("ANIMATION_END"),!v.current){let V=f.style.animationFillMode;f.style.animationFillMode="forwards",T=S.setTimeout(()=>{if(f.style.animationFillMode==="forwards")f.style.animationFillMode=V})}}},"handleAnimationEnd"),I=wt((L)=>{if(L.target===f)R.current=Kt(h.current)},"handleAnimationStart");return f.addEventListener("animationstart",I),f.addEventListener("animationcancel",A),f.addEventListener("animationend",A),()=>{S.clearTimeout(T),f.removeEventListener("animationstart",I),f.removeEventListener("animationcancel",A),f.removeEventListener("animationend",A)}}else M("ANIMATION_END")},[f,M]),{isPresent:["mounted","unmountSuspended"].includes(E),ref:Ue.useCallback((T)=>{if(T){let S=getComputedStyle(T);h.current=S,w.current=Kt(S)}else h.current=null;m(T)},[])}}wt(Vi,"usePresence");function Er(t,f){if(typeof t==="function")return t(f);else if(t!==null&&t!==void 0)t.current=f}wt(Er,"setRef");function $i(...t){let f=Ue.useRef(t);return f.current=t,Ue.useCallback((m)=>{let h=f.current,v=!1,R=h.map((w)=>{let b=Er(w,m);if(!v&&typeof b==="function")v=!0;return b});if(v)return()=>{for(let w=0;w<R.length;w++){let b=R[w];if(typeof b==="function")b();else Er(h[w],null)}}},[])}wt($i,"useStableComposedRefs");function Kt(t){return t?.animationName||"none"}wt(Kt,"getAnimationName");function zi(t){let f=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,m=f&&"isReactWarning"in f&&f.isReactWarning;if(m)return t.ref;if(f=Object.getOwnPropertyDescriptor(t,"ref")?.get,m=f&&"isReactWarning"in f&&f.isReactWarning,m)return t.props.ref;return t.props.ref||t.ref}wt(zi,"getElementRef");import*as $e from"react";import*as tt from"react";import*as at from"react";import*as Yt from"react";var Sa=Object.defineProperty,Ca=(t,f)=>Sa(t,"name",{value:f,configurable:!0}),Hi=Yt[" useEffectEvent ".trim().toString()],Ui=Yt[" useInsertionEffect ".trim().toString()];function Pr(t){if(typeof Hi==="function")return Hi(t);let f=Yt.useRef(()=>{throw Error("Cannot call an event handler while rendering.")});if(typeof Ui==="function")Ui(()=>{f.current=t});else l(()=>{f.current=t});return Yt.useMemo(()=>(...m)=>f.current?.(...m),[])}Ca(Pr,"useEffectEvent");var Ea=Object.defineProperty,ln=(t,f)=>Ea(t,"name",{value:f,configurable:!0}),Pa=tt[" useInsertionEffect ".trim().toString()]||l;function s({prop:t,defaultProp:f,onChange:m=ln(()=>{},"onChange"),caller:h}){let[v,R,w]=Ki({defaultProp:f,onChange:m}),b=t!==void 0,E=b?t:v;if(Q){let T=tt.useRef(t!==void 0);tt.useEffect(()=>{let S=T.current;if(S!==b)console.warn(`${h} is changing from ${S?"controlled":"uncontrolled"} to ${b?"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.`);T.current=b},[b,h])}let M=tt.useCallback((T)=>{if(b){let S=Yi(T)?T(t):T;if(S!==t)w.current?.(S)}else R(T)},[b,t,R,w]);return[E,M]}ln(s,"useControllableState");function Ki({defaultProp:t,onChange:f}){let[m,h]=tt.useState(t),v=tt.useRef(m),R=tt.useRef(f);return Pa(()=>{R.current=f},[f]),tt.useEffect(()=>{if(v.current!==m)R.current?.(m),v.current=m},[m,v]),[m,h,R]}ln(Ki,"useUncontrolledState");function Yi(t){return typeof t==="function"}ln(Yi,"isFunction");var Gi=Symbol("RADIX:SYNC_STATE");function Oa(t,f,m,h){let{prop:v,defaultProp:R,onChange:w,caller:b}=f,E=v!==void 0,M=Pr(w);if(Q){let F=at.useRef(v!==void 0);at.useEffect(()=>{let V=F.current;if(V!==E)console.warn(`${b} is changing from ${V?"controlled":"uncontrolled"} to ${E?"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=E},[E,b])}let T=[{...m,state:R}];if(h)T.push(h);let[S,A]=at.useReducer((F,V)=>{if(V.type===Gi)return{...F,state:V.state};let k=t(F,V);if(E&&!Object.is(k.state,F.state))M(k.state);return k},...T),I=S.state,L=at.useRef(I);at.useEffect(()=>{if(L.current!==I){if(L.current=I,!E)M(I)}},[I,L,E]);let N=at.useMemo(()=>{if(v!==void 0)return{...S,state:v};return S},[S,v]);return at.useEffect(()=>{if(E&&!Object.is(v,S.state))A({type:Gi,state:v})},[v,S.state,E]),[N,A]}ln(Oa,"useControllableStateReducer");import*as Aa from"react";import*as Nn from"react";var _a=Object.defineProperty,_r=(t,f)=>_a(t,"name",{value:f,configurable:!0}),Or=!1;function Xi(){let[t,f]=Nn.useState(Or);return Nn.useEffect(()=>{if(!Or)Or=!0,f(!0)},[]),t}_r(Xi,"useIsHydrated");var Zi=Aa[" useSyncExternalStore ".trim().toString()];function qi(){return()=>{}}_r(qi,"subscribe");function Qi(){return Zi(qi,()=>!0,()=>!1)}_r(Qi,"useIsHydratedModern");var Ji=typeof Zi==="function"?Qi:Xi;import{jsx as Dt}from"react/jsx-runtime";var Ma=Object.defineProperty,Lt=(t,f)=>Ma(t,"name",{value:f,configurable:!0}),Ar="rovingFocusGroup.onEntryFocus",Ia={bubbles:!1,cancelable:!0},Fn="RovingFocusGroup",[Mr,ec,Ta]=y(Fn),[Da,C]=i(Fn,[Ta]),[La,Na]=Da(Fn),Fa=$e.forwardRef(Lt(function(f,m){return Dt(Mr.Provider,{scope:f.__scopeRovingFocusGroup,children:Dt(Mr.Slot,{scope:f.__scopeRovingFocusGroup,children:Dt(ka,{...f,ref:m})})})},"RovingFocusGroup")),ka=$e.forwardRef(Lt(function(f,m){let{__scopeRovingFocusGroup:h,orientation:v,loop:R=!1,dir:w,currentTabStopId:b,defaultCurrentTabStopId:E,onCurrentTabStopIdChange:M,onEntryFocus:T,preventScrollOnEntryFocus:S=!1,...A}=f,I=$e.useRef(null),L=a(m,I),N=g(w),[F,V]=s({prop:b,defaultProp:E??null,onChange:M,caller:Fn}),[k,B]=$e.useState(!1),H=u(T),U=ec(h),G=$e.useRef(!1),[Y,re]=$e.useState(0);return $e.useEffect(()=>{let Z=I.current;if(Z)return Z.addEventListener(Ar,H),()=>Z.removeEventListener(Ar,H)},[H]),Dt(La,{scope:h,orientation:v,dir:N,loop:R,currentTabStopId:F,onItemFocus:$e.useCallback((Z)=>V(Z),[V]),onItemShiftTab:$e.useCallback(()=>B(!0),[]),onFocusableItemAdd:$e.useCallback(()=>re((Z)=>Z+1),[]),onFocusableItemRemove:$e.useCallback(()=>re((Z)=>Z-1),[]),children:Dt(o.div,{tabIndex:k||Y===0?-1:0,"data-orientation":v,...A,ref:L,style:{outline:"none",...f.style},onMouseDown:r(f.onMouseDown,()=>{G.current=!0}),onFocus:r(f.onFocus,(Z)=>{let ae=!G.current;if(Z.target===Z.currentTarget&&ae&&!k){let he=new CustomEvent(Ar,Ia);if(Z.currentTarget.dispatchEvent(he),!he.defaultPrevented){let oe=U().filter((fe)=>fe.focusable),ue=oe.find((fe)=>fe.active),pe=oe.find((fe)=>fe.id===F),ge=[ue,pe,...oe].filter(Boolean).map((fe)=>fe.ref.current);Ir(ge,S)}}G.current=!1}),onBlur:r(f.onBlur,()=>B(!1))})})},"RovingFocusGroupImpl")),ja="RovingFocusGroupItem",Ba=$e.forwardRef(Lt(function(f,m){let{__scopeRovingFocusGroup:h,focusable:v=!0,active:R=!1,tabStopId:w,children:b,...E}=f,M=c(),T=w||M,S=Na(ja,h),A=S.currentTabStopId===T,I=ec(h),{onFocusableItemAdd:L,onFocusableItemRemove:N,currentTabStopId:F}=S,V=Ji();return l(()=>{if(!V||!v)return;return L(),()=>N()},[V,v,L,N]),$e.useEffect(()=>{if(V||!v)return;return L(),()=>N()},[V,v,L,N]),Dt(Mr.ItemSlot,{scope:h,id:T,focusable:v,active:R,children:Dt(o.span,{tabIndex:A?0:-1,"data-orientation":S.orientation,...E,ref:m,onMouseDown:r(f.onMouseDown,(k)=>{if(!v)k.preventDefault();else S.onItemFocus(T)}),onFocus:r(f.onFocus,()=>S.onItemFocus(T)),onKeyDown:r(f.onKeyDown,(k)=>{if(k.key==="Tab"&&k.shiftKey){S.onItemShiftTab();return}if(k.target!==k.currentTarget)return;let B=nc(k,S.orientation,S.dir);if(B!==void 0){if(k.metaKey||k.ctrlKey||k.altKey||k.shiftKey)return;k.preventDefault();let U=I().filter((G)=>G.focusable).map((G)=>G.ref.current);if(B==="last")U.reverse();else if(B==="prev"||B==="next"){if(B==="prev")U.reverse();let G=U.indexOf(k.currentTarget);U=S.loop?rc(U,G+1):U.slice(G+1)}setTimeout(()=>Ir(U))}}),children:typeof b==="function"?b({isCurrentTabStop:A,hasTabStop:F!=null}):b})})},"RovingFocusGroupItem")),Wa={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function tc(t,f){if(f!=="rtl")return t;return t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}Lt(tc,"getDirectionAwareKey");function nc(t,f,m){let h=tc(t.key,m);if(f==="vertical"&&["ArrowLeft","ArrowRight"].includes(h))return;if(f==="horizontal"&&["ArrowUp","ArrowDown"].includes(h))return;return Wa[h]}Lt(nc,"getFocusIntent");function Ir(t,f=!1){let m=document.activeElement;for(let h of t){if(h===m)return;if(h.focus({preventScroll:f}),document.activeElement!==m)return}}Lt(Ir,"focusFirst");function rc(t,f){return t.map((m,h)=>t[(f+h)%t.length])}Lt(rc,"wrapArray");var K=Fa,j=Ba;var $a=function(t){if(typeof document>"u")return null;var f=Array.isArray(t)?t[0]:t;return f.ownerDocument.body},Xt=new WeakMap,kn=new WeakMap,jn={},Tr=0,oc=function(t){return t&&(t.host||oc(t.parentNode))},za=function(t,f){return f.map(function(m){if(t.contains(m))return m;var h=oc(m);if(h&&t.contains(h))return h;return console.error("aria-hidden",m,"in not contained inside",t,". Doing nothing"),null}).filter(function(m){return Boolean(m)})},Ha=function(t,f,m,h){var v=za(f,Array.isArray(t)?t:[t]);if(!jn[m])jn[m]=new WeakMap;var R=jn[m],w=[],b=new Set,E=new Set(v),M=function(S){if(!S||b.has(S))return;b.add(S),M(S.parentNode)};v.forEach(M);var T=function(S){if(!S||E.has(S))return;Array.prototype.forEach.call(S.children,function(A){if(b.has(A))T(A);else try{var I=A.getAttribute(h),L=I!==null&&I!=="false",N=(Xt.get(A)||0)+1,F=(R.get(A)||0)+1;if(Xt.set(A,N),R.set(A,F),w.push(A),N===1&&L)kn.set(A,!0);if(F===1)A.setAttribute(m,"true");if(!L)A.setAttribute(h,"true")}catch(V){console.error("aria-hidden: cannot operate on ",A,V)}})};return T(f),b.clear(),Tr++,function(){if(w.forEach(function(S){var A=Xt.get(S)-1,I=R.get(S)-1;if(Xt.set(S,A),R.set(S,I),!A){if(!kn.has(S))S.removeAttribute(h);kn.delete(S)}if(!I)S.removeAttribute(m)}),Tr--,!Tr)Xt=new WeakMap,Xt=new WeakMap,kn=new WeakMap,jn={}}},le=function(t,f,m){if(m===void 0)m="data-aria-hidden";var h=Array.from(Array.isArray(t)?t:[t]),v=f||$a(t);if(!v)return function(){return null};return h.push.apply(h,Array.from(v.querySelectorAll("[aria-live], script"))),Ha(h,v,m,"aria-hidden")};var qe=function(){return qe=Object.assign||function(f){for(var m,h=1,v=arguments.length;h<v;h++){m=arguments[h];for(var R in m)if(Object.prototype.hasOwnProperty.call(m,R))f[R]=m[R]}return f},qe.apply(this,arguments)};function Bn(t,f){var m={};for(var h in t)if(Object.prototype.hasOwnProperty.call(t,h)&&f.indexOf(h)<0)m[h]=t[h];if(t!=null&&typeof Object.getOwnPropertySymbols==="function"){for(var v=0,h=Object.getOwnPropertySymbols(t);v<h.length;v++)if(f.indexOf(h[v])<0&&Object.prototype.propertyIsEnumerable.call(t,h[v]))m[h[v]]=t[h[v]]}return m}function ic(t,f,m){if(m||arguments.length===2){for(var h=0,v=f.length,R;h<v;h++)if(R||!(h in f)){if(!R)R=Array.prototype.slice.call(f,0,h);R[h]=f[h]}}return t.concat(R||Array.prototype.slice.call(f))}import*as Hn from"react";import*as Ge from"react";var Nt="right-scroll-bar-position",Ft="width-before-scroll-bar",Dr="with-scroll-bars-hidden",Lr="--removed-body-scroll-bar-size";import*as Vn from"react";function Wn(t,f){if(typeof t==="function")t(f);else if(t)t.current=f;return t}import{useState as Ua}from"react";function cc(t,f){var m=Ua(function(){return{value:t,callback:f,facade:{get current(){return m.value},set current(h){var v=m.value;if(v!==h)m.value=h,m.callback(h,v)}}}})[0];return m.callback=f,m.facade}var Ga=typeof window<"u"?Vn.useLayoutEffect:Vn.useEffect,sc=new WeakMap;function Nr(t,f){var m=cc(f||null,function(h){return t.forEach(function(v){return Wn(v,h)})});return Ga(function(){var h=sc.get(m);if(h){var v=new Set(h),R=new Set(t),w=m.current;v.forEach(function(b){if(!R.has(b))Wn(b,null)}),R.forEach(function(b){if(!v.has(b))Wn(b,w)})}sc.set(m,t)},[t]),m}function Ka(t){return t}function Ya(t,f){if(f===void 0)f=Ka;var m=[],h=!1,v={read:function(){if(h)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");if(m.length)return m[m.length-1];return t},useMedium:function(R){var w=f(R,h);return m.push(w),function(){m=m.filter(function(b){return b!==w})}},assignSyncMedium:function(R){h=!0;while(m.length){var w=m;m=[],w.forEach(R)}m={push:function(b){return R(b)},filter:function(){return m}}},assignMedium:function(R){h=!0;var w=[];if(m.length){var b=m;m=[],b.forEach(R),w=m}var E=function(){var T=w;w=[],T.forEach(R)},M=function(){return Promise.resolve().then(E)};M(),m={push:function(T){w.push(T),M()},filter:function(T){return w=w.filter(T),m}}}};return v}function Fr(t){if(t===void 0)t={};var f=Ya(null);return f.options=qe({async:!0,ssr:!1},t),f}import*as ac from"react";var uc=function(t){var f=t.sideCar,m=Bn(t,["sideCar"]);if(!f)throw Error("Sidecar: please provide `sideCar` property to import the right car");var h=f.read();if(!h)throw Error("Sidecar medium not found");return ac.createElement(h,qe({},m))};uc.isSideCarExport=!0;function kr(t,f){return t.useMedium(f),uc}var $n=Fr();var jr=function(){return},fn=Ge.forwardRef(function(t,f){var m=Ge.useRef(null),h=Ge.useState({onScrollCapture:jr,onWheelCapture:jr,onTouchMoveCapture:jr}),v=h[0],R=h[1],{forwardProps:w,children:b,className:E,removeScrollBar:M,enabled:T,shards:S,sideCar:A,noRelative:I,noIsolation:L,inert:N,allowPinchZoom:F,as:V}=t,k=V===void 0?"div":V,B=t.gapMode,H=Bn(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),U=A,G=Nr([m,f]),Y=qe(qe({},H),v);return Ge.createElement(Ge.Fragment,null,T&&Ge.createElement(U,{sideCar:$n,removeScrollBar:M,shards:S,noRelative:I,noIsolation:L,inert:N,setCallbacks:R,allowPinchZoom:!!F,lockRef:m,gapMode:B}),w?Ge.cloneElement(Ge.Children.only(b),qe(qe({},Y),{ref:G})):Ge.createElement(k,qe({},Y,{className:E,ref:G}),b))});fn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};fn.classNames={fullWidth:Ft,zeroRight:Nt};import*as Fe from"react";import*as qt from"react";import*as dc from"react";var lc;var fc=function(){if(lc)return lc;if(typeof __webpack_nonce__<"u")return __webpack_nonce__;return};function Xa(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var f=fc();if(f)t.setAttribute("nonce",f);return t}function Za(t,f){if(t.styleSheet)t.styleSheet.cssText=f;else t.appendChild(document.createTextNode(f))}function qa(t){var f=document.head||document.getElementsByTagName("head")[0];f.appendChild(t)}var Br=function(){var t=0,f=null;return{add:function(m){if(t==0){if(f=Xa())Za(f,m),qa(f)}t++},remove:function(){if(t--,!t&&f)f.parentNode&&f.parentNode.removeChild(f),f=null}}};var Wr=function(){var t=Br();return function(f,m){dc.useEffect(function(){return t.add(f),function(){t.remove()}},[f&&m])}};var dn=function(){var t=Wr(),f=function(m){var{styles:h,dynamic:v}=m;return t(h,v),null};return f};var Qa={left:0,top:0,right:0,gap:0},Vr=function(t){return parseInt(t||"",10)||0},Ja=function(t){var f=window.getComputedStyle(document.body),m=f[t==="padding"?"paddingLeft":"marginLeft"],h=f[t==="padding"?"paddingTop":"marginTop"],v=f[t==="padding"?"paddingRight":"marginRight"];return[Vr(m),Vr(h),Vr(v)]},$r=function(t){if(t===void 0)t="margin";if(typeof window>"u")return Qa;var f=Ja(t),m=document.documentElement.clientWidth,h=window.innerWidth;return{left:f[0],top:f[1],right:f[2],gap:Math.max(0,h-m+f[2]-f[0])}};var eu=dn(),Zt="data-scroll-locked",tu=function(t,f,m,h){var{left:v,top:R,right:w,gap:b}=t;if(m===void 0)m="margin";return`
2
2
  .`.concat(Dr,` {
3
3
  overflow: hidden `).concat(h,`;
4
4
  padding-right: `).concat(b,"px ").concat(h,`;
@@ -35,8 +35,8 @@ import{Wt,e}from"./index-fwsd4nes.js";import*as ze from"react";import*as Jr from
35
35
  body[`).concat(Zt,`] {
36
36
  `).concat(Lr,": ").concat(b,`px;
37
37
  }
38
- `)},mc=function(){var t=parseInt(document.body.getAttribute(Zt)||"0",10);return isFinite(t)?t:0},nu=function(){qt.useEffect(function(){return document.body.setAttribute(Zt,(mc()+1).toString()),function(){var t=mc()-1;if(t<=0)document.body.removeAttribute(Zt);else document.body.setAttribute(Zt,t.toString())}},[])},zr=function(t){var{noRelative:f,noImportant:m,gapMode:h}=t,v=h===void 0?"margin":h;nu();var R=qt.useMemo(function(){return $r(v)},[v]);return qt.createElement(eu,{styles:tu(R,!f,v,!m?"!important":"")})};var Hr=!1;if(typeof window<"u")try{Qt=Object.defineProperty({},"passive",{get:function(){return Hr=!0,!0}}),window.addEventListener("test",Qt,Qt),window.removeEventListener("test",Qt,Qt)}catch(t){Hr=!1}var Qt,kt=Hr?{passive:!1}:!1;var ru=function(t){return t.tagName==="TEXTAREA"},pc=function(t,f){if(!(t instanceof Element))return!1;var m=window.getComputedStyle(t);return m[f]!=="hidden"&&!(m.overflowY===m.overflowX&&!ru(t)&&m[f]==="visible")},ou=function(t){return pc(t,"overflowY")},iu=function(t){return pc(t,"overflowX")},Ur=function(t,f){var m=f.ownerDocument,h=f;do{if(typeof ShadowRoot<"u"&&h instanceof ShadowRoot)h=h.host;var v=hc(t,h);if(v){var R=vc(t,h),w=R[1],b=R[2];if(w>b)return!0}h=h.parentNode}while(h&&h!==m.body);return!1},cu=function(t){var{scrollTop:f,scrollHeight:m,clientHeight:h}=t;return[f,m,h]},su=function(t){var{scrollLeft:f,scrollWidth:m,clientWidth:h}=t;return[f,m,h]},hc=function(t,f){return t==="v"?ou(f):iu(f)},vc=function(t,f){return t==="v"?cu(f):su(f)},au=function(t,f){return t==="h"&&f==="rtl"?-1:1},gc=function(t,f,m,h,v){var R=au(t,window.getComputedStyle(f).direction),w=R*h,b=m.target,E=f.contains(b),A=!1,I=w>0,S=0,O=0;do{if(!b)break;var M=vc(t,b),T=M[0],L=M[1],F=M[2],B=L-F-R*T;if(T||B){if(hc(t,b))S+=B,O+=T}var k=b.parentNode;b=k&&k.nodeType===Node.DOCUMENT_FRAGMENT_NODE?k.host:k}while(!E&&b!==document.body||E&&(f.contains(b)||f===b));if(I&&(v&&Math.abs(S)<1||!v&&w>S))A=!0;else if(!I&&(v&&Math.abs(O)<1||!v&&-w>O))A=!0;return A};var zn=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},yc=function(t){return[t.deltaX,t.deltaY]},Rc=function(t){return t&&"current"in t?t.current:t},uu=function(t,f){return t[0]===f[0]&&t[1]===f[1]},lu=function(t){return`
38
+ `)},mc=function(){var t=parseInt(document.body.getAttribute(Zt)||"0",10);return isFinite(t)?t:0},nu=function(){qt.useEffect(function(){return document.body.setAttribute(Zt,(mc()+1).toString()),function(){var t=mc()-1;if(t<=0)document.body.removeAttribute(Zt);else document.body.setAttribute(Zt,t.toString())}},[])},zr=function(t){var{noRelative:f,noImportant:m,gapMode:h}=t,v=h===void 0?"margin":h;nu();var R=qt.useMemo(function(){return $r(v)},[v]);return qt.createElement(eu,{styles:tu(R,!f,v,!m?"!important":"")})};var Hr=!1;if(typeof window<"u")try{Qt=Object.defineProperty({},"passive",{get:function(){return Hr=!0,!0}}),window.addEventListener("test",Qt,Qt),window.removeEventListener("test",Qt,Qt)}catch(t){Hr=!1}var Qt,kt=Hr?{passive:!1}:!1;var ru=function(t){return t.tagName==="TEXTAREA"},pc=function(t,f){if(!(t instanceof Element))return!1;var m=window.getComputedStyle(t);return m[f]!=="hidden"&&!(m.overflowY===m.overflowX&&!ru(t)&&m[f]==="visible")},ou=function(t){return pc(t,"overflowY")},iu=function(t){return pc(t,"overflowX")},Ur=function(t,f){var m=f.ownerDocument,h=f;do{if(typeof ShadowRoot<"u"&&h instanceof ShadowRoot)h=h.host;var v=hc(t,h);if(v){var R=vc(t,h),w=R[1],b=R[2];if(w>b)return!0}h=h.parentNode}while(h&&h!==m.body);return!1},cu=function(t){var{scrollTop:f,scrollHeight:m,clientHeight:h}=t;return[f,m,h]},su=function(t){var{scrollLeft:f,scrollWidth:m,clientWidth:h}=t;return[f,m,h]},hc=function(t,f){return t==="v"?ou(f):iu(f)},vc=function(t,f){return t==="v"?cu(f):su(f)},au=function(t,f){return t==="h"&&f==="rtl"?-1:1},gc=function(t,f,m,h,v){var R=au(t,window.getComputedStyle(f).direction),w=R*h,b=m.target,E=f.contains(b),M=!1,T=w>0,S=0,A=0;do{if(!b)break;var I=vc(t,b),L=I[0],N=I[1],F=I[2],V=N-F-R*L;if(L||V){if(hc(t,b))S+=V,A+=L}var k=b.parentNode;b=k&&k.nodeType===Node.DOCUMENT_FRAGMENT_NODE?k.host:k}while(!E&&b!==document.body||E&&(f.contains(b)||f===b));if(T&&(v&&Math.abs(S)<1||!v&&w>S))M=!0;else if(!T&&(v&&Math.abs(A)<1||!v&&-w>A))M=!0;return M};var zn=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},yc=function(t){return[t.deltaX,t.deltaY]},Rc=function(t){return t&&"current"in t?t.current:t},uu=function(t,f){return t[0]===f[0]&&t[1]===f[1]},lu=function(t){return`
39
39
  .block-interactivity-`.concat(t,` {pointer-events: none;}
40
40
  .allow-interactivity-`).concat(t,` {pointer-events: all;}
41
- `)},fu=0,Jt=[];function wc(t){var f=Fe.useRef([]),m=Fe.useRef([0,0]),h=Fe.useRef(),v=Fe.useState(fu++)[0],R=Fe.useState(dn)[0],w=Fe.useRef(t);Fe.useEffect(function(){w.current=t},[t]),Fe.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(v));var L=ic([t.lockRef.current],(t.shards||[]).map(Rc),!0).filter(Boolean);return L.forEach(function(F){return F.classList.add("allow-interactivity-".concat(v))}),function(){document.body.classList.remove("block-interactivity-".concat(v)),L.forEach(function(F){return F.classList.remove("allow-interactivity-".concat(v))})}}return},[t.inert,t.lockRef.current,t.shards]);var b=Fe.useCallback(function(L,F){if("touches"in L&&L.touches.length===2||L.type==="wheel"&&L.ctrlKey)return!w.current.allowPinchZoom;var B=zn(L),k=m.current,j="deltaX"in L?L.deltaX:k[0]-B[0],V="deltaY"in L?L.deltaY:k[1]-B[1],H,U=L.target,Y=Math.abs(j)>Math.abs(V)?"h":"v";if("touches"in L&&Y==="h"&&U.type==="range")return!1;var re=window.getSelection(),Z=re&&re.anchorNode,ae=Z?Z===U||Z.contains(U):!1;if(ae)return!1;var he=Ur(Y,U);if(!he)return!0;if(he)H=Y;else H=Y==="v"?"h":"v",he=Ur(Y,U);if(!he)return!1;if(!h.current&&"changedTouches"in L&&(j||V))h.current=H;if(!H)return!0;var oe=h.current||H;return gc(oe,F,L,oe==="h"?j:V,!0)},[]),E=Fe.useCallback(function(L){var F=L;if(!Jt.length||Jt[Jt.length-1]!==R)return;var B="deltaY"in F?yc(F):zn(F),k=f.current.filter(function(H){return H.name===F.type&&(H.target===F.target||F.target===H.shadowParent)&&uu(H.delta,B)})[0];if(k&&k.should){if(F.cancelable)F.preventDefault();return}if(!k){var j=(w.current.shards||[]).map(Rc).filter(Boolean).filter(function(H){return H.contains(F.target)}),V=j.length>0?b(F,j[0]):!w.current.noIsolation;if(V){if(F.cancelable)F.preventDefault()}}},[]),A=Fe.useCallback(function(L,F,B,k){var j={name:L,delta:F,target:B,should:k,shadowParent:du(B)};f.current.push(j),setTimeout(function(){f.current=f.current.filter(function(V){return V!==j})},1)},[]),I=Fe.useCallback(function(L){m.current=zn(L),h.current=void 0},[]),S=Fe.useCallback(function(L){A(L.type,yc(L),L.target,b(L,t.lockRef.current))},[]),O=Fe.useCallback(function(L){A(L.type,zn(L),L.target,b(L,t.lockRef.current))},[]);Fe.useEffect(function(){return Jt.push(R),t.setCallbacks({onScrollCapture:S,onWheelCapture:S,onTouchMoveCapture:O}),document.addEventListener("wheel",E,kt),document.addEventListener("touchmove",E,kt),document.addEventListener("touchstart",I,kt),function(){Jt=Jt.filter(function(L){return L!==R}),document.removeEventListener("wheel",E,kt),document.removeEventListener("touchmove",E,kt),document.removeEventListener("touchstart",I,kt)}},[]);var{removeScrollBar:M,inert:T}=t;return Fe.createElement(Fe.Fragment,null,T?Fe.createElement(R,{styles:lu(v)}):null,M?Fe.createElement(zr,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function du(t){var f=null;while(t!==null){if(t instanceof ShadowRoot)f=t.host,t=t.host;t=t.parentNode}return f}var bc=kr($n,wc);var xc=Hn.forwardRef(function(t,f){return Hn.createElement(fn,qe({},t,{ref:f,sideCar:bc}))});xc.classNames=fn.classNames;var J=xc;import{jsx as ce}from"react/jsx-runtime";var mu=Object.defineProperty,de=(t,f)=>mu(t,"name",{value:f,configurable:!0}),Gr=["Enter"," "],pu=["ArrowDown","PageUp","Home"],Cc=["ArrowUp","PageDown","End"],hu=[...pu,...Cc],vu={ltr:[...Gr,"ArrowRight"],rtl:[...Gr,"ArrowLeft"]},gu={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Gn="Menu",[mn,yu,Ru]=y(Gn),[jt,ee]=i(Gn,[Ru,_,C]),Kn=_(),Ec=C(),[Pc,Ct]=jt(Gn),[wu,hn]=jt(Gn),bu=de((t)=>{let{__scopeMenu:f,open:m=!1,children:h,dir:v,onOpenChange:R,modal:w=!0}=t,b=Kn(f),[E,A]=X.useState(null),I=X.useRef(!1),S=u(R),O=g(v);return X.useEffect(()=>{let M=de(()=>{I.current=!0,document.addEventListener("pointerdown",T,{capture:!0,once:!0}),document.addEventListener("pointermove",T,{capture:!0,once:!0})},"handleKeyDown"),T=de(()=>I.current=!1,"handlePointer");return document.addEventListener("keydown",M,{capture:!0}),()=>{document.removeEventListener("keydown",M,{capture:!0}),document.removeEventListener("pointerdown",T,{capture:!0}),document.removeEventListener("pointermove",T,{capture:!0})}},[]),X.useEffect(()=>{if(!m)return;let M=de(()=>S(!1),"handleBlur");return window.addEventListener("blur",M),()=>window.removeEventListener("blur",M)},[m,S]),ce(ie,{...b,children:ce(Pc,{scope:f,open:m,onOpenChange:S,content:E,onContentChange:A,children:ce(wu,{scope:f,onClose:X.useCallback(()=>S(!1),[S]),isUsingKeyboardRef:I,dir:O,modal:w,children:h})})})},"Menu"),Oc=X.forwardRef(de(function(f,m){let{__scopeMenu:h,...v}=f,R=Kn(h);return ce(se,{...R,...v,ref:m})},"MenuAnchor")),_c="MenuPortal",[xu,Ac]=jt(_c,{forceMount:void 0}),Su=de((t)=>{let{__scopeMenu:f,forceMount:m,children:h,container:v}=t,R=Ct(_c,f);return ce(xu,{scope:f,forceMount:m,children:ce(d,{present:m||R.open,children:ce(W,{asChild:!0,container:v,children:h})})})},"MenuPortal"),ut="MenuContent",[Cu,Yr]=jt(ut),Eu=X.forwardRef(de(function(f,m){let h=Ac(ut,f.__scopeMenu),{forceMount:v=h.forceMount,...R}=f,w=Ct(ut,f.__scopeMenu),b=hn(ut,f.__scopeMenu);return ce(mn.Provider,{scope:f.__scopeMenu,children:ce(d,{present:v||w.open,children:ce(mn.Slot,{scope:f.__scopeMenu,children:b.modal?ce(Pu,{...R,ref:m}):ce(Ou,{...R,ref:m})})})})},"MenuContent")),Pu=X.forwardRef(de(function(f,m){let h=Ct(ut,f.__scopeMenu),v=X.useRef(null),R=a(m,v);return X.useEffect(()=>{let w=v.current;if(w)return le(w)},[]),ce(Xr,{...f,ref:R,trapFocus:h.open,disableOutsidePointerEvents:h.open,disableOutsideScroll:!0,onFocusOutside:r(f.onFocusOutside,(w)=>w.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>h.onOpenChange(!1)})},"MenuRootContentModal")),Ou=X.forwardRef(de(function(f,m){let h=Ct(ut,f.__scopeMenu);return ce(Xr,{...f,ref:m,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>h.onOpenChange(!1)})},"MenuRootContentNonModal")),_u=x("MenuContent.ScrollLock"),Xr=X.forwardRef(de(function(f,m){let{__scopeMenu:h,loop:v=!1,trapFocus:R,onOpenAutoFocus:w,onCloseAutoFocus:b,disableOutsidePointerEvents:E,onEntryFocus:A,onEscapeKeyDown:I,onPointerDownOutside:S,onFocusOutside:O,onInteractOutside:M,onDismiss:T,disableOutsideScroll:L,...F}=f,B=Ct(ut,h),k=hn(ut,h),j=Kn(h),V=Ec(h),H=yu(h),[U,Y]=X.useState(null),re=X.useRef(null),Z=a(m,re,B.onContentChange),ae=X.useRef(0),he=X.useRef(""),oe=X.useRef(0),ue=X.useRef(null),pe=X.useRef("right"),je=X.useRef(0),ge=L?J:X.Fragment,fe=L?{as:_u,allowPinchZoom:!0}:void 0,me=de((te)=>{let ht=he.current+te,lt=H().filter((Ke)=>!Ke.disabled),bt=document.activeElement,tn=lt.find((Ke)=>Ke.ref.current===bt)?.textValue,nn=lt.map((Ke)=>Ke.textValue),vn=jc(nn,ht,tn),Et=lt.find((Ke)=>Ke.textValue===vn)?.ref.current;if(de(function Ke(Bt){if(he.current=Bt,window.clearTimeout(ae.current),Bt!=="")ae.current=window.setTimeout(()=>Ke(""),1000)},"updateSearch")(ht),Et)setTimeout(()=>Et.focus())},"handleTypeaheadSearch");X.useEffect(()=>()=>window.clearTimeout(ae.current),[]),z();let Oe=X.useCallback((te)=>pe.current===ue.current?.side&&Wc(te,ue.current?.area),[]);return ce(Cu,{scope:h,searchRef:he,onItemEnter:X.useCallback((te)=>{if(Oe(te))te.preventDefault()},[Oe]),onItemLeave:X.useCallback((te)=>{if(Oe(te))return;re.current?.focus(),Y(null)},[Oe]),onTriggerLeave:X.useCallback((te)=>{if(Oe(te))te.preventDefault()},[Oe]),pointerGraceTimerRef:oe,onPointerGraceIntentChange:X.useCallback((te)=>{ue.current=te},[]),children:ce(ge,{...fe,children:ce(ne,{asChild:!0,trapped:R,onMountAutoFocus:r(w,(te)=>{te.preventDefault(),re.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:b,children:ce(D,{asChild:!0,disableOutsidePointerEvents:E,onEscapeKeyDown:I,onPointerDownOutside:S,onFocusOutside:O,onInteractOutside:M,onDismiss:T,children:ce(q,{asChild:!0,...V,dir:k.dir,orientation:"vertical",loop:v,currentTabStopId:U,onCurrentTabStopIdChange:Y,onEntryFocus:r(A,(te)=>{if(!k.isUsingKeyboardRef.current)te.preventDefault()}),preventScrollOnEntryFocus:!0,children:ce(ye,{role:"menu","aria-orientation":"vertical","data-state":qr(B.open),"data-radix-menu-content":"",dir:k.dir,...j,...F,ref:Z,style:{outline:"none",...F.style},onKeyDown:r(F.onKeyDown,(te)=>{let lt=te.target.closest("[data-radix-menu-content]")===te.currentTarget,bt=te.ctrlKey||te.altKey||te.metaKey,tn=te.key.length===1;if(lt){if(te.key==="Tab")te.preventDefault();if(!bt&&tn)me(te.key)}let nn=re.current;if(te.target!==nn)return;if(!hu.includes(te.key))return;te.preventDefault();let Et=H().filter((Ke)=>!Ke.disabled).map((Ke)=>Ke.ref.current);if(Cc.includes(te.key))Et.reverse();Fc(Et)}),onBlur:r(f.onBlur,(te)=>{if(!te.currentTarget.contains(te.target))window.clearTimeout(ae.current),he.current=""}),onPointerMove:r(f.onPointerMove,en((te)=>{let ht=te.target,lt=je.current!==te.clientX;if(te.currentTarget.contains(ht)&&lt){let bt=te.clientX>je.current?"right":"left";pe.current=bt,je.current=te.clientX}}))})})})})})})},"MenuContentImpl")),Mc=X.forwardRef(de(function(f,m){let{__scopeMenu:h,...v}=f;return ce(o.div,{role:"group",...v,ref:m})},"MenuGroup")),Au=X.forwardRef(de(function(f,m){let{__scopeMenu:h,...v}=f;return ce(o.div,{...v,ref:m})},"MenuLabel")),Kr="MenuItem",Sc="menu.itemSelect",Zr=X.forwardRef(de(function(f,m){let{disabled:h=!1,onSelect:v,...R}=f,w=X.useRef(null),b=hn(Kr,f.__scopeMenu),E=Yr(Kr,f.__scopeMenu),A=a(m,w),I=X.useRef(!1),S=de(()=>{let O=w.current;if(!h&&O){let M=new CustomEvent(Sc,{bubbles:!0,cancelable:!0});if(O.addEventListener(Sc,(T)=>v?.(T),{once:!0}),be(O,M),M.defaultPrevented)I.current=!1;else b.onClose()}},"handleSelect");return ce(Ic,{...R,ref:A,disabled:h,onClick:r(f.onClick,S),onPointerDown:(O)=>{f.onPointerDown?.(O),I.current=!0},onPointerUp:r(f.onPointerUp,(O)=>{if(!I.current)O.currentTarget?.click()}),onKeyDown:r(f.onKeyDown,(O)=>{if(h||O.target!==O.currentTarget)return;if(E.searchRef.current!==""&&O.key===" ")return;if(Gr.includes(O.key))O.currentTarget.click(),O.preventDefault()})})},"MenuItem")),Ic=X.forwardRef(de(function(f,m){let{__scopeMenu:h,disabled:v=!1,textValue:R,...w}=f,b=Yr(Kr,h),E=Ec(h),A=X.useRef(null),I=a(m,A),[S,O]=X.useState(!1),[M,T]=X.useState("");return X.useEffect(()=>{let L=A.current;if(L)T((L.textContent??"").trim())},[w.children]),ce(mn.ItemSlot,{scope:h,disabled:v,textValue:R??M,children:ce(K,{asChild:!0,...E,focusable:!v,children:ce(o.div,{role:"menuitem","data-highlighted":S?"":void 0,"aria-disabled":v||void 0,"data-disabled":v?"":void 0,...w,ref:I,onPointerMove:r(f.onPointerMove,en((L)=>{if(v)b.onItemLeave(L);else if(b.onItemEnter(L),!L.defaultPrevented)L.currentTarget.focus({preventScroll:!0})})),onPointerLeave:r(f.onPointerLeave,en((L)=>b.onItemLeave(L))),onFocus:r(f.onFocus,()=>O(!0)),onBlur:r(f.onBlur,()=>O(!1))})})})},"MenuItemImpl")),Mu=X.forwardRef(de(function(f,m){let{checked:h=!1,onCheckedChange:v,...R}=f;return ce(Dc,{scope:f.__scopeMenu,checked:h,children:ce(Zr,{role:"menuitemcheckbox","aria-checked":pn(h)?"mixed":h,...R,ref:m,"data-state":Yn(h),onSelect:r(R.onSelect,()=>v?.(pn(h)?!0:!h),{checkForDefaultPrevented:!1})})})},"MenuCheckboxItem")),Iu="MenuRadioGroup",[Tu,Du]=jt(Iu,{value:void 0,onValueChange:de(()=>{},"onValueChange")}),Lu=X.forwardRef(de(function(f,m){let{value:h,onValueChange:v,...R}=f,w=u(v);return ce(Tu,{scope:f.__scopeMenu,value:h,onValueChange:w,children:ce(Mc,{...R,ref:m})})},"MenuRadioGroup")),Nu="MenuRadioItem",Fu=X.forwardRef(de(function(f,m){let{value:h,...v}=f,R=Du(Nu,f.__scopeMenu),w=h===R.value;return ce(Dc,{scope:f.__scopeMenu,checked:w,children:ce(Zr,{role:"menuitemradio","aria-checked":w,...v,ref:m,"data-state":Yn(w),onSelect:r(v.onSelect,()=>R.onValueChange?.(h),{checkForDefaultPrevented:!1})})})},"MenuRadioItem")),Tc="MenuItemIndicator",[Dc,ku]=jt(Tc,{checked:!1}),ju=X.forwardRef(de(function(f,m){let{__scopeMenu:h,forceMount:v,...R}=f,w=ku(Tc,h);return ce(d,{present:v||pn(w.checked)||w.checked===!0,children:ce(o.span,{...R,ref:m,"data-state":Yn(w.checked)})})},"MenuItemIndicator")),Bu=X.forwardRef(de(function(f,m){let{__scopeMenu:h,...v}=f;return ce(o.div,{role:"separator","aria-orientation":"horizontal",...v,ref:m})},"MenuSeparator"));var Lc="MenuSub",[Wu,Nc]=jt(Lc),Vu=de((t)=>{let{__scopeMenu:f,children:m,open:h=!1,onOpenChange:v}=t,R=Ct(Lc,f),w=Kn(f),[b,E]=X.useState(null),[A,I]=X.useState(null),S=u(v);return X.useEffect(()=>{if(R.open===!1)S(!1);return()=>S(!1)},[R.open,S]),ce(ie,{...w,children:ce(Pc,{scope:f,open:h,onOpenChange:S,content:A,onContentChange:I,children:ce(Wu,{scope:f,contentId:c(),triggerId:c(),trigger:b,onTriggerChange:E,children:m})})})},"MenuSub"),Un="MenuSubTrigger",$u=X.forwardRef(de(function(f,m){let h=Ct(Un,f.__scopeMenu),v=hn(Un,f.__scopeMenu),R=Nc(Un,f.__scopeMenu),w=Yr(Un,f.__scopeMenu),b=X.useRef(null),{pointerGraceTimerRef:E,onPointerGraceIntentChange:A}=w,I={__scopeMenu:f.__scopeMenu},S=X.useCallback(()=>{if(b.current)window.clearTimeout(b.current);b.current=null},[]);X.useEffect(()=>S,[S]),X.useEffect(()=>{let M=E.current;return()=>{window.clearTimeout(M),A(null)}},[E,A]);let O=a(m,R.onTriggerChange);return ce(Oc,{asChild:!0,...I,children:ce(Ic,{id:R.triggerId,"aria-haspopup":"menu","aria-expanded":h.open,"aria-controls":h.open?R.contentId:void 0,"data-state":qr(h.open),...f,ref:O,onClick:(M)=>{if(f.onClick?.(M),f.disabled||M.defaultPrevented)return;if(M.currentTarget.focus(),!h.open)h.onOpenChange(!0)},onPointerMove:r(f.onPointerMove,en((M)=>{if(w.onItemEnter(M),M.defaultPrevented)return;if(!f.disabled&&!h.open&&!b.current)w.onPointerGraceIntentChange(null),b.current=window.setTimeout(()=>{h.onOpenChange(!0),S()},100)})),onPointerLeave:r(f.onPointerLeave,en((M)=>{S();let T=h.content?.getBoundingClientRect();if(T){let L=h.content?.dataset.side,F=L==="right",B=F?-5:5,k=T[F?"left":"right"],j=T[F?"right":"left"];w.onPointerGraceIntentChange({area:[{x:M.clientX+B,y:M.clientY},{x:k,y:T.top},{x:j,y:T.top},{x:j,y:T.bottom},{x:k,y:T.bottom}],side:L}),window.clearTimeout(E.current),E.current=window.setTimeout(()=>w.onPointerGraceIntentChange(null),300)}else{if(w.onTriggerLeave(M),M.defaultPrevented)return;w.onPointerGraceIntentChange(null)}})),onKeyDown:r(f.onKeyDown,(M)=>{if(f.disabled||M.target!==M.currentTarget)return;if(w.searchRef.current!==""&&M.key===" ")return;if(vu[v.dir].includes(M.key))h.onOpenChange(!0),h.content?.focus(),M.preventDefault()})})})},"MenuSubTrigger")),zu="MenuSubContent",Hu=X.forwardRef(de(function(f,m){let h=Ac(ut,f.__scopeMenu),{forceMount:v=h.forceMount,align:R="start",...w}=f,b=Ct(ut,f.__scopeMenu),E=hn(ut,f.__scopeMenu),A=Nc(zu,f.__scopeMenu),I=X.useRef(null),S=a(m,I);return ce(mn.Provider,{scope:f.__scopeMenu,children:ce(d,{present:v||b.open,children:ce(mn.Slot,{scope:f.__scopeMenu,children:ce(Xr,{id:A.contentId,"aria-labelledby":A.triggerId,...w,ref:S,align:R,side:E.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:(O)=>{if(E.isUsingKeyboardRef.current)I.current?.focus();O.preventDefault()},onCloseAutoFocus:(O)=>O.preventDefault(),onFocusOutside:r(f.onFocusOutside,(O)=>{if(O.target!==A.trigger)b.onOpenChange(!1)}),onEscapeKeyDown:r(f.onEscapeKeyDown,(O)=>{E.onClose(),O.preventDefault()}),onKeyDown:r(f.onKeyDown,(O)=>{let M=O.currentTarget.contains(O.target),T=gu[E.dir].includes(O.key);if(M&&T)b.onOpenChange(!1),A.trigger?.focus(),O.preventDefault()})})})})})},"MenuSubContent"));function qr(t){return t?"open":"closed"}de(qr,"getOpenState");function pn(t){return t==="indeterminate"}de(pn,"isIndeterminate");function Yn(t){return pn(t)?"indeterminate":t?"checked":"unchecked"}de(Yn,"getCheckedState");function Fc(t){let f=document.activeElement;for(let m of t){if(m===f)return;if(m.focus(),document.activeElement!==f)return}}de(Fc,"focusFirst");function kc(t,f){return t.map((m,h)=>t[(f+h)%t.length])}de(kc,"wrapArray");function jc(t,f,m){let v=f.length>1&&Array.from(f).every((A)=>A===f[0])?f[0]:f,R=m?t.indexOf(m):-1,w=kc(t,Math.max(R,0));if(v.length===1)w=w.filter((A)=>A!==m);let E=w.find((A)=>A.toLowerCase().startsWith(v.toLowerCase()));return E!==m?E:void 0}de(jc,"getNextMatch");function Bc(t,f){let{x:m,y:h}=t,v=!1;for(let R=0,w=f.length-1;R<f.length;w=R++){let b=f[R],E=f[w],{x:A,y:I}=b,{x:S,y:O}=E;if(I>h!==O>h&&m<(S-A)*(h-I)/(O-I)+A)v=!v}return v}de(Bc,"isPointInPolygon");function Wc(t,f){if(!f)return!1;let m={x:t.clientX,y:t.clientY};return Bc(m,f)}de(Wc,"isPointerInGraceArea");function en(t){return(f)=>f.pointerType==="mouse"?t(f):void 0}de(en,"whenMouse");var Se=bu,Ce=Oc,we=Su,Re=Eu,Le=Mc,Ie=Au,Pe=Zr,Te=Mu,ke=Lu,Ee=Fu,Me=ju,De=Bu;var Ae=Vu,Ne=$u,_e=Hu;
42
- export{xe,a,x,P,lr,p,G,n,Q,r,i,o,be,y,g,u,D,cr,z,ne,l,c,N,_,ie,se,ye,xt,W,d,s,C,q,K,le,J,ee,Se,Ce,we,Re,Le,Ie,Pe,Te,ke,Ee,Me,De,Ae,Ne,_e};
41
+ `)},fu=0,Jt=[];function wc(t){var f=Fe.useRef([]),m=Fe.useRef([0,0]),h=Fe.useRef(),v=Fe.useState(fu++)[0],R=Fe.useState(dn)[0],w=Fe.useRef(t);Fe.useEffect(function(){w.current=t},[t]),Fe.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(v));var N=ic([t.lockRef.current],(t.shards||[]).map(Rc),!0).filter(Boolean);return N.forEach(function(F){return F.classList.add("allow-interactivity-".concat(v))}),function(){document.body.classList.remove("block-interactivity-".concat(v)),N.forEach(function(F){return F.classList.remove("allow-interactivity-".concat(v))})}}return},[t.inert,t.lockRef.current,t.shards]);var b=Fe.useCallback(function(N,F){if("touches"in N&&N.touches.length===2||N.type==="wheel"&&N.ctrlKey)return!w.current.allowPinchZoom;var V=zn(N),k=m.current,B="deltaX"in N?N.deltaX:k[0]-V[0],H="deltaY"in N?N.deltaY:k[1]-V[1],U,G=N.target,Y=Math.abs(B)>Math.abs(H)?"h":"v";if("touches"in N&&Y==="h"&&G.type==="range")return!1;var re=window.getSelection(),Z=re&&re.anchorNode,ae=Z?Z===G||Z.contains(G):!1;if(ae)return!1;var he=Ur(Y,G);if(!he)return!0;if(he)U=Y;else U=Y==="v"?"h":"v",he=Ur(Y,G);if(!he)return!1;if(!h.current&&"changedTouches"in N&&(B||H))h.current=U;if(!U)return!0;var oe=h.current||U;return gc(oe,F,N,oe==="h"?B:H,!0)},[]),E=Fe.useCallback(function(N){var F=N;if(!Jt.length||Jt[Jt.length-1]!==R)return;var V="deltaY"in F?yc(F):zn(F),k=f.current.filter(function(U){return U.name===F.type&&(U.target===F.target||F.target===U.shadowParent)&&uu(U.delta,V)})[0];if(k&&k.should){if(F.cancelable)F.preventDefault();return}if(!k){var B=(w.current.shards||[]).map(Rc).filter(Boolean).filter(function(U){return U.contains(F.target)}),H=B.length>0?b(F,B[0]):!w.current.noIsolation;if(H){if(F.cancelable)F.preventDefault()}}},[]),M=Fe.useCallback(function(N,F,V,k){var B={name:N,delta:F,target:V,should:k,shadowParent:du(V)};f.current.push(B),setTimeout(function(){f.current=f.current.filter(function(H){return H!==B})},1)},[]),T=Fe.useCallback(function(N){m.current=zn(N),h.current=void 0},[]),S=Fe.useCallback(function(N){M(N.type,yc(N),N.target,b(N,t.lockRef.current))},[]),A=Fe.useCallback(function(N){M(N.type,zn(N),N.target,b(N,t.lockRef.current))},[]);Fe.useEffect(function(){return Jt.push(R),t.setCallbacks({onScrollCapture:S,onWheelCapture:S,onTouchMoveCapture:A}),document.addEventListener("wheel",E,kt),document.addEventListener("touchmove",E,kt),document.addEventListener("touchstart",T,kt),function(){Jt=Jt.filter(function(N){return N!==R}),document.removeEventListener("wheel",E,kt),document.removeEventListener("touchmove",E,kt),document.removeEventListener("touchstart",T,kt)}},[]);var{removeScrollBar:I,inert:L}=t;return Fe.createElement(Fe.Fragment,null,L?Fe.createElement(R,{styles:lu(v)}):null,I?Fe.createElement(zr,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function du(t){var f=null;while(t!==null){if(t instanceof ShadowRoot)f=t.host,t=t.host;t=t.parentNode}return f}var bc=kr($n,wc);var xc=Hn.forwardRef(function(t,f){return Hn.createElement(fn,qe({},t,{ref:f,sideCar:bc}))});xc.classNames=fn.classNames;var J=xc;import{jsx as ce}from"react/jsx-runtime";var mu=Object.defineProperty,de=(t,f)=>mu(t,"name",{value:f,configurable:!0}),Gr=["Enter"," "],pu=["ArrowDown","PageUp","Home"],Cc=["ArrowUp","PageDown","End"],hu=[...pu,...Cc],vu={ltr:[...Gr,"ArrowRight"],rtl:[...Gr,"ArrowLeft"]},gu={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Gn="Menu",[mn,yu,Ru]=y(Gn),[jt,ee]=i(Gn,[Ru,O,C]),Kn=O(),Ec=C(),[Pc,Ct]=jt(Gn),[wu,hn]=jt(Gn),bu=de((t)=>{let{__scopeMenu:f,open:m=!1,children:h,dir:v,onOpenChange:R,modal:w=!0}=t,b=Kn(f),[E,M]=X.useState(null),T=X.useRef(!1),S=u(R),A=g(v);return X.useEffect(()=>{let I=de(()=>{T.current=!0,document.addEventListener("pointerdown",L,{capture:!0,once:!0}),document.addEventListener("pointermove",L,{capture:!0,once:!0})},"handleKeyDown"),L=de(()=>T.current=!1,"handlePointer");return document.addEventListener("keydown",I,{capture:!0}),()=>{document.removeEventListener("keydown",I,{capture:!0}),document.removeEventListener("pointerdown",L,{capture:!0}),document.removeEventListener("pointermove",L,{capture:!0})}},[]),X.useEffect(()=>{if(!m)return;let I=de(()=>S(!1),"handleBlur");return window.addEventListener("blur",I),()=>window.removeEventListener("blur",I)},[m,S]),ce(ie,{...b,children:ce(Pc,{scope:f,open:m,onOpenChange:S,content:E,onContentChange:M,children:ce(wu,{scope:f,onClose:X.useCallback(()=>S(!1),[S]),isUsingKeyboardRef:T,dir:A,modal:w,children:h})})})},"Menu"),Oc=X.forwardRef(de(function(f,m){let{__scopeMenu:h,...v}=f,R=Kn(h);return ce(se,{...R,...v,ref:m})},"MenuAnchor")),_c="MenuPortal",[xu,Ac]=jt(_c,{forceMount:void 0}),Su=de((t)=>{let{__scopeMenu:f,forceMount:m,children:h,container:v}=t,R=Ct(_c,f);return ce(xu,{scope:f,forceMount:m,children:ce(d,{present:m||R.open,children:ce(q,{asChild:!0,container:v,children:h})})})},"MenuPortal"),ut="MenuContent",[Cu,Yr]=jt(ut),Eu=X.forwardRef(de(function(f,m){let h=Ac(ut,f.__scopeMenu),{forceMount:v=h.forceMount,...R}=f,w=Ct(ut,f.__scopeMenu),b=hn(ut,f.__scopeMenu);return ce(mn.Provider,{scope:f.__scopeMenu,children:ce(d,{present:v||w.open,children:ce(mn.Slot,{scope:f.__scopeMenu,children:b.modal?ce(Pu,{...R,ref:m}):ce(Ou,{...R,ref:m})})})})},"MenuContent")),Pu=X.forwardRef(de(function(f,m){let h=Ct(ut,f.__scopeMenu),v=X.useRef(null),R=a(m,v);return X.useEffect(()=>{let w=v.current;if(w)return le(w)},[]),ce(Xr,{...f,ref:R,trapFocus:h.open,disableOutsidePointerEvents:h.open,disableOutsideScroll:!0,onFocusOutside:r(f.onFocusOutside,(w)=>w.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>h.onOpenChange(!1)})},"MenuRootContentModal")),Ou=X.forwardRef(de(function(f,m){let h=Ct(ut,f.__scopeMenu);return ce(Xr,{...f,ref:m,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>h.onOpenChange(!1)})},"MenuRootContentNonModal")),_u=x("MenuContent.ScrollLock"),Xr=X.forwardRef(de(function(f,m){let{__scopeMenu:h,loop:v=!1,trapFocus:R,onOpenAutoFocus:w,onCloseAutoFocus:b,disableOutsidePointerEvents:E,onEntryFocus:M,onEscapeKeyDown:T,onPointerDownOutside:S,onFocusOutside:A,onInteractOutside:I,onDismiss:L,disableOutsideScroll:N,...F}=f,V=Ct(ut,h),k=hn(ut,h),B=Kn(h),H=Ec(h),U=yu(h),[G,Y]=X.useState(null),re=X.useRef(null),Z=a(m,re,V.onContentChange),ae=X.useRef(0),he=X.useRef(""),oe=X.useRef(0),ue=X.useRef(null),pe=X.useRef("right"),je=X.useRef(0),ge=N?J:X.Fragment,fe=N?{as:_u,allowPinchZoom:!0}:void 0,me=de((te)=>{let ht=he.current+te,lt=U().filter((Ke)=>!Ke.disabled),bt=document.activeElement,tn=lt.find((Ke)=>Ke.ref.current===bt)?.textValue,nn=lt.map((Ke)=>Ke.textValue),vn=jc(nn,ht,tn),Et=lt.find((Ke)=>Ke.textValue===vn)?.ref.current;if(de(function Ke(Bt){if(he.current=Bt,window.clearTimeout(ae.current),Bt!=="")ae.current=window.setTimeout(()=>Ke(""),1000)},"updateSearch")(ht),Et)setTimeout(()=>Et.focus())},"handleTypeaheadSearch");X.useEffect(()=>()=>window.clearTimeout(ae.current),[]),W();let Oe=X.useCallback((te)=>pe.current===ue.current?.side&&Wc(te,ue.current?.area),[]);return ce(Cu,{scope:h,searchRef:he,onItemEnter:X.useCallback((te)=>{if(Oe(te))te.preventDefault()},[Oe]),onItemLeave:X.useCallback((te)=>{if(Oe(te))return;re.current?.focus(),Y(null)},[Oe]),onTriggerLeave:X.useCallback((te)=>{if(Oe(te))te.preventDefault()},[Oe]),pointerGraceTimerRef:oe,onPointerGraceIntentChange:X.useCallback((te)=>{ue.current=te},[]),children:ce(ge,{...fe,children:ce(ne,{asChild:!0,trapped:R,onMountAutoFocus:r(w,(te)=>{te.preventDefault(),re.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:b,children:ce(D,{asChild:!0,disableOutsidePointerEvents:E,onEscapeKeyDown:T,onPointerDownOutside:S,onFocusOutside:A,onInteractOutside:I,onDismiss:L,children:ce(K,{asChild:!0,...H,dir:k.dir,orientation:"vertical",loop:v,currentTabStopId:G,onCurrentTabStopIdChange:Y,onEntryFocus:r(M,(te)=>{if(!k.isUsingKeyboardRef.current)te.preventDefault()}),preventScrollOnEntryFocus:!0,children:ce(ye,{role:"menu","aria-orientation":"vertical","data-state":qr(V.open),"data-radix-menu-content":"",dir:k.dir,...B,...F,ref:Z,style:{outline:"none",...F.style},onKeyDown:r(F.onKeyDown,(te)=>{let lt=te.target.closest("[data-radix-menu-content]")===te.currentTarget,bt=te.ctrlKey||te.altKey||te.metaKey,tn=te.key.length===1;if(lt){if(te.key==="Tab")te.preventDefault();if(!bt&&tn)me(te.key)}let nn=re.current;if(te.target!==nn)return;if(!hu.includes(te.key))return;te.preventDefault();let Et=U().filter((Ke)=>!Ke.disabled).map((Ke)=>Ke.ref.current);if(Cc.includes(te.key))Et.reverse();Fc(Et)}),onBlur:r(f.onBlur,(te)=>{if(!te.currentTarget.contains(te.target))window.clearTimeout(ae.current),he.current=""}),onPointerMove:r(f.onPointerMove,en((te)=>{let ht=te.target,lt=je.current!==te.clientX;if(te.currentTarget.contains(ht)&&lt){let bt=te.clientX>je.current?"right":"left";pe.current=bt,je.current=te.clientX}}))})})})})})})},"MenuContentImpl")),Mc=X.forwardRef(de(function(f,m){let{__scopeMenu:h,...v}=f;return ce(o.div,{role:"group",...v,ref:m})},"MenuGroup")),Au=X.forwardRef(de(function(f,m){let{__scopeMenu:h,...v}=f;return ce(o.div,{...v,ref:m})},"MenuLabel")),Kr="MenuItem",Sc="menu.itemSelect",Zr=X.forwardRef(de(function(f,m){let{disabled:h=!1,onSelect:v,...R}=f,w=X.useRef(null),b=hn(Kr,f.__scopeMenu),E=Yr(Kr,f.__scopeMenu),M=a(m,w),T=X.useRef(!1),S=de(()=>{let A=w.current;if(!h&&A){let I=new CustomEvent(Sc,{bubbles:!0,cancelable:!0});if(A.addEventListener(Sc,(L)=>v?.(L),{once:!0}),be(A,I),I.defaultPrevented)T.current=!1;else b.onClose()}},"handleSelect");return ce(Ic,{...R,ref:M,disabled:h,onClick:r(f.onClick,S),onPointerDown:(A)=>{f.onPointerDown?.(A),T.current=!0},onPointerUp:r(f.onPointerUp,(A)=>{if(!T.current)A.currentTarget?.click()}),onKeyDown:r(f.onKeyDown,(A)=>{if(h||A.target!==A.currentTarget)return;if(E.searchRef.current!==""&&A.key===" ")return;if(Gr.includes(A.key))A.currentTarget.click(),A.preventDefault()})})},"MenuItem")),Ic=X.forwardRef(de(function(f,m){let{__scopeMenu:h,disabled:v=!1,textValue:R,...w}=f,b=Yr(Kr,h),E=Ec(h),M=X.useRef(null),T=a(m,M),[S,A]=X.useState(!1),[I,L]=X.useState("");return X.useEffect(()=>{let N=M.current;if(N)L((N.textContent??"").trim())},[w.children]),ce(mn.ItemSlot,{scope:h,disabled:v,textValue:R??I,children:ce(j,{asChild:!0,...E,focusable:!v,children:ce(o.div,{role:"menuitem","data-highlighted":S?"":void 0,"aria-disabled":v||void 0,"data-disabled":v?"":void 0,...w,ref:T,onPointerMove:r(f.onPointerMove,en((N)=>{if(v)b.onItemLeave(N);else if(b.onItemEnter(N),!N.defaultPrevented)N.currentTarget.focus({preventScroll:!0})})),onPointerLeave:r(f.onPointerLeave,en((N)=>b.onItemLeave(N))),onFocus:r(f.onFocus,()=>A(!0)),onBlur:r(f.onBlur,()=>A(!1))})})})},"MenuItemImpl")),Mu=X.forwardRef(de(function(f,m){let{checked:h=!1,onCheckedChange:v,...R}=f;return ce(Dc,{scope:f.__scopeMenu,checked:h,children:ce(Zr,{role:"menuitemcheckbox","aria-checked":pn(h)?"mixed":h,...R,ref:m,"data-state":Yn(h),onSelect:r(R.onSelect,()=>v?.(pn(h)?!0:!h),{checkForDefaultPrevented:!1})})})},"MenuCheckboxItem")),Iu="MenuRadioGroup",[Tu,Du]=jt(Iu,{value:void 0,onValueChange:de(()=>{},"onValueChange")}),Lu=X.forwardRef(de(function(f,m){let{value:h,onValueChange:v,...R}=f,w=u(v);return ce(Tu,{scope:f.__scopeMenu,value:h,onValueChange:w,children:ce(Mc,{...R,ref:m})})},"MenuRadioGroup")),Nu="MenuRadioItem",Fu=X.forwardRef(de(function(f,m){let{value:h,...v}=f,R=Du(Nu,f.__scopeMenu),w=h===R.value;return ce(Dc,{scope:f.__scopeMenu,checked:w,children:ce(Zr,{role:"menuitemradio","aria-checked":w,...v,ref:m,"data-state":Yn(w),onSelect:r(v.onSelect,()=>R.onValueChange?.(h),{checkForDefaultPrevented:!1})})})},"MenuRadioItem")),Tc="MenuItemIndicator",[Dc,ku]=jt(Tc,{checked:!1}),ju=X.forwardRef(de(function(f,m){let{__scopeMenu:h,forceMount:v,...R}=f,w=ku(Tc,h);return ce(d,{present:v||pn(w.checked)||w.checked===!0,children:ce(o.span,{...R,ref:m,"data-state":Yn(w.checked)})})},"MenuItemIndicator")),Bu=X.forwardRef(de(function(f,m){let{__scopeMenu:h,...v}=f;return ce(o.div,{role:"separator","aria-orientation":"horizontal",...v,ref:m})},"MenuSeparator"));var Lc="MenuSub",[Wu,Nc]=jt(Lc),Vu=de((t)=>{let{__scopeMenu:f,children:m,open:h=!1,onOpenChange:v}=t,R=Ct(Lc,f),w=Kn(f),[b,E]=X.useState(null),[M,T]=X.useState(null),S=u(v);return X.useEffect(()=>{if(R.open===!1)S(!1);return()=>S(!1)},[R.open,S]),ce(ie,{...w,children:ce(Pc,{scope:f,open:h,onOpenChange:S,content:M,onContentChange:T,children:ce(Wu,{scope:f,contentId:c(),triggerId:c(),trigger:b,onTriggerChange:E,children:m})})})},"MenuSub"),Un="MenuSubTrigger",$u=X.forwardRef(de(function(f,m){let h=Ct(Un,f.__scopeMenu),v=hn(Un,f.__scopeMenu),R=Nc(Un,f.__scopeMenu),w=Yr(Un,f.__scopeMenu),b=X.useRef(null),{pointerGraceTimerRef:E,onPointerGraceIntentChange:M}=w,T={__scopeMenu:f.__scopeMenu},S=X.useCallback(()=>{if(b.current)window.clearTimeout(b.current);b.current=null},[]);X.useEffect(()=>S,[S]),X.useEffect(()=>{let I=E.current;return()=>{window.clearTimeout(I),M(null)}},[E,M]);let A=a(m,R.onTriggerChange);return ce(Oc,{asChild:!0,...T,children:ce(Ic,{id:R.triggerId,"aria-haspopup":"menu","aria-expanded":h.open,"aria-controls":h.open?R.contentId:void 0,"data-state":qr(h.open),...f,ref:A,onClick:(I)=>{if(f.onClick?.(I),f.disabled||I.defaultPrevented)return;if(I.currentTarget.focus(),!h.open)h.onOpenChange(!0)},onPointerMove:r(f.onPointerMove,en((I)=>{if(w.onItemEnter(I),I.defaultPrevented)return;if(!f.disabled&&!h.open&&!b.current)w.onPointerGraceIntentChange(null),b.current=window.setTimeout(()=>{h.onOpenChange(!0),S()},100)})),onPointerLeave:r(f.onPointerLeave,en((I)=>{S();let L=h.content?.getBoundingClientRect();if(L){let N=h.content?.dataset.side,F=N==="right",V=F?-5:5,k=L[F?"left":"right"],B=L[F?"right":"left"];w.onPointerGraceIntentChange({area:[{x:I.clientX+V,y:I.clientY},{x:k,y:L.top},{x:B,y:L.top},{x:B,y:L.bottom},{x:k,y:L.bottom}],side:N}),window.clearTimeout(E.current),E.current=window.setTimeout(()=>w.onPointerGraceIntentChange(null),300)}else{if(w.onTriggerLeave(I),I.defaultPrevented)return;w.onPointerGraceIntentChange(null)}})),onKeyDown:r(f.onKeyDown,(I)=>{if(f.disabled||I.target!==I.currentTarget)return;if(w.searchRef.current!==""&&I.key===" ")return;if(vu[v.dir].includes(I.key))h.onOpenChange(!0),h.content?.focus(),I.preventDefault()})})})},"MenuSubTrigger")),zu="MenuSubContent",Hu=X.forwardRef(de(function(f,m){let h=Ac(ut,f.__scopeMenu),{forceMount:v=h.forceMount,align:R="start",...w}=f,b=Ct(ut,f.__scopeMenu),E=hn(ut,f.__scopeMenu),M=Nc(zu,f.__scopeMenu),T=X.useRef(null),S=a(m,T);return ce(mn.Provider,{scope:f.__scopeMenu,children:ce(d,{present:v||b.open,children:ce(mn.Slot,{scope:f.__scopeMenu,children:ce(Xr,{id:M.contentId,"aria-labelledby":M.triggerId,...w,ref:S,align:R,side:E.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:(A)=>{if(E.isUsingKeyboardRef.current)T.current?.focus();A.preventDefault()},onCloseAutoFocus:(A)=>A.preventDefault(),onFocusOutside:r(f.onFocusOutside,(A)=>{if(A.target!==M.trigger)b.onOpenChange(!1)}),onEscapeKeyDown:r(f.onEscapeKeyDown,(A)=>{E.onClose(),A.preventDefault()}),onKeyDown:r(f.onKeyDown,(A)=>{let I=A.currentTarget.contains(A.target),L=gu[E.dir].includes(A.key);if(I&&L)b.onOpenChange(!1),M.trigger?.focus(),A.preventDefault()})})})})})},"MenuSubContent"));function qr(t){return t?"open":"closed"}de(qr,"getOpenState");function pn(t){return t==="indeterminate"}de(pn,"isIndeterminate");function Yn(t){return pn(t)?"indeterminate":t?"checked":"unchecked"}de(Yn,"getCheckedState");function Fc(t){let f=document.activeElement;for(let m of t){if(m===f)return;if(m.focus(),document.activeElement!==f)return}}de(Fc,"focusFirst");function kc(t,f){return t.map((m,h)=>t[(f+h)%t.length])}de(kc,"wrapArray");function jc(t,f,m){let v=f.length>1&&Array.from(f).every((M)=>M===f[0])?f[0]:f,R=m?t.indexOf(m):-1,w=kc(t,Math.max(R,0));if(v.length===1)w=w.filter((M)=>M!==m);let E=w.find((M)=>M.toLowerCase().startsWith(v.toLowerCase()));return E!==m?E:void 0}de(jc,"getNextMatch");function Bc(t,f){let{x:m,y:h}=t,v=!1;for(let R=0,w=f.length-1;R<f.length;w=R++){let b=f[R],E=f[w],{x:M,y:T}=b,{x:S,y:A}=E;if(T>h!==A>h&&m<(S-M)*(h-T)/(A-T)+M)v=!v}return v}de(Bc,"isPointInPolygon");function Wc(t,f){if(!f)return!1;let m={x:t.clientX,y:t.clientY};return Bc(m,f)}de(Wc,"isPointerInGraceArea");function en(t){return(f)=>f.pointerType==="mouse"?t(f):void 0}de(en,"whenMouse");var Se=bu,Ce=Oc,we=Su,Re=Eu,Le=Mc,Ie=Au,Pe=Zr,Te=Mu,ke=Lu,Ee=Fu,Me=ju,De=Bu;var Ae=Vu,Ne=$u,_e=Hu;
42
+ export{xe,a,x,P,lr,p,z,n,Q,r,i,o,be,y,g,u,D,cr,W,ne,l,c,_,O,ie,se,ye,xt,q,d,s,C,K,j,le,J,ee,Se,Ce,we,Re,Le,Ie,Pe,Te,ke,Ee,Me,De,Ae,Ne,_e};