maz-ui 3.44.4-beta.0 → 3.44.4-beta.2

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.
Files changed (159) hide show
  1. package/components/MazAccordion.d.ts +12 -10
  2. package/components/MazAnimatedCounter.d.ts +15 -13
  3. package/components/MazAvatar.d.ts +9 -7
  4. package/components/MazBackdrop.d.ts +12 -21
  5. package/components/MazBadge.d.ts +6 -4
  6. package/components/MazBottomSheet.d.ts +8 -6
  7. package/components/MazBtn.d.ts +12 -10
  8. package/components/MazCard.d.ts +16 -14
  9. package/components/MazCard.mjs +1 -1
  10. package/components/MazCardSpotlight.d.ts +7 -5
  11. package/components/MazCarousel.d.ts +9 -7
  12. package/components/MazChart.d.ts +6 -6
  13. package/components/MazCheckbox.d.ts +7 -5
  14. package/components/MazCircularProgressBar.d.ts +27 -24
  15. package/components/MazDialog.d.ts +16 -24
  16. package/components/MazDialogPromise/use-maz-dialog-promise.d.ts +29 -29
  17. package/components/MazDrawer.d.ts +12 -10
  18. package/components/MazDropdown.d.ts +27 -25
  19. package/components/MazDropzone.d.ts +15 -15
  20. package/components/MazExpandAnimation.d.ts +6 -4
  21. package/components/MazFullscreenLoader.d.ts +6 -4
  22. package/components/MazIcon.d.ts +3 -3
  23. package/components/MazInput.d.ts +15 -133
  24. package/components/MazInputCode.d.ts +2 -2
  25. package/components/MazInputNumber.d.ts +2 -2
  26. package/components/MazInputPrice.d.ts +7 -5
  27. package/components/MazInputTags.d.ts +1 -1
  28. package/components/MazLazyImg.d.ts +9 -7
  29. package/components/MazLink.d.ts +10 -8
  30. package/components/MazPagination.d.ts +20 -18
  31. package/components/MazPhoneNumberInput/CountrySelector.vue.d.ts +53 -70
  32. package/components/MazPhoneNumberInput.d.ts +17 -25
  33. package/components/MazPhoneNumberInput.mjs +1 -1
  34. package/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarGrid.vue.d.ts +3 -3
  35. package/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarMonth.vue.d.ts +3 -3
  36. package/components/MazPicker.d.ts +1 -1
  37. package/components/MazPicker.mjs +1 -1
  38. package/components/MazPullToRefresh.d.ts +9 -7
  39. package/components/MazRadio.d.ts +27 -24
  40. package/components/MazRadioButtons.d.ts +10 -8
  41. package/components/MazReadingProgressBar.d.ts +1 -1
  42. package/components/MazSelect.d.ts +16 -125
  43. package/components/MazSelect.mjs +1 -1
  44. package/components/MazStepper.d.ts +10 -8
  45. package/components/MazSwitch.d.ts +9 -7
  46. package/components/MazTable.d.ts +67 -65
  47. package/components/MazTable.mjs +1 -1
  48. package/components/MazTableCell.d.ts +4 -2
  49. package/components/MazTableRow.d.ts +4 -2
  50. package/components/MazTableTitle.d.ts +4 -2
  51. package/components/MazTabs.d.ts +6 -4
  52. package/components/MazTabsBar.d.ts +18 -16
  53. package/components/MazTabsContent.d.ts +4 -2
  54. package/components/MazTabsContentItem.d.ts +6 -4
  55. package/components/MazTextarea.d.ts +1 -1
  56. package/components/MazTransitionExpand.d.ts +6 -4
  57. package/components/MazTransitionExpand.mjs +2 -2
  58. package/components/assets/MazPhoneNumberInput.css +1 -1
  59. package/components/assets/MazPickerMonthSwitcher.css +1 -1
  60. package/components/assets/MazPickerYearSwitcher.css +1 -1
  61. package/components/assets/MazSelect.css +1 -1
  62. package/components/assets/MazTable.css +1 -1
  63. package/components/assets/MazTabsBar.css +1 -1
  64. package/components/assets/MazTransitionExpand.css +1 -1
  65. package/components/chunks/{MazBtn-B5XwteK7.mjs → MazBtn-BURByjBO.mjs} +2 -2
  66. package/components/chunks/{MazBtn-CQSo596y.mjs → MazBtn-D1TNsXIe.mjs} +2 -2
  67. package/components/chunks/{MazBtn-gj2W8kzn.mjs → MazBtn-YtY4PeyZ.mjs} +2 -2
  68. package/components/chunks/{MazCard-BBwohtCJ.mjs → MazCard-BiDXoNWK.mjs} +1 -1
  69. package/components/chunks/{MazCheckbox-isKq9dAX.mjs → MazCheckbox-BMzMZ-_l.mjs} +1 -1
  70. package/components/chunks/{MazCheckbox-CqHZNrGa.mjs → MazCheckbox-B_Rx3ZCe.mjs} +1 -1
  71. package/components/chunks/{MazGallery-Din0Z37d.mjs → MazGallery-SSMQ_JIA.mjs} +2 -2
  72. package/components/chunks/{MazIcon-D2DkwtXq.mjs → MazIcon-CwITLbPL.mjs} +1 -1
  73. package/components/chunks/{MazIcon-DHzZGzIp.mjs → MazIcon-x_aGvHlZ.mjs} +1 -1
  74. package/components/chunks/{MazPhoneNumberInput-CYcy4OZW.mjs → MazPhoneNumberInput-fo2MtuWB.mjs} +6 -6
  75. package/components/chunks/{MazPicker-DCTIkgDd.mjs → MazPicker-Df-LRtwz.mjs} +2 -2
  76. package/components/chunks/{MazPickerMonthSwitcher-CINBaU3n.mjs → MazPickerMonthSwitcher-CrrfUDPA.mjs} +2 -2
  77. package/components/chunks/{MazPickerShortcuts-vvPV1aW8.mjs → MazPickerShortcuts-Dpm1ra_Y.mjs} +1 -1
  78. package/components/chunks/{MazPickerYearSwitcher-CkqFNhde.mjs → MazPickerYearSwitcher-BIeGuXI7.mjs} +2 -2
  79. package/components/chunks/{MazSelect-DvNLFDvj.mjs → MazSelect-xBiD7HuJ.mjs} +6 -6
  80. package/components/chunks/{MazSpinner-C7s8yroP.mjs → MazSpinner-C5MXwcx7.mjs} +1 -1
  81. package/components/chunks/{MazSpinner-BVd7-OTu.mjs → MazSpinner-CrDTibNk.mjs} +1 -1
  82. package/components/chunks/{MazSpinner-CpYgtvc9.mjs → MazSpinner-CvucKhXp.mjs} +1 -1
  83. package/components/chunks/MazSpinner-DDmCKWOx.mjs +37 -0
  84. package/components/chunks/{MazSpinner-CAG800x4.mjs → MazSpinner-QIX5R4Hk.mjs} +1 -1
  85. package/components/chunks/{MazTable-BN-Yp2RW.mjs → MazTable-1D7GRSpa.mjs} +6 -6
  86. package/components/chunks/{MazTransitionExpand-CYyEf_hd.mjs → MazTransitionExpand-BLFZPAt_.mjs} +11 -11
  87. package/modules/assets/index.css +1 -1
  88. package/modules/chunks/{MazBtn-BVqZ8Wej.cjs → MazBtn-BLvj2Vcl.cjs} +1 -1
  89. package/modules/chunks/{MazBtn-Cuj6yEZn.mjs → MazBtn-DhVNaOBj.mjs} +2 -2
  90. package/modules/chunks/{MazIcon-CyWCmQpN.cjs → MazIcon-BhCADEJL.cjs} +1 -1
  91. package/modules/chunks/{MazIcon-COFexHFo.mjs → MazIcon-ZPJHGsC7.mjs} +1 -1
  92. package/modules/chunks/{MazSpinner-BtXwGTnk.mjs → MazSpinner-Dx_yL6x9.mjs} +1 -1
  93. package/modules/chunks/{MazSpinner-Dz0kdTmr.cjs → MazSpinner-OdoRwyjg.cjs} +1 -1
  94. package/modules/chunks/{index-DW2zAKgR.cjs → index-BT3W7L22.cjs} +2 -2
  95. package/modules/chunks/{index-BBOf37yd.mjs → index-CgWq2KzW.mjs} +363 -360
  96. package/modules/index.cjs +1 -1
  97. package/modules/index.mjs +1 -1
  98. package/nuxt/index.json +2 -2
  99. package/nuxt/types.d.mts +4 -23
  100. package/nuxt/types.d.ts +4 -23
  101. package/package.json +25 -25
  102. package/types/components/MazAccordion.vue.d.ts +12 -10
  103. package/types/components/MazAnimatedCounter.vue.d.ts +15 -13
  104. package/types/components/MazAvatar.vue.d.ts +9 -7
  105. package/types/components/MazBackdrop.vue.d.ts +12 -21
  106. package/types/components/MazBadge.vue.d.ts +6 -4
  107. package/types/components/MazBottomSheet.vue.d.ts +8 -6
  108. package/types/components/MazBtn.vue.d.ts +12 -10
  109. package/types/components/MazCard.vue.d.ts +16 -14
  110. package/types/components/MazCardSpotlight.vue.d.ts +7 -5
  111. package/types/components/MazCarousel.vue.d.ts +9 -7
  112. package/types/components/MazChart.vue.d.ts +6 -6
  113. package/types/components/MazCheckbox.vue.d.ts +7 -5
  114. package/types/components/MazCircularProgressBar.vue.d.ts +27 -24
  115. package/types/components/MazDialog.vue.d.ts +16 -24
  116. package/types/components/MazDialogPromise/use-maz-dialog-promise.d.ts +29 -29
  117. package/types/components/MazDrawer.vue.d.ts +12 -10
  118. package/types/components/MazDropdown.vue.d.ts +27 -25
  119. package/types/components/MazDropzone.vue.d.ts +15 -15
  120. package/types/components/MazExpandAnimation.vue.d.ts +6 -4
  121. package/types/components/MazFullscreenLoader.vue.d.ts +6 -4
  122. package/types/components/MazIcon.vue.d.ts +3 -3
  123. package/types/components/MazInput.vue.d.ts +15 -133
  124. package/types/components/MazInputCode.vue.d.ts +2 -2
  125. package/types/components/MazInputNumber.vue.d.ts +2 -2
  126. package/types/components/MazInputPrice.vue.d.ts +7 -5
  127. package/types/components/MazInputTags.vue.d.ts +1 -1
  128. package/types/components/MazLazyImg.vue.d.ts +9 -7
  129. package/types/components/MazLink.vue.d.ts +10 -8
  130. package/types/components/MazPagination.vue.d.ts +20 -18
  131. package/types/components/MazPhoneNumberInput/CountrySelector.vue.d.ts +53 -70
  132. package/types/components/MazPhoneNumberInput.vue.d.ts +17 -25
  133. package/types/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarGrid.vue.d.ts +3 -3
  134. package/types/components/MazPicker/MazPickerCalendarMonth/MazPickerCalendarMonth.vue.d.ts +3 -3
  135. package/types/components/MazPicker.vue.d.ts +1 -1
  136. package/types/components/MazPullToRefresh.vue.d.ts +9 -7
  137. package/types/components/MazRadio.vue.d.ts +27 -24
  138. package/types/components/MazRadioButtons.vue.d.ts +10 -8
  139. package/types/components/MazReadingProgressBar.vue.d.ts +1 -1
  140. package/types/components/MazSelect.vue.d.ts +16 -125
  141. package/types/components/MazStepper.vue.d.ts +10 -8
  142. package/types/components/MazSwitch.vue.d.ts +9 -7
  143. package/types/components/MazTable.vue.d.ts +67 -65
  144. package/types/components/MazTableCell.vue.d.ts +4 -2
  145. package/types/components/MazTableRow.vue.d.ts +4 -2
  146. package/types/components/MazTableTitle.vue.d.ts +4 -2
  147. package/types/components/MazTabs.vue.d.ts +6 -4
  148. package/types/components/MazTabsBar.vue.d.ts +18 -16
  149. package/types/components/MazTabsContent.vue.d.ts +4 -2
  150. package/types/components/MazTabsContentItem.vue.d.ts +6 -4
  151. package/types/components/MazTextarea.vue.d.ts +1 -1
  152. package/types/components/MazTransitionExpand.vue.d.ts +6 -4
  153. package/types/modules/composables/use-form-validator/index.d.ts +5 -7
  154. package/types/modules/composables/use-form-validator/types.d.ts +16 -11
  155. package/types/modules/composables/use-form-validator/utils.d.ts +13 -13
  156. package/types/modules/directives/v-fullscreen-img/MazFullscreenImg.vue.d.ts +2 -2
  157. package/types/modules/plugins/toaster/MazToast.vue.d.ts +1 -1
  158. package/types/tailwindcss/tailwind.config.d.ts +2 -2
  159. package/components/chunks/MazSpinner-D1paofz3.mjs +0 -37
@@ -1,4 +1,4 @@
1
- "use strict";require('../assets/index.css');var ht=Object.defineProperty;var ft=(o,e,t)=>e in o?ht(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var u=(o,e,t)=>ft(o,typeof e!="symbol"?e+"":e,t);const n=require("vue");function ne(o,e){const t=n.inject(o,e);if(!t)throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${o}`);return t}function vt(o,e){let t;return function(...s){clearTimeout(t),t=setTimeout(()=>{o.apply(this,s)},e)}}function ke(o){return!!o}function ve(o,e){let t=e==null?void 0:e.element;function s(){t&&n.render(null,t)}const i=n.createVNode(o,{...e==null?void 0:e.props,...e!=null&&e.addDestroyInProps?{destroy:s}:{}},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 x(){return typeof document<"u"}class Ie{constructor(e,t){u(this,"defaultOptions",{element:void 0,timeout:60*1e3*5,once:!1,immediate:!0});u(this,"options");u(this,"timeoutHandler");u(this,"isIdle",!1);u(this,"isDestroy",!1);u(this,"startTime",0);u(this,"remainingTime",0);u(this,"lastClientX",-1);u(this,"lastClientY",-1);u(this,"eventNames",["DOMMouseScroll","mousedown","mousemove","mousewheel","MSPointerDown","MSPointerMove","keydown","touchmove","touchstart","wheel","click"]);u(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})}catch(t){throw new Error(`[IdleTimeout](handleEvent) ${t}`)}});this.callback=e,this.options={...this.defaultOptions,...t},x()&&this.start()}get element(){return this.options.element??document.body}start(){if(!x()){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})}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}),this.remainingTime=0)}reset(){this.isDestroy=!1,this.isIdle=!1,this.remainingTime=0,this.resetTimeout(),this.callback({isIdle:this.isIdle})}destroy(){if(!x()){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}),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})}}class Ce{constructor(e,t){u(this,"eventHandlerFunction");u(this,"event","visibilitychange");u(this,"timeoutHandler");u(this,"options");u(this,"defaultOptions",{timeout:5e3,once:!1,immediate:!0});u(this,"isVisible",!1);this.callback=e,this.options={...this.defaultOptions,...t},this.eventHandlerFunction=this.eventHandler.bind(this),x()&&this.start()}start(){if(!x()){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 pe(o){return new Promise(e=>setTimeout(e,o))}class pt{constructor({src:e,identifier:t,once:s=!0,async:i=!0,defer:r=!0}){u(this,"src");u(this,"script");u(this,"once");u(this,"async");u(this,"defer");u(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=i,this.defer=r}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 i=document.createElement("script");i.src=this.src,i.async=this.async,i.defer=this.defer,i.dataset.identifier=this.identifier,i.addEventListener("error",r=>s(new Error(`[ScriptLoader](injectScript) ${r.message}`))),i.addEventListener("load",r=>(this.script=r,e[this.identifier]=r,t(r))),document.head.append(i)}catch(i){throw new Error(`[ScriptLoader](init) ${i}`)}})}}function gt(o){return[...o].map(e=>{const t=e.codePointAt(0);return t?t%32+127461:void 0}).filter(ke).map(e=>String.fromCodePoint(e)).join("")}class Se{constructor(e){u(this,"defaultOptions",{preventDefaultOnTouchMove:!1,preventDefaultOnMouseWheel:!1,threshold:50,immediate:!1,triggerOnEnd:!1});u(this,"element");u(this,"xStart");u(this,"yStart");u(this,"xEnd");u(this,"yEnd");u(this,"xDiff");u(this,"yDiff");u(this,"onToucheStartCallback");u(this,"onToucheMoveCallback");u(this,"onToucheEndCallback");u(this,"onMouseWheelCallback");u(this,"options");if(this.inputOption=e,this.options={...this.defaultOptions,...e},!this.options.element)throw new Error("[SwipeHandler] Element should be provided. Its can be a string selector or an HTMLElement");if(typeof this.options.element=="string"){const t=document.querySelector(this.options.element);if(!(t instanceof HTMLElement))throw new TypeError("[SwipeHandler] String selector for element is not found");this.element=t}else this.element=this.options.element;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.options.immediate&&this.start()}start(){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})}stop(){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)}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,i,r,a,l,h,g;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):(r=(i=this.options).onRight)==null||r.call(i,e):this.yDiff>0?(l=(a=this.options).onUp)==null||l.call(a,e):(g=(h=this.options).onDown)==null||g.call(h,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 yt(o,e){let t=0;return async function(){const s=Date.now();s-t>=e&&(await o(),t=s)}}const bt={removeAccents:!0,caseSensitive:!1,replaceSpaces:!0,removeSpecialCharacters:!1,trim:!0,normalizeSpaces:!0,removeNumbers:!1,customNormalizationForms:["NFC","NFKD"]};function de(o,e){const t={...bt,...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 i=o.toString();if(t.trim&&(i=i.trim()),t.normalizeSpaces&&(i=i.replaceAll(/\s+/g," ")),t.replaceSpaces&&(i=i.replaceAll(" ","-")),t.removeNumbers&&(i=i.replaceAll(/\d/g,"")),t.removeAccents&&(i=i.replaceAll(/[ÀÁÂÃÄÅÇÈÉÊËÎÏÑÔÕÖØÙÚÛÜàáâãäåçèéêëíîïñóôõöøùúûüÿ]/g,r=>s[r]||r),i=i.replaceAll(/[\u0300-\u036F]/g,"")),t.caseSensitive===!1&&(i=i.toLowerCase()),t.removeSpecialCharacters&&(i=i.replaceAll(/[^\dA-Z-]/gi,"")),t.trim&&(i=i.trim()),t.customNormalizationForms)for(const r of t.customNormalizationForms)i=i.normalize(r);return i}const se="__maz-click-outside__";function Ae(){return document.ontouchstart===null?"touchstart":"click"}async function xe(o,e){try{Oe(o);const t=e.instance,s=e.value,i=typeof s=="function";if(!i)throw new Error("[maz-ui](vClickOutside) the callback should be a function");await n.nextTick(),o[se]=a=>{if((!o||a.target&&!o.contains(a.target))&&s&&i)return s.call(t,a)};const r=Ae();document.addEventListener(r,o[se],{passive:!0})}catch(t){console.error("[maz-ui](vClickOutside)",t)}}function Oe(o){try{const e=Ae();document.removeEventListener(e,o[se],!1),delete o[se]}catch(e){console.error("[maz-ui](vClickOutside)",e)}}function wt(o,e){try{if(e.value===e.oldValue)return;xe(o,e)}catch(t){console.error("[maz-ui](vClickOutside)",t)}}const Fe={mounted:xe,updated:wt,unmounted:Oe},De={install:o=>{o.directive("click-outside",Fe)}};function Pe(o,e,t){var a;o.stopPropagation();const s=typeof t.value=="function"?t.value:t.value.handler,i=typeof t.value=="object"?t.value.exclude:void 0;let r=!1;if(i&&i.length>0){for(const l of i)if(!r&&o.target instanceof HTMLElement){const h=(a=document.querySelector(l))==null?void 0:a.getAttribute("id");r=o.target.getAttribute("id")===h}}!e.contains(o.target)&&!r&&(s==null||s())}function Me(){return document.ontouchstart===null?"touchstart":"click"}function Et(o,e){const t=Me();document.removeEventListener(t,s=>Pe(s,o,e))}function zt(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=Me();document.addEventListener(t,s=>Pe(s,o,e))}const Ve={mounted:zt,unmounted:Et},He={install:o=>{o.directive("closable",Ve)}},me={position:"top"};class $e{constructor(e={}){u(this,"options");this.options={...me,...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"}create(e,t){e.setAttribute("data-tooltip",this.getText(t)),e.classList.add("m-tooltip");const s=this.getPosition(t);e.classList.add(`m-tooltip--${s}`),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 J;const Tt={beforeMount(o,e){const t=typeof e.value=="object"?e.value:{};return J=new $e(t),J.create(o,e)},updated(o,e){return J.update(o,e)},unmounted(o,e){return J.remove(o,e)}},Ne={install:(o,e=me)=>{const t={...me,...e},s=new $e(t);o.directive("tooltip",{beforeMount:s.create.bind(s),updated:s.update.bind(s),unmounted:s.remove.bind(s)})}},Lt=`
1
+ "use strict";require('../assets/index.css');var ft=Object.defineProperty;var vt=(o,e,t)=>e in o?ft(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var u=(o,e,t)=>vt(o,typeof e!="symbol"?e+"":e,t);const n=require("vue");function ne(o,e){const t=n.inject(o,e);if(!t)throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${o}`);return t}function pt(o,e){let t;return function(...s){clearTimeout(t),t=setTimeout(()=>{o.apply(this,s)},e)}}function ke(o){return!!o}function ve(o,e){let t=e==null?void 0:e.element;function s(){t&&n.render(null,t)}const i=n.createVNode(o,{...e==null?void 0:e.props,...e!=null&&e.addDestroyInProps?{destroy:s}:{}},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 x(){return typeof document<"u"}class Ce{constructor(e,t){u(this,"defaultOptions",{element:void 0,timeout:60*1e3*5,once:!1,immediate:!0});u(this,"options");u(this,"timeoutHandler");u(this,"isIdle",!1);u(this,"isDestroy",!1);u(this,"startTime",0);u(this,"remainingTime",0);u(this,"lastClientX",-1);u(this,"lastClientY",-1);u(this,"eventNames",["DOMMouseScroll","mousedown","mousemove","mousewheel","MSPointerDown","MSPointerMove","keydown","touchmove","touchstart","wheel","click"]);u(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})}catch(t){throw new Error(`[IdleTimeout](handleEvent) ${t}`)}});this.callback=e,this.options={...this.defaultOptions,...t},x()&&this.start()}get element(){return this.options.element??document.body}start(){if(!x()){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})}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}),this.remainingTime=0)}reset(){this.isDestroy=!1,this.isIdle=!1,this.remainingTime=0,this.resetTimeout(),this.callback({isIdle:this.isIdle})}destroy(){if(!x()){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}),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})}}class Se{constructor(e,t){u(this,"eventHandlerFunction");u(this,"event","visibilitychange");u(this,"timeoutHandler");u(this,"options");u(this,"defaultOptions",{timeout:5e3,once:!1,immediate:!0});u(this,"isVisible",!1);this.callback=e,this.options={...this.defaultOptions,...t},this.eventHandlerFunction=this.eventHandler.bind(this),x()&&this.start()}start(){if(!x()){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 pe(o){return new Promise(e=>setTimeout(e,o))}class gt{constructor({src:e,identifier:t,once:s=!0,async:i=!0,defer:r=!0}){u(this,"src");u(this,"script");u(this,"once");u(this,"async");u(this,"defer");u(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=i,this.defer=r}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 i=document.createElement("script");i.src=this.src,i.async=this.async,i.defer=this.defer,i.dataset.identifier=this.identifier,i.addEventListener("error",r=>s(new Error(`[ScriptLoader](injectScript) ${r.message}`))),i.addEventListener("load",r=>(this.script=r,e[this.identifier]=r,t(r))),document.head.append(i)}catch(i){throw new Error(`[ScriptLoader](init) ${i}`)}})}}function yt(o){return[...o].map(e=>{const t=e.codePointAt(0);return t?t%32+127461:void 0}).filter(ke).map(e=>String.fromCodePoint(e)).join("")}class Ae{constructor(e){u(this,"defaultOptions",{preventDefaultOnTouchMove:!1,preventDefaultOnMouseWheel:!1,threshold:50,immediate:!1,triggerOnEnd:!1});u(this,"element");u(this,"xStart");u(this,"yStart");u(this,"xEnd");u(this,"yEnd");u(this,"xDiff");u(this,"yDiff");u(this,"onToucheStartCallback");u(this,"onToucheMoveCallback");u(this,"onToucheEndCallback");u(this,"onMouseWheelCallback");u(this,"options");if(this.inputOption=e,this.options={...this.defaultOptions,...e},!this.options.element)throw new Error("[SwipeHandler] Element should be provided. Its can be a string selector or an HTMLElement");if(typeof this.options.element=="string"){const t=document.querySelector(this.options.element);if(!(t instanceof HTMLElement))throw new TypeError("[SwipeHandler] String selector for element is not found");this.element=t}else this.element=this.options.element;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.options.immediate&&this.start()}start(){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})}stop(){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)}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,i,r,a,l,h,g;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):(r=(i=this.options).onRight)==null||r.call(i,e):this.yDiff>0?(l=(a=this.options).onUp)==null||l.call(a,e):(g=(h=this.options).onDown)==null||g.call(h,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 bt(o,e){let t=0;return async function(){const s=Date.now();s-t>=e&&(await o(),t=s)}}const wt={removeAccents:!0,caseSensitive:!1,replaceSpaces:!0,removeSpecialCharacters:!1,trim:!0,normalizeSpaces:!0,removeNumbers:!1,customNormalizationForms:["NFC","NFKD"]};function de(o,e){const t={...wt,...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 i=o.toString();if(t.trim&&(i=i.trim()),t.normalizeSpaces&&(i=i.replaceAll(/\s+/g," ")),t.replaceSpaces&&(i=i.replaceAll(" ","-")),t.removeNumbers&&(i=i.replaceAll(/\d/g,"")),t.removeAccents&&(i=i.replaceAll(/[ÀÁÂÃÄÅÇÈÉÊËÎÏÑÔÕÖØÙÚÛÜàáâãäåçèéêëíîïñóôõöøùúûüÿ]/g,r=>s[r]||r),i=i.replaceAll(/[\u0300-\u036F]/g,"")),t.caseSensitive===!1&&(i=i.toLowerCase()),t.removeSpecialCharacters&&(i=i.replaceAll(/[^\dA-Z-]/gi,"")),t.trim&&(i=i.trim()),t.customNormalizationForms)for(const r of t.customNormalizationForms)i=i.normalize(r);return i}const se="__maz-click-outside__";function xe(){return document.ontouchstart===null?"touchstart":"click"}async function Oe(o,e){try{Fe(o);const t=e.instance,s=e.value,i=typeof s=="function";if(!i)throw new Error("[maz-ui](vClickOutside) the callback should be a function");await n.nextTick(),o[se]=a=>{if((!o||a.target&&!o.contains(a.target))&&s&&i)return s.call(t,a)};const r=xe();document.addEventListener(r,o[se],{passive:!0})}catch(t){console.error("[maz-ui](vClickOutside)",t)}}function Fe(o){try{const e=xe();document.removeEventListener(e,o[se],!1),delete o[se]}catch(e){console.error("[maz-ui](vClickOutside)",e)}}function Et(o,e){try{if(e.value===e.oldValue)return;Oe(o,e)}catch(t){console.error("[maz-ui](vClickOutside)",t)}}const Me={mounted:Oe,updated:Et,unmounted:Fe},De={install:o=>{o.directive("click-outside",Me)}};function Pe(o,e,t){var a;o.stopPropagation();const s=typeof t.value=="function"?t.value:t.value.handler,i=typeof t.value=="object"?t.value.exclude:void 0;let r=!1;if(i&&i.length>0){for(const l of i)if(!r&&o.target instanceof HTMLElement){const h=(a=document.querySelector(l))==null?void 0:a.getAttribute("id");r=o.target.getAttribute("id")===h}}!e.contains(o.target)&&!r&&(s==null||s())}function He(){return document.ontouchstart===null?"touchstart":"click"}function zt(o,e){const t=He();document.removeEventListener(t,s=>Pe(s,o,e))}function Tt(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=He();document.addEventListener(t,s=>Pe(s,o,e))}const Ve={mounted:Tt,unmounted:zt},$e={install:o=>{o.directive("closable",Ve)}},me={position:"top"};class Ne{constructor(e={}){u(this,"options");this.options={...me,...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"}create(e,t){e.setAttribute("data-tooltip",this.getText(t)),e.classList.add("m-tooltip");const s=this.getPosition(t);e.classList.add(`m-tooltip--${s}`),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 J;const Lt={beforeMount(o,e){const t=typeof e.value=="object"?e.value:{};return J=new Ne(t),J.create(o,e)},updated(o,e){return J.update(o,e)},unmounted(o,e){return J.remove(o,e)}},Be={install:(o,e=me)=>{const t={...me,...e},s=new Ne(t);o.directive("tooltip",{beforeMount:s.create.bind(s),updated:s.update.bind(s),unmounted:s.remove.bind(s)})}},It=`
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 kt{constructor(e){u(this,"options");u(this,"loader");u(this,"wrapper");u(this,"img");u(this,"keydownHandler");u(this,"onImgLoadedCallback");u(this,"buttonsAdded");u(this,"defaultOptions",{scale:!0,blur:!0,disabled:!1});u(this,"mouseEnterListener");u(this,"mouseLeaveListener");u(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(Lt);const s=document.createElement("div");s.classList.add("maz-zoom-img"),s.setAttribute("id","MazImgPreviewFullsize"),s.addEventListener("click",i=>{s.isEqualNode(i.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 i=this.getButton("previous"),r=this.getButton("next");t.push(i,r)}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){return e<0?this.allInstances.length-1:e>=this.allInstances.length?0:e}nextPreviousImage(e){const t=e,s=document.querySelector(".maz-zoom-img-instance.maz-is-open");if(s){const i=this.allInstances.indexOf(s),r=t?i+1:i-1,a=this.allInstances[this.getNewInstanceIndex(r)];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"),i=t.getAttribute("data-zoom-alt");this.wrapper.style.width="",this.loader.hidden=!1,s&&this.img.setAttribute("src",s),i&&this.img.setAttribute("alt",i)}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 ee;const Be={created(o,e){ee=new kt(e),ee.create(o)},updated(o,e){ee.update(e)},unmounted(o){ee.remove(o)}},_e={install(o){o.directive("zoom-img",Be)}},It="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",he={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 qe{constructor(e={}){u(this,"observers",[]);u(this,"defaultOptions",he);u(this,"options");u(this,"onImgLoadedCallback");u(this,"onImgErrorCallback");u(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 i=s.getAttribute("data-lazy-srcset");if(i)s.srcset=i;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(),i=e.querySelectorAll("source");if(i.length>0)for await(const r of i)r.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,i){var r,a;this.observers.push(i);for(const l of s)if(l.isIntersecting){if((a=(r=this.options).onIntersecting)==null||a.call(r,l.target),this.options.observerOnce&&i.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)},i=this.options.observerOptions;new IntersectionObserver(s,i).observe(e)}async imageHandler(e,t,s){if(s==="update")for await(const i of this.observers)i.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,It),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 te;const Ct={created(o,e){const t=typeof e.value=="object"?e.value:{};te=new qe(t),te.add(o,e)},updated(o,e){te.update(o,e)},unmounted(o,e){te.remove(o,e)}},Ue={install(o,e={}){const t={...he,...e,observerOptions:{...he.observerOptions,...e.observerOptions}},s=new qe(t);o.directive("lazy-img",{created:s.add.bind(s),updated:s.update.bind(s),unmounted:s.remove.bind(s)})}},St=["onKeypress"],At={class:"m-fullscreen-img-scroller"},xt=["src","alt"],Ot=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,i=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./MazSpinner-Dz0kdTmr.cjs"))),r=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./x-mark-BETcRuRC.cjs"))),a=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./chevron-left-D2bYJFWX.cjs"))),l=n.ref(!1),h=n.ref(!1),g=n.ref(!1),k=n.ref(!1),y=n.ref(!1),f=n.ref(t.clickedElement),z=n.computed(()=>t.clickedElement.getBoundingClientRect()),O=n.computed(()=>z.value.height<z.value.width),D=n.ref(t.src),F=n.ref(t.alt),P=n.ref(),b=n.ref(),I=n.computed(()=>y.value?"--is-zoomed maz-cursor-zoom-out":"maz-cursor-zoom-in");function A(){l.value=!0,h.value=!1,g.value=!0}n.watch(()=>g.value,c=>{c&&ie()});function H(){s("before-close"),m()}function M(c){c.key==="Escape"&&(c.preventDefault(),H()),(c.key==="ArrowLeft"||c.key==="ArrowRight")&&(c.preventDefault(),_(c.key==="ArrowRight"?"next":"previous"))}function d(){document.documentElement.classList.add("--m-fullscreen-open")}function T(){document.documentElement.classList.remove("--m-fullscreen-open")}function p(){return[...document.querySelectorAll(".m-fullscreen-img-instance")]}function w(c,v){return v<0?c.length-1:v>=c.length?0:v}async function C(c,v){c.classList.remove(t.openInstanceClass),v.classList.add(t.openInstanceClass);const L=v.getAttribute("data-src"),S=v.getAttribute("data-alt");F.value=S,L&&(D.value=L),l.value=!1,l.value||(h.value=!0)}function _(c){const v=document.querySelector(`.m-fullscreen-img-instance.${t.openInstanceClass}`);if(v){const L=p(),S=L.indexOf(v),N=c==="next"?S+1:S-1,V=L[w(L,N)];f.value=V,V&&C(v,V),s(c),y.value?$(b.value):R()}}function $(c){O.value?(c.style.width=`${window.innerWidth}px`,c.style.removeProperty("height")):(c.style.height=`${window.innerHeight}px`,c.style.removeProperty("width")),c.style.removeProperty("top"),c.style.removeProperty("left")}async function j(){const c=b.value;y.value?(y.value=!y.value,R()):(y.value=!y.value,$(c))}function q(c){var v;return(v=b.value)==null?void 0:v.animate(c,{duration:t.animation.duration,easing:t.animation.easing})}function U(c=t.offset??0){const v=(f.value instanceof HTMLImageElement?f.value.naturalWidth:f.value.clientWidth)||1,L=(f.value instanceof HTMLImageElement?f.value.naturalHeight:f.value.clientHeight)||1,S=window.innerWidth,N=window.innerHeight,V=Math.min((S-2*c)/v,(N-2*c)/L),re=(S-v*V)/2,ae=(N-L*V)/2;return{centerX:re,centerY:ae,originalWidth:v,originalHeight:L,scale:V}}function W({trigger:c}){const{originalWidth:v,originalHeight:L,scale:S,centerX:N,centerY:V}=U(),{top:re,left:ae,width:dt,height:mt}=z.value,ye=[{top:`${re}px`,left:`${ae}px`,width:`${dt}px`,height:`${mt}px`,opacity:0},{top:`${V}px`,left:`${N}px`,width:`${v*S}px`,height:`${L*S}px`,opacity:1}];return{frames:c==="open"?ye:ye.reverse()}}function R(){const{centerX:c,centerY:v,originalHeight:L,originalWidth:S,scale:N}=U(),V={top:`${v}px`,left:`${c}px`,width:`${S*N}px`,height:`${L*N}px`};if(!b.value)throw console.error("[maz-ui](vFullscreenImg) ImgElement is not defined");Object.assign(b.value.style,V)}function ie(){const{frames:c}=W({trigger:"open"}),v=q(c);if(!v)throw console.error("[maz-ui](vFullscreenImg) open animation is not defined");v.onfinish=()=>{R()}}function m(){const{frames:c}=W({trigger:"close"}),v=q(c);if(!v)throw console.error("[maz-ui](vFullscreenImg) close animation is not defined");v.onfinish=()=>{var L,S;s("close"),(L=P.value)==null||L.remove(),(S=t.destroy)==null||S.call(t)}}function E(){y.value||R()}return n.onMounted(()=>{h.value=!0,document.addEventListener("keydown",M),window.addEventListener("resize",E),d(),k.value=p().length>1}),n.onBeforeUnmount(()=>{document.removeEventListener("keydown",M),window.removeEventListener("resize",E),T()}),(c,v)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"FullscreenImgElement",ref:P,role:"button",class:"m-fullscreen-img",tabindex:"0",onClick:n.withModifiers(H,["stop"]),onKeypress:n.withKeys(n.withModifiers(H,["prevent"]),["esc"])},[n.withDirectives(n.createVNode(n.unref(i),{class:"m-fullscreen-img-loader maz-h-16"},null,512),[[n.vShow,h.value]]),g.value&&k.value?(n.openBlock(),n.createElementBlock("button",{key:0,type:"button",class:"m-fullscreen-btn --next",onClick:v[0]||(v[0]=n.withModifiers(L=>_("next"),["stop"]))},[n.createVNode(n.unref(a),{class:"maz-rotate-180 maz-text-3xl"})])):n.createCommentVNode("v-if",!0),g.value&&k.value?(n.openBlock(),n.createElementBlock("button",{key:1,type:"button",class:"m-fullscreen-btn --previous",onClick:v[1]||(v[1]=n.withModifiers(L=>_("previous"),["stop"]))},[n.createVNode(n.unref(a),{class:"maz-text-3xl"})])):n.createCommentVNode("v-if",!0),n.createElementVNode("button",{type:"button",class:"m-fullscreen-btn --close",onClick:H},[n.createVNode(n.unref(r),{class:"maz-text-3xl"})]),n.createElementVNode("div",At,[n.createCommentVNode(" eslint-disable-next-line vuejs-accessibility/no-static-element-interactions, vuejs-accessibility/click-events-have-key-events "),n.createElementVNode("img",{ref_key:"ImgElement",ref:b,src:D.value,alt:F.value??void 0,tabindex:"0",class:n.normalizeClass([I.value]),onLoad:A,onClick:v[2]||(v[2]=n.withModifiers(L=>c.zoom?j():void 0,["stop"]))},null,42,xt)])],40,St))}}),ge=(o,e)=>{const t=o.__vccOpts||o;for(const[s,i]of e)t[s]=i;return t},Ft=ge(Ot,[["__scopeId","data-v-884a2c57"]]),we="m-fullscreen-is-open";class Dt{constructor(){u(this,"options");u(this,"defaultOptions",{scaleOnHover:!1,blurOnHover:!1,disabled:!1,zoom:!0,offset:80,animation:{duration:300,easing:"ease-in-out"}});u(this,"mouseEnterListener");u(this,"mouseLeaveListener");u(this,"renderPreviewListener")}buildOptions(e,t){const s=typeof t.value=="object"?t.value:{src:t.value,alt:void 0},i=(s==null?void 0:s.src)??this.getImgSrc(e),r=(s==null?void 0:s.alt)??this.getImgAlt(e);return{...this.defaultOptions,...s,src:i,alt:r}}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(we),ve(Ft,{props:{...this.options,openInstanceClass:we,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 oe;const je={mounted(o,e){return oe=new Dt,oe.create(o,e)},updated(o,e){return oe.update(o,e)},unmounted(o){return oe.remove(o)}},We={install(o){o.directive("fullscreen-img",je)}},Pt=[He,_e,Ue,De,We,Ne],Mt={install(o){for(const e of Pt)e.install(o,{})}};function Re(o){return o?(o=o.toString(),o.charAt(0).toUpperCase()+o.slice(1)):""}const Vt={style:"currency",minimumFractionDigits:2,round:!1};function Ht(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 $t(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 Ye(o,e,t){const s={...Vt,...t};$t(o,e,s);try{return Ht(o,e,s)}catch(i){throw new Error(`[maz-ui](FilterCurrency) ${i}`)}}const Nt={month:"short",day:"numeric",year:"numeric"};function Ke(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??Nt;try{const i=o instanceof Date?o:new Date(o);return new Intl.DateTimeFormat(e,s).format(i)}catch(i){throw new Error(`[maz-ui](FilterDate) ${i}`)}}const Bt={minimumFractionDigits:2};function Xe(o,e,t){const s={...Bt,...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(i){throw new Error(`[maz-ui](FilterNumber) ${i}`)}}const _t={capitalize:Re,currency:Ye,date:Ke,number:Xe},qt={install(o){o.provide("filters",_t)}};function Ze({timeout:o=1e3,callback:e,remainingTimeUpdate:t=200,callbackOffsetTime:s=0}){const i=n.ref(o),r=n.ref(o);let a;function l(f){typeof f=="number"&&(r.value=f),typeof f=="number"&&(i.value=f),h()}function h(){a||(a=setInterval(()=>{r.value-=t,r.value<=0&&(y(),setTimeout(()=>e==null?void 0:e(),s))},t))}function g(){a&&(clearInterval(a),a=void 0)}function k(){!a&&r.value>0&&h()}function y(){setTimeout(()=>r.value=i.value,s*2),g()}return{remainingTime:r,start:l,pause:g,resume:k,stop:y}}const Ut={class:"m-toast__message-wrapper"},jt={class:"m-toast__message"},Wt={class:"maz-flex maz-items-center maz-gap-2"},Rt={key:0},Yt={key:4,class:"progress-bar maz-absolute maz-inset-x-0 maz-bottom-0 maz-h-1"},Kt=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,i=t,r=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./MazBtn-BVqZ8Wej.cjs"))),a=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./x-mark-BETcRuRC.cjs"))),l=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./arrow-top-right-on-square-Kw3b5yYN.cjs"))),h=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./exclamation-triangle-BhBdL4E2.cjs"))),g=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./exclamation-circle-Cw7wlH9H.cjs"))),k=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./information-circle-i_xlqw0y.cjs"))),y=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./check-circle-Bm2TJi5n.cjs"))),f=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./link-BbXTqAk3.cjs"))),z=n.ref(),O=n.computed(()=>{if(s.icon)switch(s.type){case"danger":return h;case"info":return k;case"success":return y;case"warning":return g;default:return}}),D=n.computed(()=>s.position.includes("top")?"top":"bottom"),F=n.computed(()=>s.position.includes("left")?"left":s.position.includes("right")?"right":"center"),P=n.computed(()=>F.value!=="center"?F.value==="right"?"m-slide-right":"m-slide-left":D.value==="top"?"m-slide-top":"m-slide-bottom"),b=n.ref(!1),I=n.ref(!1),A=n.ref(),H=`m-toast-container --${D.value} --${F.value}`,M=`.${H.replaceAll(" ",".")}`,d=Ze({callback:W,timeout:typeof s.timeout=="number"?s.timeout:0,callbackOffsetTime:200});function T(){const m=document.querySelector(M);if(!m&&!m){const E=document.body,c=document.createElement("div");c.className=H,E.append(c)}}function p(){const m=document.querySelector(M);return!s.queue&&s.maxToasts===!1?!1:typeof s.maxToasts=="number"&&m?s.maxToasts<=m.childElementCount:m&&m.childElementCount>0}function w(){if(p()){A.value=setTimeout(w,250);return}const m=document.querySelector(M);z.value&&m&&m.prepend(z.value),I.value=!0,typeof s.timeout=="number"&&s.timeout>0&&d.start()}const C=n.ref("100%");function _(){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-secondary"}}n.watch(d.remainingTime,m=>{if(typeof s.timeout=="number"){const E=100*m/s.timeout;C.value=`${E}%`}});function $(m){i("click",m),s.persistent||W()}async function j(m,E){var c;b.value=!0,await m(),b.value=!1,(c=s.action)!=null&&c.closeToast&&$(E)}function q(m){s.noPauseOnHover||(m?d.pause():d.resume())}function U(){stop(),A.value&&clearTimeout(A.value)}function W(){U(),I.value=!1}e({closeToast:W});function R(){i("open")}function ie(){var E;i("close"),(E=z.value)==null||E.remove();const m=document.querySelector(M);m&&!(m!=null&&m.hasChildNodes())&&m.remove()}return n.onMounted(()=>{T(),w()}),(m,E)=>(n.openBlock(),n.createBlock(n.Transition,{name:P.value,onAfterLeave:ie,onAfterEnter:R,persisted:""},{default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("button",{ref_key:"Toaster",ref:z,class:n.normalizeClass(["m-toast",[`--${m.type}`,`--${D.value}`,`--${F.value}`,{"maz-pb-1":typeof m.timeout=="number"&&m.timeout>0,"--persistent":m.persistent}]]),role:"alert",onMouseover:E[2]||(E[2]=c=>q(!0)),onMouseleave:E[3]||(E[3]=c=>q(!1)),onClick:E[4]||(E[4]=n.withModifiers(c=>{var v;return m.link&&!((v=m.link)!=null&&v.closeToast)?void 0:$(c)},["stop"]))},[O.value?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(O.value),{key:0,class:"maz-text-2xl"})):n.createCommentVNode("v-if",!0),n.createElementVNode("div",Ut,[n.createElementVNode("p",jt,n.toDisplayString(m.message),1)]),m.action?(n.openBlock(),n.createBlock(n.unref(r),{key:1,"data-test":"action-btn",color:m.type,pastel:"",loading:b.value,size:"sm",onClick:E[0]||(E[0]=n.withModifiers(c=>m.action?j(m.action.func,c):void 0,["stop"]))},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(m.action.text),1)]),_:1},8,["color","loading"])):n.createCommentVNode("v-if",!0),m.link?(n.openBlock(),n.createBlock(n.unref(r),{key:2,"data-test":"link-btn",color:m.type,pastel:"",size:"xs",href:m.link.href,target:m.link.target??"_self"},{default:n.withCtx(()=>{var c;return[n.createElementVNode("div",Wt,[m.link.text?(n.openBlock(),n.createElementBlock("span",Rt,n.toDisplayString(m.link.text),1)):n.createCommentVNode("v-if",!0),((c=m.link)==null?void 0:c.target)==="_blank"?(n.openBlock(),n.createBlock(n.unref(l),{key:1,class:"maz-text-xl"})):(n.openBlock(),n.createBlock(n.unref(f),{key:2,class:"maz-text-xl"}))])]}),_:1},8,["color","href","target"])):n.createCommentVNode("v-if",!0),m.persistent?n.createCommentVNode("v-if",!0):(n.openBlock(),n.createElementBlock("button",{key:3,class:"--close",onClick:E[1]||(E[1]=n.withModifiers(c=>$(c),["stop"]))},[n.createVNode(n.unref(a),{class:"--icon maz-text-xl"})])),typeof m.timeout=="number"&&m.timeout>0?(n.openBlock(),n.createElementBlock("div",Yt,[n.createElementVNode("div",{style:n.normalizeStyle({width:C.value}),class:n.normalizeClass(["maz-h-full !maz-transition-all !maz-duration-200 !maz-ease-linear",_()])},null,6)])):n.createCommentVNode("v-if",!0)],34),[[n.vShow,I.value]])]),_:1},8,["name"]))}}),Xt=ge(Kt,[["__scopeId","data-v-cdb80f1f"]]),Zt={position:"bottom-right",timeout:1e4,persistent:!1,icon:!0};class Qe{constructor(e,t){this.app=e,this.globalOptions=t}show(e,t){const s={...Zt,...this.globalOptions,...t,message:e},{destroy:i,vNode:r}=ve(Xt,{props:s,app:this.app});return{destroy:i,close:()=>{var a,l;return(l=(a=r.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 Qt(o,e){return new Qe(o,e)}const Gt={install(o,e){o.provide("toast",Qt(o,e))}},Y="";function Jt(o){return o.filter((e,t,s)=>t===s.indexOf(e))}function eo(o){return(e=Y)=>typeof e=="function"?o.findIndex((...t)=>e(...t))>-1:o.includes(e)}const to=o=>o.length>0;function oo(o){return(e=Y)=>Jt([...o,e])}function so(o){return(e=Y)=>o.filter(t=>t!==e)}class Ge{constructor(){u(this,"_loaders",n.ref([]))}get loaders(){return n.computed(()=>this._loaders.value)}stop(e=Y){this._loaders.value=so(this._loaders.value)(e)}start(e=Y){return this._loaders.value=oo(this._loaders.value)(e),()=>this.stop(e)}get anyLoading(){return n.computed(()=>to(this._loaders.value))}isLoading(e=Y){return n.computed(()=>eo(this._loaders.value)(e)).value}}const Je=new Ge,no={install:o=>{o.provide("wait",Je)}},le={delay:100,observer:{root:void 0,rootMargin:"0px",threshold:.2},animation:{once:!0,duration:300,delay:0}};class et{constructor(e){u(this,"options");this.options={delay:(e==null?void 0:e.delay)??le.delay,observer:{...le.observer,...e==null?void 0:e.observer},animation:{...le.animation,...e==null?void 0:e.animation}}}handleIntersect(e,t){for(const s of e){const r=s.target.getAttribute("data-maz-aos-children")==="true",a=s.target.getAttribute("data-maz-aos")?[s.target]:[];if(r){const l=[...document.querySelectorAll("[data-maz-aos-anchor]")].map(h=>h.getAttribute("data-maz-aos-anchor")===`#${s.target.id}`?h:void 0);for(const h of l)h&&a.push(h)}for(const l of a){const h=l.getAttribute("data-maz-aos-once"),g=typeof h=="string"?h==="true":this.options.animation.once;if(typeof this.options.observer.threshold=="number"&&s.intersectionRatio>this.options.observer.threshold){const k=l.getAttribute("data-maz-aos-duration"),y=l.getAttribute("data-maz-aos-delay");if(k||(l.style.transitionDuration=`${this.options.animation.duration}ms`,setTimeout(()=>{l.style.transitionDuration="0"},1e3)),y||(l.style.transitionDelay=`${this.options.animation.delay}ms`,setTimeout(()=>{l.style.transitionDelay="0"},1e3)),l.classList.add("maz-aos-animate"),g){const f=l.getAttribute("data-maz-aos-anchor");if(f){const z=document.querySelector(f);z&&t.unobserve(z)}t.unobserve(l)}}else l.classList.remove("maz-aos-animate")}}}async handleObserver(){await pe(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 i=document.querySelector(s);i?(i.setAttribute("data-maz-aos-children","true"),e.observe(i)):console.warn(`[maz-ui](aos) no element found with selector "${s}"`)}else e.observe(t)}}runAnimations(){if(x())return this.handleObserver();console.warn("[MazAos](runAnimations) should be executed on client side")}}let K;const io={install:(o,e)=>{K=new et(e),o.provide("aos",K),x()&&(e!=null&&e.router?e.router.afterEach(async()=>{K.runAnimations()}):K.runAnimations())}};function ro(){return K}const ao={darkClass:"dark",lightClass:"light",storageThemeKey:"theme",storageThemeValueDark:"dark",storageThemeValueLight:"light",storageThemeValueSystem:"system",watchChanges:!0},Z=n.ref("system"),B=n.ref("system");function Ee(){return window.matchMedia("(prefers-color-scheme: dark)").matches}function Q({darkClass:o,lightClass:e,storageThemeKey:t,storageThemeValueDark:s,setLocalStorageValue:i=!0,setSelectedTheme:r=!0}){x()&&(document.documentElement.classList.remove(e),document.documentElement.classList.add(o),Z.value=s,r&&(B.value=s),i&&(localStorage[t]=s))}function G({darkClass:o,lightClass:e,storageThemeKey:t,storageThemeValueLight:s,setLocalStorageValue:i=!0,setSelectedTheme:r=!0}){x()&&(document.documentElement.classList.remove(o),document.documentElement.classList.add(e),Z.value=s,r&&(B.value=s),i&&(localStorage[t]=s))}function tt({setLocalStorageValue:o=!0,...e}){if(x())return document.documentElement.classList.remove(e.darkClass),document.documentElement.classList.remove(e.lightClass),Z.value=e.storageThemeValueSystem,B.value=e.storageThemeValueSystem,o&&(localStorage[e.storageThemeKey]=e.storageThemeValueSystem),fe(e)}function ot(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 Q({...o,setLocalStorageValue:!1,setSelectedTheme:!0});case"light":return G({...o,setLocalStorageValue:!1,setSelectedTheme:!0})}}function fe(o){return x()?!localStorage[o.storageThemeKey]&&o.defaultTheme?ot(o):localStorage[o.storageThemeKey]===o.storageThemeValueDark||!localStorage[o.storageThemeKey]&&Ee()||localStorage[o.storageThemeKey]===o.storageThemeValueSystem&&Ee()?Q({...o,setLocalStorageValue:!1,setSelectedTheme:!1}):G({...o,setLocalStorageValue:!1,setSelectedTheme:!1}):void 0}function ue({theme:o,...e}){return o==="system"?tt(e):o==="dark"?Q(e):G(e)}function lo(o){return Z.value===o.storageThemeValueDark?G(o):Q(o)}function uo(o){const e={...ao,...o};function t(){fe(e)}return n.onMounted(()=>{localStorage[e.storageThemeKey]&&(B.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(B,s=>{switch(localStorage[e.storageThemeKey]=s,s){case e.storageThemeValueDark:{Q(e);break}case e.storageThemeValueLight:{G(e);break}case e.storageThemeValueSystem:{tt(e);break}}}),{autoSetTheme:()=>fe(e),toggleTheme:()=>lo(e),setSystemTheme:()=>ue({...e,theme:"system"}),setDarkTheme:()=>ue({...e,theme:"dark"}),setLightTheme:()=>ue({...e,theme:"light"}),setDefaultTheme:()=>ot(e),hasDarkTheme:n.computed(()=>B.value===e.storageThemeValueDark),hasLightTheme:n.computed(()=>B.value===e.storageThemeValueLight),hasSystemTheme:n.computed(()=>B.value===e.storageThemeValueSystem),theme:Z,selectedTheme:B}}function co({componentName:o,providedId:e}){const t=n.getCurrentInstance();return n.computed(()=>e??`${o}-${t==null?void 0:t.uid}`)}function mo(){return ne("aos")}function ho(){return ne("wait")}function fo(){return ne("toast")}function vo({callback:o,options:e}){return new Ie(o,e)}function po({callback:o,options:e}){return new Ce(o,e)}function go(o){const e={};for(const[t,s]of Object.entries(o))e[t]=Number.parseInt(s,10);return e}function st(o={}){const{internalWindow:e=x()?window:void 0,initialWidth:t=Number.POSITIVE_INFINITY,initialHeight:s=Number.POSITIVE_INFINITY,includeScrollbar:i=!0}=o,r=n.ref(t),a=n.ref(s);function l(){e&&(i?(r.value=e.innerWidth,a.value=e.innerHeight):(r.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:r,height:a}}function yo({initialWidth:o=0,initialHeight:e,includeScrollbar:t,internalWindow:s,listenOrientation:i,breakpoints:r,mediumBreakPoint:a="md",largeBreakPoint:l="lg"}){const{width:h}=st({initialWidth:o,initialHeight:e,includeScrollbar:t,internalWindow:s,listenOrientation:i}),g=go(r),k=n.computed(()=>h.value>=g[l]),y=n.computed(()=>h.value>=g[a]&&h.value<g[l]),f=n.computed(()=>h.value>=0&&h.value<g[a]);return{width:h,numericBreakpoints:g,isSmallScreen:f,isLargeScreen:k,isMediumScreen:y,breakpoints:r}}function bo(o){const e=n.ref(),t=n.ref(),s=n.ref(),i=n.ref(),r=n.ref(),a=n.ref(),l=new Se({...o,element:o.element,onValuesChanged(h){e.value=h.xDiff,t.value=h.yDiff,s.value=h.xStart,i.value=h.xEnd,r.value=h.yStart,a.value=h.yEnd}});return{xDiff:e,yDiff:t,xStart:s,xEnd:i,yStart:r,yEnd:a,start:l.start,stop:l.stop}}function nt(o){const e=o.join(", ").match(/\b\w+\b/g);return e?e.length:0}function wo(o,e=150){const t=nt([o]);return Math.ceil(t/e)}function Eo(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,h;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 g=document.querySelector(t.value);if(g)return g.textContent}return typeof o.content=="string"?o.content:(h=o.content)==null?void 0:h.value}),i=n.computed(()=>wo(s.value,e.value)),r=n.computed(()=>nt([s.value]));return{content:s,wordCount:r,velocity:e,duration:i}}function zo(o,e){const t=o.length,s=e.length,i=[];for(let r=0;r<=t;r++)i[r]=[r];for(let r=0;r<=s;r++)i[0][r]=r;for(let r=1;r<=t;r++)for(let a=1;a<=s;a++){const l=o[r-1]===e[a-1]?0:1;i[r][a]=Math.min(i[r-1][a]+1,i[r][a-1]+1,i[r-1][a-1]+l)}return i[t][s]}function it(o,e){const t=zo(o,e),s=Math.max(o.length,e.length);return 1-t/s}function To(o,e,t=.75){return it(o,e)>=t}function Lo(o,e,t=.75){const s=n.computed(()=>de(typeof o=="string"?o:o.value)),i=n.computed(()=>de(typeof e=="string"?e:e.value)),r=n.computed(()=>typeof t=="number"?t:t.value),a=n.computed(()=>it(s.value,i.value));return{isMatching:n.computed(()=>To(s.value,i.value,r.value)),score:a}}function ko(o,e){const t={};return async function(s,...i){t[s]||(t[s]={timer:null,promise:null});const r=t[s];return r.timer&&clearTimeout(r.timer),r.promise=new Promise((a,l)=>{r.timer=setTimeout(async()=>{try{a(await o(...i))}catch(h){l(h)}finally{delete t[s]}},e)}),r.promise}}function rt(o){const e=n.toValue(o);return Array.isArray(e)?Object.freeze([...e]):typeof e=="object"&&e!==null?Object.freeze({...e}):e}function ze(o){return o==null||typeof o=="string"||typeof o=="number"||typeof o=="boolean"||typeof o=="symbol"||typeof o=="bigint"}function Io(o,e){if(o.length!==e.length)return!1;for(const[t,s]of o.entries())if(!X(s,e[t]))return!1;return!0}function Co(o,e){const t=Object.keys(o),s=Object.keys(e);if(t.length!==s.length)return!1;for(const i of t)if(!s.includes(i)||!X(o[i],e[i]))return!1;return!0}function X(o,e){return ze(o)||ze(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)?Io(o,e):typeof o=="object"&&typeof e=="object"?Co(o,e):!1}function So(o,e){const t={};return async(s,...i)=>{const r=Date.now();return t[s]||(t[s]={promise:null,lastCall:0,lastArgs:[]}),r-t[s].lastCall>=e?(t[s].lastCall=r,o(...i)):(t[s].lastArgs=i,t[s].promise||(t[s].promise=new Promise(a=>{setTimeout(async()=>{t[s].lastCall=Date.now();const l=await o(...t[s].lastArgs);t[s].promise=null,a(l)},e-(r-t[s].lastCall))})),t[s].promise)}}let ce;async function Ao(){if(ce)return ce;const{safeParseAsync:o}=await Promise.resolve().then(()=>require("./index-D-PtzxMv.cjs"));return ce=o,o}function at(o,e){return Object.keys(e.entries).includes(o)}function Te(o=".has-input-error"){const e=document.querySelector(o);e&&e.scrollIntoView({behavior:"smooth",block:"center"})}function Le(o){return o==null||o===""}function lt({name:o,schema:e,initialValue:t,mode:s}){const i=e?at(o,e):!1;return{blurred:!1,dirty:!1,errors:[],error:!1,valid:!i,validating:!1,validated:!1,mode:i?s??"eager":"none",initialValue:t}}function xo(o,e,t){const s={};for(const[i]of Object.entries(o.entries)){const r=i;s[r]=lt({name:r,schema:o,mode:t,initialValue:e[i]})}return s}function Oo({name:o,fieldsStates:e,payload:t,schema:s,options:i}){var a;const r=lt({name:o,schema:s.value,initialValue:rt(i.defaultValue??t.value[o]),mode:i.mode});return{...e[o],...r,errors:(a=e[o])!=null&&a.errors?[...e[o].errors,...r.errors]:r.errors}}function Fo(o){const e={};for(const[t,{errors:s}]of Object.entries(o))e[t]=s;return e}function Do(o){return o.querySelectorAll("input, select, textarea")}function Po({interactiveElements:o,onBlur:e,onInput:t,mode:s}){o.forEach(i=>{["onBlur","eager"].includes(s)&&i.addEventListener("blur",e),["onInput","eager"].includes(s)&&(i.addEventListener("change",t),i.getAttribute("type")==="radio"||i.getAttribute("type")==="checkbox"?i.addEventListener("change",t):i.addEventListener("input",t))})}function Mo({interactiveElements:o,onBlur:e,onInput:t}){o.forEach(s=>{s.removeEventListener("blur",e),s.removeEventListener("input",t),s.removeEventListener("change",t)})}const ut=Symbol("FormContext");let ct=null;function Vo({schema:o,model:e,defaultValues:t,options:s}){const i={mode:"eager",scrollToErrorSelector:".has-input-error",debouncedFields:null,throttledFields:null,...s},r=n.ref({...e==null?void 0:e.value,...t==null?void 0:t.value}),a=n.reactive(xo(o.value,(t==null?void 0:t.value)??r.value,i.mode)),l=n.ref(!1),h=n.ref(!1),g=n.computed(()=>Object.values(a).every(({valid:d})=>d)),k=n.computed(()=>Object.values(a).some(({dirty:d})=>d)),y=n.computed(()=>Fo(a));async function f(d){const p=await(await Ao())(o.value.entries[d],r.value[d]??"");return{result:p,isValid:p.success}}async function z(d,T=!0){await pe(0);const p=a[d];if(p.validating=!0,!o.value.entries[d]){p.valid=!0,p.validating=!1,p.validated=!0,p.errors=[],p.error=!1;return}const{result:w,isValid:C}=await f(d);p.valid=C,T&&(p.error=!C),p.errors=w.issues??[],p.validating=!1,p.validated=!0}async function O(d){var T,p,w,C,_,$,j,q;if(typeof((T=i.throttledFields)==null?void 0:T[d])=="number"||(p=i.throttledFields)!=null&&p[d]){const U=typeof((w=i.throttledFields)==null?void 0:w[d])=="number"?(C=i.throttledFields)==null?void 0:C[d]:1e3;So(z,U)(d,d)}else if(typeof((_=i.debouncedFields)==null?void 0:_[d])=="number"||($=i.debouncedFields)!=null&&$[d]){const U=typeof((j=i.debouncedFields)==null?void 0:j[d])=="number"?(q=i.debouncedFields)==null?void 0:q[d]:300;ko(z,U)(d,d)}else z(d)}function D(d){n.watch(()=>n.toValue(r.value)[d],()=>A(d,!0),{deep:o.value.entries[d].type==="object"})}function F(){for(const d in o.value.entries)D(d)}async function P(d=!0){return await Promise.all(Object.keys(o.value.entries).map(T=>z(T,d))),g.value}function b(d){const{dirty:T,blurred:p,mode:w}=a[d];return h.value||w==="eager"&&p||w==="onInput"&&T||w==="onBlur"&&p||w==="aggressive"||w==="lazy"}function I(d,T=!1){const p=r.value[d],w=a[d],C=!Le(p)&&!X(p,w.initialValue);w.dirty=C,w.blurred=w.blurred||C,!(!T&&!b(d))&&O(d)}function A(d,T=!1){const p=r.value[d],w=a[d];w.validated=!1;const C=!Le(p)&&!X(p,w.initialValue);w.dirty=C,!(!T&&!b(d))&&O(d)}function H(d,T){return async p=>{h.value=!0,l.value=!0,p.preventDefault(),await P()?await d(r.value):(T||i.scrollToErrorSelector)&&Te(typeof T=="string"?T:i.scrollToErrorSelector),l.value=!1}}const M={handleFieldInput:A,handleFieldBlur:I,fieldsStates:a,payload:r,addFieldValidationWatch:D,validateField:O,options:i,schema:o,setFieldValidationState:z};return ct=M,n.provide(ut,M),["aggressive","lazy"].includes(i.mode)&&F(),P(i.mode==="aggressive"),n.watch(r,d=>{e&&(e.value=d)},{immediate:!0}),{isDirty:k,isSubmitting:l,isSubmitted:h,isValid:g,errors:y,model:r,context:M,fieldsStates:a,validateForm:P,scrollToError:Te,handleSubmit:H}}function Ho(o,e){const t=ct??n.inject(ut);if(!t)throw new Error("useFormField must be used within a form (useFormValidator)");const{handleFieldInput:s,handleFieldBlur:i,fieldsStates:r,payload:a,options:l,addFieldValidationWatch:h,schema:g,setFieldValidationState:k}=t,y={...e,mode:at(o,g.value)?(e==null?void 0:e.mode)??l.mode:"none"};r[o]=Oo({name:o,fieldsStates:r,payload:a,schema:g,options:y});const f=n.computed(()=>r[o]);if(y.defaultValue!==void 0&&!X(a.value[o],y.defaultValue)){const b=y.defaultValue;a.value[o]=b,r[o].initialValue=rt(b)}["aggressive","lazy"].includes(f.value.mode)&&!["aggressive","lazy"].includes(l.mode)&&h(o),f.value.mode!=="none"&&k(o,f.value.mode==="aggressive"||l.mode==="aggressive");const z={onBlur:()=>i(o)},O={"onUpdate:modelValue":()=>s(o)},D=n.computed(()=>{if(!(y.componentRef||["aggressive","lazy","none"].includes(f.value.mode)))return f.value.mode==="onInput"||f.value.blurred&&f.value.mode==="eager"?O:z});if(y.componentRef&&!["aggressive","lazy"].includes(l.mode)&&!["aggressive","lazy"].includes(r[o].mode)){let b=[],I=null;I=n.watch(y.componentRef,A=>{A!=null&&A.$el&&(I==null||I(),b=Do(A.$el),Po({interactiveElements:b,onBlur:z.onBlur,onInput:O["onUpdate:modelValue"],mode:f.value.mode}))},{immediate:!0}),n.onUnmounted(()=>{Mo({interactiveElements:b,onBlur:z.onBlur,onInput:O["onUpdate:modelValue"]}),I==null||I()})}const F=n.computed(()=>f.value.error),P=n.computed(()=>f.value.errors);return{hasError:F,errors:P,errorMessage:n.computed(()=>{var b;return F.value?(b=P.value[0])==null?void 0:b.message:void 0}),isValid:n.computed(()=>f.value.valid),isDirty:n.computed(()=>f.value.dirty),isBlurred:n.computed(()=>f.value.blurred),isValidated:n.computed(()=>f.value.validated),isValidating:n.computed(()=>f.value.validating),mode:n.computed(()=>f.value.mode),value:n.computed({get:()=>a.value[o],set:b=>a.value[o]=b}),validationEvents:D}}exports.AosHandler=et;exports.IdleTimeout=Ie;exports.ScriptLoader=pt;exports.Swipe=Se;exports.ToasterHandler=Qe;exports.UserVisibility=Ce;exports.WaitHandler=Ge;exports._export_sfc=ge;exports.capitalize=Re;exports.countryCodeToUnicodeFlag=gt;exports.currency=Ye;exports.date=Ke;exports.debounce=vt;exports.directive=Fe;exports.directive$1=Ct;exports.directive$2=je;exports.directive$3=Ve;exports.directive$4=Tt;exports.getInstance=ro;exports.injectStrict=ne;exports.installFilters=qt;exports.installToaster=Gt;exports.instance=Je;exports.isClient=x;exports.mount=ve;exports.normalizeString=de;exports.number=Xe;exports.plugin=Mt;exports.plugin$1=De;exports.plugin$2=Ue;exports.plugin$3=_e;exports.plugin$4=We;exports.plugin$5=He;exports.plugin$6=Ne;exports.plugin$7=no;exports.plugin$8=io;exports.sleep=pe;exports.throttle=yt;exports.truthyFilter=ke;exports.useAos=mo;exports.useBreakpoints=yo;exports.useFormField=Ho;exports.useFormValidator=Vo;exports.useIdleTimeout=vo;exports.useInstanceUniqId=co;exports.useReadingTime=Eo;exports.useStringMatching=Lo;exports.useSwipe=bo;exports.useThemeHandler=uo;exports.useTimer=Ze;exports.useToast=fo;exports.useUserVisibility=po;exports.useWait=ho;exports.useWindowSize=st;exports.vZoomImg=Be;
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 kt{constructor(e){u(this,"options");u(this,"loader");u(this,"wrapper");u(this,"img");u(this,"keydownHandler");u(this,"onImgLoadedCallback");u(this,"buttonsAdded");u(this,"defaultOptions",{scale:!0,blur:!0,disabled:!1});u(this,"mouseEnterListener");u(this,"mouseLeaveListener");u(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(It);const s=document.createElement("div");s.classList.add("maz-zoom-img"),s.setAttribute("id","MazImgPreviewFullsize"),s.addEventListener("click",i=>{s.isEqualNode(i.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 i=this.getButton("previous"),r=this.getButton("next");t.push(i,r)}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){return e<0?this.allInstances.length-1:e>=this.allInstances.length?0:e}nextPreviousImage(e){const t=e,s=document.querySelector(".maz-zoom-img-instance.maz-is-open");if(s){const i=this.allInstances.indexOf(s),r=t?i+1:i-1,a=this.allInstances[this.getNewInstanceIndex(r)];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"),i=t.getAttribute("data-zoom-alt");this.wrapper.style.width="",this.loader.hidden=!1,s&&this.img.setAttribute("src",s),i&&this.img.setAttribute("alt",i)}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 ee;const _e={created(o,e){ee=new kt(e),ee.create(o)},updated(o,e){ee.update(e)},unmounted(o){ee.remove(o)}},qe={install(o){o.directive("zoom-img",_e)}},Ct="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",he={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 Ue{constructor(e={}){u(this,"observers",[]);u(this,"defaultOptions",he);u(this,"options");u(this,"onImgLoadedCallback");u(this,"onImgErrorCallback");u(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 i=s.getAttribute("data-lazy-srcset");if(i)s.srcset=i;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(),i=e.querySelectorAll("source");if(i.length>0)for await(const r of i)r.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,i){var r,a;this.observers.push(i);for(const l of s)if(l.isIntersecting){if((a=(r=this.options).onIntersecting)==null||a.call(r,l.target),this.options.observerOnce&&i.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)},i=this.options.observerOptions;new IntersectionObserver(s,i).observe(e)}async imageHandler(e,t,s){if(s==="update")for await(const i of this.observers)i.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,Ct),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 te;const St={created(o,e){const t=typeof e.value=="object"?e.value:{};te=new Ue(t),te.add(o,e)},updated(o,e){te.update(o,e)},unmounted(o,e){te.remove(o,e)}},je={install(o,e={}){const t={...he,...e,observerOptions:{...he.observerOptions,...e.observerOptions}},s=new Ue(t);o.directive("lazy-img",{created:s.add.bind(s),updated:s.update.bind(s),unmounted:s.remove.bind(s)})}},At=["onKeypress"],xt={class:"m-fullscreen-img-scroller"},Ot=["src","alt"],Ft=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,i=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./MazSpinner-OdoRwyjg.cjs"))),r=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./x-mark-BETcRuRC.cjs"))),a=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./chevron-left-D2bYJFWX.cjs"))),l=n.ref(!1),h=n.ref(!1),g=n.ref(!1),C=n.ref(!1),y=n.ref(!1),f=n.ref(t.clickedElement),z=n.computed(()=>t.clickedElement.getBoundingClientRect()),O=n.computed(()=>z.value.height<z.value.width),M=n.ref(t.src),F=n.ref(t.alt),D=n.ref(),b=n.ref(),I=n.computed(()=>y.value?"--is-zoomed maz-cursor-zoom-out":"maz-cursor-zoom-in");function P(){l.value=!0,h.value=!1,g.value=!0}n.watch(()=>g.value,c=>{c&&ie()});function k(){s("before-close"),m()}function H(c){c.key==="Escape"&&(c.preventDefault(),k()),(c.key==="ArrowLeft"||c.key==="ArrowRight")&&(c.preventDefault(),_(c.key==="ArrowRight"?"next":"previous"))}function d(){document.documentElement.classList.add("--m-fullscreen-open")}function T(){document.documentElement.classList.remove("--m-fullscreen-open")}function p(){return[...document.querySelectorAll(".m-fullscreen-img-instance")]}function w(c,v){return v<0?c.length-1:v>=c.length?0:v}async function S(c,v){c.classList.remove(t.openInstanceClass),v.classList.add(t.openInstanceClass);const L=v.getAttribute("data-src"),A=v.getAttribute("data-alt");F.value=A,L&&(M.value=L),l.value=!1,l.value||(h.value=!0)}function _(c){const v=document.querySelector(`.m-fullscreen-img-instance.${t.openInstanceClass}`);if(v){const L=p(),A=L.indexOf(v),N=c==="next"?A+1:A-1,V=L[w(L,N)];f.value=V,V&&S(v,V),s(c),y.value?$(b.value):Y()}}function $(c){O.value?(c.style.width=`${window.innerWidth}px`,c.style.removeProperty("height")):(c.style.height=`${window.innerHeight}px`,c.style.removeProperty("width")),c.style.removeProperty("top"),c.style.removeProperty("left")}async function j(){const c=b.value;y.value?(y.value=!y.value,Y()):(y.value=!y.value,$(c))}function q(c){var v;return(v=b.value)==null?void 0:v.animate(c,{duration:t.animation.duration,easing:t.animation.easing})}function U(c=t.offset??0){const v=(f.value instanceof HTMLImageElement?f.value.naturalWidth:f.value.clientWidth)||1,L=(f.value instanceof HTMLImageElement?f.value.naturalHeight:f.value.clientHeight)||1,A=window.innerWidth,N=window.innerHeight,V=Math.min((A-2*c)/v,(N-2*c)/L),re=(A-v*V)/2,ae=(N-L*V)/2;return{centerX:re,centerY:ae,originalWidth:v,originalHeight:L,scale:V}}function W({trigger:c}){const{originalWidth:v,originalHeight:L,scale:A,centerX:N,centerY:V}=U(),{top:re,left:ae,width:mt,height:ht}=z.value,ye=[{top:`${re}px`,left:`${ae}px`,width:`${mt}px`,height:`${ht}px`,opacity:0},{top:`${V}px`,left:`${N}px`,width:`${v*A}px`,height:`${L*A}px`,opacity:1}];return{frames:c==="open"?ye:ye.reverse()}}function Y(){const{centerX:c,centerY:v,originalHeight:L,originalWidth:A,scale:N}=U(),V={top:`${v}px`,left:`${c}px`,width:`${A*N}px`,height:`${L*N}px`};if(!b.value)throw console.error("[maz-ui](vFullscreenImg) ImgElement is not defined");Object.assign(b.value.style,V)}function ie(){const{frames:c}=W({trigger:"open"}),v=q(c);if(!v)throw console.error("[maz-ui](vFullscreenImg) open animation is not defined");v.onfinish=()=>{Y()}}function m(){const{frames:c}=W({trigger:"close"}),v=q(c);if(!v)throw console.error("[maz-ui](vFullscreenImg) close animation is not defined");v.onfinish=()=>{var L,A;s("close"),(L=D.value)==null||L.remove(),(A=t.destroy)==null||A.call(t)}}function E(){y.value||Y()}return n.onMounted(()=>{h.value=!0,document.addEventListener("keydown",H),window.addEventListener("resize",E),d(),C.value=p().length>1}),n.onBeforeUnmount(()=>{document.removeEventListener("keydown",H),window.removeEventListener("resize",E),T()}),(c,v)=>(n.openBlock(),n.createElementBlock("div",{ref_key:"FullscreenImgElement",ref:D,role:"button",class:"m-fullscreen-img",tabindex:"0",onClick:n.withModifiers(k,["stop"]),onKeypress:n.withKeys(n.withModifiers(k,["prevent"]),["esc"])},[n.withDirectives(n.createVNode(n.unref(i),{class:"m-fullscreen-img-loader maz-h-16"},null,512),[[n.vShow,h.value]]),g.value&&C.value?(n.openBlock(),n.createElementBlock("button",{key:0,type:"button",class:"m-fullscreen-btn --next",onClick:v[0]||(v[0]=n.withModifiers(L=>_("next"),["stop"]))},[n.createVNode(n.unref(a),{class:"maz-rotate-180 maz-text-3xl"})])):n.createCommentVNode("v-if",!0),g.value&&C.value?(n.openBlock(),n.createElementBlock("button",{key:1,type:"button",class:"m-fullscreen-btn --previous",onClick:v[1]||(v[1]=n.withModifiers(L=>_("previous"),["stop"]))},[n.createVNode(n.unref(a),{class:"maz-text-3xl"})])):n.createCommentVNode("v-if",!0),n.createElementVNode("button",{type:"button",class:"m-fullscreen-btn --close",onClick:k},[n.createVNode(n.unref(r),{class:"maz-text-3xl"})]),n.createElementVNode("div",xt,[n.createCommentVNode(" eslint-disable-next-line vuejs-accessibility/no-static-element-interactions, vuejs-accessibility/click-events-have-key-events "),n.createElementVNode("img",{ref_key:"ImgElement",ref:b,src:M.value,alt:F.value??void 0,tabindex:"0",class:n.normalizeClass([I.value]),onLoad:P,onClick:v[2]||(v[2]=n.withModifiers(L=>c.zoom?j():void 0,["stop"]))},null,42,Ot)])],40,At))}}),ge=(o,e)=>{const t=o.__vccOpts||o;for(const[s,i]of e)t[s]=i;return t},Mt=ge(Ft,[["__scopeId","data-v-884a2c57"]]),we="m-fullscreen-is-open";class Dt{constructor(){u(this,"options");u(this,"defaultOptions",{scaleOnHover:!1,blurOnHover:!1,disabled:!1,zoom:!0,offset:80,animation:{duration:300,easing:"ease-in-out"}});u(this,"mouseEnterListener");u(this,"mouseLeaveListener");u(this,"renderPreviewListener")}buildOptions(e,t){const s=typeof t.value=="object"?t.value:{src:t.value,alt:void 0},i=(s==null?void 0:s.src)??this.getImgSrc(e),r=(s==null?void 0:s.alt)??this.getImgAlt(e);return{...this.defaultOptions,...s,src:i,alt:r}}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(we),ve(Mt,{props:{...this.options,openInstanceClass:we,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 oe;const We={mounted(o,e){return oe=new Dt,oe.create(o,e)},updated(o,e){return oe.update(o,e)},unmounted(o){return oe.remove(o)}},Ye={install(o){o.directive("fullscreen-img",We)}},Pt=[$e,qe,je,De,Ye,Be],Ht={install(o){for(const e of Pt)e.install(o,{})}};function Re(o){return o?(o=o.toString(),o.charAt(0).toUpperCase()+o.slice(1)):""}const Vt={style:"currency",minimumFractionDigits:2,round:!1};function $t(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 Nt(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 Ke(o,e,t){const s={...Vt,...t};Nt(o,e,s);try{return $t(o,e,s)}catch(i){throw new Error(`[maz-ui](FilterCurrency) ${i}`)}}const Bt={month:"short",day:"numeric",year:"numeric"};function Xe(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??Bt;try{const i=o instanceof Date?o:new Date(o);return new Intl.DateTimeFormat(e,s).format(i)}catch(i){throw new Error(`[maz-ui](FilterDate) ${i}`)}}const _t={minimumFractionDigits:2};function Ze(o,e,t){const s={..._t,...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(i){throw new Error(`[maz-ui](FilterNumber) ${i}`)}}const qt={capitalize:Re,currency:Ke,date:Xe,number:Ze},Ut={install(o){o.provide("filters",qt)}};function Qe({timeout:o=1e3,callback:e,remainingTimeUpdate:t=200,callbackOffsetTime:s=0}){const i=n.ref(o),r=n.ref(o);let a;function l(f){typeof f=="number"&&(r.value=f),typeof f=="number"&&(i.value=f),h()}function h(){a||(a=setInterval(()=>{r.value-=t,r.value<=0&&(y(),setTimeout(()=>e==null?void 0:e(),s))},t))}function g(){a&&(clearInterval(a),a=void 0)}function C(){!a&&r.value>0&&h()}function y(){setTimeout(()=>r.value=i.value,s*2),g()}return{remainingTime:r,start:l,pause:g,resume:C,stop:y}}const jt={class:"m-toast__message-wrapper"},Wt={class:"m-toast__message"},Yt={class:"maz-flex maz-items-center maz-gap-2"},Rt={key:0},Kt={key:4,class:"progress-bar maz-absolute maz-inset-x-0 maz-bottom-0 maz-h-1"},Xt=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,i=t,r=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./MazBtn-BLvj2Vcl.cjs"))),a=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./x-mark-BETcRuRC.cjs"))),l=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./arrow-top-right-on-square-Kw3b5yYN.cjs"))),h=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./exclamation-triangle-BhBdL4E2.cjs"))),g=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./exclamation-circle-Cw7wlH9H.cjs"))),C=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./information-circle-i_xlqw0y.cjs"))),y=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./check-circle-Bm2TJi5n.cjs"))),f=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./link-BbXTqAk3.cjs"))),z=n.ref(),O=n.computed(()=>{if(s.icon)switch(s.type){case"danger":return h;case"info":return C;case"success":return y;case"warning":return g;default:return}}),M=n.computed(()=>s.position.includes("top")?"top":"bottom"),F=n.computed(()=>s.position.includes("left")?"left":s.position.includes("right")?"right":"center"),D=n.computed(()=>F.value!=="center"?F.value==="right"?"m-slide-right":"m-slide-left":M.value==="top"?"m-slide-top":"m-slide-bottom"),b=n.ref(!1),I=n.ref(!1),P=n.ref(),k=`m-toast-container --${M.value} --${F.value}`,H=`.${k.replaceAll(" ",".")}`,d=Qe({callback:W,timeout:typeof s.timeout=="number"?s.timeout:0,callbackOffsetTime:200});function T(){const m=document.querySelector(H);if(!m&&!m){const E=document.body,c=document.createElement("div");c.className=k,E.append(c)}}function p(){const m=document.querySelector(H);return!s.queue&&s.maxToasts===!1?!1:typeof s.maxToasts=="number"&&m?s.maxToasts<=m.childElementCount:m&&m.childElementCount>0}function w(){if(p()){P.value=setTimeout(w,250);return}const m=document.querySelector(H);z.value&&m&&m.prepend(z.value),I.value=!0,typeof s.timeout=="number"&&s.timeout>0&&d.start()}const S=n.ref("100%");function _(){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-secondary"}}n.watch(d.remainingTime,m=>{if(typeof s.timeout=="number"){const E=100*m/s.timeout;S.value=`${E}%`}});function $(m){i("click",m),s.persistent||W()}async function j(m,E){var c;b.value=!0,await m(),b.value=!1,(c=s.action)!=null&&c.closeToast&&$(E)}function q(m){s.noPauseOnHover||(m?d.pause():d.resume())}function U(){stop(),P.value&&clearTimeout(P.value)}function W(){U(),I.value=!1}e({closeToast:W});function Y(){i("open")}function ie(){var E;i("close"),(E=z.value)==null||E.remove();const m=document.querySelector(H);m&&!(m!=null&&m.hasChildNodes())&&m.remove()}return n.onMounted(()=>{T(),w()}),(m,E)=>(n.openBlock(),n.createBlock(n.Transition,{name:D.value,onAfterLeave:ie,onAfterEnter:Y,persisted:""},{default:n.withCtx(()=>[n.withDirectives(n.createElementVNode("button",{ref_key:"Toaster",ref:z,class:n.normalizeClass(["m-toast",[`--${m.type}`,`--${M.value}`,`--${F.value}`,{"maz-pb-1":typeof m.timeout=="number"&&m.timeout>0,"--persistent":m.persistent}]]),role:"alert",onMouseover:E[2]||(E[2]=c=>q(!0)),onMouseleave:E[3]||(E[3]=c=>q(!1)),onClick:E[4]||(E[4]=n.withModifiers(c=>{var v;return m.link&&!((v=m.link)!=null&&v.closeToast)?void 0:$(c)},["stop"]))},[O.value?(n.openBlock(),n.createBlock(n.resolveDynamicComponent(O.value),{key:0,class:"maz-text-2xl"})):n.createCommentVNode("v-if",!0),n.createElementVNode("div",jt,[n.createElementVNode("p",Wt,n.toDisplayString(m.message),1)]),m.action?(n.openBlock(),n.createBlock(n.unref(r),{key:1,"data-test":"action-btn",color:m.type,pastel:"",loading:b.value,size:"sm",onClick:E[0]||(E[0]=n.withModifiers(c=>m.action?j(m.action.func,c):void 0,["stop"]))},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(m.action.text),1)]),_:1},8,["color","loading"])):n.createCommentVNode("v-if",!0),m.link?(n.openBlock(),n.createBlock(n.unref(r),{key:2,"data-test":"link-btn",color:m.type,pastel:"",size:"xs",href:m.link.href,target:m.link.target??"_self"},{default:n.withCtx(()=>{var c;return[n.createElementVNode("div",Yt,[m.link.text?(n.openBlock(),n.createElementBlock("span",Rt,n.toDisplayString(m.link.text),1)):n.createCommentVNode("v-if",!0),((c=m.link)==null?void 0:c.target)==="_blank"?(n.openBlock(),n.createBlock(n.unref(l),{key:1,class:"maz-text-xl"})):(n.openBlock(),n.createBlock(n.unref(f),{key:2,class:"maz-text-xl"}))])]}),_:1},8,["color","href","target"])):n.createCommentVNode("v-if",!0),m.persistent?n.createCommentVNode("v-if",!0):(n.openBlock(),n.createElementBlock("button",{key:3,class:"--close",onClick:E[1]||(E[1]=n.withModifiers(c=>$(c),["stop"]))},[n.createVNode(n.unref(a),{class:"--icon maz-text-xl"})])),typeof m.timeout=="number"&&m.timeout>0?(n.openBlock(),n.createElementBlock("div",Kt,[n.createElementVNode("div",{style:n.normalizeStyle({width:S.value}),class:n.normalizeClass(["maz-h-full !maz-transition-all !maz-duration-200 !maz-ease-linear",_()])},null,6)])):n.createCommentVNode("v-if",!0)],34),[[n.vShow,I.value]])]),_:1},8,["name"]))}}),Zt=ge(Xt,[["__scopeId","data-v-3f062fa5"]]),Qt={position:"bottom-right",timeout:1e4,persistent:!1,icon:!0};class Ge{constructor(e,t){this.app=e,this.globalOptions=t}show(e,t){const s={...Qt,...this.globalOptions,...t,message:e},{destroy:i,vNode:r}=ve(Zt,{props:s,app:this.app});return{destroy:i,close:()=>{var a,l;return(l=(a=r.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 Gt(o,e){return new Ge(o,e)}const Jt={install(o,e){o.provide("toast",Gt(o,e))}},R="";function eo(o){return o.filter((e,t,s)=>t===s.indexOf(e))}function to(o){return(e=R)=>typeof e=="function"?o.findIndex((...t)=>e(...t))>-1:o.includes(e)}const oo=o=>o.length>0;function so(o){return(e=R)=>eo([...o,e])}function no(o){return(e=R)=>o.filter(t=>t!==e)}class Je{constructor(){u(this,"_loaders",n.ref([]))}get loaders(){return n.computed(()=>this._loaders.value)}stop(e=R){this._loaders.value=no(this._loaders.value)(e)}start(e=R){return this._loaders.value=so(this._loaders.value)(e),()=>this.stop(e)}get anyLoading(){return n.computed(()=>oo(this._loaders.value))}isLoading(e=R){return n.computed(()=>to(this._loaders.value)(e)).value}}const et=new Je,io={install:o=>{o.provide("wait",et)}},le={delay:100,observer:{root:void 0,rootMargin:"0px",threshold:.2},animation:{once:!0,duration:300,delay:0}};class tt{constructor(e){u(this,"options");this.options={delay:(e==null?void 0:e.delay)??le.delay,observer:{...le.observer,...e==null?void 0:e.observer},animation:{...le.animation,...e==null?void 0:e.animation}}}handleIntersect(e,t){for(const s of e){const r=s.target.getAttribute("data-maz-aos-children")==="true",a=s.target.getAttribute("data-maz-aos")?[s.target]:[];if(r){const l=[...document.querySelectorAll("[data-maz-aos-anchor]")].map(h=>h.getAttribute("data-maz-aos-anchor")===`#${s.target.id}`?h:void 0);for(const h of l)h&&a.push(h)}for(const l of a){const h=l.getAttribute("data-maz-aos-once"),g=typeof h=="string"?h==="true":this.options.animation.once;if(typeof this.options.observer.threshold=="number"&&s.intersectionRatio>this.options.observer.threshold){const C=l.getAttribute("data-maz-aos-duration"),y=l.getAttribute("data-maz-aos-delay");if(C||(l.style.transitionDuration=`${this.options.animation.duration}ms`,setTimeout(()=>{l.style.transitionDuration="0"},1e3)),y||(l.style.transitionDelay=`${this.options.animation.delay}ms`,setTimeout(()=>{l.style.transitionDelay="0"},1e3)),l.classList.add("maz-aos-animate"),g){const f=l.getAttribute("data-maz-aos-anchor");if(f){const z=document.querySelector(f);z&&t.unobserve(z)}t.unobserve(l)}}else l.classList.remove("maz-aos-animate")}}}async handleObserver(){await pe(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 i=document.querySelector(s);i?(i.setAttribute("data-maz-aos-children","true"),e.observe(i)):console.warn(`[maz-ui](aos) no element found with selector "${s}"`)}else e.observe(t)}}runAnimations(){if(x())return this.handleObserver();console.warn("[MazAos](runAnimations) should be executed on client side")}}let K;const ro={install:(o,e)=>{K=new tt(e),o.provide("aos",K),x()&&(e!=null&&e.router?e.router.afterEach(async()=>{K.runAnimations()}):K.runAnimations())}};function ao(){return K}const lo={darkClass:"dark",lightClass:"light",storageThemeKey:"theme",storageThemeValueDark:"dark",storageThemeValueLight:"light",storageThemeValueSystem:"system",watchChanges:!0},Z=n.ref("system"),B=n.ref("system");function Ee(){return window.matchMedia("(prefers-color-scheme: dark)").matches}function Q({darkClass:o,lightClass:e,storageThemeKey:t,storageThemeValueDark:s,setLocalStorageValue:i=!0,setSelectedTheme:r=!0}){x()&&(document.documentElement.classList.remove(e),document.documentElement.classList.add(o),Z.value=s,r&&(B.value=s),i&&(localStorage[t]=s))}function G({darkClass:o,lightClass:e,storageThemeKey:t,storageThemeValueLight:s,setLocalStorageValue:i=!0,setSelectedTheme:r=!0}){x()&&(document.documentElement.classList.remove(o),document.documentElement.classList.add(e),Z.value=s,r&&(B.value=s),i&&(localStorage[t]=s))}function ot({setLocalStorageValue:o=!0,...e}){if(x())return document.documentElement.classList.remove(e.darkClass),document.documentElement.classList.remove(e.lightClass),Z.value=e.storageThemeValueSystem,B.value=e.storageThemeValueSystem,o&&(localStorage[e.storageThemeKey]=e.storageThemeValueSystem),fe(e)}function st(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 Q({...o,setLocalStorageValue:!1,setSelectedTheme:!0});case"light":return G({...o,setLocalStorageValue:!1,setSelectedTheme:!0})}}function fe(o){return x()?!localStorage[o.storageThemeKey]&&o.defaultTheme?st(o):localStorage[o.storageThemeKey]===o.storageThemeValueDark||!localStorage[o.storageThemeKey]&&Ee()||localStorage[o.storageThemeKey]===o.storageThemeValueSystem&&Ee()?Q({...o,setLocalStorageValue:!1,setSelectedTheme:!1}):G({...o,setLocalStorageValue:!1,setSelectedTheme:!1}):void 0}function ue({theme:o,...e}){return o==="system"?ot(e):o==="dark"?Q(e):G(e)}function uo(o){return Z.value===o.storageThemeValueDark?G(o):Q(o)}function co(o){const e={...lo,...o};function t(){fe(e)}return n.onMounted(()=>{localStorage[e.storageThemeKey]&&(B.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(B,s=>{switch(localStorage[e.storageThemeKey]=s,s){case e.storageThemeValueDark:{Q(e);break}case e.storageThemeValueLight:{G(e);break}case e.storageThemeValueSystem:{ot(e);break}}}),{autoSetTheme:()=>fe(e),toggleTheme:()=>uo(e),setSystemTheme:()=>ue({...e,theme:"system"}),setDarkTheme:()=>ue({...e,theme:"dark"}),setLightTheme:()=>ue({...e,theme:"light"}),setDefaultTheme:()=>st(e),hasDarkTheme:n.computed(()=>B.value===e.storageThemeValueDark),hasLightTheme:n.computed(()=>B.value===e.storageThemeValueLight),hasSystemTheme:n.computed(()=>B.value===e.storageThemeValueSystem),theme:Z,selectedTheme:B}}function mo({componentName:o,providedId:e}){const t=n.getCurrentInstance();return n.computed(()=>e??`${o}-${t==null?void 0:t.uid}`)}function ho(){return ne("aos")}function fo(){return ne("wait")}function vo(){return ne("toast")}function po({callback:o,options:e}){return new Ce(o,e)}function go({callback:o,options:e}){return new Se(o,e)}function yo(o){const e={};for(const[t,s]of Object.entries(o))e[t]=Number.parseInt(s,10);return e}function nt(o={}){const{internalWindow:e=x()?window:void 0,initialWidth:t=Number.POSITIVE_INFINITY,initialHeight:s=Number.POSITIVE_INFINITY,includeScrollbar:i=!0}=o,r=n.ref(t),a=n.ref(s);function l(){e&&(i?(r.value=e.innerWidth,a.value=e.innerHeight):(r.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:r,height:a}}function bo({initialWidth:o=0,initialHeight:e,includeScrollbar:t,internalWindow:s,listenOrientation:i,breakpoints:r,mediumBreakPoint:a="md",largeBreakPoint:l="lg"}){const{width:h}=nt({initialWidth:o,initialHeight:e,includeScrollbar:t,internalWindow:s,listenOrientation:i}),g=yo(r),C=n.computed(()=>h.value>=g[l]),y=n.computed(()=>h.value>=g[a]&&h.value<g[l]),f=n.computed(()=>h.value>=0&&h.value<g[a]);return{width:h,numericBreakpoints:g,isSmallScreen:f,isLargeScreen:C,isMediumScreen:y,breakpoints:r}}function wo(o){const e=n.ref(),t=n.ref(),s=n.ref(),i=n.ref(),r=n.ref(),a=n.ref(),l=new Ae({...o,element:o.element,onValuesChanged(h){e.value=h.xDiff,t.value=h.yDiff,s.value=h.xStart,i.value=h.xEnd,r.value=h.yStart,a.value=h.yEnd}});return{xDiff:e,yDiff:t,xStart:s,xEnd:i,yStart:r,yEnd:a,start:l.start,stop:l.stop}}function it(o){const e=o.join(", ").match(/\b\w+\b/g);return e?e.length:0}function Eo(o,e=150){const t=it([o]);return Math.ceil(t/e)}function zo(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,h;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 g=document.querySelector(t.value);if(g)return g.textContent}return typeof o.content=="string"?o.content:(h=o.content)==null?void 0:h.value}),i=n.computed(()=>Eo(s.value,e.value)),r=n.computed(()=>it([s.value]));return{content:s,wordCount:r,velocity:e,duration:i}}function To(o,e){const t=o.length,s=e.length,i=[];for(let r=0;r<=t;r++)i[r]=[r];for(let r=0;r<=s;r++)i[0][r]=r;for(let r=1;r<=t;r++)for(let a=1;a<=s;a++){const l=o[r-1]===e[a-1]?0:1;i[r][a]=Math.min(i[r-1][a]+1,i[r][a-1]+1,i[r-1][a-1]+l)}return i[t][s]}function rt(o,e){const t=To(o,e),s=Math.max(o.length,e.length);return 1-t/s}function Lo(o,e,t=.75){return rt(o,e)>=t}function Io(o,e,t=.75){const s=n.computed(()=>de(typeof o=="string"?o:o.value)),i=n.computed(()=>de(typeof e=="string"?e:e.value)),r=n.computed(()=>typeof t=="number"?t:t.value),a=n.computed(()=>rt(s.value,i.value));return{isMatching:n.computed(()=>Lo(s.value,i.value,r.value)),score:a}}function ko(o,e){const t={};return async function(s,...i){t[s]||(t[s]={timer:null,promise:null});const r=t[s];return r.timer&&clearTimeout(r.timer),r.promise=new Promise((a,l)=>{r.timer=setTimeout(async()=>{try{a(await o(...i))}catch(h){l(h)}finally{delete t[s]}},e)}),r.promise}}function at(o){const e=n.toValue(o);return Array.isArray(e)?Object.freeze([...e]):typeof e=="object"&&e!==null?Object.freeze({...e}):e}function ze(o){return o==null||typeof o=="string"||typeof o=="number"||typeof o=="boolean"||typeof o=="symbol"||typeof o=="bigint"}function Co(o,e){if(o.length!==e.length)return!1;for(const[t,s]of o.entries())if(!X(s,e[t]))return!1;return!0}function So(o,e){const t=Object.keys(o),s=Object.keys(e);if(t.length!==s.length)return!1;for(const i of t)if(!s.includes(i)||!X(o[i],e[i]))return!1;return!0}function X(o,e){return ze(o)||ze(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)?Co(o,e):typeof o=="object"&&typeof e=="object"?So(o,e):!1}function Ao(o,e){const t={};return async(s,...i)=>{const r=Date.now();return t[s]||(t[s]={promise:null,lastCall:0,lastArgs:[]}),r-t[s].lastCall>=e?(t[s].lastCall=r,o(...i)):(t[s].lastArgs=i,t[s].promise||(t[s].promise=new Promise(a=>{setTimeout(async()=>{t[s].lastCall=Date.now();const l=await o(...t[s].lastArgs);t[s].promise=null,a(l)},e-(r-t[s].lastCall))})),t[s].promise)}}let ce;async function xo(){if(ce)return ce;const{safeParseAsync:o}=await Promise.resolve().then(()=>require("./index-D-PtzxMv.cjs"));return ce=o,o}function lt(o,e){return Object.keys(e.entries).includes(o)}function Te(o=".has-input-error"){const e=document.querySelector(o);e&&e.scrollIntoView({behavior:"smooth",block:"center"})}function Le(o){return o==null||o===""}function ut({name:o,schema:e,initialValue:t,mode:s}){const i=e?lt(o,e):!1;return{blurred:!1,dirty:!1,errors:[],error:!1,valid:!i,validating:!1,validated:!1,mode:i?s??"eager":"none",initialValue:t}}function Oo(o,e,t){const s={};for(const[i]of Object.entries(o.entries)){const r=i;s[r]=ut({name:r,schema:o,mode:t,initialValue:e[i]})}return s}function Fo({name:o,fieldsStates:e,payload:t,schema:s,options:i}){var a;const r=ut({name:o,schema:s.value,initialValue:at(i.defaultValue??t.value[o]),mode:i.mode});return{...e[o],...r,errors:(a=e[o])!=null&&a.errors?[...e[o].errors,...r.errors]:r.errors}}function Mo(o){const e={};for(const[t,{errors:s}]of Object.entries(o))e[t]=s;return e}function Ie(o){return o instanceof HTMLInputElement||o instanceof HTMLSelectElement||o instanceof HTMLTextAreaElement?[o]:[...o.querySelectorAll("input, select, textarea")]}function Do({interactiveElements:o,onBlur:e,onInput:t,mode:s}){o.forEach(i=>{["onBlur","eager"].includes(s)&&i.addEventListener("blur",e),["onInput","eager"].includes(s)&&(i.getAttribute("type")==="radio"||i.getAttribute("type")==="checkbox"?i.addEventListener("change",t):i.addEventListener("input",t))})}function Po({interactiveElements:o,onBlur:e,onInput:t}){o.forEach(s=>{s.removeEventListener("blur",e),s.removeEventListener("input",t),s.removeEventListener("change",t)})}const ct=Symbol("FormContext");let dt=null;function Ho({schema:o,model:e,defaultValues:t,options:s}){const i={mode:"eager",scrollToErrorSelector:".has-input-error",debouncedFields:null,throttledFields:null,...s},r=n.ref({...e==null?void 0:e.value,...t==null?void 0:t.value}),a=n.reactive(Oo(o.value,(t==null?void 0:t.value)??r.value,i.mode)),l=n.ref(!1),h=n.ref(!1),g=n.computed(()=>Object.values(a).every(({valid:d})=>d)),C=n.computed(()=>Object.values(a).some(({dirty:d})=>d)),y=n.computed(()=>Mo(a));async function f(d){const p=await(await xo())(o.value.entries[d],r.value[d]??"");return{result:p,isValid:p.success}}async function z(d,T=!0){await pe(0);const p=a[d];if(p.validating=!0,!o.value.entries[d]){p.valid=!0,p.validating=!1,p.validated=!0,p.errors=[],p.error=!1;return}const{result:w,isValid:S}=await f(d);p.valid=S,T&&(p.error=!S),p.errors=w.issues??[],p.validating=!1,p.validated=!0}async function O(d){var T,p,w,S,_,$,j,q;if(typeof((T=i.throttledFields)==null?void 0:T[d])=="number"||(p=i.throttledFields)!=null&&p[d]){const U=typeof((w=i.throttledFields)==null?void 0:w[d])=="number"?(S=i.throttledFields)==null?void 0:S[d]:1e3;Ao(z,U)(d,d)}else if(typeof((_=i.debouncedFields)==null?void 0:_[d])=="number"||($=i.debouncedFields)!=null&&$[d]){const U=typeof((j=i.debouncedFields)==null?void 0:j[d])=="number"?(q=i.debouncedFields)==null?void 0:q[d]:300;ko(z,U)(d,d)}else z(d)}function M(d){n.watch(()=>n.toValue(r.value)[d],()=>P(d,!0),{deep:o.value.entries[d].type==="object"})}function F(){for(const d in o.value.entries)M(d)}async function D(d=!0){return await Promise.all(Object.keys(o.value.entries).map(T=>z(T,d))),g.value}function b(d){const{dirty:T,blurred:p,mode:w}=a[d];return h.value||w==="eager"&&p||w==="onInput"&&T||w==="onBlur"&&p||w==="aggressive"||w==="lazy"}function I(d,T=!1){const p=r.value[d],w=a[d],S=!Le(p)&&!X(p,w.initialValue);w.dirty=S,w.blurred=w.blurred||S,!(!T&&!b(d))&&O(d)}function P(d,T=!1){const p=r.value[d],w=a[d];w.validated=!1;const S=!Le(p)&&!X(p,w.initialValue);w.dirty=S,!(!T&&!b(d))&&O(d)}function k(d,T){return async p=>{h.value=!0,l.value=!0,p.preventDefault(),await D()?await d(r.value):(T||i.scrollToErrorSelector)&&Te(typeof T=="string"?T:i.scrollToErrorSelector),l.value=!1}}const H={handleFieldInput:P,handleFieldBlur:I,fieldsStates:a,payload:r,addFieldValidationWatch:M,validateField:O,options:i,schema:o,setFieldValidationState:z};return dt=H,n.provide(ct,H),["aggressive","lazy"].includes(i.mode)&&F(),D(i.mode==="aggressive"),n.watch(r,d=>{e&&(e.value=d)},{immediate:!0}),{isDirty:C,isSubmitting:l,isSubmitted:h,isValid:g,errors:y,model:r,context:H,fieldsStates:a,validateForm:D,scrollToError:Te,handleSubmit:k}}function Vo(o,e){const t=dt??n.inject(ct);if(!t)throw new Error("useFormField must be used within a form (useFormValidator)");const{handleFieldInput:s,handleFieldBlur:i,fieldsStates:r,payload:a,options:l,addFieldValidationWatch:h,schema:g,setFieldValidationState:C}=t,y={...e,mode:lt(o,g.value)?(e==null?void 0:e.mode)??l.mode:"none"};r[o]=Fo({name:o,fieldsStates:r,payload:a,schema:g,options:y});const f=n.computed(()=>r[o]);if(y.defaultValue!==void 0&&!X(a.value[o],y.defaultValue)){const b=y.defaultValue;a.value[o]=b,r[o].initialValue=at(b)}["aggressive","lazy"].includes(f.value.mode)&&!["aggressive","lazy"].includes(l.mode)&&h(o),f.value.mode!=="none"&&C(o,f.value.mode==="aggressive"||l.mode==="aggressive");const z={onBlur:()=>i(o)},O={"onUpdate:modelValue":()=>s(o)},M=n.computed(()=>{if(!(y.componentRef||["aggressive","lazy","none"].includes(f.value.mode)))return f.value.mode==="onInput"||f.value.blurred&&f.value.mode==="eager"?O:z});if(y.componentRef&&!["aggressive","lazy"].includes(l.mode)&&!["aggressive","lazy"].includes(r[o].mode)){let b=[],I=null;const P=()=>{Do({interactiveElements:b,onBlur:z.onBlur,onInput:O["onUpdate:modelValue"],mode:f.value.mode})};I=n.watch(y.componentRef,k=>{k&&k instanceof HTMLElement?(I==null||I(),b=Ie(k),P()):k!=null&&k.$el&&(I==null||I(),b=Ie(k.$el),P())},{immediate:!0}),n.onUnmounted(()=>{Po({interactiveElements:b,onBlur:z.onBlur,onInput:O["onUpdate:modelValue"]}),I==null||I()})}const F=n.computed(()=>f.value.error),D=n.computed(()=>f.value.errors);return{hasError:F,errors:D,errorMessage:n.computed(()=>{var b;return F.value?(b=D.value[0])==null?void 0:b.message:void 0}),isValid:n.computed(()=>f.value.valid),isDirty:n.computed(()=>f.value.dirty),isBlurred:n.computed(()=>f.value.blurred),isValidated:n.computed(()=>f.value.validated),isValidating:n.computed(()=>f.value.validating),mode:n.computed(()=>f.value.mode),value:n.computed({get:()=>a.value[o],set:b=>a.value[o]=b}),validationEvents:M}}exports.AosHandler=tt;exports.IdleTimeout=Ce;exports.ScriptLoader=gt;exports.Swipe=Ae;exports.ToasterHandler=Ge;exports.UserVisibility=Se;exports.WaitHandler=Je;exports._export_sfc=ge;exports.capitalize=Re;exports.countryCodeToUnicodeFlag=yt;exports.currency=Ke;exports.date=Xe;exports.debounce=pt;exports.directive=Me;exports.directive$1=St;exports.directive$2=We;exports.directive$3=Ve;exports.directive$4=Lt;exports.getInstance=ao;exports.injectStrict=ne;exports.installFilters=Ut;exports.installToaster=Jt;exports.instance=et;exports.isClient=x;exports.mount=ve;exports.normalizeString=de;exports.number=Ze;exports.plugin=Ht;exports.plugin$1=De;exports.plugin$2=je;exports.plugin$3=qe;exports.plugin$4=Ye;exports.plugin$5=$e;exports.plugin$6=Be;exports.plugin$7=io;exports.plugin$8=ro;exports.sleep=pe;exports.throttle=bt;exports.truthyFilter=ke;exports.useAos=ho;exports.useBreakpoints=bo;exports.useFormField=Vo;exports.useFormValidator=Ho;exports.useIdleTimeout=po;exports.useInstanceUniqId=mo;exports.useReadingTime=zo;exports.useStringMatching=Io;exports.useSwipe=wo;exports.useThemeHandler=co;exports.useTimer=Qe;exports.useToast=vo;exports.useUserVisibility=go;exports.useWait=fo;exports.useWindowSize=nt;exports.vZoomImg=_e;