(function(c,K){typeof exports=="object"&&typeof module<"u"?module.exports=K(require("vue")):typeof define=="function"&&define.amd?define(["vue"],K):(c=typeof globalThis<"u"?globalThis:c||self,c["vue3-popper"]=K(c.Vue))})(this,function(c){"use strict";function K(e,t,r){var n,o,a,l,s;t==null&&(t=100);function i(){var f=Date.now()-l;f=0?n=setTimeout(i,t-f):(n=null,r||(s=e.apply(a,o),a=o=null))}var p=function(){a=this,o=arguments,l=Date.now();var f=r&&!n;return n||(n=setTimeout(i,t)),f&&(s=e.apply(a,o),a=o=null),s};return p.clear=function(){n&&(clearTimeout(n),n=null)},p.flush=function(){n&&(s=e.apply(a,o),a=o=null,clearTimeout(n),n=null)},p}K.debounce=K;var xe=K;function ft(e,t,r){c.isRef(e)?c.watch(e,(n,o)=>{o==null||o.removeEventListener(t,r),n==null||n.addEventListener(t,r)}):c.onMounted(()=>{e.addEventListener(t,r)}),c.onBeforeUnmount(()=>{var n;(n=c.unref(e))==null||n.removeEventListener(t,r)})}function lt(e,t){const r="pointerdown";return typeof window>"u"||!window?void 0:ft(window,r,o=>{const a=c.unref(e);a&&(a===o.target||o.composedPath().includes(a)||t(o))})}function ct(e,t,r){let n=null;const o=c.ref(!1);c.onMounted(()=>{(e.content!==void 0||r.value)&&(o.value=!0),n=new MutationObserver(a),n.observe(t.value,{childList:!0,subtree:!0})}),c.onBeforeUnmount(()=>n.disconnect()),c.watch(r,l=>{l?o.value=!0:o.value=!1});const a=()=>{e.content?o.value=!0:o.value=!1};return{hasContent:o}}function j(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function _(e){var t=j(e).Element;return e instanceof t||e instanceof Element}function W(e){var t=j(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Oe(e){if(typeof ShadowRoot>"u")return!1;var t=j(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}var G=Math.max,ve=Math.min,Z=Math.round;function Ee(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Me(){return!/^((?!chrome|android).)*safari/i.test(Ee())}function ee(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),o=1,a=1;t&&W(e)&&(o=e.offsetWidth>0&&Z(n.width)/e.offsetWidth||1,a=e.offsetHeight>0&&Z(n.height)/e.offsetHeight||1);var l=_(e)?j(e):window,s=l.visualViewport,i=!Me()&&r,p=(n.left+(i&&s?s.offsetLeft:0))/o,f=(n.top+(i&&s?s.offsetTop:0))/a,y=n.width/o,g=n.height/a;return{width:y,height:g,top:f,right:p+y,bottom:f+g,left:p,x:p,y:f}}function Pe(e){var t=j(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function pt(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function ut(e){return e===j(e)||!W(e)?Pe(e):pt(e)}function q(e){return e?(e.nodeName||"").toLowerCase():null}function X(e){return((_(e)?e.ownerDocument:e.document)||window.document).documentElement}function Ae(e){return ee(X(e)).left+Pe(e).scrollLeft}function U(e){return j(e).getComputedStyle(e)}function ke(e){var t=U(e),r=t.overflow,n=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+o+n)}function dt(e){var t=e.getBoundingClientRect(),r=Z(t.width)/e.offsetWidth||1,n=Z(t.height)/e.offsetHeight||1;return r!==1||n!==1}function vt(e,t,r){r===void 0&&(r=!1);var n=W(t),o=W(t)&&dt(t),a=X(t),l=ee(e,o,r),s={scrollLeft:0,scrollTop:0},i={x:0,y:0};return(n||!n&&!r)&&((q(t)!=="body"||ke(a))&&(s=ut(t)),W(t)?(i=ee(t,!0),i.x+=t.clientLeft,i.y+=t.clientTop):a&&(i.x=Ae(a))),{x:l.left+s.scrollLeft-i.x,y:l.top+s.scrollTop-i.y,width:l.width,height:l.height}}function De(e){var t=ee(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function me(e){return q(e)==="html"?e:e.assignedSlot||e.parentNode||(Oe(e)?e.host:null)||X(e)}function Ne(e){return["html","body","#document"].indexOf(q(e))>=0?e.ownerDocument.body:W(e)&&ke(e)?e:Ne(me(e))}function ie(e,t){var r;t===void 0&&(t=[]);var n=Ne(e),o=n===((r=e.ownerDocument)==null?void 0:r.body),a=j(n),l=o?[a].concat(a.visualViewport||[],ke(n)?n:[]):n,s=t.concat(l);return o?s:s.concat(ie(me(l)))}function mt(e){return["table","td","th"].indexOf(q(e))>=0}function We(e){return!W(e)||U(e).position==="fixed"?null:e.offsetParent}function ht(e){var t=/firefox/i.test(Ee()),r=/Trident/i.test(Ee());if(r&&W(e)){var n=U(e);if(n.position==="fixed")return null}var o=me(e);for(Oe(o)&&(o=o.host);W(o)&&["html","body"].indexOf(q(o))<0;){var a=U(o);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return o;o=o.parentNode}return null}function se(e){for(var t=j(e),r=We(e);r&&mt(r)&&U(r).position==="static";)r=We(r);return r&&(q(r)==="html"||q(r)==="body"&&U(r).position==="static")?t:r||ht(e)||t}var R="top",I="bottom",V="right",L="left",Be="auto",fe=[R,I,V,L],te="start",le="end",yt="clippingParents",Ie="viewport",ce="popper",gt="reference",Ve=fe.reduce(function(e,t){return e.concat([t+"-"+te,t+"-"+le])},[]),He=[].concat(fe,[Be]).reduce(function(e,t){return e.concat([t,t+"-"+te,t+"-"+le])},[]),bt="beforeRead",wt="read",xt="afterRead",Ot="beforeMain",Et="main",Pt="afterMain",At="beforeWrite",kt="write",Dt="afterWrite",Bt=[bt,wt,xt,Ot,Et,Pt,At,kt,Dt];function Ct(e){var t=new Map,r=new Set,n=[];e.forEach(function(a){t.set(a.name,a)});function o(a){r.add(a.name);var l=[].concat(a.requires||[],a.requiresIfExists||[]);l.forEach(function(s){if(!r.has(s)){var i=t.get(s);i&&o(i)}}),n.push(a)}return e.forEach(function(a){r.has(a.name)||o(a)}),n}function $t(e){var t=Ct(e);return Bt.reduce(function(r,n){return r.concat(t.filter(function(o){return o.phase===n}))},[])}function St(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function Tt(e){var t=e.reduce(function(r,n){var o=r[n.name];return r[n.name]=o?Object.assign({},o,n,{options:Object.assign({},o.options,n.options),data:Object.assign({},o.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}function jt(e,t){var r=j(e),n=X(e),o=r.visualViewport,a=n.clientWidth,l=n.clientHeight,s=0,i=0;if(o){a=o.width,l=o.height;var p=Me();(p||!p&&t==="fixed")&&(s=o.offsetLeft,i=o.offsetTop)}return{width:a,height:l,x:s+Ae(e),y:i}}function Rt(e){var t,r=X(e),n=Pe(e),o=(t=e.ownerDocument)==null?void 0:t.body,a=G(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),l=G(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),s=-n.scrollLeft+Ae(e),i=-n.scrollTop;return U(o||r).direction==="rtl"&&(s+=G(r.clientWidth,o?o.clientWidth:0)-a),{width:a,height:l,x:s,y:i}}function Fe(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&Oe(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function Ce(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Lt(e,t){var r=ee(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function qe(e,t,r){return t===Ie?Ce(jt(e,r)):_(t)?Lt(t,r):Ce(Rt(X(e)))}function Mt(e){var t=ie(me(e)),r=["absolute","fixed"].indexOf(U(e).position)>=0,n=r&&W(e)?se(e):e;return _(n)?t.filter(function(o){return _(o)&&Fe(o,n)&&q(o)!=="body"}):[]}function Nt(e,t,r,n){var o=t==="clippingParents"?Mt(e):[].concat(t),a=[].concat(o,[r]),l=a[0],s=a.reduce(function(i,p){var f=qe(e,p,n);return i.top=G(f.top,i.top),i.right=ve(f.right,i.right),i.bottom=ve(f.bottom,i.bottom),i.left=G(f.left,i.left),i},qe(e,l,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function z(e){return e.split("-")[0]}function re(e){return e.split("-")[1]}function $e(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function ze(e){var t=e.reference,r=e.element,n=e.placement,o=n?z(n):null,a=n?re(n):null,l=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,i;switch(o){case R:i={x:l,y:t.y-r.height};break;case I:i={x:l,y:t.y+t.height};break;case V:i={x:t.x+t.width,y:s};break;case L:i={x:t.x-r.width,y:s};break;default:i={x:t.x,y:t.y}}var p=o?$e(o):null;if(p!=null){var f=p==="y"?"height":"width";switch(a){case te:i[p]=i[p]-(t[f]/2-r[f]/2);break;case le:i[p]=i[p]+(t[f]/2-r[f]/2);break}}return i}function Ue(){return{top:0,right:0,bottom:0,left:0}}function Xe(e){return Object.assign({},Ue(),e)}function Ye(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}function Se(e,t){t===void 0&&(t={});var r=t,n=r.placement,o=n===void 0?e.placement:n,a=r.strategy,l=a===void 0?e.strategy:a,s=r.boundary,i=s===void 0?yt:s,p=r.rootBoundary,f=p===void 0?Ie:p,y=r.elementContext,g=y===void 0?ce:y,u=r.altBoundary,x=u===void 0?!1:u,d=r.padding,v=d===void 0?0:d,b=Xe(typeof v!="number"?v:Ye(v,fe)),E=g===ce?gt:ce,P=e.rects.popper,m=e.elements[x?E:g],h=Nt(_(m)?m:m.contextElement||X(e.elements.popper),i,f,l),w=ee(e.elements.reference),O=ze({reference:w,element:P,strategy:"absolute",placement:o}),D=Ce(Object.assign({},P,O)),A=g===ce?D:w,k={top:h.top-A.top+b.top,bottom:A.bottom-h.bottom+b.bottom,left:h.left-A.left+b.left,right:A.right-h.right+b.right},C=e.modifiersData.offset;if(g===ce&&C){var M=C[o];Object.keys(k).forEach(function($){var H=[V,I].indexOf($)>=0?1:-1,F=[R,I].indexOf($)>=0?"y":"x";k[$]+=M[F]*H})}return k}var Ke={placement:"bottom",modifiers:[],strategy:"absolute"};function _e(){for(var e=arguments.length,t=new Array(e),r=0;rr?r:n}function Zt(e){var t=e.state,r=e.options,n=e.name,o=r.mainAxis,a=o===void 0?!0:o,l=r.altAxis,s=l===void 0?!1:l,i=r.boundary,p=r.rootBoundary,f=r.altBoundary,y=r.padding,g=r.tether,u=g===void 0?!0:g,x=r.tetherOffset,d=x===void 0?0:x,v=Se(t,{boundary:i,rootBoundary:p,padding:y,altBoundary:f}),b=z(t.placement),E=re(t.placement),P=!E,m=$e(b),h=Jt(m),w=t.modifiersData.popperOffsets,O=t.rects.reference,D=t.rects.popper,A=typeof d=="function"?d(Object.assign({},t.rects,{placement:t.placement})):d,k=typeof A=="number"?{mainAxis:A,altAxis:A}:Object.assign({mainAxis:0,altAxis:0},A),C=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,M={x:0,y:0};if(w){if(a){var $,H=m==="y"?R:L,F=m==="y"?I:V,S=m==="y"?"height":"width",T=w[m],ne=T+v[H],B=T-v[F],N=u?-D[S]/2:0,oe=E===te?O[S]:D[S],ue=E===te?-D[S]:-O[S],ge=t.elements.arrow,ae=u&&ge?De(ge):{width:0,height:0},Y=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:Ue(),de=Y[H],be=Y[F],J=pe(0,O[S],ae[S]),je=P?O[S]/2-N-J-de-k.mainAxis:oe-J-de-k.mainAxis,br=P?-O[S]/2+N+J+be+k.mainAxis:ue+J+be+k.mainAxis,Re=t.elements.arrow&&se(t.elements.arrow),wr=Re?m==="y"?Re.clientTop||0:Re.clientLeft||0:0,Ze=($=C==null?void 0:C[m])!=null?$:0,xr=T+je-Ze-wr,Or=T+br-Ze,et=pe(u?ve(ne,xr):ne,T,u?G(B,Or):B);w[m]=et,M[m]=et-T}if(s){var tt,Er=m==="x"?R:L,Pr=m==="x"?I:V,Q=w[h],we=h==="y"?"height":"width",rt=Q+v[Er],nt=Q-v[Pr],Le=[R,L].indexOf(b)!==-1,ot=(tt=C==null?void 0:C[h])!=null?tt:0,at=Le?rt:Q-O[we]-D[we]-ot+k.altAxis,it=Le?Q+O[we]+D[we]-ot-k.altAxis:nt,st=u&&Le?Qt(at,Q,it):pe(u?at:rt,Q,u?it:nt);w[h]=st,M[h]=st-Q}t.modifiersData[n]=M}}const er={name:"preventOverflow",enabled:!0,phase:"main",fn:Zt,requiresIfExists:["offset"]};var tr={left:"right",right:"left",bottom:"top",top:"bottom"};function ye(e){return e.replace(/left|right|bottom|top/g,function(t){return tr[t]})}var rr={start:"end",end:"start"};function Je(e){return e.replace(/start|end/g,function(t){return rr[t]})}function nr(e,t){t===void 0&&(t={});var r=t,n=r.placement,o=r.boundary,a=r.rootBoundary,l=r.padding,s=r.flipVariations,i=r.allowedAutoPlacements,p=i===void 0?He:i,f=re(n),y=f?s?Ve:Ve.filter(function(x){return re(x)===f}):fe,g=y.filter(function(x){return p.indexOf(x)>=0});g.length===0&&(g=y);var u=g.reduce(function(x,d){return x[d]=Se(e,{placement:d,boundary:o,rootBoundary:a,padding:l})[z(d)],x},{});return Object.keys(u).sort(function(x,d){return u[x]-u[d]})}function or(e){if(z(e)===Be)return[];var t=ye(e);return[Je(e),t,Je(t)]}function ar(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var o=r.mainAxis,a=o===void 0?!0:o,l=r.altAxis,s=l===void 0?!0:l,i=r.fallbackPlacements,p=r.padding,f=r.boundary,y=r.rootBoundary,g=r.altBoundary,u=r.flipVariations,x=u===void 0?!0:u,d=r.allowedAutoPlacements,v=t.options.placement,b=z(v),E=b===v,P=i||(E||!x?[ye(v)]:or(v)),m=[v].concat(P).reduce(function(ae,Y){return ae.concat(z(Y)===Be?nr(t,{placement:Y,boundary:f,rootBoundary:y,padding:p,flipVariations:x,allowedAutoPlacements:d}):Y)},[]),h=t.rects.reference,w=t.rects.popper,O=new Map,D=!0,A=m[0],k=0;k=0,F=H?"width":"height",S=Se(t,{placement:C,boundary:f,rootBoundary:y,altBoundary:g,padding:p}),T=H?$?V:L:$?I:R;h[F]>w[F]&&(T=ye(T));var ne=ye(T),B=[];if(a&&B.push(S[M]<=0),s&&B.push(S[T]<=0,S[ne]<=0),B.every(function(ae){return ae})){A=C,D=!1;break}O.set(C,B)}if(D)for(var N=x?3:1,oe=function(Y){var de=m.find(function(be){var J=O.get(be);if(J)return J.slice(0,Y).every(function(je){return je})});if(de)return A=de,"break"},ue=N;ue>0;ue--){var ge=oe(ue);if(ge==="break")break}t.placement!==A&&(t.modifiersData[n]._skip=!0,t.placement=A,t.reset=!0)}}const ir={name:"flip",enabled:!0,phase:"main",fn:ar,requiresIfExists:["offset"],data:{_skip:!1}};function sr(e,t,r){var n=z(e),o=[L,R].indexOf(n)>=0?-1:1,a=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,l=a[0],s=a[1];return l=l||0,s=(s||0)*o,[L,V].indexOf(n)>=0?{x:s,y:l}:{x:l,y:s}}function fr(e){var t=e.state,r=e.options,n=e.name,o=r.offset,a=o===void 0?[0,0]:o,l=He.reduce(function(f,y){return f[y]=sr(y,t.rects,a),f},{}),s=l[t.placement],i=s.x,p=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=i,t.modifiersData.popperOffsets.y+=p),t.modifiersData[n]=l}const lr={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:fr};var cr=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,Xe(typeof t!="number"?t:Ye(t,fe))};function pr(e){var t,r=e.state,n=e.name,o=e.options,a=r.elements.arrow,l=r.modifiersData.popperOffsets,s=z(r.placement),i=$e(s),p=[L,V].indexOf(s)>=0,f=p?"height":"width";if(!(!a||!l)){var y=cr(o.padding,r),g=De(a),u=i==="y"?R:L,x=i==="y"?I:V,d=r.rects.reference[f]+r.rects.reference[i]-l[i]-r.rects.popper[f],v=l[i]-r.rects.reference[i],b=se(a),E=b?i==="y"?b.clientHeight||0:b.clientWidth||0:0,P=d/2-v/2,m=y[u],h=E-g[f]-y[x],w=E/2-g[f]/2+P,O=pe(m,w,h),D=i;r.modifiersData[n]=(t={},t[D]=O,t.centerOffset=O-w,t)}}function ur(e){var t=e.state,r=e.options,n=r.element,o=n===void 0?"[data-popper-arrow]":n;o!=null&&(typeof o=="string"&&(o=t.elements.popper.querySelector(o),!o)||Fe(t.elements.popper,o)&&(t.elements.arrow=o))}const dr={name:"arrow",enabled:!0,phase:"main",fn:pr,effect:ur,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},Te=e=>parseInt(e,10);function vr({arrowPadding:e,emit:t,locked:r,offsetDistance:n,offsetSkid:o,placement:a,popperNode:l,triggerNode:s}){const i=c.reactive({isOpen:!1,popperInstance:null}),p=d=>{var v;(v=i.popperInstance)==null||v.setOptions(b=>({...b,modifiers:[...b.modifiers,{name:"eventListeners",enabled:d}]}))},f=()=>p(!0),y=()=>p(!1),g=()=>{i.isOpen&&(i.isOpen=!1,t("close:popper"))},u=()=>{i.isOpen||(i.isOpen=!0,t("open:popper"))};c.watch([()=>i.isOpen,a],async([d])=>{d?(await x(),f()):y()});const x=async()=>{await c.nextTick(),i.popperInstance=Gt(s.value,l.value,{placement:a.value,modifiers:[er,ir,{name:"flip",enabled:!r.value},dr,{name:"arrow",options:{padding:Te(e.value)}},lr,{name:"offset",options:{offset:[Te(o.value),Te(n.value)]}}]}),i.popperInstance.update()};return c.onBeforeUnmount(()=>{var d;(d=i.popperInstance)==null||d.destroy()}),{...c.toRefs(i),open:u,close:g}}const Qe=(e,t)=>{const r=e.__vccOpts||e;for(const[n,o]of t)r[n]=o;return r},mr={},hr={id:"arrow","data-popper-arrow":""};function yr(e,t){return c.openBlock(),c.createElementBlock("div",hr)}const gr=Qe(mr,[["render",yr],["__scopeId","data-v-6dc80710"]]);return Qe({__name:"Popper",props:{placement:{type:String,default:"bottom",validator:function(e){return["auto","auto-start","auto-end","top","top-start","top-end","bottom","bottom-start","bottom-end","right","right-start","right-end","left","left-start","left-end"].includes(e)}},disableClickAway:{type:Boolean,default:!1},offsetSkid:{type:String,default:"0"},offsetDistance:{type:String,default:"12"},hover:{type:Boolean,default:!1},show:{type:Boolean,default:null},disabled:{type:Boolean,default:!1},openDelay:{type:[Number,String],default:0},closeDelay:{type:[Number,String],default:0},zIndex:{type:[Number,String],default:9999},arrow:{type:Boolean,default:!1},arrowPadding:{type:String,default:"0"},interactive:{type:Boolean,default:!0},locked:{type:Boolean,default:!1},content:{type:String,default:null}},emits:["open:popper","close:popper"],setup(e,{emit:t}){c.useCssVars(B=>({"6dbcd199":e.zIndex}));const r=t,n=c.useSlots(),o=e,a=c.ref(null),l=c.ref(null),s=c.ref(null),i=c.ref(!1);c.onMounted(()=>{const B=n.default();if(B&&B.length>1)return console.error(`[Popper]: The component expects only one child element at its root. You passed ${B.length} child nodes.`)});const{arrowPadding:p,closeDelay:f,content:y,disableClickAway:g,disabled:u,interactive:x,locked:d,offsetDistance:v,offsetSkid:b,openDelay:E,placement:P,show:m}=c.toRefs(o),{isOpen:h,open:w,close:O}=vr({arrowPadding:p,emit:r,locked:d,offsetDistance:v,offsetSkid:b,placement:P,popperNode:l,triggerNode:s}),{hasContent:D}=ct(n,l,y),A=c.computed(()=>m.value!==null),k=c.computed(()=>u.value||!D.value),C=c.computed(()=>h.value&&!k.value),M=c.computed(()=>!g.value&&!A.value),$=c.computed(()=>x.value?`border: ${v.value}px solid transparent; margin: -${v.value}px;`:null),H=xe.debounce(w,E.value),F=xe.debounce(O,f.value),S=async()=>{k.value||A.value||(F.clear(),H())},T=async()=>{A.value||(H.clear(),F())},ne=()=>{h.value?T():S()};return c.watch([D,u],([B,N])=>{h.value&&(!B||N)&&O()}),c.watch(h,B=>{B?i.value=!0:xe.debounce(()=>{i.value=!1},200)}),c.watchEffect(()=>{A.value&&(m.value?H():F())}),c.watchEffect(()=>{M.value&<(a,T)}),(B,N)=>(c.openBlock(),c.createElementBlock("div",{class:"inline-block",style:c.normalizeStyle($.value),onMouseleave:N[2]||(N[2]=oe=>e.hover&&T()),ref_key:"popperContainerNode",ref:a},[c.createElementVNode("div",{ref_key:"triggerNode",ref:s,onMouseover:N[0]||(N[0]=oe=>e.hover&&S()),onClick:ne,onFocus:S,onKeyup:c.withKeys(T,["esc"])},[c.renderSlot(B.$slots,"default",{},void 0,!0)],544),c.createVNode(c.Transition,{name:"fade"},{default:c.withCtx(()=>[c.withDirectives(c.createElementVNode("div",{onClick:N[1]||(N[1]=oe=>!c.unref(x)&&T()),class:"popper",ref_key:"popperNode",ref:l},[c.renderSlot(B.$slots,"content",{close:c.unref(O),isOpen:i.value},()=>[c.createTextVNode(c.toDisplayString(c.unref(y)),1)],!0),e.arrow?(c.openBlock(),c.createBlock(gr,{key:0})):c.createCommentVNode("",!0)],512),[[c.vShow,C.value]])]),_:3})],36))}},[["__scopeId","data-v-a8784fef"]])});