import{r as c,a as yt,R as eo,b as ns,c as be}from"./vendor-react-ItNohvPm.js";var to={exports:{}},wt={};/** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var os=c,rs=Symbol.for("react.element"),ss=Symbol.for("react.fragment"),is=Object.prototype.hasOwnProperty,as=os.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,cs={key:!0,ref:!0,__self:!0,__source:!0};function no(e,t,n){var o,r={},s=null,i=null;n!==void 0&&(s=""+n),t.key!==void 0&&(s=""+t.key),t.ref!==void 0&&(i=t.ref);for(o in t)is.call(t,o)&&!cs.hasOwnProperty(o)&&(r[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps,t)r[o]===void 0&&(r[o]=t[o]);return{$$typeof:rs,type:e,key:s,ref:i,props:r,_owner:as.current}}wt.Fragment=ss;wt.jsx=no;wt.jsxs=no;to.exports=wt;var y=to.exports;function I(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}function An(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function oo(...e){return t=>{let n=!1;const o=e.map(r=>{const s=An(r,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let r=0;r{const{children:i,...a}=s,l=c.useMemo(()=>a,Object.values(a));return y.jsx(n.Provider,{value:l,children:i})};o.displayName=e+"Provider";function r(s){const i=c.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[o,r]}function je(e,t=[]){let n=[];function o(s,i){const a=c.createContext(i),l=n.length;n=[...n,i];const u=p=>{var x;const{scope:h,children:m,...w}=p,d=((x=h==null?void 0:h[e])==null?void 0:x[l])||a,v=c.useMemo(()=>w,Object.values(w));return y.jsx(d.Provider,{value:v,children:m})};u.displayName=s+"Provider";function f(p,h){var d;const m=((d=h==null?void 0:h[e])==null?void 0:d[l])||a,w=c.useContext(m);if(w)return w;if(i!==void 0)return i;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[u,f]}const r=()=>{const s=n.map(i=>c.createContext(i));return function(a){const l=(a==null?void 0:a[e])||s;return c.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return r.scopeName=e,[o,us(r,...t)]}function us(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const o=e.map(r=>({useScope:r(),scopeName:r.scopeName}));return function(s){const i=o.reduce((a,{useScope:l,scopeName:u})=>{const p=l(s)[`__scope${u}`];return{...a,...p}},{});return c.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Ee(e){const t=fs(e),n=c.forwardRef((o,r)=>{const{children:s,...i}=o,a=c.Children.toArray(s),l=a.find(ps);if(l){const u=l.props.children,f=a.map(p=>p===l?c.Children.count(u)>1?c.Children.only(null):c.isValidElement(u)?u.props.children:null:p);return y.jsx(t,{...i,ref:r,children:c.isValidElement(u)?c.cloneElement(u,void 0,f):null})}return y.jsx(t,{...i,ref:r,children:s})});return n.displayName=`${e}.Slot`,n}var cl=Ee("Slot");function fs(e){const t=c.forwardRef((n,o)=>{const{children:r,...s}=n;if(c.isValidElement(r)){const i=hs(r),a=ms(s,r.props);return r.type!==c.Fragment&&(a.ref=o?oo(o,i):i),c.cloneElement(r,a)}return c.Children.count(r)>1?c.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ro=Symbol("radix.slottable");function ds(e){const t=({children:n})=>y.jsx(y.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=ro,t}function ps(e){return c.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ro}function ms(e,t){const n={...t};for(const o in t){const r=e[o],s=t[o];/^on[A-Z]/.test(o)?r&&s?n[o]=(...a)=>{const l=s(...a);return r(...a),l}:r&&(n[o]=r):o==="style"?n[o]={...r,...s}:o==="className"&&(n[o]=[r,s].filter(Boolean).join(" "))}return{...e,...n}}function hs(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var vs=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],M=vs.reduce((e,t)=>{const n=Ee(`Primitive.${t}`),o=c.forwardRef((r,s)=>{const{asChild:i,...a}=r,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),y.jsx(l,{...a,ref:s})});return o.displayName=`Primitive.${t}`,{...e,[t]:o}},{});function so(e,t){e&&yt.flushSync(()=>e.dispatchEvent(t))}function le(e){const t=c.useRef(e);return c.useEffect(()=>{t.current=e}),c.useMemo(()=>(...n)=>{var o;return(o=t.current)==null?void 0:o.call(t,...n)},[])}function io(e,t=globalThis==null?void 0:globalThis.document){const n=le(e);c.useEffect(()=>{const o=r=>{r.key==="Escape"&&n(r)};return t.addEventListener("keydown",o,{capture:!0}),()=>t.removeEventListener("keydown",o,{capture:!0})},[n,t])}var gs="DismissableLayer",Yt="dismissableLayer.update",ys="dismissableLayer.pointerDownOutside",ws="dismissableLayer.focusOutside",Tn,ao=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Qe=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,u=c.useContext(ao),[f,p]=c.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=c.useState({}),w=$(t,b=>p(b)),d=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=d.indexOf(v),g=f?d.indexOf(f):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,E=g>=x,S=Cs(b=>{const T=b.target,D=[...u.branches].some(O=>O.contains(T));!E||D||(r==null||r(b),i==null||i(b),b.defaultPrevented||a==null||a())},h),P=bs(b=>{const T=b.target;[...u.branches].some(O=>O.contains(T))||(s==null||s(b),i==null||i(b),b.defaultPrevented||a==null||a())},h);return io(b=>{g===u.layers.size-1&&(o==null||o(b),!b.defaultPrevented&&a&&(b.preventDefault(),a()))},h),c.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Tn=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),On(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Tn)}},[f,h,n,u]),c.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),On())},[f,u]),c.useEffect(()=>{const b=()=>m({});return document.addEventListener(Yt,b),()=>document.removeEventListener(Yt,b)},[]),y.jsx(M.div,{...l,ref:w,style:{pointerEvents:C?E?"auto":"none":void 0,...e.style},onFocusCapture:I(e.onFocusCapture,P.onFocusCapture),onBlurCapture:I(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:I(e.onPointerDownCapture,S.onPointerDownCapture)})});Qe.displayName=gs;var xs="DismissableLayerBranch",co=c.forwardRef((e,t)=>{const n=c.useContext(ao),o=c.useRef(null),r=$(t,o);return c.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),y.jsx(M.div,{...e,ref:r})});co.displayName=xs;function Cs(e,t=globalThis==null?void 0:globalThis.document){const n=le(e),o=c.useRef(!1),r=c.useRef(()=>{});return c.useEffect(()=>{const s=a=>{if(a.target&&!o.current){let l=function(){lo(ys,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=l,t.addEventListener("click",r.current,{once:!0})):l()}else t.removeEventListener("click",r.current);o.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function bs(e,t=globalThis==null?void 0:globalThis.document){const n=le(e),o=c.useRef(!1);return c.useEffect(()=>{const r=s=>{s.target&&!o.current&&lo(ws,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function On(){const e=new CustomEvent(Yt);document.dispatchEvent(e)}function lo(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?so(r,s):r.dispatchEvent(s)}var ll=Qe,ul=co,K=globalThis!=null&&globalThis.document?c.useLayoutEffect:()=>{},Es=eo[" useId ".trim().toString()]||(()=>{}),Ss=0;function me(e){const[t,n]=c.useState(Es());return K(()=>{e||n(o=>o??String(Ss++))},[e]),e||(t?`radix-${t}`:"")}const Ps=["top","right","bottom","left"],ve=Math.min,q=Math.max,dt=Math.round,nt=Math.floor,se=e=>({x:e,y:e}),Rs={left:"right",right:"left",bottom:"top",top:"bottom"},As={start:"end",end:"start"};function Xt(e,t,n){return q(e,ve(t,n))}function ue(e,t){return typeof e=="function"?e(t):e}function fe(e){return e.split("-")[0]}function Fe(e){return e.split("-")[1]}function cn(e){return e==="x"?"y":"x"}function ln(e){return e==="y"?"height":"width"}const Ts=new Set(["top","bottom"]);function re(e){return Ts.has(fe(e))?"y":"x"}function un(e){return cn(re(e))}function Os(e,t,n){n===void 0&&(n=!1);const o=Fe(e),r=un(e),s=ln(r);let i=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=pt(i)),[i,pt(i)]}function Ns(e){const t=pt(e);return[qt(e),t,qt(t)]}function qt(e){return e.replace(/start|end/g,t=>As[t])}const Nn=["left","right"],Dn=["right","left"],Ds=["top","bottom"],_s=["bottom","top"];function Is(e,t,n){switch(e){case"top":case"bottom":return n?t?Dn:Nn:t?Nn:Dn;case"left":case"right":return t?Ds:_s;default:return[]}}function Ms(e,t,n,o){const r=Fe(e);let s=Is(fe(e),n==="start",o);return r&&(s=s.map(i=>i+"-"+r),t&&(s=s.concat(s.map(qt)))),s}function pt(e){return e.replace(/left|right|bottom|top/g,t=>Rs[t])}function Ls(e){return{top:0,right:0,bottom:0,left:0,...e}}function uo(e){return typeof e!="number"?Ls(e):{top:e,right:e,bottom:e,left:e}}function mt(e){const{x:t,y:n,width:o,height:r}=e;return{width:o,height:r,top:n,left:t,right:t+o,bottom:n+r,x:t,y:n}}function _n(e,t,n){let{reference:o,floating:r}=e;const s=re(t),i=un(t),a=ln(i),l=fe(t),u=s==="y",f=o.x+o.width/2-r.width/2,p=o.y+o.height/2-r.height/2,h=o[a]/2-r[a]/2;let m;switch(l){case"top":m={x:f,y:o.y-r.height};break;case"bottom":m={x:f,y:o.y+o.height};break;case"right":m={x:o.x+o.width,y:p};break;case"left":m={x:o.x-r.width,y:p};break;default:m={x:o.x,y:o.y}}switch(Fe(t)){case"start":m[i]-=h*(n&&u?-1:1);break;case"end":m[i]+=h*(n&&u?-1:1);break}return m}const ks=async(e,t,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:r}),{x:f,y:p}=_n(u,o,l),h=o,m={},w=0;for(let d=0;d({name:"arrow",options:e,async fn(t){const{x:n,y:o,placement:r,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:u,padding:f=0}=ue(e,t)||{};if(u==null)return{};const p=uo(f),h={x:n,y:o},m=un(r),w=ln(m),d=await i.getDimensions(u),v=m==="y",x=v?"top":"left",g=v?"bottom":"right",C=v?"clientHeight":"clientWidth",E=s.reference[w]+s.reference[m]-h[m]-s.floating[w],S=h[m]-s.reference[m],P=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let b=P?P[C]:0;(!b||!await(i.isElement==null?void 0:i.isElement(P)))&&(b=a.floating[C]||s.floating[w]);const T=E/2-S/2,D=b/2-d[w]/2-1,O=ve(p[x],D),B=ve(p[g],D),H=O,k=b-d[w]-B,_=b/2-d[w]/2+T,z=Xt(H,_,k),N=!l.arrow&&Fe(r)!=null&&_!==z&&s.reference[w]/2-(__<=0)){var B,H;const _=(((B=s.flip)==null?void 0:B.index)||0)+1,z=b[_];if(z&&(!(p==="alignment"?g!==re(z):!1)||O.every(R=>R.overflows[0]>0&&re(R.placement)===g)))return{data:{index:_,overflows:O},reset:{placement:z}};let N=(H=O.filter(L=>L.overflows[0]<=0).sort((L,R)=>L.overflows[1]-R.overflows[1])[0])==null?void 0:H.placement;if(!N)switch(m){case"bestFit":{var k;const L=(k=O.filter(R=>{if(P){const V=re(R.placement);return V===g||V==="y"}return!0}).map(R=>[R.placement,R.overflows.filter(V=>V>0).reduce((V,Y)=>V+Y,0)]).sort((R,V)=>R[1]-V[1])[0])==null?void 0:k[0];L&&(N=L);break}case"initialPlacement":N=a;break}if(r!==N)return{reset:{placement:N}}}return{}}}};function In(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Mn(e){return Ps.some(t=>e[t]>=0)}const $s=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:o="referenceHidden",...r}=ue(e,t);switch(o){case"referenceHidden":{const s=await Ye(t,{...r,elementContext:"reference"}),i=In(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Mn(i)}}}case"escaped":{const s=await Ye(t,{...r,altBoundary:!0}),i=In(s,n.floating);return{data:{escapedOffsets:i,escaped:Mn(i)}}}default:return{}}}}},fo=new Set(["left","top"]);async function Ws(e,t){const{placement:n,platform:o,elements:r}=e,s=await(o.isRTL==null?void 0:o.isRTL(r.floating)),i=fe(n),a=Fe(n),l=re(n)==="y",u=fo.has(i)?-1:1,f=s&&l?-1:1,p=ue(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:w}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return a&&typeof w=="number"&&(m=a==="end"?w*-1:w),l?{x:m*f,y:h*u}:{x:h*u,y:m*f}}const Bs=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,o;const{x:r,y:s,placement:i,middlewareData:a}=t,l=await Ws(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(o=a.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:s+l.y,data:{...l,placement:i}}}}},Hs=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:o,placement:r}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:v=>{let{x,y:g}=v;return{x,y:g}}},...l}=ue(e,t),u={x:n,y:o},f=await Ye(t,l),p=re(fe(r)),h=cn(p);let m=u[h],w=u[p];if(s){const v=h==="y"?"top":"left",x=h==="y"?"bottom":"right",g=m+f[v],C=m-f[x];m=Xt(g,m,C)}if(i){const v=p==="y"?"top":"left",x=p==="y"?"bottom":"right",g=w+f[v],C=w-f[x];w=Xt(g,w,C)}const d=a.fn({...t,[h]:m,[p]:w});return{...d,data:{x:d.x-n,y:d.y-o,enabled:{[h]:s,[p]:i}}}}}},Vs=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:o,placement:r,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:u=!0}=ue(e,t),f={x:n,y:o},p=re(r),h=cn(p);let m=f[h],w=f[p];const d=ue(a,t),v=typeof d=="number"?{mainAxis:d,crossAxis:0}:{mainAxis:0,crossAxis:0,...d};if(l){const C=h==="y"?"height":"width",E=s.reference[h]-s.floating[C]+v.mainAxis,S=s.reference[h]+s.reference[C]-v.mainAxis;mS&&(m=S)}if(u){var x,g;const C=h==="y"?"width":"height",E=fo.has(fe(r)),S=s.reference[p]-s.floating[C]+(E&&((x=i.offset)==null?void 0:x[p])||0)+(E?0:v.crossAxis),P=s.reference[p]+s.reference[C]+(E?0:((g=i.offset)==null?void 0:g[p])||0)-(E?v.crossAxis:0);wP&&(w=P)}return{[h]:m,[p]:w}}}},Us=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,o;const{placement:r,rects:s,platform:i,elements:a}=t,{apply:l=()=>{},...u}=ue(e,t),f=await Ye(t,u),p=fe(r),h=Fe(r),m=re(r)==="y",{width:w,height:d}=s.floating;let v,x;p==="top"||p==="bottom"?(v=p,x=h===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(x=p,v=h==="end"?"top":"bottom");const g=d-f.top-f.bottom,C=w-f.left-f.right,E=ve(d-f[v],g),S=ve(w-f[x],C),P=!t.middlewareData.shift;let b=E,T=S;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(T=C),(o=t.middlewareData.shift)!=null&&o.enabled.y&&(b=g),P&&!h){const O=q(f.left,0),B=q(f.right,0),H=q(f.top,0),k=q(f.bottom,0);m?T=w-2*(O!==0||B!==0?O+B:q(f.left,f.right)):b=d-2*(H!==0||k!==0?H+k:q(f.top,f.bottom))}await l({...t,availableWidth:T,availableHeight:b});const D=await i.getDimensions(a.floating);return w!==D.width||d!==D.height?{reset:{rects:!0}}:{}}}};function xt(){return typeof window<"u"}function $e(e){return po(e)?(e.nodeName||"").toLowerCase():"#document"}function Z(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ae(e){var t;return(t=(po(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function po(e){return xt()?e instanceof Node||e instanceof Z(e).Node:!1}function J(e){return xt()?e instanceof Element||e instanceof Z(e).Element:!1}function ie(e){return xt()?e instanceof HTMLElement||e instanceof Z(e).HTMLElement:!1}function Ln(e){return!xt()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Z(e).ShadowRoot}const zs=new Set(["inline","contents"]);function Je(e){const{overflow:t,overflowX:n,overflowY:o,display:r}=ee(e);return/auto|scroll|overlay|hidden|clip/.test(t+o+n)&&!zs.has(r)}const Ks=new Set(["table","td","th"]);function Gs(e){return Ks.has($e(e))}const Ys=[":popover-open",":modal"];function Ct(e){return Ys.some(t=>{try{return e.matches(t)}catch{return!1}})}const Xs=["transform","translate","scale","rotate","perspective"],qs=["transform","translate","scale","rotate","perspective","filter"],Zs=["paint","layout","strict","content"];function fn(e){const t=dn(),n=J(e)?ee(e):e;return Xs.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||qs.some(o=>(n.willChange||"").includes(o))||Zs.some(o=>(n.contain||"").includes(o))}function Qs(e){let t=ge(e);for(;ie(t)&&!Me(t);){if(fn(t))return t;if(Ct(t))return null;t=ge(t)}return null}function dn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Js=new Set(["html","body","#document"]);function Me(e){return Js.has($e(e))}function ee(e){return Z(e).getComputedStyle(e)}function bt(e){return J(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ge(e){if($e(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ln(e)&&e.host||ae(e);return Ln(t)?t.host:t}function mo(e){const t=ge(e);return Me(t)?e.ownerDocument?e.ownerDocument.body:e.body:ie(t)&&Je(t)?t:mo(t)}function Xe(e,t,n){var o;t===void 0&&(t=[]),n===void 0&&(n=!0);const r=mo(e),s=r===((o=e.ownerDocument)==null?void 0:o.body),i=Z(r);if(s){const a=Zt(i);return t.concat(i,i.visualViewport||[],Je(r)?r:[],a&&n?Xe(a):[])}return t.concat(r,Xe(r,[],n))}function Zt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ho(e){const t=ee(e);let n=parseFloat(t.width)||0,o=parseFloat(t.height)||0;const r=ie(e),s=r?e.offsetWidth:n,i=r?e.offsetHeight:o,a=dt(n)!==s||dt(o)!==i;return a&&(n=s,o=i),{width:n,height:o,$:a}}function pn(e){return J(e)?e:e.contextElement}function _e(e){const t=pn(e);if(!ie(t))return se(1);const n=t.getBoundingClientRect(),{width:o,height:r,$:s}=ho(t);let i=(s?dt(n.width):n.width)/o,a=(s?dt(n.height):n.height)/r;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const ei=se(0);function vo(e){const t=Z(e);return!dn()||!t.visualViewport?ei:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ti(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Z(e)?!1:t}function Se(e,t,n,o){t===void 0&&(t=!1),n===void 0&&(n=!1);const r=e.getBoundingClientRect(),s=pn(e);let i=se(1);t&&(o?J(o)&&(i=_e(o)):i=_e(e));const a=ti(s,n,o)?vo(s):se(0);let l=(r.left+a.x)/i.x,u=(r.top+a.y)/i.y,f=r.width/i.x,p=r.height/i.y;if(s){const h=Z(s),m=o&&J(o)?Z(o):o;let w=h,d=Zt(w);for(;d&&o&&m!==w;){const v=_e(d),x=d.getBoundingClientRect(),g=ee(d),C=x.left+(d.clientLeft+parseFloat(g.paddingLeft))*v.x,E=x.top+(d.clientTop+parseFloat(g.paddingTop))*v.y;l*=v.x,u*=v.y,f*=v.x,p*=v.y,l+=C,u+=E,w=Z(d),d=Zt(w)}}return mt({width:f,height:p,x:l,y:u})}function mn(e,t){const n=bt(e).scrollLeft;return t?t.left+n:Se(ae(e)).left+n}function go(e,t,n){n===void 0&&(n=!1);const o=e.getBoundingClientRect(),r=o.left+t.scrollLeft-(n?0:mn(e,o)),s=o.top+t.scrollTop;return{x:r,y:s}}function ni(e){let{elements:t,rect:n,offsetParent:o,strategy:r}=e;const s=r==="fixed",i=ae(o),a=t?Ct(t.floating):!1;if(o===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},u=se(1);const f=se(0),p=ie(o);if((p||!p&&!s)&&(($e(o)!=="body"||Je(i))&&(l=bt(o)),ie(o))){const m=Se(o);u=_e(o),f.x=m.x+o.clientLeft,f.y=m.y+o.clientTop}const h=i&&!p&&!s?go(i,l,!0):se(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+f.x+h.x,y:n.y*u.y-l.scrollTop*u.y+f.y+h.y}}function oi(e){return Array.from(e.getClientRects())}function ri(e){const t=ae(e),n=bt(e),o=e.ownerDocument.body,r=q(t.scrollWidth,t.clientWidth,o.scrollWidth,o.clientWidth),s=q(t.scrollHeight,t.clientHeight,o.scrollHeight,o.clientHeight);let i=-n.scrollLeft+mn(e);const a=-n.scrollTop;return ee(o).direction==="rtl"&&(i+=q(t.clientWidth,o.clientWidth)-r),{width:r,height:s,x:i,y:a}}function si(e,t){const n=Z(e),o=ae(e),r=n.visualViewport;let s=o.clientWidth,i=o.clientHeight,a=0,l=0;if(r){s=r.width,i=r.height;const u=dn();(!u||u&&t==="fixed")&&(a=r.offsetLeft,l=r.offsetTop)}return{width:s,height:i,x:a,y:l}}const ii=new Set(["absolute","fixed"]);function ai(e,t){const n=Se(e,!0,t==="fixed"),o=n.top+e.clientTop,r=n.left+e.clientLeft,s=ie(e)?_e(e):se(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=r*s.x,u=o*s.y;return{width:i,height:a,x:l,y:u}}function kn(e,t,n){let o;if(t==="viewport")o=si(e,n);else if(t==="document")o=ri(ae(e));else if(J(t))o=ai(t,n);else{const r=vo(e);o={x:t.x-r.x,y:t.y-r.y,width:t.width,height:t.height}}return mt(o)}function yo(e,t){const n=ge(e);return n===t||!J(n)||Me(n)?!1:ee(n).position==="fixed"||yo(n,t)}function ci(e,t){const n=t.get(e);if(n)return n;let o=Xe(e,[],!1).filter(a=>J(a)&&$e(a)!=="body"),r=null;const s=ee(e).position==="fixed";let i=s?ge(e):e;for(;J(i)&&!Me(i);){const a=ee(i),l=fn(i);!l&&a.position==="fixed"&&(r=null),(s?!l&&!r:!l&&a.position==="static"&&!!r&&ii.has(r.position)||Je(i)&&!l&&yo(e,i))?o=o.filter(f=>f!==i):r=a,i=ge(i)}return t.set(e,o),o}function li(e){let{element:t,boundary:n,rootBoundary:o,strategy:r}=e;const i=[...n==="clippingAncestors"?Ct(t)?[]:ci(t,this._c):[].concat(n),o],a=i[0],l=i.reduce((u,f)=>{const p=kn(t,f,r);return u.top=q(p.top,u.top),u.right=ve(p.right,u.right),u.bottom=ve(p.bottom,u.bottom),u.left=q(p.left,u.left),u},kn(t,a,r));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function ui(e){const{width:t,height:n}=ho(e);return{width:t,height:n}}function fi(e,t,n){const o=ie(t),r=ae(t),s=n==="fixed",i=Se(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=se(0);function u(){l.x=mn(r)}if(o||!o&&!s)if(($e(t)!=="body"||Je(r))&&(a=bt(t)),o){const m=Se(t,!0,s,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}else r&&u();s&&!o&&r&&u();const f=r&&!o&&!s?go(r,a):se(0),p=i.left+a.scrollLeft-l.x-f.x,h=i.top+a.scrollTop-l.y-f.y;return{x:p,y:h,width:i.width,height:i.height}}function Ft(e){return ee(e).position==="static"}function jn(e,t){if(!ie(e)||ee(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ae(e)===n&&(n=n.ownerDocument.body),n}function wo(e,t){const n=Z(e);if(Ct(e))return n;if(!ie(e)){let r=ge(e);for(;r&&!Me(r);){if(J(r)&&!Ft(r))return r;r=ge(r)}return n}let o=jn(e,t);for(;o&&Gs(o)&&Ft(o);)o=jn(o,t);return o&&Me(o)&&Ft(o)&&!fn(o)?n:o||Qs(e)||n}const di=async function(e){const t=this.getOffsetParent||wo,n=this.getDimensions,o=await n(e.floating);return{reference:fi(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function pi(e){return ee(e).direction==="rtl"}const mi={convertOffsetParentRelativeRectToViewportRelativeRect:ni,getDocumentElement:ae,getClippingRect:li,getOffsetParent:wo,getElementRects:di,getClientRects:oi,getDimensions:ui,getScale:_e,isElement:J,isRTL:pi};function xo(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function hi(e,t){let n=null,o;const r=ae(e);function s(){var a;clearTimeout(o),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const u=e.getBoundingClientRect(),{left:f,top:p,width:h,height:m}=u;if(a||t(),!h||!m)return;const w=nt(p),d=nt(r.clientWidth-(f+h)),v=nt(r.clientHeight-(p+m)),x=nt(f),C={rootMargin:-w+"px "+-d+"px "+-v+"px "+-x+"px",threshold:q(0,ve(1,l))||1};let E=!0;function S(P){const b=P[0].intersectionRatio;if(b!==l){if(!E)return i();b?i(!1,b):o=setTimeout(()=>{i(!1,1e-7)},1e3)}b===1&&!xo(u,e.getBoundingClientRect())&&i(),E=!1}try{n=new IntersectionObserver(S,{...C,root:r.ownerDocument})}catch{n=new IntersectionObserver(S,C)}n.observe(e)}return i(!0),s}function vi(e,t,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,u=pn(e),f=r||s?[...u?Xe(u):[],...Xe(t)]:[];f.forEach(x=>{r&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const p=u&&a?hi(u,n):null;let h=-1,m=null;i&&(m=new ResizeObserver(x=>{let[g]=x;g&&g.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var C;(C=m)==null||C.observe(t)})),n()}),u&&!l&&m.observe(u),m.observe(t));let w,d=l?Se(e):null;l&&v();function v(){const x=Se(e);d&&!xo(d,x)&&n(),d=x,w=requestAnimationFrame(v)}return n(),()=>{var x;f.forEach(g=>{r&&g.removeEventListener("scroll",n),s&&g.removeEventListener("resize",n)}),p==null||p(),(x=m)==null||x.disconnect(),m=null,l&&cancelAnimationFrame(w)}}const gi=Bs,yi=Hs,wi=Fs,xi=Us,Ci=$s,Fn=js,bi=Vs,Ei=(e,t,n)=>{const o=new Map,r={platform:mi,...n},s={...r.platform,_c:o};return ks(e,t,{...r,platform:s})};var Si=typeof document<"u",Pi=function(){},lt=Si?c.useLayoutEffect:Pi;function ht(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,o,r;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(o=n;o--!==0;)if(!ht(e[o],t[o]))return!1;return!0}if(r=Object.keys(e),n=r.length,n!==Object.keys(t).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(t,r[o]))return!1;for(o=n;o--!==0;){const s=r[o];if(!(s==="_owner"&&e.$$typeof)&&!ht(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Co(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $n(e,t){const n=Co(e);return Math.round(t*n)/n}function $t(e){const t=c.useRef(e);return lt(()=>{t.current=e}),t}function Ri(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:u}=e,[f,p]=c.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=c.useState(o);ht(h,o)||m(o);const[w,d]=c.useState(null),[v,x]=c.useState(null),g=c.useCallback(R=>{R!==P.current&&(P.current=R,d(R))},[]),C=c.useCallback(R=>{R!==b.current&&(b.current=R,x(R))},[]),E=s||w,S=i||v,P=c.useRef(null),b=c.useRef(null),T=c.useRef(f),D=l!=null,O=$t(l),B=$t(r),H=$t(u),k=c.useCallback(()=>{if(!P.current||!b.current)return;const R={placement:t,strategy:n,middleware:h};B.current&&(R.platform=B.current),Ei(P.current,b.current,R).then(V=>{const Y={...V,isPositioned:H.current!==!1};_.current&&!ht(T.current,Y)&&(T.current=Y,yt.flushSync(()=>{p(Y)}))})},[h,t,n,B,H]);lt(()=>{u===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,p(R=>({...R,isPositioned:!1})))},[u]);const _=c.useRef(!1);lt(()=>(_.current=!0,()=>{_.current=!1}),[]),lt(()=>{if(E&&(P.current=E),S&&(b.current=S),E&&S){if(O.current)return O.current(E,S,k);k()}},[E,S,k,O,D]);const z=c.useMemo(()=>({reference:P,floating:b,setReference:g,setFloating:C}),[g,C]),N=c.useMemo(()=>({reference:E,floating:S}),[E,S]),L=c.useMemo(()=>{const R={position:n,left:0,top:0};if(!N.floating)return R;const V=$n(N.floating,f.x),Y=$n(N.floating,f.y);return a?{...R,transform:"translate("+V+"px, "+Y+"px)",...Co(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:V,top:Y}},[n,a,N.floating,f.x,f.y]);return c.useMemo(()=>({...f,update:k,refs:z,elements:N,floatingStyles:L}),[f,k,z,N,L])}const Ai=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:o,padding:r}=typeof e=="function"?e(n):e;return o&&t(o)?o.current!=null?Fn({element:o.current,padding:r}).fn(n):{}:o?Fn({element:o,padding:r}).fn(n):{}}}},Ti=(e,t)=>({...gi(e),options:[e,t]}),Oi=(e,t)=>({...yi(e),options:[e,t]}),Ni=(e,t)=>({...bi(e),options:[e,t]}),Di=(e,t)=>({...wi(e),options:[e,t]}),_i=(e,t)=>({...xi(e),options:[e,t]}),Ii=(e,t)=>({...Ci(e),options:[e,t]}),Mi=(e,t)=>({...Ai(e),options:[e,t]});var Li="Arrow",bo=c.forwardRef((e,t)=>{const{children:n,width:o=10,height:r=5,...s}=e;return y.jsx(M.svg,{...s,ref:t,width:o,height:r,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:y.jsx("polygon",{points:"0,0 30,0 15,10"})})});bo.displayName=Li;var ki=bo;function ji(e){const[t,n]=c.useState(void 0);return K(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const o=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;const s=r[0];let i,a;if("borderBoxSize"in s){const l=s.borderBoxSize,u=Array.isArray(l)?l[0]:l;i=u.inlineSize,a=u.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return o.observe(e,{box:"border-box"}),()=>o.unobserve(e)}else n(void 0)},[e]),t}var hn="Popper",[Eo,We]=je(hn),[Fi,So]=Eo(hn),Po=e=>{const{__scopePopper:t,children:n}=e,[o,r]=c.useState(null);return y.jsx(Fi,{scope:t,anchor:o,onAnchorChange:r,children:n})};Po.displayName=hn;var Ro="PopperAnchor",Ao=c.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:o,...r}=e,s=So(Ro,n),i=c.useRef(null),a=$(t,i);return c.useEffect(()=>{s.onAnchorChange((o==null?void 0:o.current)||i.current)}),o?null:y.jsx(M.div,{...r,ref:a})});Ao.displayName=Ro;var vn="PopperContent",[$i,Wi]=Eo(vn),To=c.forwardRef((e,t)=>{var A,U,G,W,j,F;const{__scopePopper:n,side:o="bottom",sideOffset:r=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:w,...d}=e,v=So(vn,n),[x,g]=c.useState(null),C=$(t,X=>g(X)),[E,S]=c.useState(null),P=ji(E),b=(P==null?void 0:P.width)??0,T=(P==null?void 0:P.height)??0,D=o+(s!=="center"?"-"+s:""),O=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},B=Array.isArray(u)?u:[u],H=B.length>0,k={padding:O,boundary:B.filter(Hi),altBoundary:H},{refs:_,floatingStyles:z,placement:N,isPositioned:L,middlewareData:R}=Ri({strategy:"fixed",placement:D,whileElementsMounted:(...X)=>vi(...X,{animationFrame:m==="always"}),elements:{reference:v.anchor},middleware:[Ti({mainAxis:r+T,alignmentAxis:i}),l&&Oi({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?Ni():void 0,...k}),l&&Di({...k}),_i({...k,apply:({elements:X,rects:ne,availableWidth:Ue,availableHeight:ze})=>{const{width:Ke,height:ts}=ne.reference,tt=X.floating.style;tt.setProperty("--radix-popper-available-width",`${Ue}px`),tt.setProperty("--radix-popper-available-height",`${ze}px`),tt.setProperty("--radix-popper-anchor-width",`${Ke}px`),tt.setProperty("--radix-popper-anchor-height",`${ts}px`)}}),E&&Mi({element:E,padding:a}),Vi({arrowWidth:b,arrowHeight:T}),h&&Ii({strategy:"referenceHidden",...k})]}),[V,Y]=Do(N),ce=le(w);K(()=>{L&&(ce==null||ce())},[L,ce]);const He=(A=R.arrow)==null?void 0:A.x,Ve=(U=R.arrow)==null?void 0:U.y,de=((G=R.arrow)==null?void 0:G.centerOffset)!==0,[Te,Ce]=c.useState();return K(()=>{x&&Ce(window.getComputedStyle(x).zIndex)},[x]),y.jsx("div",{ref:_.setFloating,"data-radix-popper-content-wrapper":"",style:{...z,transform:L?z.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Te,"--radix-popper-transform-origin":[(W=R.transformOrigin)==null?void 0:W.x,(j=R.transformOrigin)==null?void 0:j.y].join(" "),...((F=R.hide)==null?void 0:F.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:y.jsx($i,{scope:n,placedSide:V,onArrowChange:S,arrowX:He,arrowY:Ve,shouldHideArrow:de,children:y.jsx(M.div,{"data-side":V,"data-align":Y,...d,ref:C,style:{...d.style,animation:L?void 0:"none"}})})})});To.displayName=vn;var Oo="PopperArrow",Bi={top:"bottom",right:"left",bottom:"top",left:"right"},No=c.forwardRef(function(t,n){const{__scopePopper:o,...r}=t,s=Wi(Oo,o),i=Bi[s.placedSide];return y.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:y.jsx(ki,{...r,ref:n,style:{...r.style,display:"block"}})})});No.displayName=Oo;function Hi(e){return e!==null}var Vi=e=>({name:"transformOrigin",options:e,fn(t){var v,x,g;const{placement:n,rects:o,middlewareData:r}=t,i=((v=r.arrow)==null?void 0:v.centerOffset)!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[u,f]=Do(n),p={start:"0%",center:"50%",end:"100%"}[f],h=(((x=r.arrow)==null?void 0:x.x)??0)+a/2,m=(((g=r.arrow)==null?void 0:g.y)??0)+l/2;let w="",d="";return u==="bottom"?(w=i?p:`${h}px`,d=`${-l}px`):u==="top"?(w=i?p:`${h}px`,d=`${o.floating.height+l}px`):u==="right"?(w=`${-l}px`,d=i?p:`${m}px`):u==="left"&&(w=`${o.floating.width+l}px`,d=i?p:`${m}px`),{data:{x:w,y:d}}}});function Do(e){const[t,n="center"]=e.split("-");return[t,n]}var gn=Po,Et=Ao,yn=To,wn=No,Ui="Portal",St=c.forwardRef((e,t)=>{var a;const{container:n,...o}=e,[r,s]=c.useState(!1);K(()=>s(!0),[]);const i=n||r&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?ns.createPortal(y.jsx(M.div,{...o,ref:t}),i):null});St.displayName=Ui;function zi(e,t){return c.useReducer((n,o)=>t[n][o]??n,e)}var Pt=e=>{const{present:t,children:n}=e,o=Ki(t),r=typeof n=="function"?n({present:o.isPresent}):c.Children.only(n),s=$(o.ref,Gi(r));return typeof n=="function"||o.isPresent?c.cloneElement(r,{ref:s}):null};Pt.displayName="Presence";function Ki(e){const[t,n]=c.useState(),o=c.useRef(null),r=c.useRef(e),s=c.useRef("none"),i=e?"mounted":"unmounted",[a,l]=zi(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=ot(o.current);s.current=a==="mounted"?u:"none"},[a]),K(()=>{const u=o.current,f=r.current;if(f!==e){const h=s.current,m=ot(u);e?l("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&h!==m?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,l]),K(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,p=m=>{const d=ot(o.current).includes(m.animationName);if(m.target===t&&d&&(l("ANIMATION_END"),!r.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=m=>{m.target===t&&(s.current=ot(o.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:c.useCallback(u=>{o.current=u?getComputedStyle(u):null,n(u)},[])}}function ot(e){return(e==null?void 0:e.animationName)||"none"}function Gi(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Yi=eo[" useInsertionEffect ".trim().toString()]||K;function qe({prop:e,defaultProp:t,onChange:n=()=>{},caller:o}){const[r,s,i]=Xi({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:r;{const f=c.useRef(e!==void 0);c.useEffect(()=>{const p=f.current;p!==a&&console.warn(`${o} is changing from ${p?"controlled":"uncontrolled"} to ${a?"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=a},[a,o])}const u=c.useCallback(f=>{var p;if(a){const h=qi(f)?f(e):f;h!==e&&((p=i.current)==null||p.call(i,h))}else s(f)},[a,e,s,i]);return[l,u]}function Xi({defaultProp:e,onChange:t}){const[n,o]=c.useState(e),r=c.useRef(n),s=c.useRef(t);return Yi(()=>{s.current=t},[t]),c.useEffect(()=>{var i;r.current!==n&&((i=s.current)==null||i.call(s,n),r.current=n)},[n,r]),[n,o,s]}function qi(e){return typeof e=="function"}var _o=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Zi="VisuallyHidden",Io=c.forwardRef((e,t)=>y.jsx(M.span,{...e,ref:t,style:{..._o,...e.style}}));Io.displayName=Zi;var Qi=Io,[Rt,fl]=je("Tooltip",[We]),At=We(),Mo="TooltipProvider",Ji=700,Qt="tooltip.open",[ea,xn]=Rt(Mo),Lo=e=>{const{__scopeTooltip:t,delayDuration:n=Ji,skipDelayDuration:o=300,disableHoverableContent:r=!1,children:s}=e,i=c.useRef(!0),a=c.useRef(!1),l=c.useRef(0);return c.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),y.jsx(ea,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:c.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:c.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,o)},[o]),isPointerInTransitRef:a,onPointerInTransitChange:c.useCallback(u=>{a.current=u},[]),disableHoverableContent:r,children:s})};Lo.displayName=Mo;var Ze="Tooltip",[ta,Tt]=Rt(Ze),ko=e=>{const{__scopeTooltip:t,children:n,open:o,defaultOpen:r,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,l=xn(Ze,e.__scopeTooltip),u=At(t),[f,p]=c.useState(null),h=me(),m=c.useRef(0),w=i??l.disableHoverableContent,d=a??l.delayDuration,v=c.useRef(!1),[x,g]=qe({prop:o,defaultProp:r??!1,onChange:b=>{b?(l.onOpen(),document.dispatchEvent(new CustomEvent(Qt))):l.onClose(),s==null||s(b)},caller:Ze}),C=c.useMemo(()=>x?v.current?"delayed-open":"instant-open":"closed",[x]),E=c.useCallback(()=>{window.clearTimeout(m.current),m.current=0,v.current=!1,g(!0)},[g]),S=c.useCallback(()=>{window.clearTimeout(m.current),m.current=0,g(!1)},[g]),P=c.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{v.current=!0,g(!0),m.current=0},d)},[d,g]);return c.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),y.jsx(gn,{...u,children:y.jsx(ta,{scope:t,contentId:h,open:x,stateAttribute:C,trigger:f,onTriggerChange:p,onTriggerEnter:c.useCallback(()=>{l.isOpenDelayedRef.current?P():E()},[l.isOpenDelayedRef,P,E]),onTriggerLeave:c.useCallback(()=>{w?S():(window.clearTimeout(m.current),m.current=0)},[S,w]),onOpen:E,onClose:S,disableHoverableContent:w,children:n})})};ko.displayName=Ze;var Jt="TooltipTrigger",jo=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=Tt(Jt,n),s=xn(Jt,n),i=At(n),a=c.useRef(null),l=$(t,a,r.onTriggerChange),u=c.useRef(!1),f=c.useRef(!1),p=c.useCallback(()=>u.current=!1,[]);return c.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),y.jsx(Et,{asChild:!0,...i,children:y.jsx(M.button,{"aria-describedby":r.open?r.contentId:void 0,"data-state":r.stateAttribute,...o,ref:l,onPointerMove:I(e.onPointerMove,h=>{h.pointerType!=="touch"&&!f.current&&!s.isPointerInTransitRef.current&&(r.onTriggerEnter(),f.current=!0)}),onPointerLeave:I(e.onPointerLeave,()=>{r.onTriggerLeave(),f.current=!1}),onPointerDown:I(e.onPointerDown,()=>{r.open&&r.onClose(),u.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:I(e.onFocus,()=>{u.current||r.onOpen()}),onBlur:I(e.onBlur,r.onClose),onClick:I(e.onClick,r.onClose)})})});jo.displayName=Jt;var na="TooltipPortal",[dl,oa]=Rt(na,{forceMount:void 0}),Le="TooltipContent",Fo=c.forwardRef((e,t)=>{const n=oa(Le,e.__scopeTooltip),{forceMount:o=n.forceMount,side:r="top",...s}=e,i=Tt(Le,e.__scopeTooltip);return y.jsx(Pt,{present:o||i.open,children:i.disableHoverableContent?y.jsx($o,{side:r,...s,ref:t}):y.jsx(ra,{side:r,...s,ref:t})})}),ra=c.forwardRef((e,t)=>{const n=Tt(Le,e.__scopeTooltip),o=xn(Le,e.__scopeTooltip),r=c.useRef(null),s=$(t,r),[i,a]=c.useState(null),{trigger:l,onClose:u}=n,f=r.current,{onPointerInTransitChange:p}=o,h=c.useCallback(()=>{a(null),p(!1)},[p]),m=c.useCallback((w,d)=>{const v=w.currentTarget,x={x:w.clientX,y:w.clientY},g=la(x,v.getBoundingClientRect()),C=ua(x,g),E=fa(d.getBoundingClientRect()),S=pa([...C,...E]);a(S),p(!0)},[p]);return c.useEffect(()=>()=>h(),[h]),c.useEffect(()=>{if(l&&f){const w=v=>m(v,f),d=v=>m(v,l);return l.addEventListener("pointerleave",w),f.addEventListener("pointerleave",d),()=>{l.removeEventListener("pointerleave",w),f.removeEventListener("pointerleave",d)}}},[l,f,m,h]),c.useEffect(()=>{if(i){const w=d=>{const v=d.target,x={x:d.clientX,y:d.clientY},g=(l==null?void 0:l.contains(v))||(f==null?void 0:f.contains(v)),C=!da(x,i);g?h():C&&(h(),u())};return document.addEventListener("pointermove",w),()=>document.removeEventListener("pointermove",w)}},[l,f,i,u,h]),y.jsx($o,{...e,ref:s})}),[sa,ia]=Rt(Ze,{isInside:!1}),aa=ds("TooltipContent"),$o=c.forwardRef((e,t)=>{const{__scopeTooltip:n,children:o,"aria-label":r,onEscapeKeyDown:s,onPointerDownOutside:i,...a}=e,l=Tt(Le,n),u=At(n),{onClose:f}=l;return c.useEffect(()=>(document.addEventListener(Qt,f),()=>document.removeEventListener(Qt,f)),[f]),c.useEffect(()=>{if(l.trigger){const p=h=>{const m=h.target;m!=null&&m.contains(l.trigger)&&f()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[l.trigger,f]),y.jsx(Qe,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:p=>p.preventDefault(),onDismiss:f,children:y.jsxs(yn,{"data-state":l.stateAttribute,...u,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[y.jsx(aa,{children:o}),y.jsx(sa,{scope:n,isInside:!0,children:y.jsx(Qi,{id:l.contentId,role:"tooltip",children:r||o})})]})})});Fo.displayName=Le;var Wo="TooltipArrow",ca=c.forwardRef((e,t)=>{const{__scopeTooltip:n,...o}=e,r=At(n);return ia(Wo,n).isInside?null:y.jsx(wn,{...r,...o,ref:t})});ca.displayName=Wo;function la(e,t){const n=Math.abs(t.top-e.y),o=Math.abs(t.bottom-e.y),r=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,o,r,s)){case s:return"left";case r:return"right";case n:return"top";case o:return"bottom";default:throw new Error("unreachable")}}function ua(e,t,n=5){const o=[];switch(t){case"top":o.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":o.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":o.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":o.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return o}function fa(e){const{top:t,right:n,bottom:o,left:r}=e;return[{x:r,y:t},{x:n,y:t},{x:n,y:o},{x:r,y:o}]}function da(e,t){const{x:n,y:o}=e;let r=!1;for(let s=0,i=t.length-1;so!=h>o&&n<(p-u)*(o-f)/(h-f)+u&&(r=!r)}return r}function pa(e){const t=e.slice();return t.sort((n,o)=>n.xo.x?1:n.yo.y?1:0),ma(t)}function ma(e){if(e.length<=1)return e.slice();const t=[];for(let o=0;o=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(r.y-i.y)>=(s.y-i.y)*(r.x-i.x))t.pop();else break}t.push(r)}t.pop();const n=[];for(let o=e.length-1;o>=0;o--){const r=e[o];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(r.y-i.y)>=(s.y-i.y)*(r.x-i.x))n.pop();else break}n.push(r)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var pl=Lo,ml=ko,hl=jo,vl=Fo;function ha(e){const t=e+"CollectionProvider",[n,o]=je(t),[r,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=d=>{const{scope:v,children:x}=d,g=be.useRef(null),C=be.useRef(new Map).current;return y.jsx(r,{scope:v,itemMap:C,collectionRef:g,children:x})};i.displayName=t;const a=e+"CollectionSlot",l=Ee(a),u=be.forwardRef((d,v)=>{const{scope:x,children:g}=d,C=s(a,x),E=$(v,C.collectionRef);return y.jsx(l,{ref:E,children:g})});u.displayName=a;const f=e+"CollectionItemSlot",p="data-radix-collection-item",h=Ee(f),m=be.forwardRef((d,v)=>{const{scope:x,children:g,...C}=d,E=be.useRef(null),S=$(v,E),P=s(f,x);return be.useEffect(()=>(P.itemMap.set(E,{ref:E,...C}),()=>void P.itemMap.delete(E))),y.jsx(h,{[p]:"",ref:S,children:g})});m.displayName=f;function w(d){const v=s(e+"CollectionConsumer",d);return be.useCallback(()=>{const g=v.collectionRef.current;if(!g)return[];const C=Array.from(g.querySelectorAll(`[${p}]`));return Array.from(v.itemMap.values()).sort((P,b)=>C.indexOf(P.ref.current)-C.indexOf(b.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:u,ItemSlot:m},w,o]}function he(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e==null||e(r),n===!1||!r.defaultPrevented)return t==null?void 0:t(r)}}var va="DismissableLayer",en="dismissableLayer.update",ga="dismissableLayer.pointerDownOutside",ya="dismissableLayer.focusOutside",Wn,Bo=c.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Ho=c.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:o,onPointerDownOutside:r,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,u=c.useContext(Bo),[f,p]=c.useState(null),h=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=c.useState({}),w=$(t,b=>p(b)),d=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=d.indexOf(v),g=f?d.indexOf(f):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,E=g>=x,S=Ca(b=>{const T=b.target,D=[...u.branches].some(O=>O.contains(T));!E||D||(r==null||r(b),i==null||i(b),b.defaultPrevented||a==null||a())},h),P=ba(b=>{const T=b.target;[...u.branches].some(O=>O.contains(T))||(s==null||s(b),i==null||i(b),b.defaultPrevented||a==null||a())},h);return io(b=>{g===u.layers.size-1&&(o==null||o(b),!b.defaultPrevented&&a&&(b.preventDefault(),a()))},h),c.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Wn=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Bn(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Wn)}},[f,h,n,u]),c.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Bn())},[f,u]),c.useEffect(()=>{const b=()=>m({});return document.addEventListener(en,b),()=>document.removeEventListener(en,b)},[]),y.jsx(M.div,{...l,ref:w,style:{pointerEvents:C?E?"auto":"none":void 0,...e.style},onFocusCapture:he(e.onFocusCapture,P.onFocusCapture),onBlurCapture:he(e.onBlurCapture,P.onBlurCapture),onPointerDownCapture:he(e.onPointerDownCapture,S.onPointerDownCapture)})});Ho.displayName=va;var wa="DismissableLayerBranch",xa=c.forwardRef((e,t)=>{const n=c.useContext(Bo),o=c.useRef(null),r=$(t,o);return c.useEffect(()=>{const s=o.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),y.jsx(M.div,{...e,ref:r})});xa.displayName=wa;function Ca(e,t=globalThis==null?void 0:globalThis.document){const n=le(e),o=c.useRef(!1),r=c.useRef(()=>{});return c.useEffect(()=>{const s=a=>{if(a.target&&!o.current){let l=function(){Vo(ga,n,u,{discrete:!0})};const u={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",r.current),r.current=l,t.addEventListener("click",r.current,{once:!0})):l()}else t.removeEventListener("click",r.current);o.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",r.current)}},[t,n]),{onPointerDownCapture:()=>o.current=!0}}function ba(e,t=globalThis==null?void 0:globalThis.document){const n=le(e),o=c.useRef(!1);return c.useEffect(()=>{const r=s=>{s.target&&!o.current&&Vo(ya,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",r),()=>t.removeEventListener("focusin",r)},[t,n]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}function Bn(){const e=new CustomEvent(en);document.dispatchEvent(e)}function Vo(e,t,n,{discrete:o}){const r=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),o?so(r,s):r.dispatchEvent(s)}var Wt="focusScope.autoFocusOnMount",Bt="focusScope.autoFocusOnUnmount",Hn={bubbles:!1,cancelable:!0},Ea="FocusScope",Ot=c.forwardRef((e,t)=>{const{loop:n=!1,trapped:o=!1,onMountAutoFocus:r,onUnmountAutoFocus:s,...i}=e,[a,l]=c.useState(null),u=le(r),f=le(s),p=c.useRef(null),h=$(t,d=>l(d)),m=c.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;c.useEffect(()=>{if(o){let d=function(C){if(m.paused||!a)return;const E=C.target;a.contains(E)?p.current=E:pe(p.current,{select:!0})},v=function(C){if(m.paused||!a)return;const E=C.relatedTarget;E!==null&&(a.contains(E)||pe(p.current,{select:!0}))},x=function(C){if(document.activeElement===document.body)for(const S of C)S.removedNodes.length>0&&pe(a)};document.addEventListener("focusin",d),document.addEventListener("focusout",v);const g=new MutationObserver(x);return a&&g.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",d),document.removeEventListener("focusout",v),g.disconnect()}}},[o,a,m.paused]),c.useEffect(()=>{if(a){Un.add(m);const d=document.activeElement;if(!a.contains(d)){const x=new CustomEvent(Wt,Hn);a.addEventListener(Wt,u),a.dispatchEvent(x),x.defaultPrevented||(Sa(Oa(Uo(a)),{select:!0}),document.activeElement===d&&pe(a))}return()=>{a.removeEventListener(Wt,u),setTimeout(()=>{const x=new CustomEvent(Bt,Hn);a.addEventListener(Bt,f),a.dispatchEvent(x),x.defaultPrevented||pe(d??document.body,{select:!0}),a.removeEventListener(Bt,f),Un.remove(m)},0)}}},[a,u,f,m]);const w=c.useCallback(d=>{if(!n&&!o||m.paused)return;const v=d.key==="Tab"&&!d.altKey&&!d.ctrlKey&&!d.metaKey,x=document.activeElement;if(v&&x){const g=d.currentTarget,[C,E]=Pa(g);C&&E?!d.shiftKey&&x===E?(d.preventDefault(),n&&pe(C,{select:!0})):d.shiftKey&&x===C&&(d.preventDefault(),n&&pe(E,{select:!0})):x===g&&d.preventDefault()}},[n,o,m.paused]);return y.jsx(M.div,{tabIndex:-1,...i,ref:h,onKeyDown:w})});Ot.displayName=Ea;function Sa(e,{select:t=!1}={}){const n=document.activeElement;for(const o of e)if(pe(o,{select:t}),document.activeElement!==n)return}function Pa(e){const t=Uo(e),n=Vn(t,e),o=Vn(t.reverse(),e);return[n,o]}function Uo(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const r=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||r?NodeFilter.FILTER_SKIP:o.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Vn(e,t){for(const n of e)if(!Ra(n,{upTo:t}))return n}function Ra(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Aa(e){return e instanceof HTMLInputElement&&"select"in e}function pe(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Aa(e)&&t&&e.select()}}var Un=Ta();function Ta(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=zn(e,t),e.unshift(t)},remove(t){var n;e=zn(e,t),(n=e[0])==null||n.resume()}}}function zn(e,t){const n=[...e],o=n.indexOf(t);return o!==-1&&n.splice(o,1),n}function Oa(e){return e.filter(t=>t.tagName!=="A")}function Na(e,t){return c.useReducer((n,o)=>t[n][o]??n,e)}var Nt=e=>{const{present:t,children:n}=e,o=Da(t),r=typeof n=="function"?n({present:o.isPresent}):c.Children.only(n),s=$(o.ref,_a(r));return typeof n=="function"||o.isPresent?c.cloneElement(r,{ref:s}):null};Nt.displayName="Presence";function Da(e){const[t,n]=c.useState(),o=c.useRef(null),r=c.useRef(e),s=c.useRef("none"),i=e?"mounted":"unmounted",[a,l]=Na(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return c.useEffect(()=>{const u=rt(o.current);s.current=a==="mounted"?u:"none"},[a]),K(()=>{const u=o.current,f=r.current;if(f!==e){const h=s.current,m=rt(u);e?l("MOUNT"):m==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&h!==m?"ANIMATION_OUT":"UNMOUNT"),r.current=e}},[e,l]),K(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,p=m=>{const d=rt(o.current).includes(CSS.escape(m.animationName));if(m.target===t&&d&&(l("ANIMATION_END"),!r.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=m=>{m.target===t&&(s.current=rt(o.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",p),t.addEventListener("animationend",p),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",p),t.removeEventListener("animationend",p)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:c.useCallback(u=>{o.current=u?getComputedStyle(u):null,n(u)},[])}}function rt(e){return(e==null?void 0:e.animationName)||"none"}function _a(e){var o,r;let t=(o=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(r=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Ht=0;function Ia(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Kn()),document.body.insertAdjacentElement("beforeend",e[1]??Kn()),Ht++,()=>{Ht===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ht--}},[])}function Kn(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var oe=function(){return oe=Object.assign||function(t){for(var n,o=1,r=arguments.length;o"u")return qa;var t=Za(e),n=document.documentElement.clientWidth,o=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,o-n+t[2]-t[0])}},Ja=Yo(),Ie="data-scroll-locked",ec=function(e,t,n,o){var r=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),` .`.concat(La,` { overflow: hidden `).concat(o,`; padding-right: `).concat(a,"px ").concat(o,`; } body[`).concat(Ie,`] { overflow: hidden `).concat(o,`; overscroll-behavior: contain; `).concat([t&&"position: relative ".concat(o,";"),n==="margin"&&` padding-left: `.concat(r,`px; padding-top: `).concat(s,`px; padding-right: `).concat(i,`px; margin-left:0; margin-top:0; margin-right: `).concat(a,"px ").concat(o,`; `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(o,";")].filter(Boolean).join(""),` } .`).concat(ut,` { right: `).concat(a,"px ").concat(o,`; } .`).concat(ft,` { margin-right: `).concat(a,"px ").concat(o,`; } .`).concat(ut," .").concat(ut,` { right: 0 `).concat(o,`; } .`).concat(ft," .").concat(ft,` { margin-right: 0 `).concat(o,`; } body[`).concat(Ie,`] { `).concat(ka,": ").concat(a,`px; } `)},Yn=function(){var e=parseInt(document.body.getAttribute(Ie)||"0",10);return isFinite(e)?e:0},tc=function(){c.useEffect(function(){return document.body.setAttribute(Ie,(Yn()+1).toString()),function(){var e=Yn()-1;e<=0?document.body.removeAttribute(Ie):document.body.setAttribute(Ie,e.toString())}},[])},nc=function(e){var t=e.noRelative,n=e.noImportant,o=e.gapMode,r=o===void 0?"margin":o;tc();var s=c.useMemo(function(){return Qa(r)},[r]);return c.createElement(Ja,{styles:ec(s,!t,r,n?"":"!important")})},tn=!1;if(typeof window<"u")try{var st=Object.defineProperty({},"passive",{get:function(){return tn=!0,!0}});window.addEventListener("test",st,st),window.removeEventListener("test",st,st)}catch{tn=!1}var Oe=tn?{passive:!1}:!1,oc=function(e){return e.tagName==="TEXTAREA"},Xo=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!oc(e)&&n[t]==="visible")},rc=function(e){return Xo(e,"overflowY")},sc=function(e){return Xo(e,"overflowX")},Xn=function(e,t){var n=t.ownerDocument,o=t;do{typeof ShadowRoot<"u"&&o instanceof ShadowRoot&&(o=o.host);var r=qo(e,o);if(r){var s=Zo(e,o),i=s[1],a=s[2];if(i>a)return!0}o=o.parentNode}while(o&&o!==n.body);return!1},ic=function(e){var t=e.scrollTop,n=e.scrollHeight,o=e.clientHeight;return[t,n,o]},ac=function(e){var t=e.scrollLeft,n=e.scrollWidth,o=e.clientWidth;return[t,n,o]},qo=function(e,t){return e==="v"?rc(t):sc(t)},Zo=function(e,t){return e==="v"?ic(t):ac(t)},cc=function(e,t){return e==="h"&&t==="rtl"?-1:1},lc=function(e,t,n,o,r){var s=cc(e,window.getComputedStyle(t).direction),i=s*o,a=n.target,l=t.contains(a),u=!1,f=i>0,p=0,h=0;do{if(!a)break;var m=Zo(e,a),w=m[0],d=m[1],v=m[2],x=d-v-s*w;(w||x)&&qo(e,a)&&(p+=x,h+=w);var g=a.parentNode;a=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(f&&(Math.abs(p)<1||!r)||!f&&(Math.abs(h)<1||!r))&&(u=!0),u},it=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},qn=function(e){return[e.deltaX,e.deltaY]},Zn=function(e){return e&&"current"in e?e.current:e},uc=function(e,t){return e[0]===t[0]&&e[1]===t[1]},fc=function(e){return` .block-interactivity-`.concat(e,` {pointer-events: none;} .allow-interactivity-`).concat(e,` {pointer-events: all;} `)},dc=0,Ne=[];function pc(e){var t=c.useRef([]),n=c.useRef([0,0]),o=c.useRef(),r=c.useState(dc++)[0],s=c.useState(Yo)[0],i=c.useRef(e);c.useEffect(function(){i.current=e},[e]),c.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(r));var d=Ma([e.lockRef.current],(e.shards||[]).map(Zn),!0).filter(Boolean);return d.forEach(function(v){return v.classList.add("allow-interactivity-".concat(r))}),function(){document.body.classList.remove("block-interactivity-".concat(r)),d.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(r))})}}},[e.inert,e.lockRef.current,e.shards]);var a=c.useCallback(function(d,v){if("touches"in d&&d.touches.length===2||d.type==="wheel"&&d.ctrlKey)return!i.current.allowPinchZoom;var x=it(d),g=n.current,C="deltaX"in d?d.deltaX:g[0]-x[0],E="deltaY"in d?d.deltaY:g[1]-x[1],S,P=d.target,b=Math.abs(C)>Math.abs(E)?"h":"v";if("touches"in d&&b==="h"&&P.type==="range")return!1;var T=Xn(b,P);if(!T)return!0;if(T?S=b:(S=b==="v"?"h":"v",T=Xn(b,P)),!T)return!1;if(!o.current&&"changedTouches"in d&&(C||E)&&(o.current=S),!S)return!0;var D=o.current||S;return lc(D,v,d,D==="h"?C:E,!0)},[]),l=c.useCallback(function(d){var v=d;if(!(!Ne.length||Ne[Ne.length-1]!==s)){var x="deltaY"in v?qn(v):it(v),g=t.current.filter(function(S){return S.name===v.type&&(S.target===v.target||v.target===S.shadowParent)&&uc(S.delta,x)})[0];if(g&&g.should){v.cancelable&&v.preventDefault();return}if(!g){var C=(i.current.shards||[]).map(Zn).filter(Boolean).filter(function(S){return S.contains(v.target)}),E=C.length>0?a(v,C[0]):!i.current.noIsolation;E&&v.cancelable&&v.preventDefault()}}},[]),u=c.useCallback(function(d,v,x,g){var C={name:d,delta:v,target:x,should:g,shadowParent:mc(x)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(E){return E!==C})},1)},[]),f=c.useCallback(function(d){n.current=it(d),o.current=void 0},[]),p=c.useCallback(function(d){u(d.type,qn(d),d.target,a(d,e.lockRef.current))},[]),h=c.useCallback(function(d){u(d.type,it(d),d.target,a(d,e.lockRef.current))},[]);c.useEffect(function(){return Ne.push(s),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:h}),document.addEventListener("wheel",l,Oe),document.addEventListener("touchmove",l,Oe),document.addEventListener("touchstart",f,Oe),function(){Ne=Ne.filter(function(d){return d!==s}),document.removeEventListener("wheel",l,Oe),document.removeEventListener("touchmove",l,Oe),document.removeEventListener("touchstart",f,Oe)}},[]);var m=e.removeScrollBar,w=e.inert;return c.createElement(c.Fragment,null,w?c.createElement(s,{styles:fc(r)}):null,m?c.createElement(nc,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function mc(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const hc=Va(Go,pc);var _t=c.forwardRef(function(e,t){return c.createElement(Dt,oe({},e,{ref:t,sideCar:hc}))});_t.classNames=Dt.classNames;var vc=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},De=new WeakMap,at=new WeakMap,ct={},Kt=0,Qo=function(e){return e&&(e.host||Qo(e.parentNode))},gc=function(e,t){return t.map(function(n){if(e.contains(n))return n;var o=Qo(n);return o&&e.contains(o)?o:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},yc=function(e,t,n,o){var r=gc(t,Array.isArray(e)?e:[e]);ct[n]||(ct[n]=new WeakMap);var s=ct[n],i=[],a=new Set,l=new Set(r),u=function(p){!p||a.has(p)||(a.add(p),u(p.parentNode))};r.forEach(u);var f=function(p){!p||l.has(p)||Array.prototype.forEach.call(p.children,function(h){if(a.has(h))f(h);else try{var m=h.getAttribute(o),w=m!==null&&m!=="false",d=(De.get(h)||0)+1,v=(s.get(h)||0)+1;De.set(h,d),s.set(h,v),i.push(h),d===1&&w&&at.set(h,!0),v===1&&h.setAttribute(n,"true"),w||h.setAttribute(o,"true")}catch(x){console.error("aria-hidden: cannot operate on ",h,x)}})};return f(t),a.clear(),Kt++,function(){i.forEach(function(p){var h=De.get(p)-1,m=s.get(p)-1;De.set(p,h),s.set(p,m),h||(at.has(p)||p.removeAttribute(o),at.delete(p)),m||p.removeAttribute(n)}),Kt--,Kt||(De=new WeakMap,De=new WeakMap,at=new WeakMap,ct={})}},Cn=function(e,t,n){n===void 0&&(n="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),r=vc(e);return r?(o.push.apply(o,Array.from(r.querySelectorAll("[aria-live]"))),yc(o,r,n,"aria-hidden")):function(){return null}},It="Dialog",[Jo,gl]=je(It),[wc,te]=Jo(It),er=e=>{const{__scopeDialog:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:i=!0}=e,a=c.useRef(null),l=c.useRef(null),[u,f]=qe({prop:o,defaultProp:r??!1,onChange:s,caller:It});return y.jsx(wc,{scope:t,triggerRef:a,contentRef:l,contentId:me(),titleId:me(),descriptionId:me(),open:u,onOpenChange:f,onOpenToggle:c.useCallback(()=>f(p=>!p),[f]),modal:i,children:n})};er.displayName=It;var tr="DialogTrigger",nr=c.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=te(tr,n),s=$(t,r.triggerRef);return y.jsx(M.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":Sn(r.open),...o,ref:s,onClick:he(e.onClick,r.onOpenToggle)})});nr.displayName=tr;var bn="DialogPortal",[xc,or]=Jo(bn,{forceMount:void 0}),rr=e=>{const{__scopeDialog:t,forceMount:n,children:o,container:r}=e,s=te(bn,t);return y.jsx(xc,{scope:t,forceMount:n,children:c.Children.map(o,i=>y.jsx(Nt,{present:n||s.open,children:y.jsx(St,{asChild:!0,container:r,children:i})}))})};rr.displayName=bn;var vt="DialogOverlay",sr=c.forwardRef((e,t)=>{const n=or(vt,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=te(vt,e.__scopeDialog);return s.modal?y.jsx(Nt,{present:o||s.open,children:y.jsx(bc,{...r,ref:t})}):null});sr.displayName=vt;var Cc=Ee("DialogOverlay.RemoveScroll"),bc=c.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=te(vt,n);return y.jsx(_t,{as:Cc,allowPinchZoom:!0,shards:[r.contentRef],children:y.jsx(M.div,{"data-state":Sn(r.open),...o,ref:t,style:{pointerEvents:"auto",...o.style}})})}),Pe="DialogContent",ir=c.forwardRef((e,t)=>{const n=or(Pe,e.__scopeDialog),{forceMount:o=n.forceMount,...r}=e,s=te(Pe,e.__scopeDialog);return y.jsx(Nt,{present:o||s.open,children:s.modal?y.jsx(Ec,{...r,ref:t}):y.jsx(Sc,{...r,ref:t})})});ir.displayName=Pe;var Ec=c.forwardRef((e,t)=>{const n=te(Pe,e.__scopeDialog),o=c.useRef(null),r=$(t,n.contentRef,o);return c.useEffect(()=>{const s=o.current;if(s)return Cn(s)},[]),y.jsx(ar,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:he(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:he(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&s.preventDefault()}),onFocusOutside:he(e.onFocusOutside,s=>s.preventDefault())})}),Sc=c.forwardRef((e,t)=>{const n=te(Pe,e.__scopeDialog),o=c.useRef(!1),r=c.useRef(!1);return y.jsx(ar,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(o.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const i=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),ar=c.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,...i}=e,a=te(Pe,n),l=c.useRef(null),u=$(t,l);return Ia(),y.jsxs(y.Fragment,{children:[y.jsx(Ot,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:y.jsx(Ho,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":Sn(a.open),...i,ref:u,onDismiss:()=>a.onOpenChange(!1)})}),y.jsxs(y.Fragment,{children:[y.jsx(Pc,{titleId:a.titleId}),y.jsx(Ac,{contentRef:l,descriptionId:a.descriptionId})]})]})}),En="DialogTitle",cr=c.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=te(En,n);return y.jsx(M.h2,{id:r.titleId,...o,ref:t})});cr.displayName=En;var lr="DialogDescription",ur=c.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=te(lr,n);return y.jsx(M.p,{id:r.descriptionId,...o,ref:t})});ur.displayName=lr;var fr="DialogClose",dr=c.forwardRef((e,t)=>{const{__scopeDialog:n,...o}=e,r=te(fr,n);return y.jsx(M.button,{type:"button",...o,ref:t,onClick:he(e.onClick,()=>r.onOpenChange(!1))})});dr.displayName=fr;function Sn(e){return e?"open":"closed"}var pr="DialogTitleWarning",[yl,mr]=ls(pr,{contentName:Pe,titleName:En,docsSlug:"dialog"}),Pc=({titleId:e})=>{const t=mr(pr),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users. If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component. For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return c.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Rc="DialogDescriptionWarning",Ac=({contentRef:e,descriptionId:t})=>{const o=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${mr(Rc).contentName}}.`;return c.useEffect(()=>{var s;const r=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&r&&(document.getElementById(t)||console.warn(o))},[o,e,t]),null},wl=er,xl=nr,Cl=rr,bl=sr,El=ir,Sl=cr,Pl=ur,Rl=dr,Tc=c.createContext(void 0);function Oc(e){const t=c.useContext(Tc);return e||t||"ltr"}var Gt=0;function hr(){c.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Qn()),document.body.insertAdjacentElement("beforeend",e[1]??Qn()),Gt++,()=>{Gt===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Gt--}},[])}function Qn(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}function Nc(e){const t=c.useRef({value:e,previous:e});return c.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Jn(e,[t,n]){return Math.min(n,Math.max(t,e))}var Dc=[" ","Enter","ArrowUp","ArrowDown"],_c=[" ","Enter"],Re="Select",[Mt,Lt,Ic]=ha(Re),[Be,Al]=je(Re,[Ic,We]),kt=We(),[Mc,ye]=Be(Re),[Lc,kc]=Be(Re),vr=e=>{const{__scopeSelect:t,children:n,open:o,defaultOpen:r,onOpenChange:s,value:i,defaultValue:a,onValueChange:l,dir:u,name:f,autoComplete:p,disabled:h,required:m,form:w}=e,d=kt(t),[v,x]=c.useState(null),[g,C]=c.useState(null),[E,S]=c.useState(!1),P=Oc(u),[b,T]=qe({prop:o,defaultProp:r??!1,onChange:s,caller:Re}),[D,O]=qe({prop:i,defaultProp:a,onChange:l,caller:Re}),B=c.useRef(null),H=v?w||!!v.closest("form"):!0,[k,_]=c.useState(new Set),z=Array.from(k).map(N=>N.props.value).join(";");return y.jsx(gn,{...d,children:y.jsxs(Mc,{required:m,scope:t,trigger:v,onTriggerChange:x,valueNode:g,onValueNodeChange:C,valueNodeHasChildren:E,onValueNodeHasChildrenChange:S,contentId:me(),value:D,onValueChange:O,open:b,onOpenChange:T,dir:P,triggerPointerDownPosRef:B,disabled:h,children:[y.jsx(Mt.Provider,{scope:t,children:y.jsx(Lc,{scope:e.__scopeSelect,onNativeOptionAdd:c.useCallback(N=>{_(L=>new Set(L).add(N))},[]),onNativeOptionRemove:c.useCallback(N=>{_(L=>{const R=new Set(L);return R.delete(N),R})},[]),children:n})}),H?y.jsxs(Br,{"aria-hidden":!0,required:m,tabIndex:-1,name:f,autoComplete:p,value:D,onChange:N=>O(N.target.value),disabled:h,form:w,children:[D===void 0?y.jsx("option",{value:""}):null,Array.from(k)]},z):null]})})};vr.displayName=Re;var gr="SelectTrigger",yr=c.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:o=!1,...r}=e,s=kt(n),i=ye(gr,n),a=i.disabled||o,l=$(t,i.onTriggerChange),u=Lt(n),f=c.useRef("touch"),[p,h,m]=Vr(d=>{const v=u().filter(C=>!C.disabled),x=v.find(C=>C.value===i.value),g=Ur(v,d,x);g!==void 0&&i.onValueChange(g.value)}),w=d=>{a||(i.onOpenChange(!0),m()),d&&(i.triggerPointerDownPosRef.current={x:Math.round(d.pageX),y:Math.round(d.pageY)})};return y.jsx(Et,{asChild:!0,...s,children:y.jsx(M.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:a,"data-disabled":a?"":void 0,"data-placeholder":Hr(i.value)?"":void 0,...r,ref:l,onClick:I(r.onClick,d=>{d.currentTarget.focus(),f.current!=="mouse"&&w(d)}),onPointerDown:I(r.onPointerDown,d=>{f.current=d.pointerType;const v=d.target;v.hasPointerCapture(d.pointerId)&&v.releasePointerCapture(d.pointerId),d.button===0&&d.ctrlKey===!1&&d.pointerType==="mouse"&&(w(d),d.preventDefault())}),onKeyDown:I(r.onKeyDown,d=>{const v=p.current!=="";!(d.ctrlKey||d.altKey||d.metaKey)&&d.key.length===1&&h(d.key),!(v&&d.key===" ")&&Dc.includes(d.key)&&(w(),d.preventDefault())})})})});yr.displayName=gr;var wr="SelectValue",xr=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,children:s,placeholder:i="",...a}=e,l=ye(wr,n),{onValueNodeHasChildrenChange:u}=l,f=s!==void 0,p=$(t,l.onValueNodeChange);return K(()=>{u(f)},[u,f]),y.jsx(M.span,{...a,ref:p,style:{pointerEvents:"none"},children:Hr(l.value)?y.jsx(y.Fragment,{children:i}):s})});xr.displayName=wr;var jc="SelectIcon",Cr=c.forwardRef((e,t)=>{const{__scopeSelect:n,children:o,...r}=e;return y.jsx(M.span,{"aria-hidden":!0,...r,ref:t,children:o||"▼"})});Cr.displayName=jc;var Fc="SelectPortal",br=e=>y.jsx(St,{asChild:!0,...e});br.displayName=Fc;var Ae="SelectContent",Er=c.forwardRef((e,t)=>{const n=ye(Ae,e.__scopeSelect),[o,r]=c.useState();if(K(()=>{r(new DocumentFragment)},[]),!n.open){const s=o;return s?yt.createPortal(y.jsx(Sr,{scope:e.__scopeSelect,children:y.jsx(Mt.Slot,{scope:e.__scopeSelect,children:y.jsx("div",{children:e.children})})}),s):null}return y.jsx(Pr,{...e,ref:t})});Er.displayName=Ae;var Q=10,[Sr,we]=Be(Ae),$c="SelectContentImpl",Wc=Ee("SelectContent.RemoveScroll"),Pr=c.forwardRef((e,t)=>{const{__scopeSelect:n,position:o="item-aligned",onCloseAutoFocus:r,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:l,align:u,alignOffset:f,arrowPadding:p,collisionBoundary:h,collisionPadding:m,sticky:w,hideWhenDetached:d,avoidCollisions:v,...x}=e,g=ye(Ae,n),[C,E]=c.useState(null),[S,P]=c.useState(null),b=$(t,A=>E(A)),[T,D]=c.useState(null),[O,B]=c.useState(null),H=Lt(n),[k,_]=c.useState(!1),z=c.useRef(!1);c.useEffect(()=>{if(C)return Cn(C)},[C]),hr();const N=c.useCallback(A=>{const[U,...G]=H().map(F=>F.ref.current),[W]=G.slice(-1),j=document.activeElement;for(const F of A)if(F===j||(F==null||F.scrollIntoView({block:"nearest"}),F===U&&S&&(S.scrollTop=0),F===W&&S&&(S.scrollTop=S.scrollHeight),F==null||F.focus(),document.activeElement!==j))return},[H,S]),L=c.useCallback(()=>N([T,C]),[N,T,C]);c.useEffect(()=>{k&&L()},[k,L]);const{onOpenChange:R,triggerPointerDownPosRef:V}=g;c.useEffect(()=>{if(C){let A={x:0,y:0};const U=W=>{var j,F;A={x:Math.abs(Math.round(W.pageX)-(((j=V.current)==null?void 0:j.x)??0)),y:Math.abs(Math.round(W.pageY)-(((F=V.current)==null?void 0:F.y)??0))}},G=W=>{A.x<=10&&A.y<=10?W.preventDefault():C.contains(W.target)||R(!1),document.removeEventListener("pointermove",U),V.current=null};return V.current!==null&&(document.addEventListener("pointermove",U),document.addEventListener("pointerup",G,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",U),document.removeEventListener("pointerup",G,{capture:!0})}}},[C,R,V]),c.useEffect(()=>{const A=()=>R(!1);return window.addEventListener("blur",A),window.addEventListener("resize",A),()=>{window.removeEventListener("blur",A),window.removeEventListener("resize",A)}},[R]);const[Y,ce]=Vr(A=>{const U=H().filter(j=>!j.disabled),G=U.find(j=>j.ref.current===document.activeElement),W=Ur(U,A,G);W&&setTimeout(()=>W.ref.current.focus())}),He=c.useCallback((A,U,G)=>{const W=!z.current&&!G;(g.value!==void 0&&g.value===U||W)&&(D(A),W&&(z.current=!0))},[g.value]),Ve=c.useCallback(()=>C==null?void 0:C.focus(),[C]),de=c.useCallback((A,U,G)=>{const W=!z.current&&!G;(g.value!==void 0&&g.value===U||W)&&B(A)},[g.value]),Te=o==="popper"?nn:Rr,Ce=Te===nn?{side:a,sideOffset:l,align:u,alignOffset:f,arrowPadding:p,collisionBoundary:h,collisionPadding:m,sticky:w,hideWhenDetached:d,avoidCollisions:v}:{};return y.jsx(Sr,{scope:n,content:C,viewport:S,onViewportChange:P,itemRefCallback:He,selectedItem:T,onItemLeave:Ve,itemTextRefCallback:de,focusSelectedItem:L,selectedItemText:O,position:o,isPositioned:k,searchRef:Y,children:y.jsx(_t,{as:Wc,allowPinchZoom:!0,children:y.jsx(Ot,{asChild:!0,trapped:g.open,onMountAutoFocus:A=>{A.preventDefault()},onUnmountAutoFocus:I(r,A=>{var U;(U=g.trigger)==null||U.focus({preventScroll:!0}),A.preventDefault()}),children:y.jsx(Qe,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:A=>A.preventDefault(),onDismiss:()=>g.onOpenChange(!1),children:y.jsx(Te,{role:"listbox",id:g.contentId,"data-state":g.open?"open":"closed",dir:g.dir,onContextMenu:A=>A.preventDefault(),...x,...Ce,onPlaced:()=>_(!0),ref:b,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:I(x.onKeyDown,A=>{const U=A.ctrlKey||A.altKey||A.metaKey;if(A.key==="Tab"&&A.preventDefault(),!U&&A.key.length===1&&ce(A.key),["ArrowUp","ArrowDown","Home","End"].includes(A.key)){let W=H().filter(j=>!j.disabled).map(j=>j.ref.current);if(["ArrowUp","End"].includes(A.key)&&(W=W.slice().reverse()),["ArrowUp","ArrowDown"].includes(A.key)){const j=A.target,F=W.indexOf(j);W=W.slice(F+1)}setTimeout(()=>N(W)),A.preventDefault()}})})})})})})});Pr.displayName=$c;var Bc="SelectItemAlignedPosition",Rr=c.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:o,...r}=e,s=ye(Ae,n),i=we(Ae,n),[a,l]=c.useState(null),[u,f]=c.useState(null),p=$(t,b=>f(b)),h=Lt(n),m=c.useRef(!1),w=c.useRef(!0),{viewport:d,selectedItem:v,selectedItemText:x,focusSelectedItem:g}=i,C=c.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&u&&d&&v&&x){const b=s.trigger.getBoundingClientRect(),T=u.getBoundingClientRect(),D=s.valueNode.getBoundingClientRect(),O=x.getBoundingClientRect();if(s.dir!=="rtl"){const j=O.left-T.left,F=D.left-j,X=b.left-F,ne=b.width+X,Ue=Math.max(ne,T.width),ze=window.innerWidth-Q,Ke=Jn(F,[Q,Math.max(Q,ze-Ue)]);a.style.minWidth=ne+"px",a.style.left=Ke+"px"}else{const j=T.right-O.right,F=window.innerWidth-D.right-j,X=window.innerWidth-b.right-F,ne=b.width+X,Ue=Math.max(ne,T.width),ze=window.innerWidth-Q,Ke=Jn(F,[Q,Math.max(Q,ze-Ue)]);a.style.minWidth=ne+"px",a.style.right=Ke+"px"}const B=h(),H=window.innerHeight-Q*2,k=d.scrollHeight,_=window.getComputedStyle(u),z=parseInt(_.borderTopWidth,10),N=parseInt(_.paddingTop,10),L=parseInt(_.borderBottomWidth,10),R=parseInt(_.paddingBottom,10),V=z+N+k+R+L,Y=Math.min(v.offsetHeight*5,V),ce=window.getComputedStyle(d),He=parseInt(ce.paddingTop,10),Ve=parseInt(ce.paddingBottom,10),de=b.top+b.height/2-Q,Te=H-de,Ce=v.offsetHeight/2,A=v.offsetTop+Ce,U=z+N+A,G=V-U;if(U<=de){const j=B.length>0&&v===B[B.length-1].ref.current;a.style.bottom="0px";const F=u.clientHeight-d.offsetTop-d.offsetHeight,X=Math.max(Te,Ce+(j?Ve:0)+F+L),ne=U+X;a.style.height=ne+"px"}else{const j=B.length>0&&v===B[0].ref.current;a.style.top="0px";const X=Math.max(de,z+d.offsetTop+(j?He:0)+Ce)+G;a.style.height=X+"px",d.scrollTop=U-de+d.offsetTop}a.style.margin=`${Q}px 0`,a.style.minHeight=Y+"px",a.style.maxHeight=H+"px",o==null||o(),requestAnimationFrame(()=>m.current=!0)}},[h,s.trigger,s.valueNode,a,u,d,v,x,s.dir,o]);K(()=>C(),[C]);const[E,S]=c.useState();K(()=>{u&&S(window.getComputedStyle(u).zIndex)},[u]);const P=c.useCallback(b=>{b&&w.current===!0&&(C(),g==null||g(),w.current=!1)},[C,g]);return y.jsx(Vc,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:m,onScrollButtonChange:P,children:y.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E},children:y.jsx(M.div,{...r,ref:p,style:{boxSizing:"border-box",maxHeight:"100%",...r.style}})})})});Rr.displayName=Bc;var Hc="SelectPopperPosition",nn=c.forwardRef((e,t)=>{const{__scopeSelect:n,align:o="start",collisionPadding:r=Q,...s}=e,i=kt(n);return y.jsx(yn,{...i,...s,ref:t,align:o,collisionPadding:r,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});nn.displayName=Hc;var[Vc,Pn]=Be(Ae,{}),on="SelectViewport",Ar=c.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:o,...r}=e,s=we(on,n),i=Pn(on,n),a=$(t,s.onViewportChange),l=c.useRef(0);return y.jsxs(y.Fragment,{children:[y.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),y.jsx(Mt.Slot,{scope:n,children:y.jsx(M.div,{"data-radix-select-viewport":"",role:"presentation",...r,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...r.style},onScroll:I(r.onScroll,u=>{const f=u.currentTarget,{contentWrapper:p,shouldExpandOnScrollRef:h}=i;if(h!=null&&h.current&&p){const m=Math.abs(l.current-f.scrollTop);if(m>0){const w=window.innerHeight-Q*2,d=parseFloat(p.style.minHeight),v=parseFloat(p.style.height),x=Math.max(d,v);if(x0?E:0,p.style.justifyContent="flex-end")}}}l.current=f.scrollTop})})})]})});Ar.displayName=on;var Tr="SelectGroup",[Uc,zc]=Be(Tr),Or=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=me();return y.jsx(Uc,{scope:n,id:r,children:y.jsx(M.div,{role:"group","aria-labelledby":r,...o,ref:t})})});Or.displayName=Tr;var Nr="SelectLabel",Dr=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=zc(Nr,n);return y.jsx(M.div,{id:r.id,...o,ref:t})});Dr.displayName=Nr;var gt="SelectItem",[Kc,_r]=Be(gt),Ir=c.forwardRef((e,t)=>{const{__scopeSelect:n,value:o,disabled:r=!1,textValue:s,...i}=e,a=ye(gt,n),l=we(gt,n),u=a.value===o,[f,p]=c.useState(s??""),[h,m]=c.useState(!1),w=$(t,g=>{var C;return(C=l.itemRefCallback)==null?void 0:C.call(l,g,o,r)}),d=me(),v=c.useRef("touch"),x=()=>{r||(a.onValueChange(o),a.onOpenChange(!1))};if(o==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return y.jsx(Kc,{scope:n,value:o,disabled:r,textId:d,isSelected:u,onItemTextChange:c.useCallback(g=>{p(C=>C||((g==null?void 0:g.textContent)??"").trim())},[]),children:y.jsx(Mt.ItemSlot,{scope:n,value:o,disabled:r,textValue:f,children:y.jsx(M.div,{role:"option","aria-labelledby":d,"data-highlighted":h?"":void 0,"aria-selected":u&&h,"data-state":u?"checked":"unchecked","aria-disabled":r||void 0,"data-disabled":r?"":void 0,tabIndex:r?void 0:-1,...i,ref:w,onFocus:I(i.onFocus,()=>m(!0)),onBlur:I(i.onBlur,()=>m(!1)),onClick:I(i.onClick,()=>{v.current!=="mouse"&&x()}),onPointerUp:I(i.onPointerUp,()=>{v.current==="mouse"&&x()}),onPointerDown:I(i.onPointerDown,g=>{v.current=g.pointerType}),onPointerMove:I(i.onPointerMove,g=>{var C;v.current=g.pointerType,r?(C=l.onItemLeave)==null||C.call(l):v.current==="mouse"&&g.currentTarget.focus({preventScroll:!0})}),onPointerLeave:I(i.onPointerLeave,g=>{var C;g.currentTarget===document.activeElement&&((C=l.onItemLeave)==null||C.call(l))}),onKeyDown:I(i.onKeyDown,g=>{var E;((E=l.searchRef)==null?void 0:E.current)!==""&&g.key===" "||(_c.includes(g.key)&&x(),g.key===" "&&g.preventDefault())})})})})});Ir.displayName=gt;var Ge="SelectItemText",Mr=c.forwardRef((e,t)=>{const{__scopeSelect:n,className:o,style:r,...s}=e,i=ye(Ge,n),a=we(Ge,n),l=_r(Ge,n),u=kc(Ge,n),[f,p]=c.useState(null),h=$(t,x=>p(x),l.onItemTextChange,x=>{var g;return(g=a.itemTextRefCallback)==null?void 0:g.call(a,x,l.value,l.disabled)}),m=f==null?void 0:f.textContent,w=c.useMemo(()=>y.jsx("option",{value:l.value,disabled:l.disabled,children:m},l.value),[l.disabled,l.value,m]),{onNativeOptionAdd:d,onNativeOptionRemove:v}=u;return K(()=>(d(w),()=>v(w)),[d,v,w]),y.jsxs(y.Fragment,{children:[y.jsx(M.span,{id:l.textId,...s,ref:h}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?yt.createPortal(s.children,i.valueNode):null]})});Mr.displayName=Ge;var Lr="SelectItemIndicator",kr=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return _r(Lr,n).isSelected?y.jsx(M.span,{"aria-hidden":!0,...o,ref:t}):null});kr.displayName=Lr;var rn="SelectScrollUpButton",jr=c.forwardRef((e,t)=>{const n=we(rn,e.__scopeSelect),o=Pn(rn,e.__scopeSelect),[r,s]=c.useState(!1),i=$(t,o.onScrollButtonChange);return K(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollTop>0;s(u)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),r?y.jsx($r,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});jr.displayName=rn;var sn="SelectScrollDownButton",Fr=c.forwardRef((e,t)=>{const n=we(sn,e.__scopeSelect),o=Pn(sn,e.__scopeSelect),[r,s]=c.useState(!1),i=$(t,o.onScrollButtonChange);return K(()=>{if(n.viewport&&n.isPositioned){let a=function(){const u=l.scrollHeight-l.clientHeight,f=Math.ceil(l.scrollTop)l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),r?y.jsx($r,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});Fr.displayName=sn;var $r=c.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:o,...r}=e,s=we("SelectScrollButton",n),i=c.useRef(null),a=Lt(n),l=c.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return c.useEffect(()=>()=>l(),[l]),K(()=>{var f;const u=a().find(p=>p.ref.current===document.activeElement);(f=u==null?void 0:u.ref.current)==null||f.scrollIntoView({block:"nearest"})},[a]),y.jsx(M.div,{"aria-hidden":!0,...r,ref:t,style:{flexShrink:0,...r.style},onPointerDown:I(r.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(o,50))}),onPointerMove:I(r.onPointerMove,()=>{var u;(u=s.onItemLeave)==null||u.call(s),i.current===null&&(i.current=window.setInterval(o,50))}),onPointerLeave:I(r.onPointerLeave,()=>{l()})})}),Gc="SelectSeparator",Wr=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e;return y.jsx(M.div,{"aria-hidden":!0,...o,ref:t})});Wr.displayName=Gc;var an="SelectArrow",Yc=c.forwardRef((e,t)=>{const{__scopeSelect:n,...o}=e,r=kt(n),s=ye(an,n),i=we(an,n);return s.open&&i.position==="popper"?y.jsx(wn,{...r,...o,ref:t}):null});Yc.displayName=an;var Xc="SelectBubbleInput",Br=c.forwardRef(({__scopeSelect:e,value:t,...n},o)=>{const r=c.useRef(null),s=$(o,r),i=Nc(t);return c.useEffect(()=>{const a=r.current;if(!a)return;const l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==t&&f){const p=new Event("change",{bubbles:!0});f.call(a,t),a.dispatchEvent(p)}},[i,t]),y.jsx(M.select,{...n,style:{..._o,...n.style},ref:s,defaultValue:t})});Br.displayName=Xc;function Hr(e){return e===""||e===void 0}function Vr(e){const t=le(e),n=c.useRef(""),o=c.useRef(0),r=c.useCallback(i=>{const a=n.current+i;t(a),function l(u){n.current=u,window.clearTimeout(o.current),u!==""&&(o.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),s=c.useCallback(()=>{n.current="",window.clearTimeout(o.current)},[]);return c.useEffect(()=>()=>window.clearTimeout(o.current),[]),[n,r,s]}function Ur(e,t,n){const r=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=qc(e,Math.max(s,0));r.length===1&&(i=i.filter(u=>u!==n));const l=i.find(u=>u.textValue.toLowerCase().startsWith(r.toLowerCase()));return l!==n?l:void 0}function qc(e,t){return e.map((n,o)=>e[(t+o)%e.length])}var Tl=vr,Ol=yr,Nl=xr,Dl=Cr,_l=br,Il=Er,Ml=Ar,Ll=Or,kl=Dr,jl=Ir,Fl=Mr,$l=kr,Wl=jr,Bl=Fr,Hl=Wr,jt="Popover",[zr,Vl]=je(jt,[We]),et=We(),[Zc,xe]=zr(jt),Kr=e=>{const{__scopePopover:t,children:n,open:o,defaultOpen:r,onOpenChange:s,modal:i=!1}=e,a=et(t),l=c.useRef(null),[u,f]=c.useState(!1),[p,h]=qe({prop:o,defaultProp:r??!1,onChange:s,caller:jt});return y.jsx(gn,{...a,children:y.jsx(Zc,{scope:t,contentId:me(),triggerRef:l,open:p,onOpenChange:h,onOpenToggle:c.useCallback(()=>h(m=>!m),[h]),hasCustomAnchor:u,onCustomAnchorAdd:c.useCallback(()=>f(!0),[]),onCustomAnchorRemove:c.useCallback(()=>f(!1),[]),modal:i,children:n})})};Kr.displayName=jt;var Gr="PopoverAnchor",Qc=c.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=xe(Gr,n),s=et(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:a}=r;return c.useEffect(()=>(i(),()=>a()),[i,a]),y.jsx(Et,{...s,...o,ref:t})});Qc.displayName=Gr;var Yr="PopoverTrigger",Xr=c.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=xe(Yr,n),s=et(n),i=$(t,r.triggerRef),a=y.jsx(M.button,{type:"button","aria-haspopup":"dialog","aria-expanded":r.open,"aria-controls":r.contentId,"data-state":es(r.open),...o,ref:i,onClick:I(e.onClick,r.onOpenToggle)});return r.hasCustomAnchor?a:y.jsx(Et,{asChild:!0,...s,children:a})});Xr.displayName=Yr;var Rn="PopoverPortal",[Jc,el]=zr(Rn,{forceMount:void 0}),qr=e=>{const{__scopePopover:t,forceMount:n,children:o,container:r}=e,s=xe(Rn,t);return y.jsx(Jc,{scope:t,forceMount:n,children:y.jsx(Pt,{present:n||s.open,children:y.jsx(St,{asChild:!0,container:r,children:o})})})};qr.displayName=Rn;var ke="PopoverContent",Zr=c.forwardRef((e,t)=>{const n=el(ke,e.__scopePopover),{forceMount:o=n.forceMount,...r}=e,s=xe(ke,e.__scopePopover);return y.jsx(Pt,{present:o||s.open,children:s.modal?y.jsx(nl,{...r,ref:t}):y.jsx(ol,{...r,ref:t})})});Zr.displayName=ke;var tl=Ee("PopoverContent.RemoveScroll"),nl=c.forwardRef((e,t)=>{const n=xe(ke,e.__scopePopover),o=c.useRef(null),r=$(t,o),s=c.useRef(!1);return c.useEffect(()=>{const i=o.current;if(i)return Cn(i)},[]),y.jsx(_t,{as:tl,allowPinchZoom:!0,children:y.jsx(Qr,{...e,ref:r,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:I(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),s.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:I(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0,u=a.button===2||l;s.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:I(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),ol=c.forwardRef((e,t)=>{const n=xe(ke,e.__scopePopover),o=c.useRef(!1),r=c.useRef(!1);return y.jsx(Qr,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(o.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),o.current=!1,r.current=!1},onInteractOutside:s=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,s),s.defaultPrevented||(o.current=!0,s.detail.originalEvent.type==="pointerdown"&&(r.current=!0));const i=s.target;((u=n.triggerRef.current)==null?void 0:u.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&r.current&&s.preventDefault()}})}),Qr=c.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:o,onOpenAutoFocus:r,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:f,...p}=e,h=xe(ke,n),m=et(n);return hr(),y.jsx(Ot,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:r,onUnmountAutoFocus:s,children:y.jsx(Qe,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:f,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>h.onOpenChange(!1),children:y.jsx(yn,{"data-state":es(h.open),role:"dialog",id:h.contentId,...m,...p,ref:t,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Jr="PopoverClose",rl=c.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=xe(Jr,n);return y.jsx(M.button,{type:"button",...o,ref:t,onClick:I(e.onClick,()=>r.onOpenChange(!1))})});rl.displayName=Jr;var sl="PopoverArrow",il=c.forwardRef((e,t)=>{const{__scopePopover:n,...o}=e,r=et(n);return y.jsx(wn,{...r,...o,ref:t})});il.displayName=sl;function es(e){return e?"open":"closed"}var Ul=Kr,zl=Xr,Kl=qr,Gl=Zr;export{zl as $,Et as A,wl as B,yn as C,Qe as D,Cl as E,Ot as F,xl as G,Tl as H,Ol as I,Dl as J,Bl as K,_l as L,Il as M,Ml as N,bl as O,M as P,kl as Q,_t as R,Wl as S,Sl as T,jl as U,Nl as V,$l as W,Fl as X,Hl as Y,Ll as Z,Ul as _,je as a,Gl as a0,Kl as a1,gl as a2,yl as a3,ds as a4,cl as a5,vl as a6,pl as a7,ml as a8,hl as a9,ul as aa,Io as ab,ll as ac,Oc as b,ha as c,qe as d,le as e,I as f,me as g,We as h,Pt as i,y as j,Cn as k,hr as l,wn as m,oo as n,so as o,St as p,Ee as q,gn as r,Nc as s,ji as t,$ as u,K as v,Jn as w,El as x,Rl as y,Pl as z};