import{c as j,g as A}from"./EchoChannel-Bg1-kez_.js";var x={exports:{}};(function(k,I){(function(o,l){k.exports=l()})(j,function(){var o="__v-click-outside",l=typeof window<"u",T=typeof navigator<"u",b=l&&("ontouchstart"in window||T&&navigator.msMaxTouchPoints>0)?["touchstart"]:["click"],m=function(e){var n=e.event,r=e.handler;(0,e.middleware)(n)&&r(n)},h=function(e,n){var r=function(t){var a=typeof t=="function";if(!a&&typeof t!="object")throw new Error("v-click-outside: Binding value must be a function or an object");return{handler:a?t:t.handler,middleware:t.middleware||function(i){return i},events:t.events||b,isActive:t.isActive!==!1,detectIframe:t.detectIframe!==!1,capture:!!t.capture}}(n.value),v=r.handler,g=r.middleware,y=r.detectIframe,s=r.capture;if(r.isActive){if(e[o]=r.events.map(function(t){return{event:t,srcTarget:document.documentElement,handler:function(a){return function(i){var d=i.el,c=i.event,f=i.handler,u=i.middleware,E=c.path||c.composedPath&&c.composedPath();(E?E.indexOf(d)<0:!d.contains(c.target))&&m({event:c,handler:f,middleware:u})}({el:e,event:a,handler:v,middleware:g})},capture:s}}),y){var O={event:"blur",srcTarget:window,handler:function(t){return function(a){var i=a.el,d=a.event,c=a.handler,f=a.middleware;setTimeout(function(){var u=document.activeElement;u&&u.tagName==="IFRAME"&&!i.contains(u)&&m({event:d,handler:c,middleware:f})},0)}({el:e,event:t,handler:v,middleware:g})},capture:s};e[o]=[].concat(e[o],[O])}e[o].forEach(function(t){var a=t.event,i=t.srcTarget,d=t.handler;return setTimeout(function(){e[o]&&i.addEventListener(a,d,s)},0)})}},p=function(e){(e[o]||[]).forEach(function(n){return n.srcTarget.removeEventListener(n.event,n.handler,n.capture)}),delete e[o]},w=l?{beforeMount:h,updated:function(e,n){var r=n.value,v=n.oldValue;JSON.stringify(r)!==JSON.stringify(v)&&(p(e),h(e,{value:r}))},unmounted:p}:{};return{install:function(e){e.directive("click-outside",w)},directive:w}})})(x);var C=x.exports;const M=A(C);export{M as v};