maz-ui 3.48.1 → 3.48.3
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.
- package/components/MazDialog.mjs +1 -1
- package/components/MazDialogPromise.mjs +1 -1
- package/components/MazPhoneNumberInput/PhoneInput.vue.d.ts +2 -2
- package/components/MazPhoneNumberInput.d.ts +246 -0
- package/components/MazPhoneNumberInput.mjs +1 -1
- package/components/assets/MazDialog.css +1 -1
- package/components/assets/MazDialogPromise.css +1 -1
- package/components/assets/MazPhoneNumberInput.css +1 -1
- package/components/chunks/{MazBtn-Bje1xDu3.mjs → MazBtn-B7cg2yO2.mjs} +2 -2
- package/components/chunks/{MazBtn-DtntHac1.mjs → MazBtn-CuIeT4TK.mjs} +2 -2
- package/components/chunks/{MazBtn-BLSmc1v4.mjs → MazBtn-CvB-Sf2r.mjs} +2 -2
- package/components/chunks/{MazCheckbox-DRltX8fl.mjs → MazCheckbox-DKM-G0Pw.mjs} +1 -1
- package/components/chunks/{MazDialog-BjQ3ivmv.mjs → MazDialog-DQXX2APp.mjs} +2 -2
- package/components/chunks/{MazDialogPromise-Bg3ZOsEI.mjs → MazDialogPromise-CD1d5ig-.mjs} +3 -3
- package/components/chunks/{MazIcon-Cgh-oISK.mjs → MazIcon-BIoDsehI.mjs} +1 -1
- package/components/chunks/{MazPhoneNumberInput-B_f7-FvQ.mjs → MazPhoneNumberInput-ovuoYxd9.mjs} +10 -10
- package/components/chunks/{MazSpinner-PVTrAf5V.mjs → MazSpinner-Bc-lfBcQ.mjs} +1 -1
- package/components/chunks/{MazSpinner-BhfC80rl.mjs → MazSpinner-BqgAfyh1.mjs} +1 -1
- package/components/chunks/{MazSpinner-C47dmUu7.mjs → MazSpinner-Da-bE-KC.mjs} +1 -1
- package/modules/assets/index.css +1 -1
- package/modules/chunks/{MazBtn-BLdEX5rQ.cjs → MazBtn-BXg6oosO.cjs} +1 -1
- package/modules/chunks/{MazBtn-UGfo85SW.mjs → MazBtn-DoDAW5pU.mjs} +2 -2
- package/modules/chunks/{MazIcon-BtffTKMx.mjs → MazIcon-0i0FnfM4.mjs} +1 -1
- package/modules/chunks/{MazIcon-BsMEnmqG.cjs → MazIcon-DPvxTNIQ.cjs} +1 -1
- package/modules/chunks/{MazSpinner-B6NPqEic.mjs → MazSpinner-Bkl2lVff.mjs} +1 -1
- package/modules/chunks/{MazSpinner-NhS66fvh.cjs → MazSpinner-n0cEv2AX.cjs} +1 -1
- package/modules/chunks/{index-BfV9dJfR.mjs → index-Dx2ZhWwj.mjs} +5 -5
- package/modules/chunks/{index-D8y62b_9.cjs → index-pV6oqfJc.cjs} +2 -2
- package/modules/index.cjs +1 -1
- package/modules/index.mjs +1 -1
- package/nuxt/index.json +1 -1
- package/package.json +1 -1
- package/types/components/MazPhoneNumberInput/PhoneInput.vue.d.ts +2 -2
- package/types/components/MazPhoneNumberInput.vue.d.ts +246 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";require('../assets/index.css');var Bt=Object.defineProperty;var Pt=(o,e,t)=>e in o?Bt(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var d=(o,e,t)=>Pt(o,typeof e!="symbol"?e+"":e,t);const n=require("vue");function J(o,e){const t=n.inject(o,e);if(!t)throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${o.toString()}`);return t}function Nt(){return J("aos")}function Mt(o){const e={};for(const[t,s]of Object.entries(o))e[t]=Number.parseInt(s,10);return e}function D(){return typeof document<"u"}function $e(o={}){const{internalWindow:e=D()?window:void 0,initialWidth:t=Number.POSITIVE_INFINITY,initialHeight:s=Number.POSITIVE_INFINITY,includeScrollbar:r=!0}=o,i=n.ref(t),a=n.ref(s);function l(){e&&(r?(i.value=e.innerWidth,a.value=e.innerHeight):(i.value=e.document.documentElement.clientWidth,a.value=e.document.documentElement.clientHeight))}return l(),n.onMounted(()=>{e&&window.addEventListener("resize",l,{passive:!0})}),n.onUnmounted(()=>{e&&window.removeEventListener("resize",l)}),{width:i,height:a}}function $t({initialWidth:o=0,initialHeight:e,includeScrollbar:t,internalWindow:s,listenOrientation:r,breakpoints:i,mediumBreakPoint:a="md",largeBreakPoint:l="lg"}){const{width:u}=$e({initialWidth:o,initialHeight:e,includeScrollbar:t,internalWindow:s,listenOrientation:r}),c=Mt(i),y=n.computed(()=>u.value>=c[l]),E=n.computed(()=>u.value>=c[a]&&u.value<c[l]),b=n.computed(()=>u.value>=0&&u.value<c[a]);return{width:u,numericBreakpoints:c,isSmallScreen:b,isLargeScreen:y,isMediumScreen:E,breakpoints:i}}function Ht(){return J("dialog")}function ze(o,e,t){const s={maxAttempts:20,interval:100,...t};let r=0;function i(){const a=o();a!=null?s.expectedValue!==void 0&&a!==s.expectedValue?r<s.maxAttempts?(r++,setTimeout(i,s.interval)):console.warn(s.errorMessage||`[maz-ui](checkAvailability) Nothing found after ${s.maxAttempts} attempts for ref ${a}`):e(a):r<s.maxAttempts?(r++,setTimeout(i,s.interval)):console.warn(s.errorMessage||`[maz-ui](checkAvailability) Nothing found or expected value after ${s.maxAttempts} attempts for ref ${a}`)}i()}function He(o){const e=n.toValue(o);return Array.isArray(e)?Object.freeze([...e]):typeof e=="object"&&e!==null?Object.freeze({...e}):e}function Se(o){return o==null||typeof o=="string"||typeof o=="number"||typeof o=="boolean"||typeof o=="symbol"||typeof o=="bigint"}function Ft(o,e){if(o.length!==e.length)return!1;for(const[t,s]of o.entries())if(!ee(s,e[t]))return!1;return!0}function jt(o,e){const t=Object.keys(o),s=Object.keys(e);if(t.length!==s.length)return!1;for(const r of t)if(!s.includes(r)||!ee(o[r],e[r]))return!1;return!0}function ee(o,e){return Se(o)||Se(e)?o===e:o instanceof Date&&e instanceof Date?o.getTime()===e.getTime():typeof o!=typeof e||Array.isArray(o)!==Array.isArray(e)?!1:Array.isArray(o)&&Array.isArray(e)?Ft(o,e):typeof o=="object"&&typeof e=="object"?jt(o,e):!1}function qt(o,e,t){const s={};return function(...r){s[o]||(s[o]={timer:null,promise:null});const i=s[o];return i.timer&&clearTimeout(i.timer),i.promise=new Promise((a,l)=>{i.timer=setTimeout(async()=>{try{a(await e(...r))}catch(u){l(u)}finally{delete s[o]}},t)}),i.promise}}function Ut(o,e,t){const s={};return async(...r)=>{const i=Date.now();return s[o]||(s[o]={promise:null,lastCall:0,lastArgs:[]}),i-s[o].lastCall>=t?(s[o].lastCall=i,e(...r)):(s[o].lastArgs=r,s[o].promise||(s[o].promise=new Promise(a=>{setTimeout(async()=>{s[o].lastCall=Date.now();const l=await e(...s[o].lastArgs);s[o].promise=null,a(l)},t-(i-s[o].lastCall))})),s[o].promise)}}const F={mode:"lazy",scrollToErrorSelector:".has-field-error",debounceTime:300,throttleTime:1e3};function Fe(o,e){return Object.keys(e).includes(o)}function xe(o=F.scrollToErrorSelector){const e=document.querySelector(o);e&&e.scrollIntoView({behavior:"smooth",block:"center"})}function Wt(o,e){const t={};for(const[s,r]of Object.entries(o)){const i=r;t[s]=e[s].error&&i[0]?i[0].message:void 0}return t}function Le(o){return o==null||o===""}function Rt({name:o,hasValidation:e,debouncedFields:t,throttledFields:s}){if(!e)return;const r=String(o);if(t!=null&&t[r]&&(s!=null&&s[r]))throw new Error(`The field "${r}" cannot be both debounced and throttled`);return t!=null&&t[r]?qt(r,Q,typeof t[r]=="number"?t[r]:F.debounceTime):s!=null&&s[r]?Ut(r,Q,typeof s[r]=="number"?s[r]:F.throttleTime):Q}function je({name:o,schema:e,initialValue:t,fieldState:s,options:r}){const i=e?Fe(o,e):!1,a=Rt({name:o,hasValidation:i,debouncedFields:r==null?void 0:r.debouncedFields,throttledFields:r==null?void 0:r.throttledFields});return{blurred:!1,dirty:!1,errors:[],error:!1,valid:!i,validating:!1,validated:!1,initialValue:He(t),validateFunction:a,mode:i?(r==null?void 0:r.mode)??(s==null?void 0:s.mode)??F.mode:void 0}}function _t({schema:o,payload:e,options:t}){const s={};for(const r in o){const i=r;s[i]=je({name:i,schema:o,options:t,fieldState:s[i],initialValue:e==null?void 0:e[i]})}return s}function Kt({fieldsStates:o,payload:e,schema:t,options:s,updateMode:r=!1}){for(const i in t){const a=i;o[a]=qe({name:a,fieldState:o[a],payload:e,schema:t,options:s,updateMode:r})}}function qe({name:o,fieldState:e,payload:t,schema:s,options:r,updateMode:i=!0}){const{initialValue:a,mode:l,...u}=je({name:o,schema:s,initialValue:r.defaultValue??t[o],fieldState:e,options:r}),c=i?l??e.mode??F.mode:e.mode;return{...e,initialValue:a,mode:c,...e!=null&&e.mode&&c!==e.mode?u:{}}}function Yt(o){const e={};for(const[t,{errors:s}]of Object.entries(o))e[t]=s;return e}function Zt(o){return o instanceof HTMLInputElement||o instanceof HTMLSelectElement||o instanceof HTMLTextAreaElement?[o]:o.querySelectorAll("input, select, textarea")}function Xt({interactiveElements:o,onBlur:e,mode:t}){o.forEach(s=>{te(["eager","blur","progressive"],t)&&s.addEventListener("blur",e)})}function Gt({interactiveElements:o,onBlur:e}){o.forEach(t=>{t.removeEventListener("blur",e)})}async function Qt(o,e,t){const s=await so(e),i=await(await Re("safeParseAsync"))(s.entries[o],t??"");return{result:i,isValid:i.success}}async function Q({name:o,fieldState:e,schema:t,payload:s,setError:r=!0,setErrorIfInvalidAndNotEmpty:i=!1}){if(await n.nextTick(),e.validating=!0,!t[o]){e.valid=!0,e.validating=!1,e.validated=!0,e.errors=[],e.error=!1;return}const{result:a,isValid:l}=await Qt(o,t,s[o]);e.valid=l,(r||i&&!l&&!Le(s[o]))&&(e.error=!l),e.errors=a.issues??[],e.validating=!1,e.validated=!0}function Ue({name:o,fieldState:e,payload:t,schema:s}){var i;const r={name:o,fieldState:e,payload:t,schema:s,setError:e.mode==="progressive"?e.valid||e.blurred:!0};return(i=e.validateFunction)==null?void 0:i.call(e,r)}function Jt({fieldsStates:o,payload:e,showErrors:t=!0,schema:s}){return Promise.all(Object.keys(o).map(r=>Q({name:r,setError:t,fieldState:o[r],payload:e,schema:s,setErrorIfInvalidAndNotEmpty:o[r].mode==="lazy"})))}function We({eventName:o,fieldState:e,isSubmitted:t}){const{dirty:s,blurred:r,mode:i,valid:a}=e;return o==="blur"&&(te(["lazy","aggressive"],i)||a)||o==="input"&&i==="blur"||!i?!1:t||i==="eager"&&r||i==="blur"&&r||i==="aggressive"&&s||i==="lazy"&&s||i==="progressive"}function eo({name:o,force:e=!1,payload:t,fieldState:s,schema:r,isSubmitted:i}){const a=t[o],l=!Le(a)&&!ee(a,s.initialValue);if(s.dirty=l,s.blurred=s.blurred||(s.mode==="eager"?l:!0),!!(e||We({eventName:"blur",fieldState:s,isSubmitted:i})))return Ue({name:o,fieldState:s,schema:r,payload:t})}function to({name:o,payload:e,fieldState:t,schema:s,isSubmitted:r,forceValidation:i=!1}){const a=e[o];t.validated=!1;const l=!Le(a)&&!ee(a,t.initialValue);if(t.dirty=l,!!(i||We({eventName:"input",fieldState:t,isSubmitted:r})))return Ue({name:o,fieldState:t,schema:s,payload:e})}function Ie(o){const e=n.getCurrentInstance();if(!e)throw new Error(`${o} must be called within setup()`);return e}function oo(o,e){var r;const s=((r=Ie(e).formContexts)==null?void 0:r.get(o))??n.inject(o);if(!s)throw new Error("useFormField must be used within a form (useFormValidator)");return s}function no({ref:o,fieldState:e,onBlur:t}){if(!(o||te(["aggressive","lazy"],e.mode)))return{onBlur:t}}const ye={};async function Re(o){if(ye[o])return ye[o];const e=await Promise.resolve().then(()=>require("./index-CXVZhyjw.cjs"));return ye[o]=e[o],e[o]}async function so(o){return(await Re("objectAsync"))(o)}function te(o,e){return e?o.includes(e):!1}function ro(o,e){const t={formIdentifier:"main-form-validator",...e},{fieldsStates:s,payload:r,options:i,internalSchema:a,errorMessages:l,isSubmitted:u}=oo(t.formIdentifier,"useFormField"),c=Fe(o,a.value)?(e==null?void 0:e.mode)??i.mode:void 0;t.mode=c;const y=n.computed(()=>s.value[o]);if(s.value[o]=qe({name:o,fieldState:y.value,payload:r.value,schema:a.value,options:{...i,...t}}),t.defaultValue!==void 0&&!ee(r.value[o],t.defaultValue)){const h=t.defaultValue;r.value[o]=h,s.value[o].initialValue=He(h)}c&&Q({name:o,fieldState:y.value,payload:r.value,schema:a.value,setError:c==="aggressive",setErrorIfInvalidAndNotEmpty:c==="lazy"});function E(){eo({name:o,fieldState:y.value,payload:r.value,schema:a.value,isSubmitted:u.value})}const b=n.computed(()=>no({ref:t.ref,onBlur:E,fieldState:y.value}));if(t.ref&&te(["eager","blur","progressive"],c)){let h=[];const T=k=>{h=Zt(k),Xt({interactiveElements:h,onBlur:E,mode:c})};n.onMounted(()=>{const k=Ie(`useFormField of ${o}`);ze(()=>k.refs[t.ref],f=>{const m=f instanceof HTMLElement?f:f==null?void 0:f.$el;m&&T(m)},{errorMessage:`[maz-ui](useFormField) No element found for ref ${t.ref} for field ${o}`})}),n.onUnmounted(()=>{Gt({interactiveElements:h,onBlur:E})})}return{hasError:n.computed(()=>y.value.error),errors:n.computed(()=>y.value.errors),errorMessage:n.computed(()=>l.value[o]),isValid:n.computed(()=>y.value.valid),isDirty:n.computed(()=>y.value.dirty),isBlurred:n.computed(()=>y.value.blurred),isValidated:n.computed(()=>y.value.validated),isValidating:n.computed(()=>y.value.validating),mode:n.computed(()=>y.value.mode),value:n.computed({get:()=>r.value[o],set:h=>r.value[o]=h}),validationEvents:b,onBlur:E}}function io({schema:o,defaultValues:e,model:t,options:s}){const r=Ie("useFormValidator"),i={mode:F.mode,scrollToError:F.scrollToErrorSelector,debouncedFields:null,throttledFields:null,identifier:"main-form-validator",...s},a=n.ref(e),l=n.ref({...a.value,...t==null?void 0:t.value}),u=n.ref(o),c=n.ref(_t({schema:u.value,payload:l.value,options:i})),y=n.ref(!1),E=n.ref(!1),b=n.computed(()=>Object.values(c.value).every(({valid:C})=>C)),h=n.computed(()=>Object.values(c.value).some(({dirty:C})=>C)),T=n.computed(()=>Yt(c.value)),k=n.computed(()=>Wt(T.value,c.value));t&&n.watch(l,C=>{t.value={...a.value,...C}},{deep:!0}),n.watch(a,C=>{l.value={...C,...l.value}},{deep:!0}),n.watch(u,C=>{Kt({schema:C,fieldsStates:c.value,payload:l.value,options:i}),f()},{deep:!0}),f();function f(C=i.mode==="aggressive"){return Jt({fieldsStates:c.value,payload:l.value,schema:u.value,showErrors:C})}const m=[];async function z(C){await n.nextTick();const x=n.watch(()=>l.value[C],()=>{const B=c.value[C];to({name:C,fieldState:B,payload:l.value,schema:u.value,isSubmitted:E.value,forceValidation:te(["aggressive","lazy","progressive"],B.mode)})},{deep:typeof u.value[C]=="object"});m.push(x)}function p(){for(const C of m)C();for(const C of Object.keys(u.value))z(C)}function I(C,x){return async B=>{if(B==null||B.preventDefault(),!y.value){E.value=!0,y.value=!0;try{await f(!0);const j=typeof x=="string"?x:i.scrollToError;let H;return b.value?H=await C(l.value):typeof j!="boolean"&&xe(j),y.value=!1,H}finally{y.value=!1}}}}const S={fieldsStates:c,payload:l,options:i,internalSchema:u,errorMessages:k,isSubmitted:E};return r.formContexts??(r.formContexts=new Map),r.formContexts.set(i.identifier,S),n.provide(i.identifier,S),p(),{identifier:i.identifier,isDirty:h,isSubmitting:y,isSubmitted:E,isValid:b,errors:T,model:l,fieldsStates:c,validateForm:f,scrollToError:xe,handleSubmit:I,errorMessages:k}}class _e{constructor(e,t){d(this,"defaultOptions",{element:void 0,timeout:60*1e3*5,once:!1,immediate:!0});d(this,"options");d(this,"timeoutHandler");d(this,"isIdle",!1);d(this,"isDestroy",!1);d(this,"startTime",0);d(this,"remainingTime",0);d(this,"lastClientX",-1);d(this,"lastClientY",-1);d(this,"eventNames",["DOMMouseScroll","mousedown","mousemove","mousewheel","MSPointerDown","MSPointerMove","keydown","touchmove","touchstart","wheel","click"]);d(this,"handleEvent",e=>{try{if(this.remainingTime>0)return;if(e.type==="mousemove"){const{clientX:t,clientY:s}=e;if(t===void 0&&s===void 0||t===this.lastClientX&&s===this.lastClientY)return;this.lastClientX=t,this.lastClientY=s}this.resetTimeout(),this.callback({isIdle:this.isIdle,eventType:e.type,instance:this})}catch(t){throw new Error(`[IdleTimeout](handleEvent) ${t}`)}});this.callback=e,this.options={...this.defaultOptions,...t},D()&&this.start()}get element(){return this.options.element??document.body}start(){if(!D()){console.warn("[IdleTimeout](start) you should run this method on client side");return}for(const e of this.eventNames)this.element.addEventListener(e,this.handleEvent);this.resetTimeout(),this.options.immediate&&this.callback({isIdle:!1,instance:this})}pause(){const e=this.startTime+this.options.timeout-Date.now();e<=0||(this.remainingTime=e,this.timeoutHandler&&(clearTimeout(this.timeoutHandler),this.timeoutHandler=void 0))}resume(){this.remainingTime<=0||(this.resetTimeout(),this.callback({isIdle:this.isIdle,instance:this}),this.remainingTime=0)}reset(){this.isDestroy=!1,this.isIdle=!1,this.remainingTime=0,this.resetTimeout(),this.callback({isIdle:this.isIdle,instance:this})}destroy(){if(!D()){console.warn("[IdleTimeout](destroy) you should run this method on client side");return}this.isDestroy=!0;for(const e of this.eventNames)this.element.removeEventListener(e,this.handleEvent);this.timeoutHandler&&clearTimeout(this.timeoutHandler)}resetTimeout(){this.isIdle=!1,this.timeoutHandler&&(clearTimeout(this.timeoutHandler),this.timeoutHandler=void 0),this.timeoutHandler=setTimeout(this.handleTimeout.bind(this),this.remainingTime||this.options.timeout),this.startTime=Date.now()}handleTimeout(){this.isIdle=!0,this.callback({isIdle:this.isIdle,instance:this}),this.options.once&&this.destroy()}get destroyed(){return this.isDestroy}get timeout(){return this.options.timeout}set timeout(e){this.options.timeout=e}get idle(){return this.isIdle}set idle(e){e?this.handleTimeout():this.reset(),this.callback({isIdle:this.isIdle,instance:this})}}function ao({callback:o,options:e}){return new _e(o,e)}function lo({componentName:o,providedId:e}){return n.computed(()=>e??`${o}-${n.useId().replace(/:/g,"")}`)}const uo=["af-ZA","sq-AL","ar-DZ","ar-BH","ar-EG","ar-IQ","ar-JO","ar-KW","ar-LB","ar-LY","ar-MA","ar-OM","ar-QA","ar-SA","ar-SY","ar-TN","ar-AE","ar-YE","hy-AM","Cy-az-AZ","Lt-az-AZ","eu-ES","be-BY","bg-BG","ca-ES","zh-CN","zh-HK","zh-MO","zh-SG","zh-TW","zh-CHS","zh-CHT","hr-HR","cs-CZ","da-DK","div-MV","nl-BE","nl-NL","en-AU","en-BZ","en-CA","en-CB","en-IE","en-JM","en-NZ","en-PH","en-ZA","en-TT","en-GB","en-US","en-ZW","et-EE","fo-FO","fa-IR","fi-FI","fr-BE","fr-CA","fr-FR","fr-LU","fr-MC","fr-CH","gl-ES","ka-GE","de-AT","de-DE","de-LI","de-LU","de-CH","el-GR","gu-IN","he-IL","hi-IN","hu-HU","is-IS","id-ID","it-IT","it-CH","ja-JP","kn-IN","kk-KZ","kok-IN","ko-KR","ky-KZ","lv-LV","lt-LT","mk-MK","ms-BN","ms-MY","mr-IN","mn-MN","nb-NO","nn-NO","pl-PL","pt-BR","pt-PT","pa-IN","ro-RO","ru-RU","sa-IN","Cy-sr-SP","Lt-sr-SP","sk-SK","sl-SI","es-AR","es-BO","es-CL","es-CO","es-CR","es-DO","es-EC","es-SV","es-GT","es-HN","es-MX","es-NI","es-PA","es-PY","es-PE","es-PR","es-ES","es-UY","es-VE","sw-KE","sv-FI","sv-SE","syr-SY","ta-IN","tt-RU","te-IN","th-TH","tr-TR","uk-UA","ur-PK","Cy-uz-UZ","Lt-uz-UZ","vi-VN"],Ke=["aa","ab","ae","af","ak","am","an","ar","as","av","ay","az","ba","be","bg","bh","bi","bm","bn","bo","br","bs","ca","ce","ch","co","cr","cs","cu","cv","cy","da","de","dv","dz","ee","el","en","eo","es","et","eu","fa","ff","fi","fj","fo","fr","fy","ga","gd","gl","gn","gu","gv","ha","he","hi","ho","hr","ht","hu","hy","hz","ia","id","ie","ig","ii","ik","io","is","it","iu","ja","jv","ka","kg","ki","kj","kk","kl","km","kn","ko","kr","ks","ku","kv","kw","ky","la","lb","lg","li","ln","lo","lt","lu","lv","mg","mh","mi","mk","ml","mn","mr","ms","mt","my","na","nb","nd","ne","ng","nl","nn","no","nr","nv","ny","oc","oj","om","or","os","pa","pi","pl","ps","pt","qu","rm","rn","ro","ru","rw","sa","sc","sd","se","sg","si","sk","sl","sm","sn","so","sq","sr","ss","st","su","sv","sw","ta","te","tg","th","ti","tk","tl","tn","to","tr","ts","tt","tw","ty","ug","uk","ur","uz","ve","vi","vo","wa","wo","xh","yi","yo","za","zh","zu"],Ye=[...Ke,...uo];let P;function Oe(o,e){return!o||(o==null?void 0:o.toLocaleLowerCase())===e.toLocaleLowerCase()}function co(o){function e(s,r){return n.computed(()=>{const i=n.toValue(r),a=n.toValue(s);try{if(!i||!a)return a;(!P||i!==P.resolvedOptions().locale)&&(P=new Intl.DisplayNames([i],{type:"language"}));const l=P.of(a);return!l||Oe(l,a)?void 0:l}catch{return a}})}function t(s){return n.computed(()=>{const r=n.toValue(s);return r?((!P||r!==P.resolvedOptions().locale)&&(P=new Intl.DisplayNames([r],{type:"language"})),Ye.map(i=>{try{const a=P==null?void 0:P.of(i);return!a||Oe(a,i)?void 0:{language:a,code:i}}catch{return}}).filter(Boolean)):[]})}return{getLanguageDisplayName:({code:s,locale:r})=>e(s,r||o),getAllLanguageDisplayNames:s=>t(s||o)}}function Ze(o){const e=o.join(", ").match(/\b\w+\b/g);return e?e.length:0}function mo(o,e=150){const t=Ze([o]);return Math.ceil(t/e)}function fo(o){const e=n.computed(()=>{var a;return typeof o.velocity=="number"?o.velocity:((a=o.velocity)==null?void 0:a.value)??150}),t=n.computed(()=>{var a;return typeof o.contentSelector=="string"?o.contentSelector:(a=o.contentSelector)==null?void 0:a.value}),s=n.computed(()=>{var a,l,u;if(typeof((a=o.contentRef)==null?void 0:a.value)=="object")return(l=o.contentRef.value)==null?void 0:l.textContent;if(t.value&&typeof document<"u"){const c=document.querySelector(t.value);if(c)return c.textContent}return typeof o.content=="string"?o.content:(u=o.content)==null?void 0:u.value}),r=n.computed(()=>mo(s.value,e.value)),i=n.computed(()=>Ze([s.value]));return{content:s,wordCount:i,velocity:e,duration:r}}const ho={removeAccents:!0,caseSensitive:!1,replaceSpaces:!0,removeSpecialCharacters:!1,trim:!0,normalizeSpaces:!0,removeNumbers:!1,customNormalizationForms:["NFC","NFKD"]};function Ee(o,e){const t={...ho,...e},s={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Î:"I",Ï:"I",í:"I",î:"i",ï:"i",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ç:"C",ç:"c",ÿ:"y",Ñ:"N",ñ:"n",ó:"o"};let r=o.toString();if(t.trim&&(r=r.trim()),t.normalizeSpaces&&(r=r.replaceAll(/\s+/g," ")),t.replaceSpaces&&(r=r.replaceAll(" ","-")),t.removeNumbers&&(r=r.replaceAll(/\d/g,"")),t.removeAccents&&(r=r.replaceAll(/[ÀÁÂÃÄÅÇÈÉÊËÎÏÑÔÕÖØÙÚÛÜàáâãäåçèéêëíîïñóôõöøùúûüÿ]/g,i=>s[i]||i),r=r.replaceAll(/[\u0300-\u036F]/g,"")),t.caseSensitive===!1&&(r=r.toLowerCase()),t.removeSpecialCharacters&&(r=r.replaceAll(/[^\dA-Z-]/gi,"")),t.trim&&(r=r.trim()),t.customNormalizationForms)for(const i of t.customNormalizationForms)r=r.normalize(i);return r}function vo(o,e){const t=o.length,s=e.length,r=[];for(let i=0;i<=t;i++)r[i]=[i];for(let i=0;i<=s;i++)r[0][i]=i;for(let i=1;i<=t;i++)for(let a=1;a<=s;a++){const l=o[i-1]===e[a-1]?0:1;r[i][a]=Math.min(r[i-1][a]+1,r[i][a-1]+1,r[i-1][a-1]+l)}return r[t][s]}function Xe(o,e){const t=vo(o,e),s=Math.max(o.length,e.length);return 1-t/s}function po(o,e,t=.75){return Xe(o,e)>=t}function go(o,e,t=.75){const s=n.computed(()=>Ee(typeof o=="string"?o:o.value)),r=n.computed(()=>Ee(typeof e=="string"?e:e.value)),i=n.computed(()=>typeof t=="number"?t:t.value),a=n.computed(()=>Xe(s.value,r.value));return{isMatching:n.computed(()=>po(s.value,r.value,i.value)),score:a}}const yo={preventDefaultOnTouchMove:!1,preventDefaultOnMouseWheel:!1,threshold:50,immediate:!1,triggerOnEnd:!1};class Ge{constructor(e){d(this,"element");d(this,"xStart");d(this,"yStart");d(this,"xEnd");d(this,"yEnd");d(this,"xDiff");d(this,"yDiff");d(this,"onToucheStartCallback");d(this,"onToucheMoveCallback");d(this,"onToucheEndCallback");d(this,"onMouseWheelCallback");d(this,"start");d(this,"stop");d(this,"options");this.inputOption=e,this.options={...yo,...e},this.onToucheStartCallback=this.toucheStartHandler.bind(this),this.onToucheMoveCallback=this.handleTouchMove.bind(this),this.onToucheEndCallback=this.handleTouchEnd.bind(this),this.onMouseWheelCallback=this.handleMouseWheel.bind(this),this.start=this.startListening.bind(this),this.stop=this.stopListening.bind(this),this.options.element&&this.setElement(this.options.element),this.options.immediate&&this.start()}startListening(){this.setElement(this.options.element),this.element.addEventListener("touchstart",this.onToucheStartCallback,{passive:!0}),this.element.addEventListener("touchmove",this.onToucheMoveCallback,{passive:!0}),this.options.triggerOnEnd&&this.element.addEventListener("touchend",this.onToucheEndCallback,{passive:!0}),this.options.preventDefaultOnMouseWheel&&this.element.addEventListener("mousewheel",this.onMouseWheelCallback,{passive:!1})}stopListening(){this.element.removeEventListener("touchstart",this.onToucheStartCallback),this.element.removeEventListener("touchmove",this.onToucheMoveCallback),this.element.removeEventListener("touchend",this.onToucheEndCallback),this.options.preventDefaultOnMouseWheel&&this.element.removeEventListener("mousewheel",this.onMouseWheelCallback)}setElement(e){if(!e){console.error("[maz-ui][SwipeHandler](setElement) Element should be provided. Its can be a string selector or an HTMLElement");return}if(typeof e=="string"){const t=document.querySelector(e);if(!(t instanceof HTMLElement)){console.error("[maz-ui][SwipeHandler](setElement) String selector for element is not found");return}this.element=t}else this.element=e}handleMouseWheel(e){e.preventDefault()}toucheStartHandler(e){this.xStart=e.touches[0].clientX,this.yStart=e.touches[0].clientY,this.emitValuesChanged()}emitValuesChanged(){var e,t;(t=(e=this.options).onValuesChanged)==null||t.call(e,{xStart:this.xStart,yStart:this.yStart,xEnd:this.xEnd,yEnd:this.yEnd,xDiff:this.xDiff,yDiff:this.yDiff})}handleTouchMove(e){this.options.preventDefaultOnTouchMove&&e.cancelable&&e.preventDefault(),this.xEnd=e.touches[0].clientX,this.yEnd=e.touches[0].clientY,!(!this.xStart||!this.yStart)&&(this.xDiff=this.xStart-this.xEnd,this.yDiff=this.yStart-this.yEnd,this.emitValuesChanged(),this.options.triggerOnEnd||this.runCallbacks(e))}handleTouchEnd(e){this.runCallbacks(e),this.emitValuesChanged()}runCallbacks(e){var t,s,r,i,a,l,u,c;typeof this.xDiff!="number"||typeof this.yDiff!="number"||Math.abs(this.xDiff)<this.options.threshold&&Math.abs(this.yDiff)<this.options.threshold||(Math.abs(this.xDiff)>Math.abs(this.yDiff)?this.xDiff>0?(s=(t=this.options).onLeft)==null||s.call(t,e):(i=(r=this.options).onRight)==null||i.call(r,e):this.yDiff>0?(l=(a=this.options).onUp)==null||l.call(a,e):(c=(u=this.options).onDown)==null||c.call(u,e),this.resetValues())}resetValues(){this.xStart=void 0,this.yStart=void 0,this.xEnd=void 0,this.yEnd=void 0,this.xDiff=void 0,this.yDiff=void 0,this.emitValuesChanged()}}function bo(o){const e=n.ref(),t=n.ref(),s=n.ref(),r=n.ref(),i=n.ref(),a=n.ref(),l=n.computed(()=>n.toValue(o.element)),u=new Ge({...o,element:l.value,onValuesChanged(c){e.value=c.xDiff,t.value=c.yDiff,s.value=c.xStart,r.value=c.xEnd,i.value=c.yStart,a.value=c.yEnd}});return{xDiff:e,yDiff:t,xStart:s,xEnd:r,yStart:i,yEnd:a,start:()=>{l.value&&(u.options.element=l.value),u.start()},stop:u.stop}}const wo={darkClass:"dark",lightClass:"light",storageThemeKey:"theme",storageThemeValueDark:"dark",storageThemeValueLight:"light",storageThemeValueSystem:"system",watchChanges:!0},oe=n.ref("system"),$=n.ref("system");function Ve(){return window.matchMedia("(prefers-color-scheme: dark)").matches}function ne({darkClass:o,lightClass:e,storageThemeKey:t,storageThemeValueDark:s,setLocalStorageValue:r=!0,setSelectedTheme:i=!0}){D()&&(document.documentElement.classList.remove(e),document.documentElement.classList.add(o),oe.value=s,i&&($.value=s),r&&(localStorage[t]=s))}function se({darkClass:o,lightClass:e,storageThemeKey:t,storageThemeValueLight:s,setLocalStorageValue:r=!0,setSelectedTheme:i=!0}){D()&&(document.documentElement.classList.remove(o),document.documentElement.classList.add(e),oe.value=s,i&&($.value=s),r&&(localStorage[t]=s))}function Qe({setLocalStorageValue:o=!0,...e}){if(D())return document.documentElement.classList.remove(e.darkClass),document.documentElement.classList.remove(e.lightClass),oe.value=e.storageThemeValueSystem,$.value=e.storageThemeValueSystem,o&&(localStorage[e.storageThemeKey]=e.storageThemeValueSystem),ke(e)}function Je(o){if(!o.defaultTheme)return console.error("[maz-ui](useThemeHandler) No default theme set");if(!["light","dark"].includes(o.defaultTheme))return console.error('[maz-ui](useThemeHandler) Default theme must be "light" or "dark"');switch(o.defaultTheme){case"dark":return ne({...o,setLocalStorageValue:!1,setSelectedTheme:!0});case"light":return se({...o,setLocalStorageValue:!1,setSelectedTheme:!0})}}function ke(o){return D()?!localStorage[o.storageThemeKey]&&o.defaultTheme?Je(o):localStorage[o.storageThemeKey]===o.storageThemeValueDark||!localStorage[o.storageThemeKey]&&Ve()||localStorage[o.storageThemeKey]===o.storageThemeValueSystem&&Ve()?ne({...o,setLocalStorageValue:!1,setSelectedTheme:!1}):se({...o,setLocalStorageValue:!1,setSelectedTheme:!1}):void 0}function be({theme:o,...e}){return o==="system"?Qe(e):o==="dark"?ne(e):se(e)}function Eo(o){return oe.value===o.storageThemeValueDark?se(o):ne(o)}function ko(o){const e={...wo,...o};function t(){ke(e)}return n.onMounted(()=>{localStorage[e.storageThemeKey]&&($.value=localStorage[e.storageThemeKey]),e.watchChanges&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t)}),n.onBeforeUnmount(()=>{e.watchChanges&&window.matchMedia("(prefers-color-scheme: dark)").removeEventListener("change",t)}),n.watch($,s=>{switch(localStorage[e.storageThemeKey]=s,s){case e.storageThemeValueDark:{ne(e);break}case e.storageThemeValueLight:{se(e);break}case e.storageThemeValueSystem:{Qe(e);break}}}),{autoSetTheme:()=>ke(e),toggleTheme:()=>Eo(e),setSystemTheme:()=>be({...e,theme:"system"}),setDarkTheme:()=>be({...e,theme:"dark"}),setLightTheme:()=>be({...e,theme:"light"}),setDefaultTheme:()=>Je(e),hasDarkTheme:n.computed(()=>$.value===e.storageThemeValueDark),hasLightTheme:n.computed(()=>$.value===e.storageThemeValueLight),hasSystemTheme:n.computed(()=>$.value===e.storageThemeValueSystem),theme:oe,selectedTheme:$}}function et({timeout:o=1e3,callback:e,remainingTimeUpdate:t=200,callbackOffsetTime:s=0}){const r=n.ref(o),i=n.ref(o);let a;function l(b){typeof b=="number"&&(i.value=b),typeof b=="number"&&(r.value=b),u()}function u(){a||(a=setInterval(()=>{i.value-=t,i.value<=0&&(E(),setTimeout(()=>e==null?void 0:e(),s))},t))}function c(){a&&(clearInterval(a),a=void 0)}function y(){!a&&i.value>0&&u()}function E(){setTimeout(()=>i.value=r.value,s*2),c()}return{remainingTime:i,start:l,pause:c,resume:y,stop:E}}function Co(){return J("toast")}class tt{constructor(e,t){d(this,"eventHandlerFunction");d(this,"event","visibilitychange");d(this,"timeoutHandler");d(this,"options");d(this,"defaultOptions",{timeout:5e3,once:!1,immediate:!0});d(this,"isVisible",!1);this.callback=e,this.options={...this.defaultOptions,...t},this.eventHandlerFunction=this.eventHandler.bind(this),D()&&this.start()}start(){if(!D()){console.warn("[UserVisibility](start) you should run this method on client side");return}this.options.immediate&&this.emitCallback(),this.addEventListener()}emitCallback(){this.isVisible=document.visibilityState==="visible",this.callback({isVisible:this.isVisible}),this.options.once&&this.destroy()}eventHandler(){document.visibilityState==="visible"&&!this.isVisible?(this.clearTimeout(),this.emitCallback()):document.visibilityState==="hidden"&&this.initTimeout()}clearTimeout(){this.timeoutHandler&&(clearTimeout(this.timeoutHandler),this.timeoutHandler=void 0)}initTimeout(){this.clearTimeout(),this.timeoutHandler=setTimeout(this.emitCallback.bind(this),this.options.timeout)}addEventListener(){document.addEventListener(this.event,this.eventHandlerFunction)}removeEventListener(){document.removeEventListener(this.event,this.eventHandlerFunction)}destroy(){this.removeEventListener(),this.timeoutHandler&&clearTimeout(this.timeoutHandler)}}function To({callback:o,options:e}){return new tt(o,e)}function zo(){return J("wait")}const me="__maz-click-outside__";function ot(){return document.ontouchstart===null?"touchstart":"click"}async function nt(o,e){try{st(o);const t=e.instance,s=e.value,r=typeof s=="function";if(!r)throw new Error("[maz-ui](vClickOutside) the callback should be a function");await n.nextTick(),o[me]=a=>{if((!o||a.target&&!o.contains(a.target))&&s&&r)return s.call(t,a)};const i=ot();document.addEventListener(i,o[me],{passive:!0})}catch(t){console.error("[maz-ui](vClickOutside)",t)}}function st(o){try{const e=ot();document.removeEventListener(e,o[me],!1),delete o[me]}catch(e){console.error("[maz-ui](vClickOutside)",e)}}function Lo(o,e){try{if(e.value===e.oldValue)return;nt(o,e)}catch(t){console.error("[maz-ui](vClickOutside)",t)}}const rt={mounted:nt,updated:Lo,unmounted:st},it={install:o=>{o.directive("click-outside",rt)}};function at(o,e,t){var a,l;o.stopPropagation();const s=typeof t.value=="function"?t.value:t.value.handler,r=typeof t.value=="object"?t.value.exclude:void 0;let i=!1;if(r&&r.length>0){for(const u of r)if(!i&&o.target instanceof HTMLElement){const c=(a=document.querySelector(u))==null?void 0:a.getAttribute("id");i=(o.target.getAttribute("id")===c||((l=document.querySelector(u))==null?void 0:l.contains(o.target)))??!1}}!e.contains(o.target)&&!i&&(s==null||s(o))}function lt(){return document.ontouchstart===null?"touchstart":"click"}function Io(o,e){const t=lt();document.removeEventListener(t,s=>at(s,o,e))}function Ao(o,e){if(typeof e.value!="function"&&typeof e.value=="object"&&typeof e.value.handler!="function"){console.error("[maz-ui](vClosable) v-closable directive requires a handler function");return}const t=lt();document.addEventListener(t,s=>at(s,o,e))}const ut={mounted:Ao,unmounted:Io},ct={install:o=>{o.directive("closable",ut)}},Ce={position:"top"};class dt{constructor(e={}){d(this,"options");this.options={...Ce,...e}}getPosition({modifiers:e,value:t}){return e.top?"top":e.bottom?"bottom":e.left?"left":e.right?"right":typeof t=="string"?"top":t.position??this.options.position}getText({value:e}){return typeof e=="string"?e:e.text}getOpen({value:e}){return typeof e=="string"?!1:e.open??!1}getColor({value:e}){return typeof e=="string"?"default":e.color??"default"}getOffset({value:e}){return typeof e=="string"?"1rem":e.offset??"1rem"}create(e,t){e.setAttribute("data-tooltip",this.getText(t));const s=this.getOffset(t);s&&e.style.setProperty("--tooltip-offset",s),e.classList.add("m-tooltip");const r=this.getPosition(t);e.classList.add(`m-tooltip--${r}`),e.classList.add(`m-tooltip--${this.getColor(t)}`),this.getOpen(t)&&e.classList.add("m-tooltip--open")}update(e,t){this.remove(e,t),this.create(e,t)}remove(e,t){e.removeAttribute("data-tooltip"),e.classList.remove("m-tooltip"),e.classList.remove("m-tooltip--top"),e.classList.remove("m-tooltip--bottom"),e.classList.remove("m-tooltip--left"),e.classList.remove("m-tooltip--right"),e.classList.remove("m-tooltip--open"),e.classList.remove(`m-tooltip--${this.getColor(t)}`)}}let le;const So={beforeMount(o,e){const t=typeof e.value=="object"?e.value:{};return le=new dt(t),le.create(o,e)},updated(o,e){return le.update(o,e)},unmounted(o,e){return le.remove(o,e)}},mt={install:(o,e=Ce)=>{const t={...Ce,...e},s=new dt(t);o.directive("tooltip",{beforeMount:s.create.bind(s),updated:s.update.bind(s),unmounted:s.remove.bind(s)})}};function fe(o,e){let t=e==null?void 0:e.element;function s(){t&&n.render(null,t)}const r={...e==null?void 0:e.props,...e!=null&&e.addDestroyInProps?{destroy:s}:{}},i=n.createVNode(o,r,e==null?void 0:e.children);return e!=null&&e.app?(i.appContext=e.app._context,t?n.render(i,t):typeof document<"u"&&(t=document.createElement("div"),n.render(i,t))):(t=t??document.body,n.render(i,t)),{vNode:i,destroy:s,el:t}}function ft(o){return!!o}function xo(o){return[...o].map(e=>{const t=e.codePointAt(0);return t?t%32+127461:void 0}).filter(ft).map(e=>String.fromCodePoint(e)).join("")}function Oo(o,e){let t;return function(...s){clearTimeout(t),t=setTimeout(()=>{o.apply(this,s)},e)}}class Vo{constructor({src:e,identifier:t,once:s=!0,async:r=!0,defer:i=!0}){d(this,"src");d(this,"script");d(this,"once");d(this,"async");d(this,"defer");d(this,"identifier");if(typeof window>"u")throw new TypeError("[ScriptLoader]: Is supported only on browser side");if(!e)throw new Error('[ScriptLoader]: You should provide the attribut "src"');if(!t)throw new Error('[ScriptLoader]: You should provide the attribut "identifier"');this.src=e,this.identifier=t,this.once=s,this.async=r,this.defer=i}removeTag(e){var t;typeof e=="string"?(t=document.head.querySelector(`[data-identifier="${e}"]`))==null||t.remove():e.remove()}load(){const e=window,t=document.head.querySelectorAll(`[data-identifier="${this.identifier}"]`);if(this.once&&e[this.identifier]&&t.length>0)return this.script=e[this.identifier],Promise.resolve(this.script);if(!this.once&&t.length>0)for(const s of t)this.removeTag(s);return this.injectScript()}injectScript(){const e=window;return new Promise((t,s)=>{try{const r=document.createElement("script");r.src=this.src,r.async=this.async,r.defer=this.defer,r.dataset.identifier=this.identifier,r.addEventListener("error",i=>s(new Error(`[ScriptLoader](injectScript) ${i.message}`))),r.addEventListener("load",i=>(this.script=i,e[this.identifier]=i,t(i))),document.head.append(r)}catch(r){throw new Error(`[ScriptLoader](init) ${r}`)}})}}function ht(o){return new Promise(e=>setTimeout(e,o))}function Do(o,e){let t=!1,s,r;return function(...i){t?(clearTimeout(s),s=setTimeout(()=>{Date.now()-r>=e&&(o.apply(this,i),r=Date.now())},Math.max(e-(Date.now()-r),0))):(o.apply(this,i),r=Date.now(),t=!0)}}const Bo=["onKeypress"],Po={class:"m-fullscreen-img-scroller"},No=["src","alt"],Mo=n.defineComponent({__name:"MazFullscreenImg",props:{src:{},clickedElementBounds:{default:void 0},offset:{default:void 0},animation:{default:()=>({duration:300,easing:"ease-in-out"})},openInstanceClass:{default:"m-fullscreen-img-instance"},clickedElement:{},destroy:{type:Function,default:void 0},alt:{default:void 0},zoom:{type:Boolean,default:!0}},emits:["close","previous","next","before-close"],setup(o,{emit:e}){const t=o,s=e,r=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./MazSpinner-NhS66fvh.cjs"))),i=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./x-mark-DW2WXkoF.cjs"))),a=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./chevron-left-Byr9GkwI.cjs"))),l=n.ref(!1),u=n.ref(!1),c=n.ref(!1),y=n.ref(!1),E=n.ref(!1),b=n.reactive({running:!1,ended:!1}),h=n.ref(t.clickedElement),T=n.computed(()=>t.clickedElement.getBoundingClientRect()),k=n.ref(),f=n.ref(t.src),m=n.ref(t.alt),z=n.ref(),p=n.ref(),I=n.ref(!0),S=n.computed(()=>({"--is-zoomed":E.value,"--invisible":I.value,"--absolute":!E.value}));function C(){var g,w;p.value&&(k.value=((g=p.value)==null?void 0:g.naturalWidth)>((w=p.value)==null?void 0:w.naturalHeight)),l.value=!0,u.value=!1,c.value=!0}n.watch(c,g=>{g&&A()},{immediate:!0});function x(){s("before-close"),O()}function B(g){g.key==="Escape"&&(g.preventDefault(),x()),(g.key==="ArrowLeft"||g.key==="ArrowRight")&&(g.preventDefault(),Y(g.key==="ArrowRight"?"next":"previous"))}function j(){document.documentElement.classList.add("--m-fullscreen-open")}function H(){document.documentElement.classList.remove("--m-fullscreen-open")}function _(){return[...document.querySelectorAll(".m-fullscreen-img-instance")]}function he(g,w){return w<0?g.length-1:w>=g.length?0:w}function K(g,w){g.classList.remove(t.openInstanceClass),w.classList.add(t.openInstanceClass);const L=w.getAttribute("data-src"),V=w.getAttribute("data-alt");m.value=V,f.value=L??f.value}function Y(g){I.value=!0;const w=document.querySelector(`.m-fullscreen-img-instance.${t.openInstanceClass}`);if(w){const L=_(),V=L.indexOf(w),N=g==="next"?V+1:V-1,M=L[he(L,N)];h.value=M,M&&K(w,M),s(g),l.value=!1,u.value=!0,ze(()=>l.value===!0,()=>{I.value=!1,E.value?Z():v()},{expectedValue:!0,interval:100,maxAttempts:50})}}function Z(){const g=p.value;if(!g){console.error("[maz-ui](vFullscreenImg) ImgElement is not defined");return}g.style.removeProperty("max-width"),g.style.removeProperty("max-height"),g==null||g.style.removeProperty("top"),g==null||g.style.removeProperty("left"),k.value?(g.style.height="100vh",g.style.removeProperty("width")):(g.style.width="100vw",g.style.removeProperty("height"))}function ve(){E.value?(E.value=!E.value,v()):(E.value=!E.value,Z())}function q(g){var L;b.running=!0,I.value=!1;const w=(L=p.value)==null?void 0:L.animate(g,{duration:t.animation.duration,easing:t.animation.easing});if(!w){console.error("[maz-ui](vFullscreenImg) animation is not defined"),b.running=!1,b.ended=!0;return}return w}function ie(g=t.offset??0){const w=h.value.clientWidth||1,L=h.value.clientHeight||1,V=window.innerWidth,N=window.innerHeight,M=Math.min((V-2*g)/w,(N-2*g)/L),pe=(V-w*M)/2,ge=(N-L*M)/2;return{centerX:pe,centerY:ge,width:w,height:L,scale:M}}function ae({trigger:g}){const{width:w,height:L,scale:V,centerX:N,centerY:M}=ie(),{top:pe,left:ge,width:Vt,height:Dt}=T.value,Ae=[{top:`${pe}px`,left:`${ge}px`,width:`${Vt}px`,height:`${Dt}px`,opacity:0},{top:`${M}px`,left:`${N}px`,width:`${w*V}px`,height:`${L*V}px`,opacity:1}];return{frames:g==="open"?Ae:Ae.reverse()}}function v(){const{height:g,width:w,scale:L}=ie(),V=k.value?{width:`${w*L}px`,maxHeight:`${g*L}px`}:{height:`${g*L}px`,maxWidth:`${w*L}px`};if(!p.value){console.error("[maz-ui](vFullscreenImg) ImgElement is not defined");return}k.value?(p.value.style.removeProperty("height"),p.value.style.removeProperty("maxHeight")):(p.value.style.removeProperty("width"),p.value.style.removeProperty("maxWidth")),Object.assign(p.value.style,V)}function A(){const{frames:g}=ae({trigger:"open"}),w=q(g);if(!w){console.error("[maz-ui](vFullscreenImg) open animation is not defined"),v();return}w.onfinish=()=>{v(),b.running=!1,b.ended=!0}}function O(){const{frames:g}=ae({trigger:"close"}),w=q(g);function L(){var V,N;s("close"),(V=z.value)==null||V.remove(),(N=t.destroy)==null||N.call(t),b.running=!1,b.ended=!0}if(!w){console.error("[maz-ui](vFullscreenImg) close animation is not defined"),L();return}w.onfinish=L}function X(){E.value||v()}return n.onMounted(()=>{u.value=!0,document.addEventListener("keydown",B),window.addEventListener("resize",X),j(),y.value=_().length>1}),n.onBeforeUnmount(()=>{document.removeEventListener("keydown",B),window.removeEventListener("resize",X),H()}),(g,w)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"FullscreenImgElement",ref:z,role:"button",class:"m-fullscreen-img m-reset-css",tabindex:"0",onClick:n.withModifiers(x,["stop"]),onKeypress:n.withKeys(n.withModifiers(x,["prevent"]),["esc"])},[c.value&&y.value?(n.openBlock(),n.createElementBlock("button",{key:0,type:"button",class:"m-fullscreen-btn --next",onClick:w[0]||(w[0]=n.withModifiers(L=>Y("next"),["stop"]))},[n.createVNode(n.unref(a),{class:"maz-rotate-180"})])):n.createCommentVNode("v-if",!0),c.value&&y.value?(n.openBlock(),n.createElementBlock("button",{key:1,type:"button",class:"m-fullscreen-btn --previous",onClick:w[1]||(w[1]=n.withModifiers(L=>Y("previous"),["stop"]))},[n.createVNode(n.unref(a))])):n.createCommentVNode("v-if",!0),n.createElementVNode("button",{type:"button",class:"m-fullscreen-btn --close",onClick:x},[n.createVNode(n.unref(i))]),n.createElementVNode("div",Po,[n.createElementVNode("img",{ref_key:"ImgElement",ref:p,src:f.value,alt:m.value??void 0,tabindex:"0",class:n.normalizeClass([S.value]),onLoad:C,onClick:w[2]||(w[2]=n.withModifiers(L=>g.zoom&&ve(),["stop"]))},null,42,No),n.withDirectives(n.createVNode(n.unref(r),{class:"m-fullscreen-img-loader"},null,512),[[n.vShow,u.value]])])],40,Bo))}}),re=(o,e)=>{const t=o.__vccOpts||o;for(const[s,r]of e)t[s]=r;return t},$o=re(Mo,[["__scopeId","data-v-24a18baf"]]),De="m-fullscreen-is-open";class Ho{constructor(){d(this,"options");d(this,"defaultOptions",{scaleOnHover:!1,blurOnHover:!1,disabled:!1,zoom:!0,offset:80,animation:{duration:300,easing:"ease-in-out"}});d(this,"mouseEnterListener");d(this,"mouseLeaveListener");d(this,"renderPreviewListener")}buildOptions(e,t){const s=typeof t.value=="object"?t.value:{src:t.value,alt:void 0},r=(s==null?void 0:s.src)??this.getImgSrc(e),i=(s==null?void 0:s.alt)??this.getImgAlt(e);return{...this.defaultOptions,...s,src:r,alt:i}}get allInstances(){return[...document.querySelectorAll(".m-fullscreen-img-instance")]}getImgSrc(e){var s;const t=((s=this.options)==null?void 0:s.src)||e.getAttribute("src")||e.getAttribute("data-src");if(!t)throw new Error('[maz-ui](fullscreen-img) src of image must be provided by `v-fullscreen=""`, `v-fullscreen="{ src: "" }"`, `src=""` or `data-src=""` atributes');return t}getImgAlt(e){var t;return((t=this.options)==null?void 0:t.alt)||e.getAttribute("alt")||e.getAttribute("data-alt")}create(e,t){if(this.options=this.buildOptions(e,t),this.options.disabled)return;e.style.cursor="move",(this.options.scaleOnHover||this.options.blurOnHover)&&(e.style.transition="all 200ms ease-in-out"),e.classList.add("m-fullscreen-img-instance"),e.setAttribute("data-src",this.getImgSrc(e));const s=this.getImgAlt(e);s&&e.setAttribute("data-alt",s),this.mouseEnterListener=()=>this.mouseEnter(e),this.mouseLeaveListener=()=>this.mouseLeave(e),this.renderPreviewListener=()=>this.renderPreview(e),e.addEventListener("mouseenter",this.mouseEnterListener),e.addEventListener("mouseleave",this.mouseLeaveListener),e.addEventListener("click",this.renderPreviewListener)}update(e,t){this.options=this.buildOptions(e,t)}remove(e){e.removeEventListener("mouseenter",this.mouseEnterListener),e.removeEventListener("mouseleave",this.mouseLeaveListener),e.removeEventListener("click",this.renderPreviewListener),e.classList.remove("m-fullscreen-img-instance"),e.style.cursor=""}renderPreview(e){return e.classList.add(De),fe($o,{props:{...this.options,openInstanceClass:De,clickedElement:e,clickedElementBounds:e.getBoundingClientRect()},addDestroyInProps:!0})}mouseLeave(e){this.options.scaleOnHover&&(e.style.transform=""),this.options.blurOnHover&&(e.style.filter=""),e.style.zIndex=""}mouseEnter(e){e.style.zIndex="1",this.options.scaleOnHover&&(e.style.transform="scale(1.04)"),this.options.blurOnHover&&(e.style.filter="blur(3px)")}}let ue;const vt={mounted(o,e){return ue=new Ho,ue.create(o,e)},updated(o,e){return ue.update(o,e)},unmounted(o){return ue.remove(o)}},pt={install(o){o.directive("fullscreen-img",vt)}},Fo="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Te={baseClass:"m-lazy-img",loadedClass:"m-lazy-loaded",loadingClass:"m-lazy-loading",errorClass:"m-lazy-error",noPhotoClass:"m-lazy-no-photo",noPhoto:!1,observerOnce:!0,loadOnce:!1,noUseErrorPhoto:!1,observerOptions:{threshold:.1}};class gt{constructor(e={}){d(this,"observers",[]);d(this,"defaultOptions",Te);d(this,"options");d(this,"onImgLoadedCallback");d(this,"onImgErrorCallback");d(this,"hasImgLoaded",!1);this.options=this.buildOptions(e),this.onImgLoadedCallback=this.imageIsLoaded.bind(this),this.onImgErrorCallback=this.imageHasError.bind(this)}async loadErrorPhoto(){const{default:e}=await Promise.resolve().then(()=>require("./no-photography-CLNgmzDi.cjs"));return e}buildOptions(e){return{...this.defaultOptions,...e,observerOptions:{...this.defaultOptions.observerOptions,...e.observerOptions}}}removeClass(e,t){e.classList.remove(t)}addClass(e,t){e.classList.add(t)}removeAllStateClasses(e){this.removeClass(e,this.options.loadedClass),this.removeClass(e,this.options.loadingClass),this.removeClass(e,this.options.errorClass),this.removeClass(e,this.options.noPhotoClass)}setBaseClass(e){this.addClass(e,this.options.baseClass)}imageIsLoading(e){var t,s;this.addClass(e,this.options.loadingClass),(s=(t=this.options).onLoading)==null||s.call(t,e)}imageHasNoPhoto(e){this.removeClass(e,this.options.loadingClass),this.addClass(e,this.options.noPhotoClass),this.setDefaultPhoto(e)}imageIsLoaded(e){var t,s;this.hasImgLoaded=!0,this.removeClass(e,this.options.loadingClass),this.addClass(e,this.options.loadedClass),(s=(t=this.options).onLoaded)==null||s.call(t,e)}imageHasError(e){var t,s;this.removeClass(e,this.options.loadingClass),this.addClass(e,this.options.errorClass),(s=(t=this.options).onError)==null||s.call(t,e),this.setDefaultPhoto(e)}getSrc(e){return typeof e.value=="object"?e.value.src:e.value}getImageUrl(e,t){const s=this.getImgElement(e).getAttribute("data-lazy-src");return s||this.getSrc(t)}async setPictureSourceUrls(e){const t=e.querySelectorAll("source");if(t.length>0)for await(const s of t){const r=s.getAttribute("data-lazy-srcset");if(r)s.srcset=r;else return this.imageHasError(e)}else this.imageHasError(e)}hasBgImgMode(e){return e.arg==="bg-image"}isPictureElement(e){return e instanceof HTMLPictureElement}getImgElement(e){return this.isPictureElement(e)?e.querySelector("img"):e}async setDefaultPhoto(e){if(this.options.noUseErrorPhoto)return;const t=this.options.fallbackSrc??this.options.errorPhoto;typeof t=="string"&&this.addClass(e,this.options.noPhotoClass);const s=t??await this.loadErrorPhoto(),r=e.querySelectorAll("source");if(r.length>0)for await(const i of r)i.srcset=s;else this.setImgSrc(e,s)}addEventListenerToImg(e){const t=this.getImgElement(e);t.addEventListener("load",()=>this.onImgLoadedCallback(e),{once:!0}),t.addEventListener("error",s=>this.onImgErrorCallback(e,s),{once:!0})}async loadImage(e,t){if(this.imageIsLoading(e),this.isPictureElement(e))this.addEventListenerToImg(e),await this.setPictureSourceUrls(e);else{const s=this.getImageUrl(e,t);if(!s)return this.imageHasError(e);this.hasBgImgMode(t)?(e.style.backgroundImage=`url('${s}')`,this.imageIsLoaded(e)):(this.addEventListenerToImg(e),this.setImgSrc(e,s))}}setImgSrc(e,t){const s=this.getImgElement(e);s.src=t}handleIntersectionObserver(e,t,s,r){var i,a;this.observers.push(r);for(const l of s)if(l.isIntersecting){if((a=(i=this.options).onIntersecting)==null||a.call(i,l.target),this.options.observerOnce&&r.unobserve(e),this.options.loadOnce&&this.hasImgLoaded)return;this.loadImage(e,t)}}createObserver(e,t){const s=(a,l)=>{this.handleIntersectionObserver(e,t,a,l)},r=this.options.observerOptions;new IntersectionObserver(s,r).observe(e)}async imageHandler(e,t,s){if(s==="update")for await(const r of this.observers)r.unobserve(e);window.IntersectionObserver?this.createObserver(e,t):this.loadImage(e,t)}async bindUpdateHandler(e,t,s){if(this.options.noPhoto)return this.imageHasNoPhoto(e);await this.imageHandler(e,t,s)}async add(e,t){if(this.hasBgImgMode(t)&&this.isPictureElement(e))throw new Error(`[MazLazyImg] You can't use the "bg-image" mode with "<picture />" element`);setTimeout(()=>this.setBaseClass(e),0),e.getAttribute("src")||this.setImgSrc(e,Fo),await this.bindUpdateHandler(e,t,"bind")}async update(e,t){t.value!==t.oldValue&&(this.hasImgLoaded=!1,this.removeAllStateClasses(e),await this.bindUpdateHandler(e,t,"update"))}remove(e,t){this.hasImgLoaded=!1,this.hasBgImgMode(t)&&(e.style.backgroundImage=""),this.removeAllStateClasses(e);for(const s of this.observers)s.unobserve(e);this.observers=[]}}let ce;const jo={created(o,e){const t=typeof e.value=="object"?e.value:{};ce=new gt(t),ce.add(o,e)},updated(o,e){ce.update(o,e)},unmounted(o,e){ce.remove(o,e)}},yt={install(o,e={}){const t={...Te,...e,observerOptions:{...Te.observerOptions,...e.observerOptions}},s=new gt(t);o.directive("lazy-img",{created:s.add.bind(s),updated:s.update.bind(s),unmounted:s.remove.bind(s)})}},qo=`
|
|
1
|
+
"use strict";require('../assets/index.css');var Bt=Object.defineProperty;var Pt=(o,e,t)=>e in o?Bt(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var d=(o,e,t)=>Pt(o,typeof e!="symbol"?e+"":e,t);const n=require("vue");function J(o,e){const t=n.inject(o,e);if(!t)throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${o.toString()}`);return t}function Nt(){return J("aos")}function Mt(o){const e={};for(const[t,s]of Object.entries(o))e[t]=Number.parseInt(s,10);return e}function D(){return typeof document<"u"}function $e(o={}){const{internalWindow:e=D()?window:void 0,initialWidth:t=Number.POSITIVE_INFINITY,initialHeight:s=Number.POSITIVE_INFINITY,includeScrollbar:r=!0}=o,i=n.ref(t),a=n.ref(s);function l(){e&&(r?(i.value=e.innerWidth,a.value=e.innerHeight):(i.value=e.document.documentElement.clientWidth,a.value=e.document.documentElement.clientHeight))}return l(),n.onMounted(()=>{e&&window.addEventListener("resize",l,{passive:!0})}),n.onUnmounted(()=>{e&&window.removeEventListener("resize",l)}),{width:i,height:a}}function $t({initialWidth:o=0,initialHeight:e,includeScrollbar:t,internalWindow:s,listenOrientation:r,breakpoints:i,mediumBreakPoint:a="md",largeBreakPoint:l="lg"}){const{width:u}=$e({initialWidth:o,initialHeight:e,includeScrollbar:t,internalWindow:s,listenOrientation:r}),c=Mt(i),y=n.computed(()=>u.value>=c[l]),E=n.computed(()=>u.value>=c[a]&&u.value<c[l]),b=n.computed(()=>u.value>=0&&u.value<c[a]);return{width:u,numericBreakpoints:c,isSmallScreen:b,isLargeScreen:y,isMediumScreen:E,breakpoints:i}}function Ht(){return J("dialog")}function ze(o,e,t){const s={maxAttempts:20,interval:100,...t};let r=0;function i(){const a=o();a!=null?s.expectedValue!==void 0&&a!==s.expectedValue?r<s.maxAttempts?(r++,setTimeout(i,s.interval)):console.warn(s.errorMessage||`[maz-ui](checkAvailability) Nothing found after ${s.maxAttempts} attempts for ref ${a}`):e(a):r<s.maxAttempts?(r++,setTimeout(i,s.interval)):console.warn(s.errorMessage||`[maz-ui](checkAvailability) Nothing found or expected value after ${s.maxAttempts} attempts for ref ${a}`)}i()}function He(o){const e=n.toValue(o);return Array.isArray(e)?Object.freeze([...e]):typeof e=="object"&&e!==null?Object.freeze({...e}):e}function Se(o){return o==null||typeof o=="string"||typeof o=="number"||typeof o=="boolean"||typeof o=="symbol"||typeof o=="bigint"}function Ft(o,e){if(o.length!==e.length)return!1;for(const[t,s]of o.entries())if(!ee(s,e[t]))return!1;return!0}function jt(o,e){const t=Object.keys(o),s=Object.keys(e);if(t.length!==s.length)return!1;for(const r of t)if(!s.includes(r)||!ee(o[r],e[r]))return!1;return!0}function ee(o,e){return Se(o)||Se(e)?o===e:o instanceof Date&&e instanceof Date?o.getTime()===e.getTime():typeof o!=typeof e||Array.isArray(o)!==Array.isArray(e)?!1:Array.isArray(o)&&Array.isArray(e)?Ft(o,e):typeof o=="object"&&typeof e=="object"?jt(o,e):!1}function qt(o,e,t){const s={};return function(...r){s[o]||(s[o]={timer:null,promise:null});const i=s[o];return i.timer&&clearTimeout(i.timer),i.promise=new Promise((a,l)=>{i.timer=setTimeout(async()=>{try{a(await e(...r))}catch(u){l(u)}finally{delete s[o]}},t)}),i.promise}}function Ut(o,e,t){const s={};return async(...r)=>{const i=Date.now();return s[o]||(s[o]={promise:null,lastCall:0,lastArgs:[]}),i-s[o].lastCall>=t?(s[o].lastCall=i,e(...r)):(s[o].lastArgs=r,s[o].promise||(s[o].promise=new Promise(a=>{setTimeout(async()=>{s[o].lastCall=Date.now();const l=await e(...s[o].lastArgs);s[o].promise=null,a(l)},t-(i-s[o].lastCall))})),s[o].promise)}}const F={mode:"lazy",scrollToErrorSelector:".has-field-error",debounceTime:300,throttleTime:1e3};function Fe(o,e){return Object.keys(e).includes(o)}function xe(o=F.scrollToErrorSelector){const e=document.querySelector(o);e&&e.scrollIntoView({behavior:"smooth",block:"center"})}function Wt(o,e){const t={};for(const[s,r]of Object.entries(o)){const i=r;t[s]=e[s].error&&i[0]?i[0].message:void 0}return t}function Le(o){return o==null||o===""}function Rt({name:o,hasValidation:e,debouncedFields:t,throttledFields:s}){if(!e)return;const r=String(o);if(t!=null&&t[r]&&(s!=null&&s[r]))throw new Error(`The field "${r}" cannot be both debounced and throttled`);return t!=null&&t[r]?qt(r,Q,typeof t[r]=="number"?t[r]:F.debounceTime):s!=null&&s[r]?Ut(r,Q,typeof s[r]=="number"?s[r]:F.throttleTime):Q}function je({name:o,schema:e,initialValue:t,fieldState:s,options:r}){const i=e?Fe(o,e):!1,a=Rt({name:o,hasValidation:i,debouncedFields:r==null?void 0:r.debouncedFields,throttledFields:r==null?void 0:r.throttledFields});return{blurred:!1,dirty:!1,errors:[],error:!1,valid:!i,validating:!1,validated:!1,initialValue:He(t),validateFunction:a,mode:i?(r==null?void 0:r.mode)??(s==null?void 0:s.mode)??F.mode:void 0}}function _t({schema:o,payload:e,options:t}){const s={};for(const r in o){const i=r;s[i]=je({name:i,schema:o,options:t,fieldState:s[i],initialValue:e==null?void 0:e[i]})}return s}function Kt({fieldsStates:o,payload:e,schema:t,options:s,updateMode:r=!1}){for(const i in t){const a=i;o[a]=qe({name:a,fieldState:o[a],payload:e,schema:t,options:s,updateMode:r})}}function qe({name:o,fieldState:e,payload:t,schema:s,options:r,updateMode:i=!0}){const{initialValue:a,mode:l,...u}=je({name:o,schema:s,initialValue:r.defaultValue??t[o],fieldState:e,options:r}),c=i?l??e.mode??F.mode:e.mode;return{...e,initialValue:a,mode:c,...e!=null&&e.mode&&c!==e.mode?u:{}}}function Yt(o){const e={};for(const[t,{errors:s}]of Object.entries(o))e[t]=s;return e}function Zt(o){return o instanceof HTMLInputElement||o instanceof HTMLSelectElement||o instanceof HTMLTextAreaElement?[o]:o.querySelectorAll("input, select, textarea")}function Xt({interactiveElements:o,onBlur:e,mode:t}){o.forEach(s=>{te(["eager","blur","progressive"],t)&&s.addEventListener("blur",e)})}function Gt({interactiveElements:o,onBlur:e}){o.forEach(t=>{t.removeEventListener("blur",e)})}async function Qt(o,e,t){const s=await so(e),i=await(await Re("safeParseAsync"))(s.entries[o],t??"");return{result:i,isValid:i.success}}async function Q({name:o,fieldState:e,schema:t,payload:s,setError:r=!0,setErrorIfInvalidAndNotEmpty:i=!1}){if(await n.nextTick(),e.validating=!0,!t[o]){e.valid=!0,e.validating=!1,e.validated=!0,e.errors=[],e.error=!1;return}const{result:a,isValid:l}=await Qt(o,t,s[o]);e.valid=l,(r||i&&!l&&!Le(s[o]))&&(e.error=!l),e.errors=a.issues??[],e.validating=!1,e.validated=!0}function Ue({name:o,fieldState:e,payload:t,schema:s}){var i;const r={name:o,fieldState:e,payload:t,schema:s,setError:e.mode==="progressive"?e.valid||e.blurred:!0};return(i=e.validateFunction)==null?void 0:i.call(e,r)}function Jt({fieldsStates:o,payload:e,showErrors:t=!0,schema:s}){return Promise.all(Object.keys(o).map(r=>Q({name:r,setError:t,fieldState:o[r],payload:e,schema:s,setErrorIfInvalidAndNotEmpty:o[r].mode==="lazy"})))}function We({eventName:o,fieldState:e,isSubmitted:t}){const{dirty:s,blurred:r,mode:i,valid:a}=e;return o==="blur"&&(te(["lazy","aggressive"],i)||a)||o==="input"&&i==="blur"||!i?!1:t||i==="eager"&&r||i==="blur"&&r||i==="aggressive"&&s||i==="lazy"&&s||i==="progressive"}function eo({name:o,force:e=!1,payload:t,fieldState:s,schema:r,isSubmitted:i}){const a=t[o],l=!Le(a)&&!ee(a,s.initialValue);if(s.dirty=l,s.blurred=s.blurred||(s.mode==="eager"?l:!0),!!(e||We({eventName:"blur",fieldState:s,isSubmitted:i})))return Ue({name:o,fieldState:s,schema:r,payload:t})}function to({name:o,payload:e,fieldState:t,schema:s,isSubmitted:r,forceValidation:i=!1}){const a=e[o];t.validated=!1;const l=!Le(a)&&!ee(a,t.initialValue);if(t.dirty=l,!!(i||We({eventName:"input",fieldState:t,isSubmitted:r})))return Ue({name:o,fieldState:t,schema:s,payload:e})}function Ie(o){const e=n.getCurrentInstance();if(!e)throw new Error(`${o} must be called within setup()`);return e}function oo(o,e){var r;const s=((r=Ie(e).formContexts)==null?void 0:r.get(o))??n.inject(o);if(!s)throw new Error("useFormField must be used within a form (useFormValidator)");return s}function no({ref:o,fieldState:e,onBlur:t}){if(!(o||te(["aggressive","lazy"],e.mode)))return{onBlur:t}}const ye={};async function Re(o){if(ye[o])return ye[o];const e=await Promise.resolve().then(()=>require("./index-CXVZhyjw.cjs"));return ye[o]=e[o],e[o]}async function so(o){return(await Re("objectAsync"))(o)}function te(o,e){return e?o.includes(e):!1}function ro(o,e){const t={formIdentifier:"main-form-validator",...e},{fieldsStates:s,payload:r,options:i,internalSchema:a,errorMessages:l,isSubmitted:u}=oo(t.formIdentifier,"useFormField"),c=Fe(o,a.value)?(e==null?void 0:e.mode)??i.mode:void 0;t.mode=c;const y=n.computed(()=>s.value[o]);if(s.value[o]=qe({name:o,fieldState:y.value,payload:r.value,schema:a.value,options:{...i,...t}}),t.defaultValue!==void 0&&!ee(r.value[o],t.defaultValue)){const h=t.defaultValue;r.value[o]=h,s.value[o].initialValue=He(h)}c&&Q({name:o,fieldState:y.value,payload:r.value,schema:a.value,setError:c==="aggressive",setErrorIfInvalidAndNotEmpty:c==="lazy"});function E(){eo({name:o,fieldState:y.value,payload:r.value,schema:a.value,isSubmitted:u.value})}const b=n.computed(()=>no({ref:t.ref,onBlur:E,fieldState:y.value}));if(t.ref&&te(["eager","blur","progressive"],c)){let h=[];const T=k=>{h=Zt(k),Xt({interactiveElements:h,onBlur:E,mode:c})};n.onMounted(()=>{const k=Ie(`useFormField of ${o}`);ze(()=>k.refs[t.ref],f=>{const m=f instanceof HTMLElement?f:f==null?void 0:f.$el;m&&T(m)},{errorMessage:`[maz-ui](useFormField) No element found for ref ${t.ref} for field ${o}`})}),n.onUnmounted(()=>{Gt({interactiveElements:h,onBlur:E})})}return{hasError:n.computed(()=>y.value.error),errors:n.computed(()=>y.value.errors),errorMessage:n.computed(()=>l.value[o]),isValid:n.computed(()=>y.value.valid),isDirty:n.computed(()=>y.value.dirty),isBlurred:n.computed(()=>y.value.blurred),isValidated:n.computed(()=>y.value.validated),isValidating:n.computed(()=>y.value.validating),mode:n.computed(()=>y.value.mode),value:n.computed({get:()=>r.value[o],set:h=>r.value[o]=h}),validationEvents:b,onBlur:E}}function io({schema:o,defaultValues:e,model:t,options:s}){const r=Ie("useFormValidator"),i={mode:F.mode,scrollToError:F.scrollToErrorSelector,debouncedFields:null,throttledFields:null,identifier:"main-form-validator",...s},a=n.ref(e),l=n.ref({...a.value,...t==null?void 0:t.value}),u=n.ref(o),c=n.ref(_t({schema:u.value,payload:l.value,options:i})),y=n.ref(!1),E=n.ref(!1),b=n.computed(()=>Object.values(c.value).every(({valid:C})=>C)),h=n.computed(()=>Object.values(c.value).some(({dirty:C})=>C)),T=n.computed(()=>Yt(c.value)),k=n.computed(()=>Wt(T.value,c.value));t&&n.watch(l,C=>{t.value={...a.value,...C}},{deep:!0}),n.watch(a,C=>{l.value={...C,...l.value}},{deep:!0}),n.watch(u,C=>{Kt({schema:C,fieldsStates:c.value,payload:l.value,options:i}),f()},{deep:!0}),f();function f(C=i.mode==="aggressive"){return Jt({fieldsStates:c.value,payload:l.value,schema:u.value,showErrors:C})}const m=[];async function z(C){await n.nextTick();const x=n.watch(()=>l.value[C],()=>{const B=c.value[C];to({name:C,fieldState:B,payload:l.value,schema:u.value,isSubmitted:E.value,forceValidation:te(["aggressive","lazy","progressive"],B.mode)})},{deep:typeof u.value[C]=="object"});m.push(x)}function p(){for(const C of m)C();for(const C of Object.keys(u.value))z(C)}function I(C,x){return async B=>{if(B==null||B.preventDefault(),!y.value){E.value=!0,y.value=!0;try{await f(!0);const j=typeof x=="string"?x:i.scrollToError;let H;return b.value?H=await C(l.value):typeof j!="boolean"&&xe(j),y.value=!1,H}finally{y.value=!1}}}}const S={fieldsStates:c,payload:l,options:i,internalSchema:u,errorMessages:k,isSubmitted:E};return r.formContexts??(r.formContexts=new Map),r.formContexts.set(i.identifier,S),n.provide(i.identifier,S),p(),{identifier:i.identifier,isDirty:h,isSubmitting:y,isSubmitted:E,isValid:b,errors:T,model:l,fieldsStates:c,validateForm:f,scrollToError:xe,handleSubmit:I,errorMessages:k}}class _e{constructor(e,t){d(this,"defaultOptions",{element:void 0,timeout:60*1e3*5,once:!1,immediate:!0});d(this,"options");d(this,"timeoutHandler");d(this,"isIdle",!1);d(this,"isDestroy",!1);d(this,"startTime",0);d(this,"remainingTime",0);d(this,"lastClientX",-1);d(this,"lastClientY",-1);d(this,"eventNames",["DOMMouseScroll","mousedown","mousemove","mousewheel","MSPointerDown","MSPointerMove","keydown","touchmove","touchstart","wheel","click"]);d(this,"handleEvent",e=>{try{if(this.remainingTime>0)return;if(e.type==="mousemove"){const{clientX:t,clientY:s}=e;if(t===void 0&&s===void 0||t===this.lastClientX&&s===this.lastClientY)return;this.lastClientX=t,this.lastClientY=s}this.resetTimeout(),this.callback({isIdle:this.isIdle,eventType:e.type,instance:this})}catch(t){throw new Error(`[IdleTimeout](handleEvent) ${t}`)}});this.callback=e,this.options={...this.defaultOptions,...t},D()&&this.start()}get element(){return this.options.element??document.body}start(){if(!D()){console.warn("[IdleTimeout](start) you should run this method on client side");return}for(const e of this.eventNames)this.element.addEventListener(e,this.handleEvent);this.resetTimeout(),this.options.immediate&&this.callback({isIdle:!1,instance:this})}pause(){const e=this.startTime+this.options.timeout-Date.now();e<=0||(this.remainingTime=e,this.timeoutHandler&&(clearTimeout(this.timeoutHandler),this.timeoutHandler=void 0))}resume(){this.remainingTime<=0||(this.resetTimeout(),this.callback({isIdle:this.isIdle,instance:this}),this.remainingTime=0)}reset(){this.isDestroy=!1,this.isIdle=!1,this.remainingTime=0,this.resetTimeout(),this.callback({isIdle:this.isIdle,instance:this})}destroy(){if(!D()){console.warn("[IdleTimeout](destroy) you should run this method on client side");return}this.isDestroy=!0;for(const e of this.eventNames)this.element.removeEventListener(e,this.handleEvent);this.timeoutHandler&&clearTimeout(this.timeoutHandler)}resetTimeout(){this.isIdle=!1,this.timeoutHandler&&(clearTimeout(this.timeoutHandler),this.timeoutHandler=void 0),this.timeoutHandler=setTimeout(this.handleTimeout.bind(this),this.remainingTime||this.options.timeout),this.startTime=Date.now()}handleTimeout(){this.isIdle=!0,this.callback({isIdle:this.isIdle,instance:this}),this.options.once&&this.destroy()}get destroyed(){return this.isDestroy}get timeout(){return this.options.timeout}set timeout(e){this.options.timeout=e}get idle(){return this.isIdle}set idle(e){e?this.handleTimeout():this.reset(),this.callback({isIdle:this.isIdle,instance:this})}}function ao({callback:o,options:e}){return new _e(o,e)}function lo({componentName:o,providedId:e}){return n.computed(()=>e??`${o}-${n.useId().replace(/:/g,"")}`)}const uo=["af-ZA","sq-AL","ar-DZ","ar-BH","ar-EG","ar-IQ","ar-JO","ar-KW","ar-LB","ar-LY","ar-MA","ar-OM","ar-QA","ar-SA","ar-SY","ar-TN","ar-AE","ar-YE","hy-AM","Cy-az-AZ","Lt-az-AZ","eu-ES","be-BY","bg-BG","ca-ES","zh-CN","zh-HK","zh-MO","zh-SG","zh-TW","zh-CHS","zh-CHT","hr-HR","cs-CZ","da-DK","div-MV","nl-BE","nl-NL","en-AU","en-BZ","en-CA","en-CB","en-IE","en-JM","en-NZ","en-PH","en-ZA","en-TT","en-GB","en-US","en-ZW","et-EE","fo-FO","fa-IR","fi-FI","fr-BE","fr-CA","fr-FR","fr-LU","fr-MC","fr-CH","gl-ES","ka-GE","de-AT","de-DE","de-LI","de-LU","de-CH","el-GR","gu-IN","he-IL","hi-IN","hu-HU","is-IS","id-ID","it-IT","it-CH","ja-JP","kn-IN","kk-KZ","kok-IN","ko-KR","ky-KZ","lv-LV","lt-LT","mk-MK","ms-BN","ms-MY","mr-IN","mn-MN","nb-NO","nn-NO","pl-PL","pt-BR","pt-PT","pa-IN","ro-RO","ru-RU","sa-IN","Cy-sr-SP","Lt-sr-SP","sk-SK","sl-SI","es-AR","es-BO","es-CL","es-CO","es-CR","es-DO","es-EC","es-SV","es-GT","es-HN","es-MX","es-NI","es-PA","es-PY","es-PE","es-PR","es-ES","es-UY","es-VE","sw-KE","sv-FI","sv-SE","syr-SY","ta-IN","tt-RU","te-IN","th-TH","tr-TR","uk-UA","ur-PK","Cy-uz-UZ","Lt-uz-UZ","vi-VN"],Ke=["aa","ab","ae","af","ak","am","an","ar","as","av","ay","az","ba","be","bg","bh","bi","bm","bn","bo","br","bs","ca","ce","ch","co","cr","cs","cu","cv","cy","da","de","dv","dz","ee","el","en","eo","es","et","eu","fa","ff","fi","fj","fo","fr","fy","ga","gd","gl","gn","gu","gv","ha","he","hi","ho","hr","ht","hu","hy","hz","ia","id","ie","ig","ii","ik","io","is","it","iu","ja","jv","ka","kg","ki","kj","kk","kl","km","kn","ko","kr","ks","ku","kv","kw","ky","la","lb","lg","li","ln","lo","lt","lu","lv","mg","mh","mi","mk","ml","mn","mr","ms","mt","my","na","nb","nd","ne","ng","nl","nn","no","nr","nv","ny","oc","oj","om","or","os","pa","pi","pl","ps","pt","qu","rm","rn","ro","ru","rw","sa","sc","sd","se","sg","si","sk","sl","sm","sn","so","sq","sr","ss","st","su","sv","sw","ta","te","tg","th","ti","tk","tl","tn","to","tr","ts","tt","tw","ty","ug","uk","ur","uz","ve","vi","vo","wa","wo","xh","yi","yo","za","zh","zu"],Ye=[...Ke,...uo];let P;function Oe(o,e){return!o||(o==null?void 0:o.toLocaleLowerCase())===e.toLocaleLowerCase()}function co(o){function e(s,r){return n.computed(()=>{const i=n.toValue(r),a=n.toValue(s);try{if(!i||!a)return a;(!P||i!==P.resolvedOptions().locale)&&(P=new Intl.DisplayNames([i],{type:"language"}));const l=P.of(a);return!l||Oe(l,a)?void 0:l}catch{return a}})}function t(s){return n.computed(()=>{const r=n.toValue(s);return r?((!P||r!==P.resolvedOptions().locale)&&(P=new Intl.DisplayNames([r],{type:"language"})),Ye.map(i=>{try{const a=P==null?void 0:P.of(i);return!a||Oe(a,i)?void 0:{language:a,code:i}}catch{return}}).filter(Boolean)):[]})}return{getLanguageDisplayName:({code:s,locale:r})=>e(s,r||o),getAllLanguageDisplayNames:s=>t(s||o)}}function Ze(o){const e=o.join(", ").match(/\b\w+\b/g);return e?e.length:0}function mo(o,e=150){const t=Ze([o]);return Math.ceil(t/e)}function fo(o){const e=n.computed(()=>{var a;return typeof o.velocity=="number"?o.velocity:((a=o.velocity)==null?void 0:a.value)??150}),t=n.computed(()=>{var a;return typeof o.contentSelector=="string"?o.contentSelector:(a=o.contentSelector)==null?void 0:a.value}),s=n.computed(()=>{var a,l,u;if(typeof((a=o.contentRef)==null?void 0:a.value)=="object")return(l=o.contentRef.value)==null?void 0:l.textContent;if(t.value&&typeof document<"u"){const c=document.querySelector(t.value);if(c)return c.textContent}return typeof o.content=="string"?o.content:(u=o.content)==null?void 0:u.value}),r=n.computed(()=>mo(s.value,e.value)),i=n.computed(()=>Ze([s.value]));return{content:s,wordCount:i,velocity:e,duration:r}}const ho={removeAccents:!0,caseSensitive:!1,replaceSpaces:!0,removeSpecialCharacters:!1,trim:!0,normalizeSpaces:!0,removeNumbers:!1,customNormalizationForms:["NFC","NFKD"]};function Ee(o,e){const t={...ho,...e},s={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Î:"I",Ï:"I",í:"I",î:"i",ï:"i",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ç:"C",ç:"c",ÿ:"y",Ñ:"N",ñ:"n",ó:"o"};let r=o.toString();if(t.trim&&(r=r.trim()),t.normalizeSpaces&&(r=r.replaceAll(/\s+/g," ")),t.replaceSpaces&&(r=r.replaceAll(" ","-")),t.removeNumbers&&(r=r.replaceAll(/\d/g,"")),t.removeAccents&&(r=r.replaceAll(/[ÀÁÂÃÄÅÇÈÉÊËÎÏÑÔÕÖØÙÚÛÜàáâãäåçèéêëíîïñóôõöøùúûüÿ]/g,i=>s[i]||i),r=r.replaceAll(/[\u0300-\u036F]/g,"")),t.caseSensitive===!1&&(r=r.toLowerCase()),t.removeSpecialCharacters&&(r=r.replaceAll(/[^\dA-Z-]/gi,"")),t.trim&&(r=r.trim()),t.customNormalizationForms)for(const i of t.customNormalizationForms)r=r.normalize(i);return r}function vo(o,e){const t=o.length,s=e.length,r=[];for(let i=0;i<=t;i++)r[i]=[i];for(let i=0;i<=s;i++)r[0][i]=i;for(let i=1;i<=t;i++)for(let a=1;a<=s;a++){const l=o[i-1]===e[a-1]?0:1;r[i][a]=Math.min(r[i-1][a]+1,r[i][a-1]+1,r[i-1][a-1]+l)}return r[t][s]}function Xe(o,e){const t=vo(o,e),s=Math.max(o.length,e.length);return 1-t/s}function po(o,e,t=.75){return Xe(o,e)>=t}function go(o,e,t=.75){const s=n.computed(()=>Ee(typeof o=="string"?o:o.value)),r=n.computed(()=>Ee(typeof e=="string"?e:e.value)),i=n.computed(()=>typeof t=="number"?t:t.value),a=n.computed(()=>Xe(s.value,r.value));return{isMatching:n.computed(()=>po(s.value,r.value,i.value)),score:a}}const yo={preventDefaultOnTouchMove:!1,preventDefaultOnMouseWheel:!1,threshold:50,immediate:!1,triggerOnEnd:!1};class Ge{constructor(e){d(this,"element");d(this,"xStart");d(this,"yStart");d(this,"xEnd");d(this,"yEnd");d(this,"xDiff");d(this,"yDiff");d(this,"onToucheStartCallback");d(this,"onToucheMoveCallback");d(this,"onToucheEndCallback");d(this,"onMouseWheelCallback");d(this,"start");d(this,"stop");d(this,"options");this.inputOption=e,this.options={...yo,...e},this.onToucheStartCallback=this.toucheStartHandler.bind(this),this.onToucheMoveCallback=this.handleTouchMove.bind(this),this.onToucheEndCallback=this.handleTouchEnd.bind(this),this.onMouseWheelCallback=this.handleMouseWheel.bind(this),this.start=this.startListening.bind(this),this.stop=this.stopListening.bind(this),this.options.element&&this.setElement(this.options.element),this.options.immediate&&this.start()}startListening(){this.setElement(this.options.element),this.element.addEventListener("touchstart",this.onToucheStartCallback,{passive:!0}),this.element.addEventListener("touchmove",this.onToucheMoveCallback,{passive:!0}),this.options.triggerOnEnd&&this.element.addEventListener("touchend",this.onToucheEndCallback,{passive:!0}),this.options.preventDefaultOnMouseWheel&&this.element.addEventListener("mousewheel",this.onMouseWheelCallback,{passive:!1})}stopListening(){this.element.removeEventListener("touchstart",this.onToucheStartCallback),this.element.removeEventListener("touchmove",this.onToucheMoveCallback),this.element.removeEventListener("touchend",this.onToucheEndCallback),this.options.preventDefaultOnMouseWheel&&this.element.removeEventListener("mousewheel",this.onMouseWheelCallback)}setElement(e){if(!e){console.error("[maz-ui][SwipeHandler](setElement) Element should be provided. Its can be a string selector or an HTMLElement");return}if(typeof e=="string"){const t=document.querySelector(e);if(!(t instanceof HTMLElement)){console.error("[maz-ui][SwipeHandler](setElement) String selector for element is not found");return}this.element=t}else this.element=e}handleMouseWheel(e){e.preventDefault()}toucheStartHandler(e){this.xStart=e.touches[0].clientX,this.yStart=e.touches[0].clientY,this.emitValuesChanged()}emitValuesChanged(){var e,t;(t=(e=this.options).onValuesChanged)==null||t.call(e,{xStart:this.xStart,yStart:this.yStart,xEnd:this.xEnd,yEnd:this.yEnd,xDiff:this.xDiff,yDiff:this.yDiff})}handleTouchMove(e){this.options.preventDefaultOnTouchMove&&e.cancelable&&e.preventDefault(),this.xEnd=e.touches[0].clientX,this.yEnd=e.touches[0].clientY,!(!this.xStart||!this.yStart)&&(this.xDiff=this.xStart-this.xEnd,this.yDiff=this.yStart-this.yEnd,this.emitValuesChanged(),this.options.triggerOnEnd||this.runCallbacks(e))}handleTouchEnd(e){this.runCallbacks(e),this.emitValuesChanged()}runCallbacks(e){var t,s,r,i,a,l,u,c;typeof this.xDiff!="number"||typeof this.yDiff!="number"||Math.abs(this.xDiff)<this.options.threshold&&Math.abs(this.yDiff)<this.options.threshold||(Math.abs(this.xDiff)>Math.abs(this.yDiff)?this.xDiff>0?(s=(t=this.options).onLeft)==null||s.call(t,e):(i=(r=this.options).onRight)==null||i.call(r,e):this.yDiff>0?(l=(a=this.options).onUp)==null||l.call(a,e):(c=(u=this.options).onDown)==null||c.call(u,e),this.resetValues())}resetValues(){this.xStart=void 0,this.yStart=void 0,this.xEnd=void 0,this.yEnd=void 0,this.xDiff=void 0,this.yDiff=void 0,this.emitValuesChanged()}}function bo(o){const e=n.ref(),t=n.ref(),s=n.ref(),r=n.ref(),i=n.ref(),a=n.ref(),l=n.computed(()=>n.toValue(o.element)),u=new Ge({...o,element:l.value,onValuesChanged(c){e.value=c.xDiff,t.value=c.yDiff,s.value=c.xStart,r.value=c.xEnd,i.value=c.yStart,a.value=c.yEnd}});return{xDiff:e,yDiff:t,xStart:s,xEnd:r,yStart:i,yEnd:a,start:()=>{l.value&&(u.options.element=l.value),u.start()},stop:u.stop}}const wo={darkClass:"dark",lightClass:"light",storageThemeKey:"theme",storageThemeValueDark:"dark",storageThemeValueLight:"light",storageThemeValueSystem:"system",watchChanges:!0},oe=n.ref("system"),$=n.ref("system");function Ve(){return window.matchMedia("(prefers-color-scheme: dark)").matches}function ne({darkClass:o,lightClass:e,storageThemeKey:t,storageThemeValueDark:s,setLocalStorageValue:r=!0,setSelectedTheme:i=!0}){D()&&(document.documentElement.classList.remove(e),document.documentElement.classList.add(o),oe.value=s,i&&($.value=s),r&&(localStorage[t]=s))}function se({darkClass:o,lightClass:e,storageThemeKey:t,storageThemeValueLight:s,setLocalStorageValue:r=!0,setSelectedTheme:i=!0}){D()&&(document.documentElement.classList.remove(o),document.documentElement.classList.add(e),oe.value=s,i&&($.value=s),r&&(localStorage[t]=s))}function Qe({setLocalStorageValue:o=!0,...e}){if(D())return document.documentElement.classList.remove(e.darkClass),document.documentElement.classList.remove(e.lightClass),oe.value=e.storageThemeValueSystem,$.value=e.storageThemeValueSystem,o&&(localStorage[e.storageThemeKey]=e.storageThemeValueSystem),ke(e)}function Je(o){if(!o.defaultTheme)return console.error("[maz-ui](useThemeHandler) No default theme set");if(!["light","dark"].includes(o.defaultTheme))return console.error('[maz-ui](useThemeHandler) Default theme must be "light" or "dark"');switch(o.defaultTheme){case"dark":return ne({...o,setLocalStorageValue:!1,setSelectedTheme:!0});case"light":return se({...o,setLocalStorageValue:!1,setSelectedTheme:!0})}}function ke(o){return D()?!localStorage[o.storageThemeKey]&&o.defaultTheme?Je(o):localStorage[o.storageThemeKey]===o.storageThemeValueDark||!localStorage[o.storageThemeKey]&&Ve()||localStorage[o.storageThemeKey]===o.storageThemeValueSystem&&Ve()?ne({...o,setLocalStorageValue:!1,setSelectedTheme:!1}):se({...o,setLocalStorageValue:!1,setSelectedTheme:!1}):void 0}function be({theme:o,...e}){return o==="system"?Qe(e):o==="dark"?ne(e):se(e)}function Eo(o){return oe.value===o.storageThemeValueDark?se(o):ne(o)}function ko(o){const e={...wo,...o};function t(){ke(e)}return n.onMounted(()=>{localStorage[e.storageThemeKey]&&($.value=localStorage[e.storageThemeKey]),e.watchChanges&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t)}),n.onBeforeUnmount(()=>{e.watchChanges&&window.matchMedia("(prefers-color-scheme: dark)").removeEventListener("change",t)}),n.watch($,s=>{switch(localStorage[e.storageThemeKey]=s,s){case e.storageThemeValueDark:{ne(e);break}case e.storageThemeValueLight:{se(e);break}case e.storageThemeValueSystem:{Qe(e);break}}}),{autoSetTheme:()=>ke(e),toggleTheme:()=>Eo(e),setSystemTheme:()=>be({...e,theme:"system"}),setDarkTheme:()=>be({...e,theme:"dark"}),setLightTheme:()=>be({...e,theme:"light"}),setDefaultTheme:()=>Je(e),hasDarkTheme:n.computed(()=>$.value===e.storageThemeValueDark),hasLightTheme:n.computed(()=>$.value===e.storageThemeValueLight),hasSystemTheme:n.computed(()=>$.value===e.storageThemeValueSystem),theme:oe,selectedTheme:$}}function et({timeout:o=1e3,callback:e,remainingTimeUpdate:t=200,callbackOffsetTime:s=0}){const r=n.ref(o),i=n.ref(o);let a;function l(b){typeof b=="number"&&(i.value=b),typeof b=="number"&&(r.value=b),u()}function u(){a||(a=setInterval(()=>{i.value-=t,i.value<=0&&(E(),setTimeout(()=>e==null?void 0:e(),s))},t))}function c(){a&&(clearInterval(a),a=void 0)}function y(){!a&&i.value>0&&u()}function E(){setTimeout(()=>i.value=r.value,s*2),c()}return{remainingTime:i,start:l,pause:c,resume:y,stop:E}}function Co(){return J("toast")}class tt{constructor(e,t){d(this,"eventHandlerFunction");d(this,"event","visibilitychange");d(this,"timeoutHandler");d(this,"options");d(this,"defaultOptions",{timeout:5e3,once:!1,immediate:!0});d(this,"isVisible",!1);this.callback=e,this.options={...this.defaultOptions,...t},this.eventHandlerFunction=this.eventHandler.bind(this),D()&&this.start()}start(){if(!D()){console.warn("[UserVisibility](start) you should run this method on client side");return}this.options.immediate&&this.emitCallback(),this.addEventListener()}emitCallback(){this.isVisible=document.visibilityState==="visible",this.callback({isVisible:this.isVisible}),this.options.once&&this.destroy()}eventHandler(){document.visibilityState==="visible"&&!this.isVisible?(this.clearTimeout(),this.emitCallback()):document.visibilityState==="hidden"&&this.initTimeout()}clearTimeout(){this.timeoutHandler&&(clearTimeout(this.timeoutHandler),this.timeoutHandler=void 0)}initTimeout(){this.clearTimeout(),this.timeoutHandler=setTimeout(this.emitCallback.bind(this),this.options.timeout)}addEventListener(){document.addEventListener(this.event,this.eventHandlerFunction)}removeEventListener(){document.removeEventListener(this.event,this.eventHandlerFunction)}destroy(){this.removeEventListener(),this.timeoutHandler&&clearTimeout(this.timeoutHandler)}}function To({callback:o,options:e}){return new tt(o,e)}function zo(){return J("wait")}const me="__maz-click-outside__";function ot(){return document.ontouchstart===null?"touchstart":"click"}async function nt(o,e){try{st(o);const t=e.instance,s=e.value,r=typeof s=="function";if(!r)throw new Error("[maz-ui](vClickOutside) the callback should be a function");await n.nextTick(),o[me]=a=>{if((!o||a.target&&!o.contains(a.target))&&s&&r)return s.call(t,a)};const i=ot();document.addEventListener(i,o[me],{passive:!0})}catch(t){console.error("[maz-ui](vClickOutside)",t)}}function st(o){try{const e=ot();document.removeEventListener(e,o[me],!1),delete o[me]}catch(e){console.error("[maz-ui](vClickOutside)",e)}}function Lo(o,e){try{if(e.value===e.oldValue)return;nt(o,e)}catch(t){console.error("[maz-ui](vClickOutside)",t)}}const rt={mounted:nt,updated:Lo,unmounted:st},it={install:o=>{o.directive("click-outside",rt)}};function at(o,e,t){var a,l;o.stopPropagation();const s=typeof t.value=="function"?t.value:t.value.handler,r=typeof t.value=="object"?t.value.exclude:void 0;let i=!1;if(r&&r.length>0){for(const u of r)if(!i&&o.target instanceof HTMLElement){const c=(a=document.querySelector(u))==null?void 0:a.getAttribute("id");i=(o.target.getAttribute("id")===c||((l=document.querySelector(u))==null?void 0:l.contains(o.target)))??!1}}!e.contains(o.target)&&!i&&(s==null||s(o))}function lt(){return document.ontouchstart===null?"touchstart":"click"}function Io(o,e){const t=lt();document.removeEventListener(t,s=>at(s,o,e))}function Ao(o,e){if(typeof e.value!="function"&&typeof e.value=="object"&&typeof e.value.handler!="function"){console.error("[maz-ui](vClosable) v-closable directive requires a handler function");return}const t=lt();document.addEventListener(t,s=>at(s,o,e))}const ut={mounted:Ao,unmounted:Io},ct={install:o=>{o.directive("closable",ut)}},Ce={position:"top"};class dt{constructor(e={}){d(this,"options");this.options={...Ce,...e}}getPosition({modifiers:e,value:t}){return e.top?"top":e.bottom?"bottom":e.left?"left":e.right?"right":typeof t=="string"?"top":t.position??this.options.position}getText({value:e}){return typeof e=="string"?e:e.text}getOpen({value:e}){return typeof e=="string"?!1:e.open??!1}getColor({value:e}){return typeof e=="string"?"default":e.color??"default"}getOffset({value:e}){return typeof e=="string"?"1rem":e.offset??"1rem"}create(e,t){e.setAttribute("data-tooltip",this.getText(t));const s=this.getOffset(t);s&&e.style.setProperty("--tooltip-offset",s),e.classList.add("m-tooltip");const r=this.getPosition(t);e.classList.add(`m-tooltip--${r}`),e.classList.add(`m-tooltip--${this.getColor(t)}`),this.getOpen(t)&&e.classList.add("m-tooltip--open")}update(e,t){this.remove(e,t),this.create(e,t)}remove(e,t){e.removeAttribute("data-tooltip"),e.classList.remove("m-tooltip"),e.classList.remove("m-tooltip--top"),e.classList.remove("m-tooltip--bottom"),e.classList.remove("m-tooltip--left"),e.classList.remove("m-tooltip--right"),e.classList.remove("m-tooltip--open"),e.classList.remove(`m-tooltip--${this.getColor(t)}`)}}let le;const So={beforeMount(o,e){const t=typeof e.value=="object"?e.value:{};return le=new dt(t),le.create(o,e)},updated(o,e){return le.update(o,e)},unmounted(o,e){return le.remove(o,e)}},mt={install:(o,e=Ce)=>{const t={...Ce,...e},s=new dt(t);o.directive("tooltip",{beforeMount:s.create.bind(s),updated:s.update.bind(s),unmounted:s.remove.bind(s)})}};function fe(o,e){let t=e==null?void 0:e.element;function s(){t&&n.render(null,t)}const r={...e==null?void 0:e.props,...e!=null&&e.addDestroyInProps?{destroy:s}:{}},i=n.createVNode(o,r,e==null?void 0:e.children);return e!=null&&e.app?(i.appContext=e.app._context,t?n.render(i,t):typeof document<"u"&&(t=document.createElement("div"),n.render(i,t))):(t=t??document.body,n.render(i,t)),{vNode:i,destroy:s,el:t}}function ft(o){return!!o}function xo(o){return[...o].map(e=>{const t=e.codePointAt(0);return t?t%32+127461:void 0}).filter(ft).map(e=>String.fromCodePoint(e)).join("")}function Oo(o,e){let t;return function(...s){clearTimeout(t),t=setTimeout(()=>{o.apply(this,s)},e)}}class Vo{constructor({src:e,identifier:t,once:s=!0,async:r=!0,defer:i=!0}){d(this,"src");d(this,"script");d(this,"once");d(this,"async");d(this,"defer");d(this,"identifier");if(typeof window>"u")throw new TypeError("[ScriptLoader]: Is supported only on browser side");if(!e)throw new Error('[ScriptLoader]: You should provide the attribut "src"');if(!t)throw new Error('[ScriptLoader]: You should provide the attribut "identifier"');this.src=e,this.identifier=t,this.once=s,this.async=r,this.defer=i}removeTag(e){var t;typeof e=="string"?(t=document.head.querySelector(`[data-identifier="${e}"]`))==null||t.remove():e.remove()}load(){const e=window,t=document.head.querySelectorAll(`[data-identifier="${this.identifier}"]`);if(this.once&&e[this.identifier]&&t.length>0)return this.script=e[this.identifier],Promise.resolve(this.script);if(!this.once&&t.length>0)for(const s of t)this.removeTag(s);return this.injectScript()}injectScript(){const e=window;return new Promise((t,s)=>{try{const r=document.createElement("script");r.src=this.src,r.async=this.async,r.defer=this.defer,r.dataset.identifier=this.identifier,r.addEventListener("error",i=>s(new Error(`[ScriptLoader](injectScript) ${i.message}`))),r.addEventListener("load",i=>(this.script=i,e[this.identifier]=i,t(i))),document.head.append(r)}catch(r){throw new Error(`[ScriptLoader](init) ${r}`)}})}}function ht(o){return new Promise(e=>setTimeout(e,o))}function Do(o,e){let t=!1,s,r;return function(...i){t?(clearTimeout(s),s=setTimeout(()=>{Date.now()-r>=e&&(o.apply(this,i),r=Date.now())},Math.max(e-(Date.now()-r),0))):(o.apply(this,i),r=Date.now(),t=!0)}}const Bo=["onKeypress"],Po={class:"m-fullscreen-img-scroller"},No=["src","alt"],Mo=n.defineComponent({__name:"MazFullscreenImg",props:{src:{},clickedElementBounds:{default:void 0},offset:{default:void 0},animation:{default:()=>({duration:300,easing:"ease-in-out"})},openInstanceClass:{default:"m-fullscreen-img-instance"},clickedElement:{},destroy:{type:Function,default:void 0},alt:{default:void 0},zoom:{type:Boolean,default:!0}},emits:["close","previous","next","before-close"],setup(o,{emit:e}){const t=o,s=e,r=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./MazSpinner-n0cEv2AX.cjs"))),i=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./x-mark-DW2WXkoF.cjs"))),a=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./chevron-left-Byr9GkwI.cjs"))),l=n.ref(!1),u=n.ref(!1),c=n.ref(!1),y=n.ref(!1),E=n.ref(!1),b=n.reactive({running:!1,ended:!1}),h=n.ref(t.clickedElement),T=n.computed(()=>t.clickedElement.getBoundingClientRect()),k=n.ref(),f=n.ref(t.src),m=n.ref(t.alt),z=n.ref(),p=n.ref(),I=n.ref(!0),S=n.computed(()=>({"--is-zoomed":E.value,"--invisible":I.value,"--absolute":!E.value}));function C(){var g,w;p.value&&(k.value=((g=p.value)==null?void 0:g.naturalWidth)>((w=p.value)==null?void 0:w.naturalHeight)),l.value=!0,u.value=!1,c.value=!0}n.watch(c,g=>{g&&A()},{immediate:!0});function x(){s("before-close"),O()}function B(g){g.key==="Escape"&&(g.preventDefault(),x()),(g.key==="ArrowLeft"||g.key==="ArrowRight")&&(g.preventDefault(),Y(g.key==="ArrowRight"?"next":"previous"))}function j(){document.documentElement.classList.add("--m-fullscreen-open")}function H(){document.documentElement.classList.remove("--m-fullscreen-open")}function _(){return[...document.querySelectorAll(".m-fullscreen-img-instance")]}function he(g,w){return w<0?g.length-1:w>=g.length?0:w}function K(g,w){g.classList.remove(t.openInstanceClass),w.classList.add(t.openInstanceClass);const L=w.getAttribute("data-src"),V=w.getAttribute("data-alt");m.value=V,f.value=L??f.value}function Y(g){I.value=!0;const w=document.querySelector(`.m-fullscreen-img-instance.${t.openInstanceClass}`);if(w){const L=_(),V=L.indexOf(w),N=g==="next"?V+1:V-1,M=L[he(L,N)];h.value=M,M&&K(w,M),s(g),l.value=!1,u.value=!0,ze(()=>l.value===!0,()=>{I.value=!1,E.value?Z():v()},{expectedValue:!0,interval:100,maxAttempts:50})}}function Z(){const g=p.value;if(!g){console.error("[maz-ui](vFullscreenImg) ImgElement is not defined");return}g.style.removeProperty("max-width"),g.style.removeProperty("max-height"),g==null||g.style.removeProperty("top"),g==null||g.style.removeProperty("left"),k.value?(g.style.height="100vh",g.style.removeProperty("width")):(g.style.width="100vw",g.style.removeProperty("height"))}function ve(){E.value?(E.value=!E.value,v()):(E.value=!E.value,Z())}function q(g){var L;b.running=!0,I.value=!1;const w=(L=p.value)==null?void 0:L.animate(g,{duration:t.animation.duration,easing:t.animation.easing});if(!w){console.error("[maz-ui](vFullscreenImg) animation is not defined"),b.running=!1,b.ended=!0;return}return w}function ie(g=t.offset??0){const w=h.value.clientWidth||1,L=h.value.clientHeight||1,V=window.innerWidth,N=window.innerHeight,M=Math.min((V-2*g)/w,(N-2*g)/L),pe=(V-w*M)/2,ge=(N-L*M)/2;return{centerX:pe,centerY:ge,width:w,height:L,scale:M}}function ae({trigger:g}){const{width:w,height:L,scale:V,centerX:N,centerY:M}=ie(),{top:pe,left:ge,width:Vt,height:Dt}=T.value,Ae=[{top:`${pe}px`,left:`${ge}px`,width:`${Vt}px`,height:`${Dt}px`,opacity:0},{top:`${M}px`,left:`${N}px`,width:`${w*V}px`,height:`${L*V}px`,opacity:1}];return{frames:g==="open"?Ae:Ae.reverse()}}function v(){const{height:g,width:w,scale:L}=ie(),V=k.value?{width:`${w*L}px`,maxHeight:`${g*L}px`}:{height:`${g*L}px`,maxWidth:`${w*L}px`};if(!p.value){console.error("[maz-ui](vFullscreenImg) ImgElement is not defined");return}k.value?(p.value.style.removeProperty("height"),p.value.style.removeProperty("maxHeight")):(p.value.style.removeProperty("width"),p.value.style.removeProperty("maxWidth")),Object.assign(p.value.style,V)}function A(){const{frames:g}=ae({trigger:"open"}),w=q(g);if(!w){console.error("[maz-ui](vFullscreenImg) open animation is not defined"),v();return}w.onfinish=()=>{v(),b.running=!1,b.ended=!0}}function O(){const{frames:g}=ae({trigger:"close"}),w=q(g);function L(){var V,N;s("close"),(V=z.value)==null||V.remove(),(N=t.destroy)==null||N.call(t),b.running=!1,b.ended=!0}if(!w){console.error("[maz-ui](vFullscreenImg) close animation is not defined"),L();return}w.onfinish=L}function X(){E.value||v()}return n.onMounted(()=>{u.value=!0,document.addEventListener("keydown",B),window.addEventListener("resize",X),j(),y.value=_().length>1}),n.onBeforeUnmount(()=>{document.removeEventListener("keydown",B),window.removeEventListener("resize",X),H()}),(g,w)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"FullscreenImgElement",ref:z,role:"button",class:"m-fullscreen-img m-reset-css",tabindex:"0",onClick:n.withModifiers(x,["stop"]),onKeypress:n.withKeys(n.withModifiers(x,["prevent"]),["esc"])},[c.value&&y.value?(n.openBlock(),n.createElementBlock("button",{key:0,type:"button",class:"m-fullscreen-btn --next",onClick:w[0]||(w[0]=n.withModifiers(L=>Y("next"),["stop"]))},[n.createVNode(n.unref(a),{class:"maz-rotate-180"})])):n.createCommentVNode("v-if",!0),c.value&&y.value?(n.openBlock(),n.createElementBlock("button",{key:1,type:"button",class:"m-fullscreen-btn --previous",onClick:w[1]||(w[1]=n.withModifiers(L=>Y("previous"),["stop"]))},[n.createVNode(n.unref(a))])):n.createCommentVNode("v-if",!0),n.createElementVNode("button",{type:"button",class:"m-fullscreen-btn --close",onClick:x},[n.createVNode(n.unref(i))]),n.createElementVNode("div",Po,[n.createElementVNode("img",{ref_key:"ImgElement",ref:p,src:f.value,alt:m.value??void 0,tabindex:"0",class:n.normalizeClass([S.value]),onLoad:C,onClick:w[2]||(w[2]=n.withModifiers(L=>g.zoom&&ve(),["stop"]))},null,42,No),n.withDirectives(n.createVNode(n.unref(r),{class:"m-fullscreen-img-loader"},null,512),[[n.vShow,u.value]])])],40,Bo))}}),re=(o,e)=>{const t=o.__vccOpts||o;for(const[s,r]of e)t[s]=r;return t},$o=re(Mo,[["__scopeId","data-v-24a18baf"]]),De="m-fullscreen-is-open";class Ho{constructor(){d(this,"options");d(this,"defaultOptions",{scaleOnHover:!1,blurOnHover:!1,disabled:!1,zoom:!0,offset:80,animation:{duration:300,easing:"ease-in-out"}});d(this,"mouseEnterListener");d(this,"mouseLeaveListener");d(this,"renderPreviewListener")}buildOptions(e,t){const s=typeof t.value=="object"?t.value:{src:t.value,alt:void 0},r=(s==null?void 0:s.src)??this.getImgSrc(e),i=(s==null?void 0:s.alt)??this.getImgAlt(e);return{...this.defaultOptions,...s,src:r,alt:i}}get allInstances(){return[...document.querySelectorAll(".m-fullscreen-img-instance")]}getImgSrc(e){var s;const t=((s=this.options)==null?void 0:s.src)||e.getAttribute("src")||e.getAttribute("data-src");if(!t)throw new Error('[maz-ui](fullscreen-img) src of image must be provided by `v-fullscreen=""`, `v-fullscreen="{ src: "" }"`, `src=""` or `data-src=""` atributes');return t}getImgAlt(e){var t;return((t=this.options)==null?void 0:t.alt)||e.getAttribute("alt")||e.getAttribute("data-alt")}create(e,t){if(this.options=this.buildOptions(e,t),this.options.disabled)return;e.style.cursor="move",(this.options.scaleOnHover||this.options.blurOnHover)&&(e.style.transition="all 200ms ease-in-out"),e.classList.add("m-fullscreen-img-instance"),e.setAttribute("data-src",this.getImgSrc(e));const s=this.getImgAlt(e);s&&e.setAttribute("data-alt",s),this.mouseEnterListener=()=>this.mouseEnter(e),this.mouseLeaveListener=()=>this.mouseLeave(e),this.renderPreviewListener=()=>this.renderPreview(e),e.addEventListener("mouseenter",this.mouseEnterListener),e.addEventListener("mouseleave",this.mouseLeaveListener),e.addEventListener("click",this.renderPreviewListener)}update(e,t){this.options=this.buildOptions(e,t)}remove(e){e.removeEventListener("mouseenter",this.mouseEnterListener),e.removeEventListener("mouseleave",this.mouseLeaveListener),e.removeEventListener("click",this.renderPreviewListener),e.classList.remove("m-fullscreen-img-instance"),e.style.cursor=""}renderPreview(e){return e.classList.add(De),fe($o,{props:{...this.options,openInstanceClass:De,clickedElement:e,clickedElementBounds:e.getBoundingClientRect()},addDestroyInProps:!0})}mouseLeave(e){this.options.scaleOnHover&&(e.style.transform=""),this.options.blurOnHover&&(e.style.filter=""),e.style.zIndex=""}mouseEnter(e){e.style.zIndex="1",this.options.scaleOnHover&&(e.style.transform="scale(1.04)"),this.options.blurOnHover&&(e.style.filter="blur(3px)")}}let ue;const vt={mounted(o,e){return ue=new Ho,ue.create(o,e)},updated(o,e){return ue.update(o,e)},unmounted(o){return ue.remove(o)}},pt={install(o){o.directive("fullscreen-img",vt)}},Fo="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",Te={baseClass:"m-lazy-img",loadedClass:"m-lazy-loaded",loadingClass:"m-lazy-loading",errorClass:"m-lazy-error",noPhotoClass:"m-lazy-no-photo",noPhoto:!1,observerOnce:!0,loadOnce:!1,noUseErrorPhoto:!1,observerOptions:{threshold:.1}};class gt{constructor(e={}){d(this,"observers",[]);d(this,"defaultOptions",Te);d(this,"options");d(this,"onImgLoadedCallback");d(this,"onImgErrorCallback");d(this,"hasImgLoaded",!1);this.options=this.buildOptions(e),this.onImgLoadedCallback=this.imageIsLoaded.bind(this),this.onImgErrorCallback=this.imageHasError.bind(this)}async loadErrorPhoto(){const{default:e}=await Promise.resolve().then(()=>require("./no-photography-CLNgmzDi.cjs"));return e}buildOptions(e){return{...this.defaultOptions,...e,observerOptions:{...this.defaultOptions.observerOptions,...e.observerOptions}}}removeClass(e,t){e.classList.remove(t)}addClass(e,t){e.classList.add(t)}removeAllStateClasses(e){this.removeClass(e,this.options.loadedClass),this.removeClass(e,this.options.loadingClass),this.removeClass(e,this.options.errorClass),this.removeClass(e,this.options.noPhotoClass)}setBaseClass(e){this.addClass(e,this.options.baseClass)}imageIsLoading(e){var t,s;this.addClass(e,this.options.loadingClass),(s=(t=this.options).onLoading)==null||s.call(t,e)}imageHasNoPhoto(e){this.removeClass(e,this.options.loadingClass),this.addClass(e,this.options.noPhotoClass),this.setDefaultPhoto(e)}imageIsLoaded(e){var t,s;this.hasImgLoaded=!0,this.removeClass(e,this.options.loadingClass),this.addClass(e,this.options.loadedClass),(s=(t=this.options).onLoaded)==null||s.call(t,e)}imageHasError(e){var t,s;this.removeClass(e,this.options.loadingClass),this.addClass(e,this.options.errorClass),(s=(t=this.options).onError)==null||s.call(t,e),this.setDefaultPhoto(e)}getSrc(e){return typeof e.value=="object"?e.value.src:e.value}getImageUrl(e,t){const s=this.getImgElement(e).getAttribute("data-lazy-src");return s||this.getSrc(t)}async setPictureSourceUrls(e){const t=e.querySelectorAll("source");if(t.length>0)for await(const s of t){const r=s.getAttribute("data-lazy-srcset");if(r)s.srcset=r;else return this.imageHasError(e)}else this.imageHasError(e)}hasBgImgMode(e){return e.arg==="bg-image"}isPictureElement(e){return e instanceof HTMLPictureElement}getImgElement(e){return this.isPictureElement(e)?e.querySelector("img"):e}async setDefaultPhoto(e){if(this.options.noUseErrorPhoto)return;const t=this.options.fallbackSrc??this.options.errorPhoto;typeof t=="string"&&this.addClass(e,this.options.noPhotoClass);const s=t??await this.loadErrorPhoto(),r=e.querySelectorAll("source");if(r.length>0)for await(const i of r)i.srcset=s;else this.setImgSrc(e,s)}addEventListenerToImg(e){const t=this.getImgElement(e);t.addEventListener("load",()=>this.onImgLoadedCallback(e),{once:!0}),t.addEventListener("error",s=>this.onImgErrorCallback(e,s),{once:!0})}async loadImage(e,t){if(this.imageIsLoading(e),this.isPictureElement(e))this.addEventListenerToImg(e),await this.setPictureSourceUrls(e);else{const s=this.getImageUrl(e,t);if(!s)return this.imageHasError(e);this.hasBgImgMode(t)?(e.style.backgroundImage=`url('${s}')`,this.imageIsLoaded(e)):(this.addEventListenerToImg(e),this.setImgSrc(e,s))}}setImgSrc(e,t){const s=this.getImgElement(e);s.src=t}handleIntersectionObserver(e,t,s,r){var i,a;this.observers.push(r);for(const l of s)if(l.isIntersecting){if((a=(i=this.options).onIntersecting)==null||a.call(i,l.target),this.options.observerOnce&&r.unobserve(e),this.options.loadOnce&&this.hasImgLoaded)return;this.loadImage(e,t)}}createObserver(e,t){const s=(a,l)=>{this.handleIntersectionObserver(e,t,a,l)},r=this.options.observerOptions;new IntersectionObserver(s,r).observe(e)}async imageHandler(e,t,s){if(s==="update")for await(const r of this.observers)r.unobserve(e);window.IntersectionObserver?this.createObserver(e,t):this.loadImage(e,t)}async bindUpdateHandler(e,t,s){if(this.options.noPhoto)return this.imageHasNoPhoto(e);await this.imageHandler(e,t,s)}async add(e,t){if(this.hasBgImgMode(t)&&this.isPictureElement(e))throw new Error(`[MazLazyImg] You can't use the "bg-image" mode with "<picture />" element`);setTimeout(()=>this.setBaseClass(e),0),e.getAttribute("src")||this.setImgSrc(e,Fo),await this.bindUpdateHandler(e,t,"bind")}async update(e,t){t.value!==t.oldValue&&(this.hasImgLoaded=!1,this.removeAllStateClasses(e),await this.bindUpdateHandler(e,t,"update"))}remove(e,t){this.hasImgLoaded=!1,this.hasBgImgMode(t)&&(e.style.backgroundImage=""),this.removeAllStateClasses(e);for(const s of this.observers)s.unobserve(e);this.observers=[]}}let ce;const jo={created(o,e){const t=typeof e.value=="object"?e.value:{};ce=new gt(t),ce.add(o,e)},updated(o,e){ce.update(o,e)},unmounted(o,e){ce.remove(o,e)}},yt={install(o,e={}){const t={...Te,...e,observerOptions:{...Te.observerOptions,...e.observerOptions}},s=new gt(t);o.directive("lazy-img",{created:s.add.bind(s),updated:s.update.bind(s),unmounted:s.remove.bind(s)})}},qo=`
|
|
2
2
|
.maz-zoom-img {
|
|
3
3
|
position: fixed;
|
|
4
4
|
top: 0;
|
|
@@ -121,4 +121,4 @@
|
|
|
121
121
|
|
|
122
122
|
.maz-zoom-img .maz-zoom-btn:hover {
|
|
123
123
|
background-color: hsl(0, 0%, 0%);
|
|
124
|
-
}`,Be={close:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>',next:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>',previous:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></svg>',spinner:'<svg width="40px" height="40px" version="1.1" xmlns="http://www.w3.org/2000/svg" fill="currentColor" x="0px" y="0px" viewBox="0 0 50 50" xml:space="preserve" class="maz-zoom-img__loader__svg" data-v-6d1cb50c=""><path d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z"></path></svg>'};class Uo{constructor(e){d(this,"options");d(this,"loader");d(this,"wrapper");d(this,"img");d(this,"keydownHandler");d(this,"onImgLoadedCallback");d(this,"buttonsAdded");d(this,"defaultOptions",{scale:!0,blur:!0,disabled:!1});d(this,"mouseEnterListener");d(this,"mouseLeaveListener");d(this,"renderPreviewListener");if(!e.value)throw new Error('[MazUI](zoom-img) Image path must be defined. Ex: `v-zoom-img="<PATH_TO_IMAGE>"`');if(typeof e.value=="object"&&!e.value.src)throw new Error("[maz-ui](zoom-img) src of image must be provided");this.buttonsAdded=!1,this.options=this.buildOptions(e),this.keydownHandler=this.keydownLister.bind(this),this.loader=this.getLoader(),this.wrapper=document.createElement("div"),this.wrapper.classList.add("maz-zoom-img__wrapper"),this.wrapper.prepend(this.loader),this.img=document.createElement("img"),this.onImgLoadedCallback=this.onImgLoaded.bind(this),this.imgEventHandler(!0)}buildOptions(e){return{...this.defaultOptions,...typeof e.value=="object"?e.value:{src:e.value}}}get allInstances(){return[...document.querySelectorAll(".maz-zoom-img-instance")]}create(e){this.options.disabled||(e.style.cursor="pointer",setTimeout(()=>e.classList.add("maz-zoom-img-instance")),e.setAttribute("data-zoom-src",this.options.src),this.options.alt&&e.setAttribute("data-zoom-alt",this.options.alt),e.style.transition="all 300ms ease-in-out",this.mouseEnterListener=()=>this.mouseEnter(e),this.mouseLeaveListener=()=>this.mouseLeave(e),this.renderPreviewListener=()=>this.renderPreview(e,this.options),e.addEventListener("mouseenter",this.mouseEnterListener),e.addEventListener("mouseleave",this.mouseLeaveListener),e.addEventListener("click",this.renderPreviewListener))}update(e){this.options=this.buildOptions(e)}remove(e){this.imgEventHandler(!1),e.removeEventListener("mouseenter",this.mouseEnterListener),e.removeEventListener("mouseleave",this.mouseLeaveListener),e.removeEventListener("click",this.renderPreviewListener),e.classList.remove("maz-zoom-img-instance"),e.removeAttribute("data-zoom-src"),e.removeAttribute("data-zoom-alt"),e.style.cursor=""}renderPreview(e,t){e.classList.add("maz-is-open"),this.addStyle(qo);const s=document.createElement("div");s.classList.add("maz-zoom-img"),s.setAttribute("id","MazImgPreviewFullsize"),s.addEventListener("click",r=>{s.isEqualNode(r.target)&&this.closePreview()}),typeof t=="object"&&(this.img.setAttribute("src",t.src),t.alt&&this.img.setAttribute("alt",t.alt),this.img.id="MazImgElement"),this.wrapper.append(this.img),s.append(this.wrapper),document.body.append(s),this.keyboardEventHandler(!0),setTimeout(()=>{s&&s.classList.add("maz-animate")},100)}onImgLoaded(){this.wrapper.style.width=`${this.img.width}px`,this.wrapper.style.minWidth="200px",this.loader.hidden=!0;const e=this.getButton(),t=[],s=this.allInstances.length>1;if(!this.buttonsAdded){if(this.buttonsAdded=!0,s){const r=this.getButton("previous"),i=this.getButton("next");t.push(r,i)}this.wrapper.append(e),s&&(this.wrapper.prepend(t[0]),this.wrapper.append(t[1]))}}getLoader(){const e=document.createElement("div");return e.classList.add("maz-zoom-img__loader"),e.innerHTML=Be.spinner,e}mouseLeave(e){this.options.scale&&(e.style.transform=""),this.options.blur&&(e.style.filter=""),e.style.zIndex=""}mouseEnter(e){e.style.zIndex="1",this.options.scale&&(e.style.transform="scale(1.1)"),this.options.blur&&(e.style.filter="blur(2px)")}keydownLister(e){e.preventDefault(),(e.key==="Escape"||e.key===" ")&&this.closePreview(),(e.key==="ArrowLeft"||e.key==="ArrowRight")&&this.nextPreviousImage(e.key==="ArrowRight")}getButton(e="close"){const t=document.createElement("button");t.innerHTML=Be[e];const s=()=>e==="close"?this.closePreview():this.allInstances?this.nextPreviousImage(e==="next"):null;return t.addEventListener("click",()=>{s()}),t.classList.add("maz-zoom-btn"),t.classList.add(`maz-zoom-btn--${e}`),t}closePreview(){const e=document.querySelector("#MazImgPreviewFullsize"),t=document.querySelector("#MazPreviewStyle"),s=document.querySelector(".maz-zoom-img-instance.maz-is-open");s&&s.classList.remove("maz-is-open"),e&&e.classList.remove("maz-animate"),this.keyboardEventHandler(!1),setTimeout(()=>{e&&e.remove(),t&&t.remove()},300)}getNewInstanceIndex(e){let t=e;return t<0?t=this.allInstances.length-1:t>=this.allInstances.length&&(t=0),t}nextPreviousImage(e){const t=e,s=document.querySelector(".maz-zoom-img-instance.maz-is-open");if(s){const r=this.allInstances.indexOf(s),i=t?r+1:r-1,a=this.allInstances[this.getNewInstanceIndex(i)];a&&this.useNextInstance(s,a)}}useNextInstance(e,t){e.classList.remove("maz-is-open"),t.classList.add("maz-is-open");const s=t.getAttribute("data-zoom-src"),r=t.getAttribute("data-zoom-alt");this.wrapper.style.width="",this.loader.hidden=!1,s&&this.img.setAttribute("src",s),r&&this.img.setAttribute("alt",r)}addStyle(e){const t=document.createElement("style");t.id="MazPreviewStyle",t.textContent=e,document.head.append(t)}keyboardEventHandler(e){if(e)return document.addEventListener("keydown",this.keydownHandler);document.removeEventListener("keydown",this.keydownHandler)}imgEventHandler(e){if(e)return this.img.addEventListener("load",this.onImgLoadedCallback);this.img.removeEventListener("load",this.onImgLoadedCallback)}}let de;const bt={created(o,e){de=new Uo(e),de.create(o)},updated(o,e){de.update(e)},unmounted(o){de.remove(o)}},wt={install(o){o.directive("zoom-img",bt)}},Wo=[ct,wt,yt,it,pt,mt],Ro={install(o){for(const e of Wo)e.install(o,{})}};function Et(o){return o?(o=o.toString(),o.charAt(0).toUpperCase()+o.slice(1)):""}const _o={style:"currency",minimumFractionDigits:2,round:!1};function Ko(o,e,t){let s=Number(o);return t.round&&(s=Math.floor(s),t.minimumFractionDigits=0),new Intl.NumberFormat(e,t).format(s)}function Yo(o,e,t){if(o===void 0)throw new TypeError("[maz-ui](FilterCurrency) The `number` attribute is required.");if(e===void 0)throw new TypeError("[maz-ui](FilterCurrency) The `locale` attribute is required.");if(typeof e!="string")throw new TypeError("[maz-ui](FilterCurrency) The `locale` attribute must be a string.");if(t.currency===void 0)throw new TypeError("[maz-ui](FilterCurrency) The `options.currency` attribute is required.")}function kt(o,e,t){const s={..._o,...t};Yo(o,e,s);try{return Ko(o,e,s)}catch(r){throw new Error(`[maz-ui](FilterCurrency) ${r}`)}}const Zo={month:"short",day:"numeric",year:"numeric"};function Ct(o,e,t){if(e===void 0)throw new TypeError("[maz-ui](FilterDate) The `locale` attribute is required.");if(typeof e!="string")throw new TypeError("[maz-ui](FilterDate) The `locale` attribute must be a string.");const s=t??Zo;try{const r=o instanceof Date?o:new Date(o);return new Intl.DateTimeFormat(e,s).format(r)}catch(r){throw new Error(`[maz-ui](FilterDate) ${r}`)}}const Xo={minimumFractionDigits:2};function Tt(o,e,t){const s={...Xo,...t};if(o===void 0)throw new TypeError("[maz-ui](FilterNumber) The `number` attribute is required.");if(e===void 0)throw new TypeError("[maz-ui](FilterNumber) The `locale` attribute is required.");if(typeof e!="string")throw new TypeError("[maz-ui](FilterNumber) The `locale` attribute must be a string.");try{return new Intl.NumberFormat(e,s).format(Number(o))}catch(r){throw new Error(`[maz-ui](FilterNumber) ${r}`)}}const Go={capitalize:Et,currency:kt,date:Ct,number:Tt},Qo={install(o){o.provide("filters",Go)}},we={delay:100,observer:{root:void 0,rootMargin:"0px",threshold:.2},animation:{once:!0,duration:300,delay:0}};class zt{constructor(e){d(this,"options");this.options={delay:(e==null?void 0:e.delay)??we.delay,observer:{...we.observer,...e==null?void 0:e.observer},animation:{...we.animation,...e==null?void 0:e.animation}}}handleIntersect(e,t){for(const s of e){const i=s.target.getAttribute("data-maz-aos-children")==="true",a=s.target.getAttribute("data-maz-aos")?[s.target]:[];if(i){const l=[...document.querySelectorAll("[data-maz-aos-anchor]")].map(u=>u.getAttribute("data-maz-aos-anchor")===`#${s.target.id}`?u:void 0);for(const u of l)u&&a.push(u)}for(const l of a){const u=l.getAttribute("data-maz-aos-once"),c=typeof u=="string"?u==="true":this.options.animation.once;if(typeof this.options.observer.threshold=="number"&&s.intersectionRatio>this.options.observer.threshold){const y=l.getAttribute("data-maz-aos-duration"),E=l.getAttribute("data-maz-aos-delay");if(y||(l.style.transitionDuration=`${this.options.animation.duration}ms`,setTimeout(()=>{l.style.transitionDuration="0"},1e3)),E||(l.style.transitionDelay=`${this.options.animation.delay}ms`,setTimeout(()=>{l.style.transitionDelay="0"},1e3)),l.classList.add("maz-aos-animate"),c){const b=l.getAttribute("data-maz-aos-anchor");if(b){const h=document.querySelector(b);h&&t.unobserve(h)}t.unobserve(l)}}else l.classList.remove("maz-aos-animate")}}}async handleObserver(){await ht(this.options.delay);const e=new IntersectionObserver(this.handleIntersect.bind(this),this.options.observer);for(const t of document.querySelectorAll("[data-maz-aos]")){const s=t.getAttribute("data-maz-aos-anchor");if(s){const r=document.querySelector(s);r?(r.setAttribute("data-maz-aos-children","true"),e.observe(r)):console.warn(`[maz-ui](aos) no element found with selector "${s}"`)}else e.observe(t)}}runAnimations(){if(D())return this.handleObserver();console.warn("[MazAos](runAnimations) should be executed on client side")}}let G;const Jo={install:(o,e)=>{G=new zt(e),o.provide("aos",G),D()&&(e!=null&&e.router?e.router.afterEach(()=>{G.runAnimations()}):G.runAnimations())}};function en(){return G}const tn={role:"dialog",class:"m-backdrop-container","aria-modal":"true"},on={class:"m-backdrop-wrapper"},Pe="--backdrop-present",nn=n.defineComponent({inheritAttrs:!1,__name:"MazBackdrop",props:{modelValue:{type:Boolean,default:!1},teleportSelector:{default:"body"},beforeClose:{type:Function,default:void 0},persistent:{type:Boolean,default:!1},noCloseOnEscKey:{type:Boolean,default:!1},transitionName:{default:"backdrop-anim"},backdropClass:{default:()=>{}},backdropContentClass:{default:()=>{}},contentPadding:{type:Boolean,default:!1},justify:{default:"none"},align:{default:"none"},variant:{}},emits:["open","close","update:model-value","before-close"],setup(o,{expose:e,emit:t}){const s=t;function r(){document.documentElement.classList.add(Pe)}function i(){document.querySelector(".m-backdrop.--present")||document.documentElement.classList.remove(Pe)}const a=n.ref(o.modelValue);function l(){u(!1)}async function u(m){var z;m||(s("before-close"),await((z=o.beforeClose)==null?void 0:z.call(o))),a.value=m}function c(){s("open")}function y(){s("update:model-value",!1),s("close"),T()}function E(){o.persistent||l()}function b(m){!o.noCloseOnEscKey&&m.key==="Escape"&&!o.persistent&&l()}function h(){r(),document.addEventListener("keyup",b,!1)}function T(){document.removeEventListener("keyup",b),i()}n.onMounted(()=>{o.modelValue?h():T()});let k=null;function f(m){const z=document.querySelector(m),I=z&&Array.from(z.querySelectorAll('a[href], button, textarea, input[type="text"], input[type="radio"], input[type="checkbox"], select')),S=I==null?void 0:I.filter(C=>{const x=window.getComputedStyle(C);return x.display!=="none"&&x.visibility!=="hidden"&&!C.disabled});return S&&S.length>0?S[0]:null}return n.watch(()=>o.modelValue,async m=>{if(a.value=m,m){h(),k=document.activeElement,await n.nextTick();const z=f(".m-backdrop-content");z==null||z.focus()}else T(),await n.nextTick(),k==null||k.focus()}),e({onBackdropAnimationEnter:c,onBackdropAnimationLeave:y,onBackdropClicked:E,close:l,present:a,toggleModal:u,onKeyPress:b}),(m,z)=>(n.openBlock(),n.createBlock(n.Teleport,{to:m.teleportSelector},[n.createVNode(n.Transition,{appear:"",name:m.transitionName,onAfterEnter:c,onAfterLeave:y},{default:n.withCtx(()=>[a.value?(n.openBlock(),n.createElementBlock("div",n.mergeProps({key:0,class:"m-backdrop --present m-reset-css"},m.$attrs,{class:[m.backdropClass,m.variant&&`--variant-${m.variant}`,{"--persistent":m.persistent}]}),[n.createElementVNode("div",tn,[n.createElementVNode("div",on,[n.createElementVNode("div",{class:n.normalizeClass(["m-backdrop-content",[m.backdropContentClass,`--justify-${m.justify}`,`--align-${m.align}`,{"--padding":m.contentPadding}]]),role:"button",tabindex:"-1",onClick:n.withModifiers(E,["self"])},[n.renderSlot(m.$slots,"default",{close:l,onBackdropClicked:E},void 0,!0)],2)])])],16)):n.createCommentVNode("v-if",!0)]),_:3},8,["name"])],8,["to"]))}}),sn=re(nn,[["__scopeId","data-v-90448c91"]]),rn={key:0,id:"dialogTitle",class:"m-dialog-title"},an={key:0,class:"m-dialog-footer"},ln=n.defineComponent({name:"MazDialog",inheritAttrs:!1,__name:"MazDialog",props:{modelValue:{type:Boolean},title:{default:void 0},noClose:{type:Boolean,default:!1},maxWidth:{default:"100%"},minWidth:{default:"32rem"},scrollable:{type:Boolean,default:!1},persistent:{type:Boolean,default:!1},teleportSelector:{},beforeClose:{},noCloseOnEscKey:{type:Boolean},transitionName:{},backdropClass:{},backdropContentClass:{},contentPadding:{type:Boolean},justify:{},align:{},variant:{}},emits:["open","close","update:model-value"],setup(o,{expose:e}){const t=o,s=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./MazBtn-BLdEX5rQ.cjs"))),r=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./x-mark-DW2WXkoF.cjs"))),i=n.useAttrs(),a=n.ref();e({close:()=>{var h,T;return(T=(h=a.value)==null?void 0:h.close)==null?void 0:T.call(h)}});const l=n.computed(()=>{const h=["modelValue","title","noClose","maxWidth","minWidth","scrollable"];return Object.fromEntries(Object.entries(t).filter(([T])=>!h.includes(T)))}),u=n.computed(()=>({...i,class:void 0,style:void 0})),c=n.computed(()=>({class:i.class,style:i.style})),y=n.ref(),E=n.useSlots(),b=n.computed(()=>!!E.footer);return t.scrollable&&n.watch(()=>t.modelValue,async h=>{await n.nextTick(),h&&y.value&&setTimeout(()=>{var T;(T=y.value)==null||T.scrollTo({top:0,behavior:"instant"})},0)}),(h,T)=>(n.openBlock(),n.createBlock(sn,n.mergeProps({...u.value,...l.value},{ref_key:"backdrop",ref:a,"model-value":h.modelValue,"transition-name":"modal-anim","aria-labelledby":"dialogTitle","aria-describedby":"dialogDesc","content-padding":"",justify:"center",variant:"dialog",onClose:T[0]||(T[0]=k=>h.$emit("close",k)),onOpen:T[1]||(T[1]=k=>h.$emit("open",k)),"onUpdate:modelValue":T[2]||(T[2]=k=>h.$emit("update:model-value",k))}),{default:n.withCtx(({close:k,onBackdropClicked:f})=>[n.createElementVNode("div",n.mergeProps({class:["m-dialog",{"--scrollable":h.scrollable}],role:"dialog","aria-modal":"true",style:[{"--max-width":h.maxWidth,"--min-width":h.minWidth}]},c.value),[n.renderSlot(h.$slots,"header",{close:k,onBackdropClicked:f},()=>[n.createElementVNode("div",{class:n.normalizeClass(["m-dialog-header",{"--has-title":h.$slots.title||h.title}])},[h.$slots.title||h.title?(n.openBlock(),n.createElementBlock("h2",rn,[n.renderSlot(h.$slots,"title",{},()=>[n.createTextVNode(n.toDisplayString(h.title),1)],!0)])):n.createCommentVNode("v-if",!0),!h.noClose&&!h.persistent?(n.openBlock(),n.createBlock(n.unref(s),{key:1,color:"transparent",size:"sm",icon:n.unref(r),onClick:k},null,8,["icon","onClick"])):n.createCommentVNode("v-if",!0)],2)],!0),n.createElementVNode("div",{id:"dialogDesc",ref_key:"dialogContent",ref:y,class:n.normalizeClass(["m-dialog-content",{"--bottom-padding":!b.value}])},[n.renderSlot(h.$slots,"default",{close:k,onBackdropClicked:f},void 0,!0)],2),b.value?(n.openBlock(),n.createElementBlock("div",an,[n.renderSlot(h.$slots,"footer",{close:k,onBackdropClicked:f},void 0,!0)])):n.createCommentVNode("v-if",!0)],16)]),_:3},16,["model-value"]))}}),un=re(ln,[["__scopeId","data-v-b8a6c7fb"]]),U={cancelText:"Cancel",confirmText:"Confirm",cancelButton:{text:"Cancel",color:"danger"},confirmButton:{text:"Confirm",color:"success"}},cn=n.ref(U),W=n.ref([]);function dn(o,e){return new Promise((t,s)=>{W.value=[...W.value,{id:o,isActive:!0,resolve:async r=>{t(r),await(e==null?void 0:e())},reject:async r=>{s(r),await(e==null?void 0:e())}}]})}function Lt(o){return W.value=W.value.filter(({id:e})=>e!==o),W.value}function Ne(o,e,t){var s;e&&((s=e[o])==null||s.call(e,t),e.isActive=!1,setTimeout(()=>{Lt(e.id)},500))}function It(){return{data:cn,dialogState:W,showDialogAndWaitChoice:dn,removeDialogFromState:Lt,rejectDialog:async(o,e=new Error("cancel"),t)=>(await(t==null?void 0:t()),Ne("reject",o,e)),resolveDialog:async(o,e="accept",t)=>(await(t==null?void 0:t()),Ne("resolve",o,e))}}const mn={class:"maz-flex maz-items-center maz-gap-2"},fn=n.defineComponent({__name:"MazDialogPromise",props:{data:{default:void 0},message:{default:void 0},identifier:{default:void 0},buttons:{default:void 0},modelValue:{type:Boolean},title:{},noClose:{type:Boolean},maxWidth:{},minWidth:{},scrollable:{type:Boolean},persistent:{type:Boolean},teleportSelector:{},beforeClose:{},noCloseOnEscKey:{type:Boolean},transitionName:{},backdropClass:{},backdropContentClass:{},contentPadding:{type:Boolean},justify:{},align:{},variant:{},cancelText:{},cancelButton:{type:[Boolean,Object]},confirmText:{},confirmButton:{type:[Boolean,Object]}},emits:["open","close"],setup(o,{expose:e}){const t=o,s=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./MazBtn-BLdEX5rQ.cjs"))),{dialogState:r,rejectDialog:i,resolveDialog:a,data:l}=It(),u=n.computed(()=>{var f;return t.buttons??((f=t.data)==null?void 0:f.buttons)??l.value.buttons}),c=n.computed(()=>({...U,...l.value,...t.data})),y=n.computed(()=>{var z,p,I,S;if(!(((z=l.value)==null?void 0:z.cancelButton)??((p=t.data)==null?void 0:p.cancelButton)??U.cancelButton))return;const m={...U.cancelButton,...(I=l.value)==null?void 0:I.cancelButton,...(S=t.data)==null?void 0:S.cancelButton};return{...m,text:t.cancelText||c.value.cancelText||m.text}}),E=n.computed(()=>{var z,p,I,S;if(!(((z=l.value)==null?void 0:z.confirmButton)??((p=t.data)==null?void 0:p.confirmButton)??U.confirmButton))return;const m={...U.confirmButton,...(I=l.value)==null?void 0:I.confirmButton,...(S=t.data)==null?void 0:S.confirmButton};return{...m,text:t.confirmText||c.value.confirmText||m.text}}),b=n.computed(()=>r.value.find(({id:f})=>f===t.identifier)),h=n.ref();e({close:()=>{var f,m;return(m=(f=h.value)==null?void 0:f.close)==null?void 0:m.call(f)}});function T(f){return"type"in f&&(f.type==="resolve"||f.type==="reject")}function k(f,m){return T(m)?m.type==="resolve"?a(f,m.response):i(f,m.response):a(f,void 0,m.action)}return(f,m)=>{var z;return n.openBlock(),n.createBlock(un,n.mergeProps({ref_key:"dialog",ref:h},{...f.$attrs,...t},{"model-value":((z=b.value)==null?void 0:z.isActive)??f.modelValue??!1,onClose:m[2]||(m[2]=p=>f.$emit("close",p)),onOpen:m[3]||(m[3]=p=>f.$emit("open",p)),"onUpdate:modelValue":m[4]||(m[4]=p=>n.unref(i)(b.value))}),{title:n.withCtx(()=>[n.renderSlot(f.$slots,"title",{},()=>{var p;return[n.createTextVNode(n.toDisplayString(f.title||((p=c.value)==null?void 0:p.title)),1)]})]),default:n.withCtx(()=>[n.renderSlot(f.$slots,"default",{resolve:p=>n.unref(a)(b.value,p),reject:p=>n.unref(i)(b.value,p)},()=>{var p;return[n.createTextVNode(n.toDisplayString(f.message||((p=c.value)==null?void 0:p.message)),1)]})]),footer:n.withCtx(()=>[n.renderSlot(f.$slots,"footer-button",{resolve:p=>n.unref(a)(b.value,p),reject:p=>n.unref(i)(b.value,p)},()=>[n.createElementVNode("div",mn,[u.value?(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:0},n.renderList(u.value,(p,I)=>(n.openBlock(),n.createBlock(n.unref(s),n.mergeProps({key:I,ref_for:!0},{...p,type:"button"},{onClick:S=>k(b.value,p)}),{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(p.text),1)]),_:2},1040,["onClick"]))),128)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[y.value?(n.openBlock(),n.createBlock(n.unref(s),n.mergeProps({key:0},y.value,{onClick:m[0]||(m[0]=p=>n.unref(i)(b.value))}),{default:n.withCtx(()=>[n.renderSlot(f.$slots,"cancel-text",{},()=>[n.createTextVNode(n.toDisplayString(y.value.text),1)])]),_:3},16)):n.createCommentVNode("v-if",!0),E.value?(n.openBlock(),n.createBlock(n.unref(s),n.mergeProps({key:1},E.value,{onClick:m[1]||(m[1]=p=>n.unref(a)(b.value))}),{default:n.withCtx(()=>[n.renderSlot(f.$slots,"confirm-text",{},()=>[n.createTextVNode(n.toDisplayString(E.value.text),1)])]),_:3},16)):n.createCommentVNode("v-if",!0)],64))])])]),_:3},16,["model-value"])}}}),Me={identifier:"main-dialog"};class At{constructor(e,t=Me){this.app=e,this.globalOptions=t}open(e){const t={...Me,...this.globalOptions,...e},{destroy:s,vNode:r}=fe(fn,{props:t,app:this.app}),{showDialogAndWaitChoice:i}=It();function a(){var u,c,y;(c=(u=r.component)==null?void 0:u.exposed)==null||c.close(),(y=t.promiseCallback)==null||y.call(t),setTimeout(()=>{s()},700)}return{promise:i(t.identifier,()=>{a()}),destroy:s,close:a}}}const hn={install(o,e){o.provide("dialog",new At(o,e))}},vn={class:"m-toast__message-wrapper"},pn={class:"m-toast__message"},gn={class:"maz-flex maz-items-center maz-gap-2"},yn={key:0},bn={key:4,class:"progress-bar maz-absolute maz-inset-x-0 maz-bottom-0 maz-h-1"},wn=n.defineComponent({__name:"MazToast",props:{message:{default:void 0},position:{default:"bottom-right"},maxToasts:{type:[Number,Boolean],default:!1},timeout:{type:[Number,Boolean],default:1e4},queue:{type:Boolean},noPauseOnHover:{type:Boolean},type:{default:"info"},link:{default:void 0},action:{default:void 0},persistent:{type:Boolean},icon:{type:Boolean,default:!0}},emits:["close","click","open"],setup(o,{expose:e,emit:t}){const s=o,r=t,i=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./MazBtn-BLdEX5rQ.cjs"))),a=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./x-mark-DW2WXkoF.cjs"))),l=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./arrow-top-right-on-square-PZtr8Zs0.cjs"))),u=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./exclamation-triangle-BtW3be9S.cjs"))),c=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./exclamation-circle-BXs0Yj0f.cjs"))),y=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./information-circle-89FseEuJ.cjs"))),E=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./check-circle-D3i-p-t3.cjs"))),b=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./link-CUxj8BQ5.cjs"))),h=n.ref(),T=n.computed(()=>{if(s.icon)switch(s.type){case"danger":return u;case"info":return y;case"success":return E;case"warning":return c;default:return}}),k=n.computed(()=>s.position.includes("top")?"top":"bottom"),f=n.computed(()=>s.position.includes("left")?"left":s.position.includes("right")?"right":"center"),m=n.computed(()=>f.value!=="center"?f.value==="right"?"m-slide-right":"m-slide-left":k.value==="top"?"m-slide-top":"m-slide-bottom"),z=n.ref(!1),p=n.ref(!1),I=n.ref(),S=`m-toast-container m-reset-css --${k.value} --${f.value}`,C=`.${S.replaceAll(" ",".")}`,x=et({callback:q,timeout:typeof s.timeout=="number"?s.timeout:0,callbackOffsetTime:200});function B(){const v=document.querySelector(C);if(!v&&!v){const A=document.body,O=document.createElement("div");O.className=S,A.append(O)}}function j(){const v=document.querySelector(C);return!s.queue&&s.maxToasts===!1?!1:typeof s.maxToasts=="number"&&v?s.maxToasts<=v.childElementCount:v&&v.childElementCount>0}function H(){if(j()){I.value=setTimeout(H,250);return}const v=document.querySelector(C);h.value&&v&&v.prepend(h.value),p.value=!0,typeof s.timeout=="number"&&s.timeout>0&&x.start()}const _=n.ref("100%");function he(){switch(s.type){case"danger":return"maz-bg-danger-700";case"info":return"maz-bg-info-700";case"success":return"maz-bg-success-700";case"warning":return"maz-bg-warning-700";default:return"maz-bg-primary"}}n.watch(x.remainingTime,v=>{if(typeof s.timeout=="number"){const A=100*v/s.timeout;_.value=`${A}%`}});function K(v){r("click",v),s.persistent||q()}async function Y(v,A){var O;z.value=!0,await v(),z.value=!1,(O=s.action)!=null&&O.closeToast&&K(A)}function Z(v){s.noPauseOnHover||(v?x.pause():x.resume())}function ve(){x.stop(),I.value&&clearTimeout(I.value)}function q(){ve(),p.value=!1}e({closeToast:q});function ie(){r("open")}function ae(){var A;r("close"),(A=h.value)==null||A.remove();const v=document.querySelector(C);v&&!(v!=null&&v.hasChildNodes())&&v.remove()}return n.onMounted(()=>{B(),H()}),(v,A)=>(n.openBlock(),n.createBlock(n.Transition,{name:m.value,onAfterLeave:ae,onAfterEnter:ie,persisted:""},{default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("button",{ref_key:"Toaster",ref:h,class:n.normalizeClass(["m-toast m-reset-css",[`--${v.type}`,`--${k.value}`,`--${f.value}`,{"maz-pb-1":typeof v.timeout=="number"&&v.timeout>0,"--persistent":v.persistent}]]),role:"alert",onMouseover:A[2]||(A[2]=O=>Z(!0)),onMouseleave:A[3]||(A[3]=O=>Z(!1)),onClick:A[4]||(A[4]=n.withModifiers(O=>{var X;return v.link&&!((X=v.link)!=null&&X.closeToast)?void 0:K(O)},["stop"]))},[T.value?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(T.value),{key:0,class:"maz-text-2xl"})):n.createCommentVNode("v-if",!0),n.createElementVNode("div",vn,[n.createElementVNode("p",pn,n.toDisplayString(v.message),1)]),v.action?(n.openBlock(),n.createBlock(n.unref(i),{key:1,"data-test":"action-btn",color:v.type,pastel:"",loading:z.value,size:"sm",onClick:A[0]||(A[0]=n.withModifiers(O=>v.action?Y(v.action.func,O):void 0,["stop"]))},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(v.action.text),1)]),_:1},8,["color","loading"])):n.createCommentVNode("v-if",!0),v.link?(n.openBlock(),n.createBlock(n.unref(i),{key:2,"data-test":"link-btn",color:v.type,pastel:"",size:"xs",href:v.link.href,target:v.link.target??"_self"},{default:n.withCtx(()=>{var O;return[n.createElementVNode("div",gn,[v.link.text?(n.openBlock(),n.createElementBlock("span",yn,n.toDisplayString(v.link.text),1)):n.createCommentVNode("v-if",!0),((O=v.link)==null?void 0:O.target)==="_blank"?(n.openBlock(),n.createBlock(n.unref(l),{key:1,class:"maz-text-xl"})):(n.openBlock(),n.createBlock(n.unref(b),{key:2,class:"maz-text-xl"}))])]}),_:1},8,["color","href","target"])):n.createCommentVNode("v-if",!0),v.persistent?n.createCommentVNode("v-if",!0):(n.openBlock(),n.createElementBlock("button",{key:3,class:"--close",onClick:A[1]||(A[1]=n.withModifiers(O=>K(O),["stop"]))},[n.createVNode(n.unref(a),{class:"--icon maz-text-xl"})])),typeof v.timeout=="number"&&v.timeout>0?(n.openBlock(),n.createElementBlock("div",bn,[n.createElementVNode("div",{style:n.normalizeStyle({width:_.value}),class:n.normalizeClass(["maz-h-full !maz-transition-all !maz-duration-200 !maz-ease-linear",he()])},null,6)])):n.createCommentVNode("v-if",!0)],34),[[n.vShow,p.value]])]),_:1},8,["name"]))}}),En=re(wn,[["__scopeId","data-v-b70bc12e"]]),kn={position:"bottom-right",timeout:1e4,persistent:!1,icon:!0};class St{constructor(e,t){this.app=e,this.globalOptions=t}show(e,t){const s={...kn,...this.globalOptions,...t,message:e},{destroy:r,vNode:i}=fe(En,{props:s,app:this.app});return{destroy:r,close:()=>{var a,l;return(l=(a=i.component)==null?void 0:a.exposed)==null?void 0:l.closeToast()}}}getLocalOptions(e,t){return{type:e,...t}}message(e,t){return this.show(e,this.getLocalOptions("theme",t))}success(e,t){return this.show(e,this.getLocalOptions("success",t))}error(e,t){return this.show(e,this.getLocalOptions("danger",t))}info(e,t){return this.show(e,this.getLocalOptions("info",t))}warning(e,t){return this.show(e,this.getLocalOptions("warning",t))}}function Cn(o,e){return new St(o,e)}const Tn={install(o,e){o.provide("toast",Cn(o,e))}},R="";function zn(o){return o.filter((e,t,s)=>t===s.indexOf(e))}function Ln(o){return(e=R)=>typeof e=="function"?o.findIndex((...t)=>e(...t))>-1:o.includes(e)}const In=o=>o.length>0;function An(o){return(e=R)=>zn([...o,e])}function Sn(o){return(e=R)=>o.filter(t=>t!==e)}class xt{constructor(){d(this,"_loaders",n.ref([]))}get loaders(){return n.computed(()=>this._loaders.value)}stop(e=R){this._loaders.value=Sn(this._loaders.value)(e)}start(e=R){return this._loaders.value=An(this._loaders.value)(e),()=>this.stop(e)}get anyLoading(){return n.computed(()=>In(this._loaders.value))}isLoading(e=R){return n.computed(()=>Ln(this._loaders.value)(e)).value}}const Ot=new xt,xn={install:o=>{o.provide("wait",Ot)}};exports.AosHandler=zt;exports.DialogHandler=At;exports.IdleTimeout=_e;exports.ScriptLoader=Vo;exports.Swipe=Ge;exports.ToasterHandler=St;exports.UserVisibility=tt;exports.WaitHandler=xt;exports._export_sfc=re;exports.capitalize=Et;exports.checkAvailability=ze;exports.countryCodeToUnicodeFlag=xo;exports.currency=kt;exports.date=Ct;exports.debounce=Oo;exports.directive=rt;exports.directive$1=ut;exports.directive$2=So;exports.directive$3=vt;exports.directive$4=jo;exports.getInstance=en;exports.injectStrict=J;exports.installDialog=hn;exports.installFilters=Qo;exports.installToaster=Tn;exports.instance=Ot;exports.isClient=D;exports.iso6391Codes=Ke;exports.languageCodes=Ye;exports.mount=fe;exports.normalizeString=Ee;exports.number=Tt;exports.plugin=Ro;exports.plugin$1=it;exports.plugin$2=ct;exports.plugin$3=mt;exports.plugin$4=pt;exports.plugin$5=yt;exports.plugin$6=wt;exports.plugin$7=Jo;exports.plugin$8=xn;exports.sleep=ht;exports.throttle=Do;exports.truthyFilter=ft;exports.useAos=Nt;exports.useBreakpoints=$t;exports.useDialog=Ht;exports.useFormField=ro;exports.useFormValidator=io;exports.useIdleTimeout=ao;exports.useInstanceUniqId=lo;exports.useLanguageDisplayNames=co;exports.useReadingTime=fo;exports.useStringMatching=go;exports.useSwipe=bo;exports.useThemeHandler=ko;exports.useTimer=et;exports.useToast=Co;exports.useUserVisibility=To;exports.useWait=zo;exports.useWindowSize=$e;exports.vZoomImg=bt;
|
|
124
|
+
}`,Be={close:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>',next:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>',previous:'<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M0 0h24v24H0z" fill="none"/><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></svg>',spinner:'<svg width="40px" height="40px" version="1.1" xmlns="http://www.w3.org/2000/svg" fill="currentColor" x="0px" y="0px" viewBox="0 0 50 50" xml:space="preserve" class="maz-zoom-img__loader__svg" data-v-6d1cb50c=""><path d="M43.935,25.145c0-10.318-8.364-18.683-18.683-18.683c-10.318,0-18.683,8.365-18.683,18.683h4.068c0-8.071,6.543-14.615,14.615-14.615c8.072,0,14.615,6.543,14.615,14.615H43.935z"></path></svg>'};class Uo{constructor(e){d(this,"options");d(this,"loader");d(this,"wrapper");d(this,"img");d(this,"keydownHandler");d(this,"onImgLoadedCallback");d(this,"buttonsAdded");d(this,"defaultOptions",{scale:!0,blur:!0,disabled:!1});d(this,"mouseEnterListener");d(this,"mouseLeaveListener");d(this,"renderPreviewListener");if(!e.value)throw new Error('[MazUI](zoom-img) Image path must be defined. Ex: `v-zoom-img="<PATH_TO_IMAGE>"`');if(typeof e.value=="object"&&!e.value.src)throw new Error("[maz-ui](zoom-img) src of image must be provided");this.buttonsAdded=!1,this.options=this.buildOptions(e),this.keydownHandler=this.keydownLister.bind(this),this.loader=this.getLoader(),this.wrapper=document.createElement("div"),this.wrapper.classList.add("maz-zoom-img__wrapper"),this.wrapper.prepend(this.loader),this.img=document.createElement("img"),this.onImgLoadedCallback=this.onImgLoaded.bind(this),this.imgEventHandler(!0)}buildOptions(e){return{...this.defaultOptions,...typeof e.value=="object"?e.value:{src:e.value}}}get allInstances(){return[...document.querySelectorAll(".maz-zoom-img-instance")]}create(e){this.options.disabled||(e.style.cursor="pointer",setTimeout(()=>e.classList.add("maz-zoom-img-instance")),e.setAttribute("data-zoom-src",this.options.src),this.options.alt&&e.setAttribute("data-zoom-alt",this.options.alt),e.style.transition="all 300ms ease-in-out",this.mouseEnterListener=()=>this.mouseEnter(e),this.mouseLeaveListener=()=>this.mouseLeave(e),this.renderPreviewListener=()=>this.renderPreview(e,this.options),e.addEventListener("mouseenter",this.mouseEnterListener),e.addEventListener("mouseleave",this.mouseLeaveListener),e.addEventListener("click",this.renderPreviewListener))}update(e){this.options=this.buildOptions(e)}remove(e){this.imgEventHandler(!1),e.removeEventListener("mouseenter",this.mouseEnterListener),e.removeEventListener("mouseleave",this.mouseLeaveListener),e.removeEventListener("click",this.renderPreviewListener),e.classList.remove("maz-zoom-img-instance"),e.removeAttribute("data-zoom-src"),e.removeAttribute("data-zoom-alt"),e.style.cursor=""}renderPreview(e,t){e.classList.add("maz-is-open"),this.addStyle(qo);const s=document.createElement("div");s.classList.add("maz-zoom-img"),s.setAttribute("id","MazImgPreviewFullsize"),s.addEventListener("click",r=>{s.isEqualNode(r.target)&&this.closePreview()}),typeof t=="object"&&(this.img.setAttribute("src",t.src),t.alt&&this.img.setAttribute("alt",t.alt),this.img.id="MazImgElement"),this.wrapper.append(this.img),s.append(this.wrapper),document.body.append(s),this.keyboardEventHandler(!0),setTimeout(()=>{s&&s.classList.add("maz-animate")},100)}onImgLoaded(){this.wrapper.style.width=`${this.img.width}px`,this.wrapper.style.minWidth="200px",this.loader.hidden=!0;const e=this.getButton(),t=[],s=this.allInstances.length>1;if(!this.buttonsAdded){if(this.buttonsAdded=!0,s){const r=this.getButton("previous"),i=this.getButton("next");t.push(r,i)}this.wrapper.append(e),s&&(this.wrapper.prepend(t[0]),this.wrapper.append(t[1]))}}getLoader(){const e=document.createElement("div");return e.classList.add("maz-zoom-img__loader"),e.innerHTML=Be.spinner,e}mouseLeave(e){this.options.scale&&(e.style.transform=""),this.options.blur&&(e.style.filter=""),e.style.zIndex=""}mouseEnter(e){e.style.zIndex="1",this.options.scale&&(e.style.transform="scale(1.1)"),this.options.blur&&(e.style.filter="blur(2px)")}keydownLister(e){e.preventDefault(),(e.key==="Escape"||e.key===" ")&&this.closePreview(),(e.key==="ArrowLeft"||e.key==="ArrowRight")&&this.nextPreviousImage(e.key==="ArrowRight")}getButton(e="close"){const t=document.createElement("button");t.innerHTML=Be[e];const s=()=>e==="close"?this.closePreview():this.allInstances?this.nextPreviousImage(e==="next"):null;return t.addEventListener("click",()=>{s()}),t.classList.add("maz-zoom-btn"),t.classList.add(`maz-zoom-btn--${e}`),t}closePreview(){const e=document.querySelector("#MazImgPreviewFullsize"),t=document.querySelector("#MazPreviewStyle"),s=document.querySelector(".maz-zoom-img-instance.maz-is-open");s&&s.classList.remove("maz-is-open"),e&&e.classList.remove("maz-animate"),this.keyboardEventHandler(!1),setTimeout(()=>{e&&e.remove(),t&&t.remove()},300)}getNewInstanceIndex(e){let t=e;return t<0?t=this.allInstances.length-1:t>=this.allInstances.length&&(t=0),t}nextPreviousImage(e){const t=e,s=document.querySelector(".maz-zoom-img-instance.maz-is-open");if(s){const r=this.allInstances.indexOf(s),i=t?r+1:r-1,a=this.allInstances[this.getNewInstanceIndex(i)];a&&this.useNextInstance(s,a)}}useNextInstance(e,t){e.classList.remove("maz-is-open"),t.classList.add("maz-is-open");const s=t.getAttribute("data-zoom-src"),r=t.getAttribute("data-zoom-alt");this.wrapper.style.width="",this.loader.hidden=!1,s&&this.img.setAttribute("src",s),r&&this.img.setAttribute("alt",r)}addStyle(e){const t=document.createElement("style");t.id="MazPreviewStyle",t.textContent=e,document.head.append(t)}keyboardEventHandler(e){if(e)return document.addEventListener("keydown",this.keydownHandler);document.removeEventListener("keydown",this.keydownHandler)}imgEventHandler(e){if(e)return this.img.addEventListener("load",this.onImgLoadedCallback);this.img.removeEventListener("load",this.onImgLoadedCallback)}}let de;const bt={created(o,e){de=new Uo(e),de.create(o)},updated(o,e){de.update(e)},unmounted(o){de.remove(o)}},wt={install(o){o.directive("zoom-img",bt)}},Wo=[ct,wt,yt,it,pt,mt],Ro={install(o){for(const e of Wo)e.install(o,{})}};function Et(o){return o?(o=o.toString(),o.charAt(0).toUpperCase()+o.slice(1)):""}const _o={style:"currency",minimumFractionDigits:2,round:!1};function Ko(o,e,t){let s=Number(o);return t.round&&(s=Math.floor(s),t.minimumFractionDigits=0),new Intl.NumberFormat(e,t).format(s)}function Yo(o,e,t){if(o===void 0)throw new TypeError("[maz-ui](FilterCurrency) The `number` attribute is required.");if(e===void 0)throw new TypeError("[maz-ui](FilterCurrency) The `locale` attribute is required.");if(typeof e!="string")throw new TypeError("[maz-ui](FilterCurrency) The `locale` attribute must be a string.");if(t.currency===void 0)throw new TypeError("[maz-ui](FilterCurrency) The `options.currency` attribute is required.")}function kt(o,e,t){const s={..._o,...t};Yo(o,e,s);try{return Ko(o,e,s)}catch(r){throw new Error(`[maz-ui](FilterCurrency) ${r}`)}}const Zo={month:"short",day:"numeric",year:"numeric"};function Ct(o,e,t){if(e===void 0)throw new TypeError("[maz-ui](FilterDate) The `locale` attribute is required.");if(typeof e!="string")throw new TypeError("[maz-ui](FilterDate) The `locale` attribute must be a string.");const s=t??Zo;try{const r=o instanceof Date?o:new Date(o);return new Intl.DateTimeFormat(e,s).format(r)}catch(r){throw new Error(`[maz-ui](FilterDate) ${r}`)}}const Xo={minimumFractionDigits:2};function Tt(o,e,t){const s={...Xo,...t};if(o===void 0)throw new TypeError("[maz-ui](FilterNumber) The `number` attribute is required.");if(e===void 0)throw new TypeError("[maz-ui](FilterNumber) The `locale` attribute is required.");if(typeof e!="string")throw new TypeError("[maz-ui](FilterNumber) The `locale` attribute must be a string.");try{return new Intl.NumberFormat(e,s).format(Number(o))}catch(r){throw new Error(`[maz-ui](FilterNumber) ${r}`)}}const Go={capitalize:Et,currency:kt,date:Ct,number:Tt},Qo={install(o){o.provide("filters",Go)}},we={delay:100,observer:{root:void 0,rootMargin:"0px",threshold:.2},animation:{once:!0,duration:300,delay:0}};class zt{constructor(e){d(this,"options");this.options={delay:(e==null?void 0:e.delay)??we.delay,observer:{...we.observer,...e==null?void 0:e.observer},animation:{...we.animation,...e==null?void 0:e.animation}}}handleIntersect(e,t){for(const s of e){const i=s.target.getAttribute("data-maz-aos-children")==="true",a=s.target.getAttribute("data-maz-aos")?[s.target]:[];if(i){const l=[...document.querySelectorAll("[data-maz-aos-anchor]")].map(u=>u.getAttribute("data-maz-aos-anchor")===`#${s.target.id}`?u:void 0);for(const u of l)u&&a.push(u)}for(const l of a){const u=l.getAttribute("data-maz-aos-once"),c=typeof u=="string"?u==="true":this.options.animation.once;if(typeof this.options.observer.threshold=="number"&&s.intersectionRatio>this.options.observer.threshold){const y=l.getAttribute("data-maz-aos-duration"),E=l.getAttribute("data-maz-aos-delay");if(y||(l.style.transitionDuration=`${this.options.animation.duration}ms`,setTimeout(()=>{l.style.transitionDuration="0"},1e3)),E||(l.style.transitionDelay=`${this.options.animation.delay}ms`,setTimeout(()=>{l.style.transitionDelay="0"},1e3)),l.classList.add("maz-aos-animate"),c){const b=l.getAttribute("data-maz-aos-anchor");if(b){const h=document.querySelector(b);h&&t.unobserve(h)}t.unobserve(l)}}else l.classList.remove("maz-aos-animate")}}}async handleObserver(){await ht(this.options.delay);const e=new IntersectionObserver(this.handleIntersect.bind(this),this.options.observer);for(const t of document.querySelectorAll("[data-maz-aos]")){const s=t.getAttribute("data-maz-aos-anchor");if(s){const r=document.querySelector(s);r?(r.setAttribute("data-maz-aos-children","true"),e.observe(r)):console.warn(`[maz-ui](aos) no element found with selector "${s}"`)}else e.observe(t)}}runAnimations(){if(D())return this.handleObserver();console.warn("[MazAos](runAnimations) should be executed on client side")}}let G;const Jo={install:(o,e)=>{G=new zt(e),o.provide("aos",G),D()&&(e!=null&&e.router?e.router.afterEach(()=>{G.runAnimations()}):G.runAnimations())}};function en(){return G}const tn={role:"dialog",class:"m-backdrop-container","aria-modal":"true"},on={class:"m-backdrop-wrapper"},Pe="--backdrop-present",nn=n.defineComponent({inheritAttrs:!1,__name:"MazBackdrop",props:{modelValue:{type:Boolean,default:!1},teleportSelector:{default:"body"},beforeClose:{type:Function,default:void 0},persistent:{type:Boolean,default:!1},noCloseOnEscKey:{type:Boolean,default:!1},transitionName:{default:"backdrop-anim"},backdropClass:{default:()=>{}},backdropContentClass:{default:()=>{}},contentPadding:{type:Boolean,default:!1},justify:{default:"none"},align:{default:"none"},variant:{}},emits:["open","close","update:model-value","before-close"],setup(o,{expose:e,emit:t}){const s=t;function r(){document.documentElement.classList.add(Pe)}function i(){document.querySelector(".m-backdrop.--present")||document.documentElement.classList.remove(Pe)}const a=n.ref(o.modelValue);function l(){u(!1)}async function u(m){var z;m||(s("before-close"),await((z=o.beforeClose)==null?void 0:z.call(o))),a.value=m}function c(){s("open")}function y(){s("update:model-value",!1),s("close"),T()}function E(){o.persistent||l()}function b(m){!o.noCloseOnEscKey&&m.key==="Escape"&&!o.persistent&&l()}function h(){r(),document.addEventListener("keyup",b,!1)}function T(){document.removeEventListener("keyup",b),i()}n.onMounted(()=>{o.modelValue?h():T()});let k=null;function f(m){const z=document.querySelector(m),I=z&&Array.from(z.querySelectorAll('a[href], button, textarea, input[type="text"], input[type="radio"], input[type="checkbox"], select')),S=I==null?void 0:I.filter(C=>{const x=window.getComputedStyle(C);return x.display!=="none"&&x.visibility!=="hidden"&&!C.disabled});return S&&S.length>0?S[0]:null}return n.watch(()=>o.modelValue,async m=>{if(a.value=m,m){h(),k=document.activeElement,await n.nextTick();const z=f(".m-backdrop-content");z==null||z.focus()}else T(),await n.nextTick(),k==null||k.focus()}),e({onBackdropAnimationEnter:c,onBackdropAnimationLeave:y,onBackdropClicked:E,close:l,present:a,toggleModal:u,onKeyPress:b}),(m,z)=>(n.openBlock(),n.createBlock(n.Teleport,{to:m.teleportSelector},[n.createVNode(n.Transition,{appear:"",name:m.transitionName,onAfterEnter:c,onAfterLeave:y},{default:n.withCtx(()=>[a.value?(n.openBlock(),n.createElementBlock("div",n.mergeProps({key:0,class:"m-backdrop --present m-reset-css"},m.$attrs,{class:[m.backdropClass,m.variant&&`--variant-${m.variant}`,{"--persistent":m.persistent}]}),[n.createElementVNode("div",tn,[n.createElementVNode("div",on,[n.createElementVNode("div",{class:n.normalizeClass(["m-backdrop-content",[m.backdropContentClass,`--justify-${m.justify}`,`--align-${m.align}`,{"--padding":m.contentPadding}]]),role:"button",tabindex:"-1",onClick:n.withModifiers(E,["self"])},[n.renderSlot(m.$slots,"default",{close:l,onBackdropClicked:E},void 0,!0)],2)])])],16)):n.createCommentVNode("v-if",!0)]),_:3},8,["name"])],8,["to"]))}}),sn=re(nn,[["__scopeId","data-v-90448c91"]]),rn={key:0,id:"dialogTitle",class:"m-dialog-title"},an={key:0,class:"m-dialog-footer"},ln=n.defineComponent({name:"MazDialog",inheritAttrs:!1,__name:"MazDialog",props:{modelValue:{type:Boolean},title:{default:void 0},noClose:{type:Boolean,default:!1},maxWidth:{default:"100%"},minWidth:{default:"32rem"},scrollable:{type:Boolean,default:!1},persistent:{type:Boolean,default:!1},teleportSelector:{},beforeClose:{},noCloseOnEscKey:{type:Boolean},transitionName:{},backdropClass:{},backdropContentClass:{},contentPadding:{type:Boolean},justify:{},align:{},variant:{}},emits:["open","close","update:model-value"],setup(o,{expose:e}){const t=o,s=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./MazBtn-BXg6oosO.cjs"))),r=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./x-mark-DW2WXkoF.cjs"))),i=n.useAttrs(),a=n.ref();e({close:()=>{var h,T;return(T=(h=a.value)==null?void 0:h.close)==null?void 0:T.call(h)}});const l=n.computed(()=>{const h=["modelValue","title","noClose","maxWidth","minWidth","scrollable"];return Object.fromEntries(Object.entries(t).filter(([T])=>!h.includes(T)))}),u=n.computed(()=>({...i,class:void 0,style:void 0})),c=n.computed(()=>({class:i.class,style:i.style})),y=n.ref(),E=n.useSlots(),b=n.computed(()=>!!E.footer);return t.scrollable&&n.watch(()=>t.modelValue,async h=>{await n.nextTick(),h&&y.value&&setTimeout(()=>{var T;(T=y.value)==null||T.scrollTo({top:0,behavior:"instant"})},0)}),(h,T)=>(n.openBlock(),n.createBlock(sn,n.mergeProps({...u.value,...l.value},{ref_key:"backdrop",ref:a,"model-value":h.modelValue,"transition-name":"modal-anim","aria-labelledby":"dialogTitle","aria-describedby":"dialogDesc","content-padding":"",justify:"center",variant:"dialog",onClose:T[0]||(T[0]=k=>h.$emit("close",k)),onOpen:T[1]||(T[1]=k=>h.$emit("open",k)),"onUpdate:modelValue":T[2]||(T[2]=k=>h.$emit("update:model-value",k))}),{default:n.withCtx(({close:k,onBackdropClicked:f})=>[n.createElementVNode("div",n.mergeProps({class:["m-dialog",{"--scrollable":h.scrollable}],role:"dialog","aria-modal":"true",style:[{"--max-width":h.maxWidth,"--min-width":h.minWidth}]},c.value),[n.renderSlot(h.$slots,"header",{close:k,onBackdropClicked:f},()=>[n.createElementVNode("div",{class:n.normalizeClass(["m-dialog-header",{"--has-title":h.$slots.title||h.title}])},[h.$slots.title||h.title?(n.openBlock(),n.createElementBlock("h2",rn,[n.renderSlot(h.$slots,"title",{},()=>[n.createTextVNode(n.toDisplayString(h.title),1)],!0)])):n.createCommentVNode("v-if",!0),!h.noClose&&!h.persistent?(n.openBlock(),n.createBlock(n.unref(s),{key:1,color:"transparent",size:"sm",icon:n.unref(r),onClick:k},null,8,["icon","onClick"])):n.createCommentVNode("v-if",!0)],2)],!0),n.createElementVNode("div",{id:"dialogDesc",ref_key:"dialogContent",ref:y,class:n.normalizeClass(["m-dialog-content",{"--bottom-padding":!b.value}])},[n.renderSlot(h.$slots,"default",{close:k,onBackdropClicked:f},void 0,!0)],2),b.value?(n.openBlock(),n.createElementBlock("div",an,[n.renderSlot(h.$slots,"footer",{close:k,onBackdropClicked:f},void 0,!0)])):n.createCommentVNode("v-if",!0)],16)]),_:3},16,["model-value"]))}}),un=re(ln,[["__scopeId","data-v-17cbcac7"]]),U={cancelText:"Cancel",confirmText:"Confirm",cancelButton:{text:"Cancel",color:"danger"},confirmButton:{text:"Confirm",color:"success"}},cn=n.ref(U),W=n.ref([]);function dn(o,e){return new Promise((t,s)=>{W.value=[...W.value,{id:o,isActive:!0,resolve:async r=>{t(r),await(e==null?void 0:e())},reject:async r=>{s(r),await(e==null?void 0:e())}}]})}function Lt(o){return W.value=W.value.filter(({id:e})=>e!==o),W.value}function Ne(o,e,t){var s;e&&((s=e[o])==null||s.call(e,t),e.isActive=!1,setTimeout(()=>{Lt(e.id)},500))}function It(){return{data:cn,dialogState:W,showDialogAndWaitChoice:dn,removeDialogFromState:Lt,rejectDialog:async(o,e=new Error("cancel"),t)=>(await(t==null?void 0:t()),Ne("reject",o,e)),resolveDialog:async(o,e="accept",t)=>(await(t==null?void 0:t()),Ne("resolve",o,e))}}const mn={class:"maz-flex maz-items-center maz-gap-2"},fn=n.defineComponent({__name:"MazDialogPromise",props:{data:{default:void 0},message:{default:void 0},identifier:{default:void 0},buttons:{default:void 0},modelValue:{type:Boolean},title:{},noClose:{type:Boolean},maxWidth:{},minWidth:{},scrollable:{type:Boolean},persistent:{type:Boolean},teleportSelector:{},beforeClose:{},noCloseOnEscKey:{type:Boolean},transitionName:{},backdropClass:{},backdropContentClass:{},contentPadding:{type:Boolean},justify:{},align:{},variant:{},cancelText:{},cancelButton:{type:[Boolean,Object]},confirmText:{},confirmButton:{type:[Boolean,Object]}},emits:["open","close"],setup(o,{expose:e}){const t=o,s=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./MazBtn-BXg6oosO.cjs"))),{dialogState:r,rejectDialog:i,resolveDialog:a,data:l}=It(),u=n.computed(()=>{var f;return t.buttons??((f=t.data)==null?void 0:f.buttons)??l.value.buttons}),c=n.computed(()=>({...U,...l.value,...t.data})),y=n.computed(()=>{var z,p,I,S;if(!(((z=l.value)==null?void 0:z.cancelButton)??((p=t.data)==null?void 0:p.cancelButton)??U.cancelButton))return;const m={...U.cancelButton,...(I=l.value)==null?void 0:I.cancelButton,...(S=t.data)==null?void 0:S.cancelButton};return{...m,text:t.cancelText||c.value.cancelText||m.text}}),E=n.computed(()=>{var z,p,I,S;if(!(((z=l.value)==null?void 0:z.confirmButton)??((p=t.data)==null?void 0:p.confirmButton)??U.confirmButton))return;const m={...U.confirmButton,...(I=l.value)==null?void 0:I.confirmButton,...(S=t.data)==null?void 0:S.confirmButton};return{...m,text:t.confirmText||c.value.confirmText||m.text}}),b=n.computed(()=>r.value.find(({id:f})=>f===t.identifier)),h=n.ref();e({close:()=>{var f,m;return(m=(f=h.value)==null?void 0:f.close)==null?void 0:m.call(f)}});function T(f){return"type"in f&&(f.type==="resolve"||f.type==="reject")}function k(f,m){return T(m)?m.type==="resolve"?a(f,m.response):i(f,m.response):a(f,void 0,m.action)}return(f,m)=>{var z;return n.openBlock(),n.createBlock(un,n.mergeProps({ref_key:"dialog",ref:h},{...f.$attrs,...t},{"model-value":((z=b.value)==null?void 0:z.isActive)??f.modelValue??!1,onClose:m[2]||(m[2]=p=>f.$emit("close",p)),onOpen:m[3]||(m[3]=p=>f.$emit("open",p)),"onUpdate:modelValue":m[4]||(m[4]=p=>n.unref(i)(b.value))}),{title:n.withCtx(()=>[n.renderSlot(f.$slots,"title",{},()=>{var p;return[n.createTextVNode(n.toDisplayString(f.title||((p=c.value)==null?void 0:p.title)),1)]})]),default:n.withCtx(()=>[n.renderSlot(f.$slots,"default",{resolve:p=>n.unref(a)(b.value,p),reject:p=>n.unref(i)(b.value,p)},()=>{var p;return[n.createTextVNode(n.toDisplayString(f.message||((p=c.value)==null?void 0:p.message)),1)]})]),footer:n.withCtx(()=>[n.renderSlot(f.$slots,"footer-button",{resolve:p=>n.unref(a)(b.value,p),reject:p=>n.unref(i)(b.value,p)},()=>[n.createElementVNode("div",mn,[u.value?(n.openBlock(!0),n.createElementBlock(n.Fragment,{key:0},n.renderList(u.value,(p,I)=>(n.openBlock(),n.createBlock(n.unref(s),n.mergeProps({key:I,ref_for:!0},{...p,type:"button"},{onClick:S=>k(b.value,p)}),{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(p.text),1)]),_:2},1040,["onClick"]))),128)):(n.openBlock(),n.createElementBlock(n.Fragment,{key:1},[y.value?(n.openBlock(),n.createBlock(n.unref(s),n.mergeProps({key:0},y.value,{onClick:m[0]||(m[0]=p=>n.unref(i)(b.value))}),{default:n.withCtx(()=>[n.renderSlot(f.$slots,"cancel-text",{},()=>[n.createTextVNode(n.toDisplayString(y.value.text),1)])]),_:3},16)):n.createCommentVNode("v-if",!0),E.value?(n.openBlock(),n.createBlock(n.unref(s),n.mergeProps({key:1},E.value,{onClick:m[1]||(m[1]=p=>n.unref(a)(b.value))}),{default:n.withCtx(()=>[n.renderSlot(f.$slots,"confirm-text",{},()=>[n.createTextVNode(n.toDisplayString(E.value.text),1)])]),_:3},16)):n.createCommentVNode("v-if",!0)],64))])])]),_:3},16,["model-value"])}}}),Me={identifier:"main-dialog"};class At{constructor(e,t=Me){this.app=e,this.globalOptions=t}open(e){const t={...Me,...this.globalOptions,...e},{destroy:s,vNode:r}=fe(fn,{props:t,app:this.app}),{showDialogAndWaitChoice:i}=It();function a(){var u,c,y;(c=(u=r.component)==null?void 0:u.exposed)==null||c.close(),(y=t.promiseCallback)==null||y.call(t),setTimeout(()=>{s()},700)}return{promise:i(t.identifier,()=>{a()}),destroy:s,close:a}}}const hn={install(o,e){o.provide("dialog",new At(o,e))}},vn={class:"m-toast__message-wrapper"},pn={class:"m-toast__message"},gn={class:"maz-flex maz-items-center maz-gap-2"},yn={key:0},bn={key:4,class:"progress-bar maz-absolute maz-inset-x-0 maz-bottom-0 maz-h-1"},wn=n.defineComponent({__name:"MazToast",props:{message:{default:void 0},position:{default:"bottom-right"},maxToasts:{type:[Number,Boolean],default:!1},timeout:{type:[Number,Boolean],default:1e4},queue:{type:Boolean},noPauseOnHover:{type:Boolean},type:{default:"info"},link:{default:void 0},action:{default:void 0},persistent:{type:Boolean},icon:{type:Boolean,default:!0}},emits:["close","click","open"],setup(o,{expose:e,emit:t}){const s=o,r=t,i=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./MazBtn-BXg6oosO.cjs"))),a=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./x-mark-DW2WXkoF.cjs"))),l=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./arrow-top-right-on-square-PZtr8Zs0.cjs"))),u=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./exclamation-triangle-BtW3be9S.cjs"))),c=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./exclamation-circle-BXs0Yj0f.cjs"))),y=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./information-circle-89FseEuJ.cjs"))),E=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./check-circle-D3i-p-t3.cjs"))),b=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./link-CUxj8BQ5.cjs"))),h=n.ref(),T=n.computed(()=>{if(s.icon)switch(s.type){case"danger":return u;case"info":return y;case"success":return E;case"warning":return c;default:return}}),k=n.computed(()=>s.position.includes("top")?"top":"bottom"),f=n.computed(()=>s.position.includes("left")?"left":s.position.includes("right")?"right":"center"),m=n.computed(()=>f.value!=="center"?f.value==="right"?"m-slide-right":"m-slide-left":k.value==="top"?"m-slide-top":"m-slide-bottom"),z=n.ref(!1),p=n.ref(!1),I=n.ref(),S=`m-toast-container m-reset-css --${k.value} --${f.value}`,C=`.${S.replaceAll(" ",".")}`,x=et({callback:q,timeout:typeof s.timeout=="number"?s.timeout:0,callbackOffsetTime:200});function B(){const v=document.querySelector(C);if(!v&&!v){const A=document.body,O=document.createElement("div");O.className=S,A.append(O)}}function j(){const v=document.querySelector(C);return!s.queue&&s.maxToasts===!1?!1:typeof s.maxToasts=="number"&&v?s.maxToasts<=v.childElementCount:v&&v.childElementCount>0}function H(){if(j()){I.value=setTimeout(H,250);return}const v=document.querySelector(C);h.value&&v&&v.prepend(h.value),p.value=!0,typeof s.timeout=="number"&&s.timeout>0&&x.start()}const _=n.ref("100%");function he(){switch(s.type){case"danger":return"maz-bg-danger-700";case"info":return"maz-bg-info-700";case"success":return"maz-bg-success-700";case"warning":return"maz-bg-warning-700";default:return"maz-bg-primary"}}n.watch(x.remainingTime,v=>{if(typeof s.timeout=="number"){const A=100*v/s.timeout;_.value=`${A}%`}});function K(v){r("click",v),s.persistent||q()}async function Y(v,A){var O;z.value=!0,await v(),z.value=!1,(O=s.action)!=null&&O.closeToast&&K(A)}function Z(v){s.noPauseOnHover||(v?x.pause():x.resume())}function ve(){x.stop(),I.value&&clearTimeout(I.value)}function q(){ve(),p.value=!1}e({closeToast:q});function ie(){r("open")}function ae(){var A;r("close"),(A=h.value)==null||A.remove();const v=document.querySelector(C);v&&!(v!=null&&v.hasChildNodes())&&v.remove()}return n.onMounted(()=>{B(),H()}),(v,A)=>(n.openBlock(),n.createBlock(n.Transition,{name:m.value,onAfterLeave:ae,onAfterEnter:ie,persisted:""},{default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("button",{ref_key:"Toaster",ref:h,class:n.normalizeClass(["m-toast m-reset-css",[`--${v.type}`,`--${k.value}`,`--${f.value}`,{"maz-pb-1":typeof v.timeout=="number"&&v.timeout>0,"--persistent":v.persistent}]]),role:"alert",onMouseover:A[2]||(A[2]=O=>Z(!0)),onMouseleave:A[3]||(A[3]=O=>Z(!1)),onClick:A[4]||(A[4]=n.withModifiers(O=>{var X;return v.link&&!((X=v.link)!=null&&X.closeToast)?void 0:K(O)},["stop"]))},[T.value?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(T.value),{key:0,class:"maz-text-2xl"})):n.createCommentVNode("v-if",!0),n.createElementVNode("div",vn,[n.createElementVNode("p",pn,n.toDisplayString(v.message),1)]),v.action?(n.openBlock(),n.createBlock(n.unref(i),{key:1,"data-test":"action-btn",color:v.type,pastel:"",loading:z.value,size:"sm",onClick:A[0]||(A[0]=n.withModifiers(O=>v.action?Y(v.action.func,O):void 0,["stop"]))},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(v.action.text),1)]),_:1},8,["color","loading"])):n.createCommentVNode("v-if",!0),v.link?(n.openBlock(),n.createBlock(n.unref(i),{key:2,"data-test":"link-btn",color:v.type,pastel:"",size:"xs",href:v.link.href,target:v.link.target??"_self"},{default:n.withCtx(()=>{var O;return[n.createElementVNode("div",gn,[v.link.text?(n.openBlock(),n.createElementBlock("span",yn,n.toDisplayString(v.link.text),1)):n.createCommentVNode("v-if",!0),((O=v.link)==null?void 0:O.target)==="_blank"?(n.openBlock(),n.createBlock(n.unref(l),{key:1,class:"maz-text-xl"})):(n.openBlock(),n.createBlock(n.unref(b),{key:2,class:"maz-text-xl"}))])]}),_:1},8,["color","href","target"])):n.createCommentVNode("v-if",!0),v.persistent?n.createCommentVNode("v-if",!0):(n.openBlock(),n.createElementBlock("button",{key:3,class:"--close",onClick:A[1]||(A[1]=n.withModifiers(O=>K(O),["stop"]))},[n.createVNode(n.unref(a),{class:"--icon maz-text-xl"})])),typeof v.timeout=="number"&&v.timeout>0?(n.openBlock(),n.createElementBlock("div",bn,[n.createElementVNode("div",{style:n.normalizeStyle({width:_.value}),class:n.normalizeClass(["maz-h-full !maz-transition-all !maz-duration-200 !maz-ease-linear",he()])},null,6)])):n.createCommentVNode("v-if",!0)],34),[[n.vShow,p.value]])]),_:1},8,["name"]))}}),En=re(wn,[["__scopeId","data-v-b70bc12e"]]),kn={position:"bottom-right",timeout:1e4,persistent:!1,icon:!0};class St{constructor(e,t){this.app=e,this.globalOptions=t}show(e,t){const s={...kn,...this.globalOptions,...t,message:e},{destroy:r,vNode:i}=fe(En,{props:s,app:this.app});return{destroy:r,close:()=>{var a,l;return(l=(a=i.component)==null?void 0:a.exposed)==null?void 0:l.closeToast()}}}getLocalOptions(e,t){return{type:e,...t}}message(e,t){return this.show(e,this.getLocalOptions("theme",t))}success(e,t){return this.show(e,this.getLocalOptions("success",t))}error(e,t){return this.show(e,this.getLocalOptions("danger",t))}info(e,t){return this.show(e,this.getLocalOptions("info",t))}warning(e,t){return this.show(e,this.getLocalOptions("warning",t))}}function Cn(o,e){return new St(o,e)}const Tn={install(o,e){o.provide("toast",Cn(o,e))}},R="";function zn(o){return o.filter((e,t,s)=>t===s.indexOf(e))}function Ln(o){return(e=R)=>typeof e=="function"?o.findIndex((...t)=>e(...t))>-1:o.includes(e)}const In=o=>o.length>0;function An(o){return(e=R)=>zn([...o,e])}function Sn(o){return(e=R)=>o.filter(t=>t!==e)}class xt{constructor(){d(this,"_loaders",n.ref([]))}get loaders(){return n.computed(()=>this._loaders.value)}stop(e=R){this._loaders.value=Sn(this._loaders.value)(e)}start(e=R){return this._loaders.value=An(this._loaders.value)(e),()=>this.stop(e)}get anyLoading(){return n.computed(()=>In(this._loaders.value))}isLoading(e=R){return n.computed(()=>Ln(this._loaders.value)(e)).value}}const Ot=new xt,xn={install:o=>{o.provide("wait",Ot)}};exports.AosHandler=zt;exports.DialogHandler=At;exports.IdleTimeout=_e;exports.ScriptLoader=Vo;exports.Swipe=Ge;exports.ToasterHandler=St;exports.UserVisibility=tt;exports.WaitHandler=xt;exports._export_sfc=re;exports.capitalize=Et;exports.checkAvailability=ze;exports.countryCodeToUnicodeFlag=xo;exports.currency=kt;exports.date=Ct;exports.debounce=Oo;exports.directive=rt;exports.directive$1=ut;exports.directive$2=So;exports.directive$3=vt;exports.directive$4=jo;exports.getInstance=en;exports.injectStrict=J;exports.installDialog=hn;exports.installFilters=Qo;exports.installToaster=Tn;exports.instance=Ot;exports.isClient=D;exports.iso6391Codes=Ke;exports.languageCodes=Ye;exports.mount=fe;exports.normalizeString=Ee;exports.number=Tt;exports.plugin=Ro;exports.plugin$1=it;exports.plugin$2=ct;exports.plugin$3=mt;exports.plugin$4=pt;exports.plugin$5=yt;exports.plugin$6=wt;exports.plugin$7=Jo;exports.plugin$8=xn;exports.sleep=ht;exports.throttle=Do;exports.truthyFilter=ft;exports.useAos=Nt;exports.useBreakpoints=$t;exports.useDialog=Ht;exports.useFormField=ro;exports.useFormValidator=io;exports.useIdleTimeout=ao;exports.useInstanceUniqId=lo;exports.useLanguageDisplayNames=co;exports.useReadingTime=fo;exports.useStringMatching=go;exports.useSwipe=bo;exports.useThemeHandler=ko;exports.useTimer=et;exports.useToast=Co;exports.useUserVisibility=To;exports.useWait=zo;exports.useWindowSize=$e;exports.vZoomImg=bt;
|
package/modules/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./chunks/index-pV6oqfJc.cjs");exports.AosHandler=e.AosHandler;exports.DialogHandler=e.DialogHandler;exports.IdleTimeout=e.IdleTimeout;exports.ScriptLoader=e.ScriptLoader;exports.Swipe=e.Swipe;exports.ToasterHandler=e.ToasterHandler;exports.UserVisibility=e.UserVisibility;exports.WaitHandler=e.WaitHandler;exports.capitalize=e.capitalize;exports.checkAvailability=e.checkAvailability;exports.countryCodeToUnicodeFlag=e.countryCodeToUnicodeFlag;exports.currency=e.currency;exports.date=e.date;exports.debounce=e.debounce;exports.getAosInstance=e.getInstance;exports.injectStrict=e.injectStrict;exports.installAos=e.plugin$7;exports.installDialog=e.installDialog;exports.installDirectives=e.plugin;exports.installFilters=e.installFilters;exports.installToaster=e.installToaster;exports.installWait=e.plugin$8;exports.isClient=e.isClient;exports.iso6391Codes=e.iso6391Codes;exports.languageCodes=e.languageCodes;exports.mount=e.mount;exports.normalizeString=e.normalizeString;exports.number=e.number;exports.sleep=e.sleep;exports.throttle=e.throttle;exports.truthyFilter=e.truthyFilter;exports.useAos=e.useAos;exports.useBreakpoints=e.useBreakpoints;exports.useDialog=e.useDialog;exports.useFormField=e.useFormField;exports.useFormValidator=e.useFormValidator;exports.useIdleTimeout=e.useIdleTimeout;exports.useInstanceUniqId=e.useInstanceUniqId;exports.useLanguageDisplayNames=e.useLanguageDisplayNames;exports.useReadingTime=e.useReadingTime;exports.useStringMatching=e.useStringMatching;exports.useSwipe=e.useSwipe;exports.useThemeHandler=e.useThemeHandler;exports.useTimer=e.useTimer;exports.useToast=e.useToast;exports.useUserVisibility=e.useUserVisibility;exports.useWait=e.useWait;exports.useWindowSize=e.useWindowSize;exports.vClickOutside=e.directive;exports.vClickOutsideInstall=e.plugin$1;exports.vClosable=e.directive$1;exports.vClosableInstall=e.plugin$2;exports.vFullscreenImg=e.directive$3;exports.vFullscreenImgInstall=e.plugin$4;exports.vLazyImg=e.directive$4;exports.vLazyImgInstall=e.plugin$5;exports.vTooltip=e.directive$2;exports.vTooltipInstall=e.plugin$3;exports.vZoomImg=e.vZoomImg;exports.vZoomImgInstall=e.plugin$6;exports.waitInstance=e.instance;
|
package/modules/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Z as e, a1 as l, P as i, T as t, V as n, a4 as o, Y as r, a6 as u, I as d, M as c, N as m, J as g, K as I, O as v, $ as T, i as p, a0 as y, a2 as C, t as F, H as b, a3 as S, a5 as h, Q as z, g as A, l as D, R as H, S as k, L as w, U as L, W as U, X as W, u as V, a as O, b as Z, c as f, d as j, e as q, f as x, h as B, j as M, k as N, m as R, n as E, o as G, p as J, q as K, r as P, s as Q, v as X, w as Y, x as $, y as _, C as aa, B as sa, E as ea, D as la, z as ia, A as ta, F as na, G as oa, a7 as ra } from "./chunks/index-
|
|
1
|
+
import { Z as e, a1 as l, P as i, T as t, V as n, a4 as o, Y as r, a6 as u, I as d, M as c, N as m, J as g, K as I, O as v, $ as T, i as p, a0 as y, a2 as C, t as F, H as b, a3 as S, a5 as h, Q as z, g as A, l as D, R as H, S as k, L as w, U as L, W as U, X as W, u as V, a as O, b as Z, c as f, d as j, e as q, f as x, h as B, j as M, k as N, m as R, n as E, o as G, p as J, q as K, r as P, s as Q, v as X, w as Y, x as $, y as _, C as aa, B as sa, E as ea, D as la, z as ia, A as ta, F as na, G as oa, a7 as ra } from "./chunks/index-Dx2ZhWwj.mjs";
|
|
2
2
|
export {
|
|
3
3
|
e as AosHandler,
|
|
4
4
|
l as DialogHandler,
|
package/nuxt/index.json
CHANGED
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type { Props } from '../MazInput.vue';
|
|
2
2
|
import type { Translations } from '../MazPhoneNumberInput.vue';
|
|
3
|
-
|
|
3
|
+
type PhoneInputProps = Omit<Props, 'modelValue'> & {
|
|
4
4
|
id: string;
|
|
5
5
|
locales: Translations;
|
|
6
6
|
noExample: boolean;
|
|
7
7
|
hasRadius: boolean;
|
|
8
8
|
autoFormat: boolean;
|
|
9
|
-
}
|
|
9
|
+
};
|
|
10
10
|
type __VLS_Props = PhoneInputProps;
|
|
11
11
|
type __VLS_PublicProps = {
|
|
12
12
|
modelValue?: string | undefined | null;
|