import{F as be,h as xe,l as j,m as je,p as Q,P as L,i as ne,f as S,u as Ue,H as lt,R as dt,j as Ce,k as wn,X as bn,D as xn,K as Cn,J as Mn,L as yn,W as ft,c as D,B as Qe,a as Sn}from"./chunk-ChHTQ4Sk.js";import{r as o,z as W,j as i,Q as U,T as pt,q as En}from"./chunk-CF7PZJR8.js";/**
 * @license lucide-react v0.563.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Rn=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],_n=be("chevron-down",Rn);/**
 * @license lucide-react v0.563.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const In=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Tn=be("chevron-right",In);/**
 * @license lucide-react v0.563.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Nn=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Pn=be("chevron-up",Nn);/**
 * @license lucide-react v0.563.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */const Dn=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],sa=be("x",Dn);var An=o.createContext(void 0);function vt(e){const t=o.useContext(An);return e||t||"ltr"}function mt(e){const t=e+"CollectionProvider",[n,r]=xe(t),[a,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),l=d=>{const{scope:p,children:g}=d,y=W.useRef(null),w=W.useRef(new Map).current;return i.jsx(a,{scope:p,itemMap:w,collectionRef:y,children:g})};l.displayName=t;const c=e+"CollectionSlot",h=je(c),m=W.forwardRef((d,p)=>{const{scope:g,children:y}=d,w=s(c,g),C=j(p,w.collectionRef);return i.jsx(h,{ref:C,children:y})});m.displayName=c;const f=e+"CollectionItemSlot",u="data-radix-collection-item",v=je(f),b=W.forwardRef((d,p)=>{const{scope:g,children:y,...w}=d,C=W.useRef(null),E=j(p,C),R=s(f,g);return W.useEffect(()=>(R.itemMap.set(C,{ref:C,...w}),()=>void R.itemMap.delete(C))),i.jsx(v,{[u]:"",ref:E,children:y})});b.displayName=f;function x(d){const p=s(e+"CollectionConsumer",d);return W.useCallback(()=>{const y=p.collectionRef.current;if(!y)return[];const w=Array.from(y.querySelectorAll(`[${u}]`));return Array.from(p.itemMap.values()).sort((R,_)=>w.indexOf(R.ref.current)-w.indexOf(_.ref.current))},[p.collectionRef,p.itemMap])}return[{Provider:l,Slot:m,ItemSlot:b},x,r]}var Ie=0;function kn(){o.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Je()),document.body.insertAdjacentElement("beforeend",e[1]??Je()),Ie++,()=>{Ie===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ie--}},[])}function Je(){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 Te="focusScope.autoFocusOnMount",Ne="focusScope.autoFocusOnUnmount",et={bubbles:!1,cancelable:!0},On="FocusScope",ht=o.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:s,...l}=e,[c,h]=o.useState(null),m=Q(a),f=Q(s),u=o.useRef(null),v=j(t,d=>h(d)),b=o.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;o.useEffect(()=>{if(r){let d=function(w){if(b.paused||!c)return;const C=w.target;c.contains(C)?u.current=C:G(u.current,{select:!0})},p=function(w){if(b.paused||!c)return;const C=w.relatedTarget;C!==null&&(c.contains(C)||G(u.current,{select:!0}))},g=function(w){if(document.activeElement===document.body)for(const E of w)E.removedNodes.length>0&&G(c)};document.addEventListener("focusin",d),document.addEventListener("focusout",p);const y=new MutationObserver(g);return c&&y.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",d),document.removeEventListener("focusout",p),y.disconnect()}}},[r,c,b.paused]),o.useEffect(()=>{if(c){nt.add(b);const d=document.activeElement;if(!c.contains(d)){const g=new CustomEvent(Te,et);c.addEventListener(Te,m),c.dispatchEvent(g),g.defaultPrevented||(Fn(Un(gt(c)),{select:!0}),document.activeElement===d&&G(c))}return()=>{c.removeEventListener(Te,m),setTimeout(()=>{const g=new CustomEvent(Ne,et);c.addEventListener(Ne,f),c.dispatchEvent(g),g.defaultPrevented||G(d??document.body,{select:!0}),c.removeEventListener(Ne,f),nt.remove(b)},0)}}},[c,m,f,b]);const x=o.useCallback(d=>{if(!n&&!r||b.paused)return;const p=d.key==="Tab"&&!d.altKey&&!d.ctrlKey&&!d.metaKey,g=document.activeElement;if(p&&g){const y=d.currentTarget,[w,C]=jn(y);w&&C?!d.shiftKey&&g===C?(d.preventDefault(),n&&G(w,{select:!0})):d.shiftKey&&g===w&&(d.preventDefault(),n&&G(C,{select:!0})):g===y&&d.preventDefault()}},[n,r,b.paused]);return i.jsx(L.div,{tabIndex:-1,...l,ref:v,onKeyDown:x})});ht.displayName=On;function Fn(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(G(r,{select:t}),document.activeElement!==n)return}function jn(e){const t=gt(e),n=tt(t,e),r=tt(t.reverse(),e);return[n,r]}function gt(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const a=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||a?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function tt(e,t){for(const n of e)if(!Ln(n,{upTo:t}))return n}function Ln(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Kn(e){return e instanceof HTMLInputElement&&"select"in e}function G(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Kn(e)&&t&&e.select()}}var nt=Gn();function Gn(){let e=[];return{add(t){const n=e[0];t!==n&&n?.pause(),e=rt(e,t),e.unshift(t)},remove(t){e=rt(e,t),e[0]?.resume()}}}function rt(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Un(e){return e.filter(t=>t.tagName!=="A")}var Bn=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Y=new WeakMap,de=new WeakMap,fe={},Pe=0,wt=function(e){return e&&(e.host||wt(e.parentNode))},$n=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=wt(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Wn=function(e,t,n,r){var a=$n(t,Array.isArray(e)?e:[e]);fe[n]||(fe[n]=new WeakMap);var s=fe[n],l=[],c=new Set,h=new Set(a),m=function(u){!u||c.has(u)||(c.add(u),m(u.parentNode))};a.forEach(m);var f=function(u){!u||h.has(u)||Array.prototype.forEach.call(u.children,function(v){if(c.has(v))f(v);else try{var b=v.getAttribute(r),x=b!==null&&b!=="false",d=(Y.get(v)||0)+1,p=(s.get(v)||0)+1;Y.set(v,d),s.set(v,p),l.push(v),d===1&&x&&de.set(v,!0),p===1&&v.setAttribute(n,"true"),x||v.setAttribute(r,"true")}catch(g){console.error("aria-hidden: cannot operate on ",v,g)}})};return f(t),c.clear(),Pe++,function(){l.forEach(function(u){var v=Y.get(u)-1,b=s.get(u)-1;Y.set(u,v),s.set(u,b),v||(de.has(u)||u.removeAttribute(r),de.delete(u)),b||u.removeAttribute(n)}),Pe--,Pe||(Y=new WeakMap,Y=new WeakMap,de=new WeakMap,fe={})}},Vn=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),a=Bn(e);return a?(r.push.apply(r,Array.from(a.querySelectorAll("[aria-live], script"))),Wn(r,a,n,"aria-hidden")):function(){return null}},me="right-scroll-bar-position",he="width-before-scroll-bar",zn="with-scroll-bars-hidden",qn="--removed-body-scroll-bar-size";function De(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Yn(e,t){var n=o.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var a=n.value;a!==r&&(n.value=r,n.callback(r,a))}}}})[0];return n.callback=t,n.facade}var Xn=typeof window<"u"?o.useLayoutEffect:o.useEffect,ot=new WeakMap;function Hn(e,t){var n=Yn(null,function(r){return e.forEach(function(a){return De(a,r)})});return Xn(function(){var r=ot.get(n);if(r){var a=new Set(r),s=new Set(e),l=n.current;a.forEach(function(c){s.has(c)||De(c,null)}),s.forEach(function(c){a.has(c)||De(c,l)})}ot.set(n,e)},[e]),n}function Zn(e){return e}function Qn(e,t){t===void 0&&(t=Zn);var n=[],r=!1,a={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(s){var l=t(s,r);return n.push(l),function(){n=n.filter(function(c){return c!==l})}},assignSyncMedium:function(s){for(r=!0;n.length;){var l=n;n=[],l.forEach(s)}n={push:function(c){return s(c)},filter:function(){return n}}},assignMedium:function(s){r=!0;var l=[];if(n.length){var c=n;n=[],c.forEach(s),l=n}var h=function(){var f=l;l=[],f.forEach(s)},m=function(){return Promise.resolve().then(h)};m(),n={push:function(f){l.push(f),m()},filter:function(f){return l=l.filter(f),n}}}};return a}function Jn(e){e===void 0&&(e={});var t=Qn(null);return t.options=U({async:!0,ssr:!1},e),t}var bt=function(e){var t=e.sideCar,n=pt(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 o.createElement(r,U({},n))};bt.isSideCarExport=!0;function er(e,t){return e.useMedium(t),bt}var xt=Jn(),Ae=function(){},Me=o.forwardRef(function(e,t){var n=o.useRef(null),r=o.useState({onScrollCapture:Ae,onWheelCapture:Ae,onTouchMoveCapture:Ae}),a=r[0],s=r[1],l=e.forwardProps,c=e.children,h=e.className,m=e.removeScrollBar,f=e.enabled,u=e.shards,v=e.sideCar,b=e.noRelative,x=e.noIsolation,d=e.inert,p=e.allowPinchZoom,g=e.as,y=g===void 0?"div":g,w=e.gapMode,C=pt(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=v,R=Hn([n,t]),_=U(U({},C),a);return o.createElement(o.Fragment,null,f&&o.createElement(E,{sideCar:xt,removeScrollBar:m,shards:u,noRelative:b,noIsolation:x,inert:d,setCallbacks:s,allowPinchZoom:!!p,lockRef:n,gapMode:w}),l?o.cloneElement(o.Children.only(c),U(U({},_),{ref:R})):o.createElement(y,U({},_,{className:h,ref:R}),c))});Me.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Me.classNames={fullWidth:he,zeroRight:me};var tr=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function nr(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=tr();return t&&e.setAttribute("nonce",t),e}function rr(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function or(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ar=function(){var e=0,t=null;return{add:function(n){e==0&&(t=nr())&&(rr(t,n),or(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},cr=function(){var e=ar();return function(t,n){o.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ct=function(){var e=cr(),t=function(n){var r=n.styles,a=n.dynamic;return e(r,a),null};return t},sr={left:0,top:0,right:0,gap:0},ke=function(e){return parseInt(e||"",10)||0},ir=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],a=t[e==="padding"?"paddingRight":"marginRight"];return[ke(n),ke(r),ke(a)]},ur=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return sr;var t=ir(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])}},lr=Ct(),Z="data-scroll-locked",dr=function(e,t,n,r){var a=e.left,s=e.top,l=e.right,c=e.gap;return n===void 0&&(n="margin"),`
  .`.concat(zn,` {
   overflow: hidden `).concat(r,`;
   padding-right: `).concat(c,"px ").concat(r,`;
  }
  body[`).concat(Z,`] {
    overflow: hidden `).concat(r,`;
    overscroll-behavior: contain;
    `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
    padding-left: `.concat(a,`px;
    padding-top: `).concat(s,`px;
    padding-right: `).concat(l,`px;
    margin-left:0;
    margin-top:0;
    margin-right: `).concat(c,"px ").concat(r,`;
    `),n==="padding"&&"padding-right: ".concat(c,"px ").concat(r,";")].filter(Boolean).join(""),`
  }
  
  .`).concat(me,` {
    right: `).concat(c,"px ").concat(r,`;
  }
  
  .`).concat(he,` {
    margin-right: `).concat(c,"px ").concat(r,`;
  }
  
  .`).concat(me," .").concat(me,` {
    right: 0 `).concat(r,`;
  }
  
  .`).concat(he," .").concat(he,` {
    margin-right: 0 `).concat(r,`;
  }
  
  body[`).concat(Z,`] {
    `).concat(qn,": ").concat(c,`px;
  }
`)},at=function(){var e=parseInt(document.body.getAttribute(Z)||"0",10);return isFinite(e)?e:0},fr=function(){o.useEffect(function(){return document.body.setAttribute(Z,(at()+1).toString()),function(){var e=at()-1;e<=0?document.body.removeAttribute(Z):document.body.setAttribute(Z,e.toString())}},[])},pr=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,a=r===void 0?"margin":r;fr();var s=o.useMemo(function(){return ur(a)},[a]);return o.createElement(lr,{styles:dr(s,!t,a,n?"":"!important")})},Le=!1;if(typeof window<"u")try{var pe=Object.defineProperty({},"passive",{get:function(){return Le=!0,!0}});window.addEventListener("test",pe,pe),window.removeEventListener("test",pe,pe)}catch{Le=!1}var X=Le?{passive:!1}:!1,vr=function(e){return e.tagName==="TEXTAREA"},Mt=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!vr(e)&&n[t]==="visible")},mr=function(e){return Mt(e,"overflowY")},hr=function(e){return Mt(e,"overflowX")},ct=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var a=yt(e,r);if(a){var s=St(e,r),l=s[1],c=s[2];if(l>c)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},gr=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},wr=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},yt=function(e,t){return e==="v"?mr(t):hr(t)},St=function(e,t){return e==="v"?gr(t):wr(t)},br=function(e,t){return e==="h"&&t==="rtl"?-1:1},xr=function(e,t,n,r,a){var s=br(e,window.getComputedStyle(t).direction),l=s*r,c=n.target,h=t.contains(c),m=!1,f=l>0,u=0,v=0;do{if(!c)break;var b=St(e,c),x=b[0],d=b[1],p=b[2],g=d-p-s*x;(x||g)&&yt(e,c)&&(u+=g,v+=x);var y=c.parentNode;c=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!h&&c!==document.body||h&&(t.contains(c)||t===c));return(f&&Math.abs(u)<1||!f&&Math.abs(v)<1)&&(m=!0),m},ve=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},st=function(e){return[e.deltaX,e.deltaY]},it=function(e){return e&&"current"in e?e.current:e},Cr=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Mr=function(e){return`
  .block-interactivity-`.concat(e,` {pointer-events: none;}
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
`)},yr=0,H=[];function Sr(e){var t=o.useRef([]),n=o.useRef([0,0]),r=o.useRef(),a=o.useState(yr++)[0],s=o.useState(Ct)[0],l=o.useRef(e);o.useEffect(function(){l.current=e},[e]),o.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var d=En([e.lockRef.current],(e.shards||[]).map(it),!0).filter(Boolean);return d.forEach(function(p){return p.classList.add("allow-interactivity-".concat(a))}),function(){document.body.classList.remove("block-interactivity-".concat(a)),d.forEach(function(p){return p.classList.remove("allow-interactivity-".concat(a))})}}},[e.inert,e.lockRef.current,e.shards]);var c=o.useCallback(function(d,p){if("touches"in d&&d.touches.length===2||d.type==="wheel"&&d.ctrlKey)return!l.current.allowPinchZoom;var g=ve(d),y=n.current,w="deltaX"in d?d.deltaX:y[0]-g[0],C="deltaY"in d?d.deltaY:y[1]-g[1],E,R=d.target,_=Math.abs(w)>Math.abs(C)?"h":"v";if("touches"in d&&_==="h"&&R.type==="range")return!1;var I=window.getSelection(),A=I&&I.anchorNode,O=A?A===R||A.contains(R):!1;if(O)return!1;var k=ct(_,R);if(!k)return!0;if(k?E=_:(E=_==="v"?"h":"v",k=ct(_,R)),!k)return!1;if(!r.current&&"changedTouches"in d&&(w||C)&&(r.current=E),!E)return!0;var K=r.current||E;return xr(K,p,d,K==="h"?w:C)},[]),h=o.useCallback(function(d){var p=d;if(!(!H.length||H[H.length-1]!==s)){var g="deltaY"in p?st(p):ve(p),y=t.current.filter(function(E){return E.name===p.type&&(E.target===p.target||p.target===E.shadowParent)&&Cr(E.delta,g)})[0];if(y&&y.should){p.cancelable&&p.preventDefault();return}if(!y){var w=(l.current.shards||[]).map(it).filter(Boolean).filter(function(E){return E.contains(p.target)}),C=w.length>0?c(p,w[0]):!l.current.noIsolation;C&&p.cancelable&&p.preventDefault()}}},[]),m=o.useCallback(function(d,p,g,y){var w={name:d,delta:p,target:g,should:y,shadowParent:Er(g)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(C){return C!==w})},1)},[]),f=o.useCallback(function(d){n.current=ve(d),r.current=void 0},[]),u=o.useCallback(function(d){m(d.type,st(d),d.target,c(d,e.lockRef.current))},[]),v=o.useCallback(function(d){m(d.type,ve(d),d.target,c(d,e.lockRef.current))},[]);o.useEffect(function(){return H.push(s),e.setCallbacks({onScrollCapture:u,onWheelCapture:u,onTouchMoveCapture:v}),document.addEventListener("wheel",h,X),document.addEventListener("touchmove",h,X),document.addEventListener("touchstart",f,X),function(){H=H.filter(function(d){return d!==s}),document.removeEventListener("wheel",h,X),document.removeEventListener("touchmove",h,X),document.removeEventListener("touchstart",f,X)}},[]);var b=e.removeScrollBar,x=e.inert;return o.createElement(o.Fragment,null,x?o.createElement(s,{styles:Mr(a)}):null,b?o.createElement(pr,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Er(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Rr=er(xt,Sr);var Et=o.forwardRef(function(e,t){return o.createElement(Me,U({},e,{ref:t,sideCar:Rr}))});Et.classNames=Me.classNames;var Oe="rovingFocusGroup.onEntryFocus",_r={bubbles:!1,cancelable:!0},ae="RovingFocusGroup",[Ke,Rt,Ir]=mt(ae),[Tr,_t]=xe(ae,[Ir]),[Nr,Pr]=Tr(ae),It=o.forwardRef((e,t)=>i.jsx(Ke.Provider,{scope:e.__scopeRovingFocusGroup,children:i.jsx(Ke.Slot,{scope:e.__scopeRovingFocusGroup,children:i.jsx(Dr,{...e,ref:t})})}));It.displayName=ae;var Dr=o.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:s,currentTabStopId:l,defaultCurrentTabStopId:c,onCurrentTabStopIdChange:h,onEntryFocus:m,preventScrollOnEntryFocus:f=!1,...u}=e,v=o.useRef(null),b=j(t,v),x=vt(s),[d,p]=Ue({prop:l,defaultProp:c??null,onChange:h,caller:ae}),[g,y]=o.useState(!1),w=Q(m),C=Rt(n),E=o.useRef(!1),[R,_]=o.useState(0);return o.useEffect(()=>{const I=v.current;if(I)return I.addEventListener(Oe,w),()=>I.removeEventListener(Oe,w)},[w]),i.jsx(Nr,{scope:n,orientation:r,dir:x,loop:a,currentTabStopId:d,onItemFocus:o.useCallback(I=>p(I),[p]),onItemShiftTab:o.useCallback(()=>y(!0),[]),onFocusableItemAdd:o.useCallback(()=>_(I=>I+1),[]),onFocusableItemRemove:o.useCallback(()=>_(I=>I-1),[]),children:i.jsx(L.div,{tabIndex:g||R===0?-1:0,"data-orientation":r,...u,ref:b,style:{outline:"none",...e.style},onMouseDown:S(e.onMouseDown,()=>{E.current=!0}),onFocus:S(e.onFocus,I=>{const A=!E.current;if(I.target===I.currentTarget&&A&&!g){const O=new CustomEvent(Oe,_r);if(I.currentTarget.dispatchEvent(O),!O.defaultPrevented){const k=C().filter(F=>F.focusable),K=k.find(F=>F.active),ue=k.find(F=>F.id===d),Ee=[K,ue,...k].filter(Boolean).map(F=>F.ref.current);Pt(Ee,f)}}E.current=!1}),onBlur:S(e.onBlur,()=>y(!1))})})}),Tt="RovingFocusGroupItem",Nt=o.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:s,children:l,...c}=e,h=ne(),m=s||h,f=Pr(Tt,n),u=f.currentTabStopId===m,v=Rt(n),{onFocusableItemAdd:b,onFocusableItemRemove:x,currentTabStopId:d}=f;return o.useEffect(()=>{if(r)return b(),()=>x()},[r,b,x]),i.jsx(Ke.ItemSlot,{scope:n,id:m,focusable:r,active:a,children:i.jsx(L.span,{tabIndex:u?0:-1,"data-orientation":f.orientation,...c,ref:t,onMouseDown:S(e.onMouseDown,p=>{r?f.onItemFocus(m):p.preventDefault()}),onFocus:S(e.onFocus,()=>f.onItemFocus(m)),onKeyDown:S(e.onKeyDown,p=>{if(p.key==="Tab"&&p.shiftKey){f.onItemShiftTab();return}if(p.target!==p.currentTarget)return;const g=Or(p,f.orientation,f.dir);if(g!==void 0){if(p.metaKey||p.ctrlKey||p.altKey||p.shiftKey)return;p.preventDefault();let w=v().filter(C=>C.focusable).map(C=>C.ref.current);if(g==="last")w.reverse();else if(g==="prev"||g==="next"){g==="prev"&&w.reverse();const C=w.indexOf(p.currentTarget);w=f.loop?Fr(w,C+1):w.slice(C+1)}setTimeout(()=>Pt(w))}}),children:typeof l=="function"?l({isCurrentTabStop:u,hasTabStop:d!=null}):l})})});Nt.displayName=Tt;var Ar={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function kr(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Or(e,t,n){const r=kr(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Ar[r]}function Pt(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Fr(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var jr=It,Lr=Nt,Ge=["Enter"," "],Kr=["ArrowDown","PageUp","Home"],Dt=["ArrowUp","PageDown","End"],Gr=[...Kr,...Dt],Ur={ltr:[...Ge,"ArrowRight"],rtl:[...Ge,"ArrowLeft"]},Br={ltr:["ArrowLeft"],rtl:["ArrowRight"]},ce="Menu",[re,$r,Wr]=mt(ce),[V,At]=xe(ce,[Wr,lt,_t]),se=lt(),kt=_t(),[Ot,B]=V(ce),[Vr,ie]=V(ce),Ft=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:s,modal:l=!0}=e,c=se(t),[h,m]=o.useState(null),f=o.useRef(!1),u=Q(s),v=vt(a);return o.useEffect(()=>{const b=()=>{f.current=!0,document.addEventListener("pointerdown",x,{capture:!0,once:!0}),document.addEventListener("pointermove",x,{capture:!0,once:!0})},x=()=>f.current=!1;return document.addEventListener("keydown",b,{capture:!0}),()=>{document.removeEventListener("keydown",b,{capture:!0}),document.removeEventListener("pointerdown",x,{capture:!0}),document.removeEventListener("pointermove",x,{capture:!0})}},[]),i.jsx(dt,{...c,children:i.jsx(Ot,{scope:t,open:n,onOpenChange:u,content:h,onContentChange:m,children:i.jsx(Vr,{scope:t,onClose:o.useCallback(()=>u(!1),[u]),isUsingKeyboardRef:f,dir:v,modal:l,children:r})})})};Ft.displayName=ce;var zr="MenuAnchor",Be=o.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=se(n);return i.jsx(Mn,{...a,...r,ref:t})});Be.displayName=zr;var $e="MenuPortal",[qr,jt]=V($e,{forceMount:void 0}),Lt=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:a}=e,s=B($e,t);return i.jsx(qr,{scope:t,forceMount:n,children:i.jsx(Ce,{present:n||s.open,children:i.jsx(wn,{asChild:!0,container:a,children:r})})})};Lt.displayName=$e;var P="MenuContent",[Yr,We]=V(P),Kt=o.forwardRef((e,t)=>{const n=jt(P,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,s=B(P,e.__scopeMenu),l=ie(P,e.__scopeMenu);return i.jsx(re.Provider,{scope:e.__scopeMenu,children:i.jsx(Ce,{present:r||s.open,children:i.jsx(re.Slot,{scope:e.__scopeMenu,children:l.modal?i.jsx(Xr,{...a,ref:t}):i.jsx(Hr,{...a,ref:t})})})})}),Xr=o.forwardRef((e,t)=>{const n=B(P,e.__scopeMenu),r=o.useRef(null),a=j(t,r);return o.useEffect(()=>{const s=r.current;if(s)return Vn(s)},[]),i.jsx(Ve,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:S(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Hr=o.forwardRef((e,t)=>{const n=B(P,e.__scopeMenu);return i.jsx(Ve,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Zr=je("MenuContent.ScrollLock"),Ve=o.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:s,onCloseAutoFocus:l,disableOutsidePointerEvents:c,onEntryFocus:h,onEscapeKeyDown:m,onPointerDownOutside:f,onFocusOutside:u,onInteractOutside:v,onDismiss:b,disableOutsideScroll:x,...d}=e,p=B(P,n),g=ie(P,n),y=se(n),w=kt(n),C=$r(n),[E,R]=o.useState(null),_=o.useRef(null),I=j(t,_,p.onContentChange),A=o.useRef(0),O=o.useRef(""),k=o.useRef(0),K=o.useRef(null),ue=o.useRef("right"),le=o.useRef(0),Ee=x?Et:o.Fragment,F=x?{as:Zr,allowPinchZoom:!0}:void 0,gn=M=>{const q=O.current+M,$=C().filter(N=>!N.disabled),J=document.activeElement,Re=$.find(N=>N.ref.current===J)?.textValue,_e=$.map(N=>N.textValue),He=uo(_e,q,Re),ee=$.find(N=>N.textValue===He)?.ref.current;(function N(Ze){O.current=Ze,window.clearTimeout(A.current),Ze!==""&&(A.current=window.setTimeout(()=>N(""),1e3))})(q),ee&&setTimeout(()=>ee.focus())};o.useEffect(()=>()=>window.clearTimeout(A.current),[]),kn();const z=o.useCallback(M=>ue.current===K.current?.side&&fo(M,K.current?.area),[]);return i.jsx(Yr,{scope:n,searchRef:O,onItemEnter:o.useCallback(M=>{z(M)&&M.preventDefault()},[z]),onItemLeave:o.useCallback(M=>{z(M)||(_.current?.focus(),R(null))},[z]),onTriggerLeave:o.useCallback(M=>{z(M)&&M.preventDefault()},[z]),pointerGraceTimerRef:k,onPointerGraceIntentChange:o.useCallback(M=>{K.current=M},[]),children:i.jsx(Ee,{...F,children:i.jsx(ht,{asChild:!0,trapped:a,onMountAutoFocus:S(s,M=>{M.preventDefault(),_.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:l,children:i.jsx(xn,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:m,onPointerDownOutside:f,onFocusOutside:u,onInteractOutside:v,onDismiss:b,children:i.jsx(jr,{asChild:!0,...w,dir:g.dir,orientation:"vertical",loop:r,currentTabStopId:E,onCurrentTabStopIdChange:R,onEntryFocus:S(h,M=>{g.isUsingKeyboardRef.current||M.preventDefault()}),preventScrollOnEntryFocus:!0,children:i.jsx(Cn,{role:"menu","aria-orientation":"vertical","data-state":nn(p.open),"data-radix-menu-content":"",dir:g.dir,...y,...d,ref:I,style:{outline:"none",...d.style},onKeyDown:S(d.onKeyDown,M=>{const $=M.target.closest("[data-radix-menu-content]")===M.currentTarget,J=M.ctrlKey||M.altKey||M.metaKey,Re=M.key.length===1;$&&(M.key==="Tab"&&M.preventDefault(),!J&&Re&&gn(M.key));const _e=_.current;if(M.target!==_e||!Gr.includes(M.key))return;M.preventDefault();const ee=C().filter(N=>!N.disabled).map(N=>N.ref.current);Dt.includes(M.key)&&ee.reverse(),so(ee)}),onBlur:S(e.onBlur,M=>{M.currentTarget.contains(M.target)||(window.clearTimeout(A.current),O.current="")}),onPointerMove:S(e.onPointerMove,oe(M=>{const q=M.target,$=le.current!==M.clientX;if(M.currentTarget.contains(q)&&$){const J=M.clientX>le.current?"right":"left";ue.current=J,le.current=M.clientX}}))})})})})})})});Kt.displayName=P;var Qr="MenuGroup",ze=o.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(L.div,{role:"group",...r,ref:t})});ze.displayName=Qr;var Jr="MenuLabel",Gt=o.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(L.div,{...r,ref:t})});Gt.displayName=Jr;var ge="MenuItem",ut="menu.itemSelect",ye=o.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...a}=e,s=o.useRef(null),l=ie(ge,e.__scopeMenu),c=We(ge,e.__scopeMenu),h=j(t,s),m=o.useRef(!1),f=()=>{const u=s.current;if(!n&&u){const v=new CustomEvent(ut,{bubbles:!0,cancelable:!0});u.addEventListener(ut,b=>r?.(b),{once:!0}),bn(u,v),v.defaultPrevented?m.current=!1:l.onClose()}};return i.jsx(Ut,{...a,ref:h,disabled:n,onClick:S(e.onClick,f),onPointerDown:u=>{e.onPointerDown?.(u),m.current=!0},onPointerUp:S(e.onPointerUp,u=>{m.current||u.currentTarget?.click()}),onKeyDown:S(e.onKeyDown,u=>{const v=c.searchRef.current!=="";n||v&&u.key===" "||Ge.includes(u.key)&&(u.currentTarget.click(),u.preventDefault())})})});ye.displayName=ge;var Ut=o.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:a,...s}=e,l=We(ge,n),c=kt(n),h=o.useRef(null),m=j(t,h),[f,u]=o.useState(!1),[v,b]=o.useState("");return o.useEffect(()=>{const x=h.current;x&&b((x.textContent??"").trim())},[s.children]),i.jsx(re.ItemSlot,{scope:n,disabled:r,textValue:a??v,children:i.jsx(Lr,{asChild:!0,...c,focusable:!r,children:i.jsx(L.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:m,onPointerMove:S(e.onPointerMove,oe(x=>{r?l.onItemLeave(x):(l.onItemEnter(x),x.defaultPrevented||x.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:S(e.onPointerLeave,oe(x=>l.onItemLeave(x))),onFocus:S(e.onFocus,()=>u(!0)),onBlur:S(e.onBlur,()=>u(!1))})})})}),eo="MenuCheckboxItem",Bt=o.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...a}=e;return i.jsx(qt,{scope:e.__scopeMenu,checked:n,children:i.jsx(ye,{role:"menuitemcheckbox","aria-checked":we(n)?"mixed":n,...a,ref:t,"data-state":Xe(n),onSelect:S(a.onSelect,()=>r?.(we(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Bt.displayName=eo;var $t="MenuRadioGroup",[to,no]=V($t,{value:void 0,onValueChange:()=>{}}),Wt=o.forwardRef((e,t)=>{const{value:n,onValueChange:r,...a}=e,s=Q(r);return i.jsx(to,{scope:e.__scopeMenu,value:n,onValueChange:s,children:i.jsx(ze,{...a,ref:t})})});Wt.displayName=$t;var Vt="MenuRadioItem",zt=o.forwardRef((e,t)=>{const{value:n,...r}=e,a=no(Vt,e.__scopeMenu),s=n===a.value;return i.jsx(qt,{scope:e.__scopeMenu,checked:s,children:i.jsx(ye,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":Xe(s),onSelect:S(r.onSelect,()=>a.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});zt.displayName=Vt;var qe="MenuItemIndicator",[qt,ro]=V(qe,{checked:!1}),Yt=o.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...a}=e,s=ro(qe,n);return i.jsx(Ce,{present:r||we(s.checked)||s.checked===!0,children:i.jsx(L.span,{...a,ref:t,"data-state":Xe(s.checked)})})});Yt.displayName=qe;var oo="MenuSeparator",Xt=o.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return i.jsx(L.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Xt.displayName=oo;var ao="MenuArrow",Ht=o.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,a=se(n);return i.jsx(yn,{...a,...r,ref:t})});Ht.displayName=ao;var Ye="MenuSub",[co,Zt]=V(Ye),Qt=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:a}=e,s=B(Ye,t),l=se(t),[c,h]=o.useState(null),[m,f]=o.useState(null),u=Q(a);return o.useEffect(()=>(s.open===!1&&u(!1),()=>u(!1)),[s.open,u]),i.jsx(dt,{...l,children:i.jsx(Ot,{scope:t,open:r,onOpenChange:u,content:m,onContentChange:f,children:i.jsx(co,{scope:t,contentId:ne(),triggerId:ne(),trigger:c,onTriggerChange:h,children:n})})})};Qt.displayName=Ye;var te="MenuSubTrigger",Jt=o.forwardRef((e,t)=>{const n=B(te,e.__scopeMenu),r=ie(te,e.__scopeMenu),a=Zt(te,e.__scopeMenu),s=We(te,e.__scopeMenu),l=o.useRef(null),{pointerGraceTimerRef:c,onPointerGraceIntentChange:h}=s,m={__scopeMenu:e.__scopeMenu},f=o.useCallback(()=>{l.current&&window.clearTimeout(l.current),l.current=null},[]);return o.useEffect(()=>f,[f]),o.useEffect(()=>{const u=c.current;return()=>{window.clearTimeout(u),h(null)}},[c,h]),i.jsx(Be,{asChild:!0,...m,children:i.jsx(Ut,{id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":nn(n.open),...e,ref:ft(t,a.onTriggerChange),onClick:u=>{e.onClick?.(u),!(e.disabled||u.defaultPrevented)&&(u.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:S(e.onPointerMove,oe(u=>{s.onItemEnter(u),!u.defaultPrevented&&!e.disabled&&!n.open&&!l.current&&(s.onPointerGraceIntentChange(null),l.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:S(e.onPointerLeave,oe(u=>{f();const v=n.content?.getBoundingClientRect();if(v){const b=n.content?.dataset.side,x=b==="right",d=x?-5:5,p=v[x?"left":"right"],g=v[x?"right":"left"];s.onPointerGraceIntentChange({area:[{x:u.clientX+d,y:u.clientY},{x:p,y:v.top},{x:g,y:v.top},{x:g,y:v.bottom},{x:p,y:v.bottom}],side:b}),window.clearTimeout(c.current),c.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(u),u.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:S(e.onKeyDown,u=>{const v=s.searchRef.current!=="";e.disabled||v&&u.key===" "||Ur[r.dir].includes(u.key)&&(n.onOpenChange(!0),n.content?.focus(),u.preventDefault())})})})});Jt.displayName=te;var en="MenuSubContent",tn=o.forwardRef((e,t)=>{const n=jt(P,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,s=B(P,e.__scopeMenu),l=ie(P,e.__scopeMenu),c=Zt(en,e.__scopeMenu),h=o.useRef(null),m=j(t,h);return i.jsx(re.Provider,{scope:e.__scopeMenu,children:i.jsx(Ce,{present:r||s.open,children:i.jsx(re.Slot,{scope:e.__scopeMenu,children:i.jsx(Ve,{id:c.contentId,"aria-labelledby":c.triggerId,...a,ref:m,align:"start",side:l.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{l.isUsingKeyboardRef.current&&h.current?.focus(),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:S(e.onFocusOutside,f=>{f.target!==c.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:S(e.onEscapeKeyDown,f=>{l.onClose(),f.preventDefault()}),onKeyDown:S(e.onKeyDown,f=>{const u=f.currentTarget.contains(f.target),v=Br[l.dir].includes(f.key);u&&v&&(s.onOpenChange(!1),c.trigger?.focus(),f.preventDefault())})})})})})});tn.displayName=en;function nn(e){return e?"open":"closed"}function we(e){return e==="indeterminate"}function Xe(e){return we(e)?"indeterminate":e?"checked":"unchecked"}function so(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function io(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function uo(e,t,n){const a=t.length>1&&Array.from(t).every(m=>m===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let l=io(e,Math.max(s,0));a.length===1&&(l=l.filter(m=>m!==n));const h=l.find(m=>m.toLowerCase().startsWith(a.toLowerCase()));return h!==n?h:void 0}function lo(e,t){const{x:n,y:r}=e;let a=!1;for(let s=0,l=t.length-1;s<t.length;l=s++){const c=t[s],h=t[l],m=c.x,f=c.y,u=h.x,v=h.y;f>r!=v>r&&n<(u-m)*(r-f)/(v-f)+m&&(a=!a)}return a}function fo(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return lo(n,t)}function oe(e){return t=>t.pointerType==="mouse"?e(t):void 0}var po=Ft,vo=Be,mo=Lt,ho=Kt,go=ze,wo=Gt,bo=ye,xo=Bt,Co=Wt,Mo=zt,yo=Yt,So=Xt,Eo=Ht,Ro=Qt,_o=Jt,Io=tn,Se="DropdownMenu",[To]=xe(Se,[At]),T=At(),[No,rn]=To(Se),on=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:a,defaultOpen:s,onOpenChange:l,modal:c=!0}=e,h=T(t),m=o.useRef(null),[f,u]=Ue({prop:a,defaultProp:s??!1,onChange:l,caller:Se});return i.jsx(No,{scope:t,triggerId:ne(),triggerRef:m,contentId:ne(),open:f,onOpenChange:u,onOpenToggle:o.useCallback(()=>u(v=>!v),[u]),modal:c,children:i.jsx(po,{...h,open:f,onOpenChange:u,dir:r,modal:c,children:n})})};on.displayName=Se;var an="DropdownMenuTrigger",cn=o.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...a}=e,s=rn(an,n),l=T(n);return i.jsx(vo,{asChild:!0,...l,children:i.jsx(L.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...a,ref:ft(t,s.triggerRef),onPointerDown:S(e.onPointerDown,c=>{!r&&c.button===0&&c.ctrlKey===!1&&(s.onOpenToggle(),s.open||c.preventDefault())}),onKeyDown:S(e.onKeyDown,c=>{r||(["Enter"," "].includes(c.key)&&s.onOpenToggle(),c.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(c.key)&&c.preventDefault())})})})});cn.displayName=an;var Po="DropdownMenuPortal",sn=e=>{const{__scopeDropdownMenu:t,...n}=e,r=T(t);return i.jsx(mo,{...r,...n})};sn.displayName=Po;var un="DropdownMenuContent",ln=o.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=rn(un,n),s=T(n),l=o.useRef(!1);return i.jsx(ho,{id:a.contentId,"aria-labelledby":a.triggerId,...s,...r,ref:t,onCloseAutoFocus:S(e.onCloseAutoFocus,c=>{l.current||a.triggerRef.current?.focus(),l.current=!1,c.preventDefault()}),onInteractOutside:S(e.onInteractOutside,c=>{const h=c.detail.originalEvent,m=h.button===0&&h.ctrlKey===!0,f=h.button===2||m;(!a.modal||f)&&(l.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)"}})});ln.displayName=un;var Do="DropdownMenuGroup",Ao=o.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=T(n);return i.jsx(go,{...a,...r,ref:t})});Ao.displayName=Do;var ko="DropdownMenuLabel",dn=o.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=T(n);return i.jsx(wo,{...a,...r,ref:t})});dn.displayName=ko;var Oo="DropdownMenuItem",fn=o.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=T(n);return i.jsx(bo,{...a,...r,ref:t})});fn.displayName=Oo;var Fo="DropdownMenuCheckboxItem",jo=o.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=T(n);return i.jsx(xo,{...a,...r,ref:t})});jo.displayName=Fo;var Lo="DropdownMenuRadioGroup",Ko=o.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=T(n);return i.jsx(Co,{...a,...r,ref:t})});Ko.displayName=Lo;var Go="DropdownMenuRadioItem",Uo=o.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=T(n);return i.jsx(Mo,{...a,...r,ref:t})});Uo.displayName=Go;var Bo="DropdownMenuItemIndicator",$o=o.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=T(n);return i.jsx(yo,{...a,...r,ref:t})});$o.displayName=Bo;var Wo="DropdownMenuSeparator",pn=o.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=T(n);return i.jsx(So,{...a,...r,ref:t})});pn.displayName=Wo;var Vo="DropdownMenuArrow",zo=o.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=T(n);return i.jsx(Eo,{...a,...r,ref:t})});zo.displayName=Vo;var qo=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:a,defaultOpen:s}=e,l=T(t),[c,h]=Ue({prop:r,defaultProp:s??!1,onChange:a,caller:"DropdownMenuSub"});return i.jsx(Ro,{...l,open:c,onOpenChange:h,children:n})},Yo="DropdownMenuSubTrigger",vn=o.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=T(n);return i.jsx(_o,{...a,...r,ref:t})});vn.displayName=Yo;var Xo="DropdownMenuSubContent",mn=o.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=T(n);return i.jsx(Io,{...a,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});mn.displayName=Xo;var Ho=on,Zo=cn,hn=sn,Qo=ln,Jo=dn,ea=fn,ta=pn,na=qo,ra=vn,oa=mn;function ia({...e}){return i.jsx(Ho,{"data-slot":"dropdown-menu",...e})}function ua({...e}){return i.jsx(hn,{"data-slot":"dropdown-menu-portal",...e})}function la({...e}){return i.jsx(Zo,{"data-slot":"dropdown-menu-trigger",className:"text-text-primary hover:text-text-highlight disabled:text-text-tertiary active:text-text-secondary",...e})}function da({className:e,sideOffset:t=4,...n}){return i.jsx(hn,{children:i.jsx(Qo,{"data-slot":"dropdown-menu-content",sideOffset:t,className:D(["bg-bg-primary","p-md","data-[state=open]:animate-in","data-[state=closed]:animate-out","data-[state=closed]:fade-out-0","data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95","data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2","data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2","data-[side=top]:slide-in-from-bottom-2","relative","z-50","max-h-(--radix-dropdown-menu-content-available-height)","origin-(--radix-dropdown-menu-content-transform-origin)","overflow-x-hidden","overflow-y-auto","rounded-uk-md","shadow-[0_4px_16px_0_var(--color-shadow-secondary)]","liquid-dark:liquid-dark-bg","liquid-light:liquid-light-bg"],e),...n})})}function fa({className:e,inset:t,variant:n="default",...r}){return i.jsx(ea,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":n,className:D(["w-full","flex","gap-md","items-center","px-sm","py-xs","relative","cursor-default","rounded-uk-xs","text-uk-sm","leading-uk-sm","outline-hidden","select-none","hover:bg-bg-tertiary","data-[disabled]:pointer-events-none","data-[disabled]:text-bg-quaternary","[&_svg]:pointer-events-none","[&_svg]:shrink-0","[&_svg:not([class*='size-'])]:size-4","[&_svg:not([class*='text-'])]:text-muted-foreground"],e),...r})}function pa({className:e,inset:t,...n}){return i.jsx(Jo,{"data-slot":"dropdown-menu-label","data-inset":t,className:D("text-text-secondary text-uk-sm leading-uk-sm pb-lg pt-xs px-sm",e),...n})}function va({className:e,...t}){return i.jsx(ta,{"data-slot":"dropdown-menu-separator",className:D("bg-line-primary my-lg pointer-events-none h-px",e),...t})}function ma({className:e,...t}){return i.jsx("span",{"data-slot":"dropdown-menu-shortcut",className:D("text-text-tertiary text-uk-sm leading-uk-sm ml-auto",e),...t})}function ha({...e}){return i.jsx(na,{"data-slot":"dropdown-menu-sub",...e})}function ga({className:e,inset:t,children:n,...r}){return i.jsxs(ra,{"data-slot":"dropdown-menu-sub-trigger","data-inset":t,className:D("w-full","flex","gap-md","items-center","px-sm","py-xs","relative","cursor-default","rounded-uk-xs","text-uk-sm","leading-uk-sm","outline-hidden","select-none","hover:bg-bg-tertiary","data-[state=open]:bg-bg-tertiary","data-[disabled]:pointer-events-none","data-[disabled]:text-bg-quaternary","[&_svg]:pointer-events-none","[&_svg]:shrink-0","[&_svg:not([class*='size-'])]:size-4","[&_svg:not([class*='text-'])]:text-muted-foreground",e),...r,children:[n,i.jsx(Tn,{className:"ml-auto size-4"})]})}function wa({className:e,...t}){return i.jsx(oa,{"data-slot":"dropdown-menu-sub-content",className:D("bg-bg-primary","p-md","data-[state=open]:animate-in","data-[state=closed]:animate-out","data-[state=closed]:fade-out-0","data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95","data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2","data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2","data-[side=top]:slide-in-from-bottom-2","relative","z-50","max-h-(--radix-dropdown-menu-content-available-height)","origin-(--radix-dropdown-menu-content-transform-origin)","overflow-x-hidden","overflow-y-auto","rounded-uk-md","shadow-[0_4px_16px_0_var(--color-shadow-secondary)]","liquid-dark:liquid-dark-bg","liquid-light:liquid-light-bg",e),...t})}var Fe=Sn(["relative","flex","flex-col","rounded-uk-xl","bg-bg-primary","liquid-dark:liquid-dark-bg","liquid-light:liquid-light-bg"],{variants:{size:{sm:"p-sm",md:"p-md",lg:"p-lg",xl:"p-xl"}},defaultVariants:{size:"lg"}});function ba({className:e,size:t,collapsible:n,collapsedContent:r,defaultCollapsed:a=!1,children:s,...l}){const[c,h]=o.useState(a);return n?c?i.jsxs("div",{"data-slot":"card",className:D(Fe({size:t}),"flex-row justify-between",e),...l,children:[r,i.jsx("div",{className:"right-lg absolute top-1/2 h-6 -translate-y-1/2",children:i.jsx(Qe,{variant:"ghost",size:"sm",icon:!0,onClick:()=>h(!1),className:"hover:bg-shadow-secondary",children:i.jsx(_n,{strokeWidth:1.5,className:"text-icon-primary size-4"})})})]}):i.jsxs("div",{"data-slot":"card",className:D(Fe({size:t,className:e})),...l,children:[i.jsx("div",{className:"right-lg top-lg absolute",children:i.jsx(Qe,{variant:"ghost",size:"sm",icon:!0,onClick:()=>h(!0),className:"hover:bg-shadow-secondary",children:i.jsx(Pn,{strokeWidth:1.5,className:"text-icon-primary size-4"})})}),s]}):i.jsx("div",{"data-slot":"card",className:D(Fe({size:t,className:e})),...l,children:s})}function xa({className:e,...t}){return i.jsx("div",{"data-slot":"card-content",className:D("",e),...t})}export{vo as A,Io as B,ba as C,ia as D,ma as E,ht as F,go as G,_t as H,bo as I,Lr as J,jr as K,wo as L,mo as P,Et as R,So as S,sa as X,la as a,da as b,fa as c,xa as d,pa as e,va as f,Tn as g,ha as h,ga as i,ua as j,wa as k,Vn as l,_n as m,Pn as n,mt as o,vt as p,At as q,ho as r,po as s,xo as t,kn as u,Co as v,Mo as w,yo as x,Eo as y,_o as z};
