import{r as e,R as t,a as n,b as r,c as o}from"./react-vendor-PhFWtB6D.js";var i={exports:{}},a={},s=e,c=Symbol.for("react.element"),l=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,d=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,f={key:!0,ref:!0,__self:!0,__source:!0};function p(e,t,n){var r,o={},i=null,a=null;for(r in void 0!==n&&(i=""+n),void 0!==t.key&&(i=""+t.key),void 0!==t.ref&&(a=t.ref),t)u.call(t,r)&&!f.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:c,type:e,key:i,ref:a,props:o,_owner:d.current}}a.Fragment=l,a.jsx=p,a.jsxs=p,i.exports=a;var h=i.exports;function m(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function v(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function g(...e){return t=>{let n=!1;const r=e.map(e=>{const r=v(e,t);return n||"function"!=typeof r||(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():v(e[t],null)}}}}function y(...t){return e.useCallback(g(...t),t)}function w(t,n=[]){let r=[];const o=()=>{const n=r.map(t=>e.createContext(t));return function(r){const o=r?.[t]||n;return e.useMemo(()=>({[`__scope${t}`]:{...r,[t]:o}}),[r,o])}};return o.scopeName=t,[function(n,o){const i=e.createContext(o),a=r.length;r=[...r,o];const s=n=>{const{scope:r,children:o,...s}=n,c=r?.[t]?.[a]||i,l=e.useMemo(()=>s,Object.values(s));return h.jsx(c.Provider,{value:l,children:o})};return s.displayName=n+"Provider",[s,function(r,s){const c=s?.[t]?.[a]||i,l=e.useContext(c);if(l)return l;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${n}\``)}]},b(o,...n)]}function b(...t){const n=t[0];if(1===t.length)return n;const r=()=>{const r=t.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(t){const o=r.reduce((e,{useScope:n,scopeName:r})=>({...e,...n(t)[`__scope${r}`]}),{});return e.useMemo(()=>({[`__scope${n.scopeName}`]:o}),[o])}};return r.scopeName=n.scopeName,r}function x(t){const n=E(t),r=e.forwardRef((t,r)=>{const{children:o,...i}=t,a=e.Children.toArray(o),s=a.find(C);if(s){const t=s.props.children,o=a.map(n=>n===s?e.Children.count(t)>1?e.Children.only(null):e.isValidElement(t)?t.props.children:null:n);return h.jsx(n,{...i,ref:r,children:e.isValidElement(t)?e.cloneElement(t,void 0,o):null})}return h.jsx(n,{...i,ref:r,children:o})});return r.displayName=`${t}.Slot`,r}var _=x("Slot");function E(t){const n=e.forwardRef((t,n)=>{const{children:r,...o}=t;if(e.isValidElement(r)){const t=function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(r),i=function(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}(o,r.props);return r.type!==e.Fragment&&(i.ref=n?g(n,t):t),e.cloneElement(r,i)}return e.Children.count(r)>1?e.Children.only(null):null});return n.displayName=`${t}.SlotClone`,n}var S=Symbol("radix.slottable");function R(e){const t=({children:e})=>h.jsx(h.Fragment,{children:e});return t.displayName=`${e}.Slottable`,t.__radixId=S,t}function C(t){return e.isValidElement(t)&&"function"==typeof t.type&&"__radixId"in t.type&&t.type.__radixId===S}function P(e){const n=e+"CollectionProvider",[r,o]=w(n),[i,a]=r(n,{collectionRef:{current:null},itemMap:new Map}),s=e=>{const{scope:n,children:r}=e,o=t.useRef(null),a=t.useRef(new Map).current;return h.jsx(i,{scope:n,itemMap:a,collectionRef:o,children:r})};s.displayName=n;const c=e+"CollectionSlot",l=x(c),u=t.forwardRef((e,t)=>{const{scope:n,children:r}=e,o=y(t,a(c,n).collectionRef);return h.jsx(l,{ref:o,children:r})});u.displayName=c;const d=e+"CollectionItemSlot",f="data-radix-collection-item",p=x(d),m=t.forwardRef((e,n)=>{const{scope:r,children:o,...i}=e,s=t.useRef(null),c=y(n,s),l=a(d,r);return t.useEffect(()=>(l.itemMap.set(s,{ref:s,...i}),()=>{l.itemMap.delete(s)})),h.jsx(p,{[f]:"",ref:c,children:o})});return m.displayName=d,[{Provider:s,Slot:u,ItemSlot:m},function(n){const r=a(e+"CollectionConsumer",n);return t.useCallback(()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${f}]`));return Array.from(r.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[r.collectionRef,r.itemMap])},o]}var D=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((t,n)=>{const r=x(`Primitive.${n}`),o=e.forwardRef((e,t)=>{const{asChild:o,...i}=e,a=o?r:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),h.jsx(a,{...i,ref:t})});return o.displayName=`Primitive.${n}`,{...t,[n]:o}},{});function j(e,t){e&&n.flushSync(()=>e.dispatchEvent(t))}function O(t){const n=e.useRef(t);return e.useEffect(()=>{n.current=t}),e.useMemo(()=>(...e)=>n.current?.(...e),[])}var M,T="dismissableLayer.update",I="dismissableLayer.pointerDownOutside",k="dismissableLayer.focusOutside",A=e.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),N=e.forwardRef((t,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:c,...l}=t,u=e.useContext(A),[d,f]=e.useState(null),p=d?.ownerDocument??globalThis?.document,[,v]=e.useState({}),g=y(n,e=>f(e)),w=Array.from(u.layers),[b]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),x=w.indexOf(b),_=d?w.indexOf(d):-1,E=u.layersWithOutsidePointerEventsDisabled.size>0,S=_>=x,R=function(t,n=globalThis?.document){const r=O(t),o=e.useRef(!1),i=e.useRef(()=>{});return e.useEffect(()=>{const e=e=>{if(e.target&&!o.current){let t=function(){W(I,r,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(n.removeEventListener("click",i.current),i.current=t,n.addEventListener("click",i.current,{once:!0})):t()}else n.removeEventListener("click",i.current);o.current=!1},t=window.setTimeout(()=>{n.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(t),n.removeEventListener("pointerdown",e),n.removeEventListener("click",i.current)}},[n,r]),{onPointerDownCapture:()=>o.current=!0}}(e=>{const t=e.target,n=[...u.branches].some(e=>e.contains(t));S&&!n&&(i?.(e),s?.(e),e.defaultPrevented||c?.())},p),C=function(t,n=globalThis?.document){const r=O(t),o=e.useRef(!1);return e.useEffect(()=>{const e=e=>{if(e.target&&!o.current){W(k,r,{originalEvent:e},{discrete:!1})}};return n.addEventListener("focusin",e),()=>n.removeEventListener("focusin",e)},[n,r]),{onFocusCapture:()=>o.current=!0,onBlurCapture:()=>o.current=!1}}(e=>{const t=e.target;[...u.branches].some(e=>e.contains(t))||(a?.(e),s?.(e),e.defaultPrevented||c?.())},p);return function(t,n=globalThis?.document){const r=O(t);e.useEffect(()=>{const e=e=>{"Escape"===e.key&&r(e)};return n.addEventListener("keydown",e,{capture:!0}),()=>n.removeEventListener("keydown",e,{capture:!0})},[r,n])}(e=>{_===u.layers.size-1&&(o?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))},p),e.useEffect(()=>{if(d)return r&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(M=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),F(),()=>{r&&1===u.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=M)}},[d,p,r,u]),e.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),F())},[d,u]),e.useEffect(()=>{const e=()=>v({});return document.addEventListener(T,e),()=>document.removeEventListener(T,e)},[]),h.jsx(D.div,{...l,ref:g,style:{pointerEvents:E?S?"auto":"none":void 0,...t.style},onFocusCapture:m(t.onFocusCapture,C.onFocusCapture),onBlurCapture:m(t.onBlurCapture,C.onBlurCapture),onPointerDownCapture:m(t.onPointerDownCapture,R.onPointerDownCapture)})});N.displayName="DismissableLayer";var L=e.forwardRef((t,n)=>{const r=e.useContext(A),o=e.useRef(null),i=y(n,o);return e.useEffect(()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),h.jsx(D.div,{...t,ref:i})});function F(){const e=new CustomEvent(T);document.dispatchEvent(e)}function W(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?j(o,i):o.dispatchEvent(i)}L.displayName="DismissableLayerBranch";var B=N,K=L,H=globalThis?.document?e.useLayoutEffect:()=>{},V=e.forwardRef((t,n)=>{const{container:o,...i}=t,[a,s]=e.useState(!1);H(()=>s(!0),[]);const c=o||a&&globalThis?.document?.body;return c?r.createPortal(h.jsx(D.div,{...i,ref:n}),c):null});V.displayName="Portal";var $=t=>{const{present:n,children:r}=t,o=function(t){const[n,r]=e.useState(),o=e.useRef(null),i=e.useRef(t),a=e.useRef("none"),s=t?"mounted":"unmounted",[c,l]=function(t,n){return e.useReducer((e,t)=>n[e][t]??e,t)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return e.useEffect(()=>{const e=U(o.current);a.current="mounted"===c?e:"none"},[c]),H(()=>{const e=o.current,n=i.current;if(n!==t){const r=a.current,o=U(e);if(t)l("MOUNT");else if("none"===o||"none"===e?.display)l("UNMOUNT");else{l(n&&r!==o?"ANIMATION_OUT":"UNMOUNT")}i.current=t}},[t,l]),H(()=>{if(n){let e;const t=n.ownerDocument.defaultView??window,r=r=>{const a=U(o.current).includes(r.animationName);if(r.target===n&&a&&(l("ANIMATION_END"),!i.current)){const r=n.style.animationFillMode;n.style.animationFillMode="forwards",e=t.setTimeout(()=>{"forwards"===n.style.animationFillMode&&(n.style.animationFillMode=r)})}},s=e=>{e.target===n&&(a.current=U(o.current))};return n.addEventListener("animationstart",s),n.addEventListener("animationcancel",r),n.addEventListener("animationend",r),()=>{t.clearTimeout(e),n.removeEventListener("animationstart",s),n.removeEventListener("animationcancel",r),n.removeEventListener("animationend",r)}}l("ANIMATION_END")},[n,l]),{isPresent:["mounted","unmountSuspended"].includes(c),ref:e.useCallback(e=>{o.current=e?getComputedStyle(e):null,r(e)},[])}}(n),i="function"==typeof r?r({present:o.isPresent}):e.Children.only(r),a=y(o.ref,function(e){let t=Object.getOwnPropertyDescriptor(e.props,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning;if(n)return e.ref;if(t=Object.getOwnPropertyDescriptor(e,"ref")?.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n)return e.props.ref;return e.props.ref||e.ref}(i));return"function"==typeof r||o.isPresent?e.cloneElement(i,{ref:a}):null};function U(e){return e?.animationName||"none"}$.displayName="Presence";var z=o[" useInsertionEffect ".trim().toString()]||H;function G({prop:t,defaultProp:n,onChange:r=()=>{},caller:o}){const[i,a,s]=function({defaultProp:t,onChange:n}){const[r,o]=e.useState(t),i=e.useRef(r),a=e.useRef(n);return z(()=>{a.current=n},[n]),e.useEffect(()=>{i.current!==r&&(a.current?.(r),i.current=r)},[r,i]),[r,o,a]}({defaultProp:n,onChange:r}),c=void 0!==t,l=c?t:i;{const n=e.useRef(void 0!==t);e.useEffect(()=>{const e=n.current;if(e!==c){}n.current=c},[c,o])}const u=e.useCallback(e=>{if(c){const n=function(e){return"function"==typeof e}(e)?e(t):e;n!==t&&s.current?.(n)}else a(e)},[c,t,a,s]);return[l,u]}var X=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"}),Y=e.forwardRef((e,t)=>h.jsx(D.span,{...e,ref:t,style:{...X,...e.style}}));Y.displayName="VisuallyHidden";var q=Y,Z=o[" useId ".trim().toString()]||(()=>{}),J=0;function Q(t){const[n,r]=e.useState(Z());return H(()=>{r(e=>e??String(J++))},[t]),n?`radix-${n}`:""}const ee=["top","right","bottom","left"],te=Math.min,ne=Math.max,re=Math.round,oe=Math.floor,ie=e=>({x:e,y:e}),ae={left:"right",right:"left",bottom:"top",top:"bottom"},se={start:"end",end:"start"};function ce(e,t,n){return ne(e,te(t,n))}function le(e,t){return"function"==typeof e?e(t):e}function ue(e){return e.split("-")[0]}function de(e){return e.split("-")[1]}function fe(e){return"x"===e?"y":"x"}function pe(e){return"y"===e?"height":"width"}const he=new Set(["top","bottom"]);function me(e){return he.has(ue(e))?"y":"x"}function ve(e){return fe(me(e))}function ge(e){return e.replace(/start|end/g,e=>se[e])}const ye=["left","right"],we=["right","left"],be=["top","bottom"],xe=["bottom","top"];function _e(e,t,n,r){const o=de(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?we:ye:t?ye:we;case"left":case"right":return t?be:xe;default:return[]}}(ue(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(ge)))),i}function Ee(e){return e.replace(/left|right|bottom|top/g,e=>ae[e])}function Se(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Re(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function Ce(e,t,n){let{reference:r,floating:o}=e;const i=me(t),a=ve(t),s=pe(a),c=ue(t),l="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let p;switch(c){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(de(t)){case"start":p[a]-=f*(n&&l?-1:1);break;case"end":p[a]+=f*(n&&l?-1:1)}return p}async function Pe(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=le(t,e),h=Se(p),m=s[f?"floating"===d?"reference":"floating":d],v=Re(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(m)))||n?m:m.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),g="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),w=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},b=Re(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:g,offsetParent:y,strategy:c}):g);return{top:(v.top-b.top+h.top)/w.y,bottom:(b.bottom-v.bottom+h.bottom)/w.y,left:(v.left-b.left+h.left)/w.x,right:(b.right-v.right+h.right)/w.x}}function De(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function je(e){return ee.some(t=>e[t]>=0)}const Oe=new Set(["left","top"]);function Me(){return"undefined"!=typeof window}function Te(e){return Ae(e)?(e.nodeName||"").toLowerCase():"#document"}function Ie(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function ke(e){var t;return null==(t=(Ae(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Ae(e){return!!Me()&&(e instanceof Node||e instanceof Ie(e).Node)}function Ne(e){return!!Me()&&(e instanceof Element||e instanceof Ie(e).Element)}function Le(e){return!!Me()&&(e instanceof HTMLElement||e instanceof Ie(e).HTMLElement)}function Fe(e){return!(!Me()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Ie(e).ShadowRoot)}const We=new Set(["inline","contents"]);function Be(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Je(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!We.has(o)}const Ke=new Set(["table","td","th"]);function He(e){return Ke.has(Te(e))}const Ve=[":popover-open",":modal"];function $e(e){return Ve.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const Ue=["transform","translate","scale","rotate","perspective"],ze=["transform","translate","scale","rotate","perspective","filter"],Ge=["paint","layout","strict","content"];function Xe(e){const t=Ye(),n=Ne(e)?Je(e):e;return Ue.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||ze.some(e=>(n.willChange||"").includes(e))||Ge.some(e=>(n.contain||"").includes(e))}function Ye(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const qe=new Set(["html","body","#document"]);function Ze(e){return qe.has(Te(e))}function Je(e){return Ie(e).getComputedStyle(e)}function Qe(e){return Ne(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function et(e){if("html"===Te(e))return e;const t=e.assignedSlot||e.parentNode||Fe(e)&&e.host||ke(e);return Fe(t)?t.host:t}function tt(e){const t=et(e);return Ze(t)?e.ownerDocument?e.ownerDocument.body:e.body:Le(t)&&Be(t)?t:tt(t)}function nt(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=tt(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=Ie(o);if(i){const e=rt(a);return t.concat(a,a.visualViewport||[],Be(o)?o:[],e&&n?nt(e):[])}return t.concat(o,nt(o,[],n))}function rt(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ot(e){const t=Je(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Le(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=re(n)!==i||re(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function it(e){return Ne(e)?e:e.contextElement}function at(e){const t=it(e);if(!Le(t))return ie(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=ot(t);let a=(i?re(n.width):n.width)/r,s=(i?re(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const st=ie(0);function ct(e){const t=Ie(e);return Ye()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:st}function lt(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=it(e);let a=ie(1);t&&(r?Ne(r)&&(a=at(r)):a=at(e));const s=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Ie(e))&&t}(i,n,r)?ct(i):ie(0);let c=(o.left+s.x)/a.x,l=(o.top+s.y)/a.y,u=o.width/a.x,d=o.height/a.y;if(i){const e=Ie(i),t=r&&Ne(r)?Ie(r):r;let n=e,o=rt(n);for(;o&&r&&t!==n;){const e=at(o),t=o.getBoundingClientRect(),r=Je(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=i,l+=a,n=Ie(o),o=rt(n)}}return Re({width:u,height:d,x:c,y:l})}function ut(e,t){const n=Qe(e).scrollLeft;return t?t.left+n:lt(ke(e)).left+n}function dt(e,t,n){void 0===n&&(n=!1);const r=e.getBoundingClientRect();return{x:r.left+t.scrollLeft-(n?0:ut(e,r)),y:r.top+t.scrollTop}}const ft=new Set(["absolute","fixed"]);function pt(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Ie(e),r=ke(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,c=0;if(o){i=o.width,a=o.height;const e=Ye();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,c=o.offsetTop)}return{width:i,height:a,x:s,y:c}}(e,n);else if("document"===t)r=function(e){const t=ke(e),n=Qe(e),r=e.ownerDocument.body,o=ne(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=ne(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+ut(e);const s=-n.scrollTop;return"rtl"===Je(r).direction&&(a+=ne(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}(ke(e));else if(Ne(t))r=function(e,t){const n=lt(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Le(e)?at(e):ie(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=ct(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Re(r)}function ht(e,t){const n=et(e);return!(n===t||!Ne(n)||Ze(n))&&("fixed"===Je(n).position||ht(n,t))}function mt(e,t,n){const r=Le(t),o=ke(t),i="fixed"===n,a=lt(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const c=ie(0);function l(){c.x=ut(o)}if(r||!r&&!i)if(("body"!==Te(t)||Be(o))&&(s=Qe(t)),r){const e=lt(t,!0,i,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else o&&l();i&&!r&&o&&l();const u=!o||r||i?ie(0):dt(o,s);return{x:a.left+s.scrollLeft-c.x-u.x,y:a.top+s.scrollTop-c.y-u.y,width:a.width,height:a.height}}function vt(e){return"static"===Je(e).position}function gt(e,t){if(!Le(e)||"fixed"===Je(e).position)return null;if(t)return t(e);let n=e.offsetParent;return ke(e)===n&&(n=n.ownerDocument.body),n}function yt(e,t){const n=Ie(e);if($e(e))return n;if(!Le(e)){let t=et(e);for(;t&&!Ze(t);){if(Ne(t)&&!vt(t))return t;t=et(t)}return n}let r=gt(e,t);for(;r&&He(r)&&vt(r);)r=gt(r,t);return r&&Ze(r)&&vt(r)&&!Xe(r)?n:r||function(e){let t=et(e);for(;Le(t)&&!Ze(t);){if(Xe(t))return t;if($e(t))return null;t=et(t)}return null}(e)||n}const wt={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=ke(r),s=!!t&&$e(t.floating);if(r===a||s&&i)return n;let c={scrollLeft:0,scrollTop:0},l=ie(1);const u=ie(0),d=Le(r);if((d||!d&&!i)&&(("body"!==Te(r)||Be(a))&&(c=Qe(r)),Le(r))){const e=lt(r);l=at(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const f=!a||d||i?ie(0):dt(a,c,!0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}},getDocumentElement:ke,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?$e(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=nt(e,[],!1).filter(e=>Ne(e)&&"body"!==Te(e)),o=null;const i="fixed"===Je(e).position;let a=i?et(e):e;for(;Ne(a)&&!Ze(a);){const t=Je(a),n=Xe(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&ft.has(o.position)||Be(a)&&!n&&ht(e,a))?r=r.filter(e=>e!==a):o=t,a=et(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=i[0],s=i.reduce((e,n)=>{const r=pt(t,n,o);return e.top=ne(r.top,e.top),e.right=te(r.right,e.right),e.bottom=te(r.bottom,e.bottom),e.left=ne(r.left,e.left),e},pt(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:yt,getElementRects:async function(e){const t=this.getOffsetParent||yt,n=this.getDimensions,r=await n(e.floating);return{reference:mt(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=ot(e);return{width:t,height:n}},getScale:at,isElement:Ne,isRTL:function(e){return"rtl"===Je(e).direction}};function bt(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function xt(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:c=!1}=r,l=it(e),u=o||i?[...l?nt(l):[],...nt(t)]:[];u.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const d=l&&s?function(e,t){let n,r=null;const o=ke(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,c){void 0===s&&(s=!1),void 0===c&&(c=1),i();const l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;const h={rootMargin:-oe(d)+"px "+-oe(o.clientWidth-(u+f))+"px "+-oe(o.clientHeight-(d+p))+"px "+-oe(u)+"px",threshold:ne(0,te(1,c))||1};let m=!0;function v(t){const r=t[0].intersectionRatio;if(r!==c){if(!m)return a();r?a(!1,r):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==r||bt(l,e.getBoundingClientRect())||a(),m=!1}try{r=new IntersectionObserver(v,{...h,root:o.ownerDocument})}catch(g){r=new IntersectionObserver(v,h)}r.observe(e)}(!0),i}(l,n):null;let f,p=-1,h=null;a&&(h=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=h)||e.observe(t)})),n()}),l&&!c&&h.observe(l),h.observe(t));let m=c?lt(e):null;return c&&function t(){const r=lt(e);m&&!bt(m,r)&&n();m=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=h)||e.disconnect(),h=null,c&&cancelAnimationFrame(f)}}const _t=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,c=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=ue(n),s=de(n),c="y"===me(n),l=Oe.has(a)?-1:1,u=i&&c?-1:1,d=le(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof h&&(p="end"===s?-1*h:h),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+c.x,y:i+c.y,data:{...c,placement:a}}}}},Et=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=le(e,t),l={x:n,y:r},u=await Pe(t,c),d=me(ue(o)),f=fe(d);let p=l[f],h=l[d];if(i){const e="y"===f?"bottom":"right";p=ce(p+u["y"===f?"top":"left"],p,p-u[e])}if(a){const e="y"===d?"bottom":"right";h=ce(h+u["y"===d?"top":"left"],h,h-u[e])}const m=s.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[f]:i,[d]:a}}}}}},St=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...v}=le(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const g=ue(o),y=me(s),w=ue(s)===s,b=await(null==c.isRTL?void 0:c.isRTL(l.floating)),x=f||(w||!m?[Ee(s)]:function(e){const t=Ee(e);return[ge(e),t,ge(t)]}(s)),_="none"!==h;!f&&_&&x.push(..._e(s,m,h,b));const E=[s,...x],S=await Pe(t,v),R=[];let C=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&R.push(S[g]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=de(e),o=ve(e),i=pe(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=Ee(a)),[a,Ee(a)]}(o,a,b);R.push(S[e[0]],S[e[1]])}if(C=[...C,{placement:o,overflows:R}],!R.every(e=>e<=0)){var P,D;const e=((null==(P=i.flip)?void 0:P.index)||0)+1,t=E[e];if(t){if(!("alignment"===d&&y!==me(t))||C.every(e=>e.overflows[0]>0&&me(e.placement)===y))return{data:{index:e,overflows:C},reset:{placement:t}}}let n=null==(D=C.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:D.placement;if(!n)switch(p){case"bestFit":{var j;const e=null==(j=C.filter(e=>{if(_){const t=me(e.placement);return t===y||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:j[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}},Rt=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:c=()=>{},...l}=le(e,t),u=await Pe(t,l),d=ue(o),f=de(o),p="y"===me(o),{width:h,height:m}=i.floating;let v,g;"top"===d||"bottom"===d?(v=d,g=f===(await(null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(g=d,v="end"===f?"top":"bottom");const y=m-u.top-u.bottom,w=h-u.left-u.right,b=te(m-u[v],y),x=te(h-u[g],w),_=!t.middlewareData.shift;let E=b,S=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(S=w),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(E=y),_&&!f){const e=ne(u.left,0),t=ne(u.right,0),n=ne(u.top,0),r=ne(u.bottom,0);p?S=h-2*(0!==e||0!==t?e+t:ne(u.left,u.right)):E=m-2*(0!==n||0!==r?n+r:ne(u.top,u.bottom))}await c({...t,availableWidth:S,availableHeight:E});const R=await a.getDimensions(s.floating);return h!==R.width||m!==R.height?{reset:{rects:!0}}:{}}}},Ct=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=le(e,t);switch(r){case"referenceHidden":{const e=De(await Pe(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:je(e)}}}case"escaped":{const e=De(await Pe(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:je(e)}}}default:return{}}}}},Pt=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=le(e,t)||{};if(null==l)return{};const d=Se(u),f={x:n,y:r},p=ve(o),h=pe(p),m=await a.getDimensions(l),v="y"===p,g=v?"top":"left",y=v?"bottom":"right",w=v?"clientHeight":"clientWidth",b=i.reference[h]+i.reference[p]-f[p]-i.floating[h],x=f[p]-i.reference[p],_=await(null==a.getOffsetParent?void 0:a.getOffsetParent(l));let E=_?_[w]:0;E&&await(null==a.isElement?void 0:a.isElement(_))||(E=s.floating[w]||i.floating[h]);const S=b/2-x/2,R=E/2-m[h]/2-1,C=te(d[g],R),P=te(d[y],R),D=C,j=E-m[h]-P,O=E/2-m[h]/2+S,M=ce(D,O,j),T=!c.arrow&&null!=de(o)&&O!==M&&i.reference[h]/2-(O<D?C:P)-m[h]/2<0,I=T?O<D?O-D:O-j:0;return{[p]:f[p]+I,data:{[p]:M,centerOffset:O-M-I,...T&&{alignmentOffset:I}},reset:T}}}),Dt=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=le(e,t),u={x:n,y:r},d=me(o),f=fe(d);let p=u[f],h=u[d];const m=le(s,t),v="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+v.mainAxis,n=i.reference[f]+i.reference[e]-v.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){var g,y;const e="y"===f?"width":"height",t=Oe.has(ue(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(g=a.offset)?void 0:g[d])||0)+(t?0:v.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(y=a.offset)?void 0:y[d])||0)-(t?v.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[f]:p,[d]:h}}}},jt=(e,t,n)=>{const r=new Map,o={platform:wt,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),c=await(null==a.isRTL?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Ce(l,r,c),f=r,p={},h=0;for(let m=0;m<s.length;m++){const{name:n,fn:i}=s[m],{x:v,y:g,data:y,reset:w}=await i({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:l,platform:a,elements:{reference:e,floating:t}});u=null!=v?v:u,d=null!=g?g:d,p={...p,[n]:{...p[n],...y}},w&&h<=50&&(h++,"object"==typeof w&&(w.placement&&(f=w.placement),w.rects&&(l=!0===w.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),({x:u,y:d}=Ce(l,f,c))),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var Ot="undefined"!=typeof document?e.useLayoutEffect:function(){};function Mt(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!Mt(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!Mt(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Tt(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function It(e,t){const n=Tt(e);return Math.round(t*n)/n}function kt(t){const n=e.useRef(t);return Ot(()=>{n.current=t}),n}const At=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?Pt({element:n.current,padding:r}).fn(t):{}:n?Pt({element:n,padding:r}).fn(t):{};var o}}),Nt=(e,t)=>({..._t(e),options:[e,t]}),Lt=(e,t)=>({...Et(e),options:[e,t]}),Ft=(e,t)=>({...Dt(e),options:[e,t]}),Wt=(e,t)=>({...St(e),options:[e,t]}),Bt=(e,t)=>({...Rt(e),options:[e,t]}),Kt=(e,t)=>({...Ct(e),options:[e,t]}),Ht=(e,t)=>({...At(e),options:[e,t]});var Vt=e.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...i}=e;return h.jsx(D.svg,{...i,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:h.jsx("polygon",{points:"0,0 30,0 15,10"})})});Vt.displayName="Arrow";var $t=Vt;function Ut(t){const[n,r]=e.useState(void 0);return H(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const e=new ResizeObserver(e=>{if(!Array.isArray(e))return;if(!e.length)return;const n=e[0];let o,i;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=t.offsetWidth,i=t.offsetHeight;r({width:o,height:i})});return e.observe(t,{box:"border-box"}),()=>e.unobserve(t)}r(void 0)},[t]),n}var zt="Popper",[Gt,Xt]=w(zt),[Yt,qt]=Gt(zt),Zt=t=>{const{__scopePopper:n,children:r}=t,[o,i]=e.useState(null);return h.jsx(Yt,{scope:n,anchor:o,onAnchorChange:i,children:r})};Zt.displayName=zt;var Jt="PopperAnchor",Qt=e.forwardRef((t,n)=>{const{__scopePopper:r,virtualRef:o,...i}=t,a=qt(Jt,r),s=e.useRef(null),c=y(n,s);return e.useEffect(()=>{a.onAnchorChange(o?.current||s.current)}),o?null:h.jsx(D.div,{...i,ref:c})});Qt.displayName=Jt;var en="PopperContent",[tn,nn]=Gt(en),rn=e.forwardRef((t,r)=>{const{__scopePopper:o,side:i="bottom",sideOffset:a=0,align:s="center",alignOffset:c=0,arrowPadding:l=0,avoidCollisions:u=!0,collisionBoundary:d=[],collisionPadding:f=0,sticky:p="partial",hideWhenDetached:m=!1,updatePositionStrategy:v="optimized",onPlaced:g,...w}=t,b=qt(en,o),[x,_]=e.useState(null),E=y(r,e=>_(e)),[S,R]=e.useState(null),C=Ut(S),P=C?.width??0,j=C?.height??0,M=i+("center"!==s?"-"+s:""),T="number"==typeof f?f:{top:0,right:0,bottom:0,left:0,...f},I=Array.isArray(d)?d:[d],k=I.length>0,A={padding:T,boundary:I.filter(cn),altBoundary:k},{refs:N,floatingStyles:L,placement:F,isPositioned:W,middlewareData:B}=function(t){void 0===t&&(t={});const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a,elements:{reference:s,floating:c}={},transform:l=!0,whileElementsMounted:u,open:d}=t,[f,p]=e.useState({x:0,y:0,strategy:o,placement:r,middlewareData:{},isPositioned:!1}),[h,m]=e.useState(i);Mt(h,i)||m(i);const[v,g]=e.useState(null),[y,w]=e.useState(null),b=e.useCallback(e=>{e!==S.current&&(S.current=e,g(e))},[]),x=e.useCallback(e=>{e!==R.current&&(R.current=e,w(e))},[]),_=s||v,E=c||y,S=e.useRef(null),R=e.useRef(null),C=e.useRef(f),P=null!=u,D=kt(u),j=kt(a),O=kt(d),M=e.useCallback(()=>{if(!S.current||!R.current)return;const e={placement:r,strategy:o,middleware:h};j.current&&(e.platform=j.current),jt(S.current,R.current,e).then(e=>{const t={...e,isPositioned:!1!==O.current};T.current&&!Mt(C.current,t)&&(C.current=t,n.flushSync(()=>{p(t)}))})},[h,r,o,j,O]);Ot(()=>{!1===d&&C.current.isPositioned&&(C.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[d]);const T=e.useRef(!1);Ot(()=>(T.current=!0,()=>{T.current=!1}),[]),Ot(()=>{if(_&&(S.current=_),E&&(R.current=E),_&&E){if(D.current)return D.current(_,E,M);M()}},[_,E,M,D,P]);const I=e.useMemo(()=>({reference:S,floating:R,setReference:b,setFloating:x}),[b,x]),k=e.useMemo(()=>({reference:_,floating:E}),[_,E]),A=e.useMemo(()=>{const e={position:o,left:0,top:0};if(!k.floating)return e;const t=It(k.floating,f.x),n=It(k.floating,f.y);return l?{...e,transform:"translate("+t+"px, "+n+"px)",...Tt(k.floating)>=1.5&&{willChange:"transform"}}:{position:o,left:t,top:n}},[o,l,k.floating,f.x,f.y]);return e.useMemo(()=>({...f,update:M,refs:I,elements:k,floatingStyles:A}),[f,M,I,k,A])}({strategy:"fixed",placement:M,whileElementsMounted:(...e)=>xt(...e,{animationFrame:"always"===v}),elements:{reference:b.anchor},middleware:[Nt({mainAxis:a+j,alignmentAxis:c}),u&&Lt({mainAxis:!0,crossAxis:!1,limiter:"partial"===p?Ft():void 0,...A}),u&&Wt({...A}),Bt({...A,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${n}px`),a.setProperty("--radix-popper-available-height",`${r}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),S&&Ht({element:S,padding:l}),ln({arrowWidth:P,arrowHeight:j}),m&&Kt({strategy:"referenceHidden",...A})]}),[K,V]=un(F),$=O(g);H(()=>{W&&$?.()},[W,$]);const U=B.arrow?.x,z=B.arrow?.y,G=0!==B.arrow?.centerOffset,[X,Y]=e.useState();return H(()=>{x&&Y(window.getComputedStyle(x).zIndex)},[x]),h.jsx("div",{ref:N.setFloating,"data-radix-popper-content-wrapper":"",style:{...L,transform:W?L.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:X,"--radix-popper-transform-origin":[B.transformOrigin?.x,B.transformOrigin?.y].join(" "),...B.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:h.jsx(tn,{scope:o,placedSide:K,onArrowChange:R,arrowX:U,arrowY:z,shouldHideArrow:G,children:h.jsx(D.div,{"data-side":K,"data-align":V,...w,ref:E,style:{...w.style,animation:W?void 0:"none"}})})})});rn.displayName=en;var on="PopperArrow",an={top:"bottom",right:"left",bottom:"top",left:"right"},sn=e.forwardRef(function(e,t){const{__scopePopper:n,...r}=e,o=nn(on,n),i=an[o.placedSide];return h.jsx("span",{ref:o.onArrowChange,style:{position:"absolute",left:o.arrowX,top:o.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[o.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[o.placedSide],visibility:o.shouldHideArrow?"hidden":void 0},children:h.jsx($t,{...r,ref:t,style:{...r.style,display:"block"}})})});function cn(e){return null!==e}sn.displayName=on;var ln=e=>({name:"transformOrigin",options:e,fn(t){const{placement:n,rects:r,middlewareData:o}=t,i=0!==o.arrow?.centerOffset,a=i?0:e.arrowWidth,s=i?0:e.arrowHeight,[c,l]=un(n),u={start:"0%",center:"50%",end:"100%"}[l],d=(o.arrow?.x??0)+a/2,f=(o.arrow?.y??0)+s/2;let p="",h="";return"bottom"===c?(p=i?u:`${d}px`,h=-s+"px"):"top"===c?(p=i?u:`${d}px`,h=`${r.floating.height+s}px`):"right"===c?(p=-s+"px",h=i?u:`${f}px`):"left"===c&&(p=`${r.floating.width+s}px`,h=i?u:`${f}px`),{data:{x:p,y:h}}}});function un(e){const[t,n="center"]=e.split("-");return[t,n]}var dn=Zt,fn=Qt,pn=rn,hn=sn,mn="focusScope.autoFocusOnMount",vn="focusScope.autoFocusOnUnmount",gn={bubbles:!1,cancelable:!0},yn=e.forwardRef((t,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...s}=t,[c,l]=e.useState(null),u=O(i),d=O(a),f=e.useRef(null),p=y(n,e=>l(e)),m=e.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;e.useEffect(()=>{if(o){let e=function(e){if(m.paused||!c)return;const t=e.target;c.contains(t)?f.current=t:_n(f.current,{select:!0})},t=function(e){if(m.paused||!c)return;const t=e.relatedTarget;null!==t&&(c.contains(t)||_n(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&_n(c)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[o,c,m.paused]),e.useEffect(()=>{if(c){En.add(m);const t=document.activeElement;if(!c.contains(t)){const n=new CustomEvent(mn,gn);c.addEventListener(mn,u),c.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(_n(r,{select:t}),document.activeElement!==n)return}((e=wn(c),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&_n(c))}return()=>{c.removeEventListener(mn,u),setTimeout(()=>{const e=new CustomEvent(vn,gn);c.addEventListener(vn,d),c.dispatchEvent(e),e.defaultPrevented||_n(t??document.body,{select:!0}),c.removeEventListener(vn,d),En.remove(m)},0)}}var e},[c,u,d,m]);const v=e.useCallback(e=>{if(!r&&!o)return;if(m.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[o,i]=function(e){const t=wn(e),n=bn(t,e),r=bn(t.reverse(),e);return[n,r]}(t);o&&i?e.shiftKey||n!==i?e.shiftKey&&n===o&&(e.preventDefault(),r&&_n(i,{select:!0})):(e.preventDefault(),r&&_n(o,{select:!0})):n===t&&e.preventDefault()}},[r,o,m.paused]);return h.jsx(D.div,{tabIndex:-1,...s,ref:p,onKeyDown:v})});function wn(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function bn(e,t){for(const n of e)if(!xn(n,{upTo:t}))return n}function xn(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function _n(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}yn.displayName="FocusScope";var En=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=Sn(e,t),e.unshift(t)},remove(t){e=Sn(e,t),e[0]?.resume()}}}();function Sn(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var Rn=0;function Cn(){e.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Pn()),document.body.insertAdjacentElement("beforeend",e[1]??Pn()),Rn++,()=>{1===Rn&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Rn--}},[])}function Pn(){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 Dn=function(e,t){return(Dn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function jn(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}Dn(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var On=function(){return On=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},On.apply(this,arguments)};function Mn(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function Tn(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function In(e,t){return function(n,r){t(n,r,e)}}function kn(e,t,n,r,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,c=r.kind,l="getter"===c?"get":"setter"===c?"set":"value",u=!t&&e?r.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,r.name):{}),f=!1,p=n.length-1;p>=0;p--){var h={};for(var m in r)h[m]="access"===m?{}:r[m];for(var m in r.access)h.access[m]=r.access[m];h.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var v=(0,n[p])("accessor"===c?{get:d.get,set:d.set}:d[l],h);if("accessor"===c){if(void 0===v)continue;if(null===v||"object"!=typeof v)throw new TypeError("Object expected");(s=a(v.get))&&(d.get=s),(s=a(v.set))&&(d.set=s),(s=a(v.init))&&o.unshift(s)}else(s=a(v))&&("field"===c?o.unshift(s):d[l]=s)}u&&Object.defineProperty(u,r.name,d),f=!0}function An(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0}function Nn(e){return"symbol"==typeof e?e:"".concat(e)}function Ln(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function Fn(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function Wn(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(t){i(t)}}function s(e){try{c(r.throw(e))}catch(t){i(t)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}c((r=r.apply(e,t||[])).next())})}function Bn(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(c){s=[6,c],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}var Kn=Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function Hn(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||Kn(t,e,n)}function Vn(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function $n(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function Un(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat($n(arguments[t]));return e}function zn(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}function Gn(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function Xn(e){return this instanceof Xn?(this.v=e,this):new Xn(e)}function Yn(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function(e){return function(t){return Promise.resolve(t).then(e,l)}}),r[Symbol.asyncIterator]=function(){return this},r;function a(e,t){o[e]&&(r[e]=function(t){return new Promise(function(n,r){i.push([e,t,n,r])>1||s(e,t)})},t&&(r[e]=t(r[e])))}function s(e,t){try{(n=o[e](t)).value instanceof Xn?Promise.resolve(n.value.v).then(c,l):u(i[0][2],n)}catch(r){u(i[0][3],r)}var n}function c(e){s("next",e)}function l(e){s("throw",e)}function u(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function qn(e){var t,n;return t={},r("next"),r("throw",function(e){throw e}),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:Xn(e[r](t)),done:!1}:o?o(t):t}:o}}function Zn(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=Vn(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise(function(r,o){(function(e,t,n,r){Promise.resolve(r).then(function(t){e({value:t,done:n})},t)})(r,o,(t=e[n](t)).done,t.value)})}}}function Jn(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var Qn=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},er=function(e){return(er=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t})(e)};function tr(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=er(e),r=0;r<n.length;r++)"default"!==n[r]&&Kn(t,e,n[r]);return Qn(t,e),t}function nr(e){return e&&e.__esModule?e:{default:e}}function rr(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function or(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n}function ir(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function ar(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var r,o;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(o=r)}if("function"!=typeof r)throw new TypeError("Object not disposable.");o&&(r=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var sr="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function cr(e){function t(t){e.error=e.hasError?new sr(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var n,r=0;return function o(){for(;n=e.stack.pop();)try{if(!n.async&&1===r)return r=0,e.stack.push(n),Promise.resolve().then(o);if(n.dispose){var i=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(i).then(o,function(e){return t(e),o()})}else r|=1}catch(a){t(a)}if(1===r)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}function lr(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,function(e,n,r,o,i){return n?t?".jsx":".js":!r||o&&i?r+o+"."+i.toLowerCase()+"js":e}):e}const ur={__extends:jn,__assign:On,__rest:Mn,__decorate:Tn,__param:In,__esDecorate:kn,__runInitializers:An,__propKey:Nn,__setFunctionName:Ln,__metadata:Fn,__awaiter:Wn,__generator:Bn,__createBinding:Kn,__exportStar:Hn,__values:Vn,__read:$n,__spread:Un,__spreadArrays:zn,__spreadArray:Gn,__await:Xn,__asyncGenerator:Yn,__asyncDelegator:qn,__asyncValues:Zn,__makeTemplateObject:Jn,__importStar:tr,__importDefault:nr,__classPrivateFieldGet:rr,__classPrivateFieldSet:or,__classPrivateFieldIn:ir,__addDisposableResource:ar,__disposeResources:cr,__rewriteRelativeImportExtension:lr},dr=Object.freeze(Object.defineProperty({__proto__:null,__addDisposableResource:ar,get __assign(){return On},__asyncDelegator:qn,__asyncGenerator:Yn,__asyncValues:Zn,__await:Xn,__awaiter:Wn,__classPrivateFieldGet:rr,__classPrivateFieldIn:ir,__classPrivateFieldSet:or,__createBinding:Kn,__decorate:Tn,__disposeResources:cr,__esDecorate:kn,__exportStar:Hn,__extends:jn,__generator:Bn,__importDefault:nr,__importStar:tr,__makeTemplateObject:Jn,__metadata:Fn,__param:In,__propKey:Nn,__read:$n,__rest:Mn,__rewriteRelativeImportExtension:lr,__runInitializers:An,__setFunctionName:Ln,__spread:Un,__spreadArray:Gn,__spreadArrays:zn,__values:Vn,default:ur},Symbol.toStringTag,{value:"Module"}));var fr="right-scroll-bar-position",pr="width-before-scroll-bar";function hr(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var mr="undefined"!=typeof window?e.useLayoutEffect:e.useEffect,vr=new WeakMap;function gr(t,n){var r,o,i,a=(r=null,o=function(e){return t.forEach(function(t){return hr(t,e)})},(i=e.useState(function(){return{value:r,callback:o,facade:{get current(){return i.value},set current(e){var t=i.value;t!==e&&(i.value=e,i.callback(e,t))}}}})[0]).callback=o,i.facade);return mr(function(){var e=vr.get(a);if(e){var n=new Set(e),r=new Set(t),o=a.current;n.forEach(function(e){r.has(e)||hr(e,null)}),r.forEach(function(e){n.has(e)||hr(e,o)})}vr.set(a,t)},[t]),a}function yr(e){return e}var wr=function(t){var n=t.sideCar,r=Mn(t,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var o=n.read();if(!o)throw new Error("Sidecar medium not found");return e.createElement(o,On({},r))};wr.isSideCarExport=!0;var br=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=yr);var n=[],r=!1;return{read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var o=t(e,r);return n.push(o),function(){n=n.filter(function(e){return e!==o})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var o=n;n=[],o.forEach(e),t=n}var i=function(){var n=t;t=[],n.forEach(e)},a=function(){return Promise.resolve().then(i)};a(),n={push:function(e){t.push(e),a()},filter:function(e){return t=t.filter(e),n}}}}}(null);return t.options=On({async:!0,ssr:!1},e),t}(),xr=function(){},_r=e.forwardRef(function(t,n){var r=e.useRef(null),o=e.useState({onScrollCapture:xr,onWheelCapture:xr,onTouchMoveCapture:xr}),i=o[0],a=o[1],s=t.forwardProps,c=t.children,l=t.className,u=t.removeScrollBar,d=t.enabled,f=t.shards,p=t.sideCar,h=t.noRelative,m=t.noIsolation,v=t.inert,g=t.allowPinchZoom,y=t.as,w=void 0===y?"div":y,b=t.gapMode,x=Mn(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),_=p,E=gr([r,n]),S=On(On({},x),i);return e.createElement(e.Fragment,null,d&&e.createElement(_,{sideCar:br,removeScrollBar:u,shards:f,noRelative:h,noIsolation:m,inert:v,setCallbacks:a,allowPinchZoom:!!g,lockRef:r,gapMode:b}),s?e.cloneElement(e.Children.only(c),On(On({},S),{ref:E})):e.createElement(w,On({},S,{className:l,ref:E}),c))});_r.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},_r.classNames={fullWidth:pr,zeroRight:fr};function Er(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=function(){if("undefined"!=typeof __webpack_nonce__)return __webpack_nonce__}();return t&&e.setAttribute("nonce",t),e}var Sr=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=Er())&&(o=n,(r=t).styleSheet?r.styleSheet.cssText=o:r.appendChild(document.createTextNode(o)),function(e){(document.head||document.getElementsByTagName("head")[0]).appendChild(e)}(t)),e++},remove:function(){! --e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Rr=function(){var t,n=(t=Sr(),function(n,r){e.useEffect(function(){return t.add(n),function(){t.remove()}},[n&&r])});return function(e){var t=e.styles,r=e.dynamic;return n(t,r),null}},Cr={left:0,top:0,right:0,gap:0},Pr=function(e){return parseInt(e||"",10)||0},Dr=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Cr;var t=function(e){var t=window.getComputedStyle(document.body),n=t["padding"===e?"paddingLeft":"marginLeft"],r=t["padding"===e?"paddingTop":"marginTop"],o=t["padding"===e?"paddingRight":"marginRight"];return[Pr(n),Pr(r),Pr(o)]}(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},jr=Rr(),Or="data-scroll-locked",Mr=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,s=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(s,"px ").concat(r,";\n }\n body[").concat(Or,"] {\n overflow: hidden ").concat(r,";\n overscroll-behavior: contain;\n ").concat([t&&"position: relative ".concat(r,";"),"margin"===n&&"\n padding-left: ".concat(o,"px;\n padding-top: ").concat(i,"px;\n padding-right: ").concat(a,"px;\n margin-left:0;\n margin-top:0;\n margin-right: ").concat(s,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(fr," {\n right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(pr," {\n margin-right: ").concat(s,"px ").concat(r,";\n }\n \n .").concat(fr," .").concat(fr," {\n right: 0 ").concat(r,";\n }\n \n .").concat(pr," .").concat(pr," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(Or,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(s,"px;\n }\n")},Tr=function(){var e=parseInt(document.body.getAttribute(Or)||"0",10);return isFinite(e)?e:0},Ir=function(t){var n=t.noRelative,r=t.noImportant,o=t.gapMode,i=void 0===o?"margin":o;e.useEffect(function(){return document.body.setAttribute(Or,(Tr()+1).toString()),function(){var e=Tr()-1;e<=0?document.body.removeAttribute(Or):document.body.setAttribute(Or,e.toString())}},[]);var a=e.useMemo(function(){return Dr(i)},[i]);return e.createElement(jr,{styles:Mr(a,!n,i,r?"":"!important")})},kr=!1;if("undefined"!=typeof window)try{var Ar=Object.defineProperty({},"passive",{get:function(){return kr=!0,!0}});window.addEventListener("test",Ar,Ar),window.removeEventListener("test",Ar,Ar)}catch(Oc){kr=!1}var Nr=!!kr&&{passive:!1},Lr=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!function(e){return"TEXTAREA"===e.tagName}(e)&&"visible"===n[t])},Fr=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),Wr(e,r)){var o=Br(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Wr=function(e,t){return"v"===e?function(e){return Lr(e,"overflowY")}(t):function(e){return Lr(e,"overflowX")}(t)},Br=function(e,t){return"v"===e?[(n=t).scrollTop,n.scrollHeight,n.clientHeight]:function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]}(t);var n},Kr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Hr=function(e){return[e.deltaX,e.deltaY]},Vr=function(e){return e&&"current"in e?e.current:e},$r=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},Ur=0,zr=[];function Gr(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Xr=(Yr=function(t){var n=e.useRef([]),r=e.useRef([0,0]),o=e.useRef(),i=e.useState(Ur++)[0],a=e.useState(Rr)[0],s=e.useRef(t);e.useEffect(function(){s.current=t},[t]),e.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var e=Gn([t.lockRef.current],(t.shards||[]).map(Vr),!0).filter(Boolean);return e.forEach(function(e){return e.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),e.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var c=e.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!s.current.allowPinchZoom;var n,i=Kr(e),a=r.current,c="deltaX"in e?e.deltaX:a[0]-i[0],l="deltaY"in e?e.deltaY:a[1]-i[1],u=e.target,d=Math.abs(c)>Math.abs(l)?"h":"v";if("touches"in e&&"h"===d&&"range"===u.type)return!1;var f=Fr(d,u);if(!f)return!0;if(f?n=d:(n="v"===d?"h":"v",f=Fr(d,u)),!f)return!1;if(!o.current&&"changedTouches"in e&&(c||l)&&(o.current=n),!n)return!0;var p=o.current||n;return function(e,t,n,r,o){var i=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,c=t.contains(s),l=!1,u=a>0,d=0,f=0;do{if(!s)break;var p=Br(e,s),h=p[0],m=p[1]-p[2]-i*h;(h||m)&&Wr(e,s)&&(d+=m,f+=h);var v=s.parentNode;s=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return u&&(Math.abs(d)<1||!o)?l=!0:u||!(Math.abs(f)<1)&&o||(l=!0),l}(p,t,e,"h"===p?c:l,!0)},[]),l=e.useCallback(function(e){var t=e;if(zr.length&&zr[zr.length-1]===a){var r="deltaY"in t?Hr(t):Kr(t),o=n.current.filter(function(e){return e.name===t.type&&(e.target===t.target||t.target===e.shadowParent)&&(n=e.delta,o=r,n[0]===o[0]&&n[1]===o[1]);var n,o})[0];if(o&&o.should)t.cancelable&&t.preventDefault();else if(!o){var i=(s.current.shards||[]).map(Vr).filter(Boolean).filter(function(e){return e.contains(t.target)});(i.length>0?c(t,i[0]):!s.current.noIsolation)&&t.cancelable&&t.preventDefault()}}},[]),u=e.useCallback(function(e,t,r,o){var i={name:e,delta:t,target:r,should:o,shadowParent:Gr(r)};n.current.push(i),setTimeout(function(){n.current=n.current.filter(function(e){return e!==i})},1)},[]),d=e.useCallback(function(e){r.current=Kr(e),o.current=void 0},[]),f=e.useCallback(function(e){u(e.type,Hr(e),e.target,c(e,t.lockRef.current))},[]),p=e.useCallback(function(e){u(e.type,Kr(e),e.target,c(e,t.lockRef.current))},[]);e.useEffect(function(){return zr.push(a),t.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",l,Nr),document.addEventListener("touchmove",l,Nr),document.addEventListener("touchstart",d,Nr),function(){zr=zr.filter(function(e){return e!==a}),document.removeEventListener("wheel",l,Nr),document.removeEventListener("touchmove",l,Nr),document.removeEventListener("touchstart",d,Nr)}},[]);var h=t.removeScrollBar,m=t.inert;return e.createElement(e.Fragment,null,m?e.createElement(a,{styles:$r(i)}):null,h?e.createElement(Ir,{noRelative:t.noRelative,gapMode:t.gapMode}):null)},br.useMedium(Yr),wr);var Yr,qr=e.forwardRef(function(t,n){return e.createElement(_r,On({},t,{ref:n,sideCar:Xr}))});qr.classNames=_r.classNames;var Zr=new WeakMap,Jr=new WeakMap,Qr={},eo=0,to=function(e){return e&&(e.host||to(e.parentNode))},no=function(e,t,n,r){var o=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=to(t);return n&&e.contains(n)?n:null}).filter(function(e){return Boolean(e)})}(t,Array.isArray(e)?e:[e]);Qr[n]||(Qr[n]=new WeakMap);var i=Qr[n],a=[],s=new Set,c=new Set(o),l=function(e){e&&!s.has(e)&&(s.add(e),l(e.parentNode))};o.forEach(l);var u=function(e){e&&!c.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,c=(Zr.get(e)||0)+1,l=(i.get(e)||0)+1;Zr.set(e,c),i.set(e,l),a.push(e),1===c&&o&&Jr.set(e,!0),1===l&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(d){}})};return u(t),s.clear(),eo++,function(){a.forEach(function(e){var t=Zr.get(e)-1,o=i.get(e)-1;Zr.set(e,t),i.set(e,o),t||(Jr.has(e)||e.removeAttribute(r),Jr.delete(e)),o||e.removeAttribute(n)}),--eo||(Zr=new WeakMap,Zr=new WeakMap,Jr=new WeakMap,Qr={})}},ro=function(e,t,n){void 0===n&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body}(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),no(r,o,n,"aria-hidden")):function(){return null}},oo="Dialog",[io,ao]=w(oo),[so,co]=io(oo),lo=t=>{const{__scopeDialog:n,children:r,open:o,defaultOpen:i,onOpenChange:a,modal:s=!0}=t,c=e.useRef(null),l=e.useRef(null),[u,d]=G({prop:o,defaultProp:i??!1,onChange:a,caller:oo});return h.jsx(so,{scope:n,triggerRef:c,contentRef:l,contentId:Q(),titleId:Q(),descriptionId:Q(),open:u,onOpenChange:d,onOpenToggle:e.useCallback(()=>d(e=>!e),[d]),modal:s,children:r})};lo.displayName=oo;var uo="DialogTrigger",fo=e.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=co(uo,n),i=y(t,o.triggerRef);return h.jsx(D.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":To(o.open),...r,ref:i,onClick:m(e.onClick,o.onOpenToggle)})});fo.displayName=uo;var po="DialogPortal",[ho,mo]=io(po,{forceMount:void 0}),vo=t=>{const{__scopeDialog:n,forceMount:r,children:o,container:i}=t,a=co(po,n);return h.jsx(ho,{scope:n,forceMount:r,children:e.Children.map(o,e=>h.jsx($,{present:r||a.open,children:h.jsx(V,{asChild:!0,container:i,children:e})}))})};vo.displayName=po;var go="DialogOverlay",yo=e.forwardRef((e,t)=>{const n=mo(go,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=co(go,e.__scopeDialog);return i.modal?h.jsx($,{present:r||i.open,children:h.jsx(bo,{...o,ref:t})}):null});yo.displayName=go;var wo=x("DialogOverlay.RemoveScroll"),bo=e.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=co(go,n);return h.jsx(qr,{as:wo,allowPinchZoom:!0,shards:[o.contentRef],children:h.jsx(D.div,{"data-state":To(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),xo="DialogContent",_o=e.forwardRef((e,t)=>{const n=mo(xo,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=co(xo,e.__scopeDialog);return h.jsx($,{present:r||i.open,children:i.modal?h.jsx(Eo,{...o,ref:t}):h.jsx(So,{...o,ref:t})})});_o.displayName=xo;var Eo=e.forwardRef((t,n)=>{const r=co(xo,t.__scopeDialog),o=e.useRef(null),i=y(n,r.contentRef,o);return e.useEffect(()=>{const e=o.current;if(e)return ro(e)},[]),h.jsx(Ro,{...t,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:m(t.onCloseAutoFocus,e=>{e.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:m(t.onPointerDownOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()}),onFocusOutside:m(t.onFocusOutside,e=>e.preventDefault())})}),So=e.forwardRef((t,n)=>{const r=co(xo,t.__scopeDialog),o=e.useRef(!1),i=e.useRef(!1);return h.jsx(Ro,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:e=>{t.onCloseAutoFocus?.(e),e.defaultPrevented||(o.current||r.triggerRef.current?.focus(),e.preventDefault()),o.current=!1,i.current=!1},onInteractOutside:e=>{t.onInteractOutside?.(e),e.defaultPrevented||(o.current=!0,"pointerdown"===e.detail.originalEvent.type&&(i.current=!0));const n=e.target,a=r.triggerRef.current?.contains(n);a&&e.preventDefault(),"focusin"===e.detail.originalEvent.type&&i.current&&e.preventDefault()}})}),Ro=e.forwardRef((t,n)=>{const{__scopeDialog:r,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,...s}=t,c=co(xo,r),l=e.useRef(null),u=y(n,l);return Cn(),h.jsxs(h.Fragment,{children:[h.jsx(yn,{asChild:!0,loop:!0,trapped:o,onMountAutoFocus:i,onUnmountAutoFocus:a,children:h.jsx(N,{role:"dialog",id:c.contentId,"aria-describedby":c.descriptionId,"aria-labelledby":c.titleId,"data-state":To(c.open),...s,ref:u,onDismiss:()=>c.onOpenChange(!1)})}),h.jsxs(h.Fragment,{children:[h.jsx(No,{titleId:c.titleId}),h.jsx(Lo,{contentRef:l,descriptionId:c.descriptionId})]})]})}),Co="DialogTitle",Po=e.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=co(Co,n);return h.jsx(D.h2,{id:o.titleId,...r,ref:t})});Po.displayName=Co;var Do="DialogDescription",jo=e.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=co(Do,n);return h.jsx(D.p,{id:o.descriptionId,...r,ref:t})});jo.displayName=Do;var Oo="DialogClose",Mo=e.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=co(Oo,n);return h.jsx(D.button,{type:"button",...r,ref:t,onClick:m(e.onClick,()=>o.onOpenChange(!1))})});function To(e){return e?"open":"closed"}Mo.displayName=Oo;var Io="DialogTitleWarning",[ko,Ao]=function(t,n){const r=e.createContext(n),o=t=>{const{children:n,...o}=t,i=e.useMemo(()=>o,Object.values(o));return h.jsx(r.Provider,{value:i,children:n})};return o.displayName=t+"Provider",[o,function(o){const i=e.useContext(r);if(i)return i;if(void 0!==n)return n;throw new Error(`\`${o}\` must be used within \`${t}\``)}]}(Io,{contentName:xo,titleName:Co,docsSlug:"dialog"}),No=({titleId:t})=>{const n=Ao(Io),r=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return e.useEffect(()=>{if(t){document.getElementById(t)}},[r,t]),null},Lo=({contentRef:t,descriptionId:n})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ao("DialogDescriptionWarning").contentName}}.`;return e.useEffect(()=>{const e=t.current?.getAttribute("aria-describedby");if(n&&e){document.getElementById(n)}},[r,t,n]),null},Fo=lo,Wo=fo,Bo=vo,Ko=yo,Ho=_o,Vo=Po,$o=jo,Uo=Mo,zo=e.createContext(void 0);function Go(t){const n=e.useContext(zo);return t||n||"ltr"}var Xo="rovingFocusGroup.onEntryFocus",Yo={bubbles:!1,cancelable:!0},qo="RovingFocusGroup",[Zo,Jo,Qo]=P(qo),[ei,ti]=w(qo,[Qo]),[ni,ri]=ei(qo),oi=e.forwardRef((e,t)=>h.jsx(Zo.Provider,{scope:e.__scopeRovingFocusGroup,children:h.jsx(Zo.Slot,{scope:e.__scopeRovingFocusGroup,children:h.jsx(ii,{...e,ref:t})})}));oi.displayName=qo;var ii=e.forwardRef((t,n)=>{const{__scopeRovingFocusGroup:r,orientation:o,loop:i=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...f}=t,p=e.useRef(null),v=y(n,p),g=Go(a),[w,b]=G({prop:s,defaultProp:c??null,onChange:l,caller:qo}),[x,_]=e.useState(!1),E=O(u),S=Jo(r),R=e.useRef(!1),[C,P]=e.useState(0);return e.useEffect(()=>{const e=p.current;if(e)return e.addEventListener(Xo,E),()=>e.removeEventListener(Xo,E)},[E]),h.jsx(ni,{scope:r,orientation:o,dir:g,loop:i,currentTabStopId:w,onItemFocus:e.useCallback(e=>b(e),[b]),onItemShiftTab:e.useCallback(()=>_(!0),[]),onFocusableItemAdd:e.useCallback(()=>P(e=>e+1),[]),onFocusableItemRemove:e.useCallback(()=>P(e=>e-1),[]),children:h.jsx(D.div,{tabIndex:x||0===C?-1:0,"data-orientation":o,...f,ref:v,style:{outline:"none",...t.style},onMouseDown:m(t.onMouseDown,()=>{R.current=!0}),onFocus:m(t.onFocus,e=>{const t=!R.current;if(e.target===e.currentTarget&&t&&!x){const t=new CustomEvent(Xo,Yo);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=S().filter(e=>e.focusable);li([e.find(e=>e.active),e.find(e=>e.id===w),...e].filter(Boolean).map(e=>e.ref.current),d)}}R.current=!1}),onBlur:m(t.onBlur,()=>_(!1))})})}),ai="RovingFocusGroupItem",si=e.forwardRef((t,n)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:i=!1,tabStopId:a,children:s,...c}=t,l=Q(),u=a||l,d=ri(ai,r),f=d.currentTabStopId===u,p=Jo(r),{onFocusableItemAdd:v,onFocusableItemRemove:g,currentTabStopId:y}=d;return e.useEffect(()=>{if(o)return v(),()=>g()},[o,v,g]),h.jsx(Zo.ItemSlot,{scope:r,id:u,focusable:o,active:i,children:h.jsx(D.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...c,ref:n,onMouseDown:m(t.onMouseDown,e=>{o?d.onItemFocus(u):e.preventDefault()}),onFocus:m(t.onFocus,()=>d.onItemFocus(u)),onKeyDown:m(t.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void d.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,n){const r=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,n);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)?void 0:ci[r]}(e,d.orientation,d.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=p().filter(e=>e.focusable).map(e=>e.ref.current);if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const i=o.indexOf(e.currentTarget);o=d.loop?(r=i+1,(n=o).map((e,t)=>n[(r+t)%n.length])):o.slice(i+1)}setTimeout(()=>li(o))}var n,r}),children:"function"==typeof s?s({isCurrentTabStop:f,hasTabStop:null!=y}):s})})});si.displayName=ai;var ci={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function li(e,t=!1){const n=document.activeElement;for(const r of e){if(r===n)return;if(r.focus({preventScroll:t}),document.activeElement!==n)return}}var ui=oi,di=si,fi=["Enter"," "],pi=["ArrowUp","PageDown","End"],hi=["ArrowDown","PageUp","Home",...pi],mi={ltr:[...fi,"ArrowRight"],rtl:[...fi,"ArrowLeft"]},vi={ltr:["ArrowLeft"],rtl:["ArrowRight"]},gi="Menu",[yi,wi,bi]=P(gi),[xi,_i]=w(gi,[bi,Xt,ti]),Ei=Xt(),Si=ti(),[Ri,Ci]=xi(gi),[Pi,Di]=xi(gi),ji=t=>{const{__scopeMenu:n,open:r=!1,children:o,dir:i,onOpenChange:a,modal:s=!0}=t,c=Ei(n),[l,u]=e.useState(null),d=e.useRef(!1),f=O(a),p=Go(i);return e.useEffect(()=>{const e=()=>{d.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>d.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}},[]),h.jsx(dn,{...c,children:h.jsx(Ri,{scope:n,open:r,onOpenChange:f,content:l,onContentChange:u,children:h.jsx(Pi,{scope:n,onClose:e.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:p,modal:s,children:o})})})};ji.displayName=gi;var Oi=e.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Ei(n);return h.jsx(fn,{...o,...r,ref:t})});Oi.displayName="MenuAnchor";var Mi="MenuPortal",[Ti,Ii]=xi(Mi,{forceMount:void 0}),ki=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=Ci(Mi,t);return h.jsx(Ti,{scope:t,forceMount:n,children:h.jsx($,{present:n||i.open,children:h.jsx(V,{asChild:!0,container:o,children:r})})})};ki.displayName=Mi;var Ai="MenuContent",[Ni,Li]=xi(Ai),Fi=e.forwardRef((e,t)=>{const n=Ii(Ai,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=Ci(Ai,e.__scopeMenu),a=Di(Ai,e.__scopeMenu);return h.jsx(yi.Provider,{scope:e.__scopeMenu,children:h.jsx($,{present:r||i.open,children:h.jsx(yi.Slot,{scope:e.__scopeMenu,children:a.modal?h.jsx(Wi,{...o,ref:t}):h.jsx(Bi,{...o,ref:t})})})})}),Wi=e.forwardRef((t,n)=>{const r=Ci(Ai,t.__scopeMenu),o=e.useRef(null),i=y(n,o);return e.useEffect(()=>{const e=o.current;if(e)return ro(e)},[]),h.jsx(Hi,{...t,ref:i,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:m(t.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),Bi=e.forwardRef((e,t)=>{const n=Ci(Ai,e.__scopeMenu);return h.jsx(Hi,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Ki=x("MenuContent.ScrollLock"),Hi=e.forwardRef((t,n)=>{const{__scopeMenu:r,loop:o=!1,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:v,disableOutsideScroll:g,...w}=t,b=Ci(Ai,r),x=Di(Ai,r),_=Ei(r),E=Si(r),S=wi(r),[R,C]=e.useState(null),P=e.useRef(null),D=y(n,P,b.onContentChange),j=e.useRef(0),O=e.useRef(""),M=e.useRef(0),T=e.useRef(null),I=e.useRef("right"),k=e.useRef(0),A=g?qr:e.Fragment,L=g?{as:Ki,allowPinchZoom:!0}:void 0,F=e=>{const t=O.current+e,n=S().filter(e=>!e.disabled),r=document.activeElement,o=n.find(e=>e.ref.current===r)?.textValue,i=function(e,t,n){const r=t.length>1&&Array.from(t).every(e=>e===t[0]),o=r?t[0]:t,i=n?e.indexOf(n):-1;let a=(s=e,c=Math.max(i,0),s.map((e,t)=>s[(c+t)%s.length]));var s,c;1===o.length&&(a=a.filter(e=>e!==n));const l=a.find(e=>e.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}(n.map(e=>e.textValue),t,o),a=n.find(e=>e.textValue===i)?.ref.current;!function e(t){O.current=t,window.clearTimeout(j.current),""!==t&&(j.current=window.setTimeout(()=>e(""),1e3))}(t),a&&setTimeout(()=>a.focus())};e.useEffect(()=>()=>window.clearTimeout(j.current),[]),Cn();const W=e.useCallback(e=>I.current===T.current?.side&&function(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return function(e,t){const{x:n,y:r}=e;let o=!1;for(let i=0,a=t.length-1;i<t.length;a=i++){const e=t[i],s=t[a],c=e.x,l=e.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(o=!o)}return o}(n,t)}(e,T.current?.area),[]);return h.jsx(Ni,{scope:r,searchRef:O,onItemEnter:e.useCallback(e=>{W(e)&&e.preventDefault()},[W]),onItemLeave:e.useCallback(e=>{W(e)||(P.current?.focus(),C(null))},[W]),onTriggerLeave:e.useCallback(e=>{W(e)&&e.preventDefault()},[W]),pointerGraceTimerRef:M,onPointerGraceIntentChange:e.useCallback(e=>{T.current=e},[]),children:h.jsx(A,{...L,children:h.jsx(yn,{asChild:!0,trapped:i,onMountAutoFocus:m(a,e=>{e.preventDefault(),P.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:h.jsx(N,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:p,onDismiss:v,children:h.jsx(ui,{asChild:!0,...E,dir:x.dir,orientation:"vertical",loop:o,currentTabStopId:R,onCurrentTabStopIdChange:C,onEntryFocus:m(l,e=>{x.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:h.jsx(pn,{role:"menu","aria-orientation":"vertical","data-state":ha(b.open),"data-radix-menu-content":"",dir:x.dir,..._,...w,ref:D,style:{outline:"none",...w.style},onKeyDown:m(w.onKeyDown,e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&F(e.key));const o=P.current;if(e.target!==o)return;if(!hi.includes(e.key))return;e.preventDefault();const i=S().filter(e=>!e.disabled).map(e=>e.ref.current);pi.includes(e.key)&&i.reverse(),function(e){const t=document.activeElement;for(const n of e){if(n===t)return;if(n.focus(),document.activeElement!==t)return}}(i)}),onBlur:m(t.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(j.current),O.current="")}),onPointerMove:m(t.onPointerMove,ga(e=>{const t=e.target,n=k.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>k.current?"right":"left";I.current=t,k.current=e.clientX}}))})})})})})})});Fi.displayName=Ai;var Vi=e.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(D.div,{role:"group",...r,ref:t})});Vi.displayName="MenuGroup";var $i=e.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(D.div,{...r,ref:t})});$i.displayName="MenuLabel";var Ui="MenuItem",zi="menu.itemSelect",Gi=e.forwardRef((t,n)=>{const{disabled:r=!1,onSelect:o,...i}=t,a=e.useRef(null),s=Di(Ui,t.__scopeMenu),c=Li(Ui,t.__scopeMenu),l=y(n,a),u=e.useRef(!1);return h.jsx(Xi,{...i,ref:l,disabled:r,onClick:m(t.onClick,()=>{const e=a.current;if(!r&&e){const t=new CustomEvent(zi,{bubbles:!0,cancelable:!0});e.addEventListener(zi,e=>o?.(e),{once:!0}),j(e,t),t.defaultPrevented?u.current=!1:s.onClose()}}),onPointerDown:e=>{t.onPointerDown?.(e),u.current=!0},onPointerUp:m(t.onPointerUp,e=>{u.current||e.currentTarget?.click()}),onKeyDown:m(t.onKeyDown,e=>{const t=""!==c.searchRef.current;r||t&&" "===e.key||fi.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});Gi.displayName=Ui;var Xi=e.forwardRef((t,n)=>{const{__scopeMenu:r,disabled:o=!1,textValue:i,...a}=t,s=Li(Ui,r),c=Si(r),l=e.useRef(null),u=y(n,l),[d,f]=e.useState(!1),[p,v]=e.useState("");return e.useEffect(()=>{const e=l.current;e&&v((e.textContent??"").trim())},[a.children]),h.jsx(yi.ItemSlot,{scope:r,disabled:o,textValue:i??p,children:h.jsx(di,{asChild:!0,...c,focusable:!o,children:h.jsx(D.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...a,ref:u,onPointerMove:m(t.onPointerMove,ga(e=>{if(o)s.onItemLeave(e);else if(s.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}})),onPointerLeave:m(t.onPointerLeave,ga(e=>s.onItemLeave(e))),onFocus:m(t.onFocus,()=>f(!0)),onBlur:m(t.onBlur,()=>f(!1))})})})}),Yi=e.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return h.jsx(ra,{scope:e.__scopeMenu,checked:n,children:h.jsx(Gi,{role:"menuitemcheckbox","aria-checked":ma(n)?"mixed":n,...o,ref:t,"data-state":va(n),onSelect:m(o.onSelect,()=>r?.(!!ma(n)||!n),{checkForDefaultPrevented:!1})})})});Yi.displayName="MenuCheckboxItem";var qi="MenuRadioGroup",[Zi,Ji]=xi(qi,{value:void 0,onValueChange:()=>{}}),Qi=e.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,i=O(r);return h.jsx(Zi,{scope:e.__scopeMenu,value:n,onValueChange:i,children:h.jsx(Vi,{...o,ref:t})})});Qi.displayName=qi;var ea="MenuRadioItem",ta=e.forwardRef((e,t)=>{const{value:n,...r}=e,o=Ji(ea,e.__scopeMenu),i=n===o.value;return h.jsx(ra,{scope:e.__scopeMenu,checked:i,children:h.jsx(Gi,{role:"menuitemradio","aria-checked":i,...r,ref:t,"data-state":va(i),onSelect:m(r.onSelect,()=>o.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});ta.displayName=ea;var na="MenuItemIndicator",[ra,oa]=xi(na,{checked:!1}),ia=e.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=oa(na,n);return h.jsx($,{present:r||ma(i.checked)||!0===i.checked,children:h.jsx(D.span,{...o,ref:t,"data-state":va(i.checked)})})});ia.displayName=na;var aa=e.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return h.jsx(D.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});aa.displayName="MenuSeparator";var sa=e.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Ei(n);return h.jsx(hn,{...o,...r,ref:t})});sa.displayName="MenuArrow";var[ca,la]=xi("MenuSub"),ua="MenuSubTrigger",da=e.forwardRef((t,n)=>{const r=Ci(ua,t.__scopeMenu),o=Di(ua,t.__scopeMenu),i=la(ua,t.__scopeMenu),a=Li(ua,t.__scopeMenu),s=e.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:l}=a,u={__scopeMenu:t.__scopeMenu},d=e.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return e.useEffect(()=>d,[d]),e.useEffect(()=>{const e=c.current;return()=>{window.clearTimeout(e),l(null)}},[c,l]),h.jsx(Oi,{asChild:!0,...u,children:h.jsx(Xi,{id:i.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":i.contentId,"data-state":ha(r.open),...t,ref:g(n,i.onTriggerChange),onClick:e=>{t.onClick?.(e),t.disabled||e.defaultPrevented||(e.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:m(t.onPointerMove,ga(e=>{a.onItemEnter(e),e.defaultPrevented||t.disabled||r.open||s.current||(a.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{r.onOpenChange(!0),d()},100))})),onPointerLeave:m(t.onPointerLeave,ga(e=>{d();const t=r.content?.getBoundingClientRect();if(t){const n=r.content?.dataset.side,o="right"===n,i=o?-5:5,s=t[o?"left":"right"],l=t[o?"right":"left"];a.onPointerGraceIntentChange({area:[{x:e.clientX+i,y:e.clientY},{x:s,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:s,y:t.bottom}],side:n}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:m(t.onKeyDown,e=>{const n=""!==a.searchRef.current;t.disabled||n&&" "===e.key||mi[o.dir].includes(e.key)&&(r.onOpenChange(!0),r.content?.focus(),e.preventDefault())})})})});da.displayName=ua;var fa="MenuSubContent",pa=e.forwardRef((t,n)=>{const r=Ii(Ai,t.__scopeMenu),{forceMount:o=r.forceMount,...i}=t,a=Ci(Ai,t.__scopeMenu),s=Di(Ai,t.__scopeMenu),c=la(fa,t.__scopeMenu),l=e.useRef(null),u=y(n,l);return h.jsx(yi.Provider,{scope:t.__scopeMenu,children:h.jsx($,{present:o||a.open,children:h.jsx(yi.Slot,{scope:t.__scopeMenu,children:h.jsx(Hi,{id:c.contentId,"aria-labelledby":c.triggerId,...i,ref:u,align:"start",side:"rtl"===s.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{s.isUsingKeyboardRef.current&&l.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:m(t.onFocusOutside,e=>{e.target!==c.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:m(t.onEscapeKeyDown,e=>{s.onClose(),e.preventDefault()}),onKeyDown:m(t.onKeyDown,e=>{const t=e.currentTarget.contains(e.target),n=vi[s.dir].includes(e.key);t&&n&&(a.onOpenChange(!1),c.trigger?.focus(),e.preventDefault())})})})})})});function ha(e){return e?"open":"closed"}function ma(e){return"indeterminate"===e}function va(e){return ma(e)?"indeterminate":e?"checked":"unchecked"}function ga(e){return t=>"mouse"===t.pointerType?e(t):void 0}pa.displayName=fa;var ya=ji,wa=Oi,ba=ki,xa=Fi,_a=Vi,Ea=$i,Sa=Gi,Ra=Yi,Ca=Qi,Pa=ta,Da=ia,ja=aa,Oa=sa,Ma=da,Ta=pa,Ia="DropdownMenu",[ka,Aa]=w(Ia,[_i]),Na=_i(),[La,Fa]=ka(Ia),Wa=t=>{const{__scopeDropdownMenu:n,children:r,dir:o,open:i,defaultOpen:a,onOpenChange:s,modal:c=!0}=t,l=Na(n),u=e.useRef(null),[d,f]=G({prop:i,defaultProp:a??!1,onChange:s,caller:Ia});return h.jsx(La,{scope:n,triggerId:Q(),triggerRef:u,contentId:Q(),open:d,onOpenChange:f,onOpenToggle:e.useCallback(()=>f(e=>!e),[f]),modal:c,children:h.jsx(ya,{...l,open:d,onOpenChange:f,dir:o,modal:c,children:r})})};Wa.displayName=Ia;var Ba="DropdownMenuTrigger",Ka=e.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,i=Fa(Ba,n),a=Na(n);return h.jsx(wa,{asChild:!0,...a,children:h.jsx(D.button,{type:"button",id:i.triggerId,"aria-haspopup":"menu","aria-expanded":i.open,"aria-controls":i.open?i.contentId:void 0,"data-state":i.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:g(t,i.triggerRef),onPointerDown:m(e.onPointerDown,e=>{r||0!==e.button||!1!==e.ctrlKey||(i.onOpenToggle(),i.open||e.preventDefault())}),onKeyDown:m(e.onKeyDown,e=>{r||(["Enter"," "].includes(e.key)&&i.onOpenToggle(),"ArrowDown"===e.key&&i.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});Ka.displayName=Ba;var Ha=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Na(t);return h.jsx(ba,{...r,...n})};Ha.displayName="DropdownMenuPortal";var Va="DropdownMenuContent",$a=e.forwardRef((t,n)=>{const{__scopeDropdownMenu:r,...o}=t,i=Fa(Va,r),a=Na(r),s=e.useRef(!1);return h.jsx(xa,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...o,ref:n,onCloseAutoFocus:m(t.onCloseAutoFocus,e=>{s.current||i.triggerRef.current?.focus(),s.current=!1,e.preventDefault()}),onInteractOutside:m(t.onInteractOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;i.modal&&!r||(s.current=!0)}),style:{...t.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});$a.displayName=Va;e.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Na(n);return h.jsx(_a,{...o,...r,ref:t})}).displayName="DropdownMenuGroup";var Ua=e.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Na(n);return h.jsx(Ea,{...o,...r,ref:t})});Ua.displayName="DropdownMenuLabel";var za=e.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Na(n);return h.jsx(Sa,{...o,...r,ref:t})});za.displayName="DropdownMenuItem";var Ga=e.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Na(n);return h.jsx(Ra,{...o,...r,ref:t})});Ga.displayName="DropdownMenuCheckboxItem";e.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Na(n);return h.jsx(Ca,{...o,...r,ref:t})}).displayName="DropdownMenuRadioGroup";var Xa=e.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Na(n);return h.jsx(Pa,{...o,...r,ref:t})});Xa.displayName="DropdownMenuRadioItem";var Ya=e.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Na(n);return h.jsx(Da,{...o,...r,ref:t})});Ya.displayName="DropdownMenuItemIndicator";var qa=e.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Na(n);return h.jsx(ja,{...o,...r,ref:t})});qa.displayName="DropdownMenuSeparator";e.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Na(n);return h.jsx(Oa,{...o,...r,ref:t})}).displayName="DropdownMenuArrow";var Za=e.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Na(n);return h.jsx(Ma,{...o,...r,ref:t})});Za.displayName="DropdownMenuSubTrigger";var Ja=e.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Na(n);return h.jsx(Ta,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Ja.displayName="DropdownMenuSubContent";var Qa=Wa,es=Ka,ts=Ha,ns=$a,rs=Ua,os=za,is=Ga,as=Xa,ss=Ya,cs=qa,ls=Za,us=Ja;function ds(t){const n=e.useRef({value:t,previous:t});return e.useMemo(()=>(n.current.value!==t&&(n.current.previous=n.current.value,n.current.value=t),n.current.previous),[t])}function fs(e,[t,n]){return Math.min(n,Math.max(t,e))}var ps=[" ","Enter","ArrowUp","ArrowDown"],hs=[" ","Enter"],ms="Select",[vs,gs,ys]=P(ms),[ws,bs]=w(ms,[ys,Xt]),xs=Xt(),[_s,Es]=ws(ms),[Ss,Rs]=ws(ms),Cs=t=>{const{__scopeSelect:n,children:r,open:o,defaultOpen:i,onOpenChange:a,value:s,defaultValue:c,onValueChange:l,dir:u,name:d,autoComplete:f,disabled:p,required:m,form:v}=t,g=xs(n),[y,w]=e.useState(null),[b,x]=e.useState(null),[_,E]=e.useState(!1),S=Go(u),[R,C]=G({prop:o,defaultProp:i??!1,onChange:a,caller:ms}),[P,D]=G({prop:s,defaultProp:c,onChange:l,caller:ms}),j=e.useRef(null),O=!y||(v||!!y.closest("form")),[M,T]=e.useState(new Set),I=Array.from(M).map(e=>e.props.value).join(";");return h.jsx(dn,{...g,children:h.jsxs(_s,{required:m,scope:n,trigger:y,onTriggerChange:w,valueNode:b,onValueNodeChange:x,valueNodeHasChildren:_,onValueNodeHasChildrenChange:E,contentId:Q(),value:P,onValueChange:D,open:R,onOpenChange:C,dir:S,triggerPointerDownPosRef:j,disabled:p,children:[h.jsx(vs.Provider,{scope:n,children:h.jsx(Ss,{scope:t.__scopeSelect,onNativeOptionAdd:e.useCallback(e=>{T(t=>new Set(t).add(e))},[]),onNativeOptionRemove:e.useCallback(e=>{T(t=>{const n=new Set(t);return n.delete(e),n})},[]),children:r})}),O?h.jsxs(fc,{"aria-hidden":!0,required:m,tabIndex:-1,name:d,autoComplete:f,value:P,onChange:e=>D(e.target.value),disabled:p,form:v,children:[void 0===P?h.jsx("option",{value:""}):null,Array.from(M)]},I):null]})})};Cs.displayName=ms;var Ps="SelectTrigger",Ds=e.forwardRef((t,n)=>{const{__scopeSelect:r,disabled:o=!1,...i}=t,a=xs(r),s=Es(Ps,r),c=s.disabled||o,l=y(n,s.onTriggerChange),u=gs(r),d=e.useRef("touch"),[f,p,v]=hc(e=>{const t=u().filter(e=>!e.disabled),n=t.find(e=>e.value===s.value),r=mc(t,e,n);void 0!==r&&s.onValueChange(r.value)}),g=e=>{c||(s.onOpenChange(!0),v()),e&&(s.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)})};return h.jsx(fn,{asChild:!0,...a,children:h.jsx(D.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:c,"data-disabled":c?"":void 0,"data-placeholder":pc(s.value)?"":void 0,...i,ref:l,onClick:m(i.onClick,e=>{e.currentTarget.focus(),"mouse"!==d.current&&g(e)}),onPointerDown:m(i.onPointerDown,e=>{d.current=e.pointerType;const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&"mouse"===e.pointerType&&(g(e),e.preventDefault())}),onKeyDown:m(i.onKeyDown,e=>{const t=""!==f.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||p(e.key),t&&" "===e.key||ps.includes(e.key)&&(g(),e.preventDefault())})})})});Ds.displayName=Ps;var js="SelectValue",Os=e.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:a="",...s}=e,c=Es(js,n),{onValueNodeHasChildrenChange:l}=c,u=void 0!==i,d=y(t,c.onValueNodeChange);return H(()=>{l(u)},[l,u]),h.jsx(D.span,{...s,ref:d,style:{pointerEvents:"none"},children:pc(c.value)?h.jsx(h.Fragment,{children:a}):i})});Os.displayName=js;var Ms=e.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return h.jsx(D.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Ms.displayName="SelectIcon";var Ts=e=>h.jsx(V,{asChild:!0,...e});Ts.displayName="SelectPortal";var Is="SelectContent",ks=e.forwardRef((t,r)=>{const o=Es(Is,t.__scopeSelect),[i,a]=e.useState();if(H(()=>{a(new DocumentFragment)},[]),!o.open){const e=i;return e?n.createPortal(h.jsx(Ns,{scope:t.__scopeSelect,children:h.jsx(vs.Slot,{scope:t.__scopeSelect,children:h.jsx("div",{children:t.children})})}),e):null}return h.jsx(Ws,{...t,ref:r})});ks.displayName=Is;var As=10,[Ns,Ls]=ws(Is),Fs=x("SelectContent.RemoveScroll"),Ws=e.forwardRef((t,n)=>{const{__scopeSelect:r,position:o="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:a,onPointerDownOutside:s,side:c,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:v,sticky:g,hideWhenDetached:w,avoidCollisions:b,...x}=t,_=Es(Is,r),[E,S]=e.useState(null),[R,C]=e.useState(null),P=y(n,e=>S(e)),[D,j]=e.useState(null),[O,M]=e.useState(null),T=gs(r),[I,k]=e.useState(!1),A=e.useRef(!1);e.useEffect(()=>{if(E)return ro(E)},[E]),Cn();const L=e.useCallback(e=>{const[t,...n]=T().map(e=>e.ref.current),[r]=n.slice(-1),o=document.activeElement;for(const i of e){if(i===o)return;if(i?.scrollIntoView({block:"nearest"}),i===t&&R&&(R.scrollTop=0),i===r&&R&&(R.scrollTop=R.scrollHeight),i?.focus(),document.activeElement!==o)return}},[T,R]),F=e.useCallback(()=>L([D,E]),[L,D,E]);e.useEffect(()=>{I&&F()},[I,F]);const{onOpenChange:W,triggerPointerDownPosRef:B}=_;e.useEffect(()=>{if(E){let e={x:0,y:0};const t=t=>{e={x:Math.abs(Math.round(t.pageX)-(B.current?.x??0)),y:Math.abs(Math.round(t.pageY)-(B.current?.y??0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():E.contains(n.target)||W(!1),document.removeEventListener("pointermove",t),B.current=null};return null!==B.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}},[E,W,B]),e.useEffect(()=>{const e=()=>W(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}},[W]);const[K,H]=hc(e=>{const t=T().filter(e=>!e.disabled),n=t.find(e=>e.ref.current===document.activeElement),r=mc(t,e,n);r&&setTimeout(()=>r.ref.current.focus())}),V=e.useCallback((e,t,n)=>{const r=!A.current&&!n;(void 0!==_.value&&_.value===t||r)&&(j(e),r&&(A.current=!0))},[_.value]),$=e.useCallback(()=>E?.focus(),[E]),U=e.useCallback((e,t,n)=>{const r=!A.current&&!n;(void 0!==_.value&&_.value===t||r)&&M(e)},[_.value]),z="popper"===o?Ks:Bs,G=z===Ks?{side:c,sideOffset:l,align:u,alignOffset:d,arrowPadding:f,collisionBoundary:p,collisionPadding:v,sticky:g,hideWhenDetached:w,avoidCollisions:b}:{};return h.jsx(Ns,{scope:r,content:E,viewport:R,onViewportChange:C,itemRefCallback:V,selectedItem:D,onItemLeave:$,itemTextRefCallback:U,focusSelectedItem:F,selectedItemText:O,position:o,isPositioned:I,searchRef:K,children:h.jsx(qr,{as:Fs,allowPinchZoom:!0,children:h.jsx(yn,{asChild:!0,trapped:_.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:m(i,e=>{_.trigger?.focus({preventScroll:!0}),e.preventDefault()}),children:h.jsx(N,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>_.onOpenChange(!1),children:h.jsx(z,{role:"listbox",id:_.contentId,"data-state":_.open?"open":"closed",dir:_.dir,onContextMenu:e=>e.preventDefault(),...x,...G,onPlaced:()=>k(!0),ref:P,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:m(x.onKeyDown,e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||H(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=T().filter(e=>!e.disabled).map(e=>e.ref.current);if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout(()=>L(t)),e.preventDefault()}})})})})})})});Ws.displayName="SelectContentImpl";var Bs=e.forwardRef((t,n)=>{const{__scopeSelect:r,onPlaced:o,...i}=t,a=Es(Is,r),s=Ls(Is,r),[c,l]=e.useState(null),[u,d]=e.useState(null),f=y(n,e=>d(e)),p=gs(r),m=e.useRef(!1),v=e.useRef(!0),{viewport:g,selectedItem:w,selectedItemText:b,focusSelectedItem:x}=s,_=e.useCallback(()=>{if(a.trigger&&a.valueNode&&c&&u&&g&&w&&b){const e=a.trigger.getBoundingClientRect(),t=u.getBoundingClientRect(),n=a.valueNode.getBoundingClientRect(),r=b.getBoundingClientRect();if("rtl"!==a.dir){const o=r.left-t.left,i=n.left-o,a=e.left-i,s=e.width+a,l=Math.max(s,t.width),u=window.innerWidth-As,d=fs(i,[As,Math.max(As,u-l)]);c.style.minWidth=s+"px",c.style.left=d+"px"}else{const o=t.right-r.right,i=window.innerWidth-n.right-o,a=window.innerWidth-e.right-i,s=e.width+a,l=Math.max(s,t.width),u=window.innerWidth-As,d=fs(i,[As,Math.max(As,u-l)]);c.style.minWidth=s+"px",c.style.right=d+"px"}const i=p(),s=window.innerHeight-2*As,l=g.scrollHeight,d=window.getComputedStyle(u),f=parseInt(d.borderTopWidth,10),h=parseInt(d.paddingTop,10),v=parseInt(d.borderBottomWidth,10),y=f+h+l+parseInt(d.paddingBottom,10)+v,x=Math.min(5*w.offsetHeight,y),_=window.getComputedStyle(g),E=parseInt(_.paddingTop,10),S=parseInt(_.paddingBottom,10),R=e.top+e.height/2-As,C=s-R,P=w.offsetHeight/2,D=f+h+(w.offsetTop+P),j=y-D;if(D<=R){const e=i.length>0&&w===i[i.length-1].ref.current;c.style.bottom="0px";const t=u.clientHeight-g.offsetTop-g.offsetHeight,n=D+Math.max(C,P+(e?S:0)+t+v);c.style.height=n+"px"}else{const e=i.length>0&&w===i[0].ref.current;c.style.top="0px";const t=Math.max(R,f+g.offsetTop+(e?E:0)+P)+j;c.style.height=t+"px",g.scrollTop=D-R+g.offsetTop}c.style.margin=`${As}px 0`,c.style.minHeight=x+"px",c.style.maxHeight=s+"px",o?.(),requestAnimationFrame(()=>m.current=!0)}},[p,a.trigger,a.valueNode,c,u,g,w,b,a.dir,o]);H(()=>_(),[_]);const[E,S]=e.useState();H(()=>{u&&S(window.getComputedStyle(u).zIndex)},[u]);const R=e.useCallback(e=>{e&&!0===v.current&&(_(),x?.(),v.current=!1)},[_,x]);return h.jsx(Hs,{scope:r,contentWrapper:c,shouldExpandOnScrollRef:m,onScrollButtonChange:R,children:h.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:E},children:h.jsx(D.div,{...i,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});Bs.displayName="SelectItemAlignedPosition";var Ks=e.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=As,...i}=e,a=xs(n);return h.jsx(pn,{...a,...i,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.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)"}})});Ks.displayName="SelectPopperPosition";var[Hs,Vs]=ws(Is,{}),$s="SelectViewport",Us=e.forwardRef((t,n)=>{const{__scopeSelect:r,nonce:o,...i}=t,a=Ls($s,r),s=Vs($s,r),c=y(n,a.onViewportChange),l=e.useRef(0);return h.jsxs(h.Fragment,{children:[h.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}),h.jsx(vs.Slot,{scope:r,children:h.jsx(D.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:c,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:m(i.onScroll,e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=s;if(r?.current&&n){const e=Math.abs(l.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*As,o=parseFloat(n.style.minHeight),i=parseFloat(n.style.height),a=Math.max(o,i);if(a<r){const o=a+e,i=Math.min(r,o),s=o-i;n.style.height=i+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}l.current=t.scrollTop})})})]})});Us.displayName=$s;var zs="SelectGroup",[Gs,Xs]=ws(zs);e.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Q();return h.jsx(Gs,{scope:n,id:o,children:h.jsx(D.div,{role:"group","aria-labelledby":o,...r,ref:t})})}).displayName=zs;var Ys="SelectLabel",qs=e.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Xs(Ys,n);return h.jsx(D.div,{id:o.id,...r,ref:t})});qs.displayName=Ys;var Zs="SelectItem",[Js,Qs]=ws(Zs),ec=e.forwardRef((t,n)=>{const{__scopeSelect:r,value:o,disabled:i=!1,textValue:a,...s}=t,c=Es(Zs,r),l=Ls(Zs,r),u=c.value===o,[d,f]=e.useState(a??""),[p,v]=e.useState(!1),g=y(n,e=>l.itemRefCallback?.(e,o,i)),w=Q(),b=e.useRef("touch"),x=()=>{i||(c.onValueChange(o),c.onOpenChange(!1))};if(""===o)throw new Error("A <Select.Item /> 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 h.jsx(Js,{scope:r,value:o,disabled:i,textId:w,isSelected:u,onItemTextChange:e.useCallback(e=>{f(t=>t||(e?.textContent??"").trim())},[]),children:h.jsx(vs.ItemSlot,{scope:r,value:o,disabled:i,textValue:d,children:h.jsx(D.div,{role:"option","aria-labelledby":w,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...s,ref:g,onFocus:m(s.onFocus,()=>v(!0)),onBlur:m(s.onBlur,()=>v(!1)),onClick:m(s.onClick,()=>{"mouse"!==b.current&&x()}),onPointerUp:m(s.onPointerUp,()=>{"mouse"===b.current&&x()}),onPointerDown:m(s.onPointerDown,e=>{b.current=e.pointerType}),onPointerMove:m(s.onPointerMove,e=>{b.current=e.pointerType,i?l.onItemLeave?.():"mouse"===b.current&&e.currentTarget.focus({preventScroll:!0})}),onPointerLeave:m(s.onPointerLeave,e=>{e.currentTarget===document.activeElement&&l.onItemLeave?.()}),onKeyDown:m(s.onKeyDown,e=>{""!==l.searchRef?.current&&" "===e.key||(hs.includes(e.key)&&x()," "===e.key&&e.preventDefault())})})})})});ec.displayName=Zs;var tc="SelectItemText",nc=e.forwardRef((t,r)=>{const{__scopeSelect:o,className:i,style:a,...s}=t,c=Es(tc,o),l=Ls(tc,o),u=Qs(tc,o),d=Rs(tc,o),[f,p]=e.useState(null),m=y(r,e=>p(e),u.onItemTextChange,e=>l.itemTextRefCallback?.(e,u.value,u.disabled)),v=f?.textContent,g=e.useMemo(()=>h.jsx("option",{value:u.value,disabled:u.disabled,children:v},u.value),[u.disabled,u.value,v]),{onNativeOptionAdd:w,onNativeOptionRemove:b}=d;return H(()=>(w(g),()=>b(g)),[w,b,g]),h.jsxs(h.Fragment,{children:[h.jsx(D.span,{id:u.textId,...s,ref:m}),u.isSelected&&c.valueNode&&!c.valueNodeHasChildren?n.createPortal(s.children,c.valueNode):null]})});nc.displayName=tc;var rc="SelectItemIndicator",oc=e.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Qs(rc,n).isSelected?h.jsx(D.span,{"aria-hidden":!0,...r,ref:t}):null});oc.displayName=rc;var ic="SelectScrollUpButton",ac=e.forwardRef((t,n)=>{const r=Ls(ic,t.__scopeSelect),o=Vs(ic,t.__scopeSelect),[i,a]=e.useState(!1),s=y(n,o.onScrollButtonChange);return H(()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollTop>0;a(e)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),i?h.jsx(lc,{...t,ref:s,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}}):null});ac.displayName=ic;var sc="SelectScrollDownButton",cc=e.forwardRef((t,n)=>{const r=Ls(sc,t.__scopeSelect),o=Vs(sc,t.__scopeSelect),[i,a]=e.useState(!1),s=y(n,o.onScrollButtonChange);return H(()=>{if(r.viewport&&r.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;a(n)};const t=r.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}},[r.viewport,r.isPositioned]),i?h.jsx(lc,{...t,ref:s,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}}):null});cc.displayName=sc;var lc=e.forwardRef((t,n)=>{const{__scopeSelect:r,onAutoScroll:o,...i}=t,a=Ls("SelectScrollButton",r),s=e.useRef(null),c=gs(r),l=e.useCallback(()=>{null!==s.current&&(window.clearInterval(s.current),s.current=null)},[]);return e.useEffect(()=>()=>l(),[l]),H(()=>{const e=c().find(e=>e.ref.current===document.activeElement);e?.ref.current?.scrollIntoView({block:"nearest"})},[c]),h.jsx(D.div,{"aria-hidden":!0,...i,ref:n,style:{flexShrink:0,...i.style},onPointerDown:m(i.onPointerDown,()=>{null===s.current&&(s.current=window.setInterval(o,50))}),onPointerMove:m(i.onPointerMove,()=>{a.onItemLeave?.(),null===s.current&&(s.current=window.setInterval(o,50))}),onPointerLeave:m(i.onPointerLeave,()=>{l()})})}),uc=e.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return h.jsx(D.div,{"aria-hidden":!0,...r,ref:t})});uc.displayName="SelectSeparator";var dc="SelectArrow";e.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=xs(n),i=Es(dc,n),a=Ls(dc,n);return i.open&&"popper"===a.position?h.jsx(hn,{...o,...r,ref:t}):null}).displayName=dc;var fc=e.forwardRef(({__scopeSelect:t,value:n,...r},o)=>{const i=e.useRef(null),a=y(o,i),s=ds(n);return e.useEffect(()=>{const e=i.current;if(!e)return;const t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(s!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}},[s,n]),h.jsx(D.select,{...r,style:{...X,...r.style},ref:a,defaultValue:n})});function pc(e){return""===e||void 0===e}function hc(t){const n=O(t),r=e.useRef(""),o=e.useRef(0),i=e.useCallback(e=>{const t=r.current+e;n(t),function e(t){r.current=t,window.clearTimeout(o.current),""!==t&&(o.current=window.setTimeout(()=>e(""),1e3))}(t)},[n]),a=e.useCallback(()=>{r.current="",window.clearTimeout(o.current)},[]);return e.useEffect(()=>()=>window.clearTimeout(o.current),[]),[r,i,a]}function mc(e,t,n){const r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,o=n?e.indexOf(n):-1;let i=(a=e,s=Math.max(o,0),a.map((e,t)=>a[(s+t)%a.length]));var a,s;1===r.length&&(i=i.filter(e=>e!==n));const c=i.find(e=>e.textValue.toLowerCase().startsWith(r.toLowerCase()));return c!==n?c:void 0}fc.displayName="SelectBubbleInput";var vc=Cs,gc=Ds,yc=Os,wc=Ms,bc=Ts,xc=ks,_c=Us,Ec=qs,Sc=ec,Rc=nc,Cc=oc,Pc=ac,Dc=cc,jc=uc;export{Mn as $,fn as A,K as B,pn as C,N as D,ns as E,is as F,ss as G,as as H,os as I,cs as J,Qa as K,rs as L,es as M,ds as N,Ko as O,D as P,Ut as Q,B as R,_ as S,Vo as T,ti as U,Y as V,Go as W,ui as X,di as Y,dr as Z,Wn as _,w as a,gc as a0,wc as a1,Pc as a2,Dc as a3,bc as a4,xc as a5,_c as a6,Ec as a7,Sc as a8,Cc as a9,Rc as aa,jc as ab,vc as ac,yc as ad,fs as ae,G as b,P as c,$ as d,O as e,m as f,V as g,H as h,j as i,h as j,Xt as k,q as l,hn as m,R as n,Q as o,dn as p,Ho as q,Uo as r,$o as s,Bo as t,y as u,Fo as v,Wo as w,ls as x,us as y,ts as z};