"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("vue");function d(n){let s=!1,c;const t=l.effectScope(!0);return(...u)=>(s||(c=t.run(()=>n(...u)),s=!0),c)}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const m=d(()=>{const n=l.ref([]),s=t=>n.value.includes(t),c=t=>{n.value=t};return{aclList:l.readonly(n),checkPermission:s,setPermission:c}});function f(n){return!!(n&&n.nodeType===8)}const p=()=>{const{checkPermission:n}=m(),s="acl",c=`v-${s}`,t=new WeakMap,u=(e,o)=>{const i=t.get(e);let{parentEl:a,comment:r}=i;if(n(o))r&&r.nodeType===8&&r.nodeValue===c&&(a==null||a.replaceChild(e,r),t.set(e,{parentEl:e.parentElement,parentNode:e.parentNode}));else{if(r)return;r=document.createComment(c),a==null||a.replaceChild(r,e),t.set(e,{...i,comment:r})}};return{name:s,directiveLifeCycle:{mounted(e,o){t.set(e,{parentEl:e.parentElement,parentNode:e.parentNode}),u(e,o.value)},updated(e,o){u(e,o.value)},unmounted(e){const{parentEl:o,comment:i}=t.get(e);i&&f(i)&&i.nodeValue===c&&(o==null||o.removeChild(i)),t.delete(e)}}}};exports.vAcl=p;
//# sourceMappingURL=acl.js.map
