maz-ui 3.47.1 → 3.47.2-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.
- package/components/MazAccordion.mjs +36 -37
- package/components/MazAnimatedCounter.mjs +14 -16
- package/components/MazBottomSheet.mjs +1 -1
- package/components/MazBtn.mjs +1 -1
- package/components/MazCard.mjs +1 -1
- package/components/MazCarousel.mjs +1 -1
- package/components/MazChart.d.ts +1 -1
- package/components/MazChart.mjs +23 -32
- package/components/MazChecklist.mjs +1 -1
- package/components/MazCircularProgressBar.mjs +66 -71
- package/components/MazDialog.mjs +1 -1
- package/components/MazDialogPromise.mjs +1 -1
- package/components/MazDrawer.mjs +1 -1
- package/components/MazDropdown.mjs +162 -185
- package/components/MazExpandAnimation.mjs +20 -21
- package/components/MazGallery.mjs +1 -1
- package/components/MazInput.mjs +1 -1
- package/components/MazInputCode.mjs +30 -31
- package/components/MazInputNumber.mjs +1 -1
- package/components/MazInputPrice.mjs +1 -1
- package/components/MazInputTags.mjs +1 -1
- package/components/MazLink.mjs +18 -30
- package/components/MazPagination.mjs +1 -1
- package/components/MazPhoneNumberInput.mjs +1 -1
- package/components/MazPicker.mjs +1 -1
- package/components/MazRadio.mjs +37 -42
- package/components/MazRadioButtons.mjs +61 -66
- package/components/MazSelect.mjs +1 -1
- package/components/MazSlider.mjs +107 -116
- package/components/MazStepper.mjs +1 -1
- package/components/MazSwitch.mjs +24 -28
- package/components/MazTable.d.ts +31 -54
- package/components/MazTable.mjs +1 -1
- package/components/MazTabsBar.mjs +1 -1
- package/components/MazTextarea.mjs +32 -34
- package/components/assets/MazDropdown.css +1 -1
- package/components/assets/MazGallery.css +1 -1
- package/components/assets/MazInput.css +1 -1
- package/components/assets/MazInputNumber.css +1 -1
- package/components/assets/MazInputPrice.css +1 -1
- package/components/assets/MazInputTags.css +1 -1
- package/components/assets/MazLink.css +1 -1
- package/components/assets/MazPhoneNumberInput.css +1 -1
- package/components/assets/MazPicker.css +1 -1
- package/components/assets/MazSelect.css +1 -1
- package/components/assets/MazTable.css +1 -1
- package/components/assets/MazTabsBar.css +1 -1
- package/components/chunks/{MazBadge-CNSfzYq-.mjs → MazBadge-CqppWg2j.mjs} +1 -1
- package/components/chunks/{MazBottomSheet-DqK0EOsq.mjs → MazBottomSheet-CGRvZmGd.mjs} +28 -29
- package/{modules/chunks/MazBtn-CTqI4qhg.mjs → components/chunks/MazBtn-2VKM1wZu.mjs} +37 -49
- package/components/chunks/{MazBtn-TkePGm5o.mjs → MazBtn-40lm8-AL.mjs} +37 -49
- package/components/chunks/{MazBtn-DzBXfedt.mjs → MazBtn-BB1FyYWv.mjs} +35 -44
- package/components/chunks/{MazBtn-CnqRnXh_.mjs → MazBtn-BMYXMZuX.mjs} +37 -49
- package/components/chunks/{MazBtn-D6Jxw9Nr.mjs → MazBtn-BijEMn4r.mjs} +37 -49
- package/components/chunks/MazBtn-BmrcK2af.mjs +106 -0
- package/components/chunks/MazBtn-C72_1uvu.mjs +106 -0
- package/components/chunks/MazBtn-CWloP6MI.mjs +111 -0
- package/components/chunks/MazBtn-CcyV4DCc.mjs +106 -0
- package/components/chunks/MazBtn-DENEMy-c.mjs +106 -0
- package/components/chunks/MazBtn-DfqRZvbB.mjs +106 -0
- package/components/chunks/MazBtn-UnZQuu6P.mjs +106 -0
- package/components/chunks/MazBtn-cDJlUVVY.mjs +106 -0
- package/components/chunks/MazBtn-hUslV7wO.mjs +106 -0
- package/components/chunks/{MazCard-CfkvpcGL.mjs → MazCard-BYB8y1_u.mjs} +18 -19
- package/components/chunks/{MazCarousel-BEl86YGW.mjs → MazCarousel-DccWVW8H.mjs} +20 -21
- package/components/chunks/{MazCheckbox-BKCo6EzO.mjs → MazCheckbox-B22OcHt8.mjs} +1 -1
- package/components/chunks/{MazCheckbox-CI8ml-P8.mjs → MazCheckbox-DMogZVHl.mjs} +1 -1
- package/components/chunks/{MazCheckbox-Byqz8JJB.mjs → MazCheckbox-Db6sPUbV.mjs} +1 -1
- package/components/chunks/{MazChecklist-BLxsNHMP.mjs → MazChecklist-C95Y4Hb-.mjs} +112 -118
- package/components/chunks/{MazDialog-CPgFpAlq.mjs → MazDialog-khofH-7I.mjs} +66 -81
- package/components/chunks/MazDialogPromise-ZRA2ZrO4.mjs +488 -0
- package/components/chunks/{MazExpandAnimation-Bkw_wFTi.mjs → MazExpandAnimation-MDimlZGj.mjs} +7 -8
- package/components/chunks/{MazGallery-BMFwld84.mjs → MazGallery-CXQiXWFr.mjs} +267 -225
- package/components/chunks/{MazGallery-BKL7gfrz.mjs → MazGallery-VTZUhBKC.mjs} +249 -207
- package/components/chunks/{MazIcon-D8V8ixhf.mjs → MazIcon-BF5TFzse.mjs} +1 -1
- package/components/chunks/{MazInput-O6Q41Fm0.mjs → MazInput-DC3S-CVu.mjs} +43 -52
- package/components/chunks/{MazInput-CBiCdd0F.mjs → MazInput-DzWkS-g8.mjs} +41 -50
- package/components/chunks/{MazInput-Dx2cCzFS.mjs → MazInput-NE6H-10w.mjs} +38 -47
- package/components/chunks/{MazInputNumber-DYPVUz4k.mjs → MazInputNumber-DRXQXHRv.mjs} +168 -189
- package/components/chunks/{MazInputPrice-DZD7ZZpm.mjs → MazInputPrice-DoTnDDIN.mjs} +49 -58
- package/components/chunks/{MazInputTags-CxXBsTdM.mjs → MazInputTags-Dj3sW-e5.mjs} +189 -209
- package/components/chunks/{MazLink-Dl9ePCGm.mjs → MazLink-C_3Wya94.mjs} +19 -31
- package/components/chunks/{MazLoadingBar-Di2OIrPD.mjs → MazLoadingBar-DdjHRC7g.mjs} +1 -1
- package/components/chunks/MazPagination-BkT4_LLW.mjs +330 -0
- package/components/chunks/{MazPhoneNumberInput-C4TX1tGw.mjs → MazPhoneNumberInput-BbssOUzo.mjs} +503 -547
- package/components/chunks/{MazPicker-BcQ_-AJH.mjs → MazPicker-DwWiIYAR.mjs} +244 -265
- package/components/chunks/{MazPickerMonthSwitcher-hCAkEd5r.mjs → MazPickerMonthSwitcher-CmFFQoPA.mjs} +1 -1
- package/components/chunks/{MazPickerShortcuts-vpLyw1de.mjs → MazPickerShortcuts-DaELz7aq.mjs} +1 -1
- package/components/chunks/{MazPickerYearSwitcher-DvC79vrt.mjs → MazPickerYearSwitcher-m1_KXnpA.mjs} +1 -1
- package/components/chunks/{MazSelect-BXzgSKmL.mjs → MazSelect-BJ07NVXQ.mjs} +160 -180
- package/components/chunks/{MazSelect-Baj2BQH7.mjs → MazSelect-CDV9Fx6m.mjs} +124 -136
- package/components/chunks/{MazSpinner-Bvb-lKER.mjs → MazSpinner-Bb3f2t6w.mjs} +1 -1
- package/components/chunks/{MazSpinner-Cqp-BMvL.mjs → MazSpinner-BcB0szZB.mjs} +1 -1
- package/components/chunks/{MazSpinner-C1SiKhfK.mjs → MazSpinner-BpkPcfCt.mjs} +1 -1
- package/components/chunks/{MazSpinner-CAbYLlEZ.mjs → MazSpinner-BsYJDmi9.mjs} +1 -1
- package/components/chunks/MazSpinner-BymqEMBk.mjs +34 -0
- package/components/chunks/MazSpinner-C-64WJje.mjs +34 -0
- package/components/chunks/MazSpinner-CEFbkZkM.mjs +34 -0
- package/components/chunks/{MazSpinner-B8akphXs.mjs → MazSpinner-CfiIXW8y.mjs} +1 -1
- package/components/chunks/MazSpinner-CykRbNHD.mjs +34 -0
- package/components/chunks/{MazSpinner-C-z3-68w.mjs → MazSpinner-D3-pqOh3.mjs} +1 -1
- package/components/chunks/{MazSpinner-B5lezvu4.mjs → MazSpinner-DS58mtzm.mjs} +1 -1
- package/components/chunks/{MazSpinner-DwSGm0-X.mjs → MazSpinner-DmiLBQgR.mjs} +1 -1
- package/components/chunks/MazSpinner-Dmkr_r9u.mjs +34 -0
- package/components/chunks/MazSpinner-DoRGA1RI.mjs +34 -0
- package/components/chunks/MazSpinner-eC03bFP5.mjs +34 -0
- package/components/chunks/{MazSpinner-Cb3_S0zT.mjs → MazSpinner-edxn0ncQ.mjs} +1 -1
- package/components/chunks/MazSpinner-f2Mc2eRO.mjs +34 -0
- package/components/chunks/MazSpinner-n4Dp5ZsH.mjs +34 -0
- package/components/chunks/MazStepper-BREfkpUb.mjs +213 -0
- package/components/chunks/{MazTable-CulBGLaj.mjs → MazTable-BJDPdIJB.mjs} +183 -227
- package/components/chunks/{MazTableCell-BXDbkEJq.mjs → MazTableCell-DILuUCTe.mjs} +1 -1
- package/components/chunks/{MazTableRow-Ds3CDEit.mjs → MazTableRow-D6H6-c8J.mjs} +1 -1
- package/components/chunks/{MazTableTitle-uirsgvk_.mjs → MazTableTitle-Ch-nyY1E.mjs} +1 -1
- package/components/chunks/MazTabsBar-CM-w7V97.mjs +193 -0
- package/components/chunks/{MazTransitionExpand-4Ll_5LDO.mjs → MazTransitionExpand-PmUDa51_.mjs} +1 -1
- package/css/main.css +1 -1
- package/modules/assets/index.css +1 -1
- package/modules/chunks/MazBtn-B_Xlvgbg.cjs +1 -0
- package/modules/chunks/MazBtn-Dsr06Zgg.mjs +106 -0
- package/modules/chunks/{MazIcon-BtomZnkQ.cjs → MazIcon-CkuzyufF.cjs} +1 -1
- package/modules/chunks/{MazIcon-BB0DMfOc.mjs → MazIcon-DEgoQbMj.mjs} +1 -1
- package/modules/chunks/{MazSpinner-CDJhmIRl.mjs → MazSpinner-BurN-1pb.mjs} +1 -1
- package/modules/chunks/{MazSpinner-BASKjaLe.cjs → MazSpinner-jP4QsCNE.cjs} +1 -1
- package/modules/chunks/index-CUNN0eIB.cjs +124 -0
- package/modules/chunks/{index-C2yAjM0P.mjs → index-CxFUggmu.mjs} +925 -931
- package/modules/index.cjs +1 -1
- package/modules/index.mjs +1 -1
- package/nuxt/index.json +1 -1
- package/package.json +1 -1
- package/types/components/MazChart.vue.d.ts +1 -1
- package/types/components/MazTable.vue.d.ts +31 -54
- package/types/modules/composables/useFormValidator/types.d.ts +5 -1
- package/types/modules/composables/useFormValidator/useFormField.d.ts +3 -3
- package/types/modules/composables/useFormValidator/useFormValidator.d.ts +2 -2
- package/types/modules/composables/useFormValidator/utils.d.ts +12 -12
- package/types/modules/directives/v-fullscreen-img/MazFullscreenImg.vue.d.ts +5 -5
- package/types/modules/helpers/check-availability.d.ts +1 -0
- package/components/chunks/MazBtn-BRUaoP8j.mjs +0 -126
- package/components/chunks/MazBtn-BRnLMzhy.mjs +0 -118
- package/components/chunks/MazBtn-BhnOApJu.mjs +0 -118
- package/components/chunks/MazBtn-C28vKP_v.mjs +0 -118
- package/components/chunks/MazBtn-CweCwE_4.mjs +0 -118
- package/components/chunks/MazBtn-D7IKoL2c.mjs +0 -118
- package/components/chunks/MazBtn-DlD5m7T4.mjs +0 -118
- package/components/chunks/MazBtn-Dt8lr0GH.mjs +0 -118
- package/components/chunks/MazBtn-Mu18egu5.mjs +0 -118
- package/components/chunks/MazBtn-igor8wRn.mjs +0 -118
- package/components/chunks/MazDialogPromise-BCCdkrea.mjs +0 -522
- package/components/chunks/MazPagination-CHTMRRqE.mjs +0 -362
- package/components/chunks/MazSpinner-Cg26sBU2.mjs +0 -34
- package/components/chunks/MazSpinner-CvT-9sC7.mjs +0 -34
- package/components/chunks/MazSpinner-DH6C15pU.mjs +0 -34
- package/components/chunks/MazSpinner-DlMKBtyt.mjs +0 -34
- package/components/chunks/MazSpinner-Dyf9yb51.mjs +0 -34
- package/components/chunks/MazSpinner-M4r0cykl.mjs +0 -34
- package/components/chunks/MazSpinner-QHjOczon.mjs +0 -34
- package/components/chunks/MazSpinner-cqcpf_FX.mjs +0 -34
- package/components/chunks/MazSpinner-yPkPj7Q8.mjs +0 -34
- package/components/chunks/MazStepper-DRWtYHZR.mjs +0 -232
- package/components/chunks/MazTabsBar-MZYefBb8.mjs +0 -204
- package/modules/chunks/MazBtn-D_CpNgpD.cjs +0 -9
- package/modules/chunks/index-BIX1NMzX.cjs +0 -149
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import '../assets/index.css';var
|
|
2
|
-
var
|
|
3
|
-
var d = (s, e, t) =>
|
|
4
|
-
import { inject as
|
|
5
|
-
function
|
|
6
|
-
const t =
|
|
1
|
+
import '../assets/index.css';var Pt = Object.defineProperty;
|
|
2
|
+
var Mt = (s, e, t) => e in s ? Pt(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
3
|
+
var d = (s, e, t) => Mt(s, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { inject as ot, ref as b, onMounted as ue, onUnmounted as it, computed as f, toValue as te, nextTick as Ue, getCurrentInstance as $t, watch as X, provide as Ht, useId as Vt, onBeforeUnmount as rt, createVNode as J, render as Ce, defineComponent as ge, defineAsyncComponent as H, reactive as Bt, openBlock as C, createElementBlock as _, withModifiers as Y, withKeys as Nt, unref as A, createCommentVNode as V, createElementVNode as B, normalizeClass as le, withDirectives as at, vShow as lt, createBlock as N, Teleport as Ft, Transition as ut, withCtx as U, mergeProps as ee, renderSlot as q, useAttrs as jt, createTextVNode as Q, toDisplayString as Z, Fragment as Ye, renderList as Ut, resolveDynamicComponent as _t, normalizeStyle as qt } from "vue";
|
|
5
|
+
function Oe(s, e) {
|
|
6
|
+
const t = ot(s, e);
|
|
7
7
|
if (!t)
|
|
8
8
|
throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${s}`);
|
|
9
9
|
return t;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
return
|
|
11
|
+
function Fn() {
|
|
12
|
+
return Oe("aos");
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function Wt(s) {
|
|
15
15
|
const e = {};
|
|
16
16
|
for (const [t, n] of Object.entries(s))
|
|
17
17
|
e[t] = Number.parseInt(n, 10);
|
|
@@ -20,23 +20,23 @@ function jt(s) {
|
|
|
20
20
|
function F() {
|
|
21
21
|
return typeof document < "u";
|
|
22
22
|
}
|
|
23
|
-
function
|
|
23
|
+
function Rt(s = {}) {
|
|
24
24
|
const {
|
|
25
25
|
internalWindow: e = F() ? window : void 0,
|
|
26
26
|
initialWidth: t = Number.POSITIVE_INFINITY,
|
|
27
27
|
initialHeight: n = Number.POSITIVE_INFINITY,
|
|
28
28
|
includeScrollbar: o = !0
|
|
29
|
-
} = s, i =
|
|
29
|
+
} = s, i = b(t), r = b(n);
|
|
30
30
|
function a() {
|
|
31
31
|
e && (o ? (i.value = e.innerWidth, r.value = e.innerHeight) : (i.value = e.document.documentElement.clientWidth, r.value = e.document.documentElement.clientHeight));
|
|
32
32
|
}
|
|
33
|
-
return a(),
|
|
33
|
+
return a(), ue(() => {
|
|
34
34
|
e && window.addEventListener("resize", a, { passive: !0 });
|
|
35
|
-
}),
|
|
35
|
+
}), it(() => {
|
|
36
36
|
e && window.removeEventListener("resize", a);
|
|
37
37
|
}), { width: i, height: r };
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function jn({
|
|
40
40
|
initialWidth: s = 0,
|
|
41
41
|
initialHeight: e,
|
|
42
42
|
includeScrollbar: t,
|
|
@@ -46,14 +46,14 @@ function Bn({
|
|
|
46
46
|
mediumBreakPoint: r = "md",
|
|
47
47
|
largeBreakPoint: a = "lg"
|
|
48
48
|
}) {
|
|
49
|
-
const { width: u } =
|
|
49
|
+
const { width: u } = Rt({
|
|
50
50
|
initialWidth: s,
|
|
51
51
|
// (SSR) mobile first
|
|
52
52
|
initialHeight: e,
|
|
53
53
|
includeScrollbar: t,
|
|
54
54
|
internalWindow: n,
|
|
55
55
|
listenOrientation: o
|
|
56
|
-
}), l =
|
|
56
|
+
}), l = Wt(i), h = f(() => u.value >= l[a]), g = f(
|
|
57
57
|
() => u.value >= l[r] && u.value < l[a]
|
|
58
58
|
), E = f(() => u.value >= 0 && u.value < l[r]);
|
|
59
59
|
return {
|
|
@@ -61,14 +61,14 @@ function Bn({
|
|
|
61
61
|
numericBreakpoints: l,
|
|
62
62
|
isSmallScreen: E,
|
|
63
63
|
isLargeScreen: h,
|
|
64
|
-
isMediumScreen:
|
|
64
|
+
isMediumScreen: g,
|
|
65
65
|
breakpoints: i
|
|
66
66
|
};
|
|
67
67
|
}
|
|
68
|
-
function
|
|
69
|
-
return
|
|
68
|
+
function Un() {
|
|
69
|
+
return Oe("dialog");
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function ct(s, e, t) {
|
|
72
72
|
const n = {
|
|
73
73
|
maxAttempts: 20,
|
|
74
74
|
interval: 100,
|
|
@@ -77,38 +77,38 @@ function _t(s, e, t) {
|
|
|
77
77
|
let o = 0;
|
|
78
78
|
function i() {
|
|
79
79
|
const r = s();
|
|
80
|
-
r != null ? e(r) : o < n.maxAttempts ? (o++, setTimeout(i, n.interval)) : console.warn(n.errorMessage || `[maz-ui](checkAvailability) Nothing found after ${n.maxAttempts} attempts for ref ${r}`);
|
|
80
|
+
r != null ? n.expectedValue !== void 0 && r !== n.expectedValue ? o < n.maxAttempts ? (o++, setTimeout(i, n.interval)) : console.warn(n.errorMessage || `[maz-ui](checkAvailability) Nothing found after ${n.maxAttempts} attempts for ref ${r}`) : e(r) : o < n.maxAttempts ? (o++, setTimeout(i, n.interval)) : console.warn(n.errorMessage || `[maz-ui](checkAvailability) Nothing found or expected value after ${n.maxAttempts} attempts for ref ${r}`);
|
|
81
81
|
}
|
|
82
82
|
i();
|
|
83
83
|
}
|
|
84
|
-
function
|
|
85
|
-
const e =
|
|
84
|
+
function dt(s) {
|
|
85
|
+
const e = te(s);
|
|
86
86
|
return Array.isArray(e) ? Object.freeze([...e]) : typeof e == "object" && e !== null ? Object.freeze({ ...e }) : e;
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function Ze(s) {
|
|
89
89
|
return s == null || typeof s == "string" || typeof s == "number" || typeof s == "boolean" || typeof s == "symbol" || typeof s == "bigint";
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function Kt(s, e) {
|
|
92
92
|
if (s.length !== e.length)
|
|
93
93
|
return !1;
|
|
94
94
|
for (const [t, n] of s.entries())
|
|
95
|
-
if (!
|
|
95
|
+
if (!ye(n, e[t]))
|
|
96
96
|
return !1;
|
|
97
97
|
return !0;
|
|
98
98
|
}
|
|
99
|
-
function
|
|
99
|
+
function Yt(s, e) {
|
|
100
100
|
const t = Object.keys(s), n = Object.keys(e);
|
|
101
101
|
if (t.length !== n.length)
|
|
102
102
|
return !1;
|
|
103
103
|
for (const o of t)
|
|
104
|
-
if (!n.includes(o) || !
|
|
104
|
+
if (!n.includes(o) || !ye(s[o], e[o]))
|
|
105
105
|
return !1;
|
|
106
106
|
return !0;
|
|
107
107
|
}
|
|
108
|
-
function
|
|
109
|
-
return
|
|
108
|
+
function ye(s, e) {
|
|
109
|
+
return Ze(s) || Ze(e) ? s === e : s instanceof Date && e instanceof Date ? s.getTime() === e.getTime() : typeof s != typeof e || Array.isArray(s) !== Array.isArray(e) ? !1 : Array.isArray(s) && Array.isArray(e) ? Kt(s, e) : typeof s == "object" && typeof e == "object" ? Yt(s, e) : !1;
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function Zt(s, e, t) {
|
|
112
112
|
const n = {};
|
|
113
113
|
return async function(...o) {
|
|
114
114
|
n[s] || (n[s] = { timer: null, promise: null });
|
|
@@ -126,7 +126,7 @@ function Rt(s, e, t) {
|
|
|
126
126
|
}), i.promise;
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function Xt(s, e, t) {
|
|
130
130
|
const n = {};
|
|
131
131
|
return async (...o) => {
|
|
132
132
|
const i = Date.now();
|
|
@@ -142,20 +142,20 @@ function Kt(s, e, t) {
|
|
|
142
142
|
})), n[s].promise);
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
|
-
const
|
|
145
|
+
const se = {
|
|
146
146
|
mode: "lazy",
|
|
147
147
|
scrollToErrorSelector: ".has-field-error",
|
|
148
148
|
debounceTime: 300,
|
|
149
149
|
throttleTime: 1e3
|
|
150
150
|
};
|
|
151
|
-
function
|
|
151
|
+
function mt(s, e) {
|
|
152
152
|
return Object.keys(e).includes(s);
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function Xe(s = se.scrollToErrorSelector) {
|
|
155
155
|
const e = document.querySelector(s);
|
|
156
156
|
e && e.scrollIntoView({ behavior: "smooth", block: "center" });
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function Gt(s, e) {
|
|
159
159
|
const t = {};
|
|
160
160
|
for (const [n, o] of Object.entries(s)) {
|
|
161
161
|
const i = o;
|
|
@@ -163,10 +163,10 @@ function Yt(s, e) {
|
|
|
163
163
|
}
|
|
164
164
|
return t;
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function _e(s) {
|
|
167
167
|
return s == null || s === "";
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function Qt({
|
|
170
170
|
name: s,
|
|
171
171
|
hasValidation: e,
|
|
172
172
|
debouncedFields: t,
|
|
@@ -175,25 +175,25 @@ function Zt({
|
|
|
175
175
|
if (e) {
|
|
176
176
|
if (t != null && t[s] && (n != null && n[s]))
|
|
177
177
|
throw new Error(`The field "${s}" cannot be both debounced and throttled`);
|
|
178
|
-
return t != null && t[s] ?
|
|
178
|
+
return t != null && t[s] ? Zt(
|
|
179
179
|
s,
|
|
180
|
-
|
|
181
|
-
typeof t[s] == "number" ? t[s] :
|
|
182
|
-
) : n != null && n[s] ?
|
|
180
|
+
pe,
|
|
181
|
+
typeof t[s] == "number" ? t[s] : se.debounceTime
|
|
182
|
+
) : n != null && n[s] ? Xt(
|
|
183
183
|
s,
|
|
184
|
-
|
|
185
|
-
typeof n[s] == "number" ? n[s] :
|
|
186
|
-
) :
|
|
184
|
+
pe,
|
|
185
|
+
typeof n[s] == "number" ? n[s] : se.throttleTime
|
|
186
|
+
) : pe;
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
|
-
function
|
|
189
|
+
function ft({
|
|
190
190
|
name: s,
|
|
191
191
|
schema: e,
|
|
192
192
|
initialValue: t,
|
|
193
193
|
fieldState: n,
|
|
194
194
|
options: o
|
|
195
195
|
}) {
|
|
196
|
-
const i = e ?
|
|
196
|
+
const i = e ? mt(s, e) : !1, r = Qt({
|
|
197
197
|
name: s,
|
|
198
198
|
hasValidation: i,
|
|
199
199
|
debouncedFields: o == null ? void 0 : o.debouncedFields,
|
|
@@ -207,12 +207,12 @@ function ct({
|
|
|
207
207
|
valid: !i,
|
|
208
208
|
validating: !1,
|
|
209
209
|
validated: !1,
|
|
210
|
-
initialValue:
|
|
210
|
+
initialValue: dt(t),
|
|
211
211
|
validateFunction: r,
|
|
212
|
-
mode: i ? (o == null ? void 0 : o.mode) ?? (n == null ? void 0 : n.mode) ??
|
|
212
|
+
mode: i ? (o == null ? void 0 : o.mode) ?? (n == null ? void 0 : n.mode) ?? se.mode : void 0
|
|
213
213
|
};
|
|
214
214
|
}
|
|
215
|
-
function
|
|
215
|
+
function Jt({
|
|
216
216
|
schema: s,
|
|
217
217
|
payload: e,
|
|
218
218
|
options: t
|
|
@@ -220,7 +220,7 @@ function Xt({
|
|
|
220
220
|
const n = {};
|
|
221
221
|
for (const o in s) {
|
|
222
222
|
const i = o;
|
|
223
|
-
n[i] =
|
|
223
|
+
n[i] = ft({
|
|
224
224
|
name: i,
|
|
225
225
|
schema: s,
|
|
226
226
|
options: t,
|
|
@@ -230,7 +230,7 @@ function Xt({
|
|
|
230
230
|
}
|
|
231
231
|
return n;
|
|
232
232
|
}
|
|
233
|
-
function
|
|
233
|
+
function es({
|
|
234
234
|
fieldsStates: s,
|
|
235
235
|
payload: e,
|
|
236
236
|
schema: t,
|
|
@@ -239,7 +239,7 @@ function Gt({
|
|
|
239
239
|
}) {
|
|
240
240
|
for (const i in t) {
|
|
241
241
|
const r = i;
|
|
242
|
-
s[r] =
|
|
242
|
+
s[r] = ht({
|
|
243
243
|
name: r,
|
|
244
244
|
fieldState: s[r],
|
|
245
245
|
payload: e,
|
|
@@ -249,7 +249,7 @@ function Gt({
|
|
|
249
249
|
});
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
|
-
function
|
|
252
|
+
function ht({
|
|
253
253
|
name: s,
|
|
254
254
|
fieldState: e,
|
|
255
255
|
payload: t,
|
|
@@ -257,13 +257,13 @@ function dt({
|
|
|
257
257
|
options: o,
|
|
258
258
|
updateMode: i = !0
|
|
259
259
|
}) {
|
|
260
|
-
const { initialValue: r, mode: a, ...u } =
|
|
260
|
+
const { initialValue: r, mode: a, ...u } = ft({
|
|
261
261
|
name: s,
|
|
262
262
|
schema: n,
|
|
263
263
|
initialValue: o.defaultValue ?? t[s],
|
|
264
264
|
fieldState: e,
|
|
265
265
|
options: o
|
|
266
|
-
}), l = i ? a ?? e.mode ??
|
|
266
|
+
}), l = i ? a ?? e.mode ?? se.mode : e.mode;
|
|
267
267
|
return {
|
|
268
268
|
...e,
|
|
269
269
|
initialValue: r,
|
|
@@ -271,27 +271,27 @@ function dt({
|
|
|
271
271
|
...e != null && e.mode && l !== e.mode ? u : {}
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
|
-
function
|
|
274
|
+
function ts(s) {
|
|
275
275
|
const e = {};
|
|
276
276
|
for (const [t, { errors: n }] of Object.entries(s))
|
|
277
277
|
e[t] = n;
|
|
278
278
|
return e;
|
|
279
279
|
}
|
|
280
|
-
function
|
|
280
|
+
function ss(s) {
|
|
281
281
|
return s instanceof HTMLInputElement || s instanceof HTMLSelectElement || s instanceof HTMLTextAreaElement ? [s] : s.querySelectorAll(
|
|
282
282
|
"input, select, textarea"
|
|
283
283
|
);
|
|
284
284
|
}
|
|
285
|
-
function
|
|
285
|
+
function ns({
|
|
286
286
|
interactiveElements: s,
|
|
287
287
|
onBlurHandler: e,
|
|
288
288
|
mode: t
|
|
289
289
|
}) {
|
|
290
290
|
s.forEach((n) => {
|
|
291
|
-
|
|
291
|
+
be(["eager", "blur", "progressive"], t) && n.addEventListener("blur", e);
|
|
292
292
|
});
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function os({
|
|
295
295
|
interactiveElements: s,
|
|
296
296
|
onBlurHandler: e
|
|
297
297
|
}) {
|
|
@@ -299,14 +299,14 @@ function ts({
|
|
|
299
299
|
t.removeEventListener("blur", e);
|
|
300
300
|
});
|
|
301
301
|
}
|
|
302
|
-
async function
|
|
303
|
-
const n = await
|
|
302
|
+
async function is(s, e, t) {
|
|
303
|
+
const n = await ds(e), i = await (await gt("safeParseAsync"))(n.entries[s], t ?? "");
|
|
304
304
|
return {
|
|
305
305
|
result: i,
|
|
306
306
|
isValid: i.success
|
|
307
307
|
};
|
|
308
308
|
}
|
|
309
|
-
async function
|
|
309
|
+
async function pe({
|
|
310
310
|
name: s,
|
|
311
311
|
fieldState: e,
|
|
312
312
|
schema: t,
|
|
@@ -314,14 +314,14 @@ async function he({
|
|
|
314
314
|
setError: o = !0,
|
|
315
315
|
setErrorIfInvalidAndNotEmpty: i = !1
|
|
316
316
|
}) {
|
|
317
|
-
if (await
|
|
317
|
+
if (await Ue(), e.validating = !0, !t[s]) {
|
|
318
318
|
e.valid = !0, e.validating = !1, e.validated = !0, e.errors = [], e.error = !1;
|
|
319
319
|
return;
|
|
320
320
|
}
|
|
321
|
-
const { result: r, isValid: a } = await
|
|
322
|
-
e.valid = a, (o || i && !a && !
|
|
321
|
+
const { result: r, isValid: a } = await is(s, t, n[s]);
|
|
322
|
+
e.valid = a, (o || i && !a && !_e(n[s])) && (e.error = !a), e.errors = r.issues ?? [], e.validating = !1, e.validated = !0;
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function vt({
|
|
325
325
|
name: s,
|
|
326
326
|
fieldState: e,
|
|
327
327
|
payload: t,
|
|
@@ -337,7 +337,7 @@ function mt({
|
|
|
337
337
|
};
|
|
338
338
|
return (i = e.validateFunction) == null ? void 0 : i.call(e, o);
|
|
339
339
|
}
|
|
340
|
-
function
|
|
340
|
+
function rs({
|
|
341
341
|
fieldsStates: s,
|
|
342
342
|
payload: e,
|
|
343
343
|
showErrors: t = !0,
|
|
@@ -345,7 +345,7 @@ function ns({
|
|
|
345
345
|
}) {
|
|
346
346
|
return Promise.all(
|
|
347
347
|
Object.keys(s).map(
|
|
348
|
-
(o) =>
|
|
348
|
+
(o) => pe({
|
|
349
349
|
name: o,
|
|
350
350
|
setError: t,
|
|
351
351
|
fieldState: s[o],
|
|
@@ -356,15 +356,15 @@ function ns({
|
|
|
356
356
|
)
|
|
357
357
|
);
|
|
358
358
|
}
|
|
359
|
-
function
|
|
359
|
+
function pt({
|
|
360
360
|
eventName: s,
|
|
361
361
|
fieldState: e,
|
|
362
362
|
isSubmitted: t
|
|
363
363
|
}) {
|
|
364
364
|
const { dirty: n, blurred: o, mode: i, valid: r } = e;
|
|
365
|
-
return s === "blur" && (
|
|
365
|
+
return s === "blur" && (be(["lazy", "aggressive"], i) || r) || s === "input" && i === "blur" || !i ? !1 : t || i === "eager" && o || i === "blur" && o || i === "aggressive" && n || i === "lazy" && n || i === "progressive";
|
|
366
366
|
}
|
|
367
|
-
function
|
|
367
|
+
function as({
|
|
368
368
|
name: s,
|
|
369
369
|
force: e = !1,
|
|
370
370
|
payload: t,
|
|
@@ -372,16 +372,16 @@ function os({
|
|
|
372
372
|
schema: o,
|
|
373
373
|
isSubmitted: i
|
|
374
374
|
}) {
|
|
375
|
-
const r = t[s], a = !
|
|
376
|
-
if (n.dirty = a, n.blurred = n.blurred || (n.mode === "eager" ? a : !0), !!(e ||
|
|
377
|
-
return
|
|
375
|
+
const r = t[s], a = !_e(r) && !ye(r, n.initialValue);
|
|
376
|
+
if (n.dirty = a, n.blurred = n.blurred || (n.mode === "eager" ? a : !0), !!(e || pt({ eventName: "blur", fieldState: n, isSubmitted: i })))
|
|
377
|
+
return vt({
|
|
378
378
|
name: s,
|
|
379
379
|
fieldState: n,
|
|
380
380
|
schema: o,
|
|
381
381
|
payload: t
|
|
382
382
|
});
|
|
383
383
|
}
|
|
384
|
-
function
|
|
384
|
+
function ls({
|
|
385
385
|
name: s,
|
|
386
386
|
payload: e,
|
|
387
387
|
fieldState: t,
|
|
@@ -391,52 +391,52 @@ function is({
|
|
|
391
391
|
}) {
|
|
392
392
|
const r = e[s];
|
|
393
393
|
t.validated = !1;
|
|
394
|
-
const a = !
|
|
395
|
-
if (t.dirty = a, !!(i ||
|
|
396
|
-
return
|
|
394
|
+
const a = !_e(r) && !ye(r, t.initialValue);
|
|
395
|
+
if (t.dirty = a, !!(i || pt({ eventName: "input", fieldState: t, isSubmitted: o })))
|
|
396
|
+
return vt({
|
|
397
397
|
name: s,
|
|
398
398
|
fieldState: t,
|
|
399
399
|
schema: n,
|
|
400
400
|
payload: e
|
|
401
401
|
});
|
|
402
402
|
}
|
|
403
|
-
function
|
|
404
|
-
const e =
|
|
403
|
+
function qe(s) {
|
|
404
|
+
const e = $t();
|
|
405
405
|
if (!e)
|
|
406
406
|
throw new Error(`${s} must be called within setup()`);
|
|
407
407
|
return e;
|
|
408
408
|
}
|
|
409
|
-
function
|
|
409
|
+
function us(s, e) {
|
|
410
410
|
var o;
|
|
411
|
-
const n = ((o =
|
|
411
|
+
const n = ((o = qe(e).formContexts) == null ? void 0 : o.get(s)) ?? ot(s);
|
|
412
412
|
if (!n)
|
|
413
413
|
throw new Error("useFormField must be used within a form (useFormValidator)");
|
|
414
414
|
return n;
|
|
415
415
|
}
|
|
416
|
-
function
|
|
416
|
+
function cs({
|
|
417
417
|
ref: s,
|
|
418
418
|
fieldState: e,
|
|
419
419
|
onBlurHandler: t
|
|
420
420
|
}) {
|
|
421
|
-
if (!(s ||
|
|
421
|
+
if (!(s || be(["aggressive", "lazy"], e.mode)))
|
|
422
422
|
return {
|
|
423
423
|
onBlur: t
|
|
424
424
|
};
|
|
425
425
|
}
|
|
426
|
-
const
|
|
427
|
-
async function
|
|
428
|
-
if (
|
|
429
|
-
return
|
|
426
|
+
const He = {};
|
|
427
|
+
async function gt(s) {
|
|
428
|
+
if (He[s])
|
|
429
|
+
return He[s];
|
|
430
430
|
const e = await import("./index-BgyjI1q8.mjs");
|
|
431
|
-
return
|
|
431
|
+
return He[s] = e[s], e[s];
|
|
432
432
|
}
|
|
433
|
-
async function
|
|
434
|
-
return (await
|
|
433
|
+
async function ds(s) {
|
|
434
|
+
return (await gt("objectAsync"))(s);
|
|
435
435
|
}
|
|
436
|
-
function
|
|
436
|
+
function be(s, e) {
|
|
437
437
|
return e ? s.includes(e) : !1;
|
|
438
438
|
}
|
|
439
|
-
function
|
|
439
|
+
function _n(s, e) {
|
|
440
440
|
const t = {
|
|
441
441
|
formIdentifier: "main-form-validator",
|
|
442
442
|
...e
|
|
@@ -447,20 +447,20 @@ function Nn(s, e) {
|
|
|
447
447
|
internalSchema: r,
|
|
448
448
|
errorMessages: a,
|
|
449
449
|
isSubmitted: u
|
|
450
|
-
} =
|
|
450
|
+
} = us(t.formIdentifier, "useFormField"), l = mt(s, r.value) ? (e == null ? void 0 : e.mode) ?? i.mode : void 0;
|
|
451
451
|
t.mode = l;
|
|
452
452
|
const h = f(() => n.value[s]);
|
|
453
|
-
if (n.value[s] =
|
|
453
|
+
if (n.value[s] = ht({
|
|
454
454
|
name: s,
|
|
455
455
|
fieldState: h.value,
|
|
456
456
|
payload: o.value,
|
|
457
457
|
schema: r.value,
|
|
458
458
|
options: { ...i, ...t }
|
|
459
|
-
}), t.defaultValue !== void 0 && !
|
|
459
|
+
}), t.defaultValue !== void 0 && !ye(o.value[s], t.defaultValue)) {
|
|
460
460
|
const T = t.defaultValue;
|
|
461
|
-
o.value[s] = T, n.value[s].initialValue =
|
|
461
|
+
o.value[s] = T, n.value[s].initialValue = dt(T);
|
|
462
462
|
}
|
|
463
|
-
l &&
|
|
463
|
+
l && pe({
|
|
464
464
|
name: s,
|
|
465
465
|
fieldState: h.value,
|
|
466
466
|
payload: o.value,
|
|
@@ -468,8 +468,8 @@ function Nn(s, e) {
|
|
|
468
468
|
setError: l === "aggressive",
|
|
469
469
|
setErrorIfInvalidAndNotEmpty: l === "lazy"
|
|
470
470
|
});
|
|
471
|
-
function
|
|
472
|
-
|
|
471
|
+
function g() {
|
|
472
|
+
as({
|
|
473
473
|
name: s,
|
|
474
474
|
fieldState: h.value,
|
|
475
475
|
payload: o.value,
|
|
@@ -478,33 +478,33 @@ function Nn(s, e) {
|
|
|
478
478
|
});
|
|
479
479
|
}
|
|
480
480
|
const E = f(
|
|
481
|
-
() =>
|
|
481
|
+
() => cs({
|
|
482
482
|
ref: t.ref,
|
|
483
|
-
onBlurHandler:
|
|
483
|
+
onBlurHandler: g,
|
|
484
484
|
fieldState: h.value
|
|
485
485
|
})
|
|
486
486
|
);
|
|
487
|
-
if (t.ref &&
|
|
487
|
+
if (t.ref && be(["eager", "blur", "progressive"], l)) {
|
|
488
488
|
let T = [];
|
|
489
|
-
const
|
|
490
|
-
T =
|
|
489
|
+
const M = (I) => {
|
|
490
|
+
T = ss(I), ns({
|
|
491
491
|
interactiveElements: T,
|
|
492
|
-
onBlurHandler:
|
|
492
|
+
onBlurHandler: g,
|
|
493
493
|
mode: l
|
|
494
494
|
});
|
|
495
495
|
};
|
|
496
|
-
|
|
497
|
-
const
|
|
498
|
-
|
|
499
|
-
const
|
|
500
|
-
|
|
496
|
+
ue(() => {
|
|
497
|
+
const I = qe(`useFormField of ${s.toString()}`);
|
|
498
|
+
ct(() => I.refs[t.ref], (c) => {
|
|
499
|
+
const y = c instanceof HTMLElement ? c : c == null ? void 0 : c.$el;
|
|
500
|
+
y && M(y);
|
|
501
501
|
}, {
|
|
502
|
-
errorMessage: `[maz-ui](useFormField) No element found for ref ${t.ref} for field ${s}`
|
|
502
|
+
errorMessage: `[maz-ui](useFormField) No element found for ref ${t.ref} for field ${s.toString()}`
|
|
503
503
|
});
|
|
504
|
-
}),
|
|
505
|
-
|
|
504
|
+
}), it(() => {
|
|
505
|
+
os({
|
|
506
506
|
interactiveElements: T,
|
|
507
|
-
onBlurHandler:
|
|
507
|
+
onBlurHandler: g
|
|
508
508
|
});
|
|
509
509
|
});
|
|
510
510
|
}
|
|
@@ -525,38 +525,38 @@ function Nn(s, e) {
|
|
|
525
525
|
validationEvents: E
|
|
526
526
|
};
|
|
527
527
|
}
|
|
528
|
-
function
|
|
529
|
-
const o =
|
|
530
|
-
mode:
|
|
531
|
-
scrollToError:
|
|
528
|
+
function qn({ schema: s, defaultValues: e, model: t, options: n }) {
|
|
529
|
+
const o = qe("useFormValidator"), i = {
|
|
530
|
+
mode: se.mode,
|
|
531
|
+
scrollToError: se.scrollToErrorSelector,
|
|
532
532
|
debouncedFields: null,
|
|
533
533
|
throttledFields: null,
|
|
534
534
|
identifier: "main-form-validator",
|
|
535
535
|
...n
|
|
536
|
-
}, r =
|
|
537
|
-
|
|
536
|
+
}, r = b(e), a = b({ ...r.value, ...t == null ? void 0 : t.value }), u = te(s), l = b(
|
|
537
|
+
Jt({
|
|
538
538
|
schema: u.value,
|
|
539
539
|
payload: a.value,
|
|
540
540
|
options: i
|
|
541
541
|
})
|
|
542
|
-
), h =
|
|
543
|
-
t &&
|
|
542
|
+
), h = b(!1), g = b(!1), E = f(() => Object.values(l.value).every(({ valid: L }) => L)), T = f(() => Object.values(l.value).some(({ dirty: L }) => L)), M = f(() => ts(l.value)), I = f(() => Gt(M.value, l.value));
|
|
543
|
+
t && X(
|
|
544
544
|
a,
|
|
545
|
-
(
|
|
546
|
-
t.value = { ...r.value, ...
|
|
545
|
+
(L) => {
|
|
546
|
+
t.value = { ...r.value, ...L };
|
|
547
547
|
},
|
|
548
548
|
{ deep: !0 }
|
|
549
|
-
),
|
|
549
|
+
), X(
|
|
550
550
|
r,
|
|
551
|
-
(
|
|
552
|
-
a.value = { ...
|
|
551
|
+
(L) => {
|
|
552
|
+
a.value = { ...L, ...a.value };
|
|
553
553
|
},
|
|
554
554
|
{ deep: !0 }
|
|
555
|
-
),
|
|
555
|
+
), X(
|
|
556
556
|
u,
|
|
557
|
-
(
|
|
558
|
-
|
|
559
|
-
schema:
|
|
557
|
+
(L) => {
|
|
558
|
+
es({
|
|
559
|
+
schema: L,
|
|
560
560
|
fieldsStates: l.value,
|
|
561
561
|
payload: a.value,
|
|
562
562
|
options: i
|
|
@@ -564,74 +564,74 @@ function jn({ schema: s, defaultValues: e, model: t, options: n }) {
|
|
|
564
564
|
},
|
|
565
565
|
{ deep: !0 }
|
|
566
566
|
), c();
|
|
567
|
-
function c(
|
|
568
|
-
return
|
|
567
|
+
function c(L = i.mode === "aggressive") {
|
|
568
|
+
return rs({
|
|
569
569
|
fieldsStates: l.value,
|
|
570
570
|
payload: a.value,
|
|
571
571
|
schema: u.value,
|
|
572
|
-
showErrors:
|
|
572
|
+
showErrors: L
|
|
573
573
|
});
|
|
574
574
|
}
|
|
575
|
-
const
|
|
576
|
-
async function
|
|
577
|
-
await
|
|
578
|
-
const
|
|
579
|
-
() => a.value[
|
|
575
|
+
const y = [];
|
|
576
|
+
async function O(L) {
|
|
577
|
+
await Ue();
|
|
578
|
+
const D = X(
|
|
579
|
+
() => a.value[L],
|
|
580
580
|
() => {
|
|
581
|
-
const
|
|
582
|
-
|
|
583
|
-
name:
|
|
584
|
-
fieldState:
|
|
581
|
+
const j = l.value[L];
|
|
582
|
+
ls({
|
|
583
|
+
name: L,
|
|
584
|
+
fieldState: j,
|
|
585
585
|
payload: a.value,
|
|
586
586
|
schema: u.value,
|
|
587
|
-
isSubmitted:
|
|
588
|
-
forceValidation:
|
|
587
|
+
isSubmitted: g.value,
|
|
588
|
+
forceValidation: be(["aggressive", "lazy", "progressive"], j.mode)
|
|
589
589
|
});
|
|
590
590
|
},
|
|
591
|
-
{ deep: typeof u.value[
|
|
591
|
+
{ deep: typeof u.value[L] == "object" }
|
|
592
592
|
);
|
|
593
|
-
|
|
593
|
+
y.push(D);
|
|
594
594
|
}
|
|
595
|
-
function
|
|
596
|
-
for (const
|
|
597
|
-
|
|
598
|
-
for (const
|
|
599
|
-
|
|
595
|
+
function v() {
|
|
596
|
+
for (const L of y)
|
|
597
|
+
L();
|
|
598
|
+
for (const L of Object.keys(u.value))
|
|
599
|
+
O(L);
|
|
600
600
|
}
|
|
601
|
-
function
|
|
602
|
-
return async (
|
|
603
|
-
if (
|
|
601
|
+
function S(L, D) {
|
|
602
|
+
return async (j) => {
|
|
603
|
+
if (j == null || j.preventDefault(), h.value)
|
|
604
604
|
return;
|
|
605
|
-
|
|
606
|
-
const
|
|
605
|
+
g.value = !0, h.value = !0, await c(!0);
|
|
606
|
+
const ne = typeof D == "string" ? D : i.scrollToError;
|
|
607
607
|
let G;
|
|
608
|
-
return E.value ? G = await
|
|
608
|
+
return E.value ? G = await L(a.value) : typeof ne != "boolean" && Xe(ne), h.value = !1, G;
|
|
609
609
|
};
|
|
610
610
|
}
|
|
611
|
-
const
|
|
611
|
+
const $ = {
|
|
612
612
|
fieldsStates: l,
|
|
613
613
|
payload: a,
|
|
614
614
|
options: i,
|
|
615
615
|
internalSchema: u,
|
|
616
|
-
errorMessages:
|
|
617
|
-
isSubmitted:
|
|
616
|
+
errorMessages: I,
|
|
617
|
+
isSubmitted: g
|
|
618
618
|
};
|
|
619
|
-
return o.formContexts ?? (o.formContexts = /* @__PURE__ */ new Map()), o.formContexts.set(i.identifier,
|
|
619
|
+
return o.formContexts ?? (o.formContexts = /* @__PURE__ */ new Map()), o.formContexts.set(i.identifier, $), Ht(i.identifier, $), v(), {
|
|
620
620
|
identifier: i.identifier,
|
|
621
621
|
isDirty: T,
|
|
622
622
|
isSubmitting: h,
|
|
623
|
-
isSubmitted:
|
|
623
|
+
isSubmitted: g,
|
|
624
624
|
isValid: E,
|
|
625
|
-
errors:
|
|
625
|
+
errors: M,
|
|
626
626
|
model: a,
|
|
627
627
|
fieldsStates: l,
|
|
628
628
|
validateForm: c,
|
|
629
|
-
scrollToError:
|
|
630
|
-
handleSubmit:
|
|
631
|
-
errorMessages:
|
|
629
|
+
scrollToError: Xe,
|
|
630
|
+
handleSubmit: S,
|
|
631
|
+
errorMessages: I
|
|
632
632
|
};
|
|
633
633
|
}
|
|
634
|
-
class
|
|
634
|
+
class ms {
|
|
635
635
|
constructor(e, t) {
|
|
636
636
|
d(this, "defaultOptions", {
|
|
637
637
|
element: void 0,
|
|
@@ -738,20 +738,20 @@ class us {
|
|
|
738
738
|
e ? this.handleTimeout() : this.reset(), this.callback({ isIdle: this.isIdle, instance: this });
|
|
739
739
|
}
|
|
740
740
|
}
|
|
741
|
-
function
|
|
741
|
+
function Wn({
|
|
742
742
|
callback: s,
|
|
743
743
|
options: e
|
|
744
744
|
}) {
|
|
745
|
-
return new
|
|
745
|
+
return new ms(s, e);
|
|
746
746
|
}
|
|
747
|
-
function
|
|
747
|
+
function Rn({
|
|
748
748
|
componentName: s,
|
|
749
749
|
providedId: e
|
|
750
750
|
}) {
|
|
751
|
-
const t =
|
|
751
|
+
const t = Vt();
|
|
752
752
|
return f(() => e ?? `${s}-${t}`);
|
|
753
753
|
}
|
|
754
|
-
const
|
|
754
|
+
const fs = [
|
|
755
755
|
"af-ZA",
|
|
756
756
|
"sq-AL",
|
|
757
757
|
"ar-DZ",
|
|
@@ -889,9 +889,9 @@ const cs = [
|
|
|
889
889
|
"Lt-uz-UZ",
|
|
890
890
|
"vi-VN"
|
|
891
891
|
];
|
|
892
|
-
function
|
|
892
|
+
function hs(s, e) {
|
|
893
893
|
return f(() => {
|
|
894
|
-
const t =
|
|
894
|
+
const t = te(e), n = te(s);
|
|
895
895
|
try {
|
|
896
896
|
return !t || !n ? n : new Intl.DisplayNames([t], { type: "language" }).of(n) || n;
|
|
897
897
|
} catch {
|
|
@@ -899,9 +899,9 @@ function ds(s, e) {
|
|
|
899
899
|
}
|
|
900
900
|
});
|
|
901
901
|
}
|
|
902
|
-
function
|
|
902
|
+
function vs(s) {
|
|
903
903
|
return f(() => {
|
|
904
|
-
const e =
|
|
904
|
+
const e = te(s);
|
|
905
905
|
if (!e)
|
|
906
906
|
return [];
|
|
907
907
|
const t = 65, n = 90, o = new Intl.DisplayNames([e], { type: "language" }), i = [];
|
|
@@ -916,15 +916,15 @@ function ms(s) {
|
|
|
916
916
|
return i;
|
|
917
917
|
});
|
|
918
918
|
}
|
|
919
|
-
function
|
|
919
|
+
function ps(s) {
|
|
920
920
|
return f(() => {
|
|
921
|
-
const e =
|
|
921
|
+
const e = te(s);
|
|
922
922
|
if (!e)
|
|
923
923
|
return [];
|
|
924
924
|
const t = new Intl.DisplayNames([e], {
|
|
925
925
|
type: "language"
|
|
926
926
|
});
|
|
927
|
-
return
|
|
927
|
+
return fs.map((n) => {
|
|
928
928
|
try {
|
|
929
929
|
const o = t.of(n);
|
|
930
930
|
return !o || n.toLocaleLowerCase() === o.toLocaleLowerCase() ? void 0 : {
|
|
@@ -937,22 +937,22 @@ function fs(s) {
|
|
|
937
937
|
}).filter(Boolean);
|
|
938
938
|
});
|
|
939
939
|
}
|
|
940
|
-
function
|
|
940
|
+
function Kn(s) {
|
|
941
941
|
return {
|
|
942
|
-
getLanguageDisplayName: ({ isoCode: e, locale: t }) =>
|
|
943
|
-
getAllPossibleLanguages: (e) =>
|
|
944
|
-
getLanguageDisplayNamesForIsoCodes: (e) =>
|
|
942
|
+
getLanguageDisplayName: ({ isoCode: e, locale: t }) => hs(e, t || s),
|
|
943
|
+
getAllPossibleLanguages: (e) => vs(e || s),
|
|
944
|
+
getLanguageDisplayNamesForIsoCodes: (e) => ps(e || s)
|
|
945
945
|
};
|
|
946
946
|
}
|
|
947
|
-
function
|
|
947
|
+
function yt(s) {
|
|
948
948
|
const e = s.join(", ").match(/\b\w+\b/g);
|
|
949
949
|
return e ? e.length : 0;
|
|
950
950
|
}
|
|
951
|
-
function
|
|
952
|
-
const t =
|
|
951
|
+
function gs(s, e = 150) {
|
|
952
|
+
const t = yt([s]);
|
|
953
953
|
return Math.ceil(t / e);
|
|
954
954
|
}
|
|
955
|
-
function
|
|
955
|
+
function Yn(s) {
|
|
956
956
|
const e = f(
|
|
957
957
|
() => {
|
|
958
958
|
var r;
|
|
@@ -971,7 +971,7 @@ function Wn(s) {
|
|
|
971
971
|
return l.textContent;
|
|
972
972
|
}
|
|
973
973
|
return typeof s.content == "string" ? s.content : (u = s.content) == null ? void 0 : u.value;
|
|
974
|
-
}), o = f(() =>
|
|
974
|
+
}), o = f(() => gs(n.value, e.value)), i = f(() => yt([n.value]));
|
|
975
975
|
return {
|
|
976
976
|
content: n,
|
|
977
977
|
wordCount: i,
|
|
@@ -979,7 +979,7 @@ function Wn(s) {
|
|
|
979
979
|
duration: o
|
|
980
980
|
};
|
|
981
981
|
}
|
|
982
|
-
const
|
|
982
|
+
const ys = {
|
|
983
983
|
removeAccents: !0,
|
|
984
984
|
caseSensitive: !1,
|
|
985
985
|
replaceSpaces: !0,
|
|
@@ -989,8 +989,8 @@ const vs = {
|
|
|
989
989
|
removeNumbers: !1,
|
|
990
990
|
customNormalizationForms: ["NFC", "NFKD"]
|
|
991
991
|
};
|
|
992
|
-
function
|
|
993
|
-
const t = { ...
|
|
992
|
+
function Ge(s, e) {
|
|
993
|
+
const t = { ...ys, ...e }, n = {
|
|
994
994
|
À: "A",
|
|
995
995
|
Á: "A",
|
|
996
996
|
Â: "A",
|
|
@@ -1045,7 +1045,7 @@ function Ze(s, e) {
|
|
|
1045
1045
|
o = o.normalize(i);
|
|
1046
1046
|
return o;
|
|
1047
1047
|
}
|
|
1048
|
-
function
|
|
1048
|
+
function bs(s, e) {
|
|
1049
1049
|
const t = s.length, n = e.length, o = [];
|
|
1050
1050
|
for (let i = 0; i <= t; i++)
|
|
1051
1051
|
o[i] = [i];
|
|
@@ -1062,34 +1062,34 @@ function ps(s, e) {
|
|
|
1062
1062
|
}
|
|
1063
1063
|
return o[t][n];
|
|
1064
1064
|
}
|
|
1065
|
-
function
|
|
1066
|
-
const t =
|
|
1065
|
+
function bt(s, e) {
|
|
1066
|
+
const t = bs(s, e), n = Math.max(s.length, e.length);
|
|
1067
1067
|
return 1 - t / n;
|
|
1068
1068
|
}
|
|
1069
|
-
function
|
|
1070
|
-
return
|
|
1069
|
+
function ws(s, e, t = 0.75) {
|
|
1070
|
+
return bt(s, e) >= t;
|
|
1071
1071
|
}
|
|
1072
|
-
function
|
|
1072
|
+
function Zn(s, e, t = 0.75) {
|
|
1073
1073
|
const n = f(
|
|
1074
|
-
() =>
|
|
1074
|
+
() => Ge(typeof s == "string" ? s : s.value)
|
|
1075
1075
|
), o = f(
|
|
1076
|
-
() =>
|
|
1077
|
-
), i = f(() => typeof t == "number" ? t : t.value), r = f(() =>
|
|
1076
|
+
() => Ge(typeof e == "string" ? e : e.value)
|
|
1077
|
+
), i = f(() => typeof t == "number" ? t : t.value), r = f(() => bt(n.value, o.value));
|
|
1078
1078
|
return {
|
|
1079
1079
|
isMatching: f(
|
|
1080
|
-
() =>
|
|
1080
|
+
() => ws(n.value, o.value, i.value)
|
|
1081
1081
|
),
|
|
1082
1082
|
score: r
|
|
1083
1083
|
};
|
|
1084
1084
|
}
|
|
1085
|
-
const
|
|
1085
|
+
const Es = {
|
|
1086
1086
|
preventDefaultOnTouchMove: !1,
|
|
1087
1087
|
preventDefaultOnMouseWheel: !1,
|
|
1088
1088
|
threshold: 50,
|
|
1089
1089
|
immediate: !1,
|
|
1090
1090
|
triggerOnEnd: !1
|
|
1091
1091
|
};
|
|
1092
|
-
class
|
|
1092
|
+
class Ts {
|
|
1093
1093
|
constructor(e) {
|
|
1094
1094
|
d(this, "element");
|
|
1095
1095
|
d(this, "xStart");
|
|
@@ -1105,7 +1105,7 @@ class bs {
|
|
|
1105
1105
|
d(this, "start");
|
|
1106
1106
|
d(this, "stop");
|
|
1107
1107
|
d(this, "options");
|
|
1108
|
-
this.inputOption = e, this.options = { ...
|
|
1108
|
+
this.inputOption = e, this.options = { ...Es, ...e }, this.onToucheStartCallback = this.toucheStartHandler.bind(this), this.onToucheMoveCallback = this.handleTouchMove.bind(this), this.onToucheEndCallback = this.handleTouchEnd.bind(this), this.onMouseWheelCallback = this.handleMouseWheel.bind(this), this.start = this.startListening.bind(this), this.stop = this.stopListening.bind(this), this.options.element && this.setElement(this.options.element), this.options.immediate && this.start();
|
|
1109
1109
|
}
|
|
1110
1110
|
startListening() {
|
|
1111
1111
|
this.setElement(this.options.element), this.element.addEventListener("touchstart", this.onToucheStartCallback, { passive: !0 }), this.element.addEventListener("touchmove", this.onToucheMoveCallback, { passive: !0 }), this.options.triggerOnEnd && this.element.addEventListener("touchend", this.onToucheEndCallback, { passive: !0 }), this.options.preventDefaultOnMouseWheel && this.element.addEventListener("mousewheel", this.onMouseWheelCallback, { passive: !1 });
|
|
@@ -1161,8 +1161,8 @@ class bs {
|
|
|
1161
1161
|
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();
|
|
1162
1162
|
}
|
|
1163
1163
|
}
|
|
1164
|
-
function
|
|
1165
|
-
const e =
|
|
1164
|
+
function Xn(s) {
|
|
1165
|
+
const e = b(), t = b(), n = b(), o = b(), i = b(), r = b(), a = f(() => te(s.element)), u = new Ts({
|
|
1166
1166
|
...s,
|
|
1167
1167
|
element: a.value,
|
|
1168
1168
|
onValuesChanged(l) {
|
|
@@ -1182,7 +1182,7 @@ function Kn(s) {
|
|
|
1182
1182
|
stop: u.stop
|
|
1183
1183
|
};
|
|
1184
1184
|
}
|
|
1185
|
-
const
|
|
1185
|
+
const Ls = {
|
|
1186
1186
|
darkClass: "dark",
|
|
1187
1187
|
lightClass: "light",
|
|
1188
1188
|
storageThemeKey: "theme",
|
|
@@ -1190,11 +1190,11 @@ const ws = {
|
|
|
1190
1190
|
storageThemeValueLight: "light",
|
|
1191
1191
|
storageThemeValueSystem: "system",
|
|
1192
1192
|
watchChanges: !0
|
|
1193
|
-
},
|
|
1194
|
-
function
|
|
1193
|
+
}, we = b("system"), K = b("system");
|
|
1194
|
+
function Qe() {
|
|
1195
1195
|
return window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
1196
1196
|
}
|
|
1197
|
-
function
|
|
1197
|
+
function Ee({
|
|
1198
1198
|
darkClass: s,
|
|
1199
1199
|
lightClass: e,
|
|
1200
1200
|
storageThemeKey: t,
|
|
@@ -1202,9 +1202,9 @@ function be({
|
|
|
1202
1202
|
setLocalStorageValue: o = !0,
|
|
1203
1203
|
setSelectedTheme: i = !0
|
|
1204
1204
|
}) {
|
|
1205
|
-
F() && (document.documentElement.classList.remove(e), document.documentElement.classList.add(s),
|
|
1205
|
+
F() && (document.documentElement.classList.remove(e), document.documentElement.classList.add(s), we.value = n, i && (K.value = n), o && (localStorage[t] = n));
|
|
1206
1206
|
}
|
|
1207
|
-
function
|
|
1207
|
+
function Te({
|
|
1208
1208
|
darkClass: s,
|
|
1209
1209
|
lightClass: e,
|
|
1210
1210
|
storageThemeKey: t,
|
|
@@ -1212,105 +1212,105 @@ function we({
|
|
|
1212
1212
|
setLocalStorageValue: o = !0,
|
|
1213
1213
|
setSelectedTheme: i = !0
|
|
1214
1214
|
}) {
|
|
1215
|
-
F() && (document.documentElement.classList.remove(s), document.documentElement.classList.add(e),
|
|
1215
|
+
F() && (document.documentElement.classList.remove(s), document.documentElement.classList.add(e), we.value = n, i && (K.value = n), o && (localStorage[t] = n));
|
|
1216
1216
|
}
|
|
1217
|
-
function
|
|
1217
|
+
function wt({
|
|
1218
1218
|
setLocalStorageValue: s = !0,
|
|
1219
1219
|
...e
|
|
1220
1220
|
}) {
|
|
1221
1221
|
if (F())
|
|
1222
|
-
return document.documentElement.classList.remove(e.darkClass), document.documentElement.classList.remove(e.lightClass),
|
|
1222
|
+
return document.documentElement.classList.remove(e.darkClass), document.documentElement.classList.remove(e.lightClass), we.value = e.storageThemeValueSystem, K.value = e.storageThemeValueSystem, s && (localStorage[e.storageThemeKey] = e.storageThemeValueSystem), Ne(e);
|
|
1223
1223
|
}
|
|
1224
|
-
function
|
|
1224
|
+
function Et(s) {
|
|
1225
1225
|
if (!s.defaultTheme)
|
|
1226
1226
|
return console.error("[maz-ui](useThemeHandler) No default theme set");
|
|
1227
1227
|
if (!["light", "dark"].includes(s.defaultTheme))
|
|
1228
1228
|
return console.error('[maz-ui](useThemeHandler) Default theme must be "light" or "dark"');
|
|
1229
1229
|
switch (s.defaultTheme) {
|
|
1230
1230
|
case "dark":
|
|
1231
|
-
return
|
|
1231
|
+
return Ee({
|
|
1232
1232
|
...s,
|
|
1233
1233
|
setLocalStorageValue: !1,
|
|
1234
1234
|
setSelectedTheme: !0
|
|
1235
1235
|
});
|
|
1236
1236
|
case "light":
|
|
1237
|
-
return
|
|
1237
|
+
return Te({
|
|
1238
1238
|
...s,
|
|
1239
1239
|
setLocalStorageValue: !1,
|
|
1240
1240
|
setSelectedTheme: !0
|
|
1241
1241
|
});
|
|
1242
1242
|
}
|
|
1243
1243
|
}
|
|
1244
|
-
function
|
|
1245
|
-
return F() ? !localStorage[s.storageThemeKey] && s.defaultTheme ?
|
|
1244
|
+
function Ne(s) {
|
|
1245
|
+
return F() ? !localStorage[s.storageThemeKey] && s.defaultTheme ? Et(s) : localStorage[s.storageThemeKey] === s.storageThemeValueDark || !localStorage[s.storageThemeKey] && Qe() || localStorage[s.storageThemeKey] === s.storageThemeValueSystem && Qe() ? Ee({
|
|
1246
1246
|
...s,
|
|
1247
1247
|
setLocalStorageValue: !1,
|
|
1248
1248
|
setSelectedTheme: !1
|
|
1249
|
-
}) :
|
|
1249
|
+
}) : Te({
|
|
1250
1250
|
...s,
|
|
1251
1251
|
setLocalStorageValue: !1,
|
|
1252
1252
|
setSelectedTheme: !1
|
|
1253
1253
|
}) : void 0;
|
|
1254
1254
|
}
|
|
1255
|
-
function
|
|
1255
|
+
function Ve({
|
|
1256
1256
|
theme: s,
|
|
1257
1257
|
...e
|
|
1258
1258
|
}) {
|
|
1259
|
-
return s === "system" ?
|
|
1259
|
+
return s === "system" ? wt(e) : s === "dark" ? Ee(e) : Te(e);
|
|
1260
1260
|
}
|
|
1261
|
-
function
|
|
1262
|
-
return
|
|
1261
|
+
function zs(s) {
|
|
1262
|
+
return we.value === s.storageThemeValueDark ? Te(s) : Ee(s);
|
|
1263
1263
|
}
|
|
1264
|
-
function
|
|
1264
|
+
function Gn(s) {
|
|
1265
1265
|
const e = {
|
|
1266
|
-
...
|
|
1266
|
+
...Ls,
|
|
1267
1267
|
...s
|
|
1268
1268
|
};
|
|
1269
1269
|
function t() {
|
|
1270
|
-
|
|
1270
|
+
Ne(e);
|
|
1271
1271
|
}
|
|
1272
|
-
return
|
|
1273
|
-
localStorage[e.storageThemeKey] && (
|
|
1274
|
-
}),
|
|
1272
|
+
return ue(() => {
|
|
1273
|
+
localStorage[e.storageThemeKey] && (K.value = localStorage[e.storageThemeKey]), e.watchChanges && window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change", t);
|
|
1274
|
+
}), rt(() => {
|
|
1275
1275
|
e.watchChanges && window.matchMedia("(prefers-color-scheme: dark)").removeEventListener("change", t);
|
|
1276
|
-
}),
|
|
1276
|
+
}), X(K, (n) => {
|
|
1277
1277
|
switch (localStorage[e.storageThemeKey] = n, n) {
|
|
1278
1278
|
case e.storageThemeValueDark: {
|
|
1279
|
-
|
|
1279
|
+
Ee(e);
|
|
1280
1280
|
break;
|
|
1281
1281
|
}
|
|
1282
1282
|
case e.storageThemeValueLight: {
|
|
1283
|
-
|
|
1283
|
+
Te(e);
|
|
1284
1284
|
break;
|
|
1285
1285
|
}
|
|
1286
1286
|
case e.storageThemeValueSystem: {
|
|
1287
|
-
|
|
1287
|
+
wt(e);
|
|
1288
1288
|
break;
|
|
1289
1289
|
}
|
|
1290
1290
|
}
|
|
1291
1291
|
}), {
|
|
1292
|
-
autoSetTheme: () =>
|
|
1293
|
-
toggleTheme: () =>
|
|
1294
|
-
setSystemTheme: () =>
|
|
1295
|
-
setDarkTheme: () =>
|
|
1296
|
-
setLightTheme: () =>
|
|
1297
|
-
setDefaultTheme: () =>
|
|
1298
|
-
hasDarkTheme: f(() =>
|
|
1299
|
-
hasLightTheme: f(() =>
|
|
1300
|
-
hasSystemTheme: f(() =>
|
|
1301
|
-
theme:
|
|
1302
|
-
selectedTheme:
|
|
1292
|
+
autoSetTheme: () => Ne(e),
|
|
1293
|
+
toggleTheme: () => zs(e),
|
|
1294
|
+
setSystemTheme: () => Ve({ ...e, theme: "system" }),
|
|
1295
|
+
setDarkTheme: () => Ve({ ...e, theme: "dark" }),
|
|
1296
|
+
setLightTheme: () => Ve({ ...e, theme: "light" }),
|
|
1297
|
+
setDefaultTheme: () => Et(e),
|
|
1298
|
+
hasDarkTheme: f(() => K.value === e.storageThemeValueDark),
|
|
1299
|
+
hasLightTheme: f(() => K.value === e.storageThemeValueLight),
|
|
1300
|
+
hasSystemTheme: f(() => K.value === e.storageThemeValueSystem),
|
|
1301
|
+
theme: we,
|
|
1302
|
+
selectedTheme: K
|
|
1303
1303
|
};
|
|
1304
1304
|
}
|
|
1305
|
-
function
|
|
1306
|
-
const o =
|
|
1305
|
+
function Cs({ timeout: s = 1e3, callback: e, remainingTimeUpdate: t = 200, callbackOffsetTime: n = 0 }) {
|
|
1306
|
+
const o = b(s), i = b(s);
|
|
1307
1307
|
let r;
|
|
1308
1308
|
function a(E) {
|
|
1309
1309
|
typeof E == "number" && (i.value = E), typeof E == "number" && (o.value = E), u();
|
|
1310
1310
|
}
|
|
1311
1311
|
function u() {
|
|
1312
1312
|
r || (r = setInterval(() => {
|
|
1313
|
-
i.value -= t, i.value <= 0 && (
|
|
1313
|
+
i.value -= t, i.value <= 0 && (g(), setTimeout(() => e == null ? void 0 : e(), n));
|
|
1314
1314
|
}, t));
|
|
1315
1315
|
}
|
|
1316
1316
|
function l() {
|
|
@@ -1319,7 +1319,7 @@ function zs({ timeout: s = 1e3, callback: e, remainingTimeUpdate: t = 200, callb
|
|
|
1319
1319
|
function h() {
|
|
1320
1320
|
!r && i.value > 0 && u();
|
|
1321
1321
|
}
|
|
1322
|
-
function
|
|
1322
|
+
function g() {
|
|
1323
1323
|
setTimeout(() => i.value = o.value, n * 2), l();
|
|
1324
1324
|
}
|
|
1325
1325
|
return {
|
|
@@ -1327,13 +1327,13 @@ function zs({ timeout: s = 1e3, callback: e, remainingTimeUpdate: t = 200, callb
|
|
|
1327
1327
|
start: a,
|
|
1328
1328
|
pause: l,
|
|
1329
1329
|
resume: h,
|
|
1330
|
-
stop:
|
|
1330
|
+
stop: g
|
|
1331
1331
|
};
|
|
1332
1332
|
}
|
|
1333
|
-
function
|
|
1334
|
-
return
|
|
1333
|
+
function Qn() {
|
|
1334
|
+
return Oe("toast");
|
|
1335
1335
|
}
|
|
1336
|
-
class
|
|
1336
|
+
class Is {
|
|
1337
1337
|
constructor(e, t) {
|
|
1338
1338
|
d(this, "eventHandlerFunction");
|
|
1339
1339
|
d(this, "event", "visibilitychange");
|
|
@@ -1379,62 +1379,62 @@ class Ts {
|
|
|
1379
1379
|
this.removeEventListener(), this.timeoutHandler && clearTimeout(this.timeoutHandler);
|
|
1380
1380
|
}
|
|
1381
1381
|
}
|
|
1382
|
-
function
|
|
1382
|
+
function Jn({
|
|
1383
1383
|
callback: s,
|
|
1384
1384
|
options: e
|
|
1385
1385
|
}) {
|
|
1386
|
-
return new
|
|
1386
|
+
return new Is(s, e);
|
|
1387
1387
|
}
|
|
1388
|
-
function
|
|
1389
|
-
return
|
|
1388
|
+
function eo() {
|
|
1389
|
+
return Oe("wait");
|
|
1390
1390
|
}
|
|
1391
|
-
const
|
|
1392
|
-
function
|
|
1391
|
+
const xe = "__maz-click-outside__";
|
|
1392
|
+
function Tt() {
|
|
1393
1393
|
return document.ontouchstart === null ? "touchstart" : "click";
|
|
1394
1394
|
}
|
|
1395
|
-
async function
|
|
1395
|
+
async function Lt(s, e) {
|
|
1396
1396
|
try {
|
|
1397
|
-
|
|
1397
|
+
zt(s);
|
|
1398
1398
|
const t = e.instance, n = e.value, o = typeof n == "function";
|
|
1399
1399
|
if (!o)
|
|
1400
1400
|
throw new Error("[maz-ui](vClickOutside) the callback should be a function");
|
|
1401
|
-
await
|
|
1401
|
+
await Ue(), s[xe] = (r) => {
|
|
1402
1402
|
if ((!s || r.target && !s.contains(r.target)) && n && o)
|
|
1403
1403
|
return n.call(t, r);
|
|
1404
1404
|
};
|
|
1405
|
-
const i =
|
|
1406
|
-
document.addEventListener(i, s[
|
|
1405
|
+
const i = Tt();
|
|
1406
|
+
document.addEventListener(i, s[xe], { passive: !0 });
|
|
1407
1407
|
} catch (t) {
|
|
1408
1408
|
console.error("[maz-ui](vClickOutside)", t);
|
|
1409
1409
|
}
|
|
1410
1410
|
}
|
|
1411
|
-
function
|
|
1411
|
+
function zt(s) {
|
|
1412
1412
|
try {
|
|
1413
|
-
const e =
|
|
1414
|
-
document.removeEventListener(e, s[
|
|
1413
|
+
const e = Tt();
|
|
1414
|
+
document.removeEventListener(e, s[xe], !1), delete s[xe];
|
|
1415
1415
|
} catch (e) {
|
|
1416
1416
|
console.error("[maz-ui](vClickOutside)", e);
|
|
1417
1417
|
}
|
|
1418
1418
|
}
|
|
1419
|
-
function
|
|
1419
|
+
function ks(s, e) {
|
|
1420
1420
|
try {
|
|
1421
1421
|
if (e.value === e.oldValue)
|
|
1422
1422
|
return;
|
|
1423
|
-
|
|
1423
|
+
Lt(s, e);
|
|
1424
1424
|
} catch (t) {
|
|
1425
1425
|
console.error("[maz-ui](vClickOutside)", t);
|
|
1426
1426
|
}
|
|
1427
1427
|
}
|
|
1428
|
-
const
|
|
1429
|
-
mounted:
|
|
1430
|
-
updated:
|
|
1431
|
-
unmounted:
|
|
1432
|
-
},
|
|
1428
|
+
const As = {
|
|
1429
|
+
mounted: Lt,
|
|
1430
|
+
updated: ks,
|
|
1431
|
+
unmounted: zt
|
|
1432
|
+
}, Ss = {
|
|
1433
1433
|
install: (s) => {
|
|
1434
|
-
s.directive("click-outside",
|
|
1434
|
+
s.directive("click-outside", As);
|
|
1435
1435
|
}
|
|
1436
1436
|
};
|
|
1437
|
-
function
|
|
1437
|
+
function Ct(s, e, t) {
|
|
1438
1438
|
var r;
|
|
1439
1439
|
s.stopPropagation();
|
|
1440
1440
|
const n = typeof t.value == "function" ? t.value : t.value.handler, o = typeof t.value == "object" ? t.value.exclude : void 0;
|
|
@@ -1448,36 +1448,36 @@ function zt(s, e, t) {
|
|
|
1448
1448
|
}
|
|
1449
1449
|
!e.contains(s.target) && !i && (n == null || n());
|
|
1450
1450
|
}
|
|
1451
|
-
function
|
|
1451
|
+
function It() {
|
|
1452
1452
|
return document.ontouchstart === null ? "touchstart" : "click";
|
|
1453
1453
|
}
|
|
1454
|
-
function
|
|
1455
|
-
const t =
|
|
1456
|
-
document.removeEventListener(t, (n) =>
|
|
1454
|
+
function xs(s, e) {
|
|
1455
|
+
const t = It();
|
|
1456
|
+
document.removeEventListener(t, (n) => Ct(n, s, e));
|
|
1457
1457
|
}
|
|
1458
|
-
function
|
|
1458
|
+
function Os(s, e) {
|
|
1459
1459
|
if (typeof e.value != "function" && typeof e.value == "object" && typeof e.value.handler != "function") {
|
|
1460
1460
|
console.error("[maz-ui](vClosable) v-closable directive requires a handler function");
|
|
1461
1461
|
return;
|
|
1462
1462
|
}
|
|
1463
|
-
const t =
|
|
1464
|
-
document.addEventListener(t, (n) =>
|
|
1463
|
+
const t = It();
|
|
1464
|
+
document.addEventListener(t, (n) => Ct(n, s, e));
|
|
1465
1465
|
}
|
|
1466
|
-
const
|
|
1467
|
-
mounted:
|
|
1468
|
-
unmounted:
|
|
1469
|
-
},
|
|
1466
|
+
const Ds = {
|
|
1467
|
+
mounted: Os,
|
|
1468
|
+
unmounted: xs
|
|
1469
|
+
}, Ps = {
|
|
1470
1470
|
install: (s) => {
|
|
1471
|
-
s.directive("closable",
|
|
1471
|
+
s.directive("closable", Ds);
|
|
1472
1472
|
}
|
|
1473
|
-
},
|
|
1473
|
+
}, Fe = {
|
|
1474
1474
|
position: "top"
|
|
1475
1475
|
};
|
|
1476
|
-
class
|
|
1476
|
+
class kt {
|
|
1477
1477
|
constructor(e = {}) {
|
|
1478
1478
|
d(this, "options");
|
|
1479
1479
|
this.options = {
|
|
1480
|
-
...
|
|
1480
|
+
...Fe,
|
|
1481
1481
|
...e
|
|
1482
1482
|
};
|
|
1483
1483
|
}
|
|
@@ -1505,24 +1505,24 @@ class Lt {
|
|
|
1505
1505
|
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)}`);
|
|
1506
1506
|
}
|
|
1507
1507
|
}
|
|
1508
|
-
let
|
|
1509
|
-
const
|
|
1508
|
+
let Ie;
|
|
1509
|
+
const to = {
|
|
1510
1510
|
beforeMount(s, e) {
|
|
1511
1511
|
const t = typeof e.value == "object" ? e.value : {};
|
|
1512
|
-
return
|
|
1512
|
+
return Ie = new kt(t), Ie.create(s, e);
|
|
1513
1513
|
},
|
|
1514
1514
|
updated(s, e) {
|
|
1515
|
-
return
|
|
1515
|
+
return Ie.update(s, e);
|
|
1516
1516
|
},
|
|
1517
1517
|
unmounted(s, e) {
|
|
1518
|
-
return
|
|
1518
|
+
return Ie.remove(s, e);
|
|
1519
1519
|
}
|
|
1520
|
-
},
|
|
1521
|
-
install: (s, e =
|
|
1520
|
+
}, Ms = {
|
|
1521
|
+
install: (s, e = Fe) => {
|
|
1522
1522
|
const t = {
|
|
1523
|
-
...
|
|
1523
|
+
...Fe,
|
|
1524
1524
|
...e
|
|
1525
|
-
}, n = new
|
|
1525
|
+
}, n = new kt(t);
|
|
1526
1526
|
s.directive("tooltip", {
|
|
1527
1527
|
beforeMount: n.create.bind(n),
|
|
1528
1528
|
updated: n.update.bind(n),
|
|
@@ -1530,19 +1530,88 @@ const Qn = {
|
|
|
1530
1530
|
});
|
|
1531
1531
|
}
|
|
1532
1532
|
};
|
|
1533
|
-
function
|
|
1533
|
+
function We(s, e) {
|
|
1534
1534
|
let t = e == null ? void 0 : e.element;
|
|
1535
1535
|
function n() {
|
|
1536
|
-
t &&
|
|
1536
|
+
t && Ce(null, t);
|
|
1537
1537
|
}
|
|
1538
1538
|
const o = { ...e == null ? void 0 : e.props, ...e != null && e.addDestroyInProps ? { destroy: n } : {} }, i = J(
|
|
1539
1539
|
s,
|
|
1540
1540
|
o,
|
|
1541
1541
|
e == null ? void 0 : e.children
|
|
1542
1542
|
);
|
|
1543
|
-
return e != null && e.app ? (i.appContext = e.app._context, t ?
|
|
1543
|
+
return e != null && e.app ? (i.appContext = e.app._context, t ? Ce(i, t) : typeof document < "u" && (t = document.createElement("div"), Ce(i, t))) : (t = t ?? document.body, Ce(i, t)), { vNode: i, destroy: n, el: t };
|
|
1544
|
+
}
|
|
1545
|
+
function $s(s) {
|
|
1546
|
+
return !!s;
|
|
1547
|
+
}
|
|
1548
|
+
function so(s) {
|
|
1549
|
+
return [...s].map((e) => {
|
|
1550
|
+
const t = e.codePointAt(0);
|
|
1551
|
+
return t ? t % 32 + 127461 : void 0;
|
|
1552
|
+
}).filter($s).map((e) => String.fromCodePoint(e)).join("");
|
|
1553
|
+
}
|
|
1554
|
+
function no(s, e) {
|
|
1555
|
+
let t;
|
|
1556
|
+
return function(...n) {
|
|
1557
|
+
clearTimeout(t), t = setTimeout(() => {
|
|
1558
|
+
s.apply(this, n);
|
|
1559
|
+
}, e);
|
|
1560
|
+
};
|
|
1561
|
+
}
|
|
1562
|
+
class oo {
|
|
1563
|
+
constructor({ src: e, identifier: t, once: n = !0, async: o = !0, defer: i = !0 }) {
|
|
1564
|
+
d(this, "src");
|
|
1565
|
+
d(this, "script");
|
|
1566
|
+
d(this, "once");
|
|
1567
|
+
d(this, "async");
|
|
1568
|
+
d(this, "defer");
|
|
1569
|
+
d(this, "identifier");
|
|
1570
|
+
if (typeof window > "u")
|
|
1571
|
+
throw new TypeError("[ScriptLoader]: Is supported only on browser side");
|
|
1572
|
+
if (!e)
|
|
1573
|
+
throw new Error('[ScriptLoader]: You should provide the attribut "src"');
|
|
1574
|
+
if (!t)
|
|
1575
|
+
throw new Error('[ScriptLoader]: You should provide the attribut "identifier"');
|
|
1576
|
+
this.src = e, this.identifier = t, this.once = n, this.async = o, this.defer = i;
|
|
1577
|
+
}
|
|
1578
|
+
removeTag(e) {
|
|
1579
|
+
var t;
|
|
1580
|
+
typeof e == "string" ? (t = document.head.querySelector(`[data-identifier="${e}"]`)) == null || t.remove() : e.remove();
|
|
1581
|
+
}
|
|
1582
|
+
load() {
|
|
1583
|
+
const e = window, t = document.head.querySelectorAll(`[data-identifier="${this.identifier}"]`);
|
|
1584
|
+
if (this.once && e[this.identifier] && t.length > 0)
|
|
1585
|
+
return this.script = e[this.identifier], Promise.resolve(this.script);
|
|
1586
|
+
if (!this.once && t.length > 0)
|
|
1587
|
+
for (const n of t)
|
|
1588
|
+
this.removeTag(n);
|
|
1589
|
+
return this.injectScript();
|
|
1590
|
+
}
|
|
1591
|
+
injectScript() {
|
|
1592
|
+
const e = window;
|
|
1593
|
+
return new Promise((t, n) => {
|
|
1594
|
+
try {
|
|
1595
|
+
const o = document.createElement("script");
|
|
1596
|
+
o.src = this.src, o.async = this.async, o.defer = this.defer, o.dataset.identifier = this.identifier, o.addEventListener("error", (i) => n(new Error(`[ScriptLoader](injectScript) ${i.message}`))), o.addEventListener("load", (i) => (this.script = i, e[this.identifier] = i, t(i))), document.head.append(o);
|
|
1597
|
+
} catch (o) {
|
|
1598
|
+
throw new Error(`[ScriptLoader](init) ${o}`);
|
|
1599
|
+
}
|
|
1600
|
+
});
|
|
1601
|
+
}
|
|
1602
|
+
}
|
|
1603
|
+
function Hs(s) {
|
|
1604
|
+
return new Promise((e) => setTimeout(e, s));
|
|
1605
|
+
}
|
|
1606
|
+
function io(s, e) {
|
|
1607
|
+
let t = !1, n, o;
|
|
1608
|
+
return function(...i) {
|
|
1609
|
+
t ? (clearTimeout(n), n = setTimeout(() => {
|
|
1610
|
+
Date.now() - o >= e && (s.apply(this, i), o = Date.now());
|
|
1611
|
+
}, Math.max(e - (Date.now() - o), 0))) : (s.apply(this, i), o = Date.now(), t = !0);
|
|
1612
|
+
};
|
|
1544
1613
|
}
|
|
1545
|
-
const
|
|
1614
|
+
const Vs = ["onKeypress"], Bs = { class: "m-fullscreen-img-scroller" }, Ns = ["src", "alt"], Fs = /* @__PURE__ */ ge({
|
|
1546
1615
|
__name: "MazFullscreenImg",
|
|
1547
1616
|
props: {
|
|
1548
1617
|
src: {},
|
|
@@ -1560,202 +1629,231 @@ const Ds = ["onKeypress"], Ms = { class: "m-fullscreen-img-scroller" }, Ps = ["s
|
|
|
1560
1629
|
},
|
|
1561
1630
|
emits: ["close", "previous", "next", "before-close"],
|
|
1562
1631
|
setup(s, { emit: e }) {
|
|
1563
|
-
const t = s, n = e, o =
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1632
|
+
const t = s, n = e, o = H(() => import("./MazSpinner-BurN-1pb.mjs")), i = H(() => import("./x-mark-CnZwVvA7.mjs")), r = H(() => import("./chevron-left-BqVOLRdC.mjs")), a = b(!1), u = b(!1), l = b(!1), h = b(!1), g = b(!1), E = Bt({
|
|
1633
|
+
running: !1,
|
|
1634
|
+
ended: !1
|
|
1635
|
+
}), T = b(t.clickedElement), M = f(() => t.clickedElement.getBoundingClientRect()), I = b(), c = b(t.src), y = b(t.alt), O = b(), v = b(), S = b(!0), $ = f(() => ({
|
|
1636
|
+
"--is-zoomed": g.value,
|
|
1637
|
+
"--invisible": S.value,
|
|
1638
|
+
"--absolute": !g.value
|
|
1639
|
+
}));
|
|
1640
|
+
function L() {
|
|
1641
|
+
var p, w;
|
|
1642
|
+
v.value && (I.value = ((p = v.value) == null ? void 0 : p.naturalWidth) > ((w = v.value) == null ? void 0 : w.naturalHeight)), a.value = !0, u.value = !1, l.value = !0;
|
|
1568
1643
|
}
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
(
|
|
1572
|
-
|
|
1573
|
-
}
|
|
1644
|
+
X(
|
|
1645
|
+
l,
|
|
1646
|
+
async (p) => {
|
|
1647
|
+
p && k();
|
|
1648
|
+
},
|
|
1649
|
+
{ immediate: !0 }
|
|
1574
1650
|
);
|
|
1575
|
-
function
|
|
1576
|
-
n("before-close"),
|
|
1651
|
+
function D() {
|
|
1652
|
+
n("before-close"), x();
|
|
1577
1653
|
}
|
|
1578
|
-
function
|
|
1579
|
-
|
|
1654
|
+
function j(p) {
|
|
1655
|
+
p.key === "Escape" && (p.preventDefault(), D()), (p.key === "ArrowLeft" || p.key === "ArrowRight") && (p.preventDefault(), me(p.key === "ArrowRight" ? "next" : "previous"));
|
|
1580
1656
|
}
|
|
1581
|
-
function
|
|
1657
|
+
function ne() {
|
|
1582
1658
|
document.documentElement.classList.add("--m-fullscreen-open");
|
|
1583
1659
|
}
|
|
1584
|
-
function
|
|
1660
|
+
function G() {
|
|
1585
1661
|
document.documentElement.classList.remove("--m-fullscreen-open");
|
|
1586
1662
|
}
|
|
1587
|
-
function
|
|
1663
|
+
function ce() {
|
|
1588
1664
|
return [...document.querySelectorAll(".m-fullscreen-img-instance")];
|
|
1589
1665
|
}
|
|
1590
|
-
function
|
|
1591
|
-
return w < 0 ?
|
|
1666
|
+
function De(p, w) {
|
|
1667
|
+
return w < 0 ? p.length - 1 : w >= p.length ? 0 : w;
|
|
1592
1668
|
}
|
|
1593
|
-
async function
|
|
1594
|
-
|
|
1595
|
-
const
|
|
1596
|
-
|
|
1669
|
+
async function de(p, w) {
|
|
1670
|
+
p.classList.remove(t.openInstanceClass), w.classList.add(t.openInstanceClass);
|
|
1671
|
+
const z = w.getAttribute("data-src"), P = w.getAttribute("data-alt");
|
|
1672
|
+
y.value = P, c.value = z ?? c.value;
|
|
1597
1673
|
}
|
|
1598
|
-
function
|
|
1674
|
+
function me(p) {
|
|
1675
|
+
S.value = !0;
|
|
1599
1676
|
const w = document.querySelector(
|
|
1600
1677
|
`.m-fullscreen-img-instance.${t.openInstanceClass}`
|
|
1601
1678
|
);
|
|
1602
1679
|
if (w) {
|
|
1603
|
-
const
|
|
1604
|
-
|
|
1680
|
+
const z = ce(), P = z.indexOf(w), W = p === "next" ? P + 1 : P - 1, R = z[De(z, W)];
|
|
1681
|
+
T.value = R, R && de(w, R), n(p), a.value = !1, u.value = !0, ct(() => a.value === !0, () => {
|
|
1682
|
+
S.value = !1, g.value ? fe() : m();
|
|
1683
|
+
}, {
|
|
1684
|
+
expectedValue: !0,
|
|
1685
|
+
interval: 100,
|
|
1686
|
+
maxAttempts: 50
|
|
1687
|
+
});
|
|
1605
1688
|
}
|
|
1606
1689
|
}
|
|
1607
|
-
function
|
|
1608
|
-
|
|
1690
|
+
function fe() {
|
|
1691
|
+
const p = v.value;
|
|
1692
|
+
if (!p) {
|
|
1693
|
+
console.error("[maz-ui](vFullscreenImg) ImgElement is not defined");
|
|
1694
|
+
return;
|
|
1695
|
+
}
|
|
1696
|
+
p.style.removeProperty("max-width"), p.style.removeProperty("max-height"), p == null || p.style.removeProperty("top"), p == null || p.style.removeProperty("left"), I.value ? (p.style.height = "100vh", p.style.removeProperty("width")) : (p.style.width = "100vw", p.style.removeProperty("height"));
|
|
1609
1697
|
}
|
|
1610
|
-
async function
|
|
1611
|
-
|
|
1612
|
-
p.value ? (p.value = !p.value, oe()) : (p.value = !p.value, se(m));
|
|
1698
|
+
async function Pe() {
|
|
1699
|
+
g.value ? (g.value = !g.value, m()) : (g.value = !g.value, fe());
|
|
1613
1700
|
}
|
|
1614
|
-
function
|
|
1615
|
-
var
|
|
1616
|
-
|
|
1701
|
+
function oe(p) {
|
|
1702
|
+
var z;
|
|
1703
|
+
E.running = !0, S.value = !1;
|
|
1704
|
+
const w = (z = v.value) == null ? void 0 : z.animate(p, {
|
|
1617
1705
|
duration: t.animation.duration,
|
|
1618
|
-
// Durée de l'animation en millisecondes
|
|
1619
1706
|
easing: t.animation.easing
|
|
1620
|
-
// Fonction d'interpolation pour l'animation inverse
|
|
1621
1707
|
});
|
|
1708
|
+
if (!w) {
|
|
1709
|
+
console.error("[maz-ui](vFullscreenImg) animation is not defined"), E.running = !1, E.ended = !0;
|
|
1710
|
+
return;
|
|
1711
|
+
}
|
|
1712
|
+
return w;
|
|
1622
1713
|
}
|
|
1623
|
-
function
|
|
1624
|
-
const w =
|
|
1625
|
-
(
|
|
1626
|
-
(W - 2 *
|
|
1627
|
-
),
|
|
1714
|
+
function Le(p = t.offset ?? 0) {
|
|
1715
|
+
const w = T.value.clientWidth || 1, z = T.value.clientHeight || 1, P = window.innerWidth, W = window.innerHeight, R = Math.min(
|
|
1716
|
+
(P - 2 * p) / w,
|
|
1717
|
+
(W - 2 * p) / z
|
|
1718
|
+
), Me = (P - w * R) / 2, $e = (W - z * R) / 2;
|
|
1628
1719
|
return {
|
|
1629
|
-
centerX:
|
|
1630
|
-
centerY:
|
|
1631
|
-
|
|
1632
|
-
|
|
1633
|
-
scale:
|
|
1720
|
+
centerX: Me,
|
|
1721
|
+
centerY: $e,
|
|
1722
|
+
width: w,
|
|
1723
|
+
height: z,
|
|
1724
|
+
scale: R
|
|
1634
1725
|
};
|
|
1635
1726
|
}
|
|
1636
|
-
function
|
|
1637
|
-
const {
|
|
1727
|
+
function ze({ trigger: p }) {
|
|
1728
|
+
const { width: w, height: z, scale: P, centerX: W, centerY: R } = Le(), { top: Me, left: $e, width: Ot, height: Dt } = M.value, Ke = [
|
|
1638
1729
|
{
|
|
1639
|
-
top: `${
|
|
1640
|
-
left: `${
|
|
1641
|
-
width: `${
|
|
1642
|
-
height: `${
|
|
1730
|
+
top: `${Me}px`,
|
|
1731
|
+
left: `${$e}px`,
|
|
1732
|
+
width: `${Ot}px`,
|
|
1733
|
+
height: `${Dt}px`,
|
|
1643
1734
|
opacity: 0
|
|
1644
1735
|
},
|
|
1645
1736
|
{
|
|
1646
|
-
top: `${
|
|
1737
|
+
top: `${R}px`,
|
|
1647
1738
|
left: `${W}px`,
|
|
1648
|
-
width: `${w *
|
|
1649
|
-
height: `${
|
|
1739
|
+
width: `${w * P}px`,
|
|
1740
|
+
height: `${z * P}px`,
|
|
1650
1741
|
opacity: 1
|
|
1651
1742
|
}
|
|
1652
1743
|
];
|
|
1653
1744
|
return {
|
|
1654
|
-
frames:
|
|
1745
|
+
frames: p === "open" ? Ke : Ke.reverse()
|
|
1655
1746
|
};
|
|
1656
1747
|
}
|
|
1657
|
-
function
|
|
1658
|
-
const {
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
height: `${
|
|
1748
|
+
function m() {
|
|
1749
|
+
const { height: p, width: w, scale: z } = Le(), P = I.value ? {
|
|
1750
|
+
width: `${w * z}px`,
|
|
1751
|
+
maxHeight: `${p * z}px`
|
|
1752
|
+
} : {
|
|
1753
|
+
height: `${p * z}px`,
|
|
1754
|
+
maxWidth: `${w * z}px`
|
|
1663
1755
|
};
|
|
1664
|
-
if (!
|
|
1665
|
-
|
|
1666
|
-
|
|
1756
|
+
if (!v.value) {
|
|
1757
|
+
console.error("[maz-ui](vFullscreenImg) ImgElement is not defined");
|
|
1758
|
+
return;
|
|
1759
|
+
}
|
|
1760
|
+
I.value ? (v.value.style.removeProperty("height"), v.value.style.removeProperty("maxHeight")) : (v.value.style.removeProperty("width"), v.value.style.removeProperty("maxWidth")), Object.assign(v.value.style, P);
|
|
1667
1761
|
}
|
|
1668
|
-
function
|
|
1669
|
-
const { frames:
|
|
1762
|
+
function k() {
|
|
1763
|
+
const { frames: p } = ze({
|
|
1670
1764
|
trigger: "open"
|
|
1671
|
-
}), w =
|
|
1672
|
-
if (!w)
|
|
1673
|
-
|
|
1765
|
+
}), w = oe(p);
|
|
1766
|
+
if (!w) {
|
|
1767
|
+
console.error("[maz-ui](vFullscreenImg) open animation is not defined"), m();
|
|
1768
|
+
return;
|
|
1769
|
+
}
|
|
1674
1770
|
w.onfinish = () => {
|
|
1675
|
-
|
|
1771
|
+
m(), E.running = !1, E.ended = !0;
|
|
1676
1772
|
};
|
|
1677
1773
|
}
|
|
1678
|
-
function
|
|
1679
|
-
const { frames:
|
|
1774
|
+
function x() {
|
|
1775
|
+
const { frames: p } = ze({
|
|
1680
1776
|
trigger: "close"
|
|
1681
|
-
}), w =
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1777
|
+
}), w = oe(p);
|
|
1778
|
+
function z() {
|
|
1779
|
+
var P, W;
|
|
1780
|
+
n("close"), (P = O.value) == null || P.remove(), (W = t.destroy) == null || W.call(t), E.running = !1, E.ended = !0;
|
|
1781
|
+
}
|
|
1782
|
+
if (!w) {
|
|
1783
|
+
console.error("[maz-ui](vFullscreenImg) close animation is not defined"), z();
|
|
1784
|
+
return;
|
|
1785
|
+
}
|
|
1786
|
+
w.onfinish = z;
|
|
1688
1787
|
}
|
|
1689
|
-
function
|
|
1690
|
-
|
|
1788
|
+
function he() {
|
|
1789
|
+
g.value || m();
|
|
1691
1790
|
}
|
|
1692
|
-
return
|
|
1693
|
-
u.value = !0, document.addEventListener("keydown",
|
|
1694
|
-
}),
|
|
1695
|
-
document.removeEventListener("keydown",
|
|
1696
|
-
}), (
|
|
1791
|
+
return ue(() => {
|
|
1792
|
+
u.value = !0, document.addEventListener("keydown", j), window.addEventListener("resize", he), ne(), h.value = ce().length > 1;
|
|
1793
|
+
}), rt(() => {
|
|
1794
|
+
document.removeEventListener("keydown", j), window.removeEventListener("resize", he), G();
|
|
1795
|
+
}), (p, w) => (C(), _("div", {
|
|
1697
1796
|
ref_key: "FullscreenImgElement",
|
|
1698
|
-
ref:
|
|
1797
|
+
ref: O,
|
|
1699
1798
|
role: "button",
|
|
1700
1799
|
class: "m-fullscreen-img",
|
|
1701
1800
|
tabindex: "0",
|
|
1702
|
-
onClick:
|
|
1703
|
-
onKeypress:
|
|
1801
|
+
onClick: Y(D, ["stop"]),
|
|
1802
|
+
onKeypress: Nt(Y(D, ["prevent"]), ["esc"])
|
|
1704
1803
|
}, [
|
|
1705
|
-
|
|
1706
|
-
A(o),
|
|
1707
|
-
{ class: "m-fullscreen-img-loader maz-h-16" },
|
|
1708
|
-
null,
|
|
1709
|
-
512
|
|
1710
|
-
/* NEED_PATCH */
|
|
1711
|
-
), [
|
|
1712
|
-
[rt, u.value]
|
|
1713
|
-
]),
|
|
1714
|
-
l.value && h.value ? (L(), U("button", {
|
|
1804
|
+
l.value && h.value ? (C(), _("button", {
|
|
1715
1805
|
key: 0,
|
|
1716
1806
|
type: "button",
|
|
1717
1807
|
class: "m-fullscreen-btn --next",
|
|
1718
|
-
onClick: w[0] || (w[0] =
|
|
1808
|
+
onClick: w[0] || (w[0] = Y((z) => me("next"), ["stop"]))
|
|
1719
1809
|
}, [
|
|
1720
|
-
J(A(r), { class: "maz-rotate-180
|
|
1721
|
-
])) :
|
|
1722
|
-
l.value && h.value ? (
|
|
1810
|
+
J(A(r), { class: "maz-rotate-180" })
|
|
1811
|
+
])) : V("v-if", !0),
|
|
1812
|
+
l.value && h.value ? (C(), _("button", {
|
|
1723
1813
|
key: 1,
|
|
1724
1814
|
type: "button",
|
|
1725
1815
|
class: "m-fullscreen-btn --previous",
|
|
1726
|
-
onClick: w[1] || (w[1] =
|
|
1816
|
+
onClick: w[1] || (w[1] = Y((z) => me("previous"), ["stop"]))
|
|
1727
1817
|
}, [
|
|
1728
|
-
J(A(r)
|
|
1729
|
-
])) :
|
|
1730
|
-
|
|
1818
|
+
J(A(r))
|
|
1819
|
+
])) : V("v-if", !0),
|
|
1820
|
+
B("button", {
|
|
1731
1821
|
type: "button",
|
|
1732
1822
|
class: "m-fullscreen-btn --close",
|
|
1733
|
-
onClick:
|
|
1823
|
+
onClick: D
|
|
1734
1824
|
}, [
|
|
1735
|
-
J(A(i)
|
|
1825
|
+
J(A(i))
|
|
1736
1826
|
]),
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
H("img", {
|
|
1827
|
+
B("div", Bs, [
|
|
1828
|
+
B("img", {
|
|
1740
1829
|
ref_key: "ImgElement",
|
|
1741
|
-
ref:
|
|
1742
|
-
src:
|
|
1743
|
-
alt:
|
|
1830
|
+
ref: v,
|
|
1831
|
+
src: c.value,
|
|
1832
|
+
alt: y.value ?? void 0,
|
|
1744
1833
|
tabindex: "0",
|
|
1745
|
-
class:
|
|
1746
|
-
onLoad:
|
|
1747
|
-
onClick: w[2] || (w[2] =
|
|
1748
|
-
}, null, 42,
|
|
1834
|
+
class: le([$.value]),
|
|
1835
|
+
onLoad: L,
|
|
1836
|
+
onClick: w[2] || (w[2] = Y((z) => p.zoom && Pe(), ["stop"]))
|
|
1837
|
+
}, null, 42, Ns),
|
|
1838
|
+
at(J(
|
|
1839
|
+
A(o),
|
|
1840
|
+
{ class: "m-fullscreen-img-loader" },
|
|
1841
|
+
null,
|
|
1842
|
+
512
|
|
1843
|
+
/* NEED_PATCH */
|
|
1844
|
+
), [
|
|
1845
|
+
[lt, u.value]
|
|
1846
|
+
])
|
|
1749
1847
|
])
|
|
1750
|
-
], 40,
|
|
1848
|
+
], 40, Vs));
|
|
1751
1849
|
}
|
|
1752
|
-
}),
|
|
1850
|
+
}), Re = (s, e) => {
|
|
1753
1851
|
const t = s.__vccOpts || s;
|
|
1754
1852
|
for (const [n, o] of e)
|
|
1755
1853
|
t[n] = o;
|
|
1756
1854
|
return t;
|
|
1757
|
-
},
|
|
1758
|
-
class
|
|
1855
|
+
}, js = /* @__PURE__ */ Re(Fs, [["__scopeId", "data-v-b6e5fc28"]]), Je = "m-fullscreen-is-open";
|
|
1856
|
+
class Us {
|
|
1759
1857
|
constructor() {
|
|
1760
1858
|
d(this, "options");
|
|
1761
1859
|
d(this, "defaultOptions", {
|
|
@@ -1812,10 +1910,10 @@ class Vs {
|
|
|
1812
1910
|
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 = "";
|
|
1813
1911
|
}
|
|
1814
1912
|
renderPreview(e) {
|
|
1815
|
-
return e.classList.add(
|
|
1913
|
+
return e.classList.add(Je), We(js, {
|
|
1816
1914
|
props: {
|
|
1817
1915
|
...this.options,
|
|
1818
|
-
openInstanceClass:
|
|
1916
|
+
openInstanceClass: Je,
|
|
1819
1917
|
clickedElement: e,
|
|
1820
1918
|
clickedElementBounds: e.getBoundingClientRect()
|
|
1821
1919
|
},
|
|
@@ -1829,22 +1927,22 @@ class Vs {
|
|
|
1829
1927
|
e.style.zIndex = "1", this.options.scaleOnHover && (e.style.transform = "scale(1.04)"), this.options.blurOnHover && (e.style.filter = "blur(3px)");
|
|
1830
1928
|
}
|
|
1831
1929
|
}
|
|
1832
|
-
let
|
|
1833
|
-
const
|
|
1930
|
+
let ke;
|
|
1931
|
+
const _s = {
|
|
1834
1932
|
mounted(s, e) {
|
|
1835
|
-
return
|
|
1933
|
+
return ke = new Us(), ke.create(s, e);
|
|
1836
1934
|
},
|
|
1837
1935
|
updated(s, e) {
|
|
1838
|
-
return
|
|
1936
|
+
return ke.update(s, e);
|
|
1839
1937
|
},
|
|
1840
1938
|
unmounted(s) {
|
|
1841
|
-
return
|
|
1939
|
+
return ke.remove(s);
|
|
1842
1940
|
}
|
|
1843
|
-
},
|
|
1941
|
+
}, qs = {
|
|
1844
1942
|
install(s) {
|
|
1845
|
-
s.directive("fullscreen-img",
|
|
1943
|
+
s.directive("fullscreen-img", _s);
|
|
1846
1944
|
}
|
|
1847
|
-
},
|
|
1945
|
+
}, Ws = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", je = {
|
|
1848
1946
|
baseClass: "m-lazy-img",
|
|
1849
1947
|
loadedClass: "m-lazy-loaded",
|
|
1850
1948
|
loadingClass: "m-lazy-loading",
|
|
@@ -1858,10 +1956,10 @@ const Bs = {
|
|
|
1858
1956
|
threshold: 0.1
|
|
1859
1957
|
}
|
|
1860
1958
|
};
|
|
1861
|
-
class
|
|
1959
|
+
class At {
|
|
1862
1960
|
constructor(e = {}) {
|
|
1863
1961
|
d(this, "observers", []);
|
|
1864
|
-
d(this, "defaultOptions",
|
|
1962
|
+
d(this, "defaultOptions", je);
|
|
1865
1963
|
d(this, "options");
|
|
1866
1964
|
d(this, "onImgLoadedCallback");
|
|
1867
1965
|
d(this, "onImgErrorCallback");
|
|
@@ -1999,7 +2097,7 @@ class Ct {
|
|
|
1999
2097
|
async add(e, t) {
|
|
2000
2098
|
if (this.hasBgImgMode(t) && this.isPictureElement(e))
|
|
2001
2099
|
throw new Error(`[MazLazyImg] You can't use the "bg-image" mode with "<picture />" element`);
|
|
2002
|
-
setTimeout(() => this.setBaseClass(e), 0), e.getAttribute("src") || this.setImgSrc(e,
|
|
2100
|
+
setTimeout(() => this.setBaseClass(e), 0), e.getAttribute("src") || this.setImgSrc(e, Ws), await this.bindUpdateHandler(e, t, "bind");
|
|
2003
2101
|
}
|
|
2004
2102
|
async update(e, t) {
|
|
2005
2103
|
t.value !== t.oldValue && (this.hasImgLoaded = !1, this.removeAllStateClasses(e), await this.bindUpdateHandler(e, t, "update"));
|
|
@@ -2011,35 +2109,35 @@ class Ct {
|
|
|
2011
2109
|
this.observers = [];
|
|
2012
2110
|
}
|
|
2013
2111
|
}
|
|
2014
|
-
let
|
|
2015
|
-
const
|
|
2112
|
+
let Ae;
|
|
2113
|
+
const ro = {
|
|
2016
2114
|
created(s, e) {
|
|
2017
2115
|
const t = typeof e.value == "object" ? e.value : {};
|
|
2018
|
-
|
|
2116
|
+
Ae = new At(t), Ae.add(s, e);
|
|
2019
2117
|
},
|
|
2020
2118
|
updated(s, e) {
|
|
2021
|
-
|
|
2119
|
+
Ae.update(s, e);
|
|
2022
2120
|
},
|
|
2023
2121
|
unmounted(s, e) {
|
|
2024
|
-
|
|
2122
|
+
Ae.remove(s, e);
|
|
2025
2123
|
}
|
|
2026
|
-
},
|
|
2124
|
+
}, Rs = {
|
|
2027
2125
|
install(s, e = {}) {
|
|
2028
2126
|
const t = {
|
|
2029
|
-
...
|
|
2127
|
+
...je,
|
|
2030
2128
|
...e,
|
|
2031
2129
|
observerOptions: {
|
|
2032
|
-
...
|
|
2130
|
+
...je.observerOptions,
|
|
2033
2131
|
...e.observerOptions
|
|
2034
2132
|
}
|
|
2035
|
-
}, n = new
|
|
2133
|
+
}, n = new At(t);
|
|
2036
2134
|
s.directive("lazy-img", {
|
|
2037
2135
|
created: n.add.bind(n),
|
|
2038
2136
|
updated: n.update.bind(n),
|
|
2039
2137
|
unmounted: n.remove.bind(n)
|
|
2040
2138
|
});
|
|
2041
2139
|
}
|
|
2042
|
-
},
|
|
2140
|
+
}, Ks = `
|
|
2043
2141
|
.maz-zoom-img {
|
|
2044
2142
|
position: fixed;
|
|
2045
2143
|
top: 0;
|
|
@@ -2162,13 +2260,13 @@ const Jn = {
|
|
|
2162
2260
|
|
|
2163
2261
|
.maz-zoom-img .maz-zoom-btn:hover {
|
|
2164
2262
|
background-color: hsl(0, 0%, 0%);
|
|
2165
|
-
}`,
|
|
2263
|
+
}`, et = {
|
|
2166
2264
|
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>',
|
|
2167
2265
|
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>',
|
|
2168
2266
|
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>',
|
|
2169
2267
|
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>'
|
|
2170
2268
|
};
|
|
2171
|
-
class
|
|
2269
|
+
class Ys {
|
|
2172
2270
|
constructor(e) {
|
|
2173
2271
|
d(this, "options");
|
|
2174
2272
|
d(this, "loader");
|
|
@@ -2215,7 +2313,7 @@ class _s {
|
|
|
2215
2313
|
e.classList.add(
|
|
2216
2314
|
"maz-is-open"
|
|
2217
2315
|
/* OPEN */
|
|
2218
|
-
), this.addStyle(
|
|
2316
|
+
), this.addStyle(Ks);
|
|
2219
2317
|
const n = document.createElement("div");
|
|
2220
2318
|
n.classList.add("maz-zoom-img"), n.setAttribute("id", "MazImgPreviewFullsize"), n.addEventListener("click", (o) => {
|
|
2221
2319
|
n.isEqualNode(o.target) && this.closePreview();
|
|
@@ -2236,7 +2334,7 @@ class _s {
|
|
|
2236
2334
|
}
|
|
2237
2335
|
getLoader() {
|
|
2238
2336
|
const e = document.createElement("div");
|
|
2239
|
-
return e.classList.add("maz-zoom-img__loader"), e.innerHTML =
|
|
2337
|
+
return e.classList.add("maz-zoom-img__loader"), e.innerHTML = et.spinner, e;
|
|
2240
2338
|
}
|
|
2241
2339
|
mouseLeave(e) {
|
|
2242
2340
|
this.options.scale && (e.style.transform = ""), this.options.blur && (e.style.filter = ""), e.style.zIndex = "";
|
|
@@ -2249,7 +2347,7 @@ class _s {
|
|
|
2249
2347
|
}
|
|
2250
2348
|
getButton(e = "close") {
|
|
2251
2349
|
const t = document.createElement("button");
|
|
2252
|
-
t.innerHTML =
|
|
2350
|
+
t.innerHTML = et[e];
|
|
2253
2351
|
const n = e === "close" ? this.closePreview() : this.allInstances ? this.nextPreviousImage(e === "next") : null;
|
|
2254
2352
|
return t.addEventListener("click", () => n), t.classList.add("maz-zoom-btn"), t.classList.add(`maz-zoom-btn--${e}`), t;
|
|
2255
2353
|
}
|
|
@@ -2302,47 +2400,47 @@ class _s {
|
|
|
2302
2400
|
this.img.removeEventListener("load", this.onImgLoadedCallback);
|
|
2303
2401
|
}
|
|
2304
2402
|
}
|
|
2305
|
-
let
|
|
2306
|
-
const
|
|
2403
|
+
let Se;
|
|
2404
|
+
const Zs = {
|
|
2307
2405
|
created(s, e) {
|
|
2308
|
-
|
|
2406
|
+
Se = new Ys(e), Se.create(s);
|
|
2309
2407
|
},
|
|
2310
2408
|
updated(s, e) {
|
|
2311
|
-
|
|
2409
|
+
Se.update(e);
|
|
2312
2410
|
},
|
|
2313
2411
|
unmounted(s) {
|
|
2314
|
-
|
|
2412
|
+
Se.remove(s);
|
|
2315
2413
|
}
|
|
2316
|
-
},
|
|
2414
|
+
}, Xs = {
|
|
2317
2415
|
install(s) {
|
|
2318
|
-
s.directive("zoom-img",
|
|
2319
|
-
}
|
|
2320
|
-
},
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
],
|
|
2416
|
+
s.directive("zoom-img", Zs);
|
|
2417
|
+
}
|
|
2418
|
+
}, Gs = [
|
|
2419
|
+
Ps,
|
|
2420
|
+
Xs,
|
|
2421
|
+
Rs,
|
|
2422
|
+
Ss,
|
|
2423
|
+
qs,
|
|
2424
|
+
Ms
|
|
2425
|
+
], ao = {
|
|
2328
2426
|
install(s) {
|
|
2329
|
-
for (const e of
|
|
2427
|
+
for (const e of Gs)
|
|
2330
2428
|
e.install(s, {});
|
|
2331
2429
|
}
|
|
2332
2430
|
};
|
|
2333
|
-
function
|
|
2431
|
+
function Qs(s) {
|
|
2334
2432
|
return s ? (s = s.toString(), s.charAt(0).toUpperCase() + s.slice(1)) : "";
|
|
2335
2433
|
}
|
|
2336
|
-
const
|
|
2434
|
+
const Js = {
|
|
2337
2435
|
style: "currency",
|
|
2338
2436
|
minimumFractionDigits: 2,
|
|
2339
2437
|
round: !1
|
|
2340
2438
|
};
|
|
2341
|
-
function
|
|
2439
|
+
function en(s, e, t) {
|
|
2342
2440
|
let n = Number(s);
|
|
2343
2441
|
return t.round && (n = Math.floor(n), t.minimumFractionDigits = 0), new Intl.NumberFormat(e, t).format(n);
|
|
2344
2442
|
}
|
|
2345
|
-
function
|
|
2443
|
+
function tn(s, e, t) {
|
|
2346
2444
|
if (s === void 0)
|
|
2347
2445
|
throw new TypeError("[maz-ui](FilterCurrency) The `number` attribute is required.");
|
|
2348
2446
|
if (e === void 0)
|
|
@@ -2352,29 +2450,29 @@ function Xs(s, e, t) {
|
|
|
2352
2450
|
if (t.currency === void 0)
|
|
2353
2451
|
throw new TypeError("[maz-ui](FilterCurrency) The `options.currency` attribute is required.");
|
|
2354
2452
|
}
|
|
2355
|
-
function
|
|
2453
|
+
function sn(s, e, t) {
|
|
2356
2454
|
const n = {
|
|
2357
|
-
...
|
|
2455
|
+
...Js,
|
|
2358
2456
|
...t
|
|
2359
2457
|
};
|
|
2360
|
-
|
|
2458
|
+
tn(s, e, n);
|
|
2361
2459
|
try {
|
|
2362
|
-
return
|
|
2460
|
+
return en(s, e, n);
|
|
2363
2461
|
} catch (o) {
|
|
2364
2462
|
throw new Error(`[maz-ui](FilterCurrency) ${o}`);
|
|
2365
2463
|
}
|
|
2366
2464
|
}
|
|
2367
|
-
const
|
|
2465
|
+
const nn = {
|
|
2368
2466
|
month: "short",
|
|
2369
2467
|
day: "numeric",
|
|
2370
2468
|
year: "numeric"
|
|
2371
2469
|
};
|
|
2372
|
-
function
|
|
2470
|
+
function on(s, e, t) {
|
|
2373
2471
|
if (e === void 0)
|
|
2374
2472
|
throw new TypeError("[maz-ui](FilterDate) The `locale` attribute is required.");
|
|
2375
2473
|
if (typeof e != "string")
|
|
2376
2474
|
throw new TypeError("[maz-ui](FilterDate) The `locale` attribute must be a string.");
|
|
2377
|
-
const n = t ??
|
|
2475
|
+
const n = t ?? nn;
|
|
2378
2476
|
try {
|
|
2379
2477
|
const o = s instanceof Date ? s : new Date(s);
|
|
2380
2478
|
return new Intl.DateTimeFormat(e, n).format(o);
|
|
@@ -2382,12 +2480,12 @@ function Js(s, e, t) {
|
|
|
2382
2480
|
throw new Error(`[maz-ui](FilterDate) ${o}`);
|
|
2383
2481
|
}
|
|
2384
2482
|
}
|
|
2385
|
-
const
|
|
2483
|
+
const rn = {
|
|
2386
2484
|
minimumFractionDigits: 2
|
|
2387
2485
|
};
|
|
2388
|
-
function
|
|
2486
|
+
function an(s, e, t) {
|
|
2389
2487
|
const n = {
|
|
2390
|
-
...
|
|
2488
|
+
...rn,
|
|
2391
2489
|
...t
|
|
2392
2490
|
};
|
|
2393
2491
|
if (s === void 0)
|
|
@@ -2402,86 +2500,16 @@ function tn(s, e, t) {
|
|
|
2402
2500
|
throw new Error(`[maz-ui](FilterNumber) ${o}`);
|
|
2403
2501
|
}
|
|
2404
2502
|
}
|
|
2405
|
-
const
|
|
2406
|
-
capitalize:
|
|
2407
|
-
currency:
|
|
2408
|
-
date:
|
|
2409
|
-
number:
|
|
2410
|
-
},
|
|
2503
|
+
const ln = {
|
|
2504
|
+
capitalize: Qs,
|
|
2505
|
+
currency: sn,
|
|
2506
|
+
date: on,
|
|
2507
|
+
number: an
|
|
2508
|
+
}, lo = {
|
|
2411
2509
|
install(s) {
|
|
2412
|
-
s.provide("filters",
|
|
2413
|
-
}
|
|
2414
|
-
};
|
|
2415
|
-
function nn(s) {
|
|
2416
|
-
return !!s;
|
|
2417
|
-
}
|
|
2418
|
-
function so(s) {
|
|
2419
|
-
return [...s].map((e) => {
|
|
2420
|
-
const t = e.codePointAt(0);
|
|
2421
|
-
return t ? t % 32 + 127461 : void 0;
|
|
2422
|
-
}).filter(nn).map((e) => String.fromCodePoint(e)).join("");
|
|
2423
|
-
}
|
|
2424
|
-
function no(s, e) {
|
|
2425
|
-
let t;
|
|
2426
|
-
return function(...n) {
|
|
2427
|
-
clearTimeout(t), t = setTimeout(() => {
|
|
2428
|
-
s.apply(this, n);
|
|
2429
|
-
}, e);
|
|
2430
|
-
};
|
|
2431
|
-
}
|
|
2432
|
-
class oo {
|
|
2433
|
-
constructor({ src: e, identifier: t, once: n = !0, async: o = !0, defer: i = !0 }) {
|
|
2434
|
-
d(this, "src");
|
|
2435
|
-
d(this, "script");
|
|
2436
|
-
d(this, "once");
|
|
2437
|
-
d(this, "async");
|
|
2438
|
-
d(this, "defer");
|
|
2439
|
-
d(this, "identifier");
|
|
2440
|
-
if (typeof window > "u")
|
|
2441
|
-
throw new TypeError("[ScriptLoader]: Is supported only on browser side");
|
|
2442
|
-
if (!e)
|
|
2443
|
-
throw new Error('[ScriptLoader]: You should provide the attribut "src"');
|
|
2444
|
-
if (!t)
|
|
2445
|
-
throw new Error('[ScriptLoader]: You should provide the attribut "identifier"');
|
|
2446
|
-
this.src = e, this.identifier = t, this.once = n, this.async = o, this.defer = i;
|
|
2510
|
+
s.provide("filters", ln);
|
|
2447
2511
|
}
|
|
2448
|
-
|
|
2449
|
-
var t;
|
|
2450
|
-
typeof e == "string" ? (t = document.head.querySelector(`[data-identifier="${e}"]`)) == null || t.remove() : e.remove();
|
|
2451
|
-
}
|
|
2452
|
-
load() {
|
|
2453
|
-
const e = window, t = document.head.querySelectorAll(`[data-identifier="${this.identifier}"]`);
|
|
2454
|
-
if (this.once && e[this.identifier] && t.length > 0)
|
|
2455
|
-
return this.script = e[this.identifier], Promise.resolve(this.script);
|
|
2456
|
-
if (!this.once && t.length > 0)
|
|
2457
|
-
for (const n of t)
|
|
2458
|
-
this.removeTag(n);
|
|
2459
|
-
return this.injectScript();
|
|
2460
|
-
}
|
|
2461
|
-
injectScript() {
|
|
2462
|
-
const e = window;
|
|
2463
|
-
return new Promise((t, n) => {
|
|
2464
|
-
try {
|
|
2465
|
-
const o = document.createElement("script");
|
|
2466
|
-
o.src = this.src, o.async = this.async, o.defer = this.defer, o.dataset.identifier = this.identifier, o.addEventListener("error", (i) => n(new Error(`[ScriptLoader](injectScript) ${i.message}`))), o.addEventListener("load", (i) => (this.script = i, e[this.identifier] = i, t(i))), document.head.append(o);
|
|
2467
|
-
} catch (o) {
|
|
2468
|
-
throw new Error(`[ScriptLoader](init) ${o}`);
|
|
2469
|
-
}
|
|
2470
|
-
});
|
|
2471
|
-
}
|
|
2472
|
-
}
|
|
2473
|
-
function on(s) {
|
|
2474
|
-
return new Promise((e) => setTimeout(e, s));
|
|
2475
|
-
}
|
|
2476
|
-
function io(s, e) {
|
|
2477
|
-
let t = !1, n, o;
|
|
2478
|
-
return function(...i) {
|
|
2479
|
-
t ? (clearTimeout(n), n = setTimeout(() => {
|
|
2480
|
-
Date.now() - o >= e && (s.apply(this, i), o = Date.now());
|
|
2481
|
-
}, Math.max(e - (Date.now() - o), 0))) : (s.apply(this, i), o = Date.now(), t = !0);
|
|
2482
|
-
};
|
|
2483
|
-
}
|
|
2484
|
-
const He = {
|
|
2512
|
+
}, Be = {
|
|
2485
2513
|
delay: 100,
|
|
2486
2514
|
observer: {
|
|
2487
2515
|
root: void 0,
|
|
@@ -2494,17 +2522,17 @@ const He = {
|
|
|
2494
2522
|
delay: 0
|
|
2495
2523
|
}
|
|
2496
2524
|
};
|
|
2497
|
-
class
|
|
2525
|
+
class un {
|
|
2498
2526
|
constructor(e) {
|
|
2499
2527
|
d(this, "options");
|
|
2500
2528
|
this.options = {
|
|
2501
|
-
delay: (e == null ? void 0 : e.delay) ??
|
|
2529
|
+
delay: (e == null ? void 0 : e.delay) ?? Be.delay,
|
|
2502
2530
|
observer: {
|
|
2503
|
-
...
|
|
2531
|
+
...Be.observer,
|
|
2504
2532
|
...e == null ? void 0 : e.observer
|
|
2505
2533
|
},
|
|
2506
2534
|
animation: {
|
|
2507
|
-
...
|
|
2535
|
+
...Be.animation,
|
|
2508
2536
|
...e == null ? void 0 : e.animation
|
|
2509
2537
|
}
|
|
2510
2538
|
};
|
|
@@ -2522,10 +2550,10 @@ class rn {
|
|
|
2522
2550
|
for (const a of r) {
|
|
2523
2551
|
const u = a.getAttribute("data-maz-aos-once"), l = typeof u == "string" ? u === "true" : this.options.animation.once;
|
|
2524
2552
|
if (typeof this.options.observer.threshold == "number" && n.intersectionRatio > this.options.observer.threshold) {
|
|
2525
|
-
const h = a.getAttribute("data-maz-aos-duration"),
|
|
2553
|
+
const h = a.getAttribute("data-maz-aos-duration"), g = a.getAttribute("data-maz-aos-delay");
|
|
2526
2554
|
if (h || (a.style.transitionDuration = `${this.options.animation.duration}ms`, setTimeout(() => {
|
|
2527
2555
|
a.style.transitionDuration = "0";
|
|
2528
|
-
}, 1e3)),
|
|
2556
|
+
}, 1e3)), g || (a.style.transitionDelay = `${this.options.animation.delay}ms`, setTimeout(() => {
|
|
2529
2557
|
a.style.transitionDelay = "0";
|
|
2530
2558
|
}, 1e3)), a.classList.add("maz-aos-animate"), l) {
|
|
2531
2559
|
const E = a.getAttribute("data-maz-aos-anchor");
|
|
@@ -2541,7 +2569,7 @@ class rn {
|
|
|
2541
2569
|
}
|
|
2542
2570
|
}
|
|
2543
2571
|
async handleObserver() {
|
|
2544
|
-
await
|
|
2572
|
+
await Hs(this.options.delay);
|
|
2545
2573
|
const e = new IntersectionObserver(this.handleIntersect.bind(this), this.options.observer);
|
|
2546
2574
|
for (const t of document.querySelectorAll("[data-maz-aos]")) {
|
|
2547
2575
|
const n = t.getAttribute("data-maz-aos-anchor");
|
|
@@ -2558,18 +2586,18 @@ class rn {
|
|
|
2558
2586
|
console.warn("[MazAos](runAnimations) should be executed on client side");
|
|
2559
2587
|
}
|
|
2560
2588
|
}
|
|
2561
|
-
let
|
|
2562
|
-
const
|
|
2589
|
+
let ve;
|
|
2590
|
+
const uo = {
|
|
2563
2591
|
install: (s, e) => {
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
}) :
|
|
2592
|
+
ve = new un(e), s.provide("aos", ve), F() && (e != null && e.router ? e.router.afterEach(async () => {
|
|
2593
|
+
ve.runAnimations();
|
|
2594
|
+
}) : ve.runAnimations());
|
|
2567
2595
|
}
|
|
2568
2596
|
};
|
|
2569
|
-
function
|
|
2570
|
-
return
|
|
2597
|
+
function co() {
|
|
2598
|
+
return ve;
|
|
2571
2599
|
}
|
|
2572
|
-
const
|
|
2600
|
+
const tt = "--backdrop-present", cn = /* @__PURE__ */ ge({
|
|
2573
2601
|
inheritAttrs: !1,
|
|
2574
2602
|
__name: "MazBackdrop",
|
|
2575
2603
|
props: {
|
|
@@ -2586,24 +2614,24 @@ const Je = "--backdrop-present", an = /* @__PURE__ */ ve({
|
|
|
2586
2614
|
setup(s, { expose: e, emit: t }) {
|
|
2587
2615
|
const n = s, o = t;
|
|
2588
2616
|
function i() {
|
|
2589
|
-
document.documentElement.classList.add(
|
|
2617
|
+
document.documentElement.classList.add(tt);
|
|
2590
2618
|
}
|
|
2591
2619
|
async function r() {
|
|
2592
|
-
document.querySelector(".m-backdrop.--present") || document.documentElement.classList.remove(
|
|
2620
|
+
document.querySelector(".m-backdrop.--present") || document.documentElement.classList.remove(tt);
|
|
2593
2621
|
}
|
|
2594
|
-
const a =
|
|
2622
|
+
const a = b(n.modelValue);
|
|
2595
2623
|
function u() {
|
|
2596
2624
|
l(!1);
|
|
2597
2625
|
}
|
|
2598
2626
|
async function l(c) {
|
|
2599
|
-
var
|
|
2600
|
-
c || (o("before-close"), await ((
|
|
2627
|
+
var y;
|
|
2628
|
+
c || (o("before-close"), await ((y = n.beforeClose) == null ? void 0 : y.call(n))), a.value = c;
|
|
2601
2629
|
}
|
|
2602
2630
|
function h() {
|
|
2603
2631
|
o("open");
|
|
2604
2632
|
}
|
|
2605
|
-
function
|
|
2606
|
-
o("update:model-value", !1), o("close"),
|
|
2633
|
+
function g() {
|
|
2634
|
+
o("update:model-value", !1), o("close"), I();
|
|
2607
2635
|
}
|
|
2608
2636
|
function E() {
|
|
2609
2637
|
n.persistent || u();
|
|
@@ -2611,56 +2639,56 @@ const Je = "--backdrop-present", an = /* @__PURE__ */ ve({
|
|
|
2611
2639
|
function T(c) {
|
|
2612
2640
|
!n.noCloseOnEscKey && c.key === "Escape" && !n.persistent && u();
|
|
2613
2641
|
}
|
|
2614
|
-
function
|
|
2642
|
+
function M() {
|
|
2615
2643
|
i(), document.addEventListener("keyup", T, !1);
|
|
2616
2644
|
}
|
|
2617
|
-
function
|
|
2645
|
+
function I() {
|
|
2618
2646
|
document.removeEventListener("keyup", T), r();
|
|
2619
2647
|
}
|
|
2620
|
-
return
|
|
2621
|
-
n.modelValue ?
|
|
2622
|
-
}),
|
|
2648
|
+
return ue(() => {
|
|
2649
|
+
n.modelValue ? M() : I();
|
|
2650
|
+
}), X(
|
|
2623
2651
|
() => n.modelValue,
|
|
2624
2652
|
(c) => {
|
|
2625
|
-
a.value = c, c ?
|
|
2653
|
+
a.value = c, c ? M() : I();
|
|
2626
2654
|
}
|
|
2627
2655
|
), e({
|
|
2628
2656
|
onBackdropAnimationEnter: h,
|
|
2629
|
-
onBackdropAnimationLeave:
|
|
2657
|
+
onBackdropAnimationLeave: g,
|
|
2630
2658
|
onBackdropClicked: E,
|
|
2631
2659
|
close: u,
|
|
2632
2660
|
present: a,
|
|
2633
2661
|
toggleModal: l,
|
|
2634
2662
|
onKeyPress: T
|
|
2635
|
-
}), (c,
|
|
2636
|
-
J(
|
|
2663
|
+
}), (c, y) => (C(), N(Ft, { to: c.teleportSelector }, [
|
|
2664
|
+
J(ut, {
|
|
2637
2665
|
appear: "",
|
|
2638
2666
|
name: c.transitionName,
|
|
2639
2667
|
onAfterEnter: h,
|
|
2640
|
-
onAfterLeave:
|
|
2668
|
+
onAfterLeave: g
|
|
2641
2669
|
}, {
|
|
2642
|
-
default:
|
|
2643
|
-
a.value ? (
|
|
2670
|
+
default: U(() => [
|
|
2671
|
+
a.value ? (C(), _(
|
|
2644
2672
|
"div",
|
|
2645
2673
|
{
|
|
2646
2674
|
key: 0,
|
|
2647
|
-
class:
|
|
2675
|
+
class: le(["m-backdrop --present", [c.backdropClass]]),
|
|
2648
2676
|
tabindex: "-1",
|
|
2649
2677
|
role: "dialog"
|
|
2650
2678
|
},
|
|
2651
2679
|
[
|
|
2652
|
-
|
|
2680
|
+
B(
|
|
2653
2681
|
"button",
|
|
2654
2682
|
{
|
|
2655
|
-
class:
|
|
2683
|
+
class: le(["m-backdrop-overlay", { "--disabled": c.persistent }]),
|
|
2656
2684
|
tabindex: "-1",
|
|
2657
|
-
onClick:
|
|
2685
|
+
onClick: Y(E, ["self"])
|
|
2658
2686
|
},
|
|
2659
2687
|
null,
|
|
2660
2688
|
2
|
|
2661
2689
|
/* CLASS */
|
|
2662
2690
|
),
|
|
2663
|
-
|
|
2691
|
+
B(
|
|
2664
2692
|
"div",
|
|
2665
2693
|
ee({
|
|
2666
2694
|
class: ["m-backdrop-content", c.backdropContentClass]
|
|
@@ -2677,24 +2705,24 @@ const Je = "--backdrop-present", an = /* @__PURE__ */ ve({
|
|
|
2677
2705
|
],
|
|
2678
2706
|
2
|
|
2679
2707
|
/* CLASS */
|
|
2680
|
-
)) :
|
|
2708
|
+
)) : V("v-if", !0)
|
|
2681
2709
|
]),
|
|
2682
2710
|
_: 3
|
|
2683
2711
|
/* FORWARDED */
|
|
2684
2712
|
}, 8, ["name"])
|
|
2685
2713
|
], 8, ["to"]));
|
|
2686
2714
|
}
|
|
2687
|
-
}),
|
|
2715
|
+
}), dn = {
|
|
2688
2716
|
key: 0,
|
|
2689
2717
|
id: "dialogTitle",
|
|
2690
2718
|
class: "maz-my-0 maz-text-xl maz-font-semibold"
|
|
2691
|
-
},
|
|
2719
|
+
}, mn = {
|
|
2692
2720
|
id: "dialogDesc",
|
|
2693
2721
|
class: "m-dialog-content"
|
|
2694
|
-
},
|
|
2722
|
+
}, fn = {
|
|
2695
2723
|
key: 0,
|
|
2696
2724
|
class: "m-dialog-footer"
|
|
2697
|
-
},
|
|
2725
|
+
}, hn = /* @__PURE__ */ ge({
|
|
2698
2726
|
__name: "MazDialog",
|
|
2699
2727
|
props: {
|
|
2700
2728
|
modelValue: { type: Boolean },
|
|
@@ -2714,7 +2742,7 @@ const Je = "--backdrop-present", an = /* @__PURE__ */ ve({
|
|
|
2714
2742
|
},
|
|
2715
2743
|
emits: ["open", "close", "update:model-value"],
|
|
2716
2744
|
setup(s, { expose: e }) {
|
|
2717
|
-
const t = s, n =
|
|
2745
|
+
const t = s, n = H(() => import("./MazBtn-Dsr06Zgg.mjs")), o = H(() => import("./x-mark-CnZwVvA7.mjs")), i = jt(), r = b();
|
|
2718
2746
|
e({
|
|
2719
2747
|
close: () => {
|
|
2720
2748
|
var l, h;
|
|
@@ -2729,7 +2757,7 @@ const Je = "--backdrop-present", an = /* @__PURE__ */ ve({
|
|
|
2729
2757
|
class: i.class,
|
|
2730
2758
|
style: i.style
|
|
2731
2759
|
}));
|
|
2732
|
-
return (l, h) => (
|
|
2760
|
+
return (l, h) => (C(), N(cn, ee({ ...a.value, ...t }, {
|
|
2733
2761
|
ref_key: "backdrop",
|
|
2734
2762
|
ref: r,
|
|
2735
2763
|
persistent: l.persistent,
|
|
@@ -2737,12 +2765,12 @@ const Je = "--backdrop-present", an = /* @__PURE__ */ ve({
|
|
|
2737
2765
|
"transition-name": "modal-anim",
|
|
2738
2766
|
"aria-labelledby": "dialogTitle",
|
|
2739
2767
|
"aria-describedby": "dialogDesc",
|
|
2740
|
-
onClose: h[0] || (h[0] = (
|
|
2741
|
-
onOpen: h[1] || (h[1] = (
|
|
2742
|
-
"onUpdate:modelValue": h[2] || (h[2] = (
|
|
2768
|
+
onClose: h[0] || (h[0] = (g) => l.$emit("close", g)),
|
|
2769
|
+
onOpen: h[1] || (h[1] = (g) => l.$emit("open", g)),
|
|
2770
|
+
"onUpdate:modelValue": h[2] || (h[2] = (g) => l.$emit("update:model-value", g))
|
|
2743
2771
|
}), {
|
|
2744
|
-
default:
|
|
2745
|
-
|
|
2772
|
+
default: U(({ close: g }) => [
|
|
2773
|
+
B(
|
|
2746
2774
|
"div",
|
|
2747
2775
|
ee({
|
|
2748
2776
|
class: ["m-dialog", { "--scrollable": l.scrollable }],
|
|
@@ -2751,56 +2779,41 @@ const Je = "--backdrop-present", an = /* @__PURE__ */ ve({
|
|
|
2751
2779
|
style: [{ width: l.width, maxWidth: l.maxWidth, maxHeight: l.maxHeight }]
|
|
2752
2780
|
}, u.value),
|
|
2753
2781
|
[
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
@binding {Function} close close function
|
|
2757
|
-
`),
|
|
2758
|
-
q(l.$slots, "header", { close: p }, () => [
|
|
2759
|
-
H(
|
|
2782
|
+
q(l.$slots, "header", { close: g }, () => [
|
|
2783
|
+
B(
|
|
2760
2784
|
"div",
|
|
2761
2785
|
{
|
|
2762
|
-
class:
|
|
2786
|
+
class: le(["m-dialog-header", { "--has-title": l.$slots.title || l.title }])
|
|
2763
2787
|
},
|
|
2764
2788
|
[
|
|
2765
|
-
l.$slots.title || l.title ? (
|
|
2766
|
-
C(`
|
|
2767
|
-
@slot Title slot in the header
|
|
2768
|
-
`),
|
|
2789
|
+
l.$slots.title || l.title ? (C(), _("h2", dn, [
|
|
2769
2790
|
q(l.$slots, "title", {}, () => [
|
|
2770
2791
|
Q(
|
|
2771
|
-
|
|
2792
|
+
Z(l.title),
|
|
2772
2793
|
1
|
|
2773
2794
|
/* TEXT */
|
|
2774
2795
|
)
|
|
2775
2796
|
], !0)
|
|
2776
|
-
])) :
|
|
2777
|
-
!l.noClose && !l.persistent ? (
|
|
2797
|
+
])) : V("v-if", !0),
|
|
2798
|
+
!l.noClose && !l.persistent ? (C(), N(A(n), {
|
|
2778
2799
|
key: 1,
|
|
2779
2800
|
class: "m-dialog-closebtn",
|
|
2780
2801
|
color: "transparent",
|
|
2781
2802
|
size: "sm",
|
|
2782
2803
|
icon: A(o),
|
|
2783
|
-
onClick:
|
|
2784
|
-
}, null, 8, ["icon", "onClick"])) :
|
|
2804
|
+
onClick: g
|
|
2805
|
+
}, null, 8, ["icon", "onClick"])) : V("v-if", !0)
|
|
2785
2806
|
],
|
|
2786
2807
|
2
|
|
2787
2808
|
/* CLASS */
|
|
2788
2809
|
)
|
|
2789
2810
|
], !0),
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
@slot Default content
|
|
2793
|
-
@binding {Function} close close function
|
|
2794
|
-
`),
|
|
2795
|
-
q(l.$slots, "default", { close: p }, void 0, !0)
|
|
2811
|
+
B("div", mn, [
|
|
2812
|
+
q(l.$slots, "default", { close: g }, void 0, !0)
|
|
2796
2813
|
]),
|
|
2797
|
-
l.$slots.footer ? (
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
@binding {Function} close close function
|
|
2801
|
-
`),
|
|
2802
|
-
q(l.$slots, "footer", { close: p }, void 0, !0)
|
|
2803
|
-
])) : C("v-if", !0)
|
|
2814
|
+
l.$slots.footer ? (C(), _("div", fn, [
|
|
2815
|
+
q(l.$slots, "footer", { close: g }, void 0, !0)
|
|
2816
|
+
])) : V("v-if", !0)
|
|
2804
2817
|
],
|
|
2805
2818
|
16
|
|
2806
2819
|
/* FULL_PROPS */
|
|
@@ -2810,7 +2823,7 @@ const Je = "--backdrop-present", an = /* @__PURE__ */ ve({
|
|
|
2810
2823
|
/* FORWARDED */
|
|
2811
2824
|
}, 16, ["persistent", "model-value"]));
|
|
2812
2825
|
}
|
|
2813
|
-
}),
|
|
2826
|
+
}), vn = /* @__PURE__ */ Re(hn, [["__scopeId", "data-v-50775b17"]]), ie = {
|
|
2814
2827
|
cancelText: "Cancel",
|
|
2815
2828
|
confirmText: "Confirm",
|
|
2816
2829
|
cancelButton: {
|
|
@@ -2821,8 +2834,8 @@ const Je = "--backdrop-present", an = /* @__PURE__ */ ve({
|
|
|
2821
2834
|
text: "Confirm",
|
|
2822
2835
|
color: "success"
|
|
2823
2836
|
}
|
|
2824
|
-
},
|
|
2825
|
-
function
|
|
2837
|
+
}, pn = b(ie), re = b([]);
|
|
2838
|
+
function gn(s, e) {
|
|
2826
2839
|
return new Promise((t, n) => {
|
|
2827
2840
|
re.value = [
|
|
2828
2841
|
...re.value,
|
|
@@ -2839,26 +2852,26 @@ function hn(s, e) {
|
|
|
2839
2852
|
];
|
|
2840
2853
|
});
|
|
2841
2854
|
}
|
|
2842
|
-
function
|
|
2855
|
+
function St(s) {
|
|
2843
2856
|
return re.value = re.value.filter(({ id: e }) => e !== s), re.value;
|
|
2844
2857
|
}
|
|
2845
|
-
function
|
|
2858
|
+
function st(s, e, t) {
|
|
2846
2859
|
var n;
|
|
2847
2860
|
e && ((n = e[s]) == null || n.call(e, t), e.isActive = !1, setTimeout(() => {
|
|
2848
|
-
|
|
2861
|
+
St(e.id);
|
|
2849
2862
|
}, 500));
|
|
2850
2863
|
}
|
|
2851
|
-
function
|
|
2864
|
+
function xt() {
|
|
2852
2865
|
return {
|
|
2853
|
-
data:
|
|
2866
|
+
data: pn,
|
|
2854
2867
|
dialogState: re,
|
|
2855
|
-
showDialogAndWaitChoice:
|
|
2856
|
-
removeDialogFromState:
|
|
2857
|
-
rejectDialog: async (s, e = new Error("cancel"), t) => (await (t == null ? void 0 : t()),
|
|
2858
|
-
resolveDialog: async (s, e = "accept", t) => (await (t == null ? void 0 : t()),
|
|
2868
|
+
showDialogAndWaitChoice: gn,
|
|
2869
|
+
removeDialogFromState: St,
|
|
2870
|
+
rejectDialog: async (s, e = new Error("cancel"), t) => (await (t == null ? void 0 : t()), st("reject", s, e)),
|
|
2871
|
+
resolveDialog: async (s, e = "accept", t) => (await (t == null ? void 0 : t()), st("resolve", s, e))
|
|
2859
2872
|
};
|
|
2860
2873
|
}
|
|
2861
|
-
const
|
|
2874
|
+
const yn = { class: "maz-flex maz-items-center maz-gap-2" }, bn = /* @__PURE__ */ ge({
|
|
2862
2875
|
__name: "MazDialogPromise",
|
|
2863
2876
|
props: {
|
|
2864
2877
|
data: { default: void 0 },
|
|
@@ -2886,7 +2899,7 @@ const vn = { class: "maz-flex maz-items-center maz-gap-2" }, pn = /* @__PURE__ *
|
|
|
2886
2899
|
},
|
|
2887
2900
|
emits: ["open", "close"],
|
|
2888
2901
|
setup(s, { expose: e }) {
|
|
2889
|
-
const t = s, n =
|
|
2902
|
+
const t = s, n = H(() => import("./MazBtn-Dsr06Zgg.mjs")), { dialogState: o, rejectDialog: i, resolveDialog: r, data: a } = xt(), u = f(() => {
|
|
2890
2903
|
var c;
|
|
2891
2904
|
return t.buttons ?? ((c = t.data) == null ? void 0 : c.buttons) ?? a.value.buttons;
|
|
2892
2905
|
}), l = f(() => ({
|
|
@@ -2894,118 +2907,105 @@ const vn = { class: "maz-flex maz-items-center maz-gap-2" }, pn = /* @__PURE__ *
|
|
|
2894
2907
|
...a.value,
|
|
2895
2908
|
...t.data
|
|
2896
2909
|
})), h = f(() => {
|
|
2897
|
-
var
|
|
2898
|
-
if (!(((
|
|
2910
|
+
var O, v, S, $;
|
|
2911
|
+
if (!(((O = a.value) == null ? void 0 : O.cancelButton) ?? ((v = t.data) == null ? void 0 : v.cancelButton) ?? ie.cancelButton))
|
|
2899
2912
|
return;
|
|
2900
|
-
const
|
|
2913
|
+
const y = {
|
|
2901
2914
|
...ie.cancelButton,
|
|
2902
|
-
...(
|
|
2903
|
-
...(
|
|
2915
|
+
...(S = a.value) == null ? void 0 : S.cancelButton,
|
|
2916
|
+
...($ = t.data) == null ? void 0 : $.cancelButton
|
|
2904
2917
|
};
|
|
2905
2918
|
return {
|
|
2906
|
-
...
|
|
2907
|
-
text: l.value.cancelText ||
|
|
2919
|
+
...y,
|
|
2920
|
+
text: t.cancelText || l.value.cancelText || y.text
|
|
2908
2921
|
};
|
|
2909
|
-
}),
|
|
2910
|
-
var
|
|
2911
|
-
if (!(((
|
|
2922
|
+
}), g = f(() => {
|
|
2923
|
+
var O, v, S, $;
|
|
2924
|
+
if (!(((O = a.value) == null ? void 0 : O.confirmButton) ?? ((v = t.data) == null ? void 0 : v.confirmButton) ?? ie.confirmButton))
|
|
2912
2925
|
return;
|
|
2913
|
-
const
|
|
2926
|
+
const y = {
|
|
2914
2927
|
...ie.confirmButton,
|
|
2915
|
-
...(
|
|
2916
|
-
...(
|
|
2928
|
+
...(S = a.value) == null ? void 0 : S.confirmButton,
|
|
2929
|
+
...($ = t.data) == null ? void 0 : $.confirmButton
|
|
2917
2930
|
};
|
|
2918
2931
|
return {
|
|
2919
|
-
...
|
|
2920
|
-
text: l.value.confirmText ||
|
|
2932
|
+
...y,
|
|
2933
|
+
text: t.confirmText || l.value.confirmText || y.text
|
|
2921
2934
|
};
|
|
2922
2935
|
}), E = f(
|
|
2923
2936
|
() => o.value.find(({ id: c }) => c === t.identifier)
|
|
2924
|
-
), T =
|
|
2937
|
+
), T = b();
|
|
2925
2938
|
e({
|
|
2926
2939
|
close: () => {
|
|
2927
|
-
var c,
|
|
2928
|
-
return (
|
|
2940
|
+
var c, y;
|
|
2941
|
+
return (y = (c = T.value) == null ? void 0 : c.close) == null ? void 0 : y.call(c);
|
|
2929
2942
|
}
|
|
2930
2943
|
});
|
|
2931
|
-
function
|
|
2944
|
+
function M(c) {
|
|
2932
2945
|
return "type" in c && (c.type === "resolve" || c.type === "reject");
|
|
2933
2946
|
}
|
|
2934
|
-
function
|
|
2935
|
-
return
|
|
2947
|
+
function I(c, y) {
|
|
2948
|
+
return M(y) ? y.type === "resolve" ? r(c, y.response) : i(c, y.response) : r(c, void 0, y.action);
|
|
2936
2949
|
}
|
|
2937
|
-
return (c,
|
|
2938
|
-
var
|
|
2939
|
-
return
|
|
2950
|
+
return (c, y) => {
|
|
2951
|
+
var O;
|
|
2952
|
+
return C(), N(vn, ee({
|
|
2940
2953
|
ref_key: "dialog",
|
|
2941
2954
|
ref: T
|
|
2942
2955
|
}, { ...c.$attrs, ...t }, {
|
|
2943
|
-
"model-value": ((
|
|
2944
|
-
onClose:
|
|
2945
|
-
onOpen:
|
|
2946
|
-
"onUpdate:modelValue":
|
|
2956
|
+
"model-value": ((O = E.value) == null ? void 0 : O.isActive) ?? c.modelValue ?? !1,
|
|
2957
|
+
onClose: y[2] || (y[2] = (v) => c.$emit("close", v)),
|
|
2958
|
+
onOpen: y[3] || (y[3] = (v) => c.$emit("open", v)),
|
|
2959
|
+
"onUpdate:modelValue": y[4] || (y[4] = (v) => A(i)(E.value))
|
|
2947
2960
|
}), {
|
|
2948
|
-
title:
|
|
2949
|
-
C(`
|
|
2950
|
-
@slot title slot - Place your title
|
|
2951
|
-
`),
|
|
2961
|
+
title: U(() => [
|
|
2952
2962
|
q(c.$slots, "title", {}, () => {
|
|
2953
|
-
var
|
|
2963
|
+
var v;
|
|
2954
2964
|
return [
|
|
2955
2965
|
Q(
|
|
2956
|
-
|
|
2966
|
+
Z(c.title || ((v = l.value) == null ? void 0 : v.title)),
|
|
2957
2967
|
1
|
|
2958
2968
|
/* TEXT */
|
|
2959
2969
|
)
|
|
2960
2970
|
];
|
|
2961
2971
|
})
|
|
2962
2972
|
]),
|
|
2963
|
-
default:
|
|
2964
|
-
C(`
|
|
2965
|
-
@slot Default slot - Place your content
|
|
2966
|
-
@binding {Function} resolve resolve function
|
|
2967
|
-
@binding {Function} reject reject function
|
|
2968
|
-
`),
|
|
2973
|
+
default: U(() => [
|
|
2969
2974
|
q(c.$slots, "default", {
|
|
2970
|
-
resolve: (
|
|
2971
|
-
reject: (
|
|
2975
|
+
resolve: (v) => A(r)(E.value, v),
|
|
2976
|
+
reject: (v) => A(i)(E.value, v)
|
|
2972
2977
|
}, () => {
|
|
2973
|
-
var
|
|
2978
|
+
var v;
|
|
2974
2979
|
return [
|
|
2975
2980
|
Q(
|
|
2976
|
-
|
|
2981
|
+
Z(c.message || ((v = l.value) == null ? void 0 : v.message)),
|
|
2977
2982
|
1
|
|
2978
2983
|
/* TEXT */
|
|
2979
2984
|
)
|
|
2980
2985
|
];
|
|
2981
2986
|
})
|
|
2982
2987
|
]),
|
|
2983
|
-
footer:
|
|
2984
|
-
C(`
|
|
2985
|
-
@slot Footer slot
|
|
2986
|
-
@binding {Function} resolve resolve function
|
|
2987
|
-
@binding {Function} reject reject function
|
|
2988
|
-
`),
|
|
2988
|
+
footer: U(() => [
|
|
2989
2989
|
q(c.$slots, "footer-button", {
|
|
2990
|
-
resolve: (
|
|
2991
|
-
reject: (
|
|
2990
|
+
resolve: (v) => A(r)(E.value, v),
|
|
2991
|
+
reject: (v) => A(i)(E.value, v)
|
|
2992
2992
|
}, () => [
|
|
2993
|
-
|
|
2994
|
-
u.value ? (
|
|
2995
|
-
|
|
2993
|
+
B("div", yn, [
|
|
2994
|
+
u.value ? (C(!0), _(
|
|
2995
|
+
Ye,
|
|
2996
2996
|
{ key: 0 },
|
|
2997
|
-
|
|
2998
|
-
key:
|
|
2997
|
+
Ut(u.value, (v, S) => (C(), N(A(n), ee({
|
|
2998
|
+
key: S,
|
|
2999
2999
|
ref_for: !0
|
|
3000
3000
|
}, {
|
|
3001
|
-
...
|
|
3001
|
+
...v,
|
|
3002
3002
|
type: "button"
|
|
3003
3003
|
}, {
|
|
3004
|
-
onClick: (
|
|
3004
|
+
onClick: ($) => I(E.value, v)
|
|
3005
3005
|
}), {
|
|
3006
|
-
default:
|
|
3006
|
+
default: U(() => [
|
|
3007
3007
|
Q(
|
|
3008
|
-
|
|
3008
|
+
Z(v.text),
|
|
3009
3009
|
1
|
|
3010
3010
|
/* TEXT */
|
|
3011
3011
|
)
|
|
@@ -3015,23 +3015,20 @@ const vn = { class: "maz-flex maz-items-center maz-gap-2" }, pn = /* @__PURE__ *
|
|
|
3015
3015
|
}, 1040, ["onClick"]))),
|
|
3016
3016
|
128
|
|
3017
3017
|
/* KEYED_FRAGMENT */
|
|
3018
|
-
)) : (
|
|
3019
|
-
|
|
3018
|
+
)) : (C(), _(
|
|
3019
|
+
Ye,
|
|
3020
3020
|
{ key: 1 },
|
|
3021
3021
|
[
|
|
3022
|
-
h.value ? (
|
|
3022
|
+
h.value ? (C(), N(
|
|
3023
3023
|
A(n),
|
|
3024
3024
|
ee({ key: 0 }, h.value, {
|
|
3025
|
-
onClick:
|
|
3025
|
+
onClick: y[0] || (y[0] = (v) => A(i)(E.value))
|
|
3026
3026
|
}),
|
|
3027
3027
|
{
|
|
3028
|
-
default:
|
|
3029
|
-
C(`
|
|
3030
|
-
@slot cancel-text slot - Place your cancel text
|
|
3031
|
-
`),
|
|
3028
|
+
default: U(() => [
|
|
3032
3029
|
q(c.$slots, "cancel-text", {}, () => [
|
|
3033
3030
|
Q(
|
|
3034
|
-
|
|
3031
|
+
Z(h.value.text),
|
|
3035
3032
|
1
|
|
3036
3033
|
/* TEXT */
|
|
3037
3034
|
)
|
|
@@ -3042,20 +3039,17 @@ const vn = { class: "maz-flex maz-items-center maz-gap-2" }, pn = /* @__PURE__ *
|
|
|
3042
3039
|
},
|
|
3043
3040
|
16
|
|
3044
3041
|
/* FULL_PROPS */
|
|
3045
|
-
)) :
|
|
3046
|
-
|
|
3042
|
+
)) : V("v-if", !0),
|
|
3043
|
+
g.value ? (C(), N(
|
|
3047
3044
|
A(n),
|
|
3048
|
-
ee({ key: 1 },
|
|
3049
|
-
onClick:
|
|
3045
|
+
ee({ key: 1 }, g.value, {
|
|
3046
|
+
onClick: y[1] || (y[1] = (v) => A(r)(E.value))
|
|
3050
3047
|
}),
|
|
3051
3048
|
{
|
|
3052
|
-
default:
|
|
3053
|
-
C(`
|
|
3054
|
-
@slot confirm-text slot - Place your confirm text
|
|
3055
|
-
`),
|
|
3049
|
+
default: U(() => [
|
|
3056
3050
|
q(c.$slots, "confirm-text", {}, () => [
|
|
3057
3051
|
Q(
|
|
3058
|
-
|
|
3052
|
+
Z(g.value.text),
|
|
3059
3053
|
1
|
|
3060
3054
|
/* TEXT */
|
|
3061
3055
|
)
|
|
@@ -3066,7 +3060,7 @@ const vn = { class: "maz-flex maz-items-center maz-gap-2" }, pn = /* @__PURE__ *
|
|
|
3066
3060
|
},
|
|
3067
3061
|
16
|
|
3068
3062
|
/* FULL_PROPS */
|
|
3069
|
-
)) :
|
|
3063
|
+
)) : V("v-if", !0)
|
|
3070
3064
|
],
|
|
3071
3065
|
64
|
|
3072
3066
|
/* STABLE_FRAGMENT */
|
|
@@ -3079,22 +3073,22 @@ const vn = { class: "maz-flex maz-items-center maz-gap-2" }, pn = /* @__PURE__ *
|
|
|
3079
3073
|
}, 16, ["model-value"]);
|
|
3080
3074
|
};
|
|
3081
3075
|
}
|
|
3082
|
-
}),
|
|
3076
|
+
}), nt = {
|
|
3083
3077
|
identifier: "main-dialog"
|
|
3084
3078
|
};
|
|
3085
|
-
class
|
|
3086
|
-
constructor(e, t =
|
|
3079
|
+
class wn {
|
|
3080
|
+
constructor(e, t = nt) {
|
|
3087
3081
|
this.app = e, this.globalOptions = t;
|
|
3088
3082
|
}
|
|
3089
3083
|
open(e) {
|
|
3090
3084
|
const t = {
|
|
3091
|
-
...
|
|
3085
|
+
...nt,
|
|
3092
3086
|
...this.globalOptions,
|
|
3093
3087
|
...e
|
|
3094
|
-
}, { destroy: n, vNode: o } =
|
|
3088
|
+
}, { destroy: n, vNode: o } = We(bn, {
|
|
3095
3089
|
props: t,
|
|
3096
3090
|
app: this.app
|
|
3097
|
-
}), { showDialogAndWaitChoice: i } =
|
|
3091
|
+
}), { showDialogAndWaitChoice: i } = xt();
|
|
3098
3092
|
function r() {
|
|
3099
3093
|
var u, l, h;
|
|
3100
3094
|
(l = (u = o.component) == null ? void 0 : u.exposed) == null || l.close(), (h = t.promiseCallback) == null || h.call(t), setTimeout(() => {
|
|
@@ -3110,14 +3104,14 @@ class gn {
|
|
|
3110
3104
|
};
|
|
3111
3105
|
}
|
|
3112
3106
|
}
|
|
3113
|
-
const
|
|
3107
|
+
const mo = {
|
|
3114
3108
|
install(s, e) {
|
|
3115
|
-
s.provide("dialog", new
|
|
3109
|
+
s.provide("dialog", new wn(s, e));
|
|
3116
3110
|
}
|
|
3117
|
-
},
|
|
3111
|
+
}, En = { class: "m-toast__message-wrapper" }, Tn = { class: "m-toast__message" }, Ln = { class: "maz-flex maz-items-center maz-gap-2" }, zn = { key: 0 }, Cn = {
|
|
3118
3112
|
key: 4,
|
|
3119
3113
|
class: "progress-bar maz-absolute maz-inset-x-0 maz-bottom-0 maz-h-1"
|
|
3120
|
-
},
|
|
3114
|
+
}, In = /* @__PURE__ */ ge({
|
|
3121
3115
|
__name: "MazToast",
|
|
3122
3116
|
props: {
|
|
3123
3117
|
message: { default: void 0 },
|
|
@@ -3134,15 +3128,15 @@ const lo = {
|
|
|
3134
3128
|
},
|
|
3135
3129
|
emits: ["close", "click", "open"],
|
|
3136
3130
|
setup(s, { expose: e, emit: t }) {
|
|
3137
|
-
const n = s, o = t, i =
|
|
3131
|
+
const n = s, o = t, i = H(() => import("./MazBtn-Dsr06Zgg.mjs")), r = H(() => import("./x-mark-CnZwVvA7.mjs")), a = H(
|
|
3138
3132
|
() => import("./arrow-top-right-on-square-jPmYJ34F.mjs")
|
|
3139
|
-
), u =
|
|
3133
|
+
), u = H(
|
|
3140
3134
|
() => import("./exclamation-triangle-Z6d0ygp8.mjs")
|
|
3141
|
-
), l =
|
|
3135
|
+
), l = H(
|
|
3142
3136
|
() => import("./exclamation-circle-CUk0ZajS.mjs")
|
|
3143
|
-
), h =
|
|
3137
|
+
), h = H(
|
|
3144
3138
|
() => import("./information-circle-C7e5b_nL.mjs")
|
|
3145
|
-
),
|
|
3139
|
+
), g = H(() => import("./check-circle-Bf7AGSQ-.mjs")), E = H(() => import("./link-Br1lfjTR.mjs")), T = b(), M = f(() => {
|
|
3146
3140
|
if (n.icon)
|
|
3147
3141
|
switch (n.type) {
|
|
3148
3142
|
case "danger":
|
|
@@ -3150,38 +3144,38 @@ const lo = {
|
|
|
3150
3144
|
case "info":
|
|
3151
3145
|
return h;
|
|
3152
3146
|
case "success":
|
|
3153
|
-
return
|
|
3147
|
+
return g;
|
|
3154
3148
|
case "warning":
|
|
3155
3149
|
return l;
|
|
3156
3150
|
default:
|
|
3157
3151
|
return;
|
|
3158
3152
|
}
|
|
3159
|
-
}),
|
|
3160
|
-
callback:
|
|
3153
|
+
}), I = f(() => n.position.includes("top") ? "top" : "bottom"), c = f(() => n.position.includes("left") ? "left" : n.position.includes("right") ? "right" : "center"), y = f(() => c.value !== "center" ? c.value === "right" ? "m-slide-right" : "m-slide-left" : I.value === "top" ? "m-slide-top" : "m-slide-bottom"), O = b(!1), v = b(!1), S = b(), $ = `m-toast-container --${I.value} --${c.value}`, L = `.${$.replaceAll(" ", ".")}`, D = Cs({
|
|
3154
|
+
callback: oe,
|
|
3161
3155
|
timeout: typeof n.timeout == "number" ? n.timeout : 0,
|
|
3162
3156
|
callbackOffsetTime: 200
|
|
3163
3157
|
});
|
|
3164
|
-
function
|
|
3165
|
-
const
|
|
3166
|
-
if (!
|
|
3167
|
-
const
|
|
3168
|
-
|
|
3158
|
+
function j() {
|
|
3159
|
+
const m = document.querySelector(L);
|
|
3160
|
+
if (!m && !m) {
|
|
3161
|
+
const k = document.body, x = document.createElement("div");
|
|
3162
|
+
x.className = $, k.append(x);
|
|
3169
3163
|
}
|
|
3170
3164
|
}
|
|
3171
|
-
function
|
|
3172
|
-
const
|
|
3173
|
-
return !n.queue && n.maxToasts === !1 ? !1 : typeof n.maxToasts == "number" &&
|
|
3165
|
+
function ne() {
|
|
3166
|
+
const m = document.querySelector(L);
|
|
3167
|
+
return !n.queue && n.maxToasts === !1 ? !1 : typeof n.maxToasts == "number" && m ? n.maxToasts <= m.childElementCount : m && m.childElementCount > 0;
|
|
3174
3168
|
}
|
|
3175
3169
|
function G() {
|
|
3176
|
-
if (
|
|
3177
|
-
|
|
3170
|
+
if (ne()) {
|
|
3171
|
+
S.value = setTimeout(G, 250);
|
|
3178
3172
|
return;
|
|
3179
3173
|
}
|
|
3180
|
-
const
|
|
3181
|
-
T.value &&
|
|
3174
|
+
const m = document.querySelector(L);
|
|
3175
|
+
T.value && m && m.prepend(T.value), v.value = !0, typeof n.timeout == "number" && n.timeout > 0 && D.start();
|
|
3182
3176
|
}
|
|
3183
|
-
const
|
|
3184
|
-
function
|
|
3177
|
+
const ce = b("100%");
|
|
3178
|
+
function De() {
|
|
3185
3179
|
switch (n.type) {
|
|
3186
3180
|
case "danger":
|
|
3187
3181
|
return "maz-bg-danger-700";
|
|
@@ -3192,129 +3186,129 @@ const lo = {
|
|
|
3192
3186
|
case "warning":
|
|
3193
3187
|
return "maz-bg-warning-700";
|
|
3194
3188
|
default:
|
|
3195
|
-
return "maz-bg-
|
|
3189
|
+
return "maz-bg-primary";
|
|
3196
3190
|
}
|
|
3197
3191
|
}
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
(
|
|
3192
|
+
X(
|
|
3193
|
+
D.remainingTime,
|
|
3194
|
+
(m) => {
|
|
3201
3195
|
if (typeof n.timeout == "number") {
|
|
3202
|
-
const
|
|
3203
|
-
|
|
3196
|
+
const k = 100 * m / n.timeout;
|
|
3197
|
+
ce.value = `${k}%`;
|
|
3204
3198
|
}
|
|
3205
3199
|
}
|
|
3206
3200
|
);
|
|
3207
|
-
function
|
|
3208
|
-
o("click",
|
|
3201
|
+
function de(m) {
|
|
3202
|
+
o("click", m), n.persistent || oe();
|
|
3209
3203
|
}
|
|
3210
|
-
async function
|
|
3211
|
-
var
|
|
3212
|
-
|
|
3204
|
+
async function me(m, k) {
|
|
3205
|
+
var x;
|
|
3206
|
+
O.value = !0, await m(), O.value = !1, (x = n.action) != null && x.closeToast && de(k);
|
|
3213
3207
|
}
|
|
3214
|
-
function
|
|
3215
|
-
n.noPauseOnHover || (
|
|
3208
|
+
function fe(m) {
|
|
3209
|
+
n.noPauseOnHover || (m ? D.pause() : D.resume());
|
|
3216
3210
|
}
|
|
3217
|
-
function
|
|
3218
|
-
|
|
3211
|
+
function Pe() {
|
|
3212
|
+
D.stop(), S.value && clearTimeout(S.value);
|
|
3219
3213
|
}
|
|
3220
|
-
function ne() {
|
|
3221
|
-
ze(), b.value = !1;
|
|
3222
|
-
}
|
|
3223
|
-
e({ closeToast: ne });
|
|
3224
3214
|
function oe() {
|
|
3215
|
+
Pe(), v.value = !1;
|
|
3216
|
+
}
|
|
3217
|
+
e({ closeToast: oe });
|
|
3218
|
+
function Le() {
|
|
3225
3219
|
o("open");
|
|
3226
3220
|
}
|
|
3227
|
-
function
|
|
3228
|
-
var
|
|
3229
|
-
o("close"), (
|
|
3230
|
-
const
|
|
3231
|
-
|
|
3221
|
+
function ze() {
|
|
3222
|
+
var k;
|
|
3223
|
+
o("close"), (k = T.value) == null || k.remove();
|
|
3224
|
+
const m = document.querySelector(L);
|
|
3225
|
+
m && !(m != null && m.hasChildNodes()) && m.remove();
|
|
3232
3226
|
}
|
|
3233
|
-
return
|
|
3234
|
-
|
|
3235
|
-
}), (
|
|
3236
|
-
name:
|
|
3237
|
-
onAfterLeave:
|
|
3238
|
-
onAfterEnter:
|
|
3227
|
+
return ue(() => {
|
|
3228
|
+
j(), G();
|
|
3229
|
+
}), (m, k) => (C(), N(ut, {
|
|
3230
|
+
name: y.value,
|
|
3231
|
+
onAfterLeave: ze,
|
|
3232
|
+
onAfterEnter: Le,
|
|
3239
3233
|
persisted: ""
|
|
3240
3234
|
}, {
|
|
3241
|
-
default:
|
|
3242
|
-
|
|
3235
|
+
default: U(() => [
|
|
3236
|
+
at(B(
|
|
3243
3237
|
"button",
|
|
3244
3238
|
{
|
|
3245
3239
|
ref_key: "Toaster",
|
|
3246
3240
|
ref: T,
|
|
3247
|
-
class:
|
|
3248
|
-
`--${
|
|
3249
|
-
`--${
|
|
3241
|
+
class: le(["m-toast", [
|
|
3242
|
+
`--${m.type}`,
|
|
3243
|
+
`--${I.value}`,
|
|
3250
3244
|
`--${c.value}`,
|
|
3251
|
-
{ "maz-pb-1": typeof
|
|
3245
|
+
{ "maz-pb-1": typeof m.timeout == "number" && m.timeout > 0, "--persistent": m.persistent }
|
|
3252
3246
|
]]),
|
|
3253
3247
|
role: "alert",
|
|
3254
|
-
onMouseover:
|
|
3255
|
-
onMouseleave:
|
|
3256
|
-
onClick:
|
|
3257
|
-
var
|
|
3258
|
-
return
|
|
3248
|
+
onMouseover: k[2] || (k[2] = (x) => fe(!0)),
|
|
3249
|
+
onMouseleave: k[3] || (k[3] = (x) => fe(!1)),
|
|
3250
|
+
onClick: k[4] || (k[4] = Y((x) => {
|
|
3251
|
+
var he;
|
|
3252
|
+
return m.link && !((he = m.link) != null && he.closeToast) ? void 0 : de(x);
|
|
3259
3253
|
}, ["stop"]))
|
|
3260
3254
|
},
|
|
3261
3255
|
[
|
|
3262
|
-
|
|
3256
|
+
M.value ? (C(), N(_t(M.value), {
|
|
3263
3257
|
key: 0,
|
|
3264
3258
|
class: "maz-text-2xl"
|
|
3265
|
-
})) :
|
|
3266
|
-
|
|
3267
|
-
|
|
3259
|
+
})) : V("v-if", !0),
|
|
3260
|
+
B("div", En, [
|
|
3261
|
+
B(
|
|
3268
3262
|
"p",
|
|
3269
|
-
|
|
3270
|
-
|
|
3263
|
+
Tn,
|
|
3264
|
+
Z(m.message),
|
|
3271
3265
|
1
|
|
3272
3266
|
/* TEXT */
|
|
3273
3267
|
)
|
|
3274
3268
|
]),
|
|
3275
|
-
|
|
3269
|
+
m.action ? (C(), N(A(i), {
|
|
3276
3270
|
key: 1,
|
|
3277
3271
|
"data-test": "action-btn",
|
|
3278
|
-
color:
|
|
3272
|
+
color: m.type,
|
|
3279
3273
|
pastel: "",
|
|
3280
|
-
loading:
|
|
3274
|
+
loading: O.value,
|
|
3281
3275
|
size: "sm",
|
|
3282
|
-
onClick:
|
|
3276
|
+
onClick: k[0] || (k[0] = Y((x) => m.action ? me(m.action.func, x) : void 0, ["stop"]))
|
|
3283
3277
|
}, {
|
|
3284
|
-
default:
|
|
3278
|
+
default: U(() => [
|
|
3285
3279
|
Q(
|
|
3286
|
-
|
|
3280
|
+
Z(m.action.text),
|
|
3287
3281
|
1
|
|
3288
3282
|
/* TEXT */
|
|
3289
3283
|
)
|
|
3290
3284
|
]),
|
|
3291
3285
|
_: 1
|
|
3292
3286
|
/* STABLE */
|
|
3293
|
-
}, 8, ["color", "loading"])) :
|
|
3294
|
-
|
|
3287
|
+
}, 8, ["color", "loading"])) : V("v-if", !0),
|
|
3288
|
+
m.link ? (C(), N(A(i), {
|
|
3295
3289
|
key: 2,
|
|
3296
3290
|
"data-test": "link-btn",
|
|
3297
|
-
color:
|
|
3291
|
+
color: m.type,
|
|
3298
3292
|
pastel: "",
|
|
3299
3293
|
size: "xs",
|
|
3300
|
-
href:
|
|
3301
|
-
target:
|
|
3294
|
+
href: m.link.href,
|
|
3295
|
+
target: m.link.target ?? "_self"
|
|
3302
3296
|
}, {
|
|
3303
|
-
default:
|
|
3304
|
-
var
|
|
3297
|
+
default: U(() => {
|
|
3298
|
+
var x;
|
|
3305
3299
|
return [
|
|
3306
|
-
|
|
3307
|
-
|
|
3300
|
+
B("div", Ln, [
|
|
3301
|
+
m.link.text ? (C(), _(
|
|
3308
3302
|
"span",
|
|
3309
|
-
|
|
3310
|
-
|
|
3303
|
+
zn,
|
|
3304
|
+
Z(m.link.text),
|
|
3311
3305
|
1
|
|
3312
3306
|
/* TEXT */
|
|
3313
|
-
)) :
|
|
3314
|
-
((
|
|
3307
|
+
)) : V("v-if", !0),
|
|
3308
|
+
((x = m.link) == null ? void 0 : x.target) === "_blank" ? (C(), N(A(a), {
|
|
3315
3309
|
key: 1,
|
|
3316
3310
|
class: "maz-text-xl"
|
|
3317
|
-
})) : (
|
|
3311
|
+
})) : (C(), N(A(E), {
|
|
3318
3312
|
key: 2,
|
|
3319
3313
|
class: "maz-text-xl"
|
|
3320
3314
|
}))
|
|
@@ -3323,56 +3317,56 @@ const lo = {
|
|
|
3323
3317
|
}),
|
|
3324
3318
|
_: 1
|
|
3325
3319
|
/* STABLE */
|
|
3326
|
-
}, 8, ["color", "href", "target"])) :
|
|
3327
|
-
|
|
3320
|
+
}, 8, ["color", "href", "target"])) : V("v-if", !0),
|
|
3321
|
+
m.persistent ? V("v-if", !0) : (C(), _("button", {
|
|
3328
3322
|
key: 3,
|
|
3329
3323
|
class: "--close",
|
|
3330
|
-
onClick:
|
|
3324
|
+
onClick: k[1] || (k[1] = Y((x) => de(x), ["stop"]))
|
|
3331
3325
|
}, [
|
|
3332
3326
|
J(A(r), { class: "--icon maz-text-xl" })
|
|
3333
3327
|
])),
|
|
3334
|
-
typeof
|
|
3335
|
-
|
|
3328
|
+
typeof m.timeout == "number" && m.timeout > 0 ? (C(), _("div", Cn, [
|
|
3329
|
+
B(
|
|
3336
3330
|
"div",
|
|
3337
3331
|
{
|
|
3338
|
-
style:
|
|
3339
|
-
width:
|
|
3332
|
+
style: qt({
|
|
3333
|
+
width: ce.value
|
|
3340
3334
|
}),
|
|
3341
|
-
class:
|
|
3335
|
+
class: le(["maz-h-full !maz-transition-all !maz-duration-200 !maz-ease-linear", De()])
|
|
3342
3336
|
},
|
|
3343
3337
|
null,
|
|
3344
3338
|
6
|
|
3345
3339
|
/* CLASS, STYLE */
|
|
3346
3340
|
)
|
|
3347
|
-
])) :
|
|
3341
|
+
])) : V("v-if", !0)
|
|
3348
3342
|
],
|
|
3349
3343
|
34
|
|
3350
3344
|
/* CLASS, NEED_HYDRATION */
|
|
3351
3345
|
), [
|
|
3352
|
-
[
|
|
3346
|
+
[lt, v.value]
|
|
3353
3347
|
])
|
|
3354
3348
|
]),
|
|
3355
3349
|
_: 1
|
|
3356
3350
|
/* STABLE */
|
|
3357
3351
|
}, 8, ["name"]));
|
|
3358
3352
|
}
|
|
3359
|
-
}),
|
|
3353
|
+
}), kn = /* @__PURE__ */ Re(In, [["__scopeId", "data-v-c8684398"]]), An = {
|
|
3360
3354
|
position: "bottom-right",
|
|
3361
3355
|
timeout: 1e4,
|
|
3362
3356
|
persistent: !1,
|
|
3363
3357
|
icon: !0
|
|
3364
3358
|
};
|
|
3365
|
-
class
|
|
3359
|
+
class Sn {
|
|
3366
3360
|
constructor(e, t) {
|
|
3367
3361
|
this.app = e, this.globalOptions = t;
|
|
3368
3362
|
}
|
|
3369
3363
|
show(e, t) {
|
|
3370
3364
|
const n = {
|
|
3371
|
-
...
|
|
3365
|
+
...An,
|
|
3372
3366
|
...this.globalOptions,
|
|
3373
3367
|
...t,
|
|
3374
3368
|
message: e
|
|
3375
|
-
}, { destroy: o, vNode: i } =
|
|
3369
|
+
}, { destroy: o, vNode: i } = We(kn, {
|
|
3376
3370
|
props: n,
|
|
3377
3371
|
app: this.app
|
|
3378
3372
|
});
|
|
@@ -3406,112 +3400,112 @@ class In {
|
|
|
3406
3400
|
return this.show(e, this.getLocalOptions("warning", t));
|
|
3407
3401
|
}
|
|
3408
3402
|
}
|
|
3409
|
-
function
|
|
3410
|
-
return new
|
|
3403
|
+
function xn(s, e) {
|
|
3404
|
+
return new Sn(s, e);
|
|
3411
3405
|
}
|
|
3412
|
-
const
|
|
3406
|
+
const fo = {
|
|
3413
3407
|
install(s, e) {
|
|
3414
|
-
s.provide("toast",
|
|
3408
|
+
s.provide("toast", xn(s, e));
|
|
3415
3409
|
}
|
|
3416
3410
|
}, ae = "";
|
|
3417
|
-
function
|
|
3411
|
+
function On(s) {
|
|
3418
3412
|
return s.filter((e, t, n) => t === n.indexOf(e));
|
|
3419
3413
|
}
|
|
3420
|
-
function
|
|
3414
|
+
function Dn(s) {
|
|
3421
3415
|
return (e = ae) => typeof e == "function" ? s.findIndex((...t) => e(...t)) > -1 : s.includes(e);
|
|
3422
3416
|
}
|
|
3423
|
-
const
|
|
3424
|
-
function
|
|
3425
|
-
return (e = ae) =>
|
|
3417
|
+
const Pn = (s) => s.length > 0;
|
|
3418
|
+
function Mn(s) {
|
|
3419
|
+
return (e = ae) => On([...s, e]);
|
|
3426
3420
|
}
|
|
3427
|
-
function
|
|
3421
|
+
function $n(s) {
|
|
3428
3422
|
return (e = ae) => s.filter((t) => t !== e);
|
|
3429
3423
|
}
|
|
3430
|
-
class
|
|
3424
|
+
class Hn {
|
|
3431
3425
|
constructor() {
|
|
3432
|
-
d(this, "_loaders",
|
|
3426
|
+
d(this, "_loaders", b([]));
|
|
3433
3427
|
}
|
|
3434
3428
|
get loaders() {
|
|
3435
3429
|
return f(() => this._loaders.value);
|
|
3436
3430
|
}
|
|
3437
3431
|
stop(e = ae) {
|
|
3438
|
-
this._loaders.value =
|
|
3432
|
+
this._loaders.value = $n(this._loaders.value)(e);
|
|
3439
3433
|
}
|
|
3440
3434
|
start(e = ae) {
|
|
3441
|
-
return this._loaders.value =
|
|
3435
|
+
return this._loaders.value = Mn(this._loaders.value)(e), () => this.stop(e);
|
|
3442
3436
|
}
|
|
3443
3437
|
get anyLoading() {
|
|
3444
|
-
return f(() =>
|
|
3438
|
+
return f(() => Pn(this._loaders.value));
|
|
3445
3439
|
}
|
|
3446
3440
|
isLoading(e = ae) {
|
|
3447
|
-
return f(() =>
|
|
3441
|
+
return f(() => Dn(this._loaders.value)(e)).value;
|
|
3448
3442
|
}
|
|
3449
3443
|
}
|
|
3450
|
-
const
|
|
3444
|
+
const Vn = new Hn(), ho = {
|
|
3451
3445
|
install: (s) => {
|
|
3452
|
-
s.provide("wait",
|
|
3446
|
+
s.provide("wait", Vn);
|
|
3453
3447
|
}
|
|
3454
3448
|
};
|
|
3455
3449
|
export {
|
|
3456
|
-
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3450
|
+
uo as $,
|
|
3451
|
+
qs as A,
|
|
3452
|
+
_s as B,
|
|
3453
|
+
Rs as C,
|
|
3454
|
+
ro as D,
|
|
3455
|
+
Xs as E,
|
|
3456
|
+
Zs as F,
|
|
3457
|
+
lo as G,
|
|
3458
|
+
Qs as H,
|
|
3459
|
+
sn as I,
|
|
3460
|
+
on as J,
|
|
3461
|
+
an as K,
|
|
3462
|
+
ct as L,
|
|
3469
3463
|
so as M,
|
|
3470
3464
|
no as N,
|
|
3471
|
-
|
|
3465
|
+
ms as O,
|
|
3472
3466
|
F as P,
|
|
3473
|
-
|
|
3474
|
-
|
|
3467
|
+
We as Q,
|
|
3468
|
+
Ge as R,
|
|
3475
3469
|
oo as S,
|
|
3476
|
-
|
|
3477
|
-
|
|
3470
|
+
Hs as T,
|
|
3471
|
+
Ts as U,
|
|
3478
3472
|
io as V,
|
|
3479
|
-
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3473
|
+
$s as W,
|
|
3474
|
+
Is as X,
|
|
3475
|
+
un as Y,
|
|
3476
|
+
co as Z,
|
|
3477
|
+
Re as _,
|
|
3478
|
+
jn as a,
|
|
3479
|
+
wn as a0,
|
|
3480
|
+
mo as a1,
|
|
3481
|
+
fo as a2,
|
|
3482
|
+
Sn as a3,
|
|
3483
|
+
Vn as a4,
|
|
3484
|
+
ho as a5,
|
|
3485
|
+
Hn as a6,
|
|
3486
|
+
Un as b,
|
|
3487
|
+
_n as c,
|
|
3488
|
+
qn as d,
|
|
3489
|
+
Wn as e,
|
|
3490
|
+
Rn as f,
|
|
3491
|
+
fs as g,
|
|
3492
|
+
Kn as h,
|
|
3493
|
+
Oe as i,
|
|
3494
|
+
Yn as j,
|
|
3495
|
+
Zn as k,
|
|
3496
|
+
Xn as l,
|
|
3497
|
+
Gn as m,
|
|
3498
|
+
Cs as n,
|
|
3499
|
+
Qn as o,
|
|
3500
|
+
Jn as p,
|
|
3501
|
+
eo as q,
|
|
3502
|
+
Rt as r,
|
|
3503
|
+
ao as s,
|
|
3504
|
+
As as t,
|
|
3505
|
+
Fn as u,
|
|
3506
|
+
Ss as v,
|
|
3507
|
+
Ds as w,
|
|
3508
|
+
Ps as x,
|
|
3509
|
+
to as y,
|
|
3510
|
+
Ms as z
|
|
3517
3511
|
};
|