directix 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  /*!
2
- * directix v1.1.0
2
+ * directix v1.2.0
3
3
  * A comprehensive, easy-to-use, and high-performance Vue custom directives library supporting both Vue 2 and Vue 3
4
4
  * (c) 2021-present saqqdy <https://github.com/saqqdy>
5
5
  * Released under the MIT License.
6
6
  */
7
- var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__pow=Math.pow,__defNormalProp=(e,t,n)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__spreadValues=(e,t)=>{for(var n in t||(t={}))__hasOwnProp.call(t,n)&&__defNormalProp(e,n,t[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(t))__propIsEnum.call(t,n)&&__defNormalProp(e,n,t[n]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t)),__objRest=(e,t)=>{var n={};for(var o in e)__hasOwnProp.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&__getOwnPropSymbols)for(var o of __getOwnPropSymbols(e))t.indexOf(o)<0&&__propIsEnum.call(e,o)&&(n[o]=e[o]);return n},__async=(e,t,n)=>new Promise((o,r)=>{var i=e=>{try{s(n.next(e))}catch(e){r(e)}},l=e=>{try{s(n.throw(e))}catch(e){r(e)}},s=e=>e.done?o(e.value):Promise.resolve(e.value).then(i,l);s((n=n.apply(e,t)).next())});!function(e){"use strict";let t=null,n=null,o=null,r=null;function i(e){return e.startsWith("2.7")?2.7:e.startsWith("2")?2:e.startsWith("3")?3:null}function l(){var e,n;if(null!==t)return t;if("undefined"!=typeof process){const e=process.env.DIRECTIX_VUE_VERSION;if("2.7"===e)return t=2.7,t;if("2"===e)return t=2,t;if("3"===e)return t=3,t}try{const e=require("vue"),n=i(null==e?void 0:e.version);if(null!==n)return t=n,t}catch(e){}if("undefined"!=typeof window){const o=window,r=o.Vue;if(null==r?void 0:r.version){const e=i(r.version);if(null!==e)return t=e,t}if("function"==typeof(null==r?void 0:r.observable))return t=2,t;if("function"==typeof(null==r?void 0:r.createApp)&&"function"!=typeof(null==r?void 0:r.observable))return t=3,t;const l=o.__VUE_DEVTOOLS_GLOBAL_HOOK__;if(null==(e=null==l?void 0:l.Vue)?void 0:e.version){const e=i(l.Vue.version);if(null!==e)return t=e,t}if(null==(n=null==l?void 0:l.apps)?void 0:n.length)return t=3,t}return null===t&&("undefined"!=typeof window&&console.warn("[Directix] Unable to detect Vue version, defaulting to Vue 3. Set DIRECTIX_VUE_VERSION=2 or call setVueVersion(2) if using Vue 2."),t=3),t}function s(e){t=e,n=2===e||2.7===e,o=2.7===e,r=3===e}const a=()=>"undefined"!=typeof window&&"undefined"!=typeof document,c=()=>!a(),u=()=>{if(!a())return!1;let e=!1;try{const t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){e=!1}return e},d=()=>a()&&"IntersectionObserver"in window,p=()=>a()&&"ResizeObserver"in window,v=()=>a()&&"clipboard"in navigator,f=()=>a()&&"MutationObserver"in window;function m(e){return{bind(e,t,n){const o={value:t.value,vnode:n,cleanup:[]};e.__directix_state__=o},inserted(t,n,o){e.mounted&&e.mounted(t,b(n),o)},update(t,n,o,r){const i=t.__directix_state__;e.updated&&e.updated(t,b(n),o,b(__spreadProps(__spreadValues({},n),{value:n.oldValue})),r),i&&(i.value=n.value,i.vnode=o)},componentUpdated(e,t,n,o){},unbind(t,n,o){e.unmounted&&e.unmounted(t,b(n),o);const r=t.__directix_state__;(null==r?void 0:r.cleanup)&&r.cleanup.forEach(e=>e()),delete t.__directix_state__}}}function b(e){var t;return{value:e.value,oldValue:null!=(t=e.oldValue)?t:null,arg:e.arg,modifiers:e.modifiers||{},instance:e.instance||null}}function h(e){return{created(e,t,n){const o={value:t.value,vnode:n,cleanup:[]};e.__directix_state__=o},beforeMount(e,t,n){},mounted(t,n,o){e.mounted&&e.mounted(t,_(n),o)},beforeUpdate(e,t,n,o){},updated(t,n,o,r){const i=t.__directix_state__;e.updated&&e.updated(t,_(n),o,_(__spreadProps(__spreadValues({},n),{value:n.oldValue})),r),i&&(i.value=n.value,i.vnode=o)},beforeUnmount(e,t,n){},unmounted(t,n,o){e.unmounted&&e.unmounted(t,_(n),o);const r=t.__directix_state__;(null==r?void 0:r.cleanup)&&r.cleanup.forEach(e=>e()),delete t.__directix_state__}}}function _(e){var t;return{value:e.value,oldValue:null!=(t=e.oldValue)?t:null,arg:e.arg,modifiers:e.modifiers||{},instance:e.instance}}function y(e){var t;const n=e,{name:o,version:r,ssr:i,defaults:s}=n,a=__objRest(n,["name","version","ssr","defaults"]);if(c()&&!i)return"undefined"!=typeof process&&"test"!==(null==(t=process.env)?void 0:t.NODE_ENV)&&console.warn(`[Directix] Directive "${o}" is not compatible with SSR. It will be a no-op on the server side.`),{mounted:()=>{},updated:()=>{},unmounted:()=>{}};return function(e){let t=null;function n(){return t||(t=2===l()?m(e):h(e)),t}function o(e){return function(t,o,r,i){var l,s;null==(s=(l=n())[e])||s.call(l,t,o,r,i)}}return{bind:o("bind"),inserted:o("inserted"),update:o("update"),componentUpdated:o("componentUpdated"),unbind:o("unbind"),created:o("created"),beforeMount:o("beforeMount"),mounted:o("mounted"),beforeUpdate:o("beforeUpdate"),updated:o("updated"),beforeUnmount:o("beforeUnmount"),unmounted:o("unmounted")}}({mounted:a.mounted?(e,t,n)=>{a.mounted(e,g(t,s),n)}:void 0,updated:a.updated?(e,t,n,o,r)=>{a.updated(e,g(t,s),n,o,r)}:void 0,unmounted:a.unmounted})}function g(e,t){if(!t)return e;const n="object"==typeof e.value&&null!==e.value?__spreadValues(__spreadValues({},t),e.value):e.value;return __spreadProps(__spreadValues({},e),{value:n})}function w(e){return e?"string"==typeof e?a()?document.querySelector(e):null:e instanceof Element?e:null:null}function T(e){if(!a())return window;let t=e.parentElement;for(;t;){const{overflow:e,overflowX:n,overflowY:o}=getComputedStyle(t);if(/(auto|scroll)/.test(e+n+o))return t;t=t.parentElement}return window}function x(e,t,n,o=!1){if(!a())return;const r=k(o);e.addEventListener(t,n,r)}function E(e,t,n,o=!1){if(!a())return;const r=k(o);e.removeEventListener(t,n,r)}function k(e){if("boolean"==typeof e)return e;const{capture:t=!1,passive:n=!1,once:o=!1}=e;return u()?{capture:t,passive:n,once:o}:t}function L(e){let t=0,n=0;return"touches"in e&&e.touches.length>0?(t=e.touches[0].clientX,n=e.touches[0].clientY):"clientX"in e&&(t=e.clientX,n=e.clientY),{x:t,y:n,clientX:t,clientY:n}}function I(e){return"string"==typeof e}function O(e){return"function"==typeof e}function C(e){return"object"==typeof e&&null!==e}function S(e){return Array.isArray(e)}function V(e,t=300,n={}){let o=null,r=null,i=null;const{leading:l=!1,trailing:s=!0}=n,a=()=>{r&&(e.apply(i,r),r=null,i=null)},c=function(...e){r=e,i=this,o&&clearTimeout(o),l&&!o&&a(),o=setTimeout(()=>{s&&a(),o=null},t)};return c.cancel=()=>{o&&(clearTimeout(o),o=null),r=null,i=null},c.flush=()=>{o&&(clearTimeout(o),a(),o=null)},c}function D(e,t=300,n={}){let o=null,r=null,i=null,l=0;const{leading:s=!0,trailing:a=!0}=n,c=()=>{r&&(e.apply(i,r),r=null,i=null)},u=function(...e){const n=Date.now();l||s||(l=n);const u=t-(n-l);r=e,i=this,u<=0||u>t?(o&&(clearTimeout(o),o=null),l=n,c()):!o&&a&&(o=setTimeout(()=>{l=s?Date.now():0,o=null,c()},u))};return u.cancel=()=>{o&&(clearTimeout(o),o=null),l=0,r=null,i=null},u}function H(e){if(!e)return null;if(e.endsWith("ms"))return Number.parseInt(e,10);if(e.endsWith("s"))return 1e3*Number.parseFloat(e);const t=Number.parseInt(e,10);return Number.isNaN(t)?null:t}const z=y({name:"click-outside",ssr:!1,defaults:{capture:!0,events:["click"],disabled:!1,stop:!1,prevent:!1},mounted(e,t){const n=P(t.value);if(n.disabled)return;const o={options:n,handlers:new Map};e.__clickOutside=o;n.events.forEach(t=>{const r=t=>{N(e,t,n)&&(n.stop&&t.stopPropagation(),n.prevent&&t.preventDefault(),n.handler(t))};o.handlers.set(t,r);const i={capture:n.capture,passive:!n.prevent};x(document,t,r,i)})},updated(e,t){const n=e.__clickOutside;if(!n)return;const o=n.options,r=P(t.value);if(o.disabled!==r.disabled)if(r.disabled)n.handlers.forEach((e,t)=>{E(document,t,e,{capture:o.capture})}),n.handlers.clear();else{const t=t=>t=>{N(e,t,r)&&(r.stop&&t.stopPropagation(),r.prevent&&t.preventDefault(),r.handler(t))};r.events.forEach(e=>{const o=t();n.handlers.set(e,o),x(document,e,o,{capture:r.capture,passive:!r.prevent})})}n.options=r},unmounted(e){const t=e.__clickOutside;t&&(t.handlers.forEach((e,n)=>{E(document,n,e,{capture:t.options.capture})}),delete e.__clickOutside)}});function P(e){var t,n,o,r,i;if("function"==typeof e)return{handler:e,capture:!0,events:["click"],disabled:!1,stop:!1,prevent:!1};if(!e)throw new Error("[Directix] v-click-outside: handler is required");return __spreadValues({capture:null==(t=e.capture)||t,events:null!=(n=e.events)?n:["click"],disabled:null!=(o=e.disabled)&&o,stop:null!=(r=e.stop)&&r,prevent:null!=(i=e.prevent)&&i},e)}function N(e,t,n){var o;const r=t.target;if(e.contains(r))return!1;if(null==(o=n.exclude)?void 0:o.length)for(const e of n.exclude){const t="function"==typeof e?e():w(e);if(t&&(t===r||t.contains(r)))return!1}return!0}function A(e){return __async(this,null,function*(){if(v())try{return yield navigator.clipboard.writeText(e),!0}catch(e){console.warn("[Directix] Clipboard API failed, falling back to execCommand")}return function(e){const t=document.createElement("textarea");t.value=e,t.style.cssText="\n position: fixed;\n top: -9999px;\n left: -9999px;\n opacity: 0;\n pointer-events: none;\n ",document.body.appendChild(t);try{return t.select(),t.setSelectionRange(0,t.value.length),document.execCommand("copy")}catch(e){return!1}finally{document.body.removeChild(t)}}(e)})}const M=y({name:"copy",ssr:!1,mounted(e,t){const n=F(t.value);if(n.disabled)return;n.title&&e.setAttribute("title",n.title);const o={handler:null,options:n};o.handler=()=>__async(null,null,function*(){var t,n,r,i;const l=o.options.value;if(l)try{if(!(yield A(l)))throw new Error("Copy failed");null==(n=(t=o.options).onSuccess)||n.call(t,l),e.dispatchEvent(new CustomEvent("copy:success",{detail:{text:l}}))}catch(t){const n=t;null==(i=(r=o.options).onError)||i.call(r,n),e.dispatchEvent(new CustomEvent("copy:error",{detail:{error:n}}))}else console.warn("[Directix] v-copy: No text to copy")}),e.addEventListener("click",o.handler),e.__copy=o},updated(e,t){const n=e.__copy;n&&(n.options=F(t.value),n.options.title&&e.setAttribute("title",n.options.title))},unmounted(e){const t=e.__copy;t&&(e.removeEventListener("click",t.handler),delete e.__copy)}});function F(e){return"string"==typeof e?{value:e}:e}const B=y({name:"debounce",ssr:!0,defaults:{wait:300,leading:!1,trailing:!0},mounted(e,t){const n=j(t.value,t),o=function(e){for(const t of $)if(e[t])return t;return null}(t.modifiers)||function(e){const t=e.tagName.toLowerCase();if("input"===t||"textarea"===t)return"input";return"click"}(e),r=V(n.handler,n.wait,{leading:n.leading,trailing:n.trailing});e.addEventListener(o,r),e.__debounce={debouncedFn:r,eventType:o,options:n}},updated(e,t){const n=e.__debounce;if(!n)return;const o=j(t.value,t);if(o.wait!==n.options.wait||o.leading!==n.options.leading||o.trailing!==n.options.trailing){n.debouncedFn.cancel();const t=V(o.handler,o.wait,{leading:o.leading,trailing:o.trailing});e.removeEventListener(n.eventType,n.debouncedFn),e.addEventListener(n.eventType,t),e.__debounce={debouncedFn:t,eventType:n.eventType,options:o}}else o.handler!==n.options.handler&&(n.options.handler=o.handler)},unmounted(e){const t=e.__debounce;t&&(t.debouncedFn.cancel(),e.removeEventListener(t.eventType,t.debouncedFn),delete e.__debounce)}});function j(e,t){const n=H(t.arg)||300;return"function"==typeof e?{handler:e,wait:n}:__spreadProps(__spreadValues({},e),{wait:e.wait||n})}const $=["click","input","change","submit","scroll","resize","mouseenter","mouseleave","mousemove","mousedown","mouseup","keydown","keyup","focus","blur","touchstart","touchmove","touchend"];const R=y({name:"throttle",ssr:!0,defaults:{wait:300,leading:!0,trailing:!0},mounted(e,t){const n=U(t.value,t),o=function(e){for(const t of W)if(e[t])return t;return null}(t.modifiers)||function(e){const t=e.tagName.toLowerCase();if("input"===t||"textarea"===t)return"input";return"click"}(e),r=D(n.handler,n.wait,{leading:n.leading,trailing:n.trailing});e.addEventListener(o,r),e.__throttle={throttledFn:r,eventType:o,options:n}},updated(e,t){const n=e.__throttle;if(!n)return;const o=U(t.value,t);if(o.wait!==n.options.wait||o.leading!==n.options.leading||o.trailing!==n.options.trailing){n.throttledFn.cancel();const t=D(o.handler,o.wait,{leading:o.leading,trailing:o.trailing});e.removeEventListener(n.eventType,n.throttledFn),e.addEventListener(n.eventType,t),e.__throttle={throttledFn:t,eventType:n.eventType,options:o}}else o.handler!==n.options.handler&&(n.options.handler=o.handler)},unmounted(e){const t=e.__throttle;t&&(t.throttledFn.cancel(),e.removeEventListener(t.eventType,t.throttledFn),delete e.__throttle)}});function U(e,t){const n=H(t.arg)||300;return"function"==typeof e?{handler:e,wait:n}:__spreadProps(__spreadValues({},e),{wait:e.wait||n})}const W=["click","input","change","submit","scroll","resize","mouseenter","mouseleave","mousemove","mousedown","mouseup","keydown","keyup","focus","blur","touchstart","touchmove","touchend"];const q=new Set(["input","textarea","select","button"]);const X=y({name:"focus",ssr:!0,defaults:{focus:!0,refocus:!1},mounted(e,t){if(!a())return;const n=Y(t.value);if(!n.focus||!function(e){if(!a())return!1;const t=e.tagName.toLowerCase();if(q.has(t))return!e.disabled;if(e.isContentEditable)return!0;const n=e.getAttribute("tabindex");if(null!=n)return"-1"!==n;if("a"===t||"area"===t)return e.hasAttribute("href");return!1}(e))return void(n.focus&&console.warn("[Directix] v-focus: Element is not focusable"));const o=()=>{var t;return null==(t=n.onFocus)?void 0:t.call(n,e)},r=()=>{var t;return null==(t=n.onBlur)?void 0:t.call(n,e)};e.addEventListener("focus",o),e.addEventListener("blur",r),e.__focus={options:n,handleFocus:o,handleBlur:r,lastValue:t.value},e.focus()},updated(e,t){const n=e.__focus;if(!n)return;const o=Y(t.value);o.onFocus!==n.options.onFocus&&(e.removeEventListener("focus",n.handleFocus),n.handleFocus=()=>{var t;return null==(t=o.onFocus)?void 0:t.call(o,e)},e.addEventListener("focus",n.handleFocus)),o.onBlur!==n.options.onBlur&&(e.removeEventListener("blur",n.handleBlur),n.handleBlur=()=>{var t;return null==(t=o.onBlur)?void 0:t.call(o,e)},e.addEventListener("blur",n.handleBlur));const r=!function(e,t){if(e===t)return!0;if("object"!=typeof e||"object"!=typeof t||null===e||null===t)return!1;const n=e,o=t,r=Object.keys(n),i=Object.keys(o);return r.length===i.length&&r.every(e=>n[e]===o[e])}(t.value,n.lastValue);o.refocus&&o.focus&&r&&e.focus(),n.options=o,n.lastValue=t.value},unmounted(e){const t=e.__focus;t&&(e.removeEventListener("focus",t.handleFocus),e.removeEventListener("blur",t.handleBlur),delete e.__focus)}});function Y(e){return"boolean"==typeof e?{focus:e,refocus:!1}:__spreadValues({focus:!0,refocus:!1},e)}let G=null;function Z(e,t){"IMG"===e.tagName?e.src=t:e.style.backgroundImage=`url("${t}")`}function K(e,t){e.dataset.lazyState=t}function J(e){const t=e.__lazy;if(!t||!t.options.src)return;if(t.options.filter&&!t.options.filter(t.options.src))return;K(e,"loading"),t.attempt++,e.classList.add("v-lazy--loading");const n=new Image;n.onload=()=>{var n,o;Z(e,t.options.src),K(e,"loaded"),e.classList.remove("v-lazy--loading"),e.classList.add("v-lazy--loaded"),null==(o=(n=t.options).onLoad)||o.call(n,e)},n.onerror=()=>{var n,o;e.classList.remove("v-lazy--loading"),t.attempt<(t.options.attempt||1)?setTimeout(()=>J(e),1e3*t.attempt):(t.options.error&&Z(e,t.options.error),K(e,"error"),e.classList.add("v-lazy--error"),null==(o=(n=t.options).onError)||o.call(n,e,new Error("Failed to load image")))},n.src=t.options.src}function Q(e){const t=e.__lazy;var n;if(t)if(d())if(t.options.observer)t.observer=t.options.observer,t.observer.observe(e);else{const o=(n=t.options.preload||0,G||(G=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&(J(e.target),null==G||G.unobserve(e.target))})},{rootMargin:`${n}px`}),G));t.observer=o,o.observe(e)}else J(e)}function ee(e){const t=e.__lazy;t&&(t.observer?t.observer.unobserve(e):G&&G.unobserve(e))}function te(e){return"string"==typeof e?{src:e}:e||{}}const ne=y({name:"lazy",ssr:!1,defaults:{preload:0,attempt:1,disabled:!1},mounted(e,t){const n=te(t.value);if(n.disabled)return;if(!n.src)return void console.warn("[Directix] v-lazy: No source provided");K(e,"pending"),n.placeholder&&Z(e,n.placeholder),e.classList.add("v-lazy");const o={options:n,attempt:0};e.__lazy=o,Q(e)},updated(e,t){const n=e.__lazy;if(!n)return;const o=te(t.value);o.disabled?ee(e):o.src!==n.options.src&&(n.options=o,n.attempt=0,"pending"!==function(e){return e.dataset.lazyState||"pending"}(e)&&(K(e,"pending"),e.classList.remove("v-lazy--loaded","v-lazy--error"),o.placeholder&&Z(e,o.placeholder),Q(e)))},unmounted(e){ee(e),delete e.__lazy}}),oe="__intersect";function re(e){const t="function"==typeof e?{handler:e}:__spreadValues({},e);return null!==t.root&&"object"==typeof t.root&&"value"in t.root&&(t.root=t.root.value),t}function ie(e,t,n){return new IntersectionObserver(function(e,t,n){return o=>{var r,i,l,s;for(const a of o){if(n.once&&t.hasTriggeredOnce)continue;const{isIntersecting:o}=a;null==(r=n.handler)||r.call(n,a,t.observer),null==(i=n.onChange)||i.call(n,o,a),o?(null==(l=n.onEnter)||l.call(n,a,t.observer),n.once&&(t.hasTriggeredOnce=!0)):null==(s=n.onLeave)||s.call(n,a,t.observer),e.dispatchEvent(new CustomEvent("intersect",{detail:{isIntersecting:o,entry:a}}))}}}(e,t,n),{root:n.root,rootMargin:n.rootMargin,threshold:n.threshold})}const le=y({name:"intersect",ssr:!1,defaults:{disabled:!1,once:!1,rootMargin:"0px",threshold:0},mounted(e,t){const n=re(t.value);if(n.disabled||!a()||!d())return void(d()||console.warn("[Directix] v-intersect: IntersectionObserver not supported"));const o={options:n,observer:null,hasTriggeredOnce:!1};o.observer=ie(e,o,n),e[oe]=o,o.observer.observe(e)},updated(e,t){var n,o,r;const i=e[oe];if(!i)return;const l=re(t.value),s=l.root!==i.options.root||l.rootMargin!==i.options.rootMargin||l.threshold!==i.options.threshold;l.disabled!==i.options.disabled&&(l.disabled?null==(n=i.observer)||n.disconnect():null==(o=i.observer)||o.observe(e)),s&&(null==(r=i.observer)||r.disconnect(),i.observer=ie(e,i,l),i.observer.observe(e)),i.options=l},unmounted(e){var t;const n=e[oe];n&&(null==(t=n.observer)||t.disconnect(),delete e[oe])}});function se(e){return"boolean"==typeof e?{initial:e}:__spreadValues({initial:!0,disabled:!1,useHidden:!1},e)}const ae=y({name:"visible",ssr:!0,defaults:{initial:!0,disabled:!1,useHidden:!1},mounted(e,t){var n,o;if(!a())return;const r=se(t.value),i=e.style.display,l=e.style.visibility,s={options:r,isVisible:null==(n=r.initial)||n,originalDisplay:i,originalVisibility:l,transitionEndHandler:t=>{"opacity"!==t.propertyName&&"visibility"!==t.propertyName||e.dispatchEvent(new CustomEvent("visible:transition-end",{detail:{isVisible:s.isVisible}}))}};e.__visible=s,x(e,"transitionend",s.transitionEndHandler),ce(e,s,null==(o=r.initial)||o)},updated(e,t){var n;const o=e.__visible;if(!o)return;const r=se(t.value);let i;i="boolean"==typeof t.value?t.value:null==(n=r.initial)||n,o.isVisible!==i&&ce(e,o,i),o.options=r},unmounted(e){const t=e.__visible;t&&(E(e,"transitionend",t.transitionEndHandler),e.style.display=t.originalDisplay,e.style.visibility=t.originalVisibility,delete e.__visible)}});function ce(e,t,n){const o=t.isVisible;if(t.isVisible=n,n?(e.classList.remove("v-hidden"),e.classList.add("v-visible")):(e.classList.remove("v-visible"),e.classList.add("v-hidden")),t.options.useHidden)if(n)e.style.visibility=t.originalVisibility||"visible";else{if("0s"!==getComputedStyle(e).transitionDuration){const n=o=>{o.target!==e||"opacity"!==o.propertyName&&"transform"!==o.propertyName||(t.isVisible||(e.style.visibility="hidden"),e.removeEventListener("transitionend",n))};e.addEventListener("transitionend",n)}else e.style.visibility="hidden"}else e.style.display=n?t.originalDisplay:"none";e.dispatchEvent(new CustomEvent("visible:change",{detail:{isVisible:n,previousVisibility:o}})),t.options.handler&&o!==n&&t.options.handler(n)}function ue(e){return"boolean"==typeof e?{value:e}:__spreadValues({value:!0,loadingClass:"v-loading",spinnerClass:"v-loading__spinner",textClass:"v-loading__text",background:"rgba(255, 255, 255, 0.9)",lock:!1,disabled:!1},e)}const de=y({name:"loading",ssr:!0,defaults:{value:!0,loadingClass:"v-loading",spinnerClass:"v-loading__spinner",textClass:"v-loading__text",background:"rgba(255, 255, 255, 0.9)",lock:!1,disabled:!1},mounted(e,t){if(!a())return;const n=ue(t.value);if(n.disabled)return;const o=getComputedStyle(e),r={options:n,loadingOverlay:null,originalPosition:e.style.position,originalOverflow:e.style.overflow};e.__loading=r,"static"===o.position&&(e.style.position="relative"),n.value&&pe(e,r)},updated(e,t){const n=e.__loading;if(!n)return;const o=ue(t.value);if(o.disabled)ve(e,n);else{if(o.value&&!n.options.value?pe(e,n):!o.value&&n.options.value&&ve(e,n),n.loadingOverlay&&o.text!==n.options.text){const e=n.loadingOverlay.querySelector(`.${n.options.textClass}`);e&&(e.textContent=o.text||"")}n.options=o}},unmounted(e){const t=e.__loading;t&&(ve(e,t),e.style.position=t.originalPosition,e.style.overflow=t.originalOverflow,delete e.__loading)}});function pe(e,t){t.loadingOverlay||(t.loadingOverlay=function(e){const t=document.createElement("div");t.className=e.loadingClass||"v-loading",t.style.cssText=`\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 1000;\n background: ${e.background||"rgba(255, 255, 255, 0.9)"};\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n `;const n=e.spinner||'\n<svg class="v-loading__circular" viewBox="25 25 50 50">\n <circle class="v-loading__path" cx="50" cy="50" r="20" fill="none" stroke-width="2" stroke-miterlimit="10"/>\n</svg>\n',o=document.createElement("div");if(o.className=e.spinnerClass||"v-loading__spinner",o.innerHTML=n,t.appendChild(o),e.text){const n=document.createElement("div");n.className=e.textClass||"v-loading__text",n.textContent=e.text,t.appendChild(n)}return t}(t.options),e.appendChild(t.loadingOverlay),t.options.lock&&(e.style.overflow="hidden"),e.classList.add("v-loading--active"))}function ve(e,t){t.loadingOverlay&&(t.loadingOverlay.remove(),t.loadingOverlay=null,t.options.lock&&(e.style.overflow=t.originalOverflow),e.classList.remove("v-loading--active"))}function fe(e,t,n){let o=0,r=0,i=0,l=0;if(e===window)o=window.scrollX||document.documentElement.scrollLeft,r=window.scrollY||document.documentElement.scrollTop,i=document.documentElement.scrollWidth-window.innerWidth,l=document.documentElement.scrollHeight-window.innerHeight;else{const t=e;o=t.scrollLeft,r=t.scrollTop,i=t.scrollWidth-t.clientWidth,l=t.scrollHeight-t.clientHeight}return{scrollLeft:o,scrollTop:r,scrollLeftMax:i,scrollTopMax:l,progressX:i>0?o/i:0,progressY:l>0?r/l:0,directionX:o!==t?o>t?1:-1:0,directionY:r!==n?r>n?1:-1:0,container:e}}function me(e){if("function"==typeof e)return{handler:e,passive:!0};if(!e)throw new Error("[Directix] v-scroll: handler is required");return __spreadValues({passive:!0,throttle:0,disabled:!1},e)}const be=y({name:"scroll",ssr:!1,defaults:{passive:!0,throttle:0,disabled:!1},mounted(e,t){const n=me(t.value);if(n.disabled||!a())return;let o;if(n.container)if(n.container===window)o=window;else if("string"==typeof n.container){const t=document.querySelector(n.container);o=t||T(e)}else o=n.container;else{const{overflow:t,overflowX:n,overflowY:r}=getComputedStyle(e),i=/(auto|scroll)/.test(t+n+r);o=i?e:T(e)}const r={options:n,container:o,lastScrollLeft:0,lastScrollTop:0,throttleTimer:null,pendingEvent:null,scrollHandler:e=>{if(n.throttle&&n.throttle>0)r.pendingEvent=e,r.throttleTimer||(r.throttleTimer=setTimeout(()=>{if(r.pendingEvent){const e=fe(o,r.lastScrollLeft,r.lastScrollTop);r.lastScrollLeft=e.scrollLeft,r.lastScrollTop=e.scrollTop,n.handler(r.pendingEvent,e)}r.throttleTimer=null,r.pendingEvent=null},n.throttle));else{const t=fe(o,r.lastScrollLeft,r.lastScrollTop);r.lastScrollLeft=t.scrollLeft,r.lastScrollTop=t.scrollTop,n.handler(e,t)}}},i=fe(o,0,0);r.lastScrollLeft=i.scrollLeft,r.lastScrollTop=i.scrollTop,e.__scroll=r,x(o,"scroll",r.scrollHandler,{passive:n.passive})},updated(e,t){const n=e.__scroll;n&&(n.options=me(t.value))},unmounted(e){const t=e.__scroll;t&&(t.throttleTimer&&clearTimeout(t.throttleTimer),E(t.container,"scroll",t.scrollHandler),delete e.__scroll)}});function he(e){if("function"==typeof e)return{handler:e,distance:0,throttle:200,useIntersection:!0};if(!e)throw new Error("[Directix] v-infinite-scroll: handler is required");return __spreadValues({distance:0,disabled:!1,loading:!1,useIntersection:!0,throttle:200},e)}const _e=y({name:"infinite-scroll",ssr:!1,defaults:{distance:0,disabled:!1,loading:!1,useIntersection:!0,throttle:200},mounted(e,t){const n=he(t.value);if(n.disabled||!a())return;let o;if(n.container)if("string"==typeof n.container){const t=document.querySelector(n.container);o=t||T(e)}else o=n.container;else o=T(e);const r={options:n,container:o,sentinel:null,observer:null,throttleTimer:null,isLoading:!1,scrollHandler:t=>__async(null,null,function*(){if(r.isLoading||r.options.disabled||r.options.loading)return;if(r.throttleTimer)return;r.throttleTimer=setTimeout(()=>{r.throttleTimer=null},n.throttle);const t=function(e,t,n){if(e===window){const e=window.scrollY||document.documentElement.scrollTop,t=document.documentElement.scrollHeight;return e+window.innerHeight>=t-n}const o=e,r=o.scrollTop,i=o.scrollHeight,l=o.clientHeight;return r+l>=i-n}(o,0,n.distance||0);t&&(yield ye(r,e))})};e.__infiniteScroll=r,n.useIntersection&&d()?function(e,t){const n=document.createElement("div");n.className="v-infinite-scroll__sentinel",n.style.cssText="\n height: 1px;\n width: 100%;\n clear: both;\n ",e.appendChild(n),t.sentinel=n,t.observer=new IntersectionObserver(n=>__async(null,null,function*(){for(const o of n)o.isIntersecting&&(t.isLoading||t.options.disabled||t.options.loading||(yield ye(t,e)))}),{root:t.container===window?null:t.container,rootMargin:`${t.options.distance||0}px`,threshold:0}),t.observer.observe(n)}(e,r):x(o,"scroll",r.scrollHandler,{passive:!0})},updated(e,t){const n=e.__infiniteScroll;n&&(n.options=he(t.value))},unmounted(e){const t=e.__infiniteScroll;t&&(t.throttleTimer&&clearTimeout(t.throttleTimer),t.observer&&t.observer.disconnect(),t.sentinel&&t.sentinel.parentNode&&t.sentinel.parentNode.removeChild(t.sentinel),E(t.container,"scroll",t.scrollHandler),delete e.__infiniteScroll)}});function ye(e,t){return __async(this,null,function*(){var n,o,r,i,l,s;e.isLoading=!0,null==(o=(n=e.options).onLoadStart)||o.call(n),t.classList.add("v-infinite-scroll--loading");try{yield e.options.handler()}catch(t){null==(i=(r=e.options).onError)||i.call(r,t)}finally{e.isLoading=!1,null==(s=(l=e.options).onLoadEnd)||s.call(l),t.classList.remove("v-infinite-scroll--loading")}})}const ge="__sticky";function we(e){return!1===e?{disabled:!0,top:0,zIndex:100}:"number"==typeof e?{top:e,zIndex:100}:__spreadValues({top:0,zIndex:100,stickyClass:"v-sticky--fixed",disabled:!1},e&&"object"==typeof e?e:{})}function Te(e){return void 0===e?"0":"number"==typeof e?`${e}px`:e}function xe(e,t){if(t.options.disabled)return void Ee(e,t);const n=Number.parseFloat(Te(t.options.top)),o=t.container===window?{top:0}:t.container.getBoundingClientRect(),r=(t.placeholder||e).getBoundingClientRect().top-o.top<=n;r&&!t.isSticky?function(e,t,n,o){var r,i,l;t.isSticky=!0;const s=document.createElement("div");s.style.cssText=`width:${e.offsetWidth}px;height:${e.offsetHeight}px`,null==(r=e.parentNode)||r.insertBefore(s,e),t.placeholder=s;const a=t.container===window?n:o+n;e.style.position="fixed",e.style.top=`${a}px`,e.style.zIndex=String(t.options.zIndex||100),e.style.width=`${e.offsetWidth}px`,void 0!==t.options.bottom&&(e.style.bottom=Te(t.options.bottom));t.options.stickyClass&&e.classList.add(t.options.stickyClass),e.dispatchEvent(new CustomEvent("sticky:change",{detail:{isSticky:!0}})),null==(l=(i=t.options).onChange)||l.call(i,!0)}(e,t,n,o.top):!r&&t.isSticky&&Ee(e,t)}function Ee(e,t){var n,o,r,i;t.isSticky&&(t.isSticky=!1,null==(o=null==(n=t.placeholder)?void 0:n.parentNode)||o.removeChild(t.placeholder),t.placeholder=null,Object.assign(e.style,t.originalStyles),t.options.stickyClass&&e.classList.remove(t.options.stickyClass),e.dispatchEvent(new CustomEvent("sticky:change",{detail:{isSticky:!1}})),null==(i=(r=t.options).onChange)||i.call(r,!1))}const ke=y({name:"sticky",ssr:!1,defaults:{top:0,zIndex:100,stickyClass:"v-sticky--fixed",disabled:!1},mounted(e,t){const n=we(t.value);if(n.disabled||!a())return;const o=function(e,t){if(t)return"string"==typeof t?document.querySelector(t)||T(e):t;const n=e.parentElement;if(n){const{overflow:e,overflowX:t,overflowY:o}=getComputedStyle(n);if(/(auto|scroll)/.test(e+t+o))return n}return T(e)}(e,n.container),r={options:n,placeholder:null,originalStyles:{position:e.style.position,top:e.style.top,bottom:e.style.bottom,zIndex:e.style.zIndex,width:e.style.width},isSticky:!1,container:o,scrollHandler:()=>xe(e,r),resizeHandler:()=>xe(e,r)};e.classList.add("v-sticky"),e[ge]=r,x(o,"scroll",r.scrollHandler,{passive:!0}),x(window,"resize",r.resizeHandler,{passive:!0}),xe(e,r)},updated(e,t){const n=e[ge];n&&(n.options=we(t.value),xe(e,n))},unmounted(e){var t,n;const o=e[ge];o&&(null==(n=null==(t=o.placeholder)?void 0:t.parentNode)||n.removeChild(o.placeholder),Object.assign(e.style,o.originalStyles),e.classList.remove("v-sticky",o.options.stickyClass||"v-sticky--fixed"),E(o.container,"scroll",o.scrollHandler),E(window,"resize",o.resizeHandler),delete e[ge])}});function Le(e){if("function"==typeof e)return{handler:e,duration:500,distance:10};if(!e)throw new Error("[Directix] v-long-press: handler is required");return __spreadValues({duration:500,distance:10,disabled:!1,prevent:!0,stop:!1,tickInterval:100},e)}const Ie=y({name:"long-press",ssr:!1,defaults:{duration:500,distance:10,disabled:!1,prevent:!0,stop:!1,tickInterval:100},mounted(e,t){const n=Le(t.value);if(n.disabled||!a())return;const o={options:n,timerId:null,tickTimerId:null,startTime:0,startPos:{x:0,y:0},startHandler:()=>{},endHandler:()=>{},moveHandler:()=>{}};o.startHandler=e=>{var t;const r=e;n.prevent&&r.preventDefault(),n.stop&&r.stopPropagation(),o.timerId&&(clearTimeout(o.timerId),o.timerId=null),o.tickTimerId&&(clearInterval(o.tickTimerId),o.tickTimerId=null);const i=L(r);if(o.startPos={x:i.x,y:i.y},o.startTime=Date.now(),null==(t=n.onStart)||t.call(n,r),n.onTick){let e=n.duration;o.tickTimerId=setInterval(()=>{var t;e-=n.tickInterval,null==(t=n.onTick)||t.call(n,Math.max(0,e))},n.tickInterval)}o.timerId=setTimeout(()=>{o.tickTimerId&&(clearInterval(o.tickTimerId),o.tickTimerId=null),n.handler(r)},n.duration)},o.endHandler=e=>{var t;const r=e;o.timerId&&(clearTimeout(o.timerId),o.timerId=null),o.tickTimerId&&(clearInterval(o.tickTimerId),o.tickTimerId=null),o.startTime>0&&(null==(t=n.onCancel)||t.call(n,r)),o.startTime=0},o.moveHandler=e=>{var t;if(!o.timerId)return;const r=e,i=L(r);var l,s;(l=o.startPos,s={x:i.x,y:i.y},Math.sqrt(__pow(s.x-l.x,2)+__pow(s.y-l.y,2)))>(n.distance||10)&&(o.timerId&&(clearTimeout(o.timerId),o.timerId=null),o.tickTimerId&&(clearInterval(o.tickTimerId),o.tickTimerId=null),null==(t=n.onCancel)||t.call(n,r),o.startTime=0)},e.__longPress=o,x(e,"mousedown",o.startHandler),x(e,"mouseup",o.endHandler),x(e,"mouseleave",o.endHandler),x(e,"mousemove",o.moveHandler),x(e,"touchstart",o.startHandler,{passive:!n.prevent}),x(e,"touchend",o.endHandler),x(e,"touchcancel",o.endHandler),x(e,"touchmove",o.moveHandler,{passive:!0})},updated(e,t){const n=e.__longPress;if(!n){return void(Le(t.value).disabled||(e.__longPress=null))}n.options=Le(t.value)},unmounted(e){const t=e.__longPress;t&&(t.timerId&&clearTimeout(t.timerId),t.tickTimerId&&clearInterval(t.tickTimerId),E(e,"mousedown",t.startHandler),E(e,"mouseup",t.endHandler),E(e,"mouseleave",t.endHandler),E(e,"mousemove",t.moveHandler),E(e,"touchstart",t.startHandler),E(e,"touchend",t.endHandler),E(e,"touchcancel",t.endHandler),E(e,"touchmove",t.moveHandler),delete e.__longPress)}});function Oe(e){return"function"==typeof e?{handler:e,class:"v-hover"}:__spreadValues({class:"v-hover",disabled:!1,enterDelay:0,leaveDelay:0},e)}const Ce=y({name:"hover",ssr:!1,defaults:{class:"v-hover",disabled:!1,enterDelay:0,leaveDelay:0},mounted(e,t){const n=Oe(t.value);if(n.disabled||!a())return;const o={options:n,isHovering:!1,enterTimerId:null,leaveTimerId:null,enterHandler:()=>{},leaveHandler:()=>{}};o.enterHandler=t=>{const r=t;o.leaveTimerId&&(clearTimeout(o.leaveTimerId),o.leaveTimerId=null),o.isHovering||(n.enterDelay&&n.enterDelay>0?o.enterTimerId=setTimeout(()=>{o.isHovering=!0,Se(e,o,r)},n.enterDelay):(o.isHovering=!0,Se(e,o,r)))},o.leaveHandler=t=>{const r=t;o.enterTimerId&&(clearTimeout(o.enterTimerId),o.enterTimerId=null),o.isHovering&&(n.leaveDelay&&n.leaveDelay>0?o.leaveTimerId=setTimeout(()=>{o.isHovering=!1,Ve(e,o,r)},n.leaveDelay):(o.isHovering=!1,Ve(e,o,r)))},e.__hover=o,x(e,"mouseenter",o.enterHandler),x(e,"mouseleave",o.leaveHandler)},updated(e,t){const n=e.__hover;if(!n)return;const o=Oe(t.value);o.disabled&&!n.options.disabled?e.classList.remove(n.options.class||"v-hover"):!o.disabled&&n.options.disabled,n.options=o},unmounted(e){const t=e.__hover;t&&(t.enterTimerId&&clearTimeout(t.enterTimerId),t.leaveTimerId&&clearTimeout(t.leaveTimerId),E(e,"mouseenter",t.enterHandler),E(e,"mouseleave",t.leaveHandler),e.classList.remove(t.options.class||"v-hover"),delete e.__hover)}});function Se(e,t,n){var o,r;const{options:i}=t;i.class&&e.classList.add(i.class),e.dispatchEvent(new CustomEvent("hover:enter",{detail:{event:n}})),null==(o=i.onEnter)||o.call(i,n),null==(r=i.handler)||r.call(i,!0,n)}function Ve(e,t,n){var o,r;const{options:i}=t;i.class&&e.classList.remove(i.class),e.dispatchEvent(new CustomEvent("hover:leave",{detail:{event:n}})),null==(o=i.onLeave)||o.call(i,n),null==(r=i.handler)||r.call(i,!1,n)}function De(e){if(!1===e)return{disabled:!0,color:"currentColor",duration:600};if("string"==typeof e)return{color:e,duration:600};const t={color:"currentColor",duration:600,disabled:!1,initialScale:0,finalScale:2};return e&&"object"==typeof e?__spreadValues(__spreadValues({},t),e):t}const He=y({name:"ripple",ssr:!1,defaults:{color:"currentColor",duration:600,disabled:!1,initialScale:0,finalScale:2},mounted(e,t){const n=De(t.value);if(n.disabled||!a())return;const o=getComputedStyle(e);"static"===o.position&&(e.style.position="relative"),"visible"===o.overflow&&(e.style.overflow="hidden"),e.classList.add("v-ripple");const r={options:n,clickHandler:t=>{if(r.options.disabled)return;const n=function(e,t,n){const o=t.getBoundingClientRect(),r=e.clientX-o.left,i=e.clientY-o.top,l=2*Math.max(o.width,o.height),s=document.createElement("span");return s.className="v-ripple__wave",s.style.cssText=`\n position: absolute;\n border-radius: 50%;\n pointer-events: none;\n background-color: ${n.color};\n width: ${l}px;\n height: ${l}px;\n left: ${r-l/2}px;\n top: ${i-l/2}px;\n transform: scale(${n.initialScale});\n opacity: 0.3;\n z-index: 0;\n `,s}(t,e,r.options);n&&(e.appendChild(n),function(e,t){const n=t.duration||600,o=t.initialScale||0,r=t.finalScale||2;"function"==typeof e.animate?e.animate([{transform:`scale(${o})`,opacity:.3},{transform:`scale(${r})`,opacity:0}],{duration:n,easing:"ease-out",fill:"forwards"}).onfinish=()=>{e.remove()}:(e.style.transition=`transform ${n}ms ease-out, opacity ${n}ms ease-out`,String(e.offsetHeight),e.style.transform=`scale(${r})`,e.style.opacity="0",setTimeout(()=>{e.remove()},n))}(n,r.options))}};e.__ripple=r,x(e,"click",r.clickHandler)},updated(e,t){const n=e.__ripple;n&&(n.options=De(t.value))},unmounted(e){const t=e.__ripple;t&&(E(e,"click",t.clickHandler),e.classList.remove("v-ripple"),delete e.__ripple)}}),ze="__mask",Pe={"#":/\d/,A:/[A-Za-z]/,N:/[A-Za-z0-9]/,X:/./};function Ne(e,t){return[...e].map(e=>{const n=Pe[e];return n?{pattern:n,placeholder:t,isLiteral:!1}:{pattern:new RegExp(`\\${e}`),placeholder:e,isLiteral:!0}})}function Ae(e){if("string"==typeof e)return{mask:e,placeholder:"_",showPlaceholder:!0};if(!(null==e?void 0:e.mask))throw new Error("[Directix] v-mask: mask is required");return __spreadValues({placeholder:"_",showPlaceholder:!0,showMaskOnBlur:!1,clearIncomplete:!1,disabled:!1},e)}function Me(e,t,n,o){let r="",i=0;for(const l of t){if(i>=e.length){r+=l.isLiteral?l.placeholder:o?n:"";continue}const t=e[i];l.isLiteral?(t===l.placeholder&&i++,r+=l.placeholder):l.pattern.test(t)?(r+=t,i++):t===n?(r+=o?n:"",i++):i++}return r}function Fe(e,t,n){for(let o=0;o<t.length;o++)if(!t[o].isLiteral&&(o>=e.length||e[o]===n))return!1;return!0}function Be(e,t){let n=t;for(;n<e.length&&e[n].isLiteral;)n++;return Math.min(n,e.length)}const je=y({name:"mask",ssr:!1,defaults:{placeholder:"_",showPlaceholder:!0,showMaskOnBlur:!1,clearIncomplete:!1,disabled:!1},mounted(e,t){var n;if(!function(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}(e))return void console.warn("[Directix] v-mask: directive must be used on input or textarea elements");const o=Ae(t.value);if(o.disabled||!a())return;const r=o.placeholder||"_",i=Ne(o.mask,r),l=e=>{var t,n,l;const s=e.target,a=s.value,c=s.selectionStart||0,u=Me(a,i,r,null==(t=o.showPlaceholder)||t);if(u!==a)return s.value=u,s.setSelectionRange(Be(i,c),Be(i,c)),void s.dispatchEvent(new Event("input",{bubbles:!0}));null==(n=o.onChange)||n.call(o,u,function(e,t,n){let o="";for(let r=0;r<e.length&&r<t.length;r++)t[r].isLiteral||e[r]===n||(o+=e[r]);return o}(u,i,r)),Fe(u,i,r)&&(null==(l=o.onComplete)||l.call(o,u))},s=()=>{!e.value&&o.showPlaceholder&&(e.value=Me("",i,r,!0))},c=()=>{o.showMaskOnBlur||Fe(e.value,i,r)||!o.clearIncomplete||(e.value="")};x(e,"input",l),x(e,"focus",s),x(e,"blur",c),e[ze]={options:o,tokens:i,placeholder:r,inputHandler:l,focusHandler:s,blurHandler:c},e.value&&(e.value=Me(e.value,i,r,null==(n=o.showPlaceholder)||n))},updated(e,t){const n=e[ze];n&&(n.options=Ae(t.value),n.tokens=Ne(n.options.mask,n.placeholder))},unmounted(e){const t=e[ze];t&&(E(e,"input",t.inputHandler),E(e,"focus",t.focusHandler),E(e,"blur",t.blurHandler),delete e[ze])}}),$e="__permission";let Re=null;function Ue(e,t){return t.includes("*")||t.includes(e)}function We(e,t){var n,o;const r=function(e){return e[$e]||(e[$e]={options:{value:""},originalDisplay:"",originalDisabled:!1,parentNode:null,placeholder:null}),e[$e]}(e);r.options=function(e){if(!e)throw new Error("[Directix] v-permission: permission value is required");return"string"==typeof e||Array.isArray(e)?{value:e}:e}(t.value);const i=function(e){var t;if(e.check)return e.check(e.value,e.mode||"some");if(!Re)return console.warn("[Directix] v-permission: No permission config provided"),!0;const n=Re.getPermissions(),o=(null==(t=Re.getRoles)?void 0:t.call(Re))||[],r=Re.roleMap||{},i=Array.isArray(e.value)?e.value:[e.value];function l(e){if(e in r)return o.includes(e);if(Ue(e,n))return!0;for(const t of o)if(Ue(e,r[t]||[]))return!0;return!1}return"every"===(e.mode||"some")?i.every(l):i.some(l)}(r.options);null==(o=(n=r.options).onChange)||o.call(n,i);const l=r.options.action||"remove";i?function(e,t,n){switch(t){case"remove":n.placeholder&&n.parentNode&&(n.parentNode.insertBefore(e,n.placeholder),n.parentNode.removeChild(n.placeholder),n.placeholder=null);break;case"disable":!1===n.originalDisabled?e.removeAttribute("disabled"):n.originalDisabled&&e.setAttribute("disabled",n.originalDisabled),e.classList.remove("v-permission--disabled");break;case"hide":e.style.display=n.originalDisplay||"",e.classList.remove("v-permission--hidden")}}(e,l,r):function(e,t,n){var o,r;switch(t){case"remove":n.parentNode=e.parentNode,n.placeholder=document.createComment("v-permission"),null==(o=e.parentNode)||o.insertBefore(n.placeholder,e),null==(r=e.parentNode)||r.removeChild(e);break;case"disable":n.originalDisabled=e.getAttribute("disabled")||!1,e.setAttribute("disabled","true"),e.classList.add("v-permission--disabled");break;case"hide":n.originalDisplay=e.style.display,e.style.display="none",e.classList.add("v-permission--hidden")}}(e,l,r)}const qe=y({name:"permission",ssr:!0,mounted(e,t){We(e,t)},updated(e,t){We(e,t)},unmounted(e){!function(e){const t=e[$e];(null==t?void 0:t.placeholder)&&t.parentNode&&t.parentNode.removeChild(t.placeholder),delete e[$e]}(e)}}),Xe=["b","i","u","strong","em","br","p","span","div"],Ye=["title","alt","href","src"],Ge=["script","iframe","object","embed","form","input","style","link","meta","base"],Ze=["onclick","onerror","onload","onmouseover","onfocus","onblur","onchange","onsubmit"];function Ke(e){return!1===e?{disabled:!0}:!0===e?{allowedTags:Xe,allowedAttributes:Ye}:__spreadValues({allowedTags:Xe,allowedAttributes:Ye,allowDataUrls:!1,allowStyles:!1,allowClass:!1,allowId:!1,disabled:!1,sanitizeOnUpdate:!0},e)}function Je(e,t){var n;if(t.handler)return t.handler(e);const o=document.createElement("div");o.innerHTML=e;for(const e of Ge){const t=o.getElementsByTagName(e);for(;t.length>0;)null==(n=t[0].parentNode)||n.removeChild(t[0])}const r=e=>{var n;const o=e.tagName.toLowerCase();if(t.allowedTags&&!t.allowedTags.includes(o)){const t=document.createTextNode(e.textContent||"");return void(null==(n=e.parentNode)||n.replaceChild(t,e))}for(const t of Ze)e.removeAttribute(t);const i=e.getAttribute("href");if(i&&i.toLowerCase().startsWith("javascript:")&&e.removeAttribute("href"),!t.allowDataUrls){const t=e.getAttribute("src");t&&t.toLowerCase().startsWith("data:")&&e.removeAttribute("src")}if(t.allowedAttributes){const n=Array.from(e.attributes);for(const o of n){const n=t.allowedAttributes.includes(o.name.toLowerCase()),r="class"===o.name&&t.allowClass,i="id"===o.name&&t.allowId,l="style"===o.name&&t.allowStyles;n||r||i||l||e.removeAttribute(o.name)}}for(const t of Array.from(e.children))r(t)};for(const e of Array.from(o.children))r(e);return o.innerHTML}const Qe=y({name:"sanitize",ssr:!0,defaults:{allowedTags:Xe,allowedAttributes:Ye,allowDataUrls:!1,allowStyles:!1,allowClass:!1,allowId:!1,disabled:!1,sanitizeOnUpdate:!0},mounted(e,t){if(!a())return;const n=Ke(t.value);if(n.disabled)return;e.__sanitize={options:n};const o=e.innerHTML;o&&(e.innerHTML=Je(o,n))},updated(e,t){const n=e.__sanitize;if(!n)return;if(n.options=Ke(t.value),n.options.disabled||!n.options.sanitizeOnUpdate)return;const o=e.innerHTML;o&&(e.innerHTML=Je(o,n.options))},unmounted(e){delete e.__sanitize}});function et(e){if("function"==typeof e)return{handler:e};if(!e)throw new Error("[Directix] v-resize: handler is required");return __spreadValues({disabled:!1,box:"content-box",debounce:0},e)}const tt=y({name:"resize",ssr:!1,defaults:{disabled:!1,box:"content-box",debounce:0},mounted(e,t){const n=et(t.value);if(n.disabled||!a())return;"static"===getComputedStyle(e).position&&(e.style.position="relative");const o={options:n,observer:null,debounceTimer:null,pendingEntry:null,fallbackIframe:null,handler:e=>{n.debounce&&n.debounce>0?(o.pendingEntry=e,o.debounceTimer||(o.debounceTimer=setTimeout(()=>{o.pendingEntry&&n.handler(o.pendingEntry),o.debounceTimer=null,o.pendingEntry=null},n.debounce))):n.handler(e)}};if(e.__resize=o,p())o.observer=new ResizeObserver(e=>{for(const t of e)o.handler(t)}),o.observer.observe(e,{box:n.box});else{console.warn("[Directix] v-resize: ResizeObserver not supported, using fallback");const{iframe:t,cleanup:r}=function(e,t){const n=document.createElement("iframe");n.style.cssText="\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: none;\n pointer-events: none;\n opacity: 0;\n ",e.appendChild(n);const o=n.contentWindow;return o&&o.addEventListener("resize",t),{iframe:n,cleanup:()=>{o&&o.removeEventListener("resize",t),n.remove()}}}(e,()=>{const t=e.getBoundingClientRect(),r={target:e,contentRect:t,borderBoxSize:[],contentBoxSize:[],devicePixelContentBoxSize:[]};o.handler(r),n.onFallback&&n.onFallback(function(e){return{width:e.contentRect.width,height:e.contentRect.height,contentRect:e.contentRect,borderBoxSize:e.borderBoxSize,contentBoxSize:e.contentBoxSize,devicePixelContentBoxSize:e.devicePixelContentBoxSize}}(r))});o.fallbackIframe=t,e.__resizeCleanup=r}},updated(e,t){const n=e.__resize;n&&(n.options=et(t.value))},unmounted(e){const t=e.__resize;if(!t)return;t.debounceTimer&&clearTimeout(t.debounceTimer),t.observer&&t.observer.disconnect();const n=e.__resizeCleanup;n&&n(),delete e.__resize,delete e.__resizeCleanup}});function nt(e){if("function"==typeof e)return{handler:e,childList:!0};if(!e||!e.handler)throw new Error("[Directix] v-mutation: handler is required");return __spreadValues({attributes:!1,childList:!0,subtree:!1,characterData:!1,attributeOldValue:!1,characterDataOldValue:!1,disabled:!1},e)}const ot=y({name:"mutation",ssr:!1,defaults:{attributes:!1,childList:!0,subtree:!1,characterData:!1,attributeOldValue:!1,characterDataOldValue:!1,disabled:!1},mounted(e,t){const n=nt(t.value);if(n.disabled||!a())return;if(!f())return void console.warn("[Directix] v-mutation: MutationObserver not supported");const o={options:n,observer:null};o.observer=new MutationObserver((e,t)=>{n.handler(e,t)}),o.observer.observe(e,{attributes:n.attributes,attributeFilter:n.attributeFilter,childList:n.childList,subtree:n.subtree,characterData:n.characterData,attributeOldValue:n.attributeOldValue,characterDataOldValue:n.characterDataOldValue}),e.__mutation=o},updated(e,t){const n=e.__mutation;if(!n)return;const o=nt(t.value);o.disabled&&!n.options.disabled?n.observer&&n.observer.disconnect():!o.disabled&&n.options.disabled?n.observer&&n.observer.observe(e,{attributes:o.attributes,attributeFilter:o.attributeFilter,childList:o.childList,subtree:o.subtree,characterData:o.characterData,attributeOldValue:o.attributeOldValue,characterDataOldValue:o.characterDataOldValue}):o.disabled||o.attributes===n.options.attributes&&o.childList===n.options.childList&&o.subtree===n.options.subtree&&o.characterData===n.options.characterData||n.observer&&(n.observer.disconnect(),n.observer.observe(e,{attributes:o.attributes,attributeFilter:o.attributeFilter,childList:o.childList,subtree:o.subtree,characterData:o.characterData,attributeOldValue:o.attributeOldValue,characterDataOldValue:o.characterDataOldValue})),n.options=o},unmounted(e){const t=e.__mutation;t&&(t.observer&&t.observer.disconnect(),delete e.__mutation)}}),rt={"click-outside":z,copy:M,debounce:B,throttle:R,focus:X,lazy:ne,intersect:le,visible:ae,loading:de,scroll:be,"infinite-scroll":_e,sticky:ke,"long-press":Ie,hover:Ce,ripple:He,mask:je,permission:qe,sanitize:Qe,resize:tt,mutation:ot},it={install:(e,t={})=>{var n,o,r,i,l,a,c;let u=null;if("function"==typeof e&&(null==(n=e.version)?void 0:n.startsWith("2")))u=2;else if((null==e?void 0:e.config)&&(null==(o=null==e?void 0:e.version)?void 0:o.startsWith("3")))u=3;else if("function"==typeof(null==e?void 0:e.directive)&&"function"==typeof(null==e?void 0:e.mixin)&&(null==(r=e.version)?void 0:r.startsWith("2")))u=2;else if("undefined"!=typeof window){const e=window;(null==(l=null==(i=e.Vue)?void 0:i.version)?void 0:l.startsWith("2"))?u=2:(null==(c=null==(a=e.Vue)?void 0:a.version)?void 0:c.startsWith("3"))&&(u=3)}u&&s(u);const{directives:d,all:p=!1}=t;p||!d?Object.entries(rt).forEach(([t,n])=>{e.directive(t,n)}):d.forEach(t=>{const n=rt[t];n?e.directive(t,n):console.warn(`[Directix] Unknown directive: ${t}`)})}};e.Directix=it,e.addCleanupVue2=function(e,t){const n=e.__directix_state__;n&&n.cleanup.push(t)},e.addCleanupVue3=function(e,t){const n=e.__directix_state__;n&&n.cleanup.push(t)},e.clickOutside=z,e.configurePermission=function(e){Re=e},e.copy=M,e.createVue2Directive=m,e.createVue3Directive=h,e.debounce=B,e.debounceFn=V,e.deepClone=function e(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>e(t));const n={};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=e(t[o]));return n},e.deepMerge=function e(t,...n){if(!n.length)return t;const o=n.shift();if(C(t)&&C(o))for(const n in o)C(o[n])?(t[n]||Object.assign(t,{[n]:{}}),e(t[n],o[n])):Object.assign(t,{[n]:o[n]});return e(t,...n)},e.defineDirective=y,e.defineDirectiveGroup=function(e,t){return{name:e,directives:t,install(n,o){Object.entries(t).forEach(([t,o])=>{const r=`${e}-${t}`;n.directive(r,o)})}}},e.focus=X,e.generateId=function(e=""){return`${e}${Date.now().toString(36)}${Math.random().toString(36).slice(2,9)}`},e.get=function(e,t,n){const o=t.split(".");let r=e;for(const e of o){if(null==r)return n;r=r[e]}return void 0===r?n:r},e.getPermissionConfig=function(){return Re},e.getVueVersion=l,e.hover=Ce,e.infiniteScroll=_e,e.intersect=le,e.isArray=S,e.isBoolean=function(e){return"boolean"==typeof e},e.isBrowser=a,e.isEmpty=function(e){return null==e||(I(e)||S(e)?0===e.length:!!C(e)&&0===Object.keys(e).length)},e.isFunction=O,e.isNumber=function(e){return"number"==typeof e&&!Number.isNaN(e)},e.isObject=C,e.isPromise=function(e){return C(e)&&O(e.then)},e.isSSR=c,e.isString=I,e.isVue2=function(){if(null===n){const e=l();n=2===e||2.7===e}return n},e.isVue27=function(){return null===o&&(o=2.7===l()),o},e.isVue3=function(){return null===r&&(r=3===l()),r},e.lazy=ne,e.loading=de,e.longPress=Ie,e.mask=je,e.mutation=ot,e.parseTime=H,e.permission=qe,e.resetVueVersion=function(){t=null,n=null,o=null,r=null},e.resize=tt,e.ripple=He,e.sanitize=Qe,e.scroll=be,e.set=function(e,t,n){const o=t.split("."),r=o.pop();let i=e;for(const e of o)void 0===i[e]&&(i[e]={}),i=i[e];i[r]=n},e.setVueVersion=s,e.sticky=ke,e.supportsClipboard=v,e.supportsIntersectionObserver=d,e.supportsMutationObserver=f,e.supportsPassive=u,e.supportsResizeObserver=p,e.throttle=R,e.throttleFn=D,e.vClickOutside=z,e.vCopy=M,e.vDebounce=B,e.vFocus=X,e.vHover=Ce,e.vInfiniteScroll=_e,e.vIntersect=le,e.vLazy=ne,e.vLoading=de,e.vLongPress=Ie,e.vMask=je,e.vMutation=ot,e.vPermission=qe,e.vResize=tt,e.vRipple=He,e.vSanitize=Qe,e.vScroll=be,e.vSticky=ke,e.vThrottle=R,e.vVisible=ae,e.visible=ae,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}(this.Directix=this.Directix||{});
7
+ var __defProp=Object.defineProperty,__defProps=Object.defineProperties,__getOwnPropDescs=Object.getOwnPropertyDescriptors,__getOwnPropSymbols=Object.getOwnPropertySymbols,__hasOwnProp=Object.prototype.hasOwnProperty,__propIsEnum=Object.prototype.propertyIsEnumerable,__pow=Math.pow,__defNormalProp=(e,t,n)=>t in e?__defProp(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,__spreadValues=(e,t)=>{for(var n in t||(t={}))__hasOwnProp.call(t,n)&&__defNormalProp(e,n,t[n]);if(__getOwnPropSymbols)for(var n of __getOwnPropSymbols(t))__propIsEnum.call(t,n)&&__defNormalProp(e,n,t[n]);return e},__spreadProps=(e,t)=>__defProps(e,__getOwnPropDescs(t)),__objRest=(e,t)=>{var n={};for(var o in e)__hasOwnProp.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&__getOwnPropSymbols)for(var o of __getOwnPropSymbols(e))t.indexOf(o)<0&&__propIsEnum.call(e,o)&&(n[o]=e[o]);return n},__async=(e,t,n)=>new Promise((o,l)=>{var i=e=>{try{s(n.next(e))}catch(e){l(e)}},r=e=>{try{s(n.throw(e))}catch(e){l(e)}},s=e=>e.done?o(e.value):Promise.resolve(e.value).then(i,r);s((n=n.apply(e,t)).next())});!function(e){"use strict";function t(e){return{bind(e,t,n){const o={value:t.value,vnode:n,cleanup:[]};e.__directix_state__=o},inserted(t,o,l){e.mounted&&e.mounted(t,n(o),l)},update(t,o,l,i){const r=t.__directix_state__;e.updated&&e.updated(t,n(o),l,n(__spreadProps(__spreadValues({},o),{value:o.oldValue})),i),r&&(r.value=o.value,r.vnode=l)},componentUpdated(e,t,n,o){},unbind(t,o,l){e.unmounted&&e.unmounted(t,n(o),l);const i=t.__directix_state__;(null==i?void 0:i.cleanup)&&i.cleanup.forEach(e=>e()),delete t.__directix_state__}}}function n(e){var t;return{value:e.value,oldValue:null!=(t=e.oldValue)?t:null,arg:e.arg,modifiers:e.modifiers||{},instance:e.instance||null}}function o(e){return{created(e,t,n){const o={value:t.value,vnode:n,cleanup:[]};e.__directix_state__=o},beforeMount(e,t,n){},mounted(t,n,o){e.mounted&&e.mounted(t,l(n),o)},beforeUpdate(e,t,n,o){},updated(t,n,o,i){const r=t.__directix_state__;e.updated&&e.updated(t,l(n),o,l(__spreadProps(__spreadValues({},n),{value:n.oldValue})),i),r&&(r.value=n.value,r.vnode=o)},beforeUnmount(e,t,n){},unmounted(t,n,o){e.unmounted&&e.unmounted(t,l(n),o);const i=t.__directix_state__;(null==i?void 0:i.cleanup)&&i.cleanup.forEach(e=>e()),delete t.__directix_state__}}}function l(e){var t;return{value:e.value,oldValue:null!=(t=e.oldValue)?t:null,arg:e.arg,modifiers:e.modifiers||{},instance:e.instance}}let i=null,r=null,s=null,a=null;function u(e){return e.startsWith("2.7")?2.7:e.startsWith("2")?2:e.startsWith("3")?3:null}function c(){var e,t;if(null!==i)return i;if("undefined"!=typeof process){const e=process.env.DIRECTIX_VUE_VERSION;if("2.7"===e)return i=2.7,i;if("2"===e)return i=2,i;if("3"===e)return i=3,i}try{const e=require("vue"),t=u(null==e?void 0:e.version);if(null!==t)return i=t,i}catch(e){}if("undefined"!=typeof window){const n=window,o=n.Vue;if(null==o?void 0:o.version){const e=u(o.version);if(null!==e)return i=e,i}if("function"==typeof(null==o?void 0:o.observable))return i=2,i;if("function"==typeof(null==o?void 0:o.createApp)&&"function"!=typeof(null==o?void 0:o.observable))return i=3,i;const l=n.__VUE_DEVTOOLS_GLOBAL_HOOK__;if(null==(e=null==l?void 0:l.Vue)?void 0:e.version){const e=u(l.Vue.version);if(null!==e)return i=e,i}if(null==(t=null==l?void 0:l.apps)?void 0:t.length)return i=3,i}return null===i&&("undefined"!=typeof window&&console.warn("[Directix] Unable to detect Vue version, defaulting to Vue 3. Set DIRECTIX_VUE_VERSION=2 or call setVueVersion(2) if using Vue 2."),i=3),i}function d(e){i=e,r=2===e||2.7===e,s=2.7===e,a=3===e}const p=()=>"undefined"!=typeof window&&"undefined"!=typeof document,v=()=>!p(),m=()=>{if(!p())return!1;let e=!1;try{const t={get passive(){return e=!0,!1}};window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){e=!1}return e},f=()=>p()&&"IntersectionObserver"in window,h=()=>p()&&"ResizeObserver"in window,g=()=>p()&&"clipboard"in navigator,b=()=>p()&&"MutationObserver"in window;function y(e){var n;const l=e,{name:i,version:r,ssr:s,defaults:a}=l,u=__objRest(l,["name","version","ssr","defaults"]);if(v()&&!s)return"undefined"!=typeof process&&"test"!==(null==(n=process.env)?void 0:n.NODE_ENV)&&console.warn(`[Directix] Directive "${i}" is not compatible with SSR. It will be a no-op on the server side.`),{mounted:()=>{},updated:()=>{},unmounted:()=>{}};return function(e){let n=null;function l(){return n||(n=2===c()?t(e):o(e)),n}function i(e){return function(t,n,o,i){var r,s;null==(s=(r=l())[e])||s.call(r,t,n,o,i)}}return{bind:i("bind"),inserted:i("inserted"),update:i("update"),componentUpdated:i("componentUpdated"),unbind:i("unbind"),created:i("created"),beforeMount:i("beforeMount"),mounted:i("mounted"),beforeUpdate:i("beforeUpdate"),updated:i("updated"),beforeUnmount:i("beforeUnmount"),unmounted:i("unmounted")}}({mounted:u.mounted?(e,t,n)=>{u.mounted(e,_(t,a),n)}:void 0,updated:u.updated?(e,t,n,o,l)=>{u.updated(e,_(t,a),n,o,l)}:void 0,unmounted:u.unmounted})}function _(e,t){if(!t)return e;const n="object"==typeof e.value&&null!==e.value?__spreadValues(__spreadValues({},t),e.value):e.value;return __spreadProps(__spreadValues({},e),{value:n})}function w(e,t,n){if(!t.onInput)return()=>{};const o=()=>{const t=e.selectionStart,o=e.selectionEnd,l=e.value,i=n(l);l!==i&&(e.value=i,null!==t&&null!==o&&e.setSelectionRange(t,o),e.dispatchEvent(new Event("input",{bubbles:!0})))};return e.addEventListener("input",o),e.value=n(e.value),()=>{e.removeEventListener("input",o)}}function T(e,t){const n=e.textContent||"";e.textContent=t(n)}function E(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}const x=["a","an","the","and","but","or","for","nor","on","at","to","from","by","in","of","with","as"];function L(e,t){if(!e)return e;const{every:n=!0,keepLower:o=x}=t;if(n){return e.toLowerCase().split(/\s+/).map((e,t)=>0===t?S(e):o.includes(e.toLowerCase())?e.toLowerCase():S(e)).join(" ")}return S(e)}function S(e){return e?e.charAt(0).toUpperCase()+e.slice(1).toLowerCase():e}function C(e){var t,n,o;return void 0===e||!0===e?{every:!0,onInput:!0}:!1===e?{every:!1,onInput:!1}:{every:null==(t=e.every)||t,keepLower:null!=(n=e.keepLower)?n:x,onInput:null==(o=e.onInput)||o}}const k=y({name:"capitalcase",ssr:!0,mounted(e,t){const n=C(t.value);if(E(e)){const t=w(e,n,e=>L(e,n));e.__capitalcaseCleanup=t}else T(e,e=>L(e,n))},updated(e,t){const n=C(t.value);E(e)?n.onInput&&(e.value=L(e.value,n)):T(e,e=>L(e,n))},unmounted(e){const t=e.__capitalcaseCleanup;null==t||t(),delete e.__capitalcaseCleanup}});function D(e){return e?"string"==typeof e?p()?document.querySelector(e):null:e instanceof Element?e:null:null}function I(e){if(!p())return window;let t=e.parentElement;for(;t;){const{overflow:e,overflowX:n,overflowY:o}=getComputedStyle(t);if(/(auto|scroll)/.test(e+n+o))return t;t=t.parentElement}return window}function O(e,t,n,o=!1){if(!p())return;const l=P(o);e.addEventListener(t,n,l)}function H(e,t,n,o=!1){if(!p())return;const l=P(o);e.removeEventListener(t,n,l)}function P(e){if("boolean"==typeof e)return e;const{capture:t=!1,passive:n=!1,once:o=!1}=e;return m()?{capture:t,passive:n,once:o}:t}function M(e){let t=0,n=0;return"touches"in e&&e.touches.length>0?(t=e.touches[0].clientX,n=e.touches[0].clientY):"clientX"in e&&(t=e.clientX,n=e.clientY),{x:t,y:n,clientX:t,clientY:n}}function z(e){return"string"==typeof e}function V(e){return"function"==typeof e}function N(e){return"object"==typeof e&&null!==e}function X(e){return Array.isArray(e)}function A(e,t=300,n={}){let o=null,l=null,i=null;const{leading:r=!1,trailing:s=!0}=n,a=()=>{l&&(e.apply(i,l),l=null,i=null)},u=function(...e){l=e,i=this,o&&clearTimeout(o),r&&!o&&a(),o=setTimeout(()=>{s&&a(),o=null},t)};return u.cancel=()=>{o&&(clearTimeout(o),o=null),l=null,i=null},u.flush=()=>{o&&(clearTimeout(o),a(),o=null)},u}function Y(e,t=300,n={}){let o=null,l=null,i=null,r=0;const{leading:s=!0,trailing:a=!0}=n,u=()=>{l&&(e.apply(i,l),l=null,i=null)},c=function(...e){const n=Date.now();r||s||(r=n);const c=t-(n-r);l=e,i=this,c<=0||c>t?(o&&(clearTimeout(o),o=null),r=n,u()):!o&&a&&(o=setTimeout(()=>{r=s?Date.now():0,o=null,u()},c))};return c.cancel=()=>{o&&(clearTimeout(o),o=null),r=0,l=null,i=null},c}function $(e){if(!e)return null;if(e.endsWith("ms"))return parseInt(e,10);if(e.endsWith("s"))return 1e3*parseFloat(e);const t=parseInt(e,10);return isNaN(t)?null:t}const R=y({name:"click-outside",ssr:!1,defaults:{capture:!0,events:["click"],disabled:!1,stop:!1,prevent:!1},mounted(e,t){const n=B(t.value);if(n.disabled)return;const o={options:n,handlers:new Map};e.__clickOutside=o;n.events.forEach(t=>{const l=t=>{F(e,t,n)&&(n.stop&&t.stopPropagation(),n.prevent&&t.preventDefault(),n.handler(t))};o.handlers.set(t,l);const i={capture:n.capture,passive:!n.prevent};O(document,t,l,i)})},updated(e,t){const n=e.__clickOutside;if(!n)return;const o=n.options,l=B(t.value);if(o.disabled!==l.disabled)if(l.disabled)n.handlers.forEach((e,t)=>{H(document,t,e,{capture:o.capture})}),n.handlers.clear();else{const t=t=>t=>{F(e,t,l)&&(l.stop&&t.stopPropagation(),l.prevent&&t.preventDefault(),l.handler(t))};l.events.forEach(e=>{const o=t();n.handlers.set(e,o),O(document,e,o,{capture:l.capture,passive:!l.prevent})})}n.options=l},unmounted(e){const t=e.__clickOutside;t&&(t.handlers.forEach((e,n)=>{H(document,n,e,{capture:t.options.capture})}),delete e.__clickOutside)}});function B(e){var t,n,o,l,i;if("function"==typeof e)return{handler:e,capture:!0,events:["click"],disabled:!1,stop:!1,prevent:!1};if(!e)throw new Error("[Directix] v-click-outside: handler is required");return __spreadValues({capture:null==(t=e.capture)||t,events:null!=(n=e.events)?n:["click"],disabled:null!=(o=e.disabled)&&o,stop:null!=(l=e.stop)&&l,prevent:null!=(i=e.prevent)&&i},e)}function F(e,t,n){var o;const l=t.target;if(e.contains(l))return!1;if(null==(o=n.exclude)?void 0:o.length)for(const e of n.exclude){const t="function"==typeof e?e():D(e);if(t&&(t===l||t.contains(l)))return!1}return!0}function j(e){return __async(this,null,function*(){if(g())try{return yield navigator.clipboard.writeText(e),!0}catch(e){console.warn("[Directix] Clipboard API failed, falling back to execCommand")}return function(e){const t=document.createElement("textarea");t.value=e,t.style.cssText="\n position: fixed;\n top: -9999px;\n left: -9999px;\n opacity: 0;\n pointer-events: none;\n ",document.body.appendChild(t);try{return t.select(),t.setSelectionRange(0,t.value.length),document.execCommand("copy")}catch(e){return!1}finally{document.body.removeChild(t)}}(e)})}const U=y({name:"copy",ssr:!1,mounted(e,t){const n=W(t.value);if(n.disabled)return;n.title&&e.setAttribute("title",n.title);const o={handler:null,options:n};o.handler=()=>__async(null,null,function*(){var t,n,l,i;const r=o.options.value;if(r)try{if(!(yield j(r)))throw new Error("Copy failed");null==(n=(t=o.options).onSuccess)||n.call(t,r),e.dispatchEvent(new CustomEvent("copy:success",{detail:{text:r}}))}catch(t){const n=t;null==(i=(l=o.options).onError)||i.call(l,n),e.dispatchEvent(new CustomEvent("copy:error",{detail:{error:n}}))}else console.warn("[Directix] v-copy: No text to copy")}),e.addEventListener("click",o.handler),e.__copy=o},updated(e,t){const n=e.__copy;n&&(n.options=W(t.value),n.options.title&&e.setAttribute("title",n.options.title))},unmounted(e){const t=e.__copy;t&&(e.removeEventListener("click",t.handler),delete e.__copy)}});function W(e){return"string"==typeof e?{value:e}:e}const q=["click","input","change","submit","scroll","resize","mouseenter","mouseleave","mousemove","mousedown","mouseup","keydown","keyup","focus","blur","touchstart","touchmove","touchend"];function Z(e){for(const t of q)if(e[t])return t;return null}function G(e){const t=e.tagName.toLowerCase();return"input"===t||"textarea"===t?"input":"click"}function J(e,t){const n=$(t.arg)||300;return"function"==typeof e?{handler:e,wait:n}:__spreadProps(__spreadValues({},e),{wait:e.wait||n})}const K=y({name:"debounce",ssr:!0,defaults:{wait:300,leading:!1,trailing:!0},mounted(e,t){const n=J(t.value,t),o=Z(t.modifiers)||G(e),l=A(n.handler,n.wait,{leading:n.leading,trailing:n.trailing});e.addEventListener(o,l),e.__debounce={debouncedFn:l,eventType:o,options:n}},updated(e,t){const n=e.__debounce;if(!n)return;const o=J(t.value,t);if(o.wait!==n.options.wait||o.leading!==n.options.leading||o.trailing!==n.options.trailing){n.debouncedFn.cancel();const t=A(o.handler,o.wait,{leading:o.leading,trailing:o.trailing});e.removeEventListener(n.eventType,n.debouncedFn),e.addEventListener(n.eventType,t),e.__debounce={debouncedFn:t,eventType:n.eventType,options:o}}else o.handler!==n.options.handler&&(n.options.handler=o.handler)},unmounted(e){const t=e.__debounce;t&&(t.debouncedFn.cancel(),e.removeEventListener(t.eventType,t.debouncedFn),delete e.__debounce)}});function Q(e){if(e.type.startsWith("touch")){const t=e.touches[0];return{clientX:t.clientX,clientY:t.clientY}}const t=e;return{clientX:t.clientX,clientY:t.clientY}}function ee(e){const t=e.match(/translate\(([-\d.]+)px,\s*([-\d.]+)px\)/);return t?{x:parseFloat(t[1]),y:parseFloat(t[2])}:{x:0,y:0}}function te(e){var t,n,o;return void 0===e||!0===e?{axis:"both",constrain:!1,disabled:!1}:!1===e?{axis:"both",constrain:!1,disabled:!0}:{axis:null!=(t=e.axis)?t:"both",constrain:null!=(n=e.constrain)&&n,boundary:e.boundary,handle:e.handle,disabled:null!=(o=e.disabled)&&o,grid:e.grid,onStart:e.onStart,onDrag:e.onDrag,onEnd:e.onEnd}}const ne=y({name:"draggable",ssr:!1,mounted(e,t){const n=te(t.value);if(n.disabled)return;"static"===getComputedStyle(e).position&&(e.style.position="absolute");const o={options:n,isDragging:!1,startX:0,startY:0,offsetX:0,offsetY:0,initialLeft:0,initialTop:0,boundaryWidth:0,boundaryHeight:0,elWidth:0,elHeight:0,handleEl:n.handle?e.querySelector(n.handle):null,moveHandler:null,endHandler:null};e.__draggable=o;const l=o.handleEl||e;function i(t){var n,l,i;if(o.options.disabled)return;"touchstart"===t.type&&t.preventDefault();const{clientX:r,clientY:s}=Q(t);o.isDragging=!0,o.startX=r,o.startY=s;const{x:a,y:u}=ee(e.style.transform);if(o.offsetX=a,o.offsetY=u,o.options.constrain||o.options.boundary){const t=o.options.boundary?function(e,t){var n,o;if(!t)return null;if("function"==typeof t){const e=t();return null!=(n=null==e?void 0:e.getBoundingClientRect())?n:null}if("string"==typeof t){const e=document.querySelector(t);return null!=(o=null==e?void 0:e.getBoundingClientRect())?o:null}return t.getBoundingClientRect()}(0,o.options.boundary):null==(n=e.parentElement)?void 0:n.getBoundingClientRect();if(t){const n=e.getBoundingClientRect();o.initialLeft=n.left-t.left,o.initialTop=n.top-t.top,o.boundaryWidth=t.width,o.boundaryHeight=t.height,o.elWidth=n.width,o.elHeight=n.height}}e.classList.add("v-draggable--dragging"),o.moveHandler=t=>{var n,l;if(!o.isDragging)return;const{clientX:i,clientY:r}=Q(t);let s=i-o.startX,a=r-o.startY;"x"===o.options.axis?a=0:"y"===o.options.axis&&(s=0),o.options.grid&&(s=Math.round(s/o.options.grid[0])*o.options.grid[0],a=Math.round(a/o.options.grid[1])*o.options.grid[1]);let u=o.offsetX+s,c=o.offsetY+a;if(o.options.constrain||o.options.boundary){const e=o.initialLeft+s,t=o.initialTop+a,n=o.boundaryWidth-o.elWidth,l=o.boundaryHeight-o.elHeight,i=Math.max(0,Math.min(e,n)),r=Math.max(0,Math.min(t,l));u=o.offsetX+(i-o.initialLeft),c=o.offsetY+(r-o.initialTop)}e.style.transform=`translate(${u}px, ${c}px)`,null==(l=(n=o.options).onDrag)||l.call(n,{x:u,y:c},t)},o.endHandler=()=>{var t,n;if(!o.isDragging)return;o.isDragging=!1,e.classList.remove("v-draggable--dragging"),o.moveHandler&&(document.removeEventListener("mousemove",o.moveHandler),document.removeEventListener("touchmove",o.moveHandler)),o.endHandler&&(document.removeEventListener("mouseup",o.endHandler),document.removeEventListener("touchend",o.endHandler));const{x:l,y:i}=ee(e.style.transform);null==(n=(t=o.options).onEnd)||n.call(t,{x:l,y:i},new MouseEvent("mouseup"))},document.addEventListener("mousemove",o.moveHandler),document.addEventListener("touchmove",o.moveHandler,{passive:!1}),document.addEventListener("mouseup",o.endHandler),document.addEventListener("touchend",o.endHandler),null==(i=(l=o.options).onStart)||i.call(l,{x:o.offsetX,y:o.offsetY},t)}l.addEventListener("mousedown",i),l.addEventListener("touchstart",i,{passive:!1})},updated(e,t){const n=e.__draggable;n&&(n.options=te(t.value),n.options.handle&&(n.handleEl=e.querySelector(n.options.handle)))},unmounted(e){const t=e.__draggable;t&&(t.moveHandler&&(document.removeEventListener("mousemove",t.moveHandler),document.removeEventListener("touchmove",t.moveHandler)),t.endHandler&&(document.removeEventListener("mouseup",t.endHandler),document.removeEventListener("touchend",t.endHandler)),delete e.__draggable)}}),oe=new Set(["input","textarea","select","button"]);const le=y({name:"focus",ssr:!0,defaults:{focus:!0,refocus:!1},mounted(e,t){if(!p())return;const n=ie(t.value);if(!n.focus||!function(e){if(!p())return!1;const t=e.tagName.toLowerCase();if(oe.has(t))return!e.disabled;if(e.isContentEditable)return!0;const n=e.getAttribute("tabindex");if(null!=n)return"-1"!==n;if("a"===t||"area"===t)return e.hasAttribute("href");return!1}(e))return void(n.focus&&console.warn("[Directix] v-focus: Element is not focusable"));const o=()=>{var t;return null==(t=n.onFocus)?void 0:t.call(n,e)},l=()=>{var t;return null==(t=n.onBlur)?void 0:t.call(n,e)};e.addEventListener("focus",o),e.addEventListener("blur",l),e.__focus={options:n,handleFocus:o,handleBlur:l,lastValue:t.value},e.focus()},updated(e,t){const n=e.__focus;if(!n)return;const o=ie(t.value);o.onFocus!==n.options.onFocus&&(e.removeEventListener("focus",n.handleFocus),n.handleFocus=()=>{var t;return null==(t=o.onFocus)?void 0:t.call(o,e)},e.addEventListener("focus",n.handleFocus)),o.onBlur!==n.options.onBlur&&(e.removeEventListener("blur",n.handleBlur),n.handleBlur=()=>{var t;return null==(t=o.onBlur)?void 0:t.call(o,e)},e.addEventListener("blur",n.handleBlur));const l=!function(e,t){if(e===t)return!0;if("object"!=typeof e||"object"!=typeof t||null===e||null===t)return!1;const n=e,o=t,l=Object.keys(n),i=Object.keys(o);return l.length===i.length&&l.every(e=>n[e]===o[e])}(t.value,n.lastValue);o.refocus&&o.focus&&l&&e.focus(),n.options=o,n.lastValue=t.value},unmounted(e){const t=e.__focus;t&&(e.removeEventListener("focus",t.handleFocus),e.removeEventListener("blur",t.handleBlur),delete e.__focus)}});function ie(e){return"boolean"==typeof e?{focus:e,refocus:!1}:__spreadValues({focus:!0,refocus:!1},e)}function re(e){return"function"==typeof e?{handler:e,class:"v-hover"}:__spreadValues({class:"v-hover",disabled:!1,enterDelay:0,leaveDelay:0},e)}const se=y({name:"hover",ssr:!1,defaults:{class:"v-hover",disabled:!1,enterDelay:0,leaveDelay:0},mounted(e,t){const n=re(t.value);if(n.disabled||!p())return;const o={options:n,isHovering:!1,enterTimerId:null,leaveTimerId:null,enterHandler:()=>{},leaveHandler:()=>{}};o.enterHandler=t=>{const l=t;o.leaveTimerId&&(clearTimeout(o.leaveTimerId),o.leaveTimerId=null),o.isHovering||(n.enterDelay&&n.enterDelay>0?o.enterTimerId=setTimeout(()=>{o.isHovering=!0,ae(e,o,l)},n.enterDelay):(o.isHovering=!0,ae(e,o,l)))},o.leaveHandler=t=>{const l=t;o.enterTimerId&&(clearTimeout(o.enterTimerId),o.enterTimerId=null),o.isHovering&&(n.leaveDelay&&n.leaveDelay>0?o.leaveTimerId=setTimeout(()=>{o.isHovering=!1,ue(e,o,l)},n.leaveDelay):(o.isHovering=!1,ue(e,o,l)))},e.__hover=o,O(e,"mouseenter",o.enterHandler),O(e,"mouseleave",o.leaveHandler)},updated(e,t){const n=e.__hover;if(!n)return;const o=re(t.value);o.disabled&&!n.options.disabled?e.classList.remove(n.options.class||"v-hover"):!o.disabled&&n.options.disabled,n.options=o},unmounted(e){const t=e.__hover;t&&(t.enterTimerId&&clearTimeout(t.enterTimerId),t.leaveTimerId&&clearTimeout(t.leaveTimerId),H(e,"mouseenter",t.enterHandler),H(e,"mouseleave",t.leaveHandler),e.classList.remove(t.options.class||"v-hover"),delete e.__hover)}});function ae(e,t,n){var o,l;const{options:i}=t;i.class&&e.classList.add(i.class),e.dispatchEvent(new CustomEvent("hover:enter",{detail:{event:n}})),null==(o=i.onEnter)||o.call(i,n),null==(l=i.handler)||l.call(i,!0,n)}function ue(e,t,n){var o,l;const{options:i}=t;i.class&&e.classList.remove(i.class),e.dispatchEvent(new CustomEvent("hover:leave",{detail:{event:n}})),null==(o=i.onLeave)||o.call(i,n),null==(l=i.handler)||l.call(i,!1,n)}const ce={minScale:.5,maxScale:5,doubleTapZoom:2.5,tapTimeout:300,animationDuration:300,hintDuration:3e3,zoomIndicatorDuration:1500};let de=9999;function pe(e,t,n,o){return Math.sqrt(__pow(n-e,2)+__pow(o-t,2))}function ve(e,t,n){return Math.max(t,Math.min(n,e))}function me(e,t){var n,o,l,i,r,s,a,u,c,d;const p="IMG"===t.tagName?t.src:void 0,v=t.getAttribute("data-preview")||void 0,m="IMG"===t.tagName?t.alt:t.getAttribute("alt")||void 0;return"string"==typeof e?{src:e,previewSrc:v,alt:m,enablePinchZoom:!0,enableDoubleTap:!0,enableSwipeClose:!0,showZoomIndicator:!0,showCloseButton:!0,closeOnClickOutside:!0,closeOnEsc:!0,minScale:ce.minScale,maxScale:ce.maxScale}:{src:(null==e?void 0:e.src)||p,previewSrc:(null==e?void 0:e.previewSrc)||v,alt:(null==e?void 0:e.alt)||m,disabled:null!=(n=null==e?void 0:e.disabled)&&n,closeOnClickOutside:null==(o=null==e?void 0:e.closeOnClickOutside)||o,closeOnEsc:null==(l=null==e?void 0:e.closeOnEsc)||l,showCloseButton:null==(i=null==e?void 0:e.showCloseButton)||i,zIndex:null==e?void 0:e.zIndex,class:null==e?void 0:e.class,enablePinchZoom:null==(r=null==e?void 0:e.enablePinchZoom)||r,enableDoubleTap:null==(s=null==e?void 0:e.enableDoubleTap)||s,enableSwipeClose:null==(a=null==e?void 0:e.enableSwipeClose)||a,showZoomIndicator:null==(u=null==e?void 0:e.showZoomIndicator)||u,minScale:null!=(c=null==e?void 0:e.minScale)?c:ce.minScale,maxScale:null!=(d=null==e?void 0:e.maxScale)?d:ce.maxScale,onOpen:null==e?void 0:e.onOpen,onClose:null==e?void 0:e.onClose}}const fe=y({name:"image-preview",ssr:!1,mounted(e,t){const n=me(t.value,e),o={options:n,overlay:null,imageContainer:null,image:null,isOpen:!1,transform:{scale:1,translateX:0,translateY:0},gesture:{isDragging:!1,startX:0,startY:0,startDistance:0,startScale:1,lastTapTime:0,swipeStartY:0},handlers:{click:()=>{},esc:null,touchStart:null,touchMove:null,touchEnd:null,mouseDown:null,mouseMove:null,mouseUp:null,wheel:null}};if(e.__imagePreview=o,n.disabled)return;e.style.cursor="zoom-in";const l=function(e){const t=(t=!1)=>{var n;if(!e.imageContainer)return;const{scale:o,translateX:l,translateY:i}=e.transform;e.imageContainer.style.transition=t?"transform 0.2s ease-out":"none",e.imageContainer.style.transform=`translate(${l}px, ${i}px) scale(${o})`;const r=null==(n=e.overlay)?void 0:n.querySelector(".v-image-preview-zoom");r&&(r.textContent=`${Math.round(100*o)}%`,r.style.opacity="1",clearTimeout(r._hideTimer),r._hideTimer=setTimeout(()=>{r.style.opacity="0"},ce.zoomIndicatorDuration))};return{updateTransform:t,resetTransform:()=>{e.transform={scale:1,translateX:0,translateY:0},t(!0)},constrainScale:t=>{const{minScale:n=ce.minScale,maxScale:o=ce.maxScale}=e.options;return ve(t,n,o)},constrainTranslate:(t,n)=>{const{scale:o}=e.transform;if(!e.image||o<=1)return{x:0,y:0};const l=e.image.getBoundingClientRect(),i=l.width*(o-1)/2,r=l.height*(o-1)/2;return{x:ve(t,-i,i),y:ve(n,-r,r)}}}}(o),i=()=>{o.isOpen&&o.overlay&&(o.overlay.style.opacity="0",setTimeout(()=>{var e,t;if(!o.overlay)return;o.overlay.remove(),o.overlay=null,o.imageContainer=null,o.image=null,o.isOpen=!1,o.transform={scale:1,translateX:0,translateY:0},document.body.style.overflow="";const{handlers:n}=o;n.esc&&document.removeEventListener("keydown",n.esc),n.touchStart&&document.removeEventListener("touchstart",n.touchStart),n.touchMove&&document.removeEventListener("touchmove",n.touchMove),n.touchEnd&&document.removeEventListener("touchend",n.touchEnd),n.mouseDown&&document.removeEventListener("mousedown",n.mouseDown),n.mouseMove&&document.removeEventListener("mousemove",n.mouseMove),n.mouseUp&&document.removeEventListener("mouseup",n.mouseUp),n.wheel&&document.removeEventListener("wheel",n.wheel),null==(t=(e=o.options).onClose)||t.call(e)},ce.animationDuration))},r=function(e,t,n){const{updateTransform:o,resetTransform:l,constrainScale:i,constrainTranslate:r}=t;return{handleTouchStart:t=>{if(!e.imageContainer)return;const n=Date.now(),{gesture:l,transform:r,options:s}=e;if(1===t.touches.length){if(!1!==s.enableDoubleTap&&n-l.lastTapTime<ce.tapTimeout)return t.preventDefault(),r.scale=r.scale>1?1:i(ce.doubleTapZoom),l.lastTapTime=0,void o(!0);l.lastTapTime=n,l.isDragging=!0,l.startX=t.touches[0].clientX-r.translateX,l.startY=t.touches[0].clientY-r.translateY,l.swipeStartY=t.touches[0].clientY}else 2===t.touches.length&&!1!==s.enablePinchZoom&&(l.isDragging=!1,l.startDistance=pe(t.touches[0].clientX,t.touches[0].clientY,t.touches[1].clientX,t.touches[1].clientY),l.startScale=r.scale)},handleTouchMove:t=>{if(!e.imageContainer)return;t.preventDefault();const{gesture:n,transform:l,options:s}=e;if(1===t.touches.length&&n.isDragging){const e=t.touches[0].clientX-n.startX,i=t.touches[0].clientY-n.startY,s=r(e,i);l.translateX=s.x,l.translateY=s.y,o(!1)}else if(2===t.touches.length&&!1!==s.enablePinchZoom){const e=pe(t.touches[0].clientX,t.touches[0].clientY,t.touches[1].clientX,t.touches[1].clientY);l.scale=i(n.startScale*(e/n.startDistance)),o(!1)}},handleTouchEnd:t=>{const{gesture:o,transform:i,options:r}=e;o.isDragging=!1,!1!==r.enableSwipeClose&&1===t.changedTouches.length&&i.scale<=1&&t.changedTouches[0].clientY-o.swipeStartY<-100?n():i.scale<1&&l()},handleMouseDown:t=>{e.imageContainer&&(e.gesture.isDragging=!0,e.gesture.startX=t.clientX-e.transform.translateX,e.gesture.startY=t.clientY-e.transform.translateY,e.imageContainer.style.cursor="grabbing")},handleMouseMove:t=>{if(!e.gesture.isDragging||!e.imageContainer)return;const n=t.clientX-e.gesture.startX,l=t.clientY-e.gesture.startY,i=r(n,l);e.transform.translateX=i.x,e.transform.translateY=i.y,o(!1)},handleMouseUp:()=>{e.gesture.isDragging=!1,e.imageContainer&&(e.imageContainer.style.cursor="grab")},handleWheel:t=>{if(!e.imageContainer||!1===e.options.enablePinchZoom)return;t.preventDefault();const n=t.deltaY>0?.9:1.1;e.transform.scale=i(e.transform.scale*n),o(!1),e.transform.scale<.8&&setTimeout(l,100)}}}(o,l,i),s=()=>{var e,t,n;if(o.isOpen||o.options.disabled)return;const{overlay:s,imageContainer:a,image:u}=function(e){var t;const n=null!=(t=e.zIndex)?t:++de,o=document.createElement("div");o.className="v-image-preview-overlay",e.class&&o.classList.add(e.class),Object.assign(o.style,{position:"fixed",inset:"0",background:"rgba(0, 0, 0, 0.95)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:String(n),cursor:"zoom-out",opacity:"0",transition:"opacity 0.3s",touchAction:"none",overflow:"hidden"});const l=document.createElement("div");Object.assign(l.style,{position:"relative",transformOrigin:"center center",transition:"transform 0.1s ease-out",willChange:"transform"});const i=document.createElement("img");if(i.src=e.previewSrc||e.src||"",i.alt=e.alt||"",Object.assign(i.style,{maxWidth:"95vw",maxHeight:"90vh",objectFit:"contain",cursor:"grab",userSelect:"none",WebkitUserDrag:"none"}),i.addEventListener("dragstart",e=>e.preventDefault()),l.appendChild(i),!1!==e.showCloseButton){const e=document.createElement("button");e.className="v-image-preview-close",e.innerHTML="×",e.setAttribute("aria-label","Close preview"),Object.assign(e.style,{position:"fixed",top:"16px",right:"16px",width:"44px",height:"44px",border:"none",background:"rgba(255, 255, 255, 0.15)",color:"white",fontSize:"28px",cursor:"pointer",borderRadius:"50%",transition:"background 0.2s, transform 0.2s",zIndex:String(n+1),display:"flex",alignItems:"center",justifyContent:"center",backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)"});const t=(t,n)=>{e.style.background=t,e.style.transform=n};e.addEventListener("mouseenter",()=>t("rgba(255, 255, 255, 0.25)","scale(1.1)")),e.addEventListener("mouseleave",()=>t("rgba(255, 255, 255, 0.15)","scale(1)")),e.addEventListener("touchstart",()=>t("rgba(255, 255, 255, 0.35)","scale(1.15)"),{passive:!0}),e.addEventListener("touchend",()=>t("rgba(255, 255, 255, 0.15)","scale(1)"),{passive:!0}),o.appendChild(e)}if(!1!==e.showZoomIndicator){const e=document.createElement("div");e.className="v-image-preview-zoom",e.textContent="100%",Object.assign(e.style,{position:"fixed",bottom:"24px",left:"50%",transform:"translateX(-50%)",background:"rgba(0, 0, 0, 0.6)",color:"white",padding:"8px 16px",borderRadius:"20px",fontSize:"14px",fontWeight:"500",opacity:"0",transition:"opacity 0.3s",zIndex:String(n+1),backdropFilter:"blur(10px)",WebkitBackdropFilter:"blur(10px)"}),o.appendChild(e)}const r=document.createElement("div");return r.className="v-image-preview-hint",r.textContent="Pinch to zoom • Double tap • Swipe up to close",Object.assign(r.style,{position:"fixed",bottom:"60px",left:"50%",transform:"translateX(-50%)",color:"rgba(255, 255, 255, 0.6)",fontSize:"12px",opacity:"1",transition:"opacity 0.5s",zIndex:String(n+1),pointerEvents:"none"}),o.appendChild(r),setTimeout(()=>r.style.opacity="0",ce.hintDuration),o.appendChild(l),{overlay:o,imageContainer:l,image:i}}(o.options);o.overlay=s,o.imageContainer=a,o.image=u,o.isOpen=!0,document.body.appendChild(s),document.body.style.overflow="hidden",requestAnimationFrame(()=>s.style.opacity="1"),o.handlers.touchStart=r.handleTouchStart,o.handlers.touchMove=r.handleTouchMove,o.handlers.touchEnd=r.handleTouchEnd,o.handlers.mouseDown=r.handleMouseDown,o.handlers.mouseMove=r.handleMouseMove,o.handlers.mouseUp=r.handleMouseUp,o.handlers.wheel=r.handleWheel,s.addEventListener("touchstart",r.handleTouchStart,{passive:!1}),s.addEventListener("touchmove",r.handleTouchMove,{passive:!1}),s.addEventListener("touchend",r.handleTouchEnd,{passive:!0}),u.addEventListener("mousedown",r.handleMouseDown),document.addEventListener("mousemove",r.handleMouseMove),document.addEventListener("mouseup",r.handleMouseUp),s.addEventListener("wheel",r.handleWheel,{passive:!1}),null==(e=s.querySelector(".v-image-preview-close"))||e.addEventListener("click",e=>{e.stopPropagation(),i()}),!1!==o.options.closeOnClickOutside&&s.addEventListener("click",()=>{o.transform.scale<=1?i():l.resetTransform()}),!1!==o.options.closeOnEsc&&(o.handlers.esc=e=>{"Escape"===e.key&&(o.transform.scale>1?l.resetTransform():i())},document.addEventListener("keydown",o.handlers.esc)),null==(n=(t=o.options).onOpen)||n.call(t)};o.handlers.click=s,e.addEventListener("click",s)},updated(e,t){const n=e.__imagePreview;n&&(n.options=me(t.value,e),e.style.cursor=n.options.disabled?"":"zoom-in")},unmounted(e){const t=e.__imagePreview;t&&(e.removeEventListener("click",t.handlers.click),t.isOpen&&t.overlay&&(t.overlay.remove(),document.body.style.overflow=""),t.handlers.esc&&document.removeEventListener("keydown",t.handlers.esc),t.handlers.touchStart&&document.removeEventListener("touchstart",t.handlers.touchStart),t.handlers.touchMove&&document.removeEventListener("touchmove",t.handlers.touchMove),t.handlers.touchEnd&&document.removeEventListener("touchend",t.handlers.touchEnd),t.handlers.mouseDown&&document.removeEventListener("mousedown",t.handlers.mouseDown),t.handlers.mouseMove&&document.removeEventListener("mousemove",t.handlers.mouseMove),t.handlers.mouseUp&&document.removeEventListener("mouseup",t.handlers.mouseUp),t.handlers.wheel&&document.removeEventListener("wheel",t.handlers.wheel),delete e.__imagePreview)}});function he(e){if("function"==typeof e)return{handler:e,distance:0,throttle:200,useIntersection:!0};if(!e)throw new Error("[Directix] v-infinite-scroll: handler is required");return __spreadValues({distance:0,disabled:!1,loading:!1,useIntersection:!0,throttle:200},e)}const ge=y({name:"infinite-scroll",ssr:!1,defaults:{distance:0,disabled:!1,loading:!1,useIntersection:!0,throttle:200},mounted(e,t){const n=he(t.value);if(n.disabled||!p())return;let o;if(n.container)if("string"==typeof n.container){const t=document.querySelector(n.container);o=t||I(e)}else o=n.container;else o=I(e);const l={options:n,container:o,sentinel:null,observer:null,throttleTimer:null,isLoading:!1,scrollHandler:t=>__async(null,null,function*(){if(l.isLoading||l.options.disabled||l.options.loading)return;if(l.throttleTimer)return;l.throttleTimer=setTimeout(()=>{l.throttleTimer=null},n.throttle);const t=function(e,t,n){if(e===window){const e=window.scrollY||document.documentElement.scrollTop,t=document.documentElement.scrollHeight;return e+window.innerHeight>=t-n}const o=e,l=o.scrollTop,i=o.scrollHeight,r=o.clientHeight;return l+r>=i-n}(o,0,n.distance||0);t&&(yield be(l,e))})};e.__infiniteScroll=l,n.useIntersection&&f()?function(e,t){const n=document.createElement("div");n.className="v-infinite-scroll__sentinel",n.style.cssText="\n height: 1px;\n width: 100%;\n clear: both;\n ",e.appendChild(n),t.sentinel=n,t.observer=new IntersectionObserver(n=>__async(null,null,function*(){for(const o of n)o.isIntersecting&&(t.isLoading||t.options.disabled||t.options.loading||(yield be(t,e)))}),{root:t.container===window?null:t.container,rootMargin:`${t.options.distance||0}px`,threshold:0}),t.observer.observe(n)}(e,l):O(o,"scroll",l.scrollHandler,{passive:!0})},updated(e,t){const n=e.__infiniteScroll;n&&(n.options=he(t.value))},unmounted(e){const t=e.__infiniteScroll;t&&(t.throttleTimer&&clearTimeout(t.throttleTimer),t.observer&&t.observer.disconnect(),t.sentinel&&t.sentinel.parentNode&&t.sentinel.parentNode.removeChild(t.sentinel),H(t.container,"scroll",t.scrollHandler),delete e.__infiniteScroll)}});function be(e,t){return __async(this,null,function*(){var n,o,l,i,r,s;e.isLoading=!0,null==(o=(n=e.options).onLoadStart)||o.call(n),t.classList.add("v-infinite-scroll--loading");try{yield e.options.handler()}catch(t){null==(i=(l=e.options).onError)||i.call(l,t)}finally{e.isLoading=!1,null==(s=(r=e.options).onLoadEnd)||s.call(r),t.classList.remove("v-infinite-scroll--loading")}})}const ye="__intersect";function _e(e){const t="function"==typeof e?{handler:e}:__spreadValues({},e);return null!==t.root&&"object"==typeof t.root&&"value"in t.root&&(t.root=t.root.value),t}function we(e,t,n){return new IntersectionObserver(function(e,t,n){return o=>{var l,i,r,s;for(const a of o){if(n.once&&t.hasTriggeredOnce)continue;const{isIntersecting:o}=a;null==(l=n.handler)||l.call(n,a,t.observer),null==(i=n.onChange)||i.call(n,o,a),o?(null==(r=n.onEnter)||r.call(n,a,t.observer),n.once&&(t.hasTriggeredOnce=!0)):null==(s=n.onLeave)||s.call(n,a,t.observer),e.dispatchEvent(new CustomEvent("intersect",{detail:{isIntersecting:o,entry:a}}))}}}(e,t,n),{root:n.root,rootMargin:n.rootMargin,threshold:n.threshold})}const Te=y({name:"intersect",ssr:!1,defaults:{disabled:!1,once:!1,rootMargin:"0px",threshold:0},mounted(e,t){const n=_e(t.value);if(n.disabled||!p()||!f())return void(f()||console.warn("[Directix] v-intersect: IntersectionObserver not supported"));const o={options:n,observer:null,hasTriggeredOnce:!1};o.observer=we(e,o,n),e[ye]=o,o.observer.observe(e)},updated(e,t){var n,o,l;const i=e[ye];if(!i)return;const r=_e(t.value),s=r.root!==i.options.root||r.rootMargin!==i.options.rootMargin||r.threshold!==i.options.threshold;r.disabled!==i.options.disabled&&(r.disabled?null==(n=i.observer)||n.disconnect():null==(o=i.observer)||o.observe(e)),s&&(null==(l=i.observer)||l.disconnect(),i.observer=we(e,i,r),i.observer.observe(e)),i.options=r},unmounted(e){var t;const n=e[ye];n&&(null==(t=n.observer)||t.disconnect(),delete e[ye])}});let Ee=null;function xe(e,t){"IMG"===e.tagName?e.src=t:e.style.backgroundImage=`url("${t}")`}function Le(e,t){e.dataset.lazyState=t}function Se(e){const t=e.__lazy;if(!t||!t.options.src)return;if(t.options.filter&&!t.options.filter(t.options.src))return;Le(e,"loading"),t.attempt++,e.classList.add("v-lazy--loading");const n=new Image;n.onload=()=>{var n,o;xe(e,t.options.src),Le(e,"loaded"),e.classList.remove("v-lazy--loading"),e.classList.add("v-lazy--loaded"),null==(o=(n=t.options).onLoad)||o.call(n,e)},n.onerror=()=>{var n,o;e.classList.remove("v-lazy--loading"),t.attempt<(t.options.attempt||1)?setTimeout(()=>Se(e),1e3*t.attempt):(t.options.error&&xe(e,t.options.error),Le(e,"error"),e.classList.add("v-lazy--error"),null==(o=(n=t.options).onError)||o.call(n,e,new Error("Failed to load image")))},n.src=t.options.src}function Ce(e){const t=e.__lazy;var n;if(t)if(f())if(t.options.observer)t.observer=t.options.observer,t.observer.observe(e);else{const o=(n=t.options.preload||0,Ee||(Ee=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&(Se(e.target),null==Ee||Ee.unobserve(e.target))})},{rootMargin:`${n}px`}),Ee));t.observer=o,o.observe(e)}else Se(e)}function ke(e){const t=e.__lazy;t&&(t.observer?t.observer.unobserve(e):Ee&&Ee.unobserve(e))}function De(e){return"string"==typeof e?{src:e}:e||{}}const Ie=y({name:"lazy",ssr:!1,defaults:{preload:0,attempt:1,disabled:!1},mounted(e,t){const n=De(t.value);if(n.disabled)return;if(!n.src)return void console.warn("[Directix] v-lazy: No source provided");Le(e,"pending"),n.placeholder&&xe(e,n.placeholder),e.classList.add("v-lazy");const o={options:n,attempt:0};e.__lazy=o,Ce(e)},updated(e,t){const n=e.__lazy;if(!n)return;const o=De(t.value);o.disabled?ke(e):o.src!==n.options.src&&(n.options=o,n.attempt=0,"pending"!==function(e){return e.dataset.lazyState||"pending"}(e)&&(Le(e,"pending"),e.classList.remove("v-lazy--loaded","v-lazy--error"),o.placeholder&&xe(e,o.placeholder),Ce(e)))},unmounted(e){ke(e),delete e.__lazy}});function Oe(e){return"boolean"==typeof e?{value:e}:__spreadValues({value:!0,loadingClass:"v-loading",spinnerClass:"v-loading__spinner",textClass:"v-loading__text",background:"rgba(255, 255, 255, 0.9)",lock:!1,disabled:!1},e)}const He=y({name:"loading",ssr:!0,defaults:{value:!0,loadingClass:"v-loading",spinnerClass:"v-loading__spinner",textClass:"v-loading__text",background:"rgba(255, 255, 255, 0.9)",lock:!1,disabled:!1},mounted(e,t){if(!p())return;const n=Oe(t.value);if(n.disabled)return;const o=getComputedStyle(e),l={options:n,loadingOverlay:null,originalPosition:e.style.position,originalOverflow:e.style.overflow};e.__loading=l,"static"===o.position&&(e.style.position="relative"),n.value&&Pe(e,l)},updated(e,t){const n=e.__loading;if(!n)return;const o=Oe(t.value);if(o.disabled)Me(e,n);else{if(o.value&&!n.options.value?Pe(e,n):!o.value&&n.options.value&&Me(e,n),n.loadingOverlay&&o.text!==n.options.text){const e=n.loadingOverlay.querySelector(`.${n.options.textClass}`);e&&(e.textContent=o.text||"")}n.options=o}},unmounted(e){const t=e.__loading;t&&(Me(e,t),e.style.position=t.originalPosition,e.style.overflow=t.originalOverflow,delete e.__loading)}});function Pe(e,t){t.loadingOverlay||(t.loadingOverlay=function(e){const t=document.createElement("div");t.className=e.loadingClass||"v-loading",t.style.cssText=`\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 1000;\n background: ${e.background||"rgba(255, 255, 255, 0.9)"};\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n `;const n=e.spinner||'\n<svg class="v-loading__circular" viewBox="25 25 50 50">\n <circle class="v-loading__path" cx="50" cy="50" r="20" fill="none" stroke-width="2" stroke-miterlimit="10"/>\n</svg>\n',o=document.createElement("div");if(o.className=e.spinnerClass||"v-loading__spinner",o.innerHTML=n,t.appendChild(o),e.text){const n=document.createElement("div");n.className=e.textClass||"v-loading__text",n.textContent=e.text,t.appendChild(n)}return t}(t.options),e.appendChild(t.loadingOverlay),t.options.lock&&(e.style.overflow="hidden"),e.classList.add("v-loading--active"))}function Me(e,t){t.loadingOverlay&&(t.loadingOverlay.remove(),t.loadingOverlay=null,t.options.lock&&(e.style.overflow=t.originalOverflow),e.classList.remove("v-loading--active"))}function ze(e){if("function"==typeof e)return{handler:e,duration:500,distance:10};if(!e)throw new Error("[Directix] v-long-press: handler is required");return __spreadValues({duration:500,distance:10,disabled:!1,prevent:!0,stop:!1,tickInterval:100},e)}const Ve=y({name:"long-press",ssr:!1,defaults:{duration:500,distance:10,disabled:!1,prevent:!0,stop:!1,tickInterval:100},mounted(e,t){const n=ze(t.value);if(n.disabled||!p())return;const o={options:n,timerId:null,tickTimerId:null,startTime:0,startPos:{x:0,y:0},startHandler:()=>{},endHandler:()=>{},moveHandler:()=>{}};o.startHandler=e=>{var t;const l=e;n.prevent&&l.preventDefault(),n.stop&&l.stopPropagation(),o.timerId&&(clearTimeout(o.timerId),o.timerId=null),o.tickTimerId&&(clearInterval(o.tickTimerId),o.tickTimerId=null);const i=M(l);if(o.startPos={x:i.x,y:i.y},o.startTime=Date.now(),null==(t=n.onStart)||t.call(n,l),n.onTick){let e=n.duration;o.tickTimerId=setInterval(()=>{var t;e-=n.tickInterval,null==(t=n.onTick)||t.call(n,Math.max(0,e))},n.tickInterval)}o.timerId=setTimeout(()=>{o.tickTimerId&&(clearInterval(o.tickTimerId),o.tickTimerId=null),n.handler(l)},n.duration)},o.endHandler=e=>{var t;const l=e;o.timerId&&(clearTimeout(o.timerId),o.timerId=null),o.tickTimerId&&(clearInterval(o.tickTimerId),o.tickTimerId=null),o.startTime>0&&(null==(t=n.onCancel)||t.call(n,l)),o.startTime=0},o.moveHandler=e=>{var t;if(!o.timerId)return;const l=e,i=M(l);var r,s;(r=o.startPos,s={x:i.x,y:i.y},Math.sqrt(__pow(s.x-r.x,2)+__pow(s.y-r.y,2)))>(n.distance||10)&&(o.timerId&&(clearTimeout(o.timerId),o.timerId=null),o.tickTimerId&&(clearInterval(o.tickTimerId),o.tickTimerId=null),null==(t=n.onCancel)||t.call(n,l),o.startTime=0)},e.__longPress=o,O(e,"mousedown",o.startHandler),O(e,"mouseup",o.endHandler),O(e,"mouseleave",o.endHandler),O(e,"mousemove",o.moveHandler),O(e,"touchstart",o.startHandler,{passive:!n.prevent}),O(e,"touchend",o.endHandler),O(e,"touchcancel",o.endHandler),O(e,"touchmove",o.moveHandler,{passive:!0})},updated(e,t){const n=e.__longPress;if(!n){return void(ze(t.value).disabled||(e.__longPress=null))}n.options=ze(t.value)},unmounted(e){const t=e.__longPress;t&&(t.timerId&&clearTimeout(t.timerId),t.tickTimerId&&clearInterval(t.tickTimerId),H(e,"mousedown",t.startHandler),H(e,"mouseup",t.endHandler),H(e,"mouseleave",t.endHandler),H(e,"mousemove",t.moveHandler),H(e,"touchstart",t.startHandler),H(e,"touchend",t.endHandler),H(e,"touchcancel",t.endHandler),H(e,"touchmove",t.moveHandler),delete e.__longPress)}});function Ne(e,t){return e?t.first?e.charAt(0).toLowerCase()+e.slice(1):e.toLowerCase():e}function Xe(e){var t,n;return void 0===e||!0===e?{first:!1,onInput:!0}:!1===e?{first:!1,onInput:!1}:{first:null!=(t=e.first)&&t,onInput:null==(n=e.onInput)||n}}const Ae=y({name:"lowercase",ssr:!0,mounted(e,t){const n=Xe(t.value);if(E(e)){const t=w(e,n,e=>Ne(e,n));e.__lowercaseCleanup=t}else T(e,e=>Ne(e,n))},updated(e,t){const n=Xe(t.value);E(e)?n.onInput&&(e.value=Ne(e.value,n)):T(e,e=>Ne(e,n))},unmounted(e){const t=e.__lowercaseCleanup;null==t||t(),delete e.__lowercaseCleanup}}),Ye="__mask",$e={"#":/\d/,A:/[A-Za-z]/,N:/[A-Za-z0-9]/,X:/./};function Re(e,t){return[...e].map(e=>{const n=$e[e];return n?{pattern:n,placeholder:t,isLiteral:!1}:{pattern:new RegExp(`\\${e}`),placeholder:e,isLiteral:!0}})}function Be(e){if("string"==typeof e)return{mask:e,placeholder:"_",showPlaceholder:!0};if(!(null==e?void 0:e.mask))throw new Error("[Directix] v-mask: mask is required");return __spreadValues({placeholder:"_",showPlaceholder:!0,showMaskOnBlur:!1,clearIncomplete:!1,disabled:!1},e)}function Fe(e,t,n,o){let l="",i=0;for(const r of t){if(i>=e.length){l+=r.isLiteral?r.placeholder:o?n:"";continue}const t=e[i];r.isLiteral?(t===r.placeholder&&i++,l+=r.placeholder):r.pattern.test(t)?(l+=t,i++):t===n?(l+=o?n:"",i++):i++}return l}function je(e,t,n){for(let o=0;o<t.length;o++)if(!t[o].isLiteral&&(o>=e.length||e[o]===n))return!1;return!0}function Ue(e,t){let n=t;for(;n<e.length&&e[n].isLiteral;)n++;return Math.min(n,e.length)}const We=y({name:"mask",ssr:!1,defaults:{placeholder:"_",showPlaceholder:!0,showMaskOnBlur:!1,clearIncomplete:!1,disabled:!1},mounted(e,t){var n;if(!function(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName}(e))return void console.warn("[Directix] v-mask: directive must be used on input or textarea elements");const o=Be(t.value);if(o.disabled||!p())return;const l=o.placeholder||"_",i=Re(o.mask,l),r=e=>{var t,n,r;const s=e.target,a=s.value,u=s.selectionStart||0,c=Fe(a,i,l,null==(t=o.showPlaceholder)||t);if(c!==a)return s.value=c,s.setSelectionRange(Ue(i,u),Ue(i,u)),void s.dispatchEvent(new Event("input",{bubbles:!0}));null==(n=o.onChange)||n.call(o,c,function(e,t,n){let o="";for(let l=0;l<e.length&&l<t.length;l++)t[l].isLiteral||e[l]===n||(o+=e[l]);return o}(c,i,l)),je(c,i,l)&&(null==(r=o.onComplete)||r.call(o,c))},s=()=>{!e.value&&o.showPlaceholder&&(e.value=Fe("",i,l,!0))},a=()=>{o.showMaskOnBlur||je(e.value,i,l)||!o.clearIncomplete||(e.value="")};O(e,"input",r),O(e,"focus",s),O(e,"blur",a),e[Ye]={options:o,tokens:i,placeholder:l,inputHandler:r,focusHandler:s,blurHandler:a},e.value&&(e.value=Fe(e.value,i,l,null==(n=o.showPlaceholder)||n))},updated(e,t){const n=e[Ye];n&&(n.options=Be(t.value),n.tokens=Re(n.options.mask,n.placeholder))},unmounted(e){const t=e[Ye];t&&(H(e,"input",t.inputHandler),H(e,"focus",t.focusHandler),H(e,"blur",t.blurHandler),delete e[Ye])}});function qe(e,t){const{precision:n=0,separator:o=",",decimal:l=".",prefix:i="",suffix:r=""}=t,s=e.toFixed(n),[a,u]=s.split(".");let c=a.replace(/\B(?=(\d{3})+(?!\d))/g,o);return n>0&&u&&(c+=l+u),i+c+r}function Ze(e,t){const n=e.replace(/[^\d.-]/g,"").replace(t,"."),o=Number.parseFloat(n);return isNaN(o)?null:o}function Ge(e,t){var n;let o=e;return!(null==(n=t.allowNegative)||n)&&o<0&&(o=Math.abs(o)),void 0!==t.min&&(o=Math.max(t.min,o)),void 0!==t.max&&(o=Math.min(t.max,o)),o}function Je(e,t,n){const{decimal:o=".",prefix:l=""}=t;let i=!1;const r=()=>{if(i)return;const r=e.value,s=e.selectionStart||0;if(!r||"-"===r)return;const a=Ze(r,o);if(null===a)return i=!0,e.value="",e.dispatchEvent(new Event("input",{bubbles:!0})),void(i=!1);const u=Ge(a,t),c=n(u,t);if(c!==r){i=!0;const t=function(e,t,n,o=0){let l=0,i=0;for(let t=0;t<n&&t<e.length;t++)/\d/.test(e[t])&&l++;for(let e=o;e<t.length;e++)if(/\d/.test(t[e])&&i++,i>=l)return e+1;return t.length}(r,c,s,l.length);e.value=c,e.setSelectionRange(t,t),e.dispatchEvent(new Event("input",{bubbles:!0})),i=!1}},s=()=>{if(!e.value||"-"===e.value)return;const l=Ze(e.value,o);if(null!==l){const o=Ge(l,t),r=n(o,t);i=!0,e.value=r,e.dispatchEvent(new Event("input",{bubbles:!0})),i=!1}};if(e.addEventListener("input",r),e.addEventListener("blur",s),e.value){const l=Ze(e.value,o);if(null!==l){const o=n(Ge(l,t),t);i=!0,e.value=o,e.dispatchEvent(new Event("input",{bubbles:!0})),i=!1}}return()=>{e.removeEventListener("input",r),e.removeEventListener("blur",s)}}function Ke(e,t){const{precision:n=2,separator:o=",",decimal:l=".",symbol:i="$",symbolPosition:r="before"}=t,s=e.toFixed(n),[a,u]=s.split(".");let c=a.replace(/\B(?=(\d{3})+(?!\d))/g,o);return n>0&&u&&(c+=l+u),"before"===r?i+c:c+i}const Qe=y({name:"money",ssr:!0,mounted(e,t){var n,o,l;const i="string"==typeof t.value?{symbol:t.value}:null!=(n=t.value)?n:{};if(i.precision=null!=(o=i.precision)?o:2,"INPUT"===e.tagName||"TEXTAREA"===e.tagName){const{symbol:t="$",symbolPosition:n="before"}=i,o="before"===n?t:"",l=Je(e,__spreadProps(__spreadValues({},i),{prefix:o}),Ke);e.__money={options:i,cleanup:l},requestAnimationFrame(()=>{const t=e;if(t.value){const e=Ze(t.value,i.decimal||".");if(null!==e){const n=Ke(Ge(e,i),i);n!==t.value&&(t.value=n,t.dispatchEvent(new Event("input",{bubbles:!0})))}}})}else{let n=null;if(t.value&&"object"==typeof t.value&&"value"in t.value)n=t.value.value;else{const t=null==(l=e.textContent)?void 0:l.trim();t&&(n=Ze(t,i.decimal||"."))}null!==n&&(e.textContent=Ke(Ge(n,i),i))}},updated(e,t){var n,o;const l="string"==typeof t.value?{symbol:t.value}:null!=(n=t.value)?n:{};l.precision=null!=(o=l.precision)?o:2;const i=e.__money;if(i)i.options=l;else if("INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName){let n=null;t.value&&"object"==typeof t.value&&"value"in t.value&&(n=t.value.value),null!==n&&(e.textContent=Ke(Ge(n,l),l))}},unmounted(e){const t=e.__money;null==t||t.cleanup(),delete e.__money}});function et(e){if("function"==typeof e)return{handler:e,childList:!0};if(!e||!e.handler)throw new Error("[Directix] v-mutation: handler is required");return __spreadValues({attributes:!1,childList:!0,subtree:!1,characterData:!1,attributeOldValue:!1,characterDataOldValue:!1,disabled:!1},e)}const tt=y({name:"mutation",ssr:!1,defaults:{attributes:!1,childList:!0,subtree:!1,characterData:!1,attributeOldValue:!1,characterDataOldValue:!1,disabled:!1},mounted(e,t){const n=et(t.value);if(n.disabled||!p())return;if(!b())return void console.warn("[Directix] v-mutation: MutationObserver not supported");const o={options:n,observer:null};o.observer=new MutationObserver((e,t)=>{n.handler(e,t)}),o.observer.observe(e,{attributes:n.attributes,attributeFilter:n.attributeFilter,childList:n.childList,subtree:n.subtree,characterData:n.characterData,attributeOldValue:n.attributeOldValue,characterDataOldValue:n.characterDataOldValue}),e.__mutation=o},updated(e,t){const n=e.__mutation;if(!n)return;const o=et(t.value);o.disabled&&!n.options.disabled?n.observer&&n.observer.disconnect():!o.disabled&&n.options.disabled?n.observer&&n.observer.observe(e,{attributes:o.attributes,attributeFilter:o.attributeFilter,childList:o.childList,subtree:o.subtree,characterData:o.characterData,attributeOldValue:o.attributeOldValue,characterDataOldValue:o.characterDataOldValue}):o.disabled||o.attributes===n.options.attributes&&o.childList===n.options.childList&&o.subtree===n.options.subtree&&o.characterData===n.options.characterData||n.observer&&(n.observer.disconnect(),n.observer.observe(e,{attributes:o.attributes,attributeFilter:o.attributeFilter,childList:o.childList,subtree:o.subtree,characterData:o.characterData,attributeOldValue:o.attributeOldValue,characterDataOldValue:o.characterDataOldValue})),n.options=o},unmounted(e){const t=e.__mutation;t&&(t.observer&&t.observer.disconnect(),delete e.__mutation)}}),nt=y({name:"number",ssr:!0,mounted(e,t){var n,o;const l="number"==typeof t.value?{precision:t.value}:null!=(n=t.value)?n:{};if("INPUT"===e.tagName||"TEXTAREA"===e.tagName){const t=Je(e,l,qe);e.__number={options:l,cleanup:t},requestAnimationFrame(()=>{const t=e;if(t.value){const e=Ze(t.value,l.decimal||".");if(null!==e){const n=qe(Ge(e,l),l);n!==t.value&&(t.value=n,t.dispatchEvent(new Event("input",{bubbles:!0})))}}})}else{let n=null;if("number"==typeof t.value)n=t.value;else if(t.value&&"object"==typeof t.value&&"value"in t.value)n=t.value.value;else{const t=null==(o=e.textContent)?void 0:o.trim();t&&(n=Ze(t,l.decimal||"."))}null!==n&&(e.textContent=qe(Ge(n,l),l))}},updated(e,t){var n;const o="number"==typeof t.value?{precision:t.value}:null!=(n=t.value)?n:{},l=e.__number;if(l)l.options=o;else if("INPUT"!==e.tagName&&"TEXTAREA"!==e.tagName){let n=null;"number"==typeof t.value?n=t.value:t.value&&"object"==typeof t.value&&"value"in t.value&&(n=t.value.value),null!==n&&(e.textContent=qe(Ge(n,o),o))}},unmounted(e){const t=e.__number;null==t||t.cleanup(),delete e.__number}}),ot="__permission";let lt=null;function it(e,t){return t.includes("*")||t.includes(e)}function rt(e,t){var n,o;const l=function(e){return e[ot]||(e[ot]={options:{value:""},originalDisplay:"",originalDisabled:!1,parentNode:null,placeholder:null}),e[ot]}(e);l.options=function(e){if(!e)throw new Error("[Directix] v-permission: permission value is required");return"string"==typeof e||Array.isArray(e)?{value:e}:e}(t.value);const i=function(e){var t;if(e.check)return e.check(e.value,e.mode||"some");if(!lt)return console.warn("[Directix] v-permission: No permission config provided"),!0;const n=lt.getPermissions(),o=(null==(t=lt.getRoles)?void 0:t.call(lt))||[],l=lt.roleMap||{},i=Array.isArray(e.value)?e.value:[e.value];function r(e){if(e in l)return o.includes(e);if(it(e,n))return!0;for(const t of o)if(it(e,l[t]||[]))return!0;return!1}return"every"===(e.mode||"some")?i.every(r):i.some(r)}(l.options);null==(o=(n=l.options).onChange)||o.call(n,i);const r=l.options.action||"remove";i?function(e,t,n){switch(t){case"remove":n.placeholder&&n.parentNode&&(n.parentNode.insertBefore(e,n.placeholder),n.parentNode.removeChild(n.placeholder),n.placeholder=null);break;case"disable":!1===n.originalDisabled?e.removeAttribute("disabled"):n.originalDisabled&&e.setAttribute("disabled",n.originalDisabled),e.classList.remove("v-permission--disabled");break;case"hide":e.style.display=n.originalDisplay||"",e.classList.remove("v-permission--hidden")}}(e,r,l):function(e,t,n){var o,l;switch(t){case"remove":n.parentNode=e.parentNode,n.placeholder=document.createComment("v-permission"),null==(o=e.parentNode)||o.insertBefore(n.placeholder,e),null==(l=e.parentNode)||l.removeChild(e);break;case"disable":n.originalDisabled=e.getAttribute("disabled")||!1,e.setAttribute("disabled","true"),e.classList.add("v-permission--disabled");break;case"hide":n.originalDisplay=e.style.display,e.style.display="none",e.classList.add("v-permission--hidden")}}(e,r,l)}const st=y({name:"permission",ssr:!0,mounted(e,t){rt(e,t)},updated(e,t){rt(e,t)},unmounted(e){!function(e){const t=e[ot];(null==t?void 0:t.placeholder)&&t.parentNode&&t.parentNode.removeChild(t.placeholder),delete e[ot]}(e)}});function at(e){if("function"==typeof e)return{handler:e};if(!e)throw new Error("[Directix] v-resize: handler is required");return __spreadValues({disabled:!1,box:"content-box",debounce:0},e)}const ut=y({name:"resize",ssr:!1,defaults:{disabled:!1,box:"content-box",debounce:0},mounted(e,t){const n=at(t.value);if(n.disabled||!p())return;"static"===getComputedStyle(e).position&&(e.style.position="relative");const o={options:n,observer:null,debounceTimer:null,pendingEntry:null,fallbackIframe:null,handler:e=>{n.debounce&&n.debounce>0?(o.pendingEntry=e,o.debounceTimer||(o.debounceTimer=setTimeout(()=>{o.pendingEntry&&n.handler(o.pendingEntry),o.debounceTimer=null,o.pendingEntry=null},n.debounce))):n.handler(e)}};if(e.__resize=o,h())o.observer=new ResizeObserver(e=>{for(const t of e)o.handler(t)}),o.observer.observe(e,{box:n.box});else{console.warn("[Directix] v-resize: ResizeObserver not supported, using fallback");const{iframe:t,cleanup:l}=function(e,t){const n=document.createElement("iframe");n.style.cssText="\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: none;\n pointer-events: none;\n opacity: 0;\n ",e.appendChild(n);const o=n.contentWindow;return o&&o.addEventListener("resize",t),{iframe:n,cleanup:()=>{o&&o.removeEventListener("resize",t),n.remove()}}}(e,()=>{const t=e.getBoundingClientRect(),l={target:e,contentRect:t,borderBoxSize:[],contentBoxSize:[],devicePixelContentBoxSize:[]};o.handler(l),n.onFallback&&n.onFallback(function(e){return{width:e.contentRect.width,height:e.contentRect.height,contentRect:e.contentRect,borderBoxSize:e.borderBoxSize,contentBoxSize:e.contentBoxSize,devicePixelContentBoxSize:e.devicePixelContentBoxSize}}(l))});o.fallbackIframe=t,e.__resizeCleanup=l}},updated(e,t){const n=e.__resize;n&&(n.options=at(t.value))},unmounted(e){const t=e.__resize;if(!t)return;t.debounceTimer&&clearTimeout(t.debounceTimer),t.observer&&t.observer.disconnect();const n=e.__resizeCleanup;n&&n(),delete e.__resize,delete e.__resizeCleanup}});function ct(e){if(!1===e)return{disabled:!0,color:"currentColor",duration:600};if("string"==typeof e)return{color:e,duration:600};const t={color:"currentColor",duration:600,disabled:!1,initialScale:0,finalScale:2};return e&&"object"==typeof e?__spreadValues(__spreadValues({},t),e):t}const dt=y({name:"ripple",ssr:!1,defaults:{color:"currentColor",duration:600,disabled:!1,initialScale:0,finalScale:2},mounted(e,t){const n=ct(t.value);if(n.disabled||!p())return;const o=getComputedStyle(e);"static"===o.position&&(e.style.position="relative"),"visible"===o.overflow&&(e.style.overflow="hidden"),e.classList.add("v-ripple");const l={options:n,clickHandler:t=>{if(l.options.disabled)return;const n=function(e,t,n){const o=t.getBoundingClientRect(),l=e.clientX-o.left,i=e.clientY-o.top,r=2*Math.max(o.width,o.height),s=document.createElement("span");return s.className="v-ripple__wave",s.style.cssText=`\n position: absolute;\n border-radius: 50%;\n pointer-events: none;\n background-color: ${n.color};\n width: ${r}px;\n height: ${r}px;\n left: ${l-r/2}px;\n top: ${i-r/2}px;\n transform: scale(${n.initialScale});\n opacity: 0.3;\n z-index: 0;\n `,s}(t,e,l.options);n&&(e.appendChild(n),function(e,t){const n=t.duration||600,o=t.initialScale||0,l=t.finalScale||2;"function"==typeof e.animate?e.animate([{transform:`scale(${o})`,opacity:.3},{transform:`scale(${l})`,opacity:0}],{duration:n,easing:"ease-out",fill:"forwards"}).onfinish=()=>{e.remove()}:(e.style.transition=`transform ${n}ms ease-out, opacity ${n}ms ease-out`,String(e.offsetHeight),e.style.transform=`scale(${l})`,e.style.opacity="0",setTimeout(()=>{e.remove()},n))}(n,l.options))}};e.__ripple=l,O(e,"click",l.clickHandler)},updated(e,t){const n=e.__ripple;n&&(n.options=ct(t.value))},unmounted(e){const t=e.__ripple;t&&(H(e,"click",t.clickHandler),e.classList.remove("v-ripple"),delete e.__ripple)}}),pt=["b","i","u","strong","em","br","p","span","div"],vt=["title","alt","href","src"],mt=["script","iframe","object","embed","form","input","style","link","meta","base"],ft=["onclick","onerror","onload","onmouseover","onfocus","onblur","onchange","onsubmit"];function ht(e){return!1===e?{disabled:!0}:!0===e?{allowedTags:pt,allowedAttributes:vt}:__spreadValues({allowedTags:pt,allowedAttributes:vt,allowDataUrls:!1,allowStyles:!1,allowClass:!1,allowId:!1,disabled:!1,sanitizeOnUpdate:!0},e)}function gt(e,t){var n;if(t.handler)return t.handler(e);const o=document.createElement("div");o.innerHTML=e;for(const e of mt){const t=o.getElementsByTagName(e);for(;t.length>0;)null==(n=t[0].parentNode)||n.removeChild(t[0])}const l=e=>{var n;const o=e.tagName.toLowerCase();if(t.allowedTags&&!t.allowedTags.includes(o)){const t=document.createTextNode(e.textContent||"");return void(null==(n=e.parentNode)||n.replaceChild(t,e))}for(const t of ft)e.removeAttribute(t);const i=e.getAttribute("href");if(i&&i.toLowerCase().startsWith("javascript:")&&e.removeAttribute("href"),!t.allowDataUrls){const t=e.getAttribute("src");t&&t.toLowerCase().startsWith("data:")&&e.removeAttribute("src")}if(t.allowedAttributes){const n=Array.from(e.attributes);for(const o of n){const n=t.allowedAttributes.includes(o.name.toLowerCase()),l="class"===o.name&&t.allowClass,i="id"===o.name&&t.allowId,r="style"===o.name&&t.allowStyles;n||l||i||r||e.removeAttribute(o.name)}}for(const t of Array.from(e.children))l(t)};for(const e of Array.from(o.children))l(e);return o.innerHTML}const bt=y({name:"sanitize",ssr:!0,defaults:{allowedTags:pt,allowedAttributes:vt,allowDataUrls:!1,allowStyles:!1,allowClass:!1,allowId:!1,disabled:!1,sanitizeOnUpdate:!0},mounted(e,t){if(!p())return;const n=ht(t.value);if(n.disabled)return;e.__sanitize={options:n};const o=e.innerHTML;o&&(e.innerHTML=gt(o,n))},updated(e,t){const n=e.__sanitize;if(!n)return;if(n.options=ht(t.value),n.options.disabled||!n.options.sanitizeOnUpdate)return;const o=e.innerHTML;o&&(e.innerHTML=gt(o,n.options))},unmounted(e){delete e.__sanitize}});function yt(e,t,n){let o=0,l=0,i=0,r=0;if(e===window)o=window.scrollX||document.documentElement.scrollLeft,l=window.scrollY||document.documentElement.scrollTop,i=document.documentElement.scrollWidth-window.innerWidth,r=document.documentElement.scrollHeight-window.innerHeight;else{const t=e;o=t.scrollLeft,l=t.scrollTop,i=t.scrollWidth-t.clientWidth,r=t.scrollHeight-t.clientHeight}return{scrollLeft:o,scrollTop:l,scrollLeftMax:i,scrollTopMax:r,progressX:i>0?o/i:0,progressY:r>0?l/r:0,directionX:o!==t?o>t?1:-1:0,directionY:l!==n?l>n?1:-1:0,container:e}}function _t(e){if("function"==typeof e)return{handler:e,passive:!0};if(!e)throw new Error("[Directix] v-scroll: handler is required");return __spreadValues({passive:!0,throttle:0,disabled:!1},e)}const wt=y({name:"scroll",ssr:!1,defaults:{passive:!0,throttle:0,disabled:!1},mounted(e,t){const n=_t(t.value);if(n.disabled||!p())return;let o;if(n.container)if(n.container===window)o=window;else if("string"==typeof n.container){const t=document.querySelector(n.container);o=t||I(e)}else o=n.container;else{const{overflow:t,overflowX:n,overflowY:l}=getComputedStyle(e),i=/(auto|scroll)/.test(t+n+l);o=i?e:I(e)}const l={options:n,container:o,lastScrollLeft:0,lastScrollTop:0,throttleTimer:null,pendingEvent:null,scrollHandler:e=>{if(n.throttle&&n.throttle>0)l.pendingEvent=e,l.throttleTimer||(l.throttleTimer=setTimeout(()=>{if(l.pendingEvent){const e=yt(o,l.lastScrollLeft,l.lastScrollTop);l.lastScrollLeft=e.scrollLeft,l.lastScrollTop=e.scrollTop,n.handler(l.pendingEvent,e)}l.throttleTimer=null,l.pendingEvent=null},n.throttle));else{const t=yt(o,l.lastScrollLeft,l.lastScrollTop);l.lastScrollLeft=t.scrollLeft,l.lastScrollTop=t.scrollTop,n.handler(e,t)}}},i=yt(o,0,0);l.lastScrollLeft=i.scrollLeft,l.lastScrollTop=i.scrollTop,e.__scroll=l,O(o,"scroll",l.scrollHandler,{passive:n.passive})},updated(e,t){const n=e.__scroll;n&&(n.options=_t(t.value))},unmounted(e){const t=e.__scroll;t&&(t.throttleTimer&&clearTimeout(t.throttleTimer),H(t.container,"scroll",t.scrollHandler),delete e.__scroll)}}),Tt="__sticky";function Et(e){return!1===e?{disabled:!0,top:0,zIndex:100}:"number"==typeof e?{top:e,zIndex:100}:__spreadValues({top:0,zIndex:100,stickyClass:"v-sticky--fixed",disabled:!1},e&&"object"==typeof e?e:{})}function xt(e){return void 0===e?"0":"number"==typeof e?`${e}px`:e}function Lt(e,t){if(t.options.disabled)return void St(e,t);const n=parseFloat(xt(t.options.top)),o=t.container===window?{top:0}:t.container.getBoundingClientRect(),l=(t.placeholder||e).getBoundingClientRect().top-o.top<=n;l&&!t.isSticky?function(e,t,n,o){var l,i,r;t.isSticky=!0;const s=document.createElement("div");s.style.cssText=`width:${e.offsetWidth}px;height:${e.offsetHeight}px`,null==(l=e.parentNode)||l.insertBefore(s,e),t.placeholder=s;const a=t.container===window?n:o+n;e.style.position="fixed",e.style.top=`${a}px`,e.style.zIndex=String(t.options.zIndex||100),e.style.width=`${e.offsetWidth}px`,void 0!==t.options.bottom&&(e.style.bottom=xt(t.options.bottom));t.options.stickyClass&&e.classList.add(t.options.stickyClass),e.dispatchEvent(new CustomEvent("sticky:change",{detail:{isSticky:!0}})),null==(r=(i=t.options).onChange)||r.call(i,!0)}(e,t,n,o.top):!l&&t.isSticky&&St(e,t)}function St(e,t){var n,o,l,i;t.isSticky&&(t.isSticky=!1,null==(o=null==(n=t.placeholder)?void 0:n.parentNode)||o.removeChild(t.placeholder),t.placeholder=null,Object.assign(e.style,t.originalStyles),t.options.stickyClass&&e.classList.remove(t.options.stickyClass),e.dispatchEvent(new CustomEvent("sticky:change",{detail:{isSticky:!1}})),null==(i=(l=t.options).onChange)||i.call(l,!1))}const Ct=y({name:"sticky",ssr:!1,defaults:{top:0,zIndex:100,stickyClass:"v-sticky--fixed",disabled:!1},mounted(e,t){const n=Et(t.value);if(n.disabled||!p())return;const o=function(e,t){if(t)return"string"==typeof t?document.querySelector(t)||I(e):t;const n=e.parentElement;if(n){const{overflow:e,overflowX:t,overflowY:o}=getComputedStyle(n);if(/(auto|scroll)/.test(e+t+o))return n}return I(e)}(e,n.container),l={options:n,placeholder:null,originalStyles:{position:e.style.position,top:e.style.top,bottom:e.style.bottom,zIndex:e.style.zIndex,width:e.style.width},isSticky:!1,container:o,scrollHandler:()=>Lt(e,l),resizeHandler:()=>Lt(e,l)};e.classList.add("v-sticky"),e[Tt]=l,O(o,"scroll",l.scrollHandler,{passive:!0}),O(window,"resize",l.resizeHandler,{passive:!0}),Lt(e,l)},updated(e,t){const n=e[Tt];n&&(n.options=Et(t.value),Lt(e,n))},unmounted(e){var t,n;const o=e[Tt];o&&(null==(n=null==(t=o.placeholder)?void 0:t.parentNode)||n.removeChild(o.placeholder),Object.assign(e.style,o.originalStyles),e.classList.remove("v-sticky",o.options.stickyClass||"v-sticky--fixed"),H(o.container,"scroll",o.scrollHandler),H(window,"resize",o.resizeHandler),delete e[Tt])}});function kt(e,t){const n=$(t.arg)||300;return"function"==typeof e?{handler:e,wait:n}:__spreadProps(__spreadValues({},e),{wait:e.wait||n})}const Dt=y({name:"throttle",ssr:!0,defaults:{wait:300,leading:!0,trailing:!0},mounted(e,t){const n=kt(t.value,t),o=Z(t.modifiers)||G(e),l=Y(n.handler,n.wait,{leading:n.leading,trailing:n.trailing});e.addEventListener(o,l),e.__throttle={throttledFn:l,eventType:o,options:n}},updated(e,t){const n=e.__throttle;if(!n)return;const o=kt(t.value,t);if(o.wait!==n.options.wait||o.leading!==n.options.leading||o.trailing!==n.options.trailing){n.throttledFn.cancel();const t=Y(o.handler,o.wait,{leading:o.leading,trailing:o.trailing});e.removeEventListener(n.eventType,n.throttledFn),e.addEventListener(n.eventType,t),e.__throttle={throttledFn:t,eventType:n.eventType,options:o}}else o.handler!==n.options.handler&&(n.options.handler=o.handler)},unmounted(e){const t=e.__throttle;t&&(t.throttledFn.cancel(),e.removeEventListener(t.eventType,t.throttledFn),delete e.__throttle)}}),It="8px 12px",Ot="#333",Ht="#fff",Pt="6px",Mt="14px",zt="1.5",Vt="96px",Nt="320px",Xt="0 4px 12px rgba(0, 0, 0, 0.15)";let At=null;function Yt(e,t){if(t.isVisible||t.options.disabled)return;t.hideTimeout&&(clearTimeout(t.hideTimeout),t.hideTimeout=null);const n=()=>{var n,o;const l=function(e){const t=document.createElement("div");t.className=`v-tooltip v-tooltip--${e.placement||"top"}`,e.class&&t.classList.add(e.class);const n=e.maxWidth?"number"==typeof e.maxWidth?`${e.maxWidth}px`:e.maxWidth:Nt;if(t.style.cssText=["position: absolute",`padding: ${It}`,`background: ${Ot}`,`color: ${Ht}`,`border-radius: ${Pt}`,`font-size: ${Mt}`,`line-height: ${zt}`,`min-width: ${Vt}`,`max-width: ${n}`,"word-wrap: break-word",`box-shadow: ${Xt}`,"pointer-events: none","opacity: 0","transition: opacity 0.2s ease",`z-index: ${e.zIndex||9999}`].join(";"),!1!==e.arrow){const e=document.createElement("div");e.className="v-tooltip__arrow",e.style.cssText="position: absolute; width: 8px; height: 8px; background: #333; transform: rotate(45deg);",t.appendChild(e)}const o=document.createElement("div");return o.className="v-tooltip__content",o.textContent=e.content,t.appendChild(o),t}(t.options);t.tooltip=l,(At||"undefined"==typeof document||(At=document.createElement("div"),At.id="directix-tooltip-container",At.style.cssText="position: fixed; top: 0; left: 0; pointer-events: none; z-index: 9999;",document.body.appendChild(At)),At).appendChild(l),requestAnimationFrame(()=>{!function(e,t,n,o){const l=t.getBoundingClientRect(),i=e.getBoundingClientRect();let r=0,s=0;switch(n){case"top":r=l.top-i.height-o,s=l.left+(l.width-i.width)/2;break;case"bottom":r=l.bottom+o,s=l.left+(l.width-i.width)/2;break;case"left":r=l.top+(l.height-i.height)/2,s=l.left-i.width-o;break;case"right":r=l.top+(l.height-i.height)/2,s=l.right+o}const a=window.innerWidth,u=window.innerHeight;s<0&&(s=8),s+i.width>a&&(s=a-i.width-8),r<0&&(r=8),r+i.height>u&&(r=u-i.height-8),e.style.top=`${r}px`,e.style.left=`${s}px`;const c=e.querySelector(".v-tooltip__arrow");if(c){const e=4;switch(n){case"top":Object.assign(c.style,{bottom:`-${e}px`,left:"50%",transform:"translateX(-50%) rotate(45deg)"});break;case"bottom":Object.assign(c.style,{top:`-${e}px`,left:"50%",transform:"translateX(-50%) rotate(45deg)"});break;case"left":Object.assign(c.style,{right:`-${e}px`,top:"50%",transform:"translateY(-50%) rotate(45deg)"});break;case"right":Object.assign(c.style,{left:`-${e}px`,top:"50%",transform:"translateY(-50%) rotate(45deg)"})}}}(l,e,t.options.placement||"top",t.options.offset||8),requestAnimationFrame(()=>{l.style.opacity="1"})}),t.isVisible=!0,null==(o=(n=t.options).onShow)||o.call(n)};t.options.delay&&t.options.delay>0?t.showTimeout=setTimeout(n,t.options.delay):n()}function $t(e){if(!e.isVisible)return;e.showTimeout&&(clearTimeout(e.showTimeout),e.showTimeout=null);const t=()=>{var t,n;e.tooltip&&(e.tooltip.style.opacity="0",setTimeout(()=>{var t;null==(t=e.tooltip)||t.remove(),e.tooltip=null},200)),e.isVisible=!1,null==(n=(t=e.options).onHide)||n.call(t)};e.options.hideDelay&&e.options.hideDelay>0?e.hideTimeout=setTimeout(t,e.options.hideDelay):t()}function Rt(e,t){const{trigger:n="hover"}=t.options,o=()=>Yt(e,t),l=()=>$t(t),i=()=>t.isVisible?l():o();switch(t.handlers={show:o,hide:l,toggle:i},n){case"hover":e.addEventListener("mouseenter",o),e.addEventListener("mouseleave",l);break;case"click":e.addEventListener("click",i),document.addEventListener("click",t.handlers.docHide=n=>{t.isVisible&&!e.contains(n.target)&&l()});break;case"focus":e.addEventListener("focus",o),e.addEventListener("blur",l)}}function Bt(e){var t,n,o,l,i,r,s,a;return"string"==typeof e?{content:e,placement:"top",trigger:"hover"}:e?{content:e.content,placement:null!=(t=e.placement)?t:"top",trigger:null!=(n=e.trigger)?n:"hover",delay:null!=(o=e.delay)?o:0,hideDelay:null!=(l=e.hideDelay)?l:0,offset:null!=(i=e.offset)?i:8,class:e.class,arrow:null==(r=e.arrow)||r,disabled:null!=(s=e.disabled)&&s,maxWidth:e.maxWidth,zIndex:null!=(a=e.zIndex)?a:9999,onShow:e.onShow,onHide:e.onHide}:{content:"",placement:"top",trigger:"hover"}}function Ft(e){return{options:e,tooltip:null,showTimeout:null,hideTimeout:null,isVisible:!1,handlers:{}}}const jt=y({name:"tooltip",ssr:!1,mounted(e,t){const n=Bt(t.value);if(n.disabled||!n.content)return;const o=Ft(n);e.__tooltip=o,Rt(e,o),e.setAttribute("aria-describedby","v-tooltip")},updated(e,t){const n=e.__tooltip,o=Bt(t.value);if(n){if("manual"===o.trigger){const t=n.options.disabled;return n.options=o,void(o.disabled&&!t?$t(n):!o.disabled&&t&&Yt(e,n))}if(n.tooltip&&n.isVisible){const e=n.tooltip.querySelector(".v-tooltip__content");e&&(e.textContent=o.content)}n.options=o}else if(!o.disabled&&o.content){const t=Ft(o);e.__tooltip=t,Rt(e,t),"manual"===o.trigger&&Yt(e,t)}},unmounted(e){var t;const n=e.__tooltip;n&&(n.showTimeout&&clearTimeout(n.showTimeout),n.hideTimeout&&clearTimeout(n.hideTimeout),null==(t=n.tooltip)||t.remove(),function(e,t){const{show:n,hide:o,toggle:l,docHide:i}=t.handlers;n&&(e.removeEventListener("mouseenter",n),e.removeEventListener("focus",n)),o&&(e.removeEventListener("mouseleave",o),e.removeEventListener("blur",o)),l&&e.removeEventListener("click",l),i&&document.removeEventListener("click",i)}(e,n),delete e.__tooltip)}}),Ut=(e,t,n,o)=>Math.sqrt(__pow(n-e,2)+__pow(o-t,2)),Wt=(e,t,n,o)=>180*Math.atan2(o-t,n-e)/Math.PI,qt=y({name:"touch",ssr:!1,mounted(e,t){const n=Zt(t.value),o={options:n,startX:0,startY:0,startTime:0,startDistance:0,startAngle:0,lastScale:1,lastAngle:0,longPressTimer:null,isLongPress:!1,isMouseDown:!1,lastTouchEndTime:0,handlers:{touchStart:()=>{},touchMove:()=>{},touchEnd:()=>{}}};e.__touch=o;const l=()=>{o.longPressTimer&&(clearTimeout(o.longPressTimer),o.longPressTimer=null)},i=e=>{l(),o.options.enableLongPress&&o.options.onLongPress&&(o.longPressTimer=setTimeout(()=>{o.isLongPress=!0,o.options.onLongPress(e)},o.options.longPressTimeout||500))},r=(e,t)=>{const n=o.options.tapThreshold||10;return Math.abs(e-o.startX)>n||Math.abs(t-o.startY)>n},s=(e,t,n)=>{var l,i,r,s,a,u,c,d,p,v,m,f;if(o.isLongPress)return;const h=Date.now()-o.startTime,g=e-o.startX,b=t-o.startY,y=Math.sqrt(__pow(g,2)+__pow(b,2));if(o.options.enableSwipe&&y>=(o.options.swipeThreshold||30)&&h<=(o.options.swipeTimeout||500)){const e=Math.abs(g)>Math.abs(b)?g>0?"right":"left":b>0?"down":"up";null==(i=(l=o.options).onSwipe)||i.call(l,e,n),"left"===e?null==(s=(r=o.options).onSwipeLeft)||s.call(r,n):"right"===e?null==(u=(a=o.options).onSwipeRight)||u.call(a,n):"up"===e?null==(d=(c=o.options).onSwipeUp)||d.call(c,n):null==(v=(p=o.options).onSwipeDown)||v.call(p,n)}else o.options.enableTap&&y<(o.options.tapThreshold||10)&&h<(o.options.tapTimeout||250)&&(null==(f=(m=o.options).onTap)||f.call(m,n))},a=e=>{var t,n;if(e.touches.length>1&&e.preventDefault(),o.startTime=Date.now(),o.isLongPress=!1,1===e.touches.length)o.startX=e.touches[0].clientX,o.startY=e.touches[0].clientY,i(e);else if(2===e.touches.length){l();const[t,n]=e.touches;o.startDistance=Ut(t.clientX,t.clientY,n.clientX,n.clientY),o.startAngle=Wt(t.clientX,t.clientY,n.clientX,n.clientY),o.lastScale=1,o.lastAngle=0}null==(n=(t=o.options).onTouchStart)||n.call(t,e)},u=e=>{var t,n;if(e.touches.length>=1&&e.preventDefault(),o.longPressTimer&&1===e.touches.length&&r(e.touches[0].clientX,e.touches[0].clientY)&&l(),2===e.touches.length){const[t,n]=e.touches,l=Ut(t.clientX,t.clientY,n.clientX,n.clientY),i=Wt(t.clientX,t.clientY,n.clientX,n.clientY);if(o.options.enablePinch&&o.options.onPinch){const t=l/o.startDistance;Math.abs(t-o.lastScale)>=(o.options.pinchThreshold||.1)&&(o.options.onPinch(t,e),o.lastScale=t)}if(o.options.enableRotate&&o.options.onRotate){const t=i-o.startAngle;Math.abs(t-o.lastAngle)>5&&(o.options.onRotate(t,e),o.lastAngle=t)}}null==(n=(t=o.options).onTouchMove)||n.call(t,e)},c=e=>{var t,n;if(l(),0===e.touches.length){o.lastTouchEndTime=Date.now();const t=e.changedTouches[0];s(t.clientX,t.clientY,e)}null==(n=(t=o.options).onTouchEnd)||n.call(t,e)},d=e=>{var t,n;o.options.enableMouse&&(Date.now()-o.lastTouchEndTime<400||(e.preventDefault(),o.isMouseDown=!0,o.startTime=Date.now(),o.startX=e.clientX,o.startY=e.clientY,o.isLongPress=!1,i(e),null==(n=(t=o.options).onTouchStart)||n.call(t,e)))},p=e=>{var t,n;o.isMouseDown&&o.options.enableMouse&&(o.longPressTimer&&r(e.clientX,e.clientY)&&l(),null==(n=(t=o.options).onTouchMove)||n.call(t,e))},v=e=>{var t,n;o.isMouseDown&&o.options.enableMouse&&(o.isMouseDown=!1,l(),o.isLongPress||s(e.clientX,e.clientY,e),null==(n=(t=o.options).onTouchEnd)||n.call(t,e))};o.handlers={touchStart:a,touchMove:u,touchEnd:c,mouseDown:d,mouseMove:p,mouseUp:v},e.addEventListener("touchstart",a,{passive:!1}),e.addEventListener("touchmove",u,{passive:!1}),e.addEventListener("touchend",c),e.addEventListener("touchcancel",c),n.enableMouse&&(e.addEventListener("mousedown",d),document.addEventListener("mousemove",p),document.addEventListener("mouseup",v))},updated(e,t){const n=e.__touch;n&&(n.options=Zt(t.value))},unmounted(e){const t=e.__touch;(null==t?void 0:t.longPressTimer)&&clearTimeout(t.longPressTimer),(null==t?void 0:t.handlers)&&(e.removeEventListener("touchstart",t.handlers.touchStart),e.removeEventListener("touchmove",t.handlers.touchMove),e.removeEventListener("touchend",t.handlers.touchEnd),e.removeEventListener("touchcancel",t.handlers.touchEnd),t.handlers.mouseDown&&e.removeEventListener("mousedown",t.handlers.mouseDown),t.handlers.mouseMove&&document.removeEventListener("mousemove",t.handlers.mouseMove),t.handlers.mouseUp&&document.removeEventListener("mouseup",t.handlers.mouseUp)),delete e.__touch}});function Zt(e){var t,n,o,l,i,r,s,a,u,c,d,p;return{swipeThreshold:null!=(t=null==e?void 0:e.swipeThreshold)?t:30,swipeTimeout:null!=(n=null==e?void 0:e.swipeTimeout)?n:500,pinchThreshold:null!=(o=null==e?void 0:e.pinchThreshold)?o:.1,enableSwipe:null==(l=null==e?void 0:e.enableSwipe)||l,enablePinch:null==(i=null==e?void 0:e.enablePinch)||i,enableRotate:null==(r=null==e?void 0:e.enableRotate)||r,enableTap:null==(s=null==e?void 0:e.enableTap)||s,tapTimeout:null!=(a=null==e?void 0:e.tapTimeout)?a:250,tapThreshold:null!=(u=null==e?void 0:e.tapThreshold)?u:10,enableLongPress:null==(c=null==e?void 0:e.enableLongPress)||c,longPressTimeout:null!=(d=null==e?void 0:e.longPressTimeout)?d:500,enableMouse:null==(p=null==e?void 0:e.enableMouse)||p,onSwipe:null==e?void 0:e.onSwipe,onSwipeLeft:null==e?void 0:e.onSwipeLeft,onSwipeRight:null==e?void 0:e.onSwipeRight,onSwipeUp:null==e?void 0:e.onSwipeUp,onSwipeDown:null==e?void 0:e.onSwipeDown,onPinch:null==e?void 0:e.onPinch,onRotate:null==e?void 0:e.onRotate,onTap:null==e?void 0:e.onTap,onLongPress:null==e?void 0:e.onLongPress,onTouchStart:null==e?void 0:e.onTouchStart,onTouchMove:null==e?void 0:e.onTouchMove,onTouchEnd:null==e?void 0:e.onTouchEnd}}function Gt(e,t){const{position:n="both",chars:o}=t,l=o?`[\\s${i=o,i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}]`:"\\s";var i;switch(n){case"start":return e.replace(new RegExp(`^${l}+`,"g"),"");case"end":return e.replace(new RegExp(`${l}+$`,"g"),"");default:return e.replace(new RegExp(`^${l}+|${l}+$`,"g"),"")}}const Jt=y({name:"trim",ssr:!0,mounted(e,t){const n=Kt(t.value);if("INPUT"===e.tagName||"TEXTAREA"===e.tagName)!function(e,t){const n={options:t};e.__trim=n;const o=()=>{const n=e.value,o=Gt(n,t);n!==o&&(e.value=o,e.dispatchEvent(new Event("input",{bubbles:!0})))};if(t.onInput){const t=()=>{const t=e.value,n=e.selectionStart,o=t.replace(/\s+$/g,"");if(t!==o&&(e.value=o,null!==n)){const t=Math.min(n,o.length);e.setSelectionRange(t,t)}};e.addEventListener("input",t),n.inputHandler=t}if(t.onBlur){const t=()=>o();e.addEventListener("blur",t),n.blurHandler=t}e.value&&o()}(e,n);else{const t=e.textContent||"";e.textContent=Gt(t,n)}},updated(e,t){const n=Kt(t.value),o=e.__trim;if("INPUT"===e.tagName||"TEXTAREA"===e.tagName)o&&(o.options=n);else{const t=e.textContent||"";e.textContent=Gt(t,n)}},unmounted(e){const t=e.__trim;(null==t?void 0:t.inputHandler)&&e.removeEventListener("input",t.inputHandler),(null==t?void 0:t.blurHandler)&&e.removeEventListener("blur",t.blurHandler),delete e.__trim}});function Kt(e){var t,n,o;return void 0===e||!0===e?{position:"both",onInput:!0,onBlur:!0}:!1===e?{position:"both",onInput:!1,onBlur:!1}:"string"==typeof e?{position:e,onInput:!0,onBlur:!0}:{position:null!=(t=e.position)?t:"both",onInput:null==(n=e.onInput)||n,onBlur:null==(o=e.onBlur)||o,chars:e.chars}}const Qt=y({name:"truncate",ssr:!0,mounted(e,t){const n=tn(t.value),o=e.textContent||"",l={originalText:o,options:n};e.__truncate=l,en(e,o,n)},updated(e,t){const n=e.__truncate,o=tn(t.value);if(n){const t=n.originalText;JSON.stringify(o)!==JSON.stringify(n.options)&&(n.options=o,en(e,t,o))}else{const t=e.textContent||"";e.__truncate={originalText:t,options:o},en(e,t,o)}},unmounted(e){delete e.__truncate}});function en(e,t,n){const{useCss:o,showTitle:l=!0}=n;if(o)e.style.overflow="hidden",e.style.textOverflow="ellipsis",e.style.whiteSpace="nowrap",l&&t&&e.setAttribute("title",t);else{const o=function(e,t){const{length:n=100,position:o="end",ellipsis:l="..."}=t;if(e.length<=n)return e;switch(o){case"start":return l+e.slice(-(n-l.length));case"middle":{const t=Math.ceil((n-l.length)/2),o=Math.floor((n-l.length)/2);return e.slice(0,t)+l+e.slice(-o)}default:return e.slice(0,n-l.length)+l}}(t,n);e.textContent=o,l&&t&&t!==o&&e.setAttribute("title",t)}}function tn(e){var t,n,o,l,i;return"number"==typeof e?{length:e,position:"end",ellipsis:"...",useCss:!1,showTitle:!0}:{length:null!=(t=null==e?void 0:e.length)?t:100,position:null!=(n=null==e?void 0:e.position)?n:"end",ellipsis:null!=(o=null==e?void 0:e.ellipsis)?o:"...",useCss:null!=(l=null==e?void 0:e.useCss)&&l,showTitle:null==(i=null==e?void 0:e.showTitle)||i}}function nn(e,t){return e?t.first?e.charAt(0).toUpperCase()+e.slice(1):e.toUpperCase():e}function on(e){var t,n;return void 0===e||!0===e?{first:!1,onInput:!0}:!1===e?{first:!1,onInput:!1}:{first:null!=(t=e.first)&&t,onInput:null==(n=e.onInput)||n}}const ln=y({name:"uppercase",ssr:!0,mounted(e,t){const n=on(t.value);if(E(e)){const t=w(e,n,e=>nn(e,n));e.__uppercaseCleanup=t}else T(e,e=>nn(e,n))},updated(e,t){const n=on(t.value);E(e)?n.onInput&&(e.value=nn(e.value,n)):T(e,e=>nn(e,n))},unmounted(e){const t=e.__uppercaseCleanup;null==t||t(),delete e.__uppercaseCleanup}});function rn(e){return"boolean"==typeof e?{initial:e}:__spreadValues({initial:!0,disabled:!1,useHidden:!1},e)}const sn=y({name:"visible",ssr:!0,defaults:{initial:!0,disabled:!1,useHidden:!1},mounted(e,t){var n,o;if(!p())return;const l=rn(t.value),i=e.style.display,r=e.style.visibility,s={options:l,isVisible:null==(n=l.initial)||n,originalDisplay:i,originalVisibility:r,transitionEndHandler:t=>{"opacity"!==t.propertyName&&"visibility"!==t.propertyName||e.dispatchEvent(new CustomEvent("visible:transition-end",{detail:{isVisible:s.isVisible}}))}};e.__visible=s,O(e,"transitionend",s.transitionEndHandler),an(e,s,null==(o=l.initial)||o)},updated(e,t){var n;const o=e.__visible;if(!o)return;const l=rn(t.value);let i;i="boolean"==typeof t.value?t.value:null==(n=l.initial)||n,o.isVisible!==i&&an(e,o,i),o.options=l},unmounted(e){const t=e.__visible;t&&(H(e,"transitionend",t.transitionEndHandler),e.style.display=t.originalDisplay,e.style.visibility=t.originalVisibility,delete e.__visible)}});function an(e,t,n){const o=t.isVisible;if(t.isVisible=n,n?(e.classList.remove("v-hidden"),e.classList.add("v-visible")):(e.classList.remove("v-visible"),e.classList.add("v-hidden")),t.options.useHidden)if(n)e.style.visibility=t.originalVisibility||"visible";else{if("0s"!==getComputedStyle(e).transitionDuration){const n=o=>{o.target!==e||"opacity"!==o.propertyName&&"transform"!==o.propertyName||(t.isVisible||(e.style.visibility="hidden"),e.removeEventListener("transitionend",n))};e.addEventListener("transitionend",n)}else e.style.visibility="hidden"}else e.style.display=n?t.originalDisplay:"none";e.dispatchEvent(new CustomEvent("visible:change",{detail:{isVisible:n,previousVisibility:o}})),t.options.handler&&o!==n&&t.options.handler(n)}const un={"click-outside":R,copy:U,debounce:K,throttle:Dt,focus:le,lazy:Ie,intersect:Te,visible:sn,loading:He,scroll:wt,"infinite-scroll":ge,sticky:Ct,"long-press":Ve,hover:se,ripple:dt,mask:We,permission:st,sanitize:bt,resize:ut,mutation:tt,truncate:Qt,uppercase:ln,lowercase:Ae,capitalcase:k,number:nt,money:Qe,trim:Jt,tooltip:jt,draggable:ne,touch:qt,"image-preview":fe},cn={install:(e,t={})=>{var n,o,l,i,r,s,a;let u=null;if("function"==typeof e&&(null==(n=e.version)?void 0:n.startsWith("2")))u=2;else if((null==e?void 0:e.config)&&(null==(o=null==e?void 0:e.version)?void 0:o.startsWith("3")))u=3;else if("function"==typeof(null==e?void 0:e.directive)&&"function"==typeof(null==e?void 0:e.mixin)&&(null==(l=e.version)?void 0:l.startsWith("2")))u=2;else if("undefined"!=typeof window){const e=window;(null==(r=null==(i=e.Vue)?void 0:i.version)?void 0:r.startsWith("2"))?u=2:(null==(a=null==(s=e.Vue)?void 0:s.version)?void 0:a.startsWith("3"))&&(u=3)}u&&d(u);const{directives:c,all:p=!1}=t;p||!c?Object.entries(un).forEach(([t,n])=>{e.directive(t,n)}):c.forEach(t=>{const n=un[t];n?e.directive(t,n):console.warn(`[Directix] Unknown directive: ${t}`)})}};e.Directix=cn,e.addCleanupVue2=function(e,t){const n=e.__directix_state__;n&&n.cleanup.push(t)},e.addCleanupVue3=function(e,t){const n=e.__directix_state__;n&&n.cleanup.push(t)},e.capitalcase=k,e.clickOutside=R,e.configurePermission=function(e){lt=e},e.copy=U,e.createVue2Directive=t,e.createVue3Directive=o,e.debounce=K,e.debounceFn=A,e.deepClone=function e(t){if(null===t||"object"!=typeof t)return t;if(Array.isArray(t))return t.map(t=>e(t));const n={};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(n[o]=e(t[o]));return n},e.deepMerge=function e(t,...n){if(!n.length)return t;const o=n.shift();if(N(t)&&N(o))for(const n in o)N(o[n])?(t[n]||Object.assign(t,{[n]:{}}),e(t[n],o[n])):Object.assign(t,{[n]:o[n]});return e(t,...n)},e.defineDirective=y,e.defineDirectiveGroup=function(e,t){return{name:e,directives:t,install(n,o){Object.entries(t).forEach(([t,o])=>{const l=`${e}-${t}`;n.directive(l,o)})}}},e.draggable=ne,e.focus=le,e.generateId=function(e=""){return`${e}${Date.now().toString(36)}${Math.random().toString(36).slice(2,9)}`},e.get=function(e,t,n){const o=t.split(".");let l=e;for(const e of o){if(null==l)return n;l=l[e]}return void 0===l?n:l},e.getPermissionConfig=function(){return lt},e.getVueVersion=c,e.hover=se,e.imagePreview=fe,e.infiniteScroll=ge,e.intersect=Te,e.isArray=X,e.isBoolean=function(e){return"boolean"==typeof e},e.isBrowser=p,e.isEmpty=function(e){return null==e||(z(e)||X(e)?0===e.length:!!N(e)&&0===Object.keys(e).length)},e.isFunction=V,e.isNumber=function(e){return"number"==typeof e&&!isNaN(e)},e.isObject=N,e.isPromise=function(e){return N(e)&&V(e.then)},e.isSSR=v,e.isString=z,e.isVue2=function(){if(null===r){const e=c();r=2===e||2.7===e}return r},e.isVue27=function(){return null===s&&(s=2.7===c()),s},e.isVue3=function(){return null===a&&(a=3===c()),a},e.lazy=Ie,e.loading=He,e.longPress=Ve,e.lowercase=Ae,e.mask=We,e.money=Qe,e.mutation=tt,e.number=nt,e.parseTime=$,e.permission=st,e.resetVueVersion=function(){i=null,r=null,s=null,a=null},e.resize=ut,e.ripple=dt,e.sanitize=bt,e.scroll=wt,e.set=function(e,t,n){const o=t.split("."),l=o.pop();let i=e;for(const e of o)void 0===i[e]&&(i[e]={}),i=i[e];i[l]=n},e.setVueVersion=d,e.sticky=Ct,e.supportsClipboard=g,e.supportsIntersectionObserver=f,e.supportsMutationObserver=b,e.supportsPassive=m,e.supportsResizeObserver=h,e.throttle=Dt,e.throttleFn=Y,e.tooltip=jt,e.touch=qt,e.trim=Jt,e.truncate=Qt,e.uppercase=ln,e.vCapitalcase=k,e.vClickOutside=R,e.vCopy=U,e.vDebounce=K,e.vDraggable=ne,e.vFocus=le,e.vHover=se,e.vImagePreview=fe,e.vInfiniteScroll=ge,e.vIntersect=Te,e.vLazy=Ie,e.vLoading=He,e.vLongPress=Ve,e.vLowercase=Ae,e.vMask=We,e.vMoney=Qe,e.vMutation=tt,e.vNumber=nt,e.vPermission=st,e.vResize=ut,e.vRipple=dt,e.vSanitize=bt,e.vScroll=wt,e.vSticky=Ct,e.vThrottle=Dt,e.vTooltip=jt,e.vTouch=qt,e.vTrim=Jt,e.vTruncate=Qt,e.vUppercase=ln,e.vVisible=sn,e.visible=sn,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}(this.Directix=this.Directix||{});