import{I as e,N as t,P as n,b as r,gt as i,ht as a,j as o,m as s,p as c,rt as l,v as u,w as d,y as f,yt as p}from"./client-DXlIdAPE.js";import{V as m,a as h}from"./light-BIsOPw8z.js";import{d as g,u as _}from"./Card-Bu4e9QvF.js";import{t as v}from"./flatten-bHHhXrku.js";function y(e){let t=i(!!e.value);if(t.value)return a(t);let n=l(e,e=>{e&&(t.value=!0,n())});return a(t)}function b(){return n()!==null}var x=typeof window<`u`,S=s(`n-drawer-body`);s(`n-drawer`);var C=s(`n-modal-body`),w=s(`n-modal-provider`),T=s(`n-modal`),E=s(`n-popover-body`);function D(e,t,n=`default`){let r=t[n];if(r===void 0)throw Error(`[vueuc/${e}]: slot[${n}] is empty.`);return r()}function O(e,t=!0,n=[]){return e.forEach(e=>{if(e!==null){if(typeof e!=`object`){(typeof e==`string`||typeof e==`number`)&&n.push(o(String(e)));return}if(Array.isArray(e)){O(e,t,n);return}if(e.type===f){if(e.children===null)return;Array.isArray(e.children)&&O(e.children,t,n)}else e.type!==u&&n.push(e)}}),n}function k(e,t,n=`default`){let r=t[n];if(r===void 0)throw Error(`[vueuc/${e}]: slot[${n}] is empty.`);let i=O(r());if(i.length===1)return i[0];throw Error(`[vueuc/${e}]: slot[${n}] should have exactly one child.`)}var A=`@@coContext`,j={mounted(e,{value:t,modifiers:n}){e[A]={handler:void 0},typeof t==`function`&&(e[A].handler=t,g(`clickoutside`,e,t,{capture:n.capture}))},updated(e,{value:t,modifiers:n}){let r=e[A];typeof t==`function`?r.handler?r.handler!==t&&(_(`clickoutside`,e,r.handler,{capture:n.capture}),r.handler=t,g(`clickoutside`,e,t,{capture:n.capture})):(e[A].handler=t,g(`clickoutside`,e,t,{capture:n.capture})):r.handler&&=(_(`clickoutside`,e,r.handler,{capture:n.capture}),void 0)},unmounted(e,{modifiers:t}){let{handler:n}=e[A];n&&_(`clickoutside`,e,n,{capture:t.capture}),e[A].handler=void 0}};function M(e,t){console.error(`[vdirs/${e}]: ${t}`)}var N=new class{constructor(){this.elementZIndex=new Map,this.nextZIndex=2e3}get elementCount(){return this.elementZIndex.size}ensureZIndex(e,t){let{elementZIndex:n}=this;if(t!==void 0){e.style.zIndex=`${t}`,n.delete(e);return}let{nextZIndex:r}=this;n.has(e)&&n.get(e)+1===this.nextZIndex||(e.style.zIndex=`${r}`,n.set(e,r),this.nextZIndex=r+1,this.squashState())}unregister(e,t){let{elementZIndex:n}=this;n.has(e)?n.delete(e):t===void 0&&M(`z-index-manager/unregister-element`,`Element not found when unregistering.`),this.squashState()}squashState(){let{elementCount:e}=this;e||(this.nextZIndex=2e3),this.nextZIndex-e>2500&&this.rearrange()}rearrange(){let e=Array.from(this.elementZIndex.entries());e.sort((e,t)=>e[1]-t[1]),this.nextZIndex=2e3,e.forEach(e=>{let t=e[0],n=this.nextZIndex++;`${n}`!==t.style.zIndex&&(t.style.zIndex=`${n}`)})}},P=`@@ziContext`,F={mounted(e,t){let{value:n={}}=t,{zIndex:r,enabled:i}=n;e[P]={enabled:!!i,initialized:!1},i&&(N.ensureZIndex(e,r),e[P].initialized=!0)},updated(e,t){let{value:n={}}=t,{zIndex:r,enabled:i}=n,a=e[P].enabled;i&&!a&&(N.ensureZIndex(e,r),e[P].initialized=!0),e[P].enabled=!!i},unmounted(e,t){if(!e[P].initialized)return;let{value:n={}}=t,{zIndex:r}=n;N.unregister(e,r)}},I=t({name:`LazyTeleport`,props:{to:{type:[String,Object],default:void 0},disabled:Boolean,show:{type:Boolean,required:!0}},setup(e){return{showTeleport:y(p(e,`show`)),mergedTo:d(()=>{let{to:t}=e;return t??`body`})}},render(){return this.showTeleport?this.disabled?D(`lazy-teleport`,this.$slots):e(r,{disabled:this.disabled,to:this.mergedTo},D(`lazy-teleport`,this.$slots)):null}});function L(e,t=`default`,n=void 0){let r=e[t];if(!r)return c(`getFirstSlotVNode`,`slot[${t}] is empty`),null;let i=v(r(n));return i.length===1?i[0]:(c(`getFirstSlotVNode`,`slot[${t}] should have exactly one child`),null)}function R(e,t,n){if(!t)return null;let r=v(t(n));return r.length===1?r[0]:(c(`getFirstSlotVNode`,`slot[${e}] should have exactly one child`),null)}var{cubicBezierEaseIn:z,cubicBezierEaseOut:B}=h;function V({transformOrigin:e=`inherit`,duration:t=`.2s`,enterScale:n=`.9`,originalTransform:r=``,originalTransition:i=``}={}){return[m(`&.fade-in-scale-up-transition-leave-active`,{transformOrigin:e,transition:`opacity ${t} ${z}, transform ${t} ${z} ${i&&`,${i}`}`}),m(`&.fade-in-scale-up-transition-enter-active`,{transformOrigin:e,transition:`opacity ${t} ${B}, transform ${t} ${B} ${i&&`,${i}`}`}),m(`&.fade-in-scale-up-transition-enter-from, &.fade-in-scale-up-transition-leave-to`,{opacity:0,transform:`${r} scale(${n})`}),m(`&.fade-in-scale-up-transition-leave-from, &.fade-in-scale-up-transition-enter-to`,{opacity:1,transform:`${r} scale(1)`})]}export{F as a,D as c,T as d,w as f,x as h,I as i,E as l,b as m,L as n,j as o,S as p,R as r,k as s,V as t,C as u};