jattac.libs.web.overflow-menu 0.0.28 → 0.0.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -147
- package/dist/Data/IOverflowMenuItem.d.ts +1 -0
- package/dist/index.es.js +1 -1
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +76 -76
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("react"),t=require("react/jsx-runtime"),n=require("react-dom"),r=require("framer-motion");function o(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var i=o(e),a=o(n);function c(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function s(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function u(...e){return t=>{let n=!1;const r=e.map(e=>{const r=s(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():s(e[t],null)}}}}function l(...e){return i.useCallback(u(...e),e)}function d(e,n=[]){let r=[];const o=()=>{const t=r.map(e=>i.createContext(e));return function(n){const r=n?.[e]||t;return i.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return o.scopeName=e,[function(n,o){const a=i.createContext(o),c=r.length;r=[...r,o];const s=n=>{const{scope:r,children:o,...s}=n,u=r?.[e]?.[c]||a,l=i.useMemo(()=>s,Object.values(s));return t.jsx(u.Provider,{value:l,children:o})};return s.displayName=n+"Provider",[s,function(t,r){const s=r?.[e]?.[c]||a,u=i.useContext(s);if(u)return u;if(void 0!==o)return o;throw new Error(`\`${t}\` must be used within \`${n}\``)}]},f(o,...n)]}function f(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const r=n.reduce((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]}),{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var p=globalThis?.document?i.useLayoutEffect:()=>{},m=i[" useInsertionEffect ".trim().toString()]||p;function h({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,c]=function({defaultProp:e,onChange:t}){const[n,r]=i.useState(e),o=i.useRef(n),a=i.useRef(t);return m(()=>{a.current=t},[t]),i.useEffect(()=>{o.current!==n&&(a.current?.(n),o.current=n)},[n,o]),[n,r,a]}({defaultProp:t,onChange:n}),s=void 0!==e,u=s?e:o;{const t=i.useRef(void 0!==e);i.useEffect(()=>{const e=t.current;if(e!==s){const t=e?"controlled":"uncontrolled",n=s?"controlled":"uncontrolled";console.warn(`${r} is changing from ${t} to ${n}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=s},[s,r])}const l=i.useCallback(t=>{if(s){const n=function(e){return"function"==typeof e}(t)?t(e):t;n!==e&&c.current?.(n)}else a(t)},[s,e,a,c]);return[u,l]}function g(e){const n=v(e),r=i.forwardRef((e,r)=>{const{children:o,...a}=e,c=i.Children.toArray(o),s=c.find(w);if(s){const e=s.props.children,o=c.map(t=>t===s?i.Children.count(e)>1?i.Children.only(null):i.isValidElement(e)?e.props.children:null:t);return t.jsx(n,{...a,ref:r,children:i.isValidElement(e)?i.cloneElement(e,void 0,o):null})}return t.jsx(n,{...a,ref:r,children:o})});return r.displayName=`${e}.Slot`,r}function v(e){const t=i.forwardRef((e,t)=>{const{children:n,...r}=e;if(i.isValidElement(n)){const e=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}(n),o=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}}(r,n.props);return n.type!==i.Fragment&&(o.ref=t?u(t,e):e),i.cloneElement(n,o)}return i.Children.count(n)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var y=Symbol("radix.slottable");function w(e){return i.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===y}var b=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,n)=>{const r=g(`Primitive.${n}`),o=i.forwardRef((e,o)=>{const{asChild:i,...a}=e,c=i?r:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),t.jsx(c,{...a,ref:o})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{});function x(e,t){e&&a.flushSync(()=>e.dispatchEvent(t))}function E(n){const r=n+"CollectionProvider",[o,i]=d(r),[a,c]=o(r,{collectionRef:{current:null},itemMap:new Map}),s=n=>{const{scope:r,children:o}=n,i=e.useRef(null),c=e.useRef(new Map).current;return t.jsx(a,{scope:r,itemMap:c,collectionRef:i,children:o})};s.displayName=r;const u=n+"CollectionSlot",f=g(u),p=e.forwardRef((e,n)=>{const{scope:r,children:o}=e,i=l(n,c(u,r).collectionRef);return t.jsx(f,{ref:i,children:o})});p.displayName=u;const m=n+"CollectionItemSlot",h="data-radix-collection-item",v=g(m),y=e.forwardRef((n,r)=>{const{scope:o,children:i,...a}=n,s=e.useRef(null),u=l(r,s),d=c(m,o);return e.useEffect(()=>(d.itemMap.set(s,{ref:s,...a}),()=>{d.itemMap.delete(s)})),t.jsx(v,{[h]:"",ref:u,children:i})});return y.displayName=m,[{Provider:s,Slot:p,ItemSlot:y},function(t){const r=c(n+"CollectionConsumer",t);return e.useCallback(()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${h}]`));return Array.from(r.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[r.collectionRef,r.itemMap])},i]}var C=i.createContext(void 0);function R(e){const t=i.useContext(C);return e||t||"ltr"}function _(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...e)=>t.current?.(...e),[])}var M,S="dismissableLayer.update",D="dismissableLayer.pointerDownOutside",O="dismissableLayer.focusOutside",P=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),A=i.forwardRef((e,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:u,onDismiss:d,...f}=e,p=i.useContext(P),[m,h]=i.useState(null),g=m?.ownerDocument??globalThis?.document,[,v]=i.useState({}),y=l(n,e=>h(e)),w=Array.from(p.layers),[x]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),E=w.indexOf(x),C=m?w.indexOf(m):-1,R=p.layersWithOutsidePointerEventsDisabled.size>0,A=C>=E,N=function(e,t=globalThis?.document){const n=_(e),r=i.useRef(!1),o=i.useRef(()=>{});return i.useEffect(()=>{const e=e=>{if(e.target&&!r.current){let r=function(){k(D,n,i,{discrete:!0})};const i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}(e=>{const t=e.target,n=[...p.branches].some(e=>e.contains(t));A&&!n&&(a?.(e),u?.(e),e.defaultPrevented||d?.())},g),L=function(e,t=globalThis?.document){const n=_(e),r=i.useRef(!1);return i.useEffect(()=>{const e=e=>{if(e.target&&!r.current){k(O,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}(e=>{const t=e.target;[...p.branches].some(e=>e.contains(t))||(s?.(e),u?.(e),e.defaultPrevented||d?.())},g);return function(e,t=globalThis?.document){const n=_(e);i.useEffect(()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{C===p.layers.size-1&&(o?.(e),!e.defaultPrevented&&d&&(e.preventDefault(),d()))},g),i.useEffect(()=>{if(m)return r&&(0===p.layersWithOutsidePointerEventsDisabled.size&&(M=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(m)),p.layers.add(m),T(),()=>{r&&1===p.layersWithOutsidePointerEventsDisabled.size&&(g.body.style.pointerEvents=M)}},[m,g,r,p]),i.useEffect(()=>()=>{m&&(p.layers.delete(m),p.layersWithOutsidePointerEventsDisabled.delete(m),T())},[m,p]),i.useEffect(()=>{const e=()=>v({});return document.addEventListener(S,e),()=>document.removeEventListener(S,e)},[]),t.jsx(b.div,{...f,ref:y,style:{pointerEvents:R?A?"auto":"none":void 0,...e.style},onFocusCapture:c(e.onFocusCapture,L.onFocusCapture),onBlurCapture:c(e.onBlurCapture,L.onBlurCapture),onPointerDownCapture:c(e.onPointerDownCapture,N.onPointerDownCapture)})});A.displayName="DismissableLayer";function T(){const e=new CustomEvent(S);document.dispatchEvent(e)}function k(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?x(o,i):o.dispatchEvent(i)}i.forwardRef((e,n)=>{const r=i.useContext(P),o=i.useRef(null),a=l(n,o);return i.useEffect(()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),t.jsx(b.div,{...e,ref:a})}).displayName="DismissableLayerBranch";var N=0;function L(){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 j="focusScope.autoFocusOnMount",I="focusScope.autoFocusOnUnmount",F={bubbles:!1,cancelable:!0},W=i.forwardRef((e,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:c,...s}=e,[u,d]=i.useState(null),f=_(a),p=_(c),m=i.useRef(null),h=l(n,e=>d(e)),g=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(o){let e=function(e){if(g.paused||!u)return;const t=e.target;u.contains(t)?m.current=t:$(m.current,{select:!0})},t=function(e){if(g.paused||!u)return;const t=e.relatedTarget;null!==t&&(u.contains(t)||$(m.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&$(u)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return u&&r.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[o,u,g.paused]),i.useEffect(()=>{if(u){z.add(g);const t=document.activeElement;if(!u.contains(t)){const n=new CustomEvent(j,F);u.addEventListener(j,f),u.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if($(r,{select:t}),document.activeElement!==n)return}((e=K(u),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&$(u))}return()=>{u.removeEventListener(j,f),setTimeout(()=>{const e=new CustomEvent(I,F);u.addEventListener(I,p),u.dispatchEvent(e),e.defaultPrevented||$(t??document.body,{select:!0}),u.removeEventListener(I,p),z.remove(g)},0)}}var e},[u,f,p,g]);const v=i.useCallback(e=>{if(!r&&!o)return;if(g.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=K(e),n=B(t,e),r=B(t.reverse(),e);return[n,r]}(t);o&&i?e.shiftKey||n!==i?e.shiftKey&&n===o&&(e.preventDefault(),r&&$(i,{select:!0})):(e.preventDefault(),r&&$(o,{select:!0})):n===t&&e.preventDefault()}},[r,o,g.paused]);return t.jsx(b.div,{tabIndex:-1,...s,ref:h,onKeyDown:v})});function K(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 B(e,t){for(const n of e)if(!H(n,{upTo:t}))return n}function H(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 $(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()}}W.displayName="FocusScope";var z=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=U(e,t),e.unshift(t)},remove(t){e=U(e,t),e[0]?.resume()}}}();function U(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var V=i[" useId ".trim().toString()]||(()=>{}),G=0;function X(e){const[t,n]=i.useState(V());return p(()=>{n(e=>e??String(G++))},[e]),e||(t?`radix-${t}`:"")}const Y=["top","right","bottom","left"],q=Math.min,Z=Math.max,Q=Math.round,J=Math.floor,ee=e=>({x:e,y:e}),te={left:"right",right:"left",bottom:"top",top:"bottom"},ne={start:"end",end:"start"};function re(e,t,n){return Z(e,q(t,n))}function oe(e,t){return"function"==typeof e?e(t):e}function ie(e){return e.split("-")[0]}function ae(e){return e.split("-")[1]}function ce(e){return"x"===e?"y":"x"}function se(e){return"y"===e?"height":"width"}const ue=new Set(["top","bottom"]);function le(e){return ue.has(ie(e))?"y":"x"}function de(e){return ce(le(e))}function fe(e){return e.replace(/start|end/g,e=>ne[e])}const pe=["left","right"],me=["right","left"],he=["top","bottom"],ge=["bottom","top"];function ve(e,t,n,r){const o=ae(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?me:pe:t?pe:me;case"left":case"right":return t?he:ge;default:return[]}}(ie(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(fe)))),i}function ye(e){return e.replace(/left|right|bottom|top/g,e=>te[e])}function we(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 be(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 xe(e,t,n){let{reference:r,floating:o}=e;const i=le(t),a=de(t),c=se(a),s=ie(t),u="y"===i,l=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[c]/2-o[c]/2;let p;switch(s){case"top":p={x:l,y:r.y-o.height};break;case"bottom":p={x:l,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(ae(t)){case"start":p[a]-=f*(n&&u?-1:1);break;case"end":p[a]+=f*(n&&u?-1:1)}return p}async function Ee(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:c,strategy:s}=e,{boundary:u="clippingAncestors",rootBoundary:l="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=oe(t,e),m=we(p),h=c[f?"floating"===d?"reference":"floating":d],g=be(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(c.floating)),boundary:u,rootBoundary:l,strategy:s})),v="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(c.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=be(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:v,offsetParent:y,strategy:s}):v);return{top:(g.top-b.top+m.top)/w.y,bottom:(b.bottom-g.bottom+m.bottom)/w.y,left:(g.left-b.left+m.left)/w.x,right:(b.right-g.right+m.right)/w.x}}function Ce(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Re(e){return Y.some(t=>e[t]>=0)}const _e=new Set(["left","top"]);function Me(){return"undefined"!=typeof window}function Se(e){return Pe(e)?(e.nodeName||"").toLowerCase():"#document"}function De(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Oe(e){var t;return null==(t=(Pe(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Pe(e){return!!Me()&&(e instanceof Node||e instanceof De(e).Node)}function Ae(e){return!!Me()&&(e instanceof Element||e instanceof De(e).Element)}function Te(e){return!!Me()&&(e instanceof HTMLElement||e instanceof De(e).HTMLElement)}function ke(e){return!(!Me()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof De(e).ShadowRoot)}const Ne=new Set(["inline","contents"]);function Le(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ge(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Ne.has(o)}const je=new Set(["table","td","th"]);function Ie(e){return je.has(Se(e))}const Fe=[":popover-open",":modal"];function We(e){return Fe.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const Ke=["transform","translate","scale","rotate","perspective"],Be=["transform","translate","scale","rotate","perspective","filter"],He=["paint","layout","strict","content"];function $e(e){const t=ze(),n=Ae(e)?Ge(e):e;return Ke.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||Be.some(e=>(n.willChange||"").includes(e))||He.some(e=>(n.contain||"").includes(e))}function ze(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Ue=new Set(["html","body","#document"]);function Ve(e){return Ue.has(Se(e))}function Ge(e){return De(e).getComputedStyle(e)}function Xe(e){return Ae(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ye(e){if("html"===Se(e))return e;const t=e.assignedSlot||e.parentNode||ke(e)&&e.host||Oe(e);return ke(t)?t.host:t}function qe(e){const t=Ye(e);return Ve(t)?e.ownerDocument?e.ownerDocument.body:e.body:Te(t)&&Le(t)?t:qe(t)}function Ze(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=qe(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=De(o);if(i){const e=Qe(a);return t.concat(a,a.visualViewport||[],Le(o)?o:[],e&&n?Ze(e):[])}return t.concat(o,Ze(o,[],n))}function Qe(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Je(e){const t=Ge(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Te(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,c=Q(n)!==i||Q(r)!==a;return c&&(n=i,r=a),{width:n,height:r,$:c}}function et(e){return Ae(e)?e:e.contextElement}function tt(e){const t=et(e);if(!Te(t))return ee(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Je(t);let a=(i?Q(n.width):n.width)/r,c=(i?Q(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),c&&Number.isFinite(c)||(c=1),{x:a,y:c}}const nt=ee(0);function rt(e){const t=De(e);return ze()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:nt}function ot(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=et(e);let a=ee(1);t&&(r?Ae(r)&&(a=tt(r)):a=tt(e));const c=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==De(e))&&t}(i,n,r)?rt(i):ee(0);let s=(o.left+c.x)/a.x,u=(o.top+c.y)/a.y,l=o.width/a.x,d=o.height/a.y;if(i){const e=De(i),t=r&&Ae(r)?De(r):r;let n=e,o=Qe(n);for(;o&&r&&t!==n;){const e=tt(o),t=o.getBoundingClientRect(),r=Ge(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,u*=e.y,l*=e.x,d*=e.y,s+=i,u+=a,n=De(o),o=Qe(n)}}return be({width:l,height:d,x:s,y:u})}function it(e,t){const n=Xe(e).scrollLeft;return t?t.left+n:ot(Oe(e)).left+n}function at(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-it(e,n),y:n.top+t.scrollTop}}const ct=new Set(["absolute","fixed"]);function st(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=De(e),r=Oe(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,c=0,s=0;if(o){i=o.width,a=o.height;const e=ze();(!e||e&&"fixed"===t)&&(c=o.offsetLeft,s=o.offsetTop)}const u=it(r);if(u<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-o);a<=25&&(i-=a)}else u<=25&&(i+=u);return{width:i,height:a,x:c,y:s}}(e,n);else if("document"===t)r=function(e){const t=Oe(e),n=Xe(e),r=e.ownerDocument.body,o=Z(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Z(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+it(e);const c=-n.scrollTop;return"rtl"===Ge(r).direction&&(a+=Z(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:c}}(Oe(e));else if(Ae(t))r=function(e,t){const n=ot(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Te(e)?tt(e):ee(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=rt(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return be(r)}function ut(e,t){const n=Ye(e);return!(n===t||!Ae(n)||Ve(n))&&("fixed"===Ge(n).position||ut(n,t))}function lt(e,t,n){const r=Te(t),o=Oe(t),i="fixed"===n,a=ot(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const s=ee(0);function u(){s.x=it(o)}if(r||!r&&!i)if(("body"!==Se(t)||Le(o))&&(c=Xe(t)),r){const e=ot(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&u();i&&!r&&o&&u();const l=!o||r||i?ee(0):at(o,c);return{x:a.left+c.scrollLeft-s.x-l.x,y:a.top+c.scrollTop-s.y-l.y,width:a.width,height:a.height}}function dt(e){return"static"===Ge(e).position}function ft(e,t){if(!Te(e)||"fixed"===Ge(e).position)return null;if(t)return t(e);let n=e.offsetParent;return Oe(e)===n&&(n=n.ownerDocument.body),n}function pt(e,t){const n=De(e);if(We(e))return n;if(!Te(e)){let t=Ye(e);for(;t&&!Ve(t);){if(Ae(t)&&!dt(t))return t;t=Ye(t)}return n}let r=ft(e,t);for(;r&&Ie(r)&&dt(r);)r=ft(r,t);return r&&Ve(r)&&dt(r)&&!$e(r)?n:r||function(e){let t=Ye(e);for(;Te(t)&&!Ve(t);){if($e(t))return t;if(We(t))return null;t=Ye(t)}return null}(e)||n}const mt={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=Oe(r),c=!!t&&We(t.floating);if(r===a||c&&i)return n;let s={scrollLeft:0,scrollTop:0},u=ee(1);const l=ee(0),d=Te(r);if((d||!d&&!i)&&(("body"!==Se(r)||Le(a))&&(s=Xe(r)),Te(r))){const e=ot(r);u=tt(r),l.x=e.x+r.clientLeft,l.y=e.y+r.clientTop}const f=!a||d||i?ee(0):at(a,s);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-s.scrollLeft*u.x+l.x+f.x,y:n.y*u.y-s.scrollTop*u.y+l.y+f.y}},getDocumentElement:Oe,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?We(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Ze(e,[],!1).filter(e=>Ae(e)&&"body"!==Se(e)),o=null;const i="fixed"===Ge(e).position;let a=i?Ye(e):e;for(;Ae(a)&&!Ve(a);){const t=Ge(a),n=$e(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&ct.has(o.position)||Le(a)&&!n&&ut(e,a))?r=r.filter(e=>e!==a):o=t,a=Ye(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=i[0],c=i.reduce((e,n)=>{const r=st(t,n,o);return e.top=Z(r.top,e.top),e.right=q(r.right,e.right),e.bottom=q(r.bottom,e.bottom),e.left=Z(r.left,e.left),e},st(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:pt,getElementRects:async function(e){const t=this.getOffsetParent||pt,n=this.getDimensions,r=await n(e.floating);return{reference:lt(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}=Je(e);return{width:t,height:n}},getScale:tt,isElement:Ae,isRTL:function(e){return"rtl"===Ge(e).direction}};function ht(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function gt(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:c="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,u=et(e),l=o||i?[...u?Ze(u):[],...Ze(t)]:[];l.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const d=u&&c?function(e,t){let n,r=null;const o=Oe(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(c,s){void 0===c&&(c=!1),void 0===s&&(s=1),i();const u=e.getBoundingClientRect(),{left:l,top:d,width:f,height:p}=u;if(c||t(),!f||!p)return;const m={rootMargin:-J(d)+"px "+-J(o.clientWidth-(l+f))+"px "+-J(o.clientHeight-(d+p))+"px "+-J(l)+"px",threshold:Z(0,q(1,s))||1};let h=!0;function g(t){const r=t[0].intersectionRatio;if(r!==s){if(!h)return a();r?a(!1,r):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==r||ht(u,e.getBoundingClientRect())||a(),h=!1}try{r=new IntersectionObserver(g,{...m,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,m)}r.observe(e)}(!0),i}(u,n):null;let f,p=-1,m=null;a&&(m=new ResizeObserver(e=>{let[r]=e;r&&r.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),n()}),u&&!s&&m.observe(u),m.observe(t));let h=s?ot(e):null;return s&&function t(){const r=ot(e);h&&!ht(h,r)&&n();h=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;l.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=m)||e.disconnect(),m=null,s&&cancelAnimationFrame(f)}}const vt=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:c}=t,s=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=ie(n),c=ae(n),s="y"===le(n),u=_e.has(a)?-1:1,l=i&&s?-1:1,d=oe(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return c&&"number"==typeof m&&(p="end"===c?-1*m:m),s?{x:p*l,y:f*u}:{x:f*u,y:p*l}}(t,e);return a===(null==(n=c.offset)?void 0:n.placement)&&null!=(r=c.arrow)&&r.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:a}}}}},yt=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:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=oe(e,t),u={x:n,y:r},l=await Ee(t,s),d=le(ie(o)),f=ce(d);let p=u[f],m=u[d];if(i){const e="y"===f?"bottom":"right";p=re(p+l["y"===f?"top":"left"],p,p-l[e])}if(a){const e="y"===d?"bottom":"right";m=re(m+l["y"===d?"top":"left"],m,m-l[e])}const h=c.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:i,[d]:a}}}}}},wt=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:c,platform:s,elements:u}=t,{mainAxis:l=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...g}=oe(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=ie(o),y=le(c),w=ie(c)===c,b=await(null==s.isRTL?void 0:s.isRTL(u.floating)),x=f||(w||!h?[ye(c)]:function(e){const t=ye(e);return[fe(e),t,fe(t)]}(c)),E="none"!==m;!f&&E&&x.push(...ve(c,h,m,b));const C=[c,...x],R=await Ee(t,g),_=[];let M=(null==(r=i.flip)?void 0:r.overflows)||[];if(l&&_.push(R[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=ae(e),o=de(e),i=se(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=ye(a)),[a,ye(a)]}(o,a,b);_.push(R[e[0]],R[e[1]])}if(M=[...M,{placement:o,overflows:_}],!_.every(e=>e<=0)){var S,D;const e=((null==(S=i.flip)?void 0:S.index)||0)+1,t=C[e];if(t){if(!("alignment"===d&&y!==le(t))||M.every(e=>le(e.placement)!==y||e.overflows[0]>0))return{data:{index:e,overflows:M},reset:{placement:t}}}let n=null==(D=M.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 O;const e=null==(O=M.filter(e=>{if(E){const t=le(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:O[0];e&&(n=e);break}case"initialPlacement":n=c}if(o!==n)return{reset:{placement:n}}}return{}}}},bt=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:c}=t,{apply:s=()=>{},...u}=oe(e,t),l=await Ee(t,u),d=ie(o),f=ae(o),p="y"===le(o),{width:m,height:h}=i.floating;let g,v;"top"===d||"bottom"===d?(g=d,v=f===(await(null==a.isRTL?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(v=d,g="end"===f?"top":"bottom");const y=h-l.top-l.bottom,w=m-l.left-l.right,b=q(h-l[g],y),x=q(m-l[v],w),E=!t.middlewareData.shift;let C=b,R=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(R=w),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(C=y),E&&!f){const e=Z(l.left,0),t=Z(l.right,0),n=Z(l.top,0),r=Z(l.bottom,0);p?R=m-2*(0!==e||0!==t?e+t:Z(l.left,l.right)):C=h-2*(0!==n||0!==r?n+r:Z(l.top,l.bottom))}await s({...t,availableWidth:R,availableHeight:C});const _=await a.getDimensions(c.floating);return m!==_.width||h!==_.height?{reset:{rects:!0}}:{}}}},xt=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=oe(e,t);switch(r){case"referenceHidden":{const e=Ce(await Ee(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Re(e)}}}case"escaped":{const e=Ce(await Ee(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Re(e)}}}default:return{}}}}},Et=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:c,middlewareData:s}=t,{element:u,padding:l=0}=oe(e,t)||{};if(null==u)return{};const d=we(l),f={x:n,y:r},p=de(o),m=se(p),h=await a.getDimensions(u),g="y"===p,v=g?"top":"left",y=g?"bottom":"right",w=g?"clientHeight":"clientWidth",b=i.reference[m]+i.reference[p]-f[p]-i.floating[m],x=f[p]-i.reference[p],E=await(null==a.getOffsetParent?void 0:a.getOffsetParent(u));let C=E?E[w]:0;C&&await(null==a.isElement?void 0:a.isElement(E))||(C=c.floating[w]||i.floating[m]);const R=b/2-x/2,_=C/2-h[m]/2-1,M=q(d[v],_),S=q(d[y],_),D=M,O=C-h[m]-S,P=C/2-h[m]/2+R,A=re(D,P,O),T=!s.arrow&&null!=ae(o)&&P!==A&&i.reference[m]/2-(P<D?M:S)-h[m]/2<0,k=T?P<D?P-D:P-O:0;return{[p]:f[p]+k,data:{[p]:A,centerOffset:P-A-k,...T&&{alignmentOffset:k}},reset:T}}}),Ct=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:c=0,mainAxis:s=!0,crossAxis:u=!0}=oe(e,t),l={x:n,y:r},d=le(o),f=ce(d);let p=l[f],m=l[d];const h=oe(c,t),g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(s){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+g.mainAxis,n=i.reference[f]+i.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(u){var v,y;const e="y"===f?"width":"height",t=_e.has(ie(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(v=a.offset)?void 0:v[d])||0)+(t?0:g.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(y=a.offset)?void 0:y[d])||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},Rt=(e,t,n)=>{const r=new Map,o={platform:mt,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,c=i.filter(Boolean),s=await(null==a.isRTL?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:d}=xe(u,r,s),f=r,p={},m=0;for(let n=0;n<c.length;n++){const{name:i,fn:h}=c[n],{x:g,y:v,data:y,reset:w}=await h({x:l,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:u,platform:a,elements:{reference:e,floating:t}});l=null!=g?g:l,d=null!=v?v:d,p={...p,[i]:{...p[i],...y}},w&&m<=50&&(m++,"object"==typeof w&&(w.placement&&(f=w.placement),w.rects&&(u=!0===w.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),({x:l,y:d}=xe(u,f,s))),n=-1)}return{x:l,y:d,placement:f,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var _t="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 St(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Dt(e,t){const n=St(e);return Math.round(t*n)/n}function Ot(e){const t=i.useRef(e);return _t(()=>{t.current=e}),t}const Pt=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?Et({element:n.current,padding:r}).fn(t):{}:n?Et({element:n,padding:r}).fn(t):{};var o}}),At=(e,t)=>({...vt(e),options:[e,t]}),Tt=(e,t)=>({...yt(e),options:[e,t]}),kt=(e,t)=>({...Ct(e),options:[e,t]}),Nt=(e,t)=>({...wt(e),options:[e,t]}),Lt=(e,t)=>({...bt(e),options:[e,t]}),jt=(e,t)=>({...xt(e),options:[e,t]}),It=(e,t)=>({...Pt(e),options:[e,t]});var Ft=i.forwardRef((e,n)=>{const{children:r,width:o=10,height:i=5,...a}=e;return t.jsx(b.svg,{...a,ref:n,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:t.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ft.displayName="Arrow";var Wt=Ft;var Kt="Popper",[Bt,Ht]=d(Kt),[$t,zt]=Bt(Kt),Ut=e=>{const{__scopePopper:n,children:r}=e,[o,a]=i.useState(null);return t.jsx($t,{scope:n,anchor:o,onAnchorChange:a,children:r})};Ut.displayName=Kt;var Vt="PopperAnchor",Gt=i.forwardRef((e,n)=>{const{__scopePopper:r,virtualRef:o,...a}=e,c=zt(Vt,r),s=i.useRef(null),u=l(n,s),d=i.useRef(null);return i.useEffect(()=>{const e=d.current;d.current=o?.current||s.current,e!==d.current&&c.onAnchorChange(d.current)}),o?null:t.jsx(b.div,{...a,ref:u})});Gt.displayName=Vt;var Xt="PopperContent",[Yt,qt]=Bt(Xt),Zt=i.forwardRef((e,n)=>{const{__scopePopper:r,side:o="bottom",sideOffset:c=0,align:s="center",alignOffset:u=0,arrowPadding:d=0,avoidCollisions:f=!0,collisionBoundary:m=[],collisionPadding:h=0,sticky:g="partial",hideWhenDetached:v=!1,updatePositionStrategy:y="optimized",onPlaced:w,...x}=e,E=zt(Xt,r),[C,R]=i.useState(null),M=l(n,e=>R(e)),[S,D]=i.useState(null),O=function(e){const[t,n]=i.useState(void 0);return p(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}(S),P=O?.width??0,A=O?.height??0,T=o+("center"!==s?"-"+s:""),k="number"==typeof h?h:{top:0,right:0,bottom:0,left:0,...h},N=Array.isArray(m)?m:[m],L=N.length>0,j={padding:k,boundary:N.filter(tn),altBoundary:L},{refs:I,floatingStyles:F,placement:W,isPositioned:K,middlewareData:B}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:c,floating:s}={},transform:u=!0,whileElementsMounted:l,open:d}=e,[f,p]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=i.useState(r);Mt(m,r)||h(r);const[g,v]=i.useState(null),[y,w]=i.useState(null),b=i.useCallback(e=>{e!==R.current&&(R.current=e,v(e))},[]),x=i.useCallback(e=>{e!==_.current&&(_.current=e,w(e))},[]),E=c||g,C=s||y,R=i.useRef(null),_=i.useRef(null),M=i.useRef(f),S=null!=l,D=Ot(l),O=Ot(o),P=Ot(d),A=i.useCallback(()=>{if(!R.current||!_.current)return;const e={placement:t,strategy:n,middleware:m};O.current&&(e.platform=O.current),Rt(R.current,_.current,e).then(e=>{const t={...e,isPositioned:!1!==P.current};T.current&&!Mt(M.current,t)&&(M.current=t,a.flushSync(()=>{p(t)}))})},[m,t,n,O,P]);_t(()=>{!1===d&&M.current.isPositioned&&(M.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[d]);const T=i.useRef(!1);_t(()=>(T.current=!0,()=>{T.current=!1}),[]),_t(()=>{if(E&&(R.current=E),C&&(_.current=C),E&&C){if(D.current)return D.current(E,C,A);A()}},[E,C,A,D,S]);const k=i.useMemo(()=>({reference:R,floating:_,setReference:b,setFloating:x}),[b,x]),N=i.useMemo(()=>({reference:E,floating:C}),[E,C]),L=i.useMemo(()=>{const e={position:n,left:0,top:0};if(!N.floating)return e;const t=Dt(N.floating,f.x),r=Dt(N.floating,f.y);return u?{...e,transform:"translate("+t+"px, "+r+"px)",...St(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,u,N.floating,f.x,f.y]);return i.useMemo(()=>({...f,update:A,refs:k,elements:N,floatingStyles:L}),[f,A,k,N,L])}({strategy:"fixed",placement:T,whileElementsMounted:(...e)=>gt(...e,{animationFrame:"always"===y}),elements:{reference:E.anchor},middleware:[At({mainAxis:c+A,alignmentAxis:u}),f&&Tt({mainAxis:!0,crossAxis:!1,limiter:"partial"===g?kt():void 0,...j}),f&&Nt({...j}),Lt({...j,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&&It({element:S,padding:d}),nn({arrowWidth:P,arrowHeight:A}),v&&jt({strategy:"referenceHidden",...j})]}),[H,$]=rn(W),z=_(w);p(()=>{K&&z?.()},[K,z]);const U=B.arrow?.x,V=B.arrow?.y,G=0!==B.arrow?.centerOffset,[X,Y]=i.useState();return p(()=>{C&&Y(window.getComputedStyle(C).zIndex)},[C]),t.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:K?F.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:e.dir,children:t.jsx(Yt,{scope:r,placedSide:H,onArrowChange:D,arrowX:U,arrowY:V,shouldHideArrow:G,children:t.jsx(b.div,{"data-side":H,"data-align":$,...x,ref:M,style:{...x.style,animation:K?void 0:"none"}})})})});Zt.displayName=Xt;var Qt="PopperArrow",Jt={top:"bottom",right:"left",bottom:"top",left:"right"},en=i.forwardRef(function(e,n){const{__scopePopper:r,...o}=e,i=qt(Qt,r),a=Jt[i.placedSide];return t.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:t.jsx(Wt,{...o,ref:n,style:{...o.style,display:"block"}})})});function tn(e){return null!==e}en.displayName=Qt;var nn=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,c=i?0:e.arrowHeight,[s,u]=rn(n),l={start:"0%",center:"50%",end:"100%"}[u],d=(o.arrow?.x??0)+a/2,f=(o.arrow?.y??0)+c/2;let p="",m="";return"bottom"===s?(p=i?l:`${d}px`,m=-c+"px"):"top"===s?(p=i?l:`${d}px`,m=`${r.floating.height+c}px`):"right"===s?(p=-c+"px",m=i?l:`${f}px`):"left"===s&&(p=`${r.floating.width+c}px`,m=i?l:`${f}px`),{data:{x:p,y:m}}}});function rn(e){const[t,n="center"]=e.split("-");return[t,n]}var on=Ut,an=Gt,cn=Zt,sn=en,un=i.forwardRef((e,r)=>{const{container:o,...a}=e,[c,s]=i.useState(!1);p(()=>s(!0),[]);const u=o||c&&globalThis?.document?.body;return u?n.createPortal(t.jsx(b.div,{...a,ref:r}),u):null});un.displayName="Portal";var ln=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=i.useState(),r=i.useRef(null),o=i.useRef(e),a=i.useRef("none"),c=e?"mounted":"unmounted",[s,u]=function(e,t){return i.useReducer((e,n)=>t[e][n]??e,e)}(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const e=dn(r.current);a.current="mounted"===s?e:"none"},[s]),p(()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=dn(t);if(e)u("MOUNT");else if("none"===i||"none"===t?.display)u("UNMOUNT");else{u(n&&r!==i?"ANIMATION_OUT":"UNMOUNT")}o.current=e}},[e,u]),p(()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=i=>{const a=dn(r.current).includes(CSS.escape(i.animationName));if(i.target===t&&a&&(u("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=dn(r.current))};return t.addEventListener("animationstart",c),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",c),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:i.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}(t),o="function"==typeof n?n({present:r.isPresent}):i.Children.only(n),a=l(r.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}(o));return"function"==typeof n||r.isPresent?i.cloneElement(o,{ref:a}):null};function dn(e){return e?.animationName||"none"}ln.displayName="Presence";var fn="rovingFocusGroup.onEntryFocus",pn={bubbles:!1,cancelable:!0},mn="RovingFocusGroup",[hn,gn,vn]=E(mn),[yn,wn]=d(mn,[vn]),[bn,xn]=yn(mn),En=i.forwardRef((e,n)=>t.jsx(hn.Provider,{scope:e.__scopeRovingFocusGroup,children:t.jsx(hn.Slot,{scope:e.__scopeRovingFocusGroup,children:t.jsx(Cn,{...e,ref:n})})}));En.displayName=mn;var Cn=i.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,orientation:o,loop:a=!1,dir:s,currentTabStopId:u,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:f,onEntryFocus:p,preventScrollOnEntryFocus:m=!1,...g}=e,v=i.useRef(null),y=l(n,v),w=R(s),[x,E]=h({prop:u,defaultProp:d??null,onChange:f,caller:mn}),[C,M]=i.useState(!1),S=_(p),D=gn(r),O=i.useRef(!1),[P,A]=i.useState(0);return i.useEffect(()=>{const e=v.current;if(e)return e.addEventListener(fn,S),()=>e.removeEventListener(fn,S)},[S]),t.jsx(bn,{scope:r,orientation:o,dir:w,loop:a,currentTabStopId:x,onItemFocus:i.useCallback(e=>E(e),[E]),onItemShiftTab:i.useCallback(()=>M(!0),[]),onFocusableItemAdd:i.useCallback(()=>A(e=>e+1),[]),onFocusableItemRemove:i.useCallback(()=>A(e=>e-1),[]),children:t.jsx(b.div,{tabIndex:C||0===P?-1:0,"data-orientation":o,...g,ref:y,style:{outline:"none",...e.style},onMouseDown:c(e.onMouseDown,()=>{O.current=!0}),onFocus:c(e.onFocus,e=>{const t=!O.current;if(e.target===e.currentTarget&&t&&!C){const t=new CustomEvent(fn,pn);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=D().filter(e=>e.focusable);Sn([e.find(e=>e.active),e.find(e=>e.id===x),...e].filter(Boolean).map(e=>e.ref.current),m)}}O.current=!1}),onBlur:c(e.onBlur,()=>M(!1))})})}),Rn="RovingFocusGroupItem",_n=i.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:a=!1,tabStopId:s,children:u,...l}=e,d=X(),f=s||d,p=xn(Rn,r),m=p.currentTabStopId===f,h=gn(r),{onFocusableItemAdd:g,onFocusableItemRemove:v,currentTabStopId:y}=p;return i.useEffect(()=>{if(o)return g(),()=>v()},[o,g,v]),t.jsx(hn.ItemSlot,{scope:r,id:f,focusable:o,active:a,children:t.jsx(b.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...l,ref:n,onMouseDown:c(e.onMouseDown,e=>{o?p.onItemFocus(f):e.preventDefault()}),onFocus:c(e.onFocus,()=>p.onItemFocus(f)),onKeyDown:c(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void p.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:Mn[r]}(e,p.orientation,p.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=h().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=p.loop?(r=i+1,(n=o).map((e,t)=>n[(r+t)%n.length])):o.slice(i+1)}setTimeout(()=>Sn(o))}var n,r}),children:"function"==typeof u?u({isCurrentTabStop:m,hasTabStop:null!=y}):u})})});_n.displayName=Rn;var Mn={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Sn(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 Dn=En,On=_n,Pn=new WeakMap,An=new WeakMap,Tn={},kn=0,Nn=function(e){return e&&(e.host||Nn(e.parentNode))},Ln=function(e,t,n,r){var o=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Nn(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(e){return Boolean(e)})}(t,Array.isArray(e)?e:[e]);Tn[n]||(Tn[n]=new WeakMap);var i=Tn[n],a=[],c=new Set,s=new Set(o),u=function(e){e&&!c.has(e)&&(c.add(e),u(e.parentNode))};o.forEach(u);var l=function(e){e&&!s.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(c.has(e))l(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,s=(Pn.get(e)||0)+1,u=(i.get(e)||0)+1;Pn.set(e,s),i.set(e,u),a.push(e),1===s&&o&&An.set(e,!0),1===u&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return l(t),c.clear(),kn++,function(){a.forEach(function(e){var t=Pn.get(e)-1,o=i.get(e)-1;Pn.set(e,t),i.set(e,o),t||(An.has(e)||e.removeAttribute(r),An.delete(e)),o||e.removeAttribute(n)}),--kn||(Pn=new WeakMap,Pn=new WeakMap,An=new WeakMap,Tn={})}},jn=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], script"))),Ln(r,o,n,"aria-hidden")):function(){return null}},In=function(){return In=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},In.apply(this,arguments)};function Fn(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"==typeof SuppressedError&&SuppressedError;var Wn="right-scroll-bar-position",Kn="width-before-scroll-bar";function Bn(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var Hn="undefined"!=typeof window?i.useLayoutEffect:i.useEffect,$n=new WeakMap;function zn(t,n){var r,o,i,a=(r=null,o=function(e){return t.forEach(function(t){return Bn(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 Hn(function(){var e=$n.get(a);if(e){var n=new Set(e),r=new Set(t),o=a.current;n.forEach(function(e){r.has(e)||Bn(e,null)}),r.forEach(function(e){n.has(e)||Bn(e,o)})}$n.set(a,t)},[t]),a}function Un(e){return e}var Vn=function(e){var t=e.sideCar,n=Fn(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return i.createElement(r,In({},n))};Vn.isSideCarExport=!0;var Gn=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=Un);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=In({async:!0,ssr:!1},e),t}(),Xn=function(){},Yn=i.forwardRef(function(e,t){var n=i.useRef(null),r=i.useState({onScrollCapture:Xn,onWheelCapture:Xn,onTouchMoveCapture:Xn}),o=r[0],a=r[1],c=e.forwardProps,s=e.children,u=e.className,l=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,v=e.allowPinchZoom,y=e.as,w=void 0===y?"div":y,b=e.gapMode,x=Fn(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=p,C=zn([n,t]),R=In(In({},x),o);return i.createElement(i.Fragment,null,d&&i.createElement(E,{sideCar:Gn,removeScrollBar:l,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!v,lockRef:n,gapMode:b}),c?i.cloneElement(i.Children.only(s),In(In({},R),{ref:C})):i.createElement(w,In({},R,{className:u,ref:C}),s))});Yn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Yn.classNames={fullWidth:Kn,zeroRight:Wn};function qn(){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 Zn=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=qn())&&(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)}}},Qn=function(){var e,t=(e=Zn(),function(t,n){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},Jn={left:0,top:0,right:0,gap:0},er=function(e){return parseInt(e||"",10)||0},tr=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Jn;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[er(n),er(r),er(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])}},nr=Qn(),rr="data-scroll-locked",or=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,c=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(c,"px ").concat(r,";\n }\n body[").concat(rr,"] {\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(c,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Wn," {\n right: ").concat(c,"px ").concat(r,";\n }\n \n .").concat(Kn," {\n margin-right: ").concat(c,"px ").concat(r,";\n }\n \n .").concat(Wn," .").concat(Wn," {\n right: 0 ").concat(r,";\n }\n \n .").concat(Kn," .").concat(Kn," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(rr,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(c,"px;\n }\n")},ir=function(){var e=parseInt(document.body.getAttribute(rr)||"0",10);return isFinite(e)?e:0},ar=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;i.useEffect(function(){return document.body.setAttribute(rr,(ir()+1).toString()),function(){var e=ir()-1;e<=0?document.body.removeAttribute(rr):document.body.setAttribute(rr,e.toString())}},[]);var a=i.useMemo(function(){return tr(o)},[o]);return i.createElement(nr,{styles:or(a,!t,o,n?"":"!important")})},cr=!1;if("undefined"!=typeof window)try{var sr=Object.defineProperty({},"passive",{get:function(){return cr=!0,!0}});window.addEventListener("test",sr,sr),window.removeEventListener("test",sr,sr)}catch(e){cr=!1}var ur=!!cr&&{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])},dr=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),fr(e,r)){var o=pr(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},fr=function(e,t){return"v"===e?function(e){return lr(e,"overflowY")}(t):function(e){return lr(e,"overflowX")}(t)},pr=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},mr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},hr=function(e){return[e.deltaX,e.deltaY]},gr=function(e){return e&&"current"in e?e.current:e},vr=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},yr=0,wr=[];function br(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var xr,Er=(xr=function(e){var t=i.useRef([]),n=i.useRef([0,0]),r=i.useRef(),o=i.useState(yr++)[0],a=i.useState(Qn)[0],c=i.useRef(e);i.useEffect(function(){c.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=function(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))}([e.lockRef.current],(e.shards||[]).map(gr),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=i.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!c.current.allowPinchZoom;var o,i=mr(e),a=n.current,s="deltaX"in e?e.deltaX:a[0]-i[0],u="deltaY"in e?e.deltaY:a[1]-i[1],l=e.target,d=Math.abs(s)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===l.type)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===l||p.contains(l)))return!1;var m=dr(d,l);if(!m)return!0;if(m?o=d:(o="v"===d?"h":"v",m=dr(d,l)),!m)return!1;if(!r.current&&"changedTouches"in e&&(s||u)&&(r.current=o),!o)return!0;var h=r.current||o;return function(e,t,n,r){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),i=o*r,a=n.target,c=t.contains(a),s=!1,u=i>0,l=0,d=0;do{if(!a)break;var f=pr(e,a),p=f[0],m=f[1]-f[2]-o*p;(p||m)&&fr(e,a)&&(l+=m,d+=p);var h=a.parentNode;a=h&&h.nodeType===Node.DOCUMENT_FRAGMENT_NODE?h.host:h}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(u&&Math.abs(l)<1||!u&&Math.abs(d)<1)&&(s=!0),s}(h,t,e,"h"===h?s:u)},[]),u=i.useCallback(function(e){var n=e;if(wr.length&&wr[wr.length-1]===a){var r="deltaY"in n?hr(n):mr(n),o=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&(t=e.delta,o=r,t[0]===o[0]&&t[1]===o[1]);var t,o})[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var i=(c.current.shards||[]).map(gr).filter(Boolean).filter(function(e){return e.contains(n.target)});(i.length>0?s(n,i[0]):!c.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=i.useCallback(function(e,n,r,o){var i={name:e,delta:n,target:r,should:o,shadowParent:br(r)};t.current.push(i),setTimeout(function(){t.current=t.current.filter(function(e){return e!==i})},1)},[]),d=i.useCallback(function(e){n.current=mr(e),r.current=void 0},[]),f=i.useCallback(function(t){l(t.type,hr(t),t.target,s(t,e.lockRef.current))},[]),p=i.useCallback(function(t){l(t.type,mr(t),t.target,s(t,e.lockRef.current))},[]);i.useEffect(function(){return wr.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",u,ur),document.addEventListener("touchmove",u,ur),document.addEventListener("touchstart",d,ur),function(){wr=wr.filter(function(e){return e!==a}),document.removeEventListener("wheel",u,ur),document.removeEventListener("touchmove",u,ur),document.removeEventListener("touchstart",d,ur)}},[]);var m=e.removeScrollBar,h=e.inert;return i.createElement(i.Fragment,null,h?i.createElement(a,{styles:vr(o)}):null,m?i.createElement(ar,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},Gn.useMedium(xr),Vn),Cr=i.forwardRef(function(e,t){return i.createElement(Yn,In({},e,{ref:t,sideCar:Er}))});Cr.classNames=Yn.classNames;var Rr=["Enter"," "],_r=["ArrowUp","PageDown","End"],Mr=["ArrowDown","PageUp","Home",..._r],Sr={ltr:[...Rr,"ArrowRight"],rtl:[...Rr,"ArrowLeft"]},Dr={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Or="Menu",[Pr,Ar,Tr]=E(Or),[kr,Nr]=d(Or,[Tr,Ht,wn]),Lr=Ht(),jr=wn(),[Ir,Fr]=kr(Or),[Wr,Kr]=kr(Or),Br=e=>{const{__scopeMenu:n,open:r=!1,children:o,dir:a,onOpenChange:c,modal:s=!0}=e,u=Lr(n),[l,d]=i.useState(null),f=i.useRef(!1),p=_(c),m=R(a);return i.useEffect(()=>{const e=()=>{f.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>f.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})}},[]),t.jsx(on,{...u,children:t.jsx(Ir,{scope:n,open:r,onOpenChange:p,content:l,onContentChange:d,children:t.jsx(Wr,{scope:n,onClose:i.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:m,modal:s,children:o})})})};Br.displayName=Or;var Hr=i.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e,i=Lr(r);return t.jsx(an,{...i,...o,ref:n})});Hr.displayName="MenuAnchor";var $r="MenuPortal",[zr,Ur]=kr($r,{forceMount:void 0}),Vr=e=>{const{__scopeMenu:n,forceMount:r,children:o,container:i}=e,a=Fr($r,n);return t.jsx(zr,{scope:n,forceMount:r,children:t.jsx(ln,{present:r||a.open,children:t.jsx(un,{asChild:!0,container:i,children:o})})})};Vr.displayName=$r;var Gr="MenuContent",[Xr,Yr]=kr(Gr),qr=i.forwardRef((e,n)=>{const r=Ur(Gr,e.__scopeMenu),{forceMount:o=r.forceMount,...i}=e,a=Fr(Gr,e.__scopeMenu),c=Kr(Gr,e.__scopeMenu);return t.jsx(Pr.Provider,{scope:e.__scopeMenu,children:t.jsx(ln,{present:o||a.open,children:t.jsx(Pr.Slot,{scope:e.__scopeMenu,children:c.modal?t.jsx(Zr,{...i,ref:n}):t.jsx(Qr,{...i,ref:n})})})})}),Zr=i.forwardRef((e,n)=>{const r=Fr(Gr,e.__scopeMenu),o=i.useRef(null),a=l(n,o);return i.useEffect(()=>{const e=o.current;if(e)return jn(e)},[]),t.jsx(eo,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:c(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),Qr=i.forwardRef((e,n)=>{const r=Fr(Gr,e.__scopeMenu);return t.jsx(eo,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),Jr=g("MenuContent.ScrollLock"),eo=i.forwardRef((e,n)=>{const{__scopeMenu:r,loop:o=!1,trapFocus:a,onOpenAutoFocus:s,onCloseAutoFocus:u,disableOutsidePointerEvents:d,onEntryFocus:f,onEscapeKeyDown:p,onPointerDownOutside:m,onFocusOutside:h,onInteractOutside:g,onDismiss:v,disableOutsideScroll:y,...w}=e,b=Fr(Gr,r),x=Kr(Gr,r),E=Lr(r),C=jr(r),R=Ar(r),[_,M]=i.useState(null),S=i.useRef(null),D=l(n,S,b.onContentChange),O=i.useRef(0),P=i.useRef(""),T=i.useRef(0),k=i.useRef(null),j=i.useRef("right"),I=i.useRef(0),F=y?Cr:i.Fragment,K=y?{as:Jr,allowPinchZoom:!0}:void 0,B=e=>{const t=P.current+e,n=R().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=(c=e,s=Math.max(i,0),c.map((e,t)=>c[(s+t)%c.length]));var c,s;1===o.length&&(a=a.filter(e=>e!==n));const u=a.find(e=>e.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}(n.map(e=>e.textValue),t,o),a=n.find(e=>e.textValue===i)?.ref.current;!function e(t){P.current=t,window.clearTimeout(O.current),""!==t&&(O.current=window.setTimeout(()=>e(""),1e3))}(t),a&&setTimeout(()=>a.focus())};i.useEffect(()=>()=>window.clearTimeout(O.current),[]),i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??L()),document.body.insertAdjacentElement("beforeend",e[1]??L()),N++,()=>{1===N&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),N--}},[]);const H=i.useCallback(e=>j.current===k.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 e=0,i=t.length-1;e<t.length;i=e++){const a=t[e],c=t[i],s=a.x,u=a.y,l=c.x,d=c.y;u>r!=d>r&&n<(l-s)*(r-u)/(d-u)+s&&(o=!o)}return o}(n,t)}(e,k.current?.area),[]);return t.jsx(Xr,{scope:r,searchRef:P,onItemEnter:i.useCallback(e=>{H(e)&&e.preventDefault()},[H]),onItemLeave:i.useCallback(e=>{H(e)||(S.current?.focus(),M(null))},[H]),onTriggerLeave:i.useCallback(e=>{H(e)&&e.preventDefault()},[H]),pointerGraceTimerRef:T,onPointerGraceIntentChange:i.useCallback(e=>{k.current=e},[]),children:t.jsx(F,{...K,children:t.jsx(W,{asChild:!0,trapped:a,onMountAutoFocus:c(s,e=>{e.preventDefault(),S.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:t.jsx(A,{asChild:!0,disableOutsidePointerEvents:d,onEscapeKeyDown:p,onPointerDownOutside:m,onFocusOutside:h,onInteractOutside:g,onDismiss:v,children:t.jsx(Dn,{asChild:!0,...C,dir:x.dir,orientation:"vertical",loop:o,currentTabStopId:_,onCurrentTabStopIdChange:M,onEntryFocus:c(f,e=>{x.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:t.jsx(cn,{role:"menu","aria-orientation":"vertical","data-state":So(b.open),"data-radix-menu-content":"",dir:x.dir,...E,...w,ref:D,style:{outline:"none",...w.style},onKeyDown:c(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&&B(e.key));const o=S.current;if(e.target!==o)return;if(!Mr.includes(e.key))return;e.preventDefault();const i=R().filter(e=>!e.disabled).map(e=>e.ref.current);_r.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:c(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(O.current),P.current="")}),onPointerMove:c(e.onPointerMove,Po(e=>{const t=e.target,n=I.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>I.current?"right":"left";j.current=t,I.current=e.clientX}}))})})})})})})});qr.displayName=Gr;var to=i.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e;return t.jsx(b.div,{role:"group",...o,ref:n})});to.displayName="MenuGroup";var no=i.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e;return t.jsx(b.div,{...o,ref:n})});no.displayName="MenuLabel";var ro="MenuItem",oo="menu.itemSelect",io=i.forwardRef((e,n)=>{const{disabled:r=!1,onSelect:o,...a}=e,s=i.useRef(null),u=Kr(ro,e.__scopeMenu),d=Yr(ro,e.__scopeMenu),f=l(n,s),p=i.useRef(!1);return t.jsx(ao,{...a,ref:f,disabled:r,onClick:c(e.onClick,()=>{const e=s.current;if(!r&&e){const t=new CustomEvent(oo,{bubbles:!0,cancelable:!0});e.addEventListener(oo,e=>o?.(e),{once:!0}),x(e,t),t.defaultPrevented?p.current=!1:u.onClose()}}),onPointerDown:t=>{e.onPointerDown?.(t),p.current=!0},onPointerUp:c(e.onPointerUp,e=>{p.current||e.currentTarget?.click()}),onKeyDown:c(e.onKeyDown,e=>{const t=""!==d.searchRef.current;r||t&&" "===e.key||Rr.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});io.displayName=ro;var ao=i.forwardRef((e,n)=>{const{__scopeMenu:r,disabled:o=!1,textValue:a,...s}=e,u=Yr(ro,r),d=jr(r),f=i.useRef(null),p=l(n,f),[m,h]=i.useState(!1),[g,v]=i.useState("");return i.useEffect(()=>{const e=f.current;e&&v((e.textContent??"").trim())},[s.children]),t.jsx(Pr.ItemSlot,{scope:r,disabled:o,textValue:a??g,children:t.jsx(On,{asChild:!0,...d,focusable:!o,children:t.jsx(b.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:p,onPointerMove:c(e.onPointerMove,Po(e=>{if(o)u.onItemLeave(e);else if(u.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}})),onPointerLeave:c(e.onPointerLeave,Po(e=>u.onItemLeave(e))),onFocus:c(e.onFocus,()=>h(!0)),onBlur:c(e.onBlur,()=>h(!1))})})})}),co=i.forwardRef((e,n)=>{const{checked:r=!1,onCheckedChange:o,...i}=e;return t.jsx(go,{scope:e.__scopeMenu,checked:r,children:t.jsx(io,{role:"menuitemcheckbox","aria-checked":Do(r)?"mixed":r,...i,ref:n,"data-state":Oo(r),onSelect:c(i.onSelect,()=>o?.(!!Do(r)||!r),{checkForDefaultPrevented:!1})})})});co.displayName="MenuCheckboxItem";var so="MenuRadioGroup",[uo,lo]=kr(so,{value:void 0,onValueChange:()=>{}}),fo=i.forwardRef((e,n)=>{const{value:r,onValueChange:o,...i}=e,a=_(o);return t.jsx(uo,{scope:e.__scopeMenu,value:r,onValueChange:a,children:t.jsx(to,{...i,ref:n})})});fo.displayName=so;var po="MenuRadioItem",mo=i.forwardRef((e,n)=>{const{value:r,...o}=e,i=lo(po,e.__scopeMenu),a=r===i.value;return t.jsx(go,{scope:e.__scopeMenu,checked:a,children:t.jsx(io,{role:"menuitemradio","aria-checked":a,...o,ref:n,"data-state":Oo(a),onSelect:c(o.onSelect,()=>i.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});mo.displayName=po;var ho="MenuItemIndicator",[go,vo]=kr(ho,{checked:!1}),yo=i.forwardRef((e,n)=>{const{__scopeMenu:r,forceMount:o,...i}=e,a=vo(ho,r);return t.jsx(ln,{present:o||Do(a.checked)||!0===a.checked,children:t.jsx(b.span,{...i,ref:n,"data-state":Oo(a.checked)})})});yo.displayName=ho;var wo=i.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e;return t.jsx(b.div,{role:"separator","aria-orientation":"horizontal",...o,ref:n})});wo.displayName="MenuSeparator";var bo=i.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e,i=Lr(r);return t.jsx(sn,{...i,...o,ref:n})});bo.displayName="MenuArrow";var[xo,Eo]=kr("MenuSub"),Co="MenuSubTrigger",Ro=i.forwardRef((e,n)=>{const r=Fr(Co,e.__scopeMenu),o=Kr(Co,e.__scopeMenu),a=Eo(Co,e.__scopeMenu),s=Yr(Co,e.__scopeMenu),l=i.useRef(null),{pointerGraceTimerRef:d,onPointerGraceIntentChange:f}=s,p={__scopeMenu:e.__scopeMenu},m=i.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return i.useEffect(()=>m,[m]),i.useEffect(()=>{const e=d.current;return()=>{window.clearTimeout(e),f(null)}},[d,f]),t.jsx(Hr,{asChild:!0,...p,children:t.jsx(ao,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":a.contentId,"data-state":So(r.open),...e,ref:u(n,a.onTriggerChange),onClick:t=>{e.onClick?.(t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:c(e.onPointerMove,Po(t=>{s.onItemEnter(t),t.defaultPrevented||e.disabled||r.open||l.current||(s.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{r.onOpenChange(!0),m()},100))})),onPointerLeave:c(e.onPointerLeave,Po(e=>{m();const t=r.content?.getBoundingClientRect();if(t){const n=r.content?.dataset.side,o="right"===n,i=o?-5:5,a=t[o?"left":"right"],c=t[o?"right":"left"];s.onPointerGraceIntentChange({area:[{x:e.clientX+i,y:e.clientY},{x:a,y:t.top},{x:c,y:t.top},{x:c,y:t.bottom},{x:a,y:t.bottom}],side:n}),window.clearTimeout(d.current),d.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(e),e.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:c(e.onKeyDown,t=>{const n=""!==s.searchRef.current;e.disabled||n&&" "===t.key||Sr[o.dir].includes(t.key)&&(r.onOpenChange(!0),r.content?.focus(),t.preventDefault())})})})});Ro.displayName=Co;var _o="MenuSubContent",Mo=i.forwardRef((e,n)=>{const r=Ur(Gr,e.__scopeMenu),{forceMount:o=r.forceMount,...a}=e,s=Fr(Gr,e.__scopeMenu),u=Kr(Gr,e.__scopeMenu),d=Eo(_o,e.__scopeMenu),f=i.useRef(null),p=l(n,f);return t.jsx(Pr.Provider,{scope:e.__scopeMenu,children:t.jsx(ln,{present:o||s.open,children:t.jsx(Pr.Slot,{scope:e.__scopeMenu,children:t.jsx(eo,{id:d.contentId,"aria-labelledby":d.triggerId,...a,ref:p,align:"start",side:"rtl"===u.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{u.isUsingKeyboardRef.current&&f.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:c(e.onFocusOutside,e=>{e.target!==d.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:c(e.onEscapeKeyDown,e=>{u.onClose(),e.preventDefault()}),onKeyDown:c(e.onKeyDown,e=>{const t=e.currentTarget.contains(e.target),n=Dr[u.dir].includes(e.key);t&&n&&(s.onOpenChange(!1),d.trigger?.focus(),e.preventDefault())})})})})})});function So(e){return e?"open":"closed"}function Do(e){return"indeterminate"===e}function Oo(e){return Do(e)?"indeterminate":e?"checked":"unchecked"}function Po(e){return t=>"mouse"===t.pointerType?e(t):void 0}Mo.displayName=_o;var Ao=Br,To=Hr,ko=Vr,No=qr,Lo=to,jo=no,Io=io,Fo=co,Wo=fo,Ko=mo,Bo=yo,Ho=wo,$o=bo,zo=Ro,Uo=Mo,Vo="DropdownMenu",[Go,Xo]=d(Vo,[Nr]),Yo=Nr(),[qo,Zo]=Go(Vo),Qo=e=>{const{__scopeDropdownMenu:n,children:r,dir:o,open:a,defaultOpen:c,onOpenChange:s,modal:u=!0}=e,l=Yo(n),d=i.useRef(null),[f,p]=h({prop:a,defaultProp:c??!1,onChange:s,caller:Vo});return t.jsx(qo,{scope:n,triggerId:X(),triggerRef:d,contentId:X(),open:f,onOpenChange:p,onOpenToggle:i.useCallback(()=>p(e=>!e),[p]),modal:u,children:t.jsx(Ao,{...l,open:f,onOpenChange:p,dir:o,modal:u,children:r})})};Qo.displayName=Vo;var Jo="DropdownMenuTrigger",ei=i.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,disabled:o=!1,...i}=e,a=Zo(Jo,r),s=Yo(r);return t.jsx(To,{asChild:!0,...s,children:t.jsx(b.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...i,ref:u(n,a.triggerRef),onPointerDown:c(e.onPointerDown,e=>{o||0!==e.button||!1!==e.ctrlKey||(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:c(e.onKeyDown,e=>{o||(["Enter"," "].includes(e.key)&&a.onOpenToggle(),"ArrowDown"===e.key&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});ei.displayName=Jo;var ti=e=>{const{__scopeDropdownMenu:n,...r}=e,o=Yo(n);return t.jsx(ko,{...o,...r})};ti.displayName="DropdownMenuPortal";var ni="DropdownMenuContent",ri=i.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,a=Zo(ni,r),s=Yo(r),u=i.useRef(!1);return t.jsx(No,{id:a.contentId,"aria-labelledby":a.triggerId,...s,...o,ref:n,onCloseAutoFocus:c(e.onCloseAutoFocus,e=>{u.current||a.triggerRef.current?.focus(),u.current=!1,e.preventDefault()}),onInteractOutside:c(e.onInteractOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;a.modal&&!r||(u.current=!0)}),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)"}})});ri.displayName=ni;i.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=Yo(r);return t.jsx(Lo,{...i,...o,ref:n})}).displayName="DropdownMenuGroup";i.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=Yo(r);return t.jsx(jo,{...i,...o,ref:n})}).displayName="DropdownMenuLabel";var oi=i.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=Yo(r);return t.jsx(Io,{...i,...o,ref:n})});oi.displayName="DropdownMenuItem";i.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=Yo(r);return t.jsx(Fo,{...i,...o,ref:n})}).displayName="DropdownMenuCheckboxItem";i.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=Yo(r);return t.jsx(Wo,{...i,...o,ref:n})}).displayName="DropdownMenuRadioGroup";i.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=Yo(r);return t.jsx(Ko,{...i,...o,ref:n})}).displayName="DropdownMenuRadioItem";i.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=Yo(r);return t.jsx(Bo,{...i,...o,ref:n})}).displayName="DropdownMenuItemIndicator";i.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=Yo(r);return t.jsx(Ho,{...i,...o,ref:n})}).displayName="DropdownMenuSeparator";i.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=Yo(r);return t.jsx($o,{...i,...o,ref:n})}).displayName="DropdownMenuArrow";i.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=Yo(r);return t.jsx(zo,{...i,...o,ref:n})}).displayName="DropdownMenuSubTrigger";i.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=Yo(r);return t.jsx(Uo,{...i,...o,ref:n,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)"}})}).displayName="DropdownMenuSubContent";var ii=Qo,ai=ei,ci=ti,si=ri,ui=oi;var li={trigger:"OverflowMenu-module_trigger__imdPK",menu:"OverflowMenu-module_menu__n8uKD",dotsWrapper:"OverflowMenu-module_dotsWrapper__CHO9Q",dot:"OverflowMenu-module_dot__g5Rgi"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".OverflowMenu-module_menuWrapper__psD7a{display:inline-block;position:relative;z-index:0}.OverflowMenu-module_trigger__imdPK{align-items:center;background:transparent;border:none;border-radius:50%;color:#024b59;cursor:pointer;display:flex;font-size:1.8rem;height:3rem;justify-content:center;transition:color .2s ease,background-color .2s ease;width:3rem}.OverflowMenu-module_trigger__imdPK:focus,.OverflowMenu-module_trigger__imdPK:hover{background-color:rgba(2,75,89,.05);color:#016a80;outline:none}.OverflowMenu-module_menu__n8uKD{backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);background:hsla(0,0%,100%,.75);border:1px solid #016a80;border-radius:12px;box-shadow:0 8px 24px rgba(0,0,0,.12);color:#024b59;display:flex;flex-direction:column;font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif;font-weight:500;gap:.35rem;min-width:180px;padding:.5rem .25rem;width:max-content;z-index:9999}.OverflowMenu-module_menu__n8uKD button{background:transparent;border:none;border-bottom:1px solid rgba(2,75,89,.1);border-radius:8px;color:#024b59;cursor:pointer;font-size:1rem;padding:.6rem 1rem;text-align:left;transition:background .25s ease,transform .12s ease;user-select:none}.OverflowMenu-module_menu__n8uKD button:last-child{border-bottom:none}.OverflowMenu-module_menu__n8uKD button:focus,.OverflowMenu-module_menu__n8uKD button:hover{background:rgba(2,75,89,.05);outline:none;transform:scale(1.03)}.OverflowMenu-module_menu__n8uKD button:active{background:rgba(2,75,89,.1);transform:scale(.98)}.OverflowMenu-module_dotsWrapper__CHO9Q{align-items:center;display:flex;flex-direction:column;gap:3px;justify-content:center}.OverflowMenu-module_dot__g5Rgi{background-color:currentColor;border-radius:50%;display:block;height:5px;width:5px}");const di=()=>{const t={initial:{y:0,scale:1},hover:{y:-4,scale:1.2,transition:{type:"spring",stiffness:500,damping:20}},rest:{y:0,scale:1,transition:{type:"spring",stiffness:500,damping:20}}};return e.createElement(r.motion.div,{className:li.dotsWrapper,initial:"rest",whileHover:"hover",animate:"rest"},[0,1,2].map(n=>e.createElement(r.motion.span,{key:n,className:li.dot,variants:t,custom:n,transition:{delay:.05*n}})))};module.exports=({items:t,icon:n,className:o="",portal:i=null})=>{const[a,c]=e.useState(!1),s={hidden:{opacity:0,y:-10},visible:{opacity:1,y:0}},u=e.createElement(r.AnimatePresence,null,a&&e.createElement(ci,{container:i,forceMount:!0},e.createElement(si,{asChild:!0,className:li.menu,sideOffset:5,align:"end"},e.createElement(r.motion.div,{variants:{hidden:{opacity:0,scale:.95,transition:{duration:.1}},visible:{opacity:1,scale:1,transition:{duration:.2,staggerChildren:.05}}},initial:"hidden",animate:"visible",exit:"hidden"},t.map((t,n)=>e.createElement(ui,{key:n,asChild:!0,className:li.menuItem,onSelect:()=>{var e;null===(e=t.onClick)||void 0===e||e.call(t)}},e.createElement(r.motion.button,{variants:s},t.content)))))));return e.createElement(ii,{open:a,onOpenChange:c},e.createElement(ai,{asChild:!0,className:`${li.trigger} ${o}`},e.createElement(r.motion.button,{"aria-haspopup":"true","aria-expanded":a,whileHover:{scale:1.1,y:-2,color:"#016a80",backgroundColor:"rgba(2, 75, 89, 0.05)",transition:{type:"spring",stiffness:400,damping:15}}},n||e.createElement(di,null))),u)};
|
|
1
|
+
"use strict";var e=require("react"),t=require("react/jsx-runtime"),n=require("react-dom"),r=require("framer-motion");function o(e){var t=Object.create(null);return e&&Object.keys(e).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}}),t.default=e,Object.freeze(t)}var i=o(e),a=o(n);function c(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(e?.(r),!1===n||!r.defaultPrevented)return t?.(r)}}function s(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function u(...e){return t=>{let n=!1;const r=e.map(e=>{const r=s(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():s(e[t],null)}}}}function l(...e){return i.useCallback(u(...e),e)}function d(e,n=[]){let r=[];const o=()=>{const t=r.map(e=>i.createContext(e));return function(n){const r=n?.[e]||t;return i.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])}};return o.scopeName=e,[function(n,o){const a=i.createContext(o),c=r.length;r=[...r,o];const s=n=>{const{scope:r,children:o,...s}=n,u=r?.[e]?.[c]||a,l=i.useMemo(()=>s,Object.values(s));return t.jsx(u.Provider,{value:l,children:o})};return s.displayName=n+"Provider",[s,function(t,r){const s=r?.[e]?.[c]||a,u=i.useContext(s);if(u)return u;if(void 0!==o)return o;throw new Error(`\`${t}\` must be used within \`${n}\``)}]},f(o,...n)]}function f(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){const r=n.reduce((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]}),{});return i.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])}};return n.scopeName=t.scopeName,n}var p=globalThis?.document?i.useLayoutEffect:()=>{},m=i[" useInsertionEffect ".trim().toString()]||p;function h({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,c]=function({defaultProp:e,onChange:t}){const[n,r]=i.useState(e),o=i.useRef(n),a=i.useRef(t);return m(()=>{a.current=t},[t]),i.useEffect(()=>{o.current!==n&&(a.current?.(n),o.current=n)},[n,o]),[n,r,a]}({defaultProp:t,onChange:n}),s=void 0!==e,u=s?e:o;{const t=i.useRef(void 0!==e);i.useEffect(()=>{const e=t.current;if(e!==s){const t=e?"controlled":"uncontrolled",n=s?"controlled":"uncontrolled";console.warn(`${r} is changing from ${t} to ${n}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`)}t.current=s},[s,r])}const l=i.useCallback(t=>{if(s){const n=function(e){return"function"==typeof e}(t)?t(e):t;n!==e&&c.current?.(n)}else a(t)},[s,e,a,c]);return[u,l]}function g(e){const n=v(e),r=i.forwardRef((e,r)=>{const{children:o,...a}=e,c=i.Children.toArray(o),s=c.find(w);if(s){const e=s.props.children,o=c.map(t=>t===s?i.Children.count(e)>1?i.Children.only(null):i.isValidElement(e)?e.props.children:null:t);return t.jsx(n,{...a,ref:r,children:i.isValidElement(e)?i.cloneElement(e,void 0,o):null})}return t.jsx(n,{...a,ref:r,children:o})});return r.displayName=`${e}.Slot`,r}function v(e){const t=i.forwardRef((e,t)=>{const{children:n,...r}=e;if(i.isValidElement(n)){const e=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}(n),o=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}}(r,n.props);return n.type!==i.Fragment&&(o.ref=t?u(t,e):e),i.cloneElement(n,o)}return i.Children.count(n)>1?i.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var y=Symbol("radix.slottable");function w(e){return i.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===y}var b=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,n)=>{const r=g(`Primitive.${n}`),o=i.forwardRef((e,o)=>{const{asChild:i,...a}=e,c=i?r:n;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),t.jsx(c,{...a,ref:o})});return o.displayName=`Primitive.${n}`,{...e,[n]:o}},{});function x(e,t){e&&a.flushSync(()=>e.dispatchEvent(t))}function E(n){const r=n+"CollectionProvider",[o,i]=d(r),[a,c]=o(r,{collectionRef:{current:null},itemMap:new Map}),s=n=>{const{scope:r,children:o}=n,i=e.useRef(null),c=e.useRef(new Map).current;return t.jsx(a,{scope:r,itemMap:c,collectionRef:i,children:o})};s.displayName=r;const u=n+"CollectionSlot",f=g(u),p=e.forwardRef((e,n)=>{const{scope:r,children:o}=e,i=l(n,c(u,r).collectionRef);return t.jsx(f,{ref:i,children:o})});p.displayName=u;const m=n+"CollectionItemSlot",h="data-radix-collection-item",v=g(m),y=e.forwardRef((n,r)=>{const{scope:o,children:i,...a}=n,s=e.useRef(null),u=l(r,s),d=c(m,o);return e.useEffect(()=>(d.itemMap.set(s,{ref:s,...a}),()=>{d.itemMap.delete(s)})),t.jsx(v,{[h]:"",ref:u,children:i})});return y.displayName=m,[{Provider:s,Slot:p,ItemSlot:y},function(t){const r=c(n+"CollectionConsumer",t);return e.useCallback(()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${h}]`));return Array.from(r.itemMap.values()).sort((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current))},[r.collectionRef,r.itemMap])},i]}var C=i.createContext(void 0);function _(e){const t=i.useContext(C);return e||t||"ltr"}function R(e){const t=i.useRef(e);return i.useEffect(()=>{t.current=e}),i.useMemo(()=>(...e)=>t.current?.(...e),[])}var M,S="dismissableLayer.update",O="dismissableLayer.pointerDownOutside",D="dismissableLayer.focusOutside",P=i.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),T=i.forwardRef((e,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:a,onFocusOutside:s,onInteractOutside:u,onDismiss:d,...f}=e,p=i.useContext(P),[m,h]=i.useState(null),g=m?.ownerDocument??globalThis?.document,[,v]=i.useState({}),y=l(n,e=>h(e)),w=Array.from(p.layers),[x]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),E=w.indexOf(x),C=m?w.indexOf(m):-1,_=p.layersWithOutsidePointerEventsDisabled.size>0,T=C>=E,N=function(e,t=globalThis?.document){const n=R(e),r=i.useRef(!1),o=i.useRef(()=>{});return i.useEffect(()=>{const e=e=>{if(e.target&&!r.current){let r=function(){k(O,n,i,{discrete:!0})};const i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",e)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}(e=>{const t=e.target,n=[...p.branches].some(e=>e.contains(t));T&&!n&&(a?.(e),u?.(e),e.defaultPrevented||d?.())},g),j=function(e,t=globalThis?.document){const n=R(e),r=i.useRef(!1);return i.useEffect(()=>{const e=e=>{if(e.target&&!r.current){k(D,n,{originalEvent:e},{discrete:!1})}};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}(e=>{const t=e.target;[...p.branches].some(e=>e.contains(t))||(s?.(e),u?.(e),e.defaultPrevented||d?.())},g);return function(e,t=globalThis?.document){const n=R(e);i.useEffect(()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})},[n,t])}(e=>{C===p.layers.size-1&&(o?.(e),!e.defaultPrevented&&d&&(e.preventDefault(),d()))},g),i.useEffect(()=>{if(m)return r&&(0===p.layersWithOutsidePointerEventsDisabled.size&&(M=g.body.style.pointerEvents,g.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(m)),p.layers.add(m),A(),()=>{r&&1===p.layersWithOutsidePointerEventsDisabled.size&&(g.body.style.pointerEvents=M)}},[m,g,r,p]),i.useEffect(()=>()=>{m&&(p.layers.delete(m),p.layersWithOutsidePointerEventsDisabled.delete(m),A())},[m,p]),i.useEffect(()=>{const e=()=>v({});return document.addEventListener(S,e),()=>document.removeEventListener(S,e)},[]),t.jsx(b.div,{...f,ref:y,style:{pointerEvents:_?T?"auto":"none":void 0,...e.style},onFocusCapture:c(e.onFocusCapture,j.onFocusCapture),onBlurCapture:c(e.onBlurCapture,j.onBlurCapture),onPointerDownCapture:c(e.onPointerDownCapture,N.onPointerDownCapture)})});T.displayName="DismissableLayer";function A(){const e=new CustomEvent(S);document.dispatchEvent(e)}function k(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?x(o,i):o.dispatchEvent(i)}i.forwardRef((e,n)=>{const r=i.useContext(P),o=i.useRef(null),a=l(n,o);return i.useEffect(()=>{const e=o.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}},[r.branches]),t.jsx(b.div,{...e,ref:a})}).displayName="DismissableLayerBranch";var N=0;function j(){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 L="focusScope.autoFocusOnMount",I="focusScope.autoFocusOnUnmount",F={bubbles:!1,cancelable:!0},W=i.forwardRef((e,n)=>{const{loop:r=!1,trapped:o=!1,onMountAutoFocus:a,onUnmountAutoFocus:c,...s}=e,[u,d]=i.useState(null),f=R(a),p=R(c),m=i.useRef(null),h=l(n,e=>d(e)),g=i.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;i.useEffect(()=>{if(o){let e=function(e){if(g.paused||!u)return;const t=e.target;u.contains(t)?m.current=t:z(m.current,{select:!0})},t=function(e){if(g.paused||!u)return;const t=e.relatedTarget;null!==t&&(u.contains(t)||z(m.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&z(u)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return u&&r.observe(u,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}},[o,u,g.paused]),i.useEffect(()=>{if(u){$.add(g);const t=document.activeElement;if(!u.contains(t)){const n=new CustomEvent(L,F);u.addEventListener(L,f),u.dispatchEvent(n),n.defaultPrevented||(!function(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(z(r,{select:t}),document.activeElement!==n)return}((e=K(u),e.filter(e=>"A"!==e.tagName)),{select:!0}),document.activeElement===t&&z(u))}return()=>{u.removeEventListener(L,f),setTimeout(()=>{const e=new CustomEvent(I,F);u.addEventListener(I,p),u.dispatchEvent(e),e.defaultPrevented||z(t??document.body,{select:!0}),u.removeEventListener(I,p),$.remove(g)},0)}}var e},[u,f,p,g]);const v=i.useCallback(e=>{if(!r&&!o)return;if(g.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=K(e),n=B(t,e),r=B(t.reverse(),e);return[n,r]}(t);o&&i?e.shiftKey||n!==i?e.shiftKey&&n===o&&(e.preventDefault(),r&&z(i,{select:!0})):(e.preventDefault(),r&&z(o,{select:!0})):n===t&&e.preventDefault()}},[r,o,g.paused]);return t.jsx(b.div,{tabIndex:-1,...s,ref:h,onKeyDown:v})});function K(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 B(e,t){for(const n of e)if(!H(n,{upTo:t}))return n}function H(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 z(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()}}W.displayName="FocusScope";var $=function(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=U(e,t),e.unshift(t)},remove(t){e=U(e,t),e[0]?.resume()}}}();function U(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}var V=i[" useId ".trim().toString()]||(()=>{}),G=0;function Y(e){const[t,n]=i.useState(V());return p(()=>{n(e=>e??String(G++))},[e]),e||(t?`radix-${t}`:"")}const X=["top","right","bottom","left"],q=Math.min,Z=Math.max,Q=Math.round,J=Math.floor,ee=e=>({x:e,y:e}),te={left:"right",right:"left",bottom:"top",top:"bottom"},ne={start:"end",end:"start"};function re(e,t,n){return Z(e,q(t,n))}function oe(e,t){return"function"==typeof e?e(t):e}function ie(e){return e.split("-")[0]}function ae(e){return e.split("-")[1]}function ce(e){return"x"===e?"y":"x"}function se(e){return"y"===e?"height":"width"}const ue=new Set(["top","bottom"]);function le(e){return ue.has(ie(e))?"y":"x"}function de(e){return ce(le(e))}function fe(e){return e.replace(/start|end/g,e=>ne[e])}const pe=["left","right"],me=["right","left"],he=["top","bottom"],ge=["bottom","top"];function ve(e,t,n,r){const o=ae(e);let i=function(e,t,n){switch(e){case"top":case"bottom":return n?t?me:pe:t?pe:me;case"left":case"right":return t?he:ge;default:return[]}}(ie(e),"start"===n,r);return o&&(i=i.map(e=>e+"-"+o),t&&(i=i.concat(i.map(fe)))),i}function ye(e){return e.replace(/left|right|bottom|top/g,e=>te[e])}function we(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 be(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 xe(e,t,n){let{reference:r,floating:o}=e;const i=le(t),a=de(t),c=se(a),s=ie(t),u="y"===i,l=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[c]/2-o[c]/2;let p;switch(s){case"top":p={x:l,y:r.y-o.height};break;case"bottom":p={x:l,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(ae(t)){case"start":p[a]-=f*(n&&u?-1:1);break;case"end":p[a]+=f*(n&&u?-1:1)}return p}async function Ee(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:c,strategy:s}=e,{boundary:u="clippingAncestors",rootBoundary:l="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=oe(t,e),m=we(p),h=c[f?"floating"===d?"reference":"floating":d],g=be(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(c.floating)),boundary:u,rootBoundary:l,strategy:s})),v="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(c.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=be(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:v,offsetParent:y,strategy:s}):v);return{top:(g.top-b.top+m.top)/w.y,bottom:(b.bottom-g.bottom+m.bottom)/w.y,left:(g.left-b.left+m.left)/w.x,right:(b.right-g.right+m.right)/w.x}}function Ce(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function _e(e){return X.some(t=>e[t]>=0)}const Re=new Set(["left","top"]);function Me(){return"undefined"!=typeof window}function Se(e){return Pe(e)?(e.nodeName||"").toLowerCase():"#document"}function Oe(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function De(e){var t;return null==(t=(Pe(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Pe(e){return!!Me()&&(e instanceof Node||e instanceof Oe(e).Node)}function Te(e){return!!Me()&&(e instanceof Element||e instanceof Oe(e).Element)}function Ae(e){return!!Me()&&(e instanceof HTMLElement||e instanceof Oe(e).HTMLElement)}function ke(e){return!(!Me()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof Oe(e).ShadowRoot)}const Ne=new Set(["inline","contents"]);function je(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Ge(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Ne.has(o)}const Le=new Set(["table","td","th"]);function Ie(e){return Le.has(Se(e))}const Fe=[":popover-open",":modal"];function We(e){return Fe.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const Ke=["transform","translate","scale","rotate","perspective"],Be=["transform","translate","scale","rotate","perspective","filter"],He=["paint","layout","strict","content"];function ze(e){const t=$e(),n=Te(e)?Ge(e):e;return Ke.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||Be.some(e=>(n.willChange||"").includes(e))||He.some(e=>(n.contain||"").includes(e))}function $e(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Ue=new Set(["html","body","#document"]);function Ve(e){return Ue.has(Se(e))}function Ge(e){return Oe(e).getComputedStyle(e)}function Ye(e){return Te(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Xe(e){if("html"===Se(e))return e;const t=e.assignedSlot||e.parentNode||ke(e)&&e.host||De(e);return ke(t)?t.host:t}function qe(e){const t=Xe(e);return Ve(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ae(t)&&je(t)?t:qe(t)}function Ze(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=qe(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=Oe(o);if(i){const e=Qe(a);return t.concat(a,a.visualViewport||[],je(o)?o:[],e&&n?Ze(e):[])}return t.concat(o,Ze(o,[],n))}function Qe(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Je(e){const t=Ge(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ae(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,c=Q(n)!==i||Q(r)!==a;return c&&(n=i,r=a),{width:n,height:r,$:c}}function et(e){return Te(e)?e:e.contextElement}function tt(e){const t=et(e);if(!Ae(t))return ee(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Je(t);let a=(i?Q(n.width):n.width)/r,c=(i?Q(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),c&&Number.isFinite(c)||(c=1),{x:a,y:c}}const nt=ee(0);function rt(e){const t=Oe(e);return $e()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:nt}function ot(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=et(e);let a=ee(1);t&&(r?Te(r)&&(a=tt(r)):a=tt(e));const c=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Oe(e))&&t}(i,n,r)?rt(i):ee(0);let s=(o.left+c.x)/a.x,u=(o.top+c.y)/a.y,l=o.width/a.x,d=o.height/a.y;if(i){const e=Oe(i),t=r&&Te(r)?Oe(r):r;let n=e,o=Qe(n);for(;o&&r&&t!==n;){const e=tt(o),t=o.getBoundingClientRect(),r=Ge(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,u*=e.y,l*=e.x,d*=e.y,s+=i,u+=a,n=Oe(o),o=Qe(n)}}return be({width:l,height:d,x:s,y:u})}function it(e,t){const n=Ye(e).scrollLeft;return t?t.left+n:ot(De(e)).left+n}function at(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-it(e,n),y:n.top+t.scrollTop}}const ct=new Set(["absolute","fixed"]);function st(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=Oe(e),r=De(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,c=0,s=0;if(o){i=o.width,a=o.height;const e=$e();(!e||e&&"fixed"===t)&&(c=o.offsetLeft,s=o.offsetTop)}const u=it(r);if(u<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,a=Math.abs(r.clientWidth-t.clientWidth-o);a<=25&&(i-=a)}else u<=25&&(i+=u);return{width:i,height:a,x:c,y:s}}(e,n);else if("document"===t)r=function(e){const t=De(e),n=Ye(e),r=e.ownerDocument.body,o=Z(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Z(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+it(e);const c=-n.scrollTop;return"rtl"===Ge(r).direction&&(a+=Z(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:c}}(De(e));else if(Te(t))r=function(e,t){const n=ot(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=Ae(e)?tt(e):ee(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=rt(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return be(r)}function ut(e,t){const n=Xe(e);return!(n===t||!Te(n)||Ve(n))&&("fixed"===Ge(n).position||ut(n,t))}function lt(e,t,n){const r=Ae(t),o=De(t),i="fixed"===n,a=ot(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const s=ee(0);function u(){s.x=it(o)}if(r||!r&&!i)if(("body"!==Se(t)||je(o))&&(c=Ye(t)),r){const e=ot(t,!0,i,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&u();i&&!r&&o&&u();const l=!o||r||i?ee(0):at(o,c);return{x:a.left+c.scrollLeft-s.x-l.x,y:a.top+c.scrollTop-s.y-l.y,width:a.width,height:a.height}}function dt(e){return"static"===Ge(e).position}function ft(e,t){if(!Ae(e)||"fixed"===Ge(e).position)return null;if(t)return t(e);let n=e.offsetParent;return De(e)===n&&(n=n.ownerDocument.body),n}function pt(e,t){const n=Oe(e);if(We(e))return n;if(!Ae(e)){let t=Xe(e);for(;t&&!Ve(t);){if(Te(t)&&!dt(t))return t;t=Xe(t)}return n}let r=ft(e,t);for(;r&&Ie(r)&&dt(r);)r=ft(r,t);return r&&Ve(r)&&dt(r)&&!ze(r)?n:r||function(e){let t=Xe(e);for(;Ae(t)&&!Ve(t);){if(ze(t))return t;if(We(t))return null;t=Xe(t)}return null}(e)||n}const mt={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,a=De(r),c=!!t&&We(t.floating);if(r===a||c&&i)return n;let s={scrollLeft:0,scrollTop:0},u=ee(1);const l=ee(0),d=Ae(r);if((d||!d&&!i)&&(("body"!==Se(r)||je(a))&&(s=Ye(r)),Ae(r))){const e=ot(r);u=tt(r),l.x=e.x+r.clientLeft,l.y=e.y+r.clientTop}const f=!a||d||i?ee(0):at(a,s);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-s.scrollLeft*u.x+l.x+f.x,y:n.y*u.y-s.scrollTop*u.y+l.y+f.y}},getDocumentElement:De,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?We(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Ze(e,[],!1).filter(e=>Te(e)&&"body"!==Se(e)),o=null;const i="fixed"===Ge(e).position;let a=i?Xe(e):e;for(;Te(a)&&!Ve(a);){const t=Ge(a),n=ze(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&ct.has(o.position)||je(a)&&!n&&ut(e,a))?r=r.filter(e=>e!==a):o=t,a=Xe(a)}return t.set(e,r),r}(t,this._c):[].concat(n),r],a=i[0],c=i.reduce((e,n)=>{const r=st(t,n,o);return e.top=Z(r.top,e.top),e.right=q(r.right,e.right),e.bottom=q(r.bottom,e.bottom),e.left=Z(r.left,e.left),e},st(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:pt,getElementRects:async function(e){const t=this.getOffsetParent||pt,n=this.getDimensions,r=await n(e.floating);return{reference:lt(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}=Je(e);return{width:t,height:n}},getScale:tt,isElement:Te,isRTL:function(e){return"rtl"===Ge(e).direction}};function ht(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function gt(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:c="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,u=et(e),l=o||i?[...u?Ze(u):[],...Ze(t)]:[];l.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const d=u&&c?function(e,t){let n,r=null;const o=De(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(c,s){void 0===c&&(c=!1),void 0===s&&(s=1),i();const u=e.getBoundingClientRect(),{left:l,top:d,width:f,height:p}=u;if(c||t(),!f||!p)return;const m={rootMargin:-J(d)+"px "+-J(o.clientWidth-(l+f))+"px "+-J(o.clientHeight-(d+p))+"px "+-J(l)+"px",threshold:Z(0,q(1,s))||1};let h=!0;function g(t){const r=t[0].intersectionRatio;if(r!==s){if(!h)return a();r?a(!1,r):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==r||ht(u,e.getBoundingClientRect())||a(),h=!1}try{r=new IntersectionObserver(g,{...m,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(g,m)}r.observe(e)}(!0),i}(u,n):null;let f,p=-1,m=null;a&&(m=new ResizeObserver(e=>{let[r]=e;r&&r.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),n()}),u&&!s&&m.observe(u),m.observe(t));let h=s?ot(e):null;return s&&function t(){const r=ot(e);h&&!ht(h,r)&&n();h=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;l.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=m)||e.disconnect(),m=null,s&&cancelAnimationFrame(f)}}const vt=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:c}=t,s=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=ie(n),c=ae(n),s="y"===le(n),u=Re.has(a)?-1:1,l=i&&s?-1:1,d=oe(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return c&&"number"==typeof m&&(p="end"===c?-1*m:m),s?{x:p*l,y:f*u}:{x:f*u,y:p*l}}(t,e);return a===(null==(n=c.offset)?void 0:n.placement)&&null!=(r=c.arrow)&&r.alignmentOffset?{}:{x:o+s.x,y:i+s.y,data:{...s,placement:a}}}}},yt=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:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...s}=oe(e,t),u={x:n,y:r},l=await Ee(t,s),d=le(ie(o)),f=ce(d);let p=u[f],m=u[d];if(i){const e="y"===f?"bottom":"right";p=re(p+l["y"===f?"top":"left"],p,p-l[e])}if(a){const e="y"===d?"bottom":"right";m=re(m+l["y"===d?"top":"left"],m,m-l[e])}const h=c.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:i,[d]:a}}}}}},wt=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:c,platform:s,elements:u}=t,{mainAxis:l=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...g}=oe(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=ie(o),y=le(c),w=ie(c)===c,b=await(null==s.isRTL?void 0:s.isRTL(u.floating)),x=f||(w||!h?[ye(c)]:function(e){const t=ye(e);return[fe(e),t,fe(t)]}(c)),E="none"!==m;!f&&E&&x.push(...ve(c,h,m,b));const C=[c,...x],_=await Ee(t,g),R=[];let M=(null==(r=i.flip)?void 0:r.overflows)||[];if(l&&R.push(_[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=ae(e),o=de(e),i=se(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=ye(a)),[a,ye(a)]}(o,a,b);R.push(_[e[0]],_[e[1]])}if(M=[...M,{placement:o,overflows:R}],!R.every(e=>e<=0)){var S,O;const e=((null==(S=i.flip)?void 0:S.index)||0)+1,t=C[e];if(t){if(!("alignment"===d&&y!==le(t))||M.every(e=>le(e.placement)!==y||e.overflows[0]>0))return{data:{index:e,overflows:M},reset:{placement:t}}}let n=null==(O=M.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:O.placement;if(!n)switch(p){case"bestFit":{var D;const e=null==(D=M.filter(e=>{if(E){const t=le(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:D[0];e&&(n=e);break}case"initialPlacement":n=c}if(o!==n)return{reset:{placement:n}}}return{}}}},bt=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:c}=t,{apply:s=()=>{},...u}=oe(e,t),l=await Ee(t,u),d=ie(o),f=ae(o),p="y"===le(o),{width:m,height:h}=i.floating;let g,v;"top"===d||"bottom"===d?(g=d,v=f===(await(null==a.isRTL?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(v=d,g="end"===f?"top":"bottom");const y=h-l.top-l.bottom,w=m-l.left-l.right,b=q(h-l[g],y),x=q(m-l[v],w),E=!t.middlewareData.shift;let C=b,_=x;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(_=w),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(C=y),E&&!f){const e=Z(l.left,0),t=Z(l.right,0),n=Z(l.top,0),r=Z(l.bottom,0);p?_=m-2*(0!==e||0!==t?e+t:Z(l.left,l.right)):C=h-2*(0!==n||0!==r?n+r:Z(l.top,l.bottom))}await s({...t,availableWidth:_,availableHeight:C});const R=await a.getDimensions(c.floating);return m!==R.width||h!==R.height?{reset:{rects:!0}}:{}}}},xt=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=oe(e,t);switch(r){case"referenceHidden":{const e=Ce(await Ee(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:_e(e)}}}case"escaped":{const e=Ce(await Ee(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:_e(e)}}}default:return{}}}}},Et=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:c,middlewareData:s}=t,{element:u,padding:l=0}=oe(e,t)||{};if(null==u)return{};const d=we(l),f={x:n,y:r},p=de(o),m=se(p),h=await a.getDimensions(u),g="y"===p,v=g?"top":"left",y=g?"bottom":"right",w=g?"clientHeight":"clientWidth",b=i.reference[m]+i.reference[p]-f[p]-i.floating[m],x=f[p]-i.reference[p],E=await(null==a.getOffsetParent?void 0:a.getOffsetParent(u));let C=E?E[w]:0;C&&await(null==a.isElement?void 0:a.isElement(E))||(C=c.floating[w]||i.floating[m]);const _=b/2-x/2,R=C/2-h[m]/2-1,M=q(d[v],R),S=q(d[y],R),O=M,D=C-h[m]-S,P=C/2-h[m]/2+_,T=re(O,P,D),A=!s.arrow&&null!=ae(o)&&P!==T&&i.reference[m]/2-(P<O?M:S)-h[m]/2<0,k=A?P<O?P-O:P-D:0;return{[p]:f[p]+k,data:{[p]:T,centerOffset:P-T-k,...A&&{alignmentOffset:k}},reset:A}}}),Ct=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:c=0,mainAxis:s=!0,crossAxis:u=!0}=oe(e,t),l={x:n,y:r},d=le(o),f=ce(d);let p=l[f],m=l[d];const h=oe(c,t),g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(s){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+g.mainAxis,n=i.reference[f]+i.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(u){var v,y;const e="y"===f?"width":"height",t=Re.has(ie(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(v=a.offset)?void 0:v[d])||0)+(t?0:g.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(y=a.offset)?void 0:y[d])||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},_t=(e,t,n)=>{const r=new Map,o={platform:mt,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,c=i.filter(Boolean),s=await(null==a.isRTL?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:d}=xe(u,r,s),f=r,p={},m=0;for(let n=0;n<c.length;n++){const{name:i,fn:h}=c[n],{x:g,y:v,data:y,reset:w}=await h({x:l,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:u,platform:a,elements:{reference:e,floating:t}});l=null!=g?g:l,d=null!=v?v:d,p={...p,[i]:{...p[i],...y}},w&&m<=50&&(m++,"object"==typeof w&&(w.placement&&(f=w.placement),w.rects&&(u=!0===w.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):w.rects),({x:l,y:d}=xe(u,f,s))),n=-1)}return{x:l,y:d,placement:f,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var Rt="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 St(e){if("undefined"==typeof window)return 1;return(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ot(e,t){const n=St(e);return Math.round(t*n)/n}function Dt(e){const t=i.useRef(e);return Rt(()=>{t.current=e}),t}const Pt=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?Et({element:n.current,padding:r}).fn(t):{}:n?Et({element:n,padding:r}).fn(t):{};var o}}),Tt=(e,t)=>({...vt(e),options:[e,t]}),At=(e,t)=>({...yt(e),options:[e,t]}),kt=(e,t)=>({...Ct(e),options:[e,t]}),Nt=(e,t)=>({...wt(e),options:[e,t]}),jt=(e,t)=>({...bt(e),options:[e,t]}),Lt=(e,t)=>({...xt(e),options:[e,t]}),It=(e,t)=>({...Pt(e),options:[e,t]});var Ft=i.forwardRef((e,n)=>{const{children:r,width:o=10,height:i=5,...a}=e;return t.jsx(b.svg,{...a,ref:n,width:o,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:t.jsx("polygon",{points:"0,0 30,0 15,10"})})});Ft.displayName="Arrow";var Wt=Ft;var Kt="Popper",[Bt,Ht]=d(Kt),[zt,$t]=Bt(Kt),Ut=e=>{const{__scopePopper:n,children:r}=e,[o,a]=i.useState(null);return t.jsx(zt,{scope:n,anchor:o,onAnchorChange:a,children:r})};Ut.displayName=Kt;var Vt="PopperAnchor",Gt=i.forwardRef((e,n)=>{const{__scopePopper:r,virtualRef:o,...a}=e,c=$t(Vt,r),s=i.useRef(null),u=l(n,s),d=i.useRef(null);return i.useEffect(()=>{const e=d.current;d.current=o?.current||s.current,e!==d.current&&c.onAnchorChange(d.current)}),o?null:t.jsx(b.div,{...a,ref:u})});Gt.displayName=Vt;var Yt="PopperContent",[Xt,qt]=Bt(Yt),Zt=i.forwardRef((e,n)=>{const{__scopePopper:r,side:o="bottom",sideOffset:c=0,align:s="center",alignOffset:u=0,arrowPadding:d=0,avoidCollisions:f=!0,collisionBoundary:m=[],collisionPadding:h=0,sticky:g="partial",hideWhenDetached:v=!1,updatePositionStrategy:y="optimized",onPlaced:w,...x}=e,E=$t(Yt,r),[C,_]=i.useState(null),M=l(n,e=>_(e)),[S,O]=i.useState(null),D=function(e){const[t,n]=i.useState(void 0);return p(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver(t=>{if(!Array.isArray(t))return;if(!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})});return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)},[e]),t}(S),P=D?.width??0,T=D?.height??0,A=o+("center"!==s?"-"+s:""),k="number"==typeof h?h:{top:0,right:0,bottom:0,left:0,...h},N=Array.isArray(m)?m:[m],j=N.length>0,L={padding:k,boundary:N.filter(tn),altBoundary:j},{refs:I,floatingStyles:F,placement:W,isPositioned:K,middlewareData:B}=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:c,floating:s}={},transform:u=!0,whileElementsMounted:l,open:d}=e,[f,p]=i.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=i.useState(r);Mt(m,r)||h(r);const[g,v]=i.useState(null),[y,w]=i.useState(null),b=i.useCallback(e=>{e!==_.current&&(_.current=e,v(e))},[]),x=i.useCallback(e=>{e!==R.current&&(R.current=e,w(e))},[]),E=c||g,C=s||y,_=i.useRef(null),R=i.useRef(null),M=i.useRef(f),S=null!=l,O=Dt(l),D=Dt(o),P=Dt(d),T=i.useCallback(()=>{if(!_.current||!R.current)return;const e={placement:t,strategy:n,middleware:m};D.current&&(e.platform=D.current),_t(_.current,R.current,e).then(e=>{const t={...e,isPositioned:!1!==P.current};A.current&&!Mt(M.current,t)&&(M.current=t,a.flushSync(()=>{p(t)}))})},[m,t,n,D,P]);Rt(()=>{!1===d&&M.current.isPositioned&&(M.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[d]);const A=i.useRef(!1);Rt(()=>(A.current=!0,()=>{A.current=!1}),[]),Rt(()=>{if(E&&(_.current=E),C&&(R.current=C),E&&C){if(O.current)return O.current(E,C,T);T()}},[E,C,T,O,S]);const k=i.useMemo(()=>({reference:_,floating:R,setReference:b,setFloating:x}),[b,x]),N=i.useMemo(()=>({reference:E,floating:C}),[E,C]),j=i.useMemo(()=>{const e={position:n,left:0,top:0};if(!N.floating)return e;const t=Ot(N.floating,f.x),r=Ot(N.floating,f.y);return u?{...e,transform:"translate("+t+"px, "+r+"px)",...St(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,u,N.floating,f.x,f.y]);return i.useMemo(()=>({...f,update:T,refs:k,elements:N,floatingStyles:j}),[f,T,k,N,j])}({strategy:"fixed",placement:A,whileElementsMounted:(...e)=>gt(...e,{animationFrame:"always"===y}),elements:{reference:E.anchor},middleware:[Tt({mainAxis:c+T,alignmentAxis:u}),f&&At({mainAxis:!0,crossAxis:!1,limiter:"partial"===g?kt():void 0,...L}),f&&Nt({...L}),jt({...L,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&&It({element:S,padding:d}),nn({arrowWidth:P,arrowHeight:T}),v&&Lt({strategy:"referenceHidden",...L})]}),[H,z]=rn(W),$=R(w);p(()=>{K&&$?.()},[K,$]);const U=B.arrow?.x,V=B.arrow?.y,G=0!==B.arrow?.centerOffset,[Y,X]=i.useState();return p(()=>{C&&X(window.getComputedStyle(C).zIndex)},[C]),t.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{...F,transform:K?F.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Y,"--radix-popper-transform-origin":[B.transformOrigin?.x,B.transformOrigin?.y].join(" "),...B.hide?.referenceHidden&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:t.jsx(Xt,{scope:r,placedSide:H,onArrowChange:O,arrowX:U,arrowY:V,shouldHideArrow:G,children:t.jsx(b.div,{"data-side":H,"data-align":z,...x,ref:M,style:{...x.style,animation:K?void 0:"none"}})})})});Zt.displayName=Yt;var Qt="PopperArrow",Jt={top:"bottom",right:"left",bottom:"top",left:"right"},en=i.forwardRef(function(e,n){const{__scopePopper:r,...o}=e,i=qt(Qt,r),a=Jt[i.placedSide];return t.jsx("span",{ref:i.onArrowChange,style:{position:"absolute",left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[i.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[i.placedSide],visibility:i.shouldHideArrow?"hidden":void 0},children:t.jsx(Wt,{...o,ref:n,style:{...o.style,display:"block"}})})});function tn(e){return null!==e}en.displayName=Qt;var nn=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,c=i?0:e.arrowHeight,[s,u]=rn(n),l={start:"0%",center:"50%",end:"100%"}[u],d=(o.arrow?.x??0)+a/2,f=(o.arrow?.y??0)+c/2;let p="",m="";return"bottom"===s?(p=i?l:`${d}px`,m=-c+"px"):"top"===s?(p=i?l:`${d}px`,m=`${r.floating.height+c}px`):"right"===s?(p=-c+"px",m=i?l:`${f}px`):"left"===s&&(p=`${r.floating.width+c}px`,m=i?l:`${f}px`),{data:{x:p,y:m}}}});function rn(e){const[t,n="center"]=e.split("-");return[t,n]}var on=Ut,an=Gt,cn=Zt,sn=en,un=i.forwardRef((e,r)=>{const{container:o,...a}=e,[c,s]=i.useState(!1);p(()=>s(!0),[]);const u=o||c&&globalThis?.document?.body;return u?n.createPortal(t.jsx(b.div,{...a,ref:r}),u):null});un.displayName="Portal";var ln=e=>{const{present:t,children:n}=e,r=function(e){const[t,n]=i.useState(),r=i.useRef(null),o=i.useRef(e),a=i.useRef("none"),c=e?"mounted":"unmounted",[s,u]=function(e,t){return i.useReducer((e,n)=>t[e][n]??e,e)}(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect(()=>{const e=dn(r.current);a.current="mounted"===s?e:"none"},[s]),p(()=>{const t=r.current,n=o.current;if(n!==e){const r=a.current,i=dn(t);if(e)u("MOUNT");else if("none"===i||"none"===t?.display)u("UNMOUNT");else{u(n&&r!==i?"ANIMATION_OUT":"UNMOUNT")}o.current=e}},[e,u]),p(()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=i=>{const a=dn(r.current).includes(CSS.escape(i.animationName));if(i.target===t&&a&&(u("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout(()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)})}},c=e=>{e.target===t&&(a.current=dn(r.current))};return t.addEventListener("animationstart",c),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",c),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}u("ANIMATION_END")},[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:i.useCallback(e=>{r.current=e?getComputedStyle(e):null,n(e)},[])}}(t),o="function"==typeof n?n({present:r.isPresent}):i.Children.only(n),a=l(r.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}(o));return"function"==typeof n||r.isPresent?i.cloneElement(o,{ref:a}):null};function dn(e){return e?.animationName||"none"}ln.displayName="Presence";var fn="rovingFocusGroup.onEntryFocus",pn={bubbles:!1,cancelable:!0},mn="RovingFocusGroup",[hn,gn,vn]=E(mn),[yn,wn]=d(mn,[vn]),[bn,xn]=yn(mn),En=i.forwardRef((e,n)=>t.jsx(hn.Provider,{scope:e.__scopeRovingFocusGroup,children:t.jsx(hn.Slot,{scope:e.__scopeRovingFocusGroup,children:t.jsx(Cn,{...e,ref:n})})}));En.displayName=mn;var Cn=i.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,orientation:o,loop:a=!1,dir:s,currentTabStopId:u,defaultCurrentTabStopId:d,onCurrentTabStopIdChange:f,onEntryFocus:p,preventScrollOnEntryFocus:m=!1,...g}=e,v=i.useRef(null),y=l(n,v),w=_(s),[x,E]=h({prop:u,defaultProp:d??null,onChange:f,caller:mn}),[C,M]=i.useState(!1),S=R(p),O=gn(r),D=i.useRef(!1),[P,T]=i.useState(0);return i.useEffect(()=>{const e=v.current;if(e)return e.addEventListener(fn,S),()=>e.removeEventListener(fn,S)},[S]),t.jsx(bn,{scope:r,orientation:o,dir:w,loop:a,currentTabStopId:x,onItemFocus:i.useCallback(e=>E(e),[E]),onItemShiftTab:i.useCallback(()=>M(!0),[]),onFocusableItemAdd:i.useCallback(()=>T(e=>e+1),[]),onFocusableItemRemove:i.useCallback(()=>T(e=>e-1),[]),children:t.jsx(b.div,{tabIndex:C||0===P?-1:0,"data-orientation":o,...g,ref:y,style:{outline:"none",...e.style},onMouseDown:c(e.onMouseDown,()=>{D.current=!0}),onFocus:c(e.onFocus,e=>{const t=!D.current;if(e.target===e.currentTarget&&t&&!C){const t=new CustomEvent(fn,pn);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=O().filter(e=>e.focusable);Sn([e.find(e=>e.active),e.find(e=>e.id===x),...e].filter(Boolean).map(e=>e.ref.current),m)}}D.current=!1}),onBlur:c(e.onBlur,()=>M(!1))})})}),_n="RovingFocusGroupItem",Rn=i.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,focusable:o=!0,active:a=!1,tabStopId:s,children:u,...l}=e,d=Y(),f=s||d,p=xn(_n,r),m=p.currentTabStopId===f,h=gn(r),{onFocusableItemAdd:g,onFocusableItemRemove:v,currentTabStopId:y}=p;return i.useEffect(()=>{if(o)return g(),()=>v()},[o,g,v]),t.jsx(hn.ItemSlot,{scope:r,id:f,focusable:o,active:a,children:t.jsx(b.span,{tabIndex:m?0:-1,"data-orientation":p.orientation,...l,ref:n,onMouseDown:c(e.onMouseDown,e=>{o?p.onItemFocus(f):e.preventDefault()}),onFocus:c(e.onFocus,()=>p.onItemFocus(f)),onKeyDown:c(e.onKeyDown,e=>{if("Tab"===e.key&&e.shiftKey)return void p.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:Mn[r]}(e,p.orientation,p.dir);if(void 0!==t){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let o=h().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=p.loop?(r=i+1,(n=o).map((e,t)=>n[(r+t)%n.length])):o.slice(i+1)}setTimeout(()=>Sn(o))}var n,r}),children:"function"==typeof u?u({isCurrentTabStop:m,hasTabStop:null!=y}):u})})});Rn.displayName=_n;var Mn={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Sn(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 On=En,Dn=Rn,Pn=new WeakMap,Tn=new WeakMap,An={},kn=0,Nn=function(e){return e&&(e.host||Nn(e.parentNode))},jn=function(e,t,n,r){var o=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Nn(t);return n&&e.contains(n)?n:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(e){return Boolean(e)})}(t,Array.isArray(e)?e:[e]);An[n]||(An[n]=new WeakMap);var i=An[n],a=[],c=new Set,s=new Set(o),u=function(e){e&&!c.has(e)&&(c.add(e),u(e.parentNode))};o.forEach(u);var l=function(e){e&&!s.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(c.has(e))l(e);else try{var t=e.getAttribute(r),o=null!==t&&"false"!==t,s=(Pn.get(e)||0)+1,u=(i.get(e)||0)+1;Pn.set(e,s),i.set(e,u),a.push(e),1===s&&o&&Tn.set(e,!0),1===u&&e.setAttribute(n,"true"),o||e.setAttribute(r,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}})};return l(t),c.clear(),kn++,function(){a.forEach(function(e){var t=Pn.get(e)-1,o=i.get(e)-1;Pn.set(e,t),i.set(e,o),t||(Tn.has(e)||e.removeAttribute(r),Tn.delete(e)),o||e.removeAttribute(n)}),--kn||(Pn=new WeakMap,Pn=new WeakMap,Tn=new WeakMap,An={})}},Ln=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], script"))),jn(r,o,n,"aria-hidden")):function(){return null}},In=function(){return In=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},In.apply(this,arguments)};function Fn(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"==typeof SuppressedError&&SuppressedError;var Wn="right-scroll-bar-position",Kn="width-before-scroll-bar";function Bn(e,t){return"function"==typeof e?e(t):e&&(e.current=t),e}var Hn="undefined"!=typeof window?i.useLayoutEffect:i.useEffect,zn=new WeakMap;function $n(t,n){var r,o,i,a=(r=null,o=function(e){return t.forEach(function(t){return Bn(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 Hn(function(){var e=zn.get(a);if(e){var n=new Set(e),r=new Set(t),o=a.current;n.forEach(function(e){r.has(e)||Bn(e,null)}),r.forEach(function(e){n.has(e)||Bn(e,o)})}zn.set(a,t)},[t]),a}function Un(e){return e}var Vn=function(e){var t=e.sideCar,n=Fn(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return i.createElement(r,In({},n))};Vn.isSideCarExport=!0;var Gn=function(e){void 0===e&&(e={});var t=function(e,t){void 0===t&&(t=Un);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=In({async:!0,ssr:!1},e),t}(),Yn=function(){},Xn=i.forwardRef(function(e,t){var n=i.useRef(null),r=i.useState({onScrollCapture:Yn,onWheelCapture:Yn,onTouchMoveCapture:Yn}),o=r[0],a=r[1],c=e.forwardProps,s=e.children,u=e.className,l=e.removeScrollBar,d=e.enabled,f=e.shards,p=e.sideCar,m=e.noRelative,h=e.noIsolation,g=e.inert,v=e.allowPinchZoom,y=e.as,w=void 0===y?"div":y,b=e.gapMode,x=Fn(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=p,C=$n([n,t]),_=In(In({},x),o);return i.createElement(i.Fragment,null,d&&i.createElement(E,{sideCar:Gn,removeScrollBar:l,shards:f,noRelative:m,noIsolation:h,inert:g,setCallbacks:a,allowPinchZoom:!!v,lockRef:n,gapMode:b}),c?i.cloneElement(i.Children.only(s),In(In({},_),{ref:C})):i.createElement(w,In({},_,{className:u,ref:C}),s))});Xn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Xn.classNames={fullWidth:Kn,zeroRight:Wn};function qn(){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 Zn=function(){var e=0,t=null;return{add:function(n){var r,o;0==e&&(t=qn())&&(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)}}},Qn=function(){var e,t=(e=Zn(),function(t,n){i.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])});return function(e){var n=e.styles,r=e.dynamic;return t(n,r),null}},Jn={left:0,top:0,right:0,gap:0},er=function(e){return parseInt(e||"",10)||0},tr=function(e){if(void 0===e&&(e="margin"),"undefined"==typeof window)return Jn;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[er(n),er(r),er(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])}},nr=Qn(),rr="data-scroll-locked",or=function(e,t,n,r){var o=e.left,i=e.top,a=e.right,c=e.gap;return void 0===n&&(n="margin"),"\n .".concat("with-scroll-bars-hidden"," {\n overflow: hidden ").concat(r,";\n padding-right: ").concat(c,"px ").concat(r,";\n }\n body[").concat(rr,"] {\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(c,"px ").concat(r,";\n "),"padding"===n&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),"\n }\n \n .").concat(Wn," {\n right: ").concat(c,"px ").concat(r,";\n }\n \n .").concat(Kn," {\n margin-right: ").concat(c,"px ").concat(r,";\n }\n \n .").concat(Wn," .").concat(Wn," {\n right: 0 ").concat(r,";\n }\n \n .").concat(Kn," .").concat(Kn," {\n margin-right: 0 ").concat(r,";\n }\n \n body[").concat(rr,"] {\n ").concat("--removed-body-scroll-bar-size",": ").concat(c,"px;\n }\n")},ir=function(){var e=parseInt(document.body.getAttribute(rr)||"0",10);return isFinite(e)?e:0},ar=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=void 0===r?"margin":r;i.useEffect(function(){return document.body.setAttribute(rr,(ir()+1).toString()),function(){var e=ir()-1;e<=0?document.body.removeAttribute(rr):document.body.setAttribute(rr,e.toString())}},[]);var a=i.useMemo(function(){return tr(o)},[o]);return i.createElement(nr,{styles:or(a,!t,o,n?"":"!important")})},cr=!1;if("undefined"!=typeof window)try{var sr=Object.defineProperty({},"passive",{get:function(){return cr=!0,!0}});window.addEventListener("test",sr,sr),window.removeEventListener("test",sr,sr)}catch(e){cr=!1}var ur=!!cr&&{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])},dr=function(e,t){var n=t.ownerDocument,r=t;do{if("undefined"!=typeof ShadowRoot&&r instanceof ShadowRoot&&(r=r.host),fr(e,r)){var o=pr(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},fr=function(e,t){return"v"===e?function(e){return lr(e,"overflowY")}(t):function(e){return lr(e,"overflowX")}(t)},pr=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},mr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},hr=function(e){return[e.deltaX,e.deltaY]},gr=function(e){return e&&"current"in e?e.current:e},vr=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},yr=0,wr=[];function br(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var xr,Er=(xr=function(e){var t=i.useRef([]),n=i.useRef([0,0]),r=i.useRef(),o=i.useState(yr++)[0],a=i.useState(Qn)[0],c=i.useRef(e);i.useEffect(function(){c.current=e},[e]),i.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=function(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))}([e.lockRef.current],(e.shards||[]).map(gr),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach(function(e){return e.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var s=i.useCallback(function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!c.current.allowPinchZoom;var o,i=mr(e),a=n.current,s="deltaX"in e?e.deltaX:a[0]-i[0],u="deltaY"in e?e.deltaY:a[1]-i[1],l=e.target,d=Math.abs(s)>Math.abs(u)?"h":"v";if("touches"in e&&"h"===d&&"range"===l.type)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===l||p.contains(l)))return!1;var m=dr(d,l);if(!m)return!0;if(m?o=d:(o="v"===d?"h":"v",m=dr(d,l)),!m)return!1;if(!r.current&&"changedTouches"in e&&(s||u)&&(r.current=o),!o)return!0;var h=r.current||o;return function(e,t,n,r){var o=function(e,t){return"h"===e&&"rtl"===t?-1:1}(e,window.getComputedStyle(t).direction),i=o*r,a=n.target,c=t.contains(a),s=!1,u=i>0,l=0,d=0;do{if(!a)break;var f=pr(e,a),p=f[0],m=f[1]-f[2]-o*p;(p||m)&&fr(e,a)&&(l+=m,d+=p);var h=a.parentNode;a=h&&h.nodeType===Node.DOCUMENT_FRAGMENT_NODE?h.host:h}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(u&&Math.abs(l)<1||!u&&Math.abs(d)<1)&&(s=!0),s}(h,t,e,"h"===h?s:u)},[]),u=i.useCallback(function(e){var n=e;if(wr.length&&wr[wr.length-1]===a){var r="deltaY"in n?hr(n):mr(n),o=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&(t=e.delta,o=r,t[0]===o[0]&&t[1]===o[1]);var t,o})[0];if(o&&o.should)n.cancelable&&n.preventDefault();else if(!o){var i=(c.current.shards||[]).map(gr).filter(Boolean).filter(function(e){return e.contains(n.target)});(i.length>0?s(n,i[0]):!c.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=i.useCallback(function(e,n,r,o){var i={name:e,delta:n,target:r,should:o,shadowParent:br(r)};t.current.push(i),setTimeout(function(){t.current=t.current.filter(function(e){return e!==i})},1)},[]),d=i.useCallback(function(e){n.current=mr(e),r.current=void 0},[]),f=i.useCallback(function(t){l(t.type,hr(t),t.target,s(t,e.lockRef.current))},[]),p=i.useCallback(function(t){l(t.type,mr(t),t.target,s(t,e.lockRef.current))},[]);i.useEffect(function(){return wr.push(a),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:p}),document.addEventListener("wheel",u,ur),document.addEventListener("touchmove",u,ur),document.addEventListener("touchstart",d,ur),function(){wr=wr.filter(function(e){return e!==a}),document.removeEventListener("wheel",u,ur),document.removeEventListener("touchmove",u,ur),document.removeEventListener("touchstart",d,ur)}},[]);var m=e.removeScrollBar,h=e.inert;return i.createElement(i.Fragment,null,h?i.createElement(a,{styles:vr(o)}):null,m?i.createElement(ar,{noRelative:e.noRelative,gapMode:e.gapMode}):null)},Gn.useMedium(xr),Vn),Cr=i.forwardRef(function(e,t){return i.createElement(Xn,In({},e,{ref:t,sideCar:Er}))});Cr.classNames=Xn.classNames;var _r=["Enter"," "],Rr=["ArrowUp","PageDown","End"],Mr=["ArrowDown","PageUp","Home",...Rr],Sr={ltr:[..._r,"ArrowRight"],rtl:[..._r,"ArrowLeft"]},Or={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Dr="Menu",[Pr,Tr,Ar]=E(Dr),[kr,Nr]=d(Dr,[Ar,Ht,wn]),jr=Ht(),Lr=wn(),[Ir,Fr]=kr(Dr),[Wr,Kr]=kr(Dr),Br=e=>{const{__scopeMenu:n,open:r=!1,children:o,dir:a,onOpenChange:c,modal:s=!0}=e,u=jr(n),[l,d]=i.useState(null),f=i.useRef(!1),p=R(c),m=_(a);return i.useEffect(()=>{const e=()=>{f.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>f.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})}},[]),t.jsx(on,{...u,children:t.jsx(Ir,{scope:n,open:r,onOpenChange:p,content:l,onContentChange:d,children:t.jsx(Wr,{scope:n,onClose:i.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:m,modal:s,children:o})})})};Br.displayName=Dr;var Hr=i.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e,i=jr(r);return t.jsx(an,{...i,...o,ref:n})});Hr.displayName="MenuAnchor";var zr="MenuPortal",[$r,Ur]=kr(zr,{forceMount:void 0}),Vr=e=>{const{__scopeMenu:n,forceMount:r,children:o,container:i}=e,a=Fr(zr,n);return t.jsx($r,{scope:n,forceMount:r,children:t.jsx(ln,{present:r||a.open,children:t.jsx(un,{asChild:!0,container:i,children:o})})})};Vr.displayName=zr;var Gr="MenuContent",[Yr,Xr]=kr(Gr),qr=i.forwardRef((e,n)=>{const r=Ur(Gr,e.__scopeMenu),{forceMount:o=r.forceMount,...i}=e,a=Fr(Gr,e.__scopeMenu),c=Kr(Gr,e.__scopeMenu);return t.jsx(Pr.Provider,{scope:e.__scopeMenu,children:t.jsx(ln,{present:o||a.open,children:t.jsx(Pr.Slot,{scope:e.__scopeMenu,children:c.modal?t.jsx(Zr,{...i,ref:n}):t.jsx(Qr,{...i,ref:n})})})})}),Zr=i.forwardRef((e,n)=>{const r=Fr(Gr,e.__scopeMenu),o=i.useRef(null),a=l(n,o);return i.useEffect(()=>{const e=o.current;if(e)return Ln(e)},[]),t.jsx(eo,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:c(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),Qr=i.forwardRef((e,n)=>{const r=Fr(Gr,e.__scopeMenu);return t.jsx(eo,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),Jr=g("MenuContent.ScrollLock"),eo=i.forwardRef((e,n)=>{const{__scopeMenu:r,loop:o=!1,trapFocus:a,onOpenAutoFocus:s,onCloseAutoFocus:u,disableOutsidePointerEvents:d,onEntryFocus:f,onEscapeKeyDown:p,onPointerDownOutside:m,onFocusOutside:h,onInteractOutside:g,onDismiss:v,disableOutsideScroll:y,...w}=e,b=Fr(Gr,r),x=Kr(Gr,r),E=jr(r),C=Lr(r),_=Tr(r),[R,M]=i.useState(null),S=i.useRef(null),O=l(n,S,b.onContentChange),D=i.useRef(0),P=i.useRef(""),A=i.useRef(0),k=i.useRef(null),L=i.useRef("right"),I=i.useRef(0),F=y?Cr:i.Fragment,K=y?{as:Jr,allowPinchZoom:!0}:void 0,B=e=>{const t=P.current+e,n=_().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=(c=e,s=Math.max(i,0),c.map((e,t)=>c[(s+t)%c.length]));var c,s;1===o.length&&(a=a.filter(e=>e!==n));const u=a.find(e=>e.toLowerCase().startsWith(o.toLowerCase()));return u!==n?u:void 0}(n.map(e=>e.textValue),t,o),a=n.find(e=>e.textValue===i)?.ref.current;!function e(t){P.current=t,window.clearTimeout(D.current),""!==t&&(D.current=window.setTimeout(()=>e(""),1e3))}(t),a&&setTimeout(()=>a.focus())};i.useEffect(()=>()=>window.clearTimeout(D.current),[]),i.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??j()),document.body.insertAdjacentElement("beforeend",e[1]??j()),N++,()=>{1===N&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),N--}},[]);const H=i.useCallback(e=>L.current===k.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 e=0,i=t.length-1;e<t.length;i=e++){const a=t[e],c=t[i],s=a.x,u=a.y,l=c.x,d=c.y;u>r!=d>r&&n<(l-s)*(r-u)/(d-u)+s&&(o=!o)}return o}(n,t)}(e,k.current?.area),[]);return t.jsx(Yr,{scope:r,searchRef:P,onItemEnter:i.useCallback(e=>{H(e)&&e.preventDefault()},[H]),onItemLeave:i.useCallback(e=>{H(e)||(S.current?.focus(),M(null))},[H]),onTriggerLeave:i.useCallback(e=>{H(e)&&e.preventDefault()},[H]),pointerGraceTimerRef:A,onPointerGraceIntentChange:i.useCallback(e=>{k.current=e},[]),children:t.jsx(F,{...K,children:t.jsx(W,{asChild:!0,trapped:a,onMountAutoFocus:c(s,e=>{e.preventDefault(),S.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:u,children:t.jsx(T,{asChild:!0,disableOutsidePointerEvents:d,onEscapeKeyDown:p,onPointerDownOutside:m,onFocusOutside:h,onInteractOutside:g,onDismiss:v,children:t.jsx(On,{asChild:!0,...C,dir:x.dir,orientation:"vertical",loop:o,currentTabStopId:R,onCurrentTabStopIdChange:M,onEntryFocus:c(f,e=>{x.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:t.jsx(cn,{role:"menu","aria-orientation":"vertical","data-state":Do(b.open),"data-radix-menu-content":"",dir:x.dir,...E,...w,ref:O,style:{outline:"none",...w.style},onKeyDown:c(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&&B(e.key));const o=S.current;if(e.target!==o)return;if(!Mr.includes(e.key))return;e.preventDefault();const i=_().filter(e=>!e.disabled).map(e=>e.ref.current);Rr.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:c(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(D.current),P.current="")}),onPointerMove:c(e.onPointerMove,Ao(e=>{const t=e.target,n=I.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>I.current?"right":"left";L.current=t,I.current=e.clientX}}))})})})})})})});qr.displayName=Gr;var to=i.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e;return t.jsx(b.div,{role:"group",...o,ref:n})});to.displayName="MenuGroup";var no=i.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e;return t.jsx(b.div,{...o,ref:n})});no.displayName="MenuLabel";var ro="MenuItem",oo="menu.itemSelect",io=i.forwardRef((e,n)=>{const{disabled:r=!1,onSelect:o,...a}=e,s=i.useRef(null),u=Kr(ro,e.__scopeMenu),d=Xr(ro,e.__scopeMenu),f=l(n,s),p=i.useRef(!1);return t.jsx(ao,{...a,ref:f,disabled:r,onClick:c(e.onClick,()=>{const e=s.current;if(!r&&e){const t=new CustomEvent(oo,{bubbles:!0,cancelable:!0});e.addEventListener(oo,e=>o?.(e),{once:!0}),x(e,t),t.defaultPrevented?p.current=!1:u.onClose()}}),onPointerDown:t=>{e.onPointerDown?.(t),p.current=!0},onPointerUp:c(e.onPointerUp,e=>{p.current||e.currentTarget?.click()}),onKeyDown:c(e.onKeyDown,e=>{const t=""!==d.searchRef.current;r||t&&" "===e.key||_r.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});io.displayName=ro;var ao=i.forwardRef((e,n)=>{const{__scopeMenu:r,disabled:o=!1,textValue:a,...s}=e,u=Xr(ro,r),d=Lr(r),f=i.useRef(null),p=l(n,f),[m,h]=i.useState(!1),[g,v]=i.useState("");return i.useEffect(()=>{const e=f.current;e&&v((e.textContent??"").trim())},[s.children]),t.jsx(Pr.ItemSlot,{scope:r,disabled:o,textValue:a??g,children:t.jsx(Dn,{asChild:!0,...d,focusable:!o,children:t.jsx(b.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":o||void 0,"data-disabled":o?"":void 0,...s,ref:p,onPointerMove:c(e.onPointerMove,Ao(e=>{if(o)u.onItemLeave(e);else if(u.onItemEnter(e),!e.defaultPrevented){e.currentTarget.focus({preventScroll:!0})}})),onPointerLeave:c(e.onPointerLeave,Ao(e=>u.onItemLeave(e))),onFocus:c(e.onFocus,()=>h(!0)),onBlur:c(e.onBlur,()=>h(!1))})})})}),co=i.forwardRef((e,n)=>{const{checked:r=!1,onCheckedChange:o,...i}=e;return t.jsx(go,{scope:e.__scopeMenu,checked:r,children:t.jsx(io,{role:"menuitemcheckbox","aria-checked":Po(r)?"mixed":r,...i,ref:n,"data-state":To(r),onSelect:c(i.onSelect,()=>o?.(!!Po(r)||!r),{checkForDefaultPrevented:!1})})})});co.displayName="MenuCheckboxItem";var so="MenuRadioGroup",[uo,lo]=kr(so,{value:void 0,onValueChange:()=>{}}),fo=i.forwardRef((e,n)=>{const{value:r,onValueChange:o,...i}=e,a=R(o);return t.jsx(uo,{scope:e.__scopeMenu,value:r,onValueChange:a,children:t.jsx(to,{...i,ref:n})})});fo.displayName=so;var po="MenuRadioItem",mo=i.forwardRef((e,n)=>{const{value:r,...o}=e,i=lo(po,e.__scopeMenu),a=r===i.value;return t.jsx(go,{scope:e.__scopeMenu,checked:a,children:t.jsx(io,{role:"menuitemradio","aria-checked":a,...o,ref:n,"data-state":To(a),onSelect:c(o.onSelect,()=>i.onValueChange?.(r),{checkForDefaultPrevented:!1})})})});mo.displayName=po;var ho="MenuItemIndicator",[go,vo]=kr(ho,{checked:!1}),yo=i.forwardRef((e,n)=>{const{__scopeMenu:r,forceMount:o,...i}=e,a=vo(ho,r);return t.jsx(ln,{present:o||Po(a.checked)||!0===a.checked,children:t.jsx(b.span,{...i,ref:n,"data-state":To(a.checked)})})});yo.displayName=ho;var wo=i.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e;return t.jsx(b.div,{role:"separator","aria-orientation":"horizontal",...o,ref:n})});wo.displayName="MenuSeparator";var bo=i.forwardRef((e,n)=>{const{__scopeMenu:r,...o}=e,i=jr(r);return t.jsx(sn,{...i,...o,ref:n})});bo.displayName="MenuArrow";var xo="MenuSub",[Eo,Co]=kr(xo),_o=e=>{const{__scopeMenu:n,children:r,open:o=!1,onOpenChange:a}=e,c=Fr(xo,n),s=jr(n),[u,l]=i.useState(null),[d,f]=i.useState(null),p=R(a);return i.useEffect(()=>(!1===c.open&&p(!1),()=>p(!1)),[c.open,p]),t.jsx(on,{...s,children:t.jsx(Ir,{scope:n,open:o,onOpenChange:p,content:d,onContentChange:f,children:t.jsx(Eo,{scope:n,contentId:Y(),triggerId:Y(),trigger:u,onTriggerChange:l,children:r})})})};_o.displayName=xo;var Ro="MenuSubTrigger",Mo=i.forwardRef((e,n)=>{const r=Fr(Ro,e.__scopeMenu),o=Kr(Ro,e.__scopeMenu),a=Co(Ro,e.__scopeMenu),s=Xr(Ro,e.__scopeMenu),l=i.useRef(null),{pointerGraceTimerRef:d,onPointerGraceIntentChange:f}=s,p={__scopeMenu:e.__scopeMenu},m=i.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return i.useEffect(()=>m,[m]),i.useEffect(()=>{const e=d.current;return()=>{window.clearTimeout(e),f(null)}},[d,f]),t.jsx(Hr,{asChild:!0,...p,children:t.jsx(ao,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":a.contentId,"data-state":Do(r.open),...e,ref:u(n,a.onTriggerChange),onClick:t=>{e.onClick?.(t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:c(e.onPointerMove,Ao(t=>{s.onItemEnter(t),t.defaultPrevented||e.disabled||r.open||l.current||(s.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{r.onOpenChange(!0),m()},100))})),onPointerLeave:c(e.onPointerLeave,Ao(e=>{m();const t=r.content?.getBoundingClientRect();if(t){const n=r.content?.dataset.side,o="right"===n,i=o?-5:5,a=t[o?"left":"right"],c=t[o?"right":"left"];s.onPointerGraceIntentChange({area:[{x:e.clientX+i,y:e.clientY},{x:a,y:t.top},{x:c,y:t.top},{x:c,y:t.bottom},{x:a,y:t.bottom}],side:n}),window.clearTimeout(d.current),d.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(e),e.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:c(e.onKeyDown,t=>{const n=""!==s.searchRef.current;e.disabled||n&&" "===t.key||Sr[o.dir].includes(t.key)&&(r.onOpenChange(!0),r.content?.focus(),t.preventDefault())})})})});Mo.displayName=Ro;var So="MenuSubContent",Oo=i.forwardRef((e,n)=>{const r=Ur(Gr,e.__scopeMenu),{forceMount:o=r.forceMount,...a}=e,s=Fr(Gr,e.__scopeMenu),u=Kr(Gr,e.__scopeMenu),d=Co(So,e.__scopeMenu),f=i.useRef(null),p=l(n,f);return t.jsx(Pr.Provider,{scope:e.__scopeMenu,children:t.jsx(ln,{present:o||s.open,children:t.jsx(Pr.Slot,{scope:e.__scopeMenu,children:t.jsx(eo,{id:d.contentId,"aria-labelledby":d.triggerId,...a,ref:p,align:"start",side:"rtl"===u.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{u.isUsingKeyboardRef.current&&f.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:c(e.onFocusOutside,e=>{e.target!==d.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:c(e.onEscapeKeyDown,e=>{u.onClose(),e.preventDefault()}),onKeyDown:c(e.onKeyDown,e=>{const t=e.currentTarget.contains(e.target),n=Or[u.dir].includes(e.key);t&&n&&(s.onOpenChange(!1),d.trigger?.focus(),e.preventDefault())})})})})})});function Do(e){return e?"open":"closed"}function Po(e){return"indeterminate"===e}function To(e){return Po(e)?"indeterminate":e?"checked":"unchecked"}function Ao(e){return t=>"mouse"===t.pointerType?e(t):void 0}Oo.displayName=So;var ko=Br,No=Hr,jo=Vr,Lo=qr,Io=to,Fo=no,Wo=io,Ko=co,Bo=fo,Ho=mo,zo=yo,$o=wo,Uo=bo,Vo=_o,Go=Mo,Yo=Oo,Xo="DropdownMenu",[qo,Zo]=d(Xo,[Nr]),Qo=Nr(),[Jo,ei]=qo(Xo),ti=e=>{const{__scopeDropdownMenu:n,children:r,dir:o,open:a,defaultOpen:c,onOpenChange:s,modal:u=!0}=e,l=Qo(n),d=i.useRef(null),[f,p]=h({prop:a,defaultProp:c??!1,onChange:s,caller:Xo});return t.jsx(Jo,{scope:n,triggerId:Y(),triggerRef:d,contentId:Y(),open:f,onOpenChange:p,onOpenToggle:i.useCallback(()=>p(e=>!e),[p]),modal:u,children:t.jsx(ko,{...l,open:f,onOpenChange:p,dir:o,modal:u,children:r})})};ti.displayName=Xo;var ni="DropdownMenuTrigger",ri=i.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,disabled:o=!1,...i}=e,a=ei(ni,r),s=Qo(r);return t.jsx(No,{asChild:!0,...s,children:t.jsx(b.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":o?"":void 0,disabled:o,...i,ref:u(n,a.triggerRef),onPointerDown:c(e.onPointerDown,e=>{o||0!==e.button||!1!==e.ctrlKey||(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:c(e.onKeyDown,e=>{o||(["Enter"," "].includes(e.key)&&a.onOpenToggle(),"ArrowDown"===e.key&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});ri.displayName=ni;var oi=e=>{const{__scopeDropdownMenu:n,...r}=e,o=Qo(n);return t.jsx(jo,{...o,...r})};oi.displayName="DropdownMenuPortal";var ii="DropdownMenuContent",ai=i.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,a=ei(ii,r),s=Qo(r),u=i.useRef(!1);return t.jsx(Lo,{id:a.contentId,"aria-labelledby":a.triggerId,...s,...o,ref:n,onCloseAutoFocus:c(e.onCloseAutoFocus,e=>{u.current||a.triggerRef.current?.focus(),u.current=!1,e.preventDefault()}),onInteractOutside:c(e.onInteractOutside,e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;a.modal&&!r||(u.current=!0)}),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)"}})});ai.displayName=ii;i.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=Qo(r);return t.jsx(Io,{...i,...o,ref:n})}).displayName="DropdownMenuGroup";i.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=Qo(r);return t.jsx(Fo,{...i,...o,ref:n})}).displayName="DropdownMenuLabel";var ci=i.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=Qo(r);return t.jsx(Wo,{...i,...o,ref:n})});ci.displayName="DropdownMenuItem";i.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=Qo(r);return t.jsx(Ko,{...i,...o,ref:n})}).displayName="DropdownMenuCheckboxItem";i.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=Qo(r);return t.jsx(Bo,{...i,...o,ref:n})}).displayName="DropdownMenuRadioGroup";i.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=Qo(r);return t.jsx(Ho,{...i,...o,ref:n})}).displayName="DropdownMenuRadioItem";i.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=Qo(r);return t.jsx(zo,{...i,...o,ref:n})}).displayName="DropdownMenuItemIndicator";i.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=Qo(r);return t.jsx($o,{...i,...o,ref:n})}).displayName="DropdownMenuSeparator";i.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=Qo(r);return t.jsx(Uo,{...i,...o,ref:n})}).displayName="DropdownMenuArrow";var si=i.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=Qo(r);return t.jsx(Go,{...i,...o,ref:n})});si.displayName="DropdownMenuSubTrigger";var ui=i.forwardRef((e,n)=>{const{__scopeDropdownMenu:r,...o}=e,i=Qo(r);return t.jsx(Yo,{...i,...o,ref:n,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)"}})});ui.displayName="DropdownMenuSubContent";var li=ti,di=ri,fi=oi,pi=ai,mi=ci,hi=e=>{const{__scopeDropdownMenu:n,children:r,open:o,onOpenChange:i,defaultOpen:a}=e,c=Qo(n),[s,u]=h({prop:o,defaultProp:a??!1,onChange:i,caller:"DropdownMenuSub"});return t.jsx(Vo,{...c,open:s,onOpenChange:u,children:r})},gi=si,vi=ui;var yi={trigger:"OverflowMenu-module_trigger__imdPK",menu:"OverflowMenu-module_menu__n8uKD",subTrigger:"OverflowMenu-module_subTrigger__N6SVz",rightArrow:"OverflowMenu-module_rightArrow__BIYvY",dotsWrapper:"OverflowMenu-module_dotsWrapper__CHO9Q",dot:"OverflowMenu-module_dot__g5Rgi"};!function(e,t){void 0===t&&(t={});var n=t.insertAt;if("undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],o=document.createElement("style");o.type="text/css","top"===n&&r.firstChild?r.insertBefore(o,r.firstChild):r.appendChild(o),o.styleSheet?o.styleSheet.cssText=e:o.appendChild(document.createTextNode(e))}}(".OverflowMenu-module_menuWrapper__psD7a{display:inline-block;position:relative;z-index:0}.OverflowMenu-module_trigger__imdPK{align-items:center;background:transparent;border:none;border-radius:50%;color:#024b59;cursor:pointer;display:flex;font-size:1.8rem;height:3rem;justify-content:center;transition:color .2s ease,background-color .2s ease;width:3rem}.OverflowMenu-module_trigger__imdPK:focus,.OverflowMenu-module_trigger__imdPK:hover{background-color:rgba(2,75,89,.05);color:#016a80;outline:none}.OverflowMenu-module_menu__n8uKD{backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);background:hsla(0,0%,100%,.75);border:1px solid #016a80;border-radius:12px;box-shadow:0 8px 24px rgba(0,0,0,.12);color:#024b59;display:flex;flex-direction:column;font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif;font-weight:500;gap:.35rem;min-width:180px;padding:.5rem .25rem;width:max-content;z-index:9999}.OverflowMenu-module_menu__n8uKD button{background:transparent;border:none;border-bottom:1px solid rgba(2,75,89,.1);border-radius:8px;color:#024b59;cursor:pointer;font-size:1rem;padding:.6rem 1rem;text-align:left;transition:background .25s ease,transform .12s ease;user-select:none}.OverflowMenu-module_menu__n8uKD button:last-child{border-bottom:none}.OverflowMenu-module_menu__n8uKD button:focus,.OverflowMenu-module_menu__n8uKD button:hover{background:rgba(2,75,89,.05);outline:none;transform:scale(1.03)}.OverflowMenu-module_menu__n8uKD button:active{background:rgba(2,75,89,.1);transform:scale(.98)}.OverflowMenu-module_subTrigger__N6SVz{align-items:center;display:flex;justify-content:space-between;width:100%}.OverflowMenu-module_rightArrow__BIYvY{font-size:.8rem;margin-left:auto;opacity:.7;padding-left:1rem}.OverflowMenu-module_dotsWrapper__CHO9Q{align-items:center;display:flex;flex-direction:column;gap:3px;justify-content:center}.OverflowMenu-module_dot__g5Rgi{background-color:currentColor;border-radius:50%;display:block;height:5px;width:5px}");const wi=()=>{const t={initial:{y:0,scale:1},hover:{y:-4,scale:1.2,transition:{type:"spring",stiffness:500,damping:20}},rest:{y:0,scale:1,transition:{type:"spring",stiffness:500,damping:20}}};return e.createElement(r.motion.div,{className:yi.dotsWrapper,initial:"rest",whileHover:"hover",animate:"rest"},[0,1,2].map(n=>e.createElement(r.motion.span,{key:n,className:yi.dot,variants:t,custom:n,transition:{delay:.05*n}})))};module.exports=({items:t,icon:n,className:o="",portal:i=null})=>{const[a,c]=e.useState(!1),s={hidden:{opacity:0,scale:.95,transition:{duration:.1}},visible:{opacity:1,scale:1,transition:{duration:.2,staggerChildren:.05}}},u={hidden:{opacity:0,y:-10},visible:{opacity:1,y:0}},l=(t,n)=>t.children&&t.children.length>0?e.createElement(hi,{key:n},e.createElement(gi,{asChild:!0,className:yi.menuItem},e.createElement(r.motion.button,{variants:u,className:yi.subTrigger},t.content,e.createElement("span",{className:yi.rightArrow},"▶"))),e.createElement(fi,{container:i},e.createElement(vi,{asChild:!0,className:yi.menu,sideOffset:2,alignOffset:-5},e.createElement(r.motion.div,{variants:s,initial:"hidden",animate:"visible",exit:"hidden"},t.children.map((e,t)=>l(e,t)))))):e.createElement(mi,{key:n,asChild:!0,className:yi.menuItem,onSelect:()=>{var e;null===(e=t.onClick)||void 0===e||e.call(t)}},e.createElement(r.motion.button,{variants:u},t.content)),d=e.createElement(r.AnimatePresence,null,a&&e.createElement(fi,{container:i,forceMount:!0},e.createElement(pi,{asChild:!0,className:yi.menu,sideOffset:5,align:"end"},e.createElement(r.motion.div,{variants:s,initial:"hidden",animate:"visible",exit:"hidden"},t.map((e,t)=>l(e,t))))));return e.createElement(li,{open:a,onOpenChange:c},e.createElement(di,{asChild:!0,className:`${yi.trigger} ${o}`},e.createElement(r.motion.button,{"aria-haspopup":"true","aria-expanded":a,whileHover:{scale:1.1,y:-2,color:"#016a80",backgroundColor:"rgba(2, 75, 89, 0.05)",transition:{type:"spring",stiffness:400,damping:15}}},n||e.createElement(wi,null))),d)};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|