maz-ui 3.29.0 → 3.29.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/MazAvatar.d.ts +11 -0
- package/components/MazAvatar.mjs +1 -1
- package/components/MazBadge.d.ts +3 -3
- package/components/MazBadge.mjs +1 -1
- package/components/MazDropdown.mjs +59 -55
- package/components/MazFullscreenLoader.mjs +19 -10
- package/components/MazPullToRefresh.d.ts +88 -0
- package/components/MazPullToRefresh.mjs +4 -0
- package/components/assets/MazAccordion.css +1 -1
- package/components/assets/MazAvatar.css +1 -1
- package/components/assets/MazBadge.css +1 -1
- package/components/assets/MazFullscreenLoader.css +1 -0
- package/components/assets/MazPullToRefresh.css +1 -0
- package/components/chunks/MazAvatar-0JzIvOc4.mjs +134 -0
- package/components/chunks/{MazLazyImg-65QIsZ1B.mjs → MazLazyImg-evGMN9Pe.mjs} +2 -2
- package/components/chunks/MazPullToRefresh-l6zWVzfv.mjs +183 -0
- package/components/chunks/{MazSpinner-W3TVtT8l.mjs → MazSpinner-J65FS2NQ.mjs} +1 -1
- package/components/chunks/MazSpinner-f5zcetJO.mjs +38 -0
- package/components/index.d.ts +1 -0
- package/components/index.mjs +1 -0
- package/modules/chunks/{MazBtn-OU9ti0GG.mjs → MazBtn-23G6MO1u.mjs} +2 -2
- package/modules/chunks/{MazBtn-5jYVOHi5.cjs → MazBtn-BVge7L6B.cjs} +1 -1
- package/modules/chunks/{MazIcon-mIVA-wm3.mjs → MazIcon-3ecUGYyh.mjs} +1 -1
- package/modules/chunks/{MazIcon-O-Sd2-b9.cjs → MazIcon-tK6rWxmD.cjs} +1 -1
- package/modules/chunks/{MazSpinner-Me_ta933.mjs → MazSpinner-CKpey7-9.mjs} +1 -1
- package/modules/chunks/{MazSpinner-ElCcZG5D.cjs → MazSpinner-Yp72xl7m.cjs} +1 -1
- package/modules/chunks/index-t7LFFnFX.cjs +124 -0
- package/modules/chunks/{index-AC4Cl2MH.mjs → index-w7bAz52b.mjs} +395 -347
- package/modules/index.cjs +1 -1
- package/modules/index.mjs +24 -22
- package/nuxt/index.d.mts +10 -0
- package/nuxt/index.d.ts +10 -0
- package/nuxt/index.json +1 -1
- package/nuxt/index.mjs +14 -0
- package/package.json +1 -1
- package/tailwindcss/tailwind.config.ts +3 -1
- package/tailwindcss/utils/colors.ts +2 -1
- package/tailwindcss/variables/breakpoints.ts +14 -0
- package/tailwindcss/variables/utilities.ts +3 -1
- package/tailwindcss/variables/z-indexes.ts +2 -1
- package/types/components/MazAvatar.vue.d.ts +11 -0
- package/types/components/MazBadge.vue.d.ts +3 -3
- package/types/components/MazPullToRefresh.vue.d.ts +88 -0
- package/types/components/index.d.ts +1 -0
- package/types/modules/composables/index.d.ts +2 -0
- package/types/modules/composables/use-breakpoints.d.ts +38 -0
- package/types/modules/composables/use-window-size.d.ts +32 -0
- package/types/modules/helpers/is-standalone-mode.d.ts +1 -0
- package/types/tailwindcss/tailwind.config.d.ts +2 -0
- package/types/tailwindcss/variables/breakpoints.d.ts +1 -0
- package/components/chunks/MazAvatar-HJMP2asX.mjs +0 -127
- package/modules/chunks/index-f0w7PwtX.cjs +0 -124
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
var Ge = Object.defineProperty;
|
|
2
2
|
var Qe = (s, e, t) => e in s ? Ge(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t;
|
|
3
|
-
var
|
|
3
|
+
var l = (s, e, t) => (Qe(s, typeof e != "symbol" ? e + "" : e, t), t);
|
|
4
4
|
import "../assets/index.css";
|
|
5
|
-
import { inject as Je, createVNode as
|
|
5
|
+
import { inject as Je, createVNode as $, render as ee, nextTick as He, defineComponent as $e, defineAsyncComponent as E, onBeforeMount as et, ref as h, computed as g, onMounted as Ee, onBeforeUnmount as tt, openBlock as L, createElementBlock as Z, normalizeClass as re, withModifiers as M, withKeys as st, withDirectives as be, unref as T, vShow as we, createCommentVNode as D, createElementVNode as I, Transition as De, withCtx as oe, watch as it, createBlock as U, resolveDynamicComponent as nt, toDisplayString as pe, createTextVNode as ot, normalizeStyle as rt } from "vue";
|
|
6
6
|
function Le(s, e) {
|
|
7
7
|
const t = Je(s, e);
|
|
8
8
|
if (!t)
|
|
9
9
|
throw new TypeError(`[maz-ui](injectStrict) Could not resolve ${s}`);
|
|
10
10
|
return t;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function as(s, e) {
|
|
13
13
|
let t;
|
|
14
14
|
return function(...i) {
|
|
15
15
|
clearTimeout(t), t = setTimeout(() => {
|
|
@@ -25,34 +25,34 @@ function Me(s, e) {
|
|
|
25
25
|
function i() {
|
|
26
26
|
t && ee(null, t);
|
|
27
27
|
}
|
|
28
|
-
const
|
|
28
|
+
const n = $(
|
|
29
29
|
s,
|
|
30
30
|
{ ...e == null ? void 0 : e.props, ...e != null && e.addDestroyInProps ? { destroy: i } : {} },
|
|
31
31
|
e == null ? void 0 : e.children
|
|
32
32
|
);
|
|
33
|
-
return e != null && e.app ? (
|
|
33
|
+
return e != null && e.app ? (n.appContext = e.app._context, t ? ee(n, t) : typeof document < "u" && (t = document.createElement("div"), ee(n, t))) : (t = t ?? document.body, ee(n, t)), { vNode: n, destroy: i, el: t };
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function S() {
|
|
36
36
|
return typeof document < "u";
|
|
37
37
|
}
|
|
38
38
|
class lt {
|
|
39
39
|
constructor(e, t) {
|
|
40
|
-
|
|
40
|
+
l(this, "defaultOptions", {
|
|
41
41
|
element: void 0,
|
|
42
42
|
timeout: 60 * 1e3 * 5,
|
|
43
43
|
// 5 minutes
|
|
44
44
|
once: !1,
|
|
45
45
|
immediate: !0
|
|
46
46
|
});
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
47
|
+
l(this, "options");
|
|
48
|
+
l(this, "timeoutHandler");
|
|
49
|
+
l(this, "isIdle", !1);
|
|
50
|
+
l(this, "isDestroy", !1);
|
|
51
|
+
l(this, "startTime", 0);
|
|
52
|
+
l(this, "remainingTime", 0);
|
|
53
|
+
l(this, "lastClientX", -1);
|
|
54
|
+
l(this, "lastClientY", -1);
|
|
55
|
+
l(this, "eventNames", [
|
|
56
56
|
"DOMMouseScroll",
|
|
57
57
|
"mousedown",
|
|
58
58
|
"mousemove",
|
|
@@ -65,7 +65,7 @@ class lt {
|
|
|
65
65
|
"wheel",
|
|
66
66
|
"click"
|
|
67
67
|
]);
|
|
68
|
-
|
|
68
|
+
l(this, "handleEvent", (e) => {
|
|
69
69
|
try {
|
|
70
70
|
if (this.remainingTime > 0)
|
|
71
71
|
return;
|
|
@@ -83,13 +83,13 @@ class lt {
|
|
|
83
83
|
this.callback = e, this.options = {
|
|
84
84
|
...this.defaultOptions,
|
|
85
85
|
...t
|
|
86
|
-
},
|
|
86
|
+
}, S() && this.start();
|
|
87
87
|
}
|
|
88
88
|
get element() {
|
|
89
89
|
return this.options.element ?? document.body;
|
|
90
90
|
}
|
|
91
91
|
start() {
|
|
92
|
-
if (!
|
|
92
|
+
if (!S()) {
|
|
93
93
|
console.warn("[IdleTimeout](start) you should run this method on client side");
|
|
94
94
|
return;
|
|
95
95
|
}
|
|
@@ -108,7 +108,7 @@ class lt {
|
|
|
108
108
|
this.isDestroy = !1, this.isIdle = !1, this.remainingTime = 0, this.resetTimeout(), this.callback({ isIdle: this.isIdle });
|
|
109
109
|
}
|
|
110
110
|
destroy() {
|
|
111
|
-
if (!
|
|
111
|
+
if (!S()) {
|
|
112
112
|
console.warn("[IdleTimeout](destroy) you should run this method on client side");
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
@@ -144,23 +144,23 @@ class lt {
|
|
|
144
144
|
}
|
|
145
145
|
class ct {
|
|
146
146
|
constructor(e, t) {
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
147
|
+
l(this, "eventHandlerFunction");
|
|
148
|
+
l(this, "event", "visibilitychange");
|
|
149
|
+
l(this, "timeoutHandler");
|
|
150
|
+
l(this, "options");
|
|
151
|
+
l(this, "defaultOptions", {
|
|
152
152
|
timeout: 5e3,
|
|
153
153
|
once: !1,
|
|
154
154
|
immediate: !0
|
|
155
155
|
});
|
|
156
|
-
|
|
156
|
+
l(this, "isVisible", !1);
|
|
157
157
|
this.callback = e, this.options = {
|
|
158
158
|
...this.defaultOptions,
|
|
159
159
|
...t
|
|
160
|
-
}, this.eventHandlerFunction = this.eventHandler.bind(this),
|
|
160
|
+
}, this.eventHandlerFunction = this.eventHandler.bind(this), S() && this.start();
|
|
161
161
|
}
|
|
162
162
|
start() {
|
|
163
|
-
if (!
|
|
163
|
+
if (!S()) {
|
|
164
164
|
console.warn("[UserVisibility](start) you should run this method on client side");
|
|
165
165
|
return;
|
|
166
166
|
}
|
|
@@ -191,21 +191,21 @@ class ct {
|
|
|
191
191
|
const X = (s) => new Promise((e) => {
|
|
192
192
|
setTimeout(e, s);
|
|
193
193
|
});
|
|
194
|
-
class
|
|
195
|
-
constructor({ src: e, identifier: t, once: i = !0, async:
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
194
|
+
class ls {
|
|
195
|
+
constructor({ src: e, identifier: t, once: i = !0, async: n = !0, defer: c = !0 }) {
|
|
196
|
+
l(this, "src");
|
|
197
|
+
l(this, "script");
|
|
198
|
+
l(this, "once");
|
|
199
|
+
l(this, "async");
|
|
200
|
+
l(this, "defer");
|
|
201
|
+
l(this, "identifier");
|
|
202
202
|
if (typeof window > "u")
|
|
203
203
|
throw new TypeError("[ScriptLoader]: Is supported only on browser side");
|
|
204
204
|
if (!e)
|
|
205
205
|
throw new Error('[ScriptLoader]: You should provide the attribut "src"');
|
|
206
206
|
if (!t)
|
|
207
207
|
throw new Error('[ScriptLoader]: You should provide the attribut "identifier"');
|
|
208
|
-
this.src = e, this.identifier = t, this.once = i, this.async =
|
|
208
|
+
this.src = e, this.identifier = t, this.once = i, this.async = n, this.defer = c;
|
|
209
209
|
}
|
|
210
210
|
removeTag(e) {
|
|
211
211
|
var t;
|
|
@@ -224,15 +224,15 @@ class rs {
|
|
|
224
224
|
const e = window;
|
|
225
225
|
return new Promise((t, i) => {
|
|
226
226
|
try {
|
|
227
|
-
const
|
|
228
|
-
|
|
229
|
-
} catch (
|
|
230
|
-
throw new Error(`[ScriptLoader](init) ${
|
|
227
|
+
const n = document.createElement("script");
|
|
228
|
+
n.src = this.src, n.async = this.async, n.defer = this.defer, n.dataset.identifier = this.identifier, n.addEventListener("error", (c) => i(new Error(`[ScriptLoader](injectScript) ${c.message}`))), n.addEventListener("load", (c) => (this.script = c, e[this.identifier] = c, t(c))), document.head.append(n);
|
|
229
|
+
} catch (n) {
|
|
230
|
+
throw new Error(`[ScriptLoader](init) ${n}`);
|
|
231
231
|
}
|
|
232
232
|
});
|
|
233
233
|
}
|
|
234
234
|
}
|
|
235
|
-
function
|
|
235
|
+
function cs(s) {
|
|
236
236
|
return [...s].map((e) => {
|
|
237
237
|
const t = e.codePointAt(0);
|
|
238
238
|
return t ? t % 32 + 127461 : void 0;
|
|
@@ -240,15 +240,15 @@ function as(s) {
|
|
|
240
240
|
}
|
|
241
241
|
const ae = "__vue_click_away__", Be = () => document.ontouchstart === null ? "touchstart" : "click", Fe = async (s, e) => {
|
|
242
242
|
Ne(s);
|
|
243
|
-
const t = e.instance, i = e.value,
|
|
244
|
-
if (!
|
|
243
|
+
const t = e.instance, i = e.value, n = typeof i == "function";
|
|
244
|
+
if (!n)
|
|
245
245
|
throw new Error("[maz-ui](vClickOutside) the callback should be a function");
|
|
246
246
|
await He(), s[ae] = (d) => {
|
|
247
|
-
if ((!s || !s.contains(d.target)) && i &&
|
|
247
|
+
if ((!s || !s.contains(d.target)) && i && n)
|
|
248
248
|
return i.call(t, d);
|
|
249
249
|
};
|
|
250
|
-
const
|
|
251
|
-
document.addEventListener(
|
|
250
|
+
const c = Be();
|
|
251
|
+
document.addEventListener(c, s[ae], !1);
|
|
252
252
|
}, Ne = (s) => {
|
|
253
253
|
const e = Be();
|
|
254
254
|
document.removeEventListener(e, s[ae], !1), delete s[ae];
|
|
@@ -258,34 +258,34 @@ const ae = "__vue_click_away__", Be = () => document.ontouchstart === null ? "to
|
|
|
258
258
|
mounted: Fe,
|
|
259
259
|
updated: ut,
|
|
260
260
|
unmounted: Ne
|
|
261
|
-
},
|
|
261
|
+
}, us = {
|
|
262
262
|
install: (s) => {
|
|
263
263
|
s.directive("click-outside", _e);
|
|
264
264
|
}
|
|
265
265
|
}, qe = (s, e, t, i) => {
|
|
266
266
|
s.stopPropagation();
|
|
267
|
-
const { handler:
|
|
267
|
+
const { handler: n, exclude: c } = t.value;
|
|
268
268
|
let d = !1;
|
|
269
|
-
if (
|
|
270
|
-
for (const
|
|
271
|
-
d || (d = i.context.$refs[
|
|
272
|
-
!e.contains(s.target) && !d && i.context[
|
|
269
|
+
if (c && c.length > 0)
|
|
270
|
+
for (const a of c)
|
|
271
|
+
d || (d = i.context.$refs[a].contains(s.target));
|
|
272
|
+
!e.contains(s.target) && !d && i.context[n]();
|
|
273
273
|
}, Ue = () => document.ontouchstart === null ? "touchstart" : "click", mt = (s, e, t) => {
|
|
274
274
|
const i = Ue();
|
|
275
275
|
document.removeEventListener(
|
|
276
276
|
i,
|
|
277
|
-
(
|
|
277
|
+
(n) => qe(n, s, e, t)
|
|
278
278
|
);
|
|
279
279
|
}, dt = (s, e, t) => {
|
|
280
280
|
const i = Ue();
|
|
281
281
|
document.addEventListener(
|
|
282
282
|
i,
|
|
283
|
-
(
|
|
283
|
+
(n) => qe(n, s, e, t)
|
|
284
284
|
);
|
|
285
285
|
}, Ve = {
|
|
286
286
|
mounted: dt,
|
|
287
287
|
unmounted: mt
|
|
288
|
-
},
|
|
288
|
+
}, ms = {
|
|
289
289
|
install: (s) => {
|
|
290
290
|
s.directive("closable", Ve);
|
|
291
291
|
}
|
|
@@ -420,21 +420,21 @@ const ae = "__vue_click_away__", Be = () => document.ontouchstart === null ? "to
|
|
|
420
420
|
};
|
|
421
421
|
class vt {
|
|
422
422
|
constructor(e) {
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
423
|
+
l(this, "options");
|
|
424
|
+
l(this, "loader");
|
|
425
|
+
l(this, "wrapper");
|
|
426
|
+
l(this, "img");
|
|
427
|
+
l(this, "keydownHandler");
|
|
428
|
+
l(this, "onImgLoadedCallback");
|
|
429
|
+
l(this, "buttonsAdded");
|
|
430
|
+
l(this, "defaultOptions", {
|
|
431
431
|
scale: !0,
|
|
432
432
|
blur: !0,
|
|
433
433
|
disabled: !1
|
|
434
434
|
});
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
435
|
+
l(this, "mouseEnterListener");
|
|
436
|
+
l(this, "mouseLeaveListener");
|
|
437
|
+
l(this, "renderPreviewListener");
|
|
438
438
|
if (!e.value)
|
|
439
439
|
throw new Error(
|
|
440
440
|
'[MazUI](zoom-img) Image path must be defined. Ex: `v-zoom-img="<PATH_TO_IMAGE>"`'
|
|
@@ -467,8 +467,8 @@ class vt {
|
|
|
467
467
|
/* OPEN */
|
|
468
468
|
), this.addStyle(ht);
|
|
469
469
|
const i = document.createElement("div");
|
|
470
|
-
i.classList.add("maz-zoom-img"), i.setAttribute("id", "MazImgPreviewFullsize"), i.addEventListener("click", (
|
|
471
|
-
i.isEqualNode(
|
|
470
|
+
i.classList.add("maz-zoom-img"), i.setAttribute("id", "MazImgPreviewFullsize"), i.addEventListener("click", (n) => {
|
|
471
|
+
i.isEqualNode(n.target) && this.closePreview();
|
|
472
472
|
}), typeof t == "object" && (this.img.setAttribute("src", t.src), t.alt && this.img.setAttribute("alt", t.alt), this.img.id = "MazImgElement"), this.wrapper.append(this.img), i.append(this.wrapper), document.body.append(i), this.keyboardEventHandler(!0), setTimeout(() => {
|
|
473
473
|
i && i.classList.add("maz-animate");
|
|
474
474
|
}, 100);
|
|
@@ -478,8 +478,8 @@ class vt {
|
|
|
478
478
|
const e = this.getButton(), t = [], i = this.allInstances.length > 1;
|
|
479
479
|
if (!this.buttonsAdded) {
|
|
480
480
|
if (this.buttonsAdded = !0, i) {
|
|
481
|
-
const
|
|
482
|
-
t.push(
|
|
481
|
+
const n = this.getButton("previous"), c = this.getButton("next");
|
|
482
|
+
t.push(n, c);
|
|
483
483
|
}
|
|
484
484
|
this.wrapper.append(e), i && (this.wrapper.prepend(t[0]), this.wrapper.append(t[1]));
|
|
485
485
|
}
|
|
@@ -522,7 +522,7 @@ class vt {
|
|
|
522
522
|
".maz-zoom-img-instance.maz-is-open"
|
|
523
523
|
);
|
|
524
524
|
if (i) {
|
|
525
|
-
const
|
|
525
|
+
const n = this.allInstances.indexOf(i), c = t ? n + 1 : n - 1, d = this.allInstances[this.getNewInstanceIndex(c)];
|
|
526
526
|
d && this.useNextInstance(i, d);
|
|
527
527
|
}
|
|
528
528
|
}
|
|
@@ -534,8 +534,8 @@ class vt {
|
|
|
534
534
|
"maz-is-open"
|
|
535
535
|
/* OPEN */
|
|
536
536
|
);
|
|
537
|
-
const i = t.getAttribute("data-zoom-src"),
|
|
538
|
-
this.wrapper.style.width = "", this.loader.hidden = !1, i && this.img.setAttribute("src", i),
|
|
537
|
+
const i = t.getAttribute("data-zoom-src"), n = t.getAttribute("data-zoom-alt");
|
|
538
|
+
this.wrapper.style.width = "", this.loader.hidden = !1, i && this.img.setAttribute("src", i), n && this.img.setAttribute("alt", n);
|
|
539
539
|
}
|
|
540
540
|
addStyle(e) {
|
|
541
541
|
const t = document.createElement("style");
|
|
@@ -563,7 +563,7 @@ const je = {
|
|
|
563
563
|
unmounted(s) {
|
|
564
564
|
te.remove(s);
|
|
565
565
|
}
|
|
566
|
-
},
|
|
566
|
+
}, ds = {
|
|
567
567
|
install(s) {
|
|
568
568
|
s.directive("zoom-img", je);
|
|
569
569
|
}
|
|
@@ -581,14 +581,14 @@ const je = {
|
|
|
581
581
|
threshold: 0.1
|
|
582
582
|
}
|
|
583
583
|
};
|
|
584
|
-
class
|
|
584
|
+
class We {
|
|
585
585
|
constructor(e = {}) {
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
586
|
+
l(this, "observers", []);
|
|
587
|
+
l(this, "defaultOptions", ze);
|
|
588
|
+
l(this, "options");
|
|
589
|
+
l(this, "onImgLoadedCallback");
|
|
590
|
+
l(this, "onImgErrorCallback");
|
|
591
|
+
l(this, "hasImgLoaded", !1);
|
|
592
592
|
this.options = this.buildOptions(e), this.onImgLoadedCallback = this.imageIsLoaded.bind(this), this.onImgErrorCallback = this.imageHasError.bind(this);
|
|
593
593
|
}
|
|
594
594
|
async loadErrorPhoto() {
|
|
@@ -629,23 +629,23 @@ class Re {
|
|
|
629
629
|
this.hasImgLoaded = !0, this.removeClass(e, this.options.loadingClass), this.addClass(e, this.options.loadedClass), (i = (t = this.options).onLoaded) == null || i.call(t, e);
|
|
630
630
|
}
|
|
631
631
|
imageHasError(e, t) {
|
|
632
|
-
var i,
|
|
633
|
-
console.warn("[maz-ui][MazLazyImg] Error while loading image", t), this.removeClass(e, this.options.loadingClass), this.addClass(e, this.options.errorClass), (
|
|
632
|
+
var i, n;
|
|
633
|
+
console.warn("[maz-ui][MazLazyImg] Error while loading image", t), this.removeClass(e, this.options.loadingClass), this.addClass(e, this.options.errorClass), (n = (i = this.options).onError) == null || n.call(i, e), this.setDefaultPhoto(e);
|
|
634
634
|
}
|
|
635
635
|
getImageUrl(e, t) {
|
|
636
636
|
const i = this.getImgElement(e).getAttribute("data-lazy-src");
|
|
637
637
|
if (i)
|
|
638
638
|
return i;
|
|
639
639
|
t.value;
|
|
640
|
-
const
|
|
641
|
-
return
|
|
640
|
+
const n = typeof t.value == "object" ? t.value.src : t.value;
|
|
641
|
+
return n || console.warn("[maz-ui][MazLazyImg] src url is not defined"), n;
|
|
642
642
|
}
|
|
643
643
|
async setPictureSourceUrls(e) {
|
|
644
644
|
const t = e.querySelectorAll("source");
|
|
645
645
|
if (t.length > 0)
|
|
646
646
|
for await (const i of t) {
|
|
647
|
-
const
|
|
648
|
-
|
|
647
|
+
const n = i.getAttribute("data-lazy-srcset");
|
|
648
|
+
n ? i.srcset = n : console.warn(
|
|
649
649
|
'[maz-ui][MazLazyImg] the "[data-lazy-srcset]" attribute is not provided on "<source />"'
|
|
650
650
|
);
|
|
651
651
|
}
|
|
@@ -668,8 +668,8 @@ class Re {
|
|
|
668
668
|
return;
|
|
669
669
|
const t = this.options.errorPhoto ?? await this.loadErrorPhoto(), i = e.querySelectorAll("source");
|
|
670
670
|
if (i.length > 0)
|
|
671
|
-
for await (const
|
|
672
|
-
|
|
671
|
+
for await (const n of i)
|
|
672
|
+
n.srcset = t;
|
|
673
673
|
else
|
|
674
674
|
this.setImgSrc(e, t);
|
|
675
675
|
}
|
|
@@ -693,26 +693,26 @@ class Re {
|
|
|
693
693
|
const i = this.getImgElement(e);
|
|
694
694
|
i.src = t;
|
|
695
695
|
}
|
|
696
|
-
handleIntersectionObserver(e, t, i,
|
|
697
|
-
var
|
|
698
|
-
this.observers.push(
|
|
699
|
-
for (const
|
|
700
|
-
if (
|
|
701
|
-
if ((d = (
|
|
696
|
+
handleIntersectionObserver(e, t, i, n) {
|
|
697
|
+
var c, d;
|
|
698
|
+
this.observers.push(n);
|
|
699
|
+
for (const a of i)
|
|
700
|
+
if (a.isIntersecting) {
|
|
701
|
+
if ((d = (c = this.options).onIntersecting) == null || d.call(c, a.target), this.options.observerOnce && n.unobserve(e), this.options.loadOnce && this.hasImgLoaded)
|
|
702
702
|
return;
|
|
703
703
|
this.loadImage(e, t);
|
|
704
704
|
}
|
|
705
705
|
}
|
|
706
706
|
createObserver(e, t) {
|
|
707
|
-
const i = (d,
|
|
708
|
-
this.handleIntersectionObserver(e, t, d,
|
|
709
|
-
},
|
|
710
|
-
new IntersectionObserver(i,
|
|
707
|
+
const i = (d, a) => {
|
|
708
|
+
this.handleIntersectionObserver(e, t, d, a);
|
|
709
|
+
}, n = this.options.observerOptions;
|
|
710
|
+
new IntersectionObserver(i, n).observe(e);
|
|
711
711
|
}
|
|
712
712
|
async imageHandler(e, t, i) {
|
|
713
713
|
if (i === "update")
|
|
714
|
-
for await (const
|
|
715
|
-
|
|
714
|
+
for await (const n of this.observers)
|
|
715
|
+
n.unobserve(e);
|
|
716
716
|
window.IntersectionObserver ? this.createObserver(e, t) : this.loadImage(e, t);
|
|
717
717
|
}
|
|
718
718
|
async bindUpdateHandler(e, t, i) {
|
|
@@ -739,7 +739,7 @@ let se;
|
|
|
739
739
|
const gt = {
|
|
740
740
|
created(s, e) {
|
|
741
741
|
const t = typeof e.value == "object" ? e.value : {};
|
|
742
|
-
se = new
|
|
742
|
+
se = new We(t), se.add(s, e);
|
|
743
743
|
},
|
|
744
744
|
updated(s, e) {
|
|
745
745
|
se.update(s, e);
|
|
@@ -747,7 +747,7 @@ const gt = {
|
|
|
747
747
|
unmounted(s, e) {
|
|
748
748
|
se.remove(s, e);
|
|
749
749
|
}
|
|
750
|
-
}, pt = "lazy-img",
|
|
750
|
+
}, pt = "lazy-img", hs = {
|
|
751
751
|
install(s, e = {}) {
|
|
752
752
|
const t = {
|
|
753
753
|
...ze,
|
|
@@ -756,7 +756,7 @@ const gt = {
|
|
|
756
756
|
...ze.observerOptions,
|
|
757
757
|
...e.observerOptions
|
|
758
758
|
}
|
|
759
|
-
}, i = new
|
|
759
|
+
}, i = new We(t);
|
|
760
760
|
s.directive(pt, {
|
|
761
761
|
created: i.add.bind(i),
|
|
762
762
|
updated: i.update.bind(i),
|
|
@@ -779,24 +779,24 @@ const gt = {
|
|
|
779
779
|
},
|
|
780
780
|
emits: ["close", "previous", "next", "before-close"],
|
|
781
781
|
setup(s, { emit: e }) {
|
|
782
|
-
const t = e, i =
|
|
782
|
+
const t = e, i = E(() => import("./MazSpinner-CKpey7-9.mjs")), n = E(() => import("./x-mark-pPwcH6Hz.mjs")), c = E(() => import("./chevron-left-48sF6neb.mjs"));
|
|
783
783
|
let d;
|
|
784
784
|
et(async () => {
|
|
785
785
|
d = await import("vue-scrollto");
|
|
786
786
|
});
|
|
787
|
-
const
|
|
788
|
-
() =>
|
|
787
|
+
const a = s, v = h(!1), p = h(!1), y = h(!1), f = h(!1), b = h(!1), w = h(!1), k = h(!1), O = h(a.clickedElement instanceof HTMLImageElement), G = h(a.src), B = h(a.alt), F = h(), u = h(), A = g(
|
|
788
|
+
() => O.value && a.animated && !a.scaleAnimation
|
|
789
789
|
), N = g(
|
|
790
|
-
() => (
|
|
791
|
-
), _ = h(!1), le = g(() =>
|
|
790
|
+
() => (O.value || !a.animated) && !a.scaleAnimation
|
|
791
|
+
), _ = h(!1), le = g(() => w.value ? `--is-zoomed maz-cursor-zoom-in maz-max-w-[none] ${_.value ? "maz-h-screen maz-w-auto" : "maz-h-auto maz-w-screen"}` : `cursor-zoom-out ${_.value ? "maz-w-screen maz-h-screen --is-landscape" : "maz-h-screen maz-w-auto"}`);
|
|
792
792
|
function ce() {
|
|
793
|
-
|
|
793
|
+
p.value = !0, y.value = !1, f.value = !0;
|
|
794
794
|
}
|
|
795
795
|
function q() {
|
|
796
|
-
t("before-close"),
|
|
796
|
+
t("before-close"), v.value = !1;
|
|
797
797
|
}
|
|
798
798
|
function Q(r) {
|
|
799
|
-
r.key === "Escape" && (r.preventDefault(), q()), (r.key === "ArrowLeft" || r.key === "ArrowRight") && (r.preventDefault(),
|
|
799
|
+
r.key === "Escape" && (r.preventDefault(), q()), (r.key === "ArrowLeft" || r.key === "ArrowRight") && (r.preventDefault(), P(r.key === "ArrowRight"));
|
|
800
800
|
}
|
|
801
801
|
function ue() {
|
|
802
802
|
document.documentElement.classList.add("--m-fullscreen-open");
|
|
@@ -804,137 +804,137 @@ const gt = {
|
|
|
804
804
|
function me() {
|
|
805
805
|
document.documentElement.classList.remove("--m-fullscreen-open");
|
|
806
806
|
}
|
|
807
|
-
function
|
|
807
|
+
function R() {
|
|
808
808
|
return [...document.querySelectorAll(".m-fullscreen-img-instance")];
|
|
809
809
|
}
|
|
810
|
-
function J(r,
|
|
811
|
-
return
|
|
810
|
+
function J(r, o) {
|
|
811
|
+
return o < 0 ? r.length - 1 : o >= r.length ? 0 : o;
|
|
812
812
|
}
|
|
813
|
-
async function de(r,
|
|
814
|
-
r.classList.remove(
|
|
815
|
-
const
|
|
816
|
-
B.value =
|
|
813
|
+
async function de(r, o) {
|
|
814
|
+
r.classList.remove(a.openInstanceClass), o.classList.add(a.openInstanceClass);
|
|
815
|
+
const m = o.getAttribute("data-src"), z = o.getAttribute("data-alt");
|
|
816
|
+
B.value = z ?? void 0, m && (G.value = m), p.value = !1, await X(300), p.value || (y.value = !0);
|
|
817
817
|
}
|
|
818
|
-
function
|
|
819
|
-
const
|
|
820
|
-
`.m-fullscreen-img-instance.${
|
|
818
|
+
function P(r) {
|
|
819
|
+
const o = document.querySelector(
|
|
820
|
+
`.m-fullscreen-img-instance.${a.openInstanceClass}`
|
|
821
821
|
);
|
|
822
|
-
if (
|
|
823
|
-
const
|
|
824
|
-
x && de(
|
|
822
|
+
if (o) {
|
|
823
|
+
const m = R(), z = m.indexOf(o), H = r ? z + 1 : z - 1, x = m[J(m, H)];
|
|
824
|
+
x && de(o, x), t(r ? "next" : "previous");
|
|
825
825
|
}
|
|
826
826
|
}
|
|
827
827
|
async function he(r) {
|
|
828
|
-
const
|
|
829
|
-
|
|
830
|
-
const
|
|
831
|
-
d.scrollTo(
|
|
832
|
-
container:
|
|
828
|
+
const o = r.target;
|
|
829
|
+
o.style.width = `${o.clientWidth}px`, o.style.height = `${o.clientHeight}px`, await X(0), w.value = !w.value, o.style.removeProperty("width"), o.style.removeProperty("height"), await X(0);
|
|
830
|
+
const m = o.clientWidth / r.clientY, H = window.innerWidth / m - window.innerHeight / 2;
|
|
831
|
+
d.scrollTo(o, 200, {
|
|
832
|
+
container: o.parentElement,
|
|
833
833
|
easing: "linear",
|
|
834
|
-
offset:
|
|
834
|
+
offset: w.value ? H : 0
|
|
835
835
|
});
|
|
836
836
|
}
|
|
837
837
|
Ee(async () => {
|
|
838
|
-
await He(), document.addEventListener("keydown", Q),
|
|
838
|
+
await He(), document.addEventListener("keydown", Q), v.value = !0, y.value = !0, ue(), b.value = R().length > 1, u.value && (_.value = a.clickedElementBounds.height < a.clickedElementBounds.width);
|
|
839
839
|
});
|
|
840
840
|
function K() {
|
|
841
|
-
|
|
841
|
+
u.value && (k.value = !0, u.value.style.removeProperty("margin-left"), u.value.style.removeProperty("margin-right"), u.value.style.opacity = "0.5", u.value.style.width = `${a.clickedElementBounds.width}px`, u.value.style.height = `${a.clickedElementBounds.height}px`, u.value.style.top = `${a.clickedElementBounds.top}px`, u.value.style.left = `${a.clickedElementBounds.left}px`);
|
|
842
842
|
}
|
|
843
843
|
async function ve() {
|
|
844
|
-
if (await X(0),
|
|
845
|
-
|
|
846
|
-
const r = window.innerWidth,
|
|
844
|
+
if (await X(0), u.value) {
|
|
845
|
+
u.value.style.opacity = "1", u.value.style.removeProperty("height"), u.value.style.removeProperty("width"), u.value.style.removeProperty("transform");
|
|
846
|
+
const r = window.innerWidth, o = window.innerHeight, m = a.clickedElementBounds.height, z = a.clickedElementBounds.width;
|
|
847
847
|
if (_.value) {
|
|
848
|
-
|
|
849
|
-
const
|
|
850
|
-
|
|
848
|
+
u.value.style.left = "0px";
|
|
849
|
+
const H = m * r / z, x = (o - H) / 2;
|
|
850
|
+
u.value.style.top = `${x <= 0 ? 0 : x}px`;
|
|
851
851
|
} else {
|
|
852
|
-
|
|
853
|
-
const
|
|
854
|
-
|
|
852
|
+
u.value.style.top = "0px";
|
|
853
|
+
const H = z * o / m, x = (r - H) / 2;
|
|
854
|
+
u.value.style.left = `${x <= 0 ? 0 : x}px`;
|
|
855
855
|
}
|
|
856
856
|
}
|
|
857
857
|
}
|
|
858
858
|
function Y() {
|
|
859
|
-
|
|
859
|
+
u.value && (u.value.style.removeProperty("top"), u.value.style.removeProperty("left"), u.value.style.marginLeft = "auto", u.value.style.marginRight = "auto", u.value.style.removeProperty("opacity")), k.value = !1;
|
|
860
860
|
}
|
|
861
861
|
function fe() {
|
|
862
|
-
if (
|
|
863
|
-
const { left: r, top:
|
|
864
|
-
|
|
862
|
+
if (u.value) {
|
|
863
|
+
const { left: r, top: o } = u.value.getBoundingClientRect();
|
|
864
|
+
u.value.style.left = `${r}px`, u.value.style.top = `${o}px`, u.value.style.width = `${u.value.width}px`, u.value.style.height = `${u.value.height}px`, k.value = !0;
|
|
865
865
|
}
|
|
866
866
|
}
|
|
867
867
|
function ge() {
|
|
868
|
-
var r,
|
|
869
|
-
t("close"), (r = F.value) == null || r.remove(), (
|
|
868
|
+
var r, o;
|
|
869
|
+
t("close"), (r = F.value) == null || r.remove(), (o = a.destroy) == null || o.call(a);
|
|
870
870
|
}
|
|
871
871
|
return tt(() => {
|
|
872
872
|
document.removeEventListener("keydown", Q), me();
|
|
873
|
-
}), (r,
|
|
873
|
+
}), (r, o) => (L(), Z("div", {
|
|
874
874
|
ref_key: "FullscreenImgElement",
|
|
875
875
|
ref: F,
|
|
876
876
|
role: "button",
|
|
877
877
|
class: re(["m-fullscreen-img", { "--animation-active": k.value }]),
|
|
878
878
|
tabindex: "0",
|
|
879
|
-
onClick:
|
|
880
|
-
onKeypress: st(
|
|
879
|
+
onClick: M(q, ["self"]),
|
|
880
|
+
onKeypress: st(M(q, ["prevent"]), ["esc"])
|
|
881
881
|
}, [
|
|
882
|
-
be(
|
|
882
|
+
be($(
|
|
883
883
|
T(i),
|
|
884
884
|
{ class: "m-fullscreen-img-loader maz-h-16" },
|
|
885
885
|
null,
|
|
886
886
|
512
|
|
887
887
|
/* NEED_PATCH */
|
|
888
888
|
), [
|
|
889
|
-
[we,
|
|
889
|
+
[we, y.value]
|
|
890
890
|
]),
|
|
891
|
-
|
|
891
|
+
f.value && b.value ? (L(), Z("button", {
|
|
892
892
|
key: 0,
|
|
893
893
|
type: "button",
|
|
894
894
|
class: "m-fullscreen-btn --next",
|
|
895
|
-
onClick:
|
|
895
|
+
onClick: o[0] || (o[0] = M((m) => P(!0), ["stop"]))
|
|
896
896
|
}, [
|
|
897
|
-
|
|
898
|
-
])) :
|
|
899
|
-
|
|
897
|
+
$(T(c), { class: "maz-rotate-90 maz-text-2xl" })
|
|
898
|
+
])) : D("v-if", !0),
|
|
899
|
+
v.value && f.value && b.value ? (L(), Z("button", {
|
|
900
900
|
key: 1,
|
|
901
901
|
type: "button",
|
|
902
902
|
class: "m-fullscreen-btn --previous",
|
|
903
|
-
onClick:
|
|
903
|
+
onClick: o[1] || (o[1] = M((m) => P(!1), ["stop"]))
|
|
904
904
|
}, [
|
|
905
|
-
|
|
906
|
-
])) :
|
|
905
|
+
$(T(c), { class: "maz-text-2xl" })
|
|
906
|
+
])) : D("v-if", !0),
|
|
907
907
|
I("button", {
|
|
908
908
|
type: "button",
|
|
909
909
|
class: "m-fullscreen-btn --close",
|
|
910
910
|
onClick: q
|
|
911
911
|
}, [
|
|
912
|
-
|
|
912
|
+
$(T(n), { class: "maz-text-2xl" })
|
|
913
913
|
]),
|
|
914
914
|
I("div", bt, [
|
|
915
|
-
|
|
915
|
+
$(De, {
|
|
916
916
|
name: N.value ? void 0 : "maz-scale-fade",
|
|
917
|
-
onBeforeEnter:
|
|
918
|
-
onEnter:
|
|
919
|
-
onAfterEnter:
|
|
920
|
-
onBeforeLeave:
|
|
921
|
-
onLeave:
|
|
917
|
+
onBeforeEnter: o[3] || (o[3] = (m) => A.value && K()),
|
|
918
|
+
onEnter: o[4] || (o[4] = (m) => A.value && ve()),
|
|
919
|
+
onAfterEnter: o[5] || (o[5] = (m) => A.value && Y()),
|
|
920
|
+
onBeforeLeave: o[6] || (o[6] = (m) => A.value && fe()),
|
|
921
|
+
onLeave: o[7] || (o[7] = (m) => A.value && K()),
|
|
922
922
|
onAfterLeave: ge,
|
|
923
923
|
persisted: ""
|
|
924
924
|
}, {
|
|
925
|
-
default:
|
|
925
|
+
default: oe(() => [
|
|
926
926
|
be(I("img", {
|
|
927
927
|
id: "ZvImgElement",
|
|
928
928
|
ref_key: "ImgElement",
|
|
929
|
-
ref:
|
|
929
|
+
ref: u,
|
|
930
930
|
src: G.value,
|
|
931
931
|
alt: B.value,
|
|
932
932
|
tabindex: "0",
|
|
933
933
|
class: re([{ zoomable: r.zoom }, le.value]),
|
|
934
934
|
onLoad: ce,
|
|
935
|
-
onClick:
|
|
935
|
+
onClick: o[2] || (o[2] = (m) => r.zoom ? he(m) : void 0)
|
|
936
936
|
}, null, 42, wt), [
|
|
937
|
-
[we,
|
|
937
|
+
[we, v.value]
|
|
938
938
|
])
|
|
939
939
|
]),
|
|
940
940
|
_: 1
|
|
@@ -943,16 +943,16 @@ const gt = {
|
|
|
943
943
|
])
|
|
944
944
|
], 42, yt));
|
|
945
945
|
}
|
|
946
|
-
}),
|
|
946
|
+
}), Re = (s, e) => {
|
|
947
947
|
const t = s.__vccOpts || s;
|
|
948
|
-
for (const [i,
|
|
949
|
-
t[i] =
|
|
948
|
+
for (const [i, n] of e)
|
|
949
|
+
t[i] = n;
|
|
950
950
|
return t;
|
|
951
|
-
}, Et = /* @__PURE__ */
|
|
951
|
+
}, Et = /* @__PURE__ */ Re(zt, [["__scopeId", "data-v-d0c959c7"]]), Ae = "m-fullscreen-is-open";
|
|
952
952
|
class Lt {
|
|
953
953
|
constructor() {
|
|
954
|
-
|
|
955
|
-
|
|
954
|
+
l(this, "options");
|
|
955
|
+
l(this, "defaultOptions", {
|
|
956
956
|
scaleOnHover: !1,
|
|
957
957
|
blurOnHover: !1,
|
|
958
958
|
disabled: !1,
|
|
@@ -960,17 +960,17 @@ class Lt {
|
|
|
960
960
|
zoom: !0,
|
|
961
961
|
scaleAnimation: !1
|
|
962
962
|
});
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
963
|
+
l(this, "mouseEnterListener");
|
|
964
|
+
l(this, "mouseLeaveListener");
|
|
965
|
+
l(this, "renderPreviewListener");
|
|
966
966
|
}
|
|
967
967
|
buildOptions(e, t) {
|
|
968
|
-
const i = typeof t.value == "object" ? t.value : { src: t.value, alt: void 0 },
|
|
968
|
+
const i = typeof t.value == "object" ? t.value : { src: t.value, alt: void 0 }, n = (i == null ? void 0 : i.src) ?? this.getImgSrc(e), c = (i == null ? void 0 : i.alt) ?? this.getImgAlt(e);
|
|
969
969
|
return {
|
|
970
970
|
...this.defaultOptions,
|
|
971
971
|
...i,
|
|
972
|
-
src:
|
|
973
|
-
alt:
|
|
972
|
+
src: n,
|
|
973
|
+
alt: c
|
|
974
974
|
};
|
|
975
975
|
}
|
|
976
976
|
get allInstances() {
|
|
@@ -1031,7 +1031,7 @@ const Ke = {
|
|
|
1031
1031
|
unmounted(s) {
|
|
1032
1032
|
return ie.remove(s);
|
|
1033
1033
|
}
|
|
1034
|
-
},
|
|
1034
|
+
}, vs = {
|
|
1035
1035
|
install(s) {
|
|
1036
1036
|
s.directive("fullscreen-img", Ke);
|
|
1037
1037
|
}
|
|
@@ -1056,7 +1056,7 @@ const Ke = {
|
|
|
1056
1056
|
name: "fullscreen-img",
|
|
1057
1057
|
directive: Ke
|
|
1058
1058
|
}
|
|
1059
|
-
],
|
|
1059
|
+
], fs = {
|
|
1060
1060
|
install(s) {
|
|
1061
1061
|
for (const { name: e, directive: t } of It)
|
|
1062
1062
|
s.directive(e, t);
|
|
@@ -1085,8 +1085,8 @@ const Ke = {
|
|
|
1085
1085
|
xt(s, e, i);
|
|
1086
1086
|
try {
|
|
1087
1087
|
return At(s, e, i);
|
|
1088
|
-
} catch (
|
|
1089
|
-
throw new Error(`[maz-ui](FilterCurrency) ${
|
|
1088
|
+
} catch (n) {
|
|
1089
|
+
throw new Error(`[maz-ui](FilterCurrency) ${n}`);
|
|
1090
1090
|
}
|
|
1091
1091
|
}, St = {
|
|
1092
1092
|
month: "short",
|
|
@@ -1099,10 +1099,10 @@ const Ke = {
|
|
|
1099
1099
|
throw new TypeError("[maz-ui](FilterDate) The `locale` attribute must be a string.");
|
|
1100
1100
|
const i = t ?? St;
|
|
1101
1101
|
try {
|
|
1102
|
-
const
|
|
1103
|
-
return new Intl.DateTimeFormat(e, i).format(
|
|
1104
|
-
} catch (
|
|
1105
|
-
throw new Error(`[maz-ui](FilterDate) ${
|
|
1102
|
+
const n = s instanceof Date ? s : new Date(s);
|
|
1103
|
+
return new Intl.DateTimeFormat(e, i).format(n);
|
|
1104
|
+
} catch (n) {
|
|
1105
|
+
throw new Error(`[maz-ui](FilterDate) ${n}`);
|
|
1106
1106
|
}
|
|
1107
1107
|
}, Pt = {
|
|
1108
1108
|
minimumFractionDigits: 2
|
|
@@ -1119,44 +1119,44 @@ const Ke = {
|
|
|
1119
1119
|
throw new TypeError("[maz-ui](FilterNumber) The `locale` attribute must be a string.");
|
|
1120
1120
|
try {
|
|
1121
1121
|
return new Intl.NumberFormat(e, i).format(Number(s));
|
|
1122
|
-
} catch (
|
|
1123
|
-
throw new Error(`[maz-ui](FilterNumber) ${
|
|
1122
|
+
} catch (n) {
|
|
1123
|
+
throw new Error(`[maz-ui](FilterNumber) ${n}`);
|
|
1124
1124
|
}
|
|
1125
1125
|
}, $t = {
|
|
1126
1126
|
capitalize: Tt,
|
|
1127
1127
|
currency: Ct,
|
|
1128
1128
|
date: Ot,
|
|
1129
1129
|
number: Ht
|
|
1130
|
-
},
|
|
1130
|
+
}, gs = {
|
|
1131
1131
|
install(s) {
|
|
1132
1132
|
s.provide("filters", $t);
|
|
1133
1133
|
}
|
|
1134
1134
|
}, Dt = ({ timeout: s, callback: e, remainingTimeUpdate: t = 200 }) => {
|
|
1135
1135
|
const i = h(s);
|
|
1136
|
-
let
|
|
1137
|
-
function
|
|
1136
|
+
let n;
|
|
1137
|
+
function c() {
|
|
1138
1138
|
i.value = s, d();
|
|
1139
1139
|
}
|
|
1140
1140
|
function d() {
|
|
1141
|
-
|
|
1142
|
-
i.value -= t, i.value <= 0 && (
|
|
1141
|
+
n || (n = setInterval(() => {
|
|
1142
|
+
i.value -= t, i.value <= 0 && (p(), e == null || e());
|
|
1143
1143
|
}, t));
|
|
1144
1144
|
}
|
|
1145
|
-
function
|
|
1146
|
-
|
|
1145
|
+
function a() {
|
|
1146
|
+
n && (clearInterval(n), n = void 0);
|
|
1147
1147
|
}
|
|
1148
|
-
function
|
|
1149
|
-
!
|
|
1148
|
+
function v() {
|
|
1149
|
+
!n && i.value > 0 && d();
|
|
1150
1150
|
}
|
|
1151
|
-
function
|
|
1152
|
-
i.value = s,
|
|
1151
|
+
function p() {
|
|
1152
|
+
i.value = s, a();
|
|
1153
1153
|
}
|
|
1154
1154
|
return {
|
|
1155
1155
|
remainingTime: i,
|
|
1156
|
-
start:
|
|
1157
|
-
pause:
|
|
1158
|
-
resume:
|
|
1159
|
-
stop:
|
|
1156
|
+
start: c,
|
|
1157
|
+
pause: a,
|
|
1158
|
+
resume: v,
|
|
1159
|
+
stop: p
|
|
1160
1160
|
};
|
|
1161
1161
|
}, Mt = { class: "m-toast__message-wrapper" }, Bt = { class: "m-toast__message" }, Ft = { class: "maz-flex maz-items-center maz-gap-2" }, Nt = { key: 0 }, _t = { class: "progress-bar maz-absolute maz-inset-x-0 maz-bottom-0 maz-h-1" }, qt = /* @__PURE__ */ $e({
|
|
1162
1162
|
__name: "MazToast",
|
|
@@ -1180,53 +1180,53 @@ const Ke = {
|
|
|
1180
1180
|
},
|
|
1181
1181
|
emits: ["close", "click", "open"],
|
|
1182
1182
|
setup(s, { emit: e }) {
|
|
1183
|
-
const t =
|
|
1183
|
+
const t = E(() => import("./MazBtn-23G6MO1u.mjs")), i = E(() => import("./x-mark-pPwcH6Hz.mjs")), n = E(
|
|
1184
1184
|
() => import("./arrow-top-right-on-square-JGWhrxDH.mjs")
|
|
1185
|
-
),
|
|
1185
|
+
), c = E(
|
|
1186
1186
|
() => import("./exclamation-triangle-KCpIguWV.mjs")
|
|
1187
|
-
), d =
|
|
1187
|
+
), d = E(
|
|
1188
1188
|
() => import("./exclamation-circle-AoEMgPzE.mjs")
|
|
1189
|
-
),
|
|
1189
|
+
), a = E(
|
|
1190
1190
|
() => import("./information-circle-5aSd26ke.mjs")
|
|
1191
|
-
),
|
|
1192
|
-
switch (
|
|
1191
|
+
), v = E(() => import("./check-circle-JGd6LGss.mjs")), p = E(() => import("./link-CVsbXQMi.mjs")), y = h(), f = s, b = g(() => {
|
|
1192
|
+
switch (f.type) {
|
|
1193
1193
|
case "danger":
|
|
1194
|
-
return
|
|
1194
|
+
return c;
|
|
1195
1195
|
case "info":
|
|
1196
|
-
return
|
|
1196
|
+
return a;
|
|
1197
1197
|
case "success":
|
|
1198
|
-
return
|
|
1198
|
+
return v;
|
|
1199
1199
|
case "warning":
|
|
1200
1200
|
return d;
|
|
1201
1201
|
default:
|
|
1202
1202
|
return;
|
|
1203
1203
|
}
|
|
1204
|
-
}),
|
|
1204
|
+
}), w = e, k = g(() => f.position.includes("top") ? "top" : "bottom"), O = g(() => f.position.includes("left") ? "left" : f.position.includes("right") ? "right" : "center"), G = g(() => O.value !== "center" ? O.value === "right" ? "m-slide-right" : "m-slide-left" : k.value === "top" ? "m-slide-top" : "m-slide-bottom"), B = h(!1), F = h(!1), u = h(), A = `m-toast-container --${k.value} --${O.value}`, N = `.${A.replaceAll(" ", ".")}`, { start: _, stop: le, pause: ce, resume: q, remainingTime: Q } = Dt({
|
|
1205
1205
|
callback: Y,
|
|
1206
|
-
timeout:
|
|
1206
|
+
timeout: f.timeout
|
|
1207
1207
|
});
|
|
1208
1208
|
function ue() {
|
|
1209
1209
|
const r = document.querySelector(N);
|
|
1210
1210
|
if (!r && !r) {
|
|
1211
|
-
const
|
|
1212
|
-
|
|
1211
|
+
const o = document.body, m = document.createElement("div");
|
|
1212
|
+
m.className = A, o.append(m);
|
|
1213
1213
|
}
|
|
1214
1214
|
}
|
|
1215
1215
|
function me() {
|
|
1216
1216
|
const r = document.querySelector(N);
|
|
1217
|
-
return !
|
|
1217
|
+
return !f.queue && f.maxToasts === !1 ? !1 : typeof f.maxToasts == "number" && r ? f.maxToasts <= r.childElementCount : r && r.childElementCount > 0;
|
|
1218
1218
|
}
|
|
1219
|
-
function
|
|
1219
|
+
function R() {
|
|
1220
1220
|
if (me()) {
|
|
1221
|
-
|
|
1221
|
+
u.value = setTimeout(R, 250);
|
|
1222
1222
|
return;
|
|
1223
1223
|
}
|
|
1224
1224
|
const r = document.querySelector(N);
|
|
1225
|
-
|
|
1225
|
+
y.value && r && r.prepend(y.value), F.value = !0, _();
|
|
1226
1226
|
}
|
|
1227
1227
|
const J = h("100%");
|
|
1228
1228
|
function de() {
|
|
1229
|
-
switch (
|
|
1229
|
+
switch (f.type) {
|
|
1230
1230
|
case "danger":
|
|
1231
1231
|
return "maz-bg-danger-700";
|
|
1232
1232
|
case "info":
|
|
@@ -1243,64 +1243,64 @@ const Ke = {
|
|
|
1243
1243
|
() => Q.value,
|
|
1244
1244
|
(r) => {
|
|
1245
1245
|
if (typeof r == "number") {
|
|
1246
|
-
const
|
|
1247
|
-
J.value = `${
|
|
1246
|
+
const o = 100 * r / f.timeout;
|
|
1247
|
+
J.value = `${o}%`, r <= 0 && Y();
|
|
1248
1248
|
}
|
|
1249
1249
|
}
|
|
1250
1250
|
);
|
|
1251
|
-
function
|
|
1252
|
-
|
|
1251
|
+
function P(r) {
|
|
1252
|
+
w("click", r), f.persistent || Y();
|
|
1253
1253
|
}
|
|
1254
|
-
async function he(r,
|
|
1255
|
-
var
|
|
1256
|
-
B.value = !0, await r(), B.value = !1, (
|
|
1254
|
+
async function he(r, o) {
|
|
1255
|
+
var m;
|
|
1256
|
+
B.value = !0, await r(), B.value = !1, (m = f.action) != null && m.closeToast && P(o);
|
|
1257
1257
|
}
|
|
1258
1258
|
function K(r) {
|
|
1259
|
-
|
|
1259
|
+
f.noPauseOnHover || (r ? ce() : q());
|
|
1260
1260
|
}
|
|
1261
1261
|
function ve() {
|
|
1262
|
-
le(),
|
|
1262
|
+
le(), u.value && clearTimeout(u.value);
|
|
1263
1263
|
}
|
|
1264
1264
|
function Y() {
|
|
1265
1265
|
ve(), F.value = !1;
|
|
1266
1266
|
}
|
|
1267
1267
|
function fe() {
|
|
1268
|
-
|
|
1268
|
+
w("open");
|
|
1269
1269
|
}
|
|
1270
1270
|
function ge() {
|
|
1271
|
-
var
|
|
1272
|
-
|
|
1271
|
+
var o;
|
|
1272
|
+
w("close"), (o = y.value) == null || o.remove();
|
|
1273
1273
|
const r = document.querySelector(N);
|
|
1274
1274
|
r && !(r != null && r.hasChildNodes()) && r.remove();
|
|
1275
1275
|
}
|
|
1276
1276
|
return Ee(() => {
|
|
1277
|
-
ue(),
|
|
1278
|
-
}), (r,
|
|
1277
|
+
ue(), R();
|
|
1278
|
+
}), (r, o) => (L(), U(De, {
|
|
1279
1279
|
name: G.value,
|
|
1280
1280
|
onAfterLeave: ge,
|
|
1281
1281
|
onAfterEnter: fe,
|
|
1282
1282
|
persisted: ""
|
|
1283
1283
|
}, {
|
|
1284
|
-
default:
|
|
1284
|
+
default: oe(() => [
|
|
1285
1285
|
be(I(
|
|
1286
1286
|
"button",
|
|
1287
1287
|
{
|
|
1288
1288
|
ref_key: "Toaster",
|
|
1289
|
-
ref:
|
|
1290
|
-
class: re(["m-toast", [`--${s.type}`, `--${k.value}`, `--${
|
|
1289
|
+
ref: y,
|
|
1290
|
+
class: re(["m-toast", [`--${s.type}`, `--${k.value}`, `--${O.value}`, { "maz-pb-1": s.timeout }]]),
|
|
1291
1291
|
role: "alert",
|
|
1292
|
-
onMouseover:
|
|
1293
|
-
onMouseleave:
|
|
1294
|
-
onClick:
|
|
1295
|
-
var
|
|
1296
|
-
return s.link && !((
|
|
1292
|
+
onMouseover: o[2] || (o[2] = (m) => K(!0)),
|
|
1293
|
+
onMouseleave: o[3] || (o[3] = (m) => K(!1)),
|
|
1294
|
+
onClick: o[4] || (o[4] = M((m) => {
|
|
1295
|
+
var z;
|
|
1296
|
+
return s.link && !((z = s.link) != null && z.closeToast) ? void 0 : P(m);
|
|
1297
1297
|
}, ["stop"]))
|
|
1298
1298
|
},
|
|
1299
1299
|
[
|
|
1300
|
-
|
|
1300
|
+
b.value ? (L(), U(nt(b.value), {
|
|
1301
1301
|
key: 0,
|
|
1302
1302
|
class: "maz-text-2xl"
|
|
1303
|
-
})) :
|
|
1303
|
+
})) : D("v-if", !0),
|
|
1304
1304
|
I("div", Mt, [
|
|
1305
1305
|
I(
|
|
1306
1306
|
"p",
|
|
@@ -1310,17 +1310,17 @@ const Ke = {
|
|
|
1310
1310
|
/* TEXT */
|
|
1311
1311
|
)
|
|
1312
1312
|
]),
|
|
1313
|
-
s.action ? (
|
|
1313
|
+
s.action ? (L(), U(T(t), {
|
|
1314
1314
|
key: 1,
|
|
1315
1315
|
"data-test": "action-btn",
|
|
1316
1316
|
color: s.type,
|
|
1317
1317
|
pastel: "",
|
|
1318
1318
|
loading: B.value,
|
|
1319
1319
|
size: "sm",
|
|
1320
|
-
onClick:
|
|
1320
|
+
onClick: o[0] || (o[0] = M((m) => he(s.action.func, m), ["stop"]))
|
|
1321
1321
|
}, {
|
|
1322
|
-
default:
|
|
1323
|
-
|
|
1322
|
+
default: oe(() => [
|
|
1323
|
+
ot(
|
|
1324
1324
|
pe(s.action.text),
|
|
1325
1325
|
1
|
|
1326
1326
|
/* TEXT */
|
|
@@ -1328,8 +1328,8 @@ const Ke = {
|
|
|
1328
1328
|
]),
|
|
1329
1329
|
_: 1
|
|
1330
1330
|
/* STABLE */
|
|
1331
|
-
}, 8, ["color", "loading"])) :
|
|
1332
|
-
s.link ? (
|
|
1331
|
+
}, 8, ["color", "loading"])) : D("v-if", !0),
|
|
1332
|
+
s.link ? (L(), U(T(t), {
|
|
1333
1333
|
key: 2,
|
|
1334
1334
|
"data-test": "link-btn",
|
|
1335
1335
|
color: s.type,
|
|
@@ -1338,21 +1338,21 @@ const Ke = {
|
|
|
1338
1338
|
href: s.link.href,
|
|
1339
1339
|
target: s.link.target ?? "_self"
|
|
1340
1340
|
}, {
|
|
1341
|
-
default:
|
|
1342
|
-
var
|
|
1341
|
+
default: oe(() => {
|
|
1342
|
+
var m;
|
|
1343
1343
|
return [
|
|
1344
1344
|
I("div", Ft, [
|
|
1345
|
-
s.link.text ? (
|
|
1345
|
+
s.link.text ? (L(), Z(
|
|
1346
1346
|
"span",
|
|
1347
1347
|
Nt,
|
|
1348
1348
|
pe(s.link.text),
|
|
1349
1349
|
1
|
|
1350
1350
|
/* TEXT */
|
|
1351
|
-
)) :
|
|
1352
|
-
((
|
|
1351
|
+
)) : D("v-if", !0),
|
|
1352
|
+
((m = s.link) == null ? void 0 : m.target) == "_blank" ? (L(), U(T(n), {
|
|
1353
1353
|
key: 1,
|
|
1354
1354
|
class: "maz-text-xl"
|
|
1355
|
-
})) : (
|
|
1355
|
+
})) : (L(), U(T(p), {
|
|
1356
1356
|
key: 2,
|
|
1357
1357
|
class: "maz-text-xl"
|
|
1358
1358
|
}))
|
|
@@ -1361,13 +1361,13 @@ const Ke = {
|
|
|
1361
1361
|
}),
|
|
1362
1362
|
_: 1
|
|
1363
1363
|
/* STABLE */
|
|
1364
|
-
}, 8, ["color", "href", "target"])) :
|
|
1365
|
-
s.persistent ?
|
|
1364
|
+
}, 8, ["color", "href", "target"])) : D("v-if", !0),
|
|
1365
|
+
s.persistent ? D("v-if", !0) : (L(), Z("button", {
|
|
1366
1366
|
key: 3,
|
|
1367
1367
|
class: "--close",
|
|
1368
|
-
onClick:
|
|
1368
|
+
onClick: o[1] || (o[1] = M((m) => P(m), ["stop"]))
|
|
1369
1369
|
}, [
|
|
1370
|
-
|
|
1370
|
+
$(T(i), { class: "--icon maz-text-xl" })
|
|
1371
1371
|
])),
|
|
1372
1372
|
I("div", _t, [
|
|
1373
1373
|
I(
|
|
@@ -1394,7 +1394,7 @@ const Ke = {
|
|
|
1394
1394
|
/* STABLE */
|
|
1395
1395
|
}, 8, ["name"]));
|
|
1396
1396
|
}
|
|
1397
|
-
}), Ut = /* @__PURE__ */
|
|
1397
|
+
}), Ut = /* @__PURE__ */ Re(qt, [["__scopeId", "data-v-ee210f61"]]), Vt = {
|
|
1398
1398
|
position: "bottom-right",
|
|
1399
1399
|
timeout: 1e4,
|
|
1400
1400
|
persistent: !1
|
|
@@ -1404,14 +1404,14 @@ class jt {
|
|
|
1404
1404
|
this.app = e, this.globalOptions = t;
|
|
1405
1405
|
}
|
|
1406
1406
|
show(e, t) {
|
|
1407
|
-
const i = { message: e, ...t },
|
|
1407
|
+
const i = { message: e, ...t }, n = {
|
|
1408
1408
|
...Vt,
|
|
1409
1409
|
...i,
|
|
1410
1410
|
...this.globalOptions,
|
|
1411
1411
|
...t
|
|
1412
1412
|
};
|
|
1413
1413
|
Me(Ut, {
|
|
1414
|
-
props:
|
|
1414
|
+
props: n,
|
|
1415
1415
|
app: this.app
|
|
1416
1416
|
});
|
|
1417
1417
|
}
|
|
@@ -1438,14 +1438,14 @@ class jt {
|
|
|
1438
1438
|
}
|
|
1439
1439
|
}
|
|
1440
1440
|
let xe;
|
|
1441
|
-
const
|
|
1441
|
+
const ps = {
|
|
1442
1442
|
install(s, e) {
|
|
1443
1443
|
xe = new jt(s, e), s.provide("toast", xe);
|
|
1444
1444
|
}
|
|
1445
|
-
}, V = "",
|
|
1445
|
+
}, V = "", Wt = (s) => s.filter((e, t, i) => t === i.indexOf(e)), Rt = (s) => (e = V) => typeof e == "function" ? s.findIndex((...t) => e(...t)) > -1 : s.includes(e), Kt = (s) => s.length > 0, Yt = (s) => (e = V) => Wt([...s, e]), Xt = (s) => (e = V) => s.filter((t) => t !== e);
|
|
1446
1446
|
class Zt {
|
|
1447
1447
|
constructor() {
|
|
1448
|
-
|
|
1448
|
+
l(this, "_loaders", h([]));
|
|
1449
1449
|
}
|
|
1450
1450
|
get loaders() {
|
|
1451
1451
|
return g(() => this._loaders.value);
|
|
@@ -1460,10 +1460,10 @@ class Zt {
|
|
|
1460
1460
|
return g(() => Kt(this._loaders.value));
|
|
1461
1461
|
}
|
|
1462
1462
|
isLoading(e = V) {
|
|
1463
|
-
return g(() =>
|
|
1463
|
+
return g(() => Rt(this._loaders.value)(e)).value;
|
|
1464
1464
|
}
|
|
1465
1465
|
}
|
|
1466
|
-
const Gt = new Zt(),
|
|
1466
|
+
const Gt = new Zt(), ys = {
|
|
1467
1467
|
install: (s) => {
|
|
1468
1468
|
s.provide("wait", Gt);
|
|
1469
1469
|
}
|
|
@@ -1482,7 +1482,7 @@ const Gt = new Zt(), gs = {
|
|
|
1482
1482
|
};
|
|
1483
1483
|
class Qt {
|
|
1484
1484
|
constructor(e) {
|
|
1485
|
-
|
|
1485
|
+
l(this, "options");
|
|
1486
1486
|
this.options = {
|
|
1487
1487
|
delay: (e == null ? void 0 : e.delay) ?? ye.delay,
|
|
1488
1488
|
observer: {
|
|
@@ -1497,32 +1497,32 @@ class Qt {
|
|
|
1497
1497
|
}
|
|
1498
1498
|
handleIntersect(e, t) {
|
|
1499
1499
|
for (const i of e) {
|
|
1500
|
-
const
|
|
1501
|
-
if (
|
|
1502
|
-
const
|
|
1503
|
-
(
|
|
1500
|
+
const c = i.target.getAttribute("data-maz-aos-children") === "true", d = i.target.getAttribute("data-maz-aos") ? [i.target] : [];
|
|
1501
|
+
if (c) {
|
|
1502
|
+
const a = [...document.querySelectorAll("[data-maz-aos-anchor]")].map(
|
|
1503
|
+
(v) => v.getAttribute("data-maz-aos-anchor") === `#${i.target.id}` ? v : void 0
|
|
1504
1504
|
);
|
|
1505
|
-
for (const
|
|
1506
|
-
|
|
1505
|
+
for (const v of a)
|
|
1506
|
+
v && d.push(v);
|
|
1507
1507
|
}
|
|
1508
|
-
for (const
|
|
1509
|
-
const
|
|
1508
|
+
for (const a of d) {
|
|
1509
|
+
const v = a.getAttribute("data-maz-aos-once"), p = typeof v == "string" ? v === "true" : this.options.animation.once;
|
|
1510
1510
|
if (typeof this.options.observer.threshold == "number" && i.intersectionRatio > this.options.observer.threshold) {
|
|
1511
|
-
const
|
|
1512
|
-
if (
|
|
1513
|
-
|
|
1514
|
-
}, 1e3)),
|
|
1515
|
-
|
|
1516
|
-
}, 1e3)),
|
|
1517
|
-
const
|
|
1518
|
-
if (
|
|
1519
|
-
const
|
|
1520
|
-
|
|
1511
|
+
const y = a.getAttribute("data-maz-aos-duration"), f = a.getAttribute("data-maz-aos-delay");
|
|
1512
|
+
if (y || (a.style.transitionDuration = `${this.options.animation.duration}ms`, setTimeout(() => {
|
|
1513
|
+
a.style.transitionDuration = "0";
|
|
1514
|
+
}, 1e3)), f || (a.style.transitionDelay = `${this.options.animation.delay}ms`, setTimeout(() => {
|
|
1515
|
+
a.style.transitionDelay = "0";
|
|
1516
|
+
}, 1e3)), a.classList.add("maz-aos-animate"), p) {
|
|
1517
|
+
const b = a.getAttribute("data-maz-aos-anchor");
|
|
1518
|
+
if (b) {
|
|
1519
|
+
const w = document.querySelector(b);
|
|
1520
|
+
w && t.unobserve(w);
|
|
1521
1521
|
}
|
|
1522
|
-
t.unobserve(
|
|
1522
|
+
t.unobserve(a);
|
|
1523
1523
|
}
|
|
1524
1524
|
} else
|
|
1525
|
-
|
|
1525
|
+
a.classList.remove("maz-aos-animate");
|
|
1526
1526
|
}
|
|
1527
1527
|
}
|
|
1528
1528
|
}
|
|
@@ -1534,24 +1534,24 @@ class Qt {
|
|
|
1534
1534
|
for (const t of document.querySelectorAll("[data-maz-aos]")) {
|
|
1535
1535
|
const i = t.getAttribute("data-maz-aos-anchor");
|
|
1536
1536
|
if (i) {
|
|
1537
|
-
const
|
|
1538
|
-
|
|
1537
|
+
const n = document.querySelector(i);
|
|
1538
|
+
n ? (n.setAttribute("data-maz-aos-children", "true"), e.observe(n)) : console.warn(`[maz-ui](aos) no element found with selector "${i}"`);
|
|
1539
1539
|
} else
|
|
1540
1540
|
e.observe(t);
|
|
1541
1541
|
}
|
|
1542
1542
|
}
|
|
1543
1543
|
runAnimations() {
|
|
1544
|
-
if (
|
|
1544
|
+
if (S())
|
|
1545
1545
|
return this.handleObserver();
|
|
1546
1546
|
console.warn("[MazAos](runAnimations) should be executed on client side");
|
|
1547
1547
|
}
|
|
1548
1548
|
}
|
|
1549
|
-
let
|
|
1550
|
-
const
|
|
1549
|
+
let ne;
|
|
1550
|
+
const bs = {
|
|
1551
1551
|
install: (s, e) => {
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
}) :
|
|
1552
|
+
ne = new Qt(e), s.provide("aos", ne), S() && (e != null && e.router ? e.router.afterEach(async () => {
|
|
1553
|
+
ne.runAnimations();
|
|
1554
|
+
}) : ne.runAnimations());
|
|
1555
1555
|
}
|
|
1556
1556
|
}, Ce = {
|
|
1557
1557
|
darkClass: "dark",
|
|
@@ -1560,29 +1560,29 @@ const ps = {
|
|
|
1560
1560
|
storageThemeValueDark: "dark",
|
|
1561
1561
|
storageThemeValueLight: "light",
|
|
1562
1562
|
storageThemeValueSystem: "system"
|
|
1563
|
-
},
|
|
1563
|
+
}, W = h("system"), C = h("system");
|
|
1564
1564
|
function Ie({
|
|
1565
1565
|
darkClass: s,
|
|
1566
1566
|
lightClass: e,
|
|
1567
1567
|
storageThemeKey: t,
|
|
1568
1568
|
storageThemeValueDark: i,
|
|
1569
|
-
setLocalStorageValue:
|
|
1570
|
-
setSelectedTheme:
|
|
1569
|
+
setLocalStorageValue: n = !0,
|
|
1570
|
+
setSelectedTheme: c = !0
|
|
1571
1571
|
}) {
|
|
1572
|
-
document.documentElement.classList.remove(e), document.documentElement.classList.add(s),
|
|
1572
|
+
document.documentElement.classList.remove(e), document.documentElement.classList.add(s), W.value = i, c && (C.value = i), n && (localStorage[t] = i);
|
|
1573
1573
|
}
|
|
1574
1574
|
function Te({
|
|
1575
1575
|
darkClass: s,
|
|
1576
1576
|
lightClass: e,
|
|
1577
1577
|
storageThemeKey: t,
|
|
1578
1578
|
storageThemeValueLight: i,
|
|
1579
|
-
setLocalStorageValue:
|
|
1580
|
-
setSelectedTheme:
|
|
1579
|
+
setLocalStorageValue: n = !0,
|
|
1580
|
+
setSelectedTheme: c = !0
|
|
1581
1581
|
}) {
|
|
1582
|
-
document.documentElement.classList.remove(s), document.documentElement.classList.add(e),
|
|
1582
|
+
document.documentElement.classList.remove(s), document.documentElement.classList.add(e), W.value = i, c && (C.value = i), n && (localStorage[t] = i);
|
|
1583
1583
|
}
|
|
1584
1584
|
function Ye(s) {
|
|
1585
|
-
document.documentElement.classList.remove(s.darkClass), document.documentElement.classList.remove(s.lightClass),
|
|
1585
|
+
document.documentElement.classList.remove(s.darkClass), document.documentElement.classList.remove(s.lightClass), W.value = s.storageThemeValueSystem, C.value = s.storageThemeValueSystem, s.setLocalStorageValue && (localStorage[s.storageThemeKey] = s.storageThemeValueSystem), Xe({ ...s, setSelectedTheme: !1 });
|
|
1586
1586
|
}
|
|
1587
1587
|
function Se() {
|
|
1588
1588
|
return window.matchMedia("(prefers-color-scheme: dark)").matches;
|
|
@@ -1605,15 +1605,15 @@ function Oe({
|
|
|
1605
1605
|
return typeof s != "boolean" ? Ye(e) : s ? Ie(e) : Te(e);
|
|
1606
1606
|
}
|
|
1607
1607
|
function Jt(s) {
|
|
1608
|
-
return
|
|
1608
|
+
return W.value === s.storageThemeValueDark ? Te(s) : Ie(s);
|
|
1609
1609
|
}
|
|
1610
|
-
function
|
|
1610
|
+
function ws(s = Ce) {
|
|
1611
1611
|
const e = {
|
|
1612
1612
|
...Ce,
|
|
1613
1613
|
...s
|
|
1614
|
-
}, t = g(() => C.value === e.storageThemeValueDark), i = g(() => C.value === e.storageThemeValueLight),
|
|
1614
|
+
}, t = g(() => C.value === e.storageThemeValueDark), i = g(() => C.value === e.storageThemeValueLight), n = g(() => C.value === e.storageThemeValueSystem);
|
|
1615
1615
|
return Ee(() => {
|
|
1616
|
-
localStorage[e.storageThemeKey] && (
|
|
1616
|
+
localStorage[e.storageThemeKey] && (W.value = localStorage[e.storageThemeKey], C.value = localStorage[e.storageThemeKey]);
|
|
1617
1617
|
}), {
|
|
1618
1618
|
autoSetTheme: () => Xe(e),
|
|
1619
1619
|
toggleTheme: () => Jt(e),
|
|
@@ -1622,19 +1622,19 @@ function ys(s = Ce) {
|
|
|
1622
1622
|
setLightTheme: () => Oe({ ...e, shouldSetDarkMode: !1 }),
|
|
1623
1623
|
hasDarkTheme: t,
|
|
1624
1624
|
hasLightTheme: i,
|
|
1625
|
-
hasSystemTheme:
|
|
1626
|
-
theme:
|
|
1625
|
+
hasSystemTheme: n,
|
|
1626
|
+
theme: W,
|
|
1627
1627
|
selectedTheme: C
|
|
1628
1628
|
};
|
|
1629
1629
|
}
|
|
1630
|
-
const
|
|
1630
|
+
const zs = ({
|
|
1631
1631
|
componentName: s,
|
|
1632
1632
|
instance: e,
|
|
1633
1633
|
providedId: t
|
|
1634
|
-
}) => g(() => t ?? `${s}-${e == null ? void 0 : e.uid}`),
|
|
1634
|
+
}) => g(() => t ?? `${s}-${e == null ? void 0 : e.uid}`), Es = () => Le("aos"), Ls = () => Le("wait"), Is = () => Le("toast"), Ts = ({
|
|
1635
1635
|
callback: s,
|
|
1636
1636
|
options: e
|
|
1637
|
-
}) => new lt(s, e),
|
|
1637
|
+
}) => new lt(s, e), ks = ({
|
|
1638
1638
|
callback: s,
|
|
1639
1639
|
options: e
|
|
1640
1640
|
}) => new ct(s, e), es = h(), j = h([]), ts = (s, e) => new Promise((t, i) => {
|
|
@@ -1654,7 +1654,7 @@ const bs = ({
|
|
|
1654
1654
|
e && ((i = e[s]) == null || i.call(e, t), e.isActive = !1, setTimeout(() => {
|
|
1655
1655
|
Ze(e.id);
|
|
1656
1656
|
}, 500));
|
|
1657
|
-
},
|
|
1657
|
+
}, As = () => ({
|
|
1658
1658
|
confirmDialogData: es,
|
|
1659
1659
|
dialogState: j,
|
|
1660
1660
|
showDialogAndWaitChoice: ts,
|
|
@@ -1662,42 +1662,90 @@ const bs = ({
|
|
|
1662
1662
|
rejectDialog: (s, e = !1) => Pe("reject", s, e),
|
|
1663
1663
|
resolveDialog: (s, e = !1) => Pe("resolve", s, e)
|
|
1664
1664
|
});
|
|
1665
|
+
function ss(s = {}) {
|
|
1666
|
+
const {
|
|
1667
|
+
internalWindow: e = S() ? window : void 0,
|
|
1668
|
+
initialWidth: t = Number.POSITIVE_INFINITY,
|
|
1669
|
+
initialHeight: i = Number.POSITIVE_INFINITY,
|
|
1670
|
+
includeScrollbar: n = !0
|
|
1671
|
+
} = s, c = h(t), d = h(i), a = () => {
|
|
1672
|
+
e && (n ? (c.value = e.innerWidth, d.value = e.innerHeight) : (c.value = e.document.documentElement.clientWidth, d.value = e.document.documentElement.clientHeight));
|
|
1673
|
+
};
|
|
1674
|
+
return a(), e && window.addEventListener("resize", a, { passive: !0 }), { width: c, height: d };
|
|
1675
|
+
}
|
|
1676
|
+
function is(s) {
|
|
1677
|
+
const e = {};
|
|
1678
|
+
for (const [t, i] of Object.entries(s))
|
|
1679
|
+
e[t] = Number.parseInt(i, 10);
|
|
1680
|
+
return e;
|
|
1681
|
+
}
|
|
1682
|
+
function xs({
|
|
1683
|
+
initialWidth: s = 0,
|
|
1684
|
+
initialHeight: e,
|
|
1685
|
+
includeScrollbar: t,
|
|
1686
|
+
internalWindow: i,
|
|
1687
|
+
listenOrientation: n,
|
|
1688
|
+
breakpoints: c,
|
|
1689
|
+
mediumBreakPoint: d = "md",
|
|
1690
|
+
largeBreakPoint: a = "lg"
|
|
1691
|
+
}) {
|
|
1692
|
+
const { width: v } = ss({
|
|
1693
|
+
initialWidth: s,
|
|
1694
|
+
// (SSR) mobile first
|
|
1695
|
+
initialHeight: e,
|
|
1696
|
+
includeScrollbar: t,
|
|
1697
|
+
internalWindow: i,
|
|
1698
|
+
listenOrientation: n
|
|
1699
|
+
}), p = is(c), y = g(() => v.value >= p[a]), f = g(
|
|
1700
|
+
() => v.value >= p[d] && v.value < p[a]
|
|
1701
|
+
), b = g(() => v.value >= 0 && v.value < p[d]);
|
|
1702
|
+
return {
|
|
1703
|
+
width: v,
|
|
1704
|
+
numericBreakpoints: p,
|
|
1705
|
+
isSmallScreen: b,
|
|
1706
|
+
isLargeScreen: y,
|
|
1707
|
+
isMediumScreen: f,
|
|
1708
|
+
breakpoints: c
|
|
1709
|
+
};
|
|
1710
|
+
}
|
|
1665
1711
|
export {
|
|
1666
1712
|
Gt as A,
|
|
1667
1713
|
Qt as B,
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1714
|
+
bs as C,
|
|
1715
|
+
ne as D,
|
|
1716
|
+
ws as E,
|
|
1717
|
+
zs as F,
|
|
1718
|
+
Es as G,
|
|
1719
|
+
Ls as H,
|
|
1674
1720
|
lt as I,
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1721
|
+
Is as J,
|
|
1722
|
+
Ts as K,
|
|
1723
|
+
ks as L,
|
|
1724
|
+
As as M,
|
|
1679
1725
|
Dt as N,
|
|
1680
|
-
|
|
1726
|
+
xs as O,
|
|
1727
|
+
ss as P,
|
|
1728
|
+
ls as S,
|
|
1681
1729
|
jt as T,
|
|
1682
1730
|
ct as U,
|
|
1683
1731
|
Zt as W,
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1732
|
+
Re as _,
|
|
1733
|
+
S as a,
|
|
1734
|
+
fs as b,
|
|
1735
|
+
cs as c,
|
|
1736
|
+
as as d,
|
|
1689
1737
|
_e as e,
|
|
1690
|
-
|
|
1738
|
+
hs as f,
|
|
1691
1739
|
je as g,
|
|
1692
|
-
|
|
1740
|
+
ds as h,
|
|
1693
1741
|
Le as i,
|
|
1694
1742
|
Ke as j,
|
|
1695
|
-
|
|
1743
|
+
vs as k,
|
|
1696
1744
|
Ve as l,
|
|
1697
1745
|
Me as m,
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1746
|
+
ms as n,
|
|
1747
|
+
gs as o,
|
|
1748
|
+
us as p,
|
|
1701
1749
|
Tt as q,
|
|
1702
1750
|
Ct as r,
|
|
1703
1751
|
X as s,
|
|
@@ -1705,7 +1753,7 @@ export {
|
|
|
1705
1753
|
Ot as u,
|
|
1706
1754
|
gt as v,
|
|
1707
1755
|
Ht as w,
|
|
1708
|
-
|
|
1756
|
+
ps as x,
|
|
1709
1757
|
xe as y,
|
|
1710
|
-
|
|
1758
|
+
ys as z
|
|
1711
1759
|
};
|