import{c as re}from"./CizoJhol.js";import{e as oe,t as ie,i as C,f as $,g as ue,a as z,h as le,b as G,o as ce,j as de,k as fe}from"./D3G19UGw.js";import{q as g,r as E,J as _,aG as ve,T as D,x as X,aH as me,e as M,ao as pe,at as ye,P as he,L as P,ax as L,I as J,p as W,o as K,w as Q,E as q,i as S,y as Ee,j as be,aq as we}from"./DXY0EV56.js";import{r as ge,P as Z}from"./aGU4QzVP.js";function O(){let e=document.activeElement;if(e==null)return null;for(;e!=null&&e.shadowRoot!=null&&e.shadowRoot.activeElement!=null;)e=e.shadowRoot.activeElement;return e}function ee(e,t,n){const s=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&s.addEventListener(e,t,{once:!0}),s.dispatchEvent(i)}const[Oe]=re("ConfigProvider"),Se=oe(()=>{const e=E(new Map),t=E(),n=g(()=>{for(const d of e.value.values())if(d)return!0;return!1}),s=Oe({scrollBody:E(!0)});let i=null;const o=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.documentElement.style.removeProperty("--scrollbar-width"),document.body.style.overflow=t.value??"",$&&i?.(),t.value=void 0};return _(n,(d,f)=>{if(!C)return;if(!d){f&&o();return}t.value===void 0&&(t.value=document.body.style.overflow);const v=window.innerWidth-document.documentElement.clientWidth,m={padding:v,margin:0},a=s.scrollBody?.value?typeof s.scrollBody.value=="object"?ve({padding:s.scrollBody.value.padding===!0?v:s.scrollBody.value.padding,margin:s.scrollBody.value.margin===!0?v:s.scrollBody.value.margin},m):m:{padding:0,margin:0};v>0&&(document.body.style.paddingRight=typeof a.padding=="number"?`${a.padding}px`:String(a.padding),document.body.style.marginRight=typeof a.margin=="number"?`${a.margin}px`:String(a.margin),document.documentElement.style.setProperty("--scrollbar-width",`${v}px`),document.body.style.overflow="hidden"),$&&(i=ue(document,"touchmove",r=>Te(r),{passive:!1})),D(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})},{immediate:!0,flush:"sync"}),e});function Ze(e){const t=Math.random().toString(36).substring(2,7),n=Se();n.value.set(t,e??!1);const s=g({get:()=>n.value.get(t)??!1,set:i=>n.value.set(t,i)});return ie(()=>{n.value.delete(t)}),s}function te(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth1?!0:(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}var Ae=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},A=new WeakMap,F=new WeakMap,N={},x=0,ne=function(e){return e&&(e.host||ne(e.parentNode))},De=function(e,t){return t.map(function(n){if(e.contains(n))return n;var s=ne(n);return s&&e.contains(s)?s:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Pe=function(e,t,n,s){var i=De(t,Array.isArray(e)?e:[e]);N[n]||(N[n]=new WeakMap);var o=N[n],d=[],f=new Set,v=new Set(i),m=function(r){!r||f.has(r)||(f.add(r),m(r.parentNode))};i.forEach(m);var a=function(r){!r||v.has(r)||Array.prototype.forEach.call(r.children,function(c){if(f.has(c))a(c);else try{var h=c.getAttribute(s),u=h!==null&&h!=="false",p=(A.get(c)||0)+1,l=(o.get(c)||0)+1;A.set(c,p),o.set(c,l),d.push(c),p===1&&u&&F.set(c,!0),l===1&&c.setAttribute(n,"true"),u||c.setAttribute(s,"true")}catch(y){console.error("aria-hidden: cannot operate on ",c,y)}})};return a(t),f.clear(),x++,function(){d.forEach(function(r){var c=A.get(r)-1,h=o.get(r)-1;A.set(r,c),o.set(r,h),c||(F.has(r)||r.removeAttribute(s),F.delete(r)),h||r.removeAttribute(n)}),x--,x||(A=new WeakMap,A=new WeakMap,F=new WeakMap,N={})}},_e=function(e,t,n){n===void 0&&(n="data-aria-hidden");var s=Array.from(Array.isArray(e)?e:[e]),i=Ae(e);return i?(s.push.apply(s,Array.from(i.querySelectorAll("[aria-live], script"))),Pe(s,i,n,"aria-hidden")):function(){return null}};function et(e){let t;_(()=>z(e),n=>{n?t=_e(n):t&&t()}),X(()=>{t&&t()})}function tt(e,t="reka"){return`${t}-${me?.()}`}function Le(e,t){const n=E(e);function s(o){return t[n.value][o]??n.value}return{state:n,dispatch:o=>{n.value=s(o)}}}function Ce(e,t){const n=E({}),s=E("none"),i=E(e),o=e.value?"mounted":"unmounted";let d;const f=t.value?.ownerDocument.defaultView??le,{state:v,dispatch:m}=Le(o,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}}),a=l=>{if(C){const y=new CustomEvent(l,{bubbles:!1,cancelable:!1});t.value?.dispatchEvent(y)}};_(e,async(l,y)=>{const k=y!==l;if(await D(),k){const B=s.value,T=I(t.value);l?(m("MOUNT"),a("enter"),T==="none"&&a("after-enter")):T==="none"||T==="undefined"||n.value?.display==="none"?(m("UNMOUNT"),a("leave"),a("after-leave")):y&&B!==T?(m("ANIMATION_OUT"),a("leave")):(m("UNMOUNT"),a("after-leave"))}},{immediate:!0});const r=l=>{const y=I(t.value),k=y.includes(CSS.escape(l.animationName)),B=v.value==="mounted"?"enter":"leave";if(l.target===t.value&&k&&(a(`after-${B}`),m("ANIMATION_END"),!i.value)){const T=t.value.style.animationFillMode;t.value.style.animationFillMode="forwards",d=f?.setTimeout(()=>{t.value?.style.animationFillMode==="forwards"&&(t.value.style.animationFillMode=T)})}l.target===t.value&&y==="none"&&m("ANIMATION_END")},c=l=>{l.target===t.value&&(s.value=I(t.value))},h=_(t,(l,y)=>{l?(n.value=getComputedStyle(l),l.addEventListener("animationstart",c),l.addEventListener("animationcancel",r),l.addEventListener("animationend",r)):(m("ANIMATION_END"),d!==void 0&&f?.clearTimeout(d),y?.removeEventListener("animationstart",c),y?.removeEventListener("animationcancel",r),y?.removeEventListener("animationend",r))},{immediate:!0}),u=_(v,()=>{const l=I(t.value);s.value=v.value==="mounted"?l:"none"});return X(()=>{h(),u()}),{isPresent:g(()=>["mounted","unmountSuspended"].includes(v.value))}}function I(e){return e&&getComputedStyle(e).animationName||"none"}var nt=M({name:"Presence",props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:n}){const{present:s,forceMount:i}=pe(e),o=E(),{isPresent:d}=Ce(s,o);n({present:d});let f=t.default({present:d.value});f=ge(f||[]);const v=ye();if(f&&f?.length>1){const m=v?.parent?.type.name?`<${v.parent.type.name} />`:"component";throw new Error([`Detected an invalid children for \`${m}\` for \`Presence\` component.`,"","Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.","You can apply a few solutions:",["Provide a single child element so that `presence` directive attach correctly.","Ensure the first child is an actual element instead of a raw text node or comment node."].map(a=>` - ${a}`).join(` `)].join(` `))}return()=>i.value||s.value||d.value?he(t.default({present:d.value})[0],{ref:m=>{const a=z(m);return typeof a?.hasAttribute>"u"||(a?.hasAttribute("data-reka-popper-content-wrapper")?o.value=a.firstElementChild:o.value=a),a}}):null}});const Fe="dismissableLayer.pointerDownOutside",Ne="dismissableLayer.focusOutside";function se(e,t){const n=t.closest("[data-dismissable-layer]"),s=e.dataset.dismissableLayer===""?e:e.querySelector("[data-dismissable-layer]"),i=Array.from(e.ownerDocument.querySelectorAll("[data-dismissable-layer]"));return!!(n&&(s===n||i.indexOf(s){});return P(d=>{if(!C||!L(n))return;const f=async m=>{const a=m.target;if(!(!t?.value||!a)){if(se(t.value,a)){i.value=!1;return}if(m.target&&!i.value){let r=function(){ee(Fe,e,c)};const c={originalEvent:m};m.pointerType==="touch"?(s.removeEventListener("click",o.value),o.value=r,s.addEventListener("click",o.value,{once:!0})):r()}else s.removeEventListener("click",o.value);i.value=!1}},v=window.setTimeout(()=>{s.addEventListener("pointerdown",f)},0);d(()=>{window.clearTimeout(v),s.removeEventListener("pointerdown",f),s.removeEventListener("click",o.value)})}),{onPointerDownCapture:()=>{L(n)&&(i.value=!0)}}}function Me(e,t,n=!0){const s=t?.value?.ownerDocument??globalThis?.document,i=E(!1);return P(o=>{if(!C||!L(n))return;const d=async f=>{if(!t?.value)return;await D(),await D();const v=f.target;!t.value||!v||se(t.value,v)||f.target&&!i.value&&ee(Ne,e,{originalEvent:f})};s.addEventListener("focusin",d),o(()=>s.removeEventListener("focusin",d))}),{onFocusCapture:()=>{L(n)&&(i.value=!0)},onBlurCapture:()=>{L(n)&&(i.value=!1)}}}const b=J({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set});var ke=M({__name:"DismissableLayer",props:{disableOutsidePointerEvents:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["escapeKeyDown","pointerDownOutside","focusOutside","interactOutside","dismiss"],setup(e,{emit:t}){const n=e,s=t,{forwardRef:i,currentElement:o}=G(),d=g(()=>o.value?.ownerDocument??globalThis.document),f=g(()=>b.layersRoot),v=g(()=>o.value?Array.from(f.value).indexOf(o.value):-1),m=g(()=>b.layersWithOutsidePointerEventsDisabled.size>0),a=g(()=>{const u=Array.from(f.value),[p]=[...b.layersWithOutsidePointerEventsDisabled].slice(-1),l=u.indexOf(p);return v.value>=l}),r=Ie(async u=>{const p=[...b.branches].some(l=>l?.contains(u.target));!a.value||p||(s("pointerDownOutside",u),s("interactOutside",u),await D(),u.defaultPrevented||s("dismiss"))},o),c=Me(u=>{[...b.branches].some(l=>l?.contains(u.target))||(s("focusOutside",u),s("interactOutside",u),u.defaultPrevented||s("dismiss"))},o);ce("Escape",u=>{v.value===f.value.size-1&&(s("escapeKeyDown",u),u.defaultPrevented||s("dismiss"))});let h;return P(u=>{o.value&&(n.disableOutsidePointerEvents&&(b.layersWithOutsidePointerEventsDisabled.size===0&&(h=d.value.body.style.pointerEvents,d.value.body.style.pointerEvents="none"),b.layersWithOutsidePointerEventsDisabled.add(o.value)),f.value.add(o.value),u(()=>{n.disableOutsidePointerEvents&&b.layersWithOutsidePointerEventsDisabled.size===1&&(d.value.body.style.pointerEvents=h)}))}),P(u=>{u(()=>{o.value&&(f.value.delete(o.value),b.layersWithOutsidePointerEventsDisabled.delete(o.value))})}),(u,p)=>(K(),W(S(Z),{ref:S(i),"as-child":u.asChild,as:u.as,"data-dismissable-layer":"",style:Ee({pointerEvents:m.value?a.value?"auto":"none":void 0}),onFocusCapture:S(c).onFocusCapture,onBlurCapture:S(c).onBlurCapture,onPointerdownCapture:S(r).onPointerDownCapture},{default:Q(()=>[q(u.$slots,"default")]),_:3},8,["as-child","as","style","onFocusCapture","onBlurCapture","onPointerdownCapture"]))}}),st=ke;const Be=de(()=>E([]));function xe(){const e=Be();return{add(t){const n=e.value[0];t!==n&&n?.pause(),e.value=H(e.value,t),e.value.unshift(t)},remove(t){e.value=H(e.value,t),e.value[0]?.resume()}}}function H(e,t){const n=[...e],s=n.indexOf(t);return s!==-1&&n.splice(s,1),n}function Ue(e){return e.filter(t=>t.tagName!=="A")}const U="focusScope.autoFocusOnMount",R="focusScope.autoFocusOnUnmount",j={bubbles:!1,cancelable:!0};function Re(e,{select:t=!1}={}){const n=O();for(const s of e)if(w(s,{select:t}),O()!==n)return!0}function We(e){const t=ae(e),n=Y(t,e),s=Y(t.reverse(),e);return[n,s]}function ae(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const i=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||i?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Y(e,t){for(const n of e)if(!Ke(n,{upTo:t}))return n}function Ke(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 qe(e){return e instanceof HTMLInputElement&&"select"in e}function w(e,{select:t=!1}={}){if(e&&e.focus){const n=O();e.focus({preventScroll:!0}),e!==n&&qe(e)&&t&&e.select()}}var $e=M({__name:"FocusScope",props:{loop:{type:Boolean,required:!1,default:!1},trapped:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["mountAutoFocus","unmountAutoFocus"],setup(e,{emit:t}){const n=e,s=t,{currentRef:i,currentElement:o}=G(),d=E(null),f=xe(),v=J({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});P(a=>{if(!C)return;const r=o.value;if(!n.trapped)return;function c(l){if(v.paused||!r)return;const y=l.target;r.contains(y)?d.value=y:w(d.value,{select:!0})}function h(l){if(v.paused||!r)return;const y=l.relatedTarget;y!==null&&(r.contains(y)||w(d.value,{select:!0}))}function u(l){r.contains(d.value)||w(r)}document.addEventListener("focusin",c),document.addEventListener("focusout",h);const p=new MutationObserver(u);r&&p.observe(r,{childList:!0,subtree:!0}),a(()=>{document.removeEventListener("focusin",c),document.removeEventListener("focusout",h),p.disconnect()})}),P(async a=>{const r=o.value;if(await D(),!r)return;f.add(v);const c=O();if(!r.contains(c)){const u=new CustomEvent(U,j);r.addEventListener(U,p=>s("mountAutoFocus",p)),r.dispatchEvent(u),u.defaultPrevented||(Re(Ue(ae(r)),{select:!0}),O()===c&&w(r))}a(()=>{r.removeEventListener(U,l=>s("mountAutoFocus",l));const u=new CustomEvent(R,j),p=l=>{s("unmountAutoFocus",l)};r.addEventListener(R,p),r.dispatchEvent(u),setTimeout(()=>{u.defaultPrevented||w(c??document.body,{select:!0}),r.removeEventListener(R,p),f.remove(v)},0)})});function m(a){if(!n.loop&&!n.trapped||v.paused)return;const r=a.key==="Tab"&&!a.altKey&&!a.ctrlKey&&!a.metaKey,c=O();if(r&&c){const h=a.currentTarget,[u,p]=We(h);u&&p?!a.shiftKey&&c===p?(a.preventDefault(),n.loop&&w(u,{select:!0})):a.shiftKey&&c===u&&(a.preventDefault(),n.loop&&w(p,{select:!0})):c===h&&a.preventDefault()}}return(a,r)=>(K(),W(S(Z),{ref_key:"currentRef",ref:i,tabindex:"-1","as-child":a.asChild,as:a.as,onKeydown:m},{default:Q(()=>[q(a.$slots,"default")]),_:3},8,["as-child","as"]))}}),at=$e;const rt="menu.itemSelect",V=["Enter"," "],He=["ArrowDown","PageUp","Home"],je=["ArrowUp","PageDown","End"],ot=[...He,...je];[...V],[...V];function it(e){return e?"open":"closed"}function ut(e){const t=O();for(const n of e)if(n===t||(n.focus(),O()!==t))return}function Ye(e,t){const{x:n,y:s}=e;let i=!1;for(let o=0,d=t.length-1;os!=a>s&&n<(m-f)*(s-v)/(a-v)+f&&(i=!i)}return i}function lt(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Ye(n,t)}function ct(e){return e.pointerType==="mouse"}var Ve=M({__name:"Teleport",props:{to:{type:null,required:!1,default:"body"},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){const t=fe();return(n,s)=>S(t)||n.forceMount?(K(),W(we,{key:0,to:n.to,disabled:n.disabled,defer:n.defer},[q(n.$slots,"default")],8,["to","disabled","defer"])):be("v-if",!0)}}),dt=Ve;export{st as D,at as F,rt as I,je as L,nt as P,V as S,dt as T,Ze as a,et as b,it as c,lt as d,ot as e,ut as f,O as g,ee as h,Oe as i,ct as j,tt as u};