import{bp as e,bx as n,by as t,aY as o}from"./index.9313841a.js";function p(e){if(!1===e)return 0;if(!0===e||void 0===e)return 1;const n=parseInt(e,10);return isNaN(n)?0:n}var r=e({name:"close-popup",beforeMount(e,{value:r}){const a={depth:p(r),handler(o){0!==a.depth&&setTimeout((()=>{const p=n(e);void 0!==p&&t(p,o,a.depth)}))},handlerKey(e){!0===o(e,13)&&a.handler(e)}};e.__qclosepopup=a,e.addEventListener("click",a.handler),e.addEventListener("keyup",a.handlerKey)},updated(e,{value:n,oldValue:t}){n!==t&&(e.__qclosepopup.depth=p(n))},beforeUnmount(e){const n=e.__qclosepopup;e.removeEventListener("click",n.handler),e.removeEventListener("keyup",n.handlerKey),delete e.__qclosepopup}});export{r as C};
