@wishbone-media/spark 0.50.0 → 0.52.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { ref as Ee, reactive as Ct, watch as nt, onMounted as Yt, nextTick as ha, onUnmounted as In, openBlock as E, createElementBlock as P, createElementVNode as T, Fragment as ze, renderList as rt, toDisplayString as we, createTextVNode as Ue, createCommentVNode as ye, withDirectives as en, vModelText as mo, vModelSelect as va, vShow as dr, computed as te, shallowRef as ya, getCurrentScope as ba, onScopeDispose as xa, shallowReadonly as dn, unref as oe, resolveComponent as Ze, normalizeClass as Le, createVNode as se, renderSlot as Qe, createBlock as Oe, resolveDynamicComponent as yt, markRaw as wn, Transition as fr, withCtx as Se, normalizeProps as wa, mergeProps as St, Teleport as pr, TransitionGroup as Cn, inject as io, onUpdated as mr, provide as Sa, resolveDirective as ka, useSlots as Wo, normalizeStyle as Mo, withModifiers as Je, toHandlers as gr, h as as } from "vue";
|
|
2
2
|
import { icon as Ut, library as hr } from "@fortawesome/fontawesome-svg-core";
|
|
3
3
|
import { FontAwesomeIcon as Gn } from "@fortawesome/vue-fontawesome";
|
|
4
|
-
import { faArrowUpRightFromSquare as Ea, faCopy as Ca, faCircleDot as vr, faEyeDropper as yr, faAnglesLeft as br, faAnglesRight as xr, faStar as Ta, faSpinnerThird as wr, faCircle as _a, faFile as Oo, faCalendar as Sr, faArrowUp as kr, faArrowDown as Er, faPlus as Cr, faCircleCheck as $a, faInbox as La, faCloudArrowUp as Ma, faCloudDownload as Oa, faBolt as Pa, faUndo as Aa, faLock as Ra, faEyeSlash as Ia, faEye as Fa, faSignOut as Da, faXmark as Po, faTrash as Tr, faTimes as ja, faStreetView as Ha, faSortUp as Va, faSortDown as za, faSort as
|
|
4
|
+
import { faArrowUpRightFromSquare as Ea, faCopy as Ca, faCircleDot as vr, faEyeDropper as yr, faAnglesLeft as br, faAnglesRight as xr, faStar as Ta, faSpinnerThird as wr, faCircle as _a, faFile as Oo, faCalendar as Sr, faArrowUp as kr, faArrowDown as Er, faPlus as Cr, faCircleCheck as $a, faInbox as La, faCloudArrowUp as Ma, faCloudDownload as Oa, faBolt as Pa, faUndo as Aa, faLock as Ra, faEyeSlash as Ia, faEye as Fa, faSignOut as Da, faXmark as Po, faTrash as Tr, faTimes as ja, faStreetView as Ha, faSortUp as Va, faSortDown as za, faSort as Ba, faScaleBalanced as Na, faSatelliteDish as qa, faLayerPlus as Wa, faLaptopMobile as Ua, faInfoCircle as Za, faGripDotsVertical as _r, faGearComplex as Ga, faFlag as Ya, faFaceSmileWink as Xa, faFaceSmileRelaxed as Ka, faExclamationTriangle as Ja, faEllipsisVertical as Qa, faEllipsis as ei, faEdit as ti, faComments as ni, faCircleXmark as oi, faCircleUser as si, faChevronUp as ri, faChevronRight as $r, faChevronLeft as Lr, faChevronDown as Mr, faCheckCircle as ai, faCheck as Ao, faBullhorn as ii, faBellRing as li, faBarsSort as ci, faArrowRightToLine as ui, faArrowLeftToLine as di } from "@fortawesome/pro-regular-svg-icons";
|
|
5
5
|
import { faSortUp as fi, faSortDown as pi, faSort as mi } from "@fortawesome/pro-duotone-svg-icons";
|
|
6
6
|
import { defineStore as Fn } from "pinia";
|
|
7
7
|
import { useRoute as jt, useRouter as Tt, onBeforeRouteLeave as gi } from "vue-router";
|
|
8
8
|
import { TransitionRoot as Or, Dialog as Pr, TransitionChild as Jn, DialogPanel as Ar } from "@headlessui/vue";
|
|
9
9
|
import go from "nprogress";
|
|
10
|
-
import { range as hi, get as
|
|
10
|
+
import { range as hi, get as Bt, has as vi, find as yi } from "lodash";
|
|
11
11
|
import { HotTable as bi } from "@handsontable/vue3";
|
|
12
12
|
import "handsontable/styles/handsontable.css";
|
|
13
13
|
import "handsontable/styles/ht-theme-classic.css";
|
|
@@ -58,7 +58,7 @@ function ji() {
|
|
|
58
58
|
}
|
|
59
59
|
return { loadPlaces: e };
|
|
60
60
|
}
|
|
61
|
-
const Hi = { class: "spark-address-input" }, Vi = ["disabled"], zi = ["selected"],
|
|
61
|
+
const Hi = { class: "spark-address-input" }, Vi = ["disabled"], zi = ["selected"], Bi = ["value", "selected"], Ni = { class: "mt-2 flex items-center gap-2" }, qi = ["disabled"], Wi = {
|
|
62
62
|
class: "h-3.5 w-3.5",
|
|
63
63
|
fill: "none",
|
|
64
64
|
viewBox: "0 0 24 24",
|
|
@@ -74,7 +74,7 @@ const Hi = { class: "spark-address-input" }, Vi = ["disabled"], zi = ["selected"
|
|
|
74
74
|
"stroke-linecap": "round",
|
|
75
75
|
"stroke-linejoin": "round",
|
|
76
76
|
d: "M12 4v16m8-8H4"
|
|
77
|
-
}, Gi = ["disabled"], Yi = { class: "mt-3 grid grid-cols-2 gap-2" }, Xi = ["disabled"], Ki = ["disabled"], Ji = ["disabled"], Qi = ["value"], el = ["disabled"], tl = { class: "col-span-2 text-right" }, nl = ["disabled"],
|
|
77
|
+
}, Gi = ["disabled"], Yi = { class: "mt-3 grid grid-cols-2 gap-2" }, Xi = ["disabled"], Ki = ["disabled"], Ji = ["disabled"], Qi = ["value"], el = ["disabled"], tl = { class: "col-span-2 text-right" }, nl = ["disabled"], Np = {
|
|
78
78
|
__name: "SparkAddressInput",
|
|
79
79
|
props: {
|
|
80
80
|
modelValue: {
|
|
@@ -225,7 +225,7 @@ const Hi = { class: "spark-address-input" }, Vi = ["disabled"], zi = ["selected"
|
|
|
225
225
|
key: x.id,
|
|
226
226
|
value: x.id,
|
|
227
227
|
selected: x.id === e.modelValue?.id
|
|
228
|
-
}, we(x.formatted || b(x)), 9,
|
|
228
|
+
}, we(x.formatted || b(x)), 9, Bi))), 128)),
|
|
229
229
|
S[7] || (S[7] = T("option", { value: "__create_new__" }, ">>> Create a new address", -1))
|
|
230
230
|
], 40, Vi)) : (E(), P(ze, { key: 1 }, [
|
|
231
231
|
T("div", {
|
|
@@ -233,7 +233,7 @@ const Hi = { class: "spark-address-input" }, Vi = ["disabled"], zi = ["selected"
|
|
|
233
233
|
ref: s,
|
|
234
234
|
class: "spark-address-google-container"
|
|
235
235
|
}, null, 512),
|
|
236
|
-
T("div",
|
|
236
|
+
T("div", Ni, [
|
|
237
237
|
T("button", {
|
|
238
238
|
type: "button",
|
|
239
239
|
class: "inline-flex items-center gap-1 rounded px-2 py-1 text-xs text-gray-500 hover:bg-gray-100 hover:text-gray-700",
|
|
@@ -347,7 +347,7 @@ const Hi = { class: "spark-address-input" }, Vi = ["disabled"], zi = ["selected"
|
|
|
347
347
|
], 64))
|
|
348
348
|
]));
|
|
349
349
|
}
|
|
350
|
-
}, Sn = Math.min, nn = Math.max, Qn = Math.round,
|
|
350
|
+
}, Sn = Math.min, nn = Math.max, Qn = Math.round, Bn = Math.floor, Mt = (e) => ({
|
|
351
351
|
x: e,
|
|
352
352
|
y: e
|
|
353
353
|
}), ol = {
|
|
@@ -1110,9 +1110,9 @@ function ms(e, t, n) {
|
|
|
1110
1110
|
}
|
|
1111
1111
|
return to(o);
|
|
1112
1112
|
}
|
|
1113
|
-
function
|
|
1113
|
+
function Br(e, t) {
|
|
1114
1114
|
const n = Zt(e);
|
|
1115
|
-
return n === t || !kt(n) || kn(n) ? !1 : Et(n).position === "fixed" ||
|
|
1115
|
+
return n === t || !kt(n) || kn(n) ? !1 : Et(n).position === "fixed" || Br(n, t);
|
|
1116
1116
|
}
|
|
1117
1117
|
function Ol(e, t) {
|
|
1118
1118
|
const n = t.get(e);
|
|
@@ -1123,7 +1123,7 @@ function Ol(e, t) {
|
|
|
1123
1123
|
let s = a ? Zt(e) : e;
|
|
1124
1124
|
for (; kt(s) && !kn(s); ) {
|
|
1125
1125
|
const c = Et(s), l = Xo(s);
|
|
1126
|
-
!l && c.position === "fixed" && (r = null), (a ? !l && !r : !l && c.position === "static" && !!r && (r.position === "absolute" || r.position === "fixed") || Hn(s) && !l &&
|
|
1126
|
+
!l && c.position === "fixed" && (r = null), (a ? !l && !r : !l && c.position === "static" && !!r && (r.position === "absolute" || r.position === "fixed") || Hn(s) && !l && Br(e, s)) ? o = o.filter((d) => d !== s) : r = c, s = Zt(s);
|
|
1127
1127
|
}
|
|
1128
1128
|
return t.set(e, o), o;
|
|
1129
1129
|
}
|
|
@@ -1192,7 +1192,7 @@ function gs(e, t) {
|
|
|
1192
1192
|
let n = e.offsetParent;
|
|
1193
1193
|
return Ot(e) === n && (n = n.ownerDocument.body), n;
|
|
1194
1194
|
}
|
|
1195
|
-
function
|
|
1195
|
+
function Nr(e, t) {
|
|
1196
1196
|
const n = mt(e);
|
|
1197
1197
|
if (co(e))
|
|
1198
1198
|
return n;
|
|
@@ -1211,7 +1211,7 @@ function Br(e, t) {
|
|
|
1211
1211
|
return o && kn(o) && vo(o) && !Xo(o) ? n : o || kl(e) || n;
|
|
1212
1212
|
}
|
|
1213
1213
|
const Il = async function(e) {
|
|
1214
|
-
const t = this.getOffsetParent ||
|
|
1214
|
+
const t = this.getOffsetParent || Nr, n = this.getDimensions, o = await n(e.floating);
|
|
1215
1215
|
return {
|
|
1216
1216
|
reference: Rl(e.reference, await t(e.floating), e.strategy),
|
|
1217
1217
|
floating: {
|
|
@@ -1229,7 +1229,7 @@ const Dl = {
|
|
|
1229
1229
|
convertOffsetParentRelativeRectToViewportRelativeRect: Tl,
|
|
1230
1230
|
getDocumentElement: Ot,
|
|
1231
1231
|
getClippingRect: Pl,
|
|
1232
|
-
getOffsetParent:
|
|
1232
|
+
getOffsetParent: Nr,
|
|
1233
1233
|
getElementRects: Il,
|
|
1234
1234
|
getClientRects: _l,
|
|
1235
1235
|
getDimensions: Al,
|
|
@@ -1257,7 +1257,7 @@ function jl(e, t) {
|
|
|
1257
1257
|
} = u;
|
|
1258
1258
|
if (c || t(), !i || !f)
|
|
1259
1259
|
return;
|
|
1260
|
-
const h =
|
|
1260
|
+
const h = Bn(g), p = Bn(r.clientWidth - (d + i)), b = Bn(r.clientHeight - (g + f)), m = Bn(d), v = {
|
|
1261
1261
|
rootMargin: -h + "px " + -p + "px " + -b + "px " + -m + "px",
|
|
1262
1262
|
threshold: nn(0, Sn(1, l)) || 1
|
|
1263
1263
|
};
|
|
@@ -1368,7 +1368,7 @@ function hs(e, t) {
|
|
|
1368
1368
|
const n = Xr(e);
|
|
1369
1369
|
return Math.round(t * n) / n;
|
|
1370
1370
|
}
|
|
1371
|
-
function
|
|
1371
|
+
function Bl(e, t, n) {
|
|
1372
1372
|
n === void 0 && (n = {});
|
|
1373
1373
|
const o = n.whileElementsMounted, r = te(() => {
|
|
1374
1374
|
var M;
|
|
@@ -1462,7 +1462,7 @@ function ys(e) {
|
|
|
1462
1462
|
...e
|
|
1463
1463
|
} : { content: "" };
|
|
1464
1464
|
}
|
|
1465
|
-
function
|
|
1465
|
+
function Nl(e) {
|
|
1466
1466
|
const t = document.createElement("div");
|
|
1467
1467
|
if (t.className = e.interactive ? `${vs} spark-tooltip-interactive` : vs, t.setAttribute("role", "tooltip"), e.html ? t.innerHTML = e.content : t.textContent = e.content, e.arrow) {
|
|
1468
1468
|
const n = document.createElement("div");
|
|
@@ -1499,7 +1499,7 @@ function ql(e) {
|
|
|
1499
1499
|
const n = typeof t.config.delay == "number" ? t.config.delay : t.config.delay?.show ?? 200;
|
|
1500
1500
|
t.showTimeout = setTimeout(() => {
|
|
1501
1501
|
if (t.tooltipEl) return;
|
|
1502
|
-
const o =
|
|
1502
|
+
const o = Nl(t.config);
|
|
1503
1503
|
o.style.position = "fixed", o.style.top = "0", o.style.left = "0", document.body.appendChild(o), t.tooltipEl = o, t.config.interactive && (o.addEventListener("mouseenter", () => {
|
|
1504
1504
|
clearTimeout(t.hideTimeout);
|
|
1505
1505
|
}), o.addEventListener("mouseleave", () => {
|
|
@@ -1592,8 +1592,8 @@ const Fe = {
|
|
|
1592
1592
|
farLaptopMobile: Ua,
|
|
1593
1593
|
farLayerPlus: Wa,
|
|
1594
1594
|
farSatelliteDish: qa,
|
|
1595
|
-
farScaleBalanced:
|
|
1596
|
-
farSort:
|
|
1595
|
+
farScaleBalanced: Na,
|
|
1596
|
+
farSort: Ba,
|
|
1597
1597
|
farSortDown: za,
|
|
1598
1598
|
farSortUp: Va,
|
|
1599
1599
|
farStreetView: Ha,
|
|
@@ -2720,10 +2720,10 @@ const tt = new yc(), Yp = {
|
|
|
2720
2720
|
Qe(s.$slots, "default")
|
|
2721
2721
|
], 512));
|
|
2722
2722
|
}
|
|
2723
|
-
}, zc = { class: "flex flex-col divide-y divide-gray-300 rounded-lg border border-gray-300 text-gray-700 bg-gray-100" },
|
|
2723
|
+
}, zc = { class: "flex flex-col divide-y divide-gray-300 rounded-lg border border-gray-300 text-gray-700 bg-gray-100" }, Bc = {
|
|
2724
2724
|
key: 0,
|
|
2725
2725
|
class: "px-[30px] py-5"
|
|
2726
|
-
},
|
|
2726
|
+
}, Nc = {
|
|
2727
2727
|
key: 1,
|
|
2728
2728
|
class: "p-5"
|
|
2729
2729
|
}, Kp = {
|
|
@@ -2736,20 +2736,28 @@ const tt = new yc(), Yp = {
|
|
|
2736
2736
|
paddedClass: {
|
|
2737
2737
|
type: String,
|
|
2738
2738
|
default: "p-5"
|
|
2739
|
+
},
|
|
2740
|
+
// Extra classes for the body wrapper, e.g. 'flex flex-col' so slot content
|
|
2741
|
+
// can use flex-1/min-h-0 for bounded-height (internally scrolling) layouts.
|
|
2742
|
+
// The wrapper is a plain block by default; child flex-item utilities are
|
|
2743
|
+
// inert without this.
|
|
2744
|
+
bodyClass: {
|
|
2745
|
+
type: String,
|
|
2746
|
+
default: ""
|
|
2739
2747
|
}
|
|
2740
2748
|
},
|
|
2741
2749
|
setup(e) {
|
|
2742
2750
|
const t = e;
|
|
2743
2751
|
return (n, o) => (E(), P("div", zc, [
|
|
2744
|
-
n.$slots.header ? (E(), P("div",
|
|
2752
|
+
n.$slots.header ? (E(), P("div", Bc, [
|
|
2745
2753
|
Qe(n.$slots, "header")
|
|
2746
2754
|
])) : ye("", !0),
|
|
2747
2755
|
T("div", {
|
|
2748
|
-
class: Le([t.padded ? t.paddedClass : "", "min-h-0 flex-1"])
|
|
2756
|
+
class: Le([t.padded ? t.paddedClass : "", "min-h-0 flex-1", t.bodyClass])
|
|
2749
2757
|
}, [
|
|
2750
2758
|
Qe(n.$slots, "default")
|
|
2751
2759
|
], 2),
|
|
2752
|
-
n.$slots.footer ? (E(), P("div",
|
|
2760
|
+
n.$slots.footer ? (E(), P("div", Nc, [
|
|
2753
2761
|
Qe(n.$slots, "footer")
|
|
2754
2762
|
])) : ye("", !0)
|
|
2755
2763
|
]));
|
|
@@ -3117,11 +3125,11 @@ function ks(e) {
|
|
|
3117
3125
|
function ra(e) {
|
|
3118
3126
|
return es(e, "changedTouches");
|
|
3119
3127
|
}
|
|
3120
|
-
function
|
|
3128
|
+
function Nt(e) {
|
|
3121
3129
|
const t = e[0], n = e[1] || t;
|
|
3122
3130
|
return { x: (t.x + n.x) / 2, y: (t.y + n.y) / 2, ts: n.ts };
|
|
3123
3131
|
}
|
|
3124
|
-
function
|
|
3132
|
+
function Nn(e) {
|
|
3125
3133
|
const t = e[0], n = e[1] || e[0];
|
|
3126
3134
|
return t && n ? -1 * Math.sqrt((n.x - t.x) * (n.x - t.x) + (n.y - t.y) * (n.y - t.y)) : 0;
|
|
3127
3135
|
}
|
|
@@ -3133,7 +3141,7 @@ const En = (e, t) => {
|
|
|
3133
3141
|
let n, o, r, a, s, c = Object.assign(Object.assign({}, Wc), t), l = [], u = [], d = [], g = !1, i = !1, f = !1, h = !1, p = 0, b = 0, m = 0, y = 0, v = 0, S = 0, x = 0, _ = 0, M = 0, ee = [];
|
|
3134
3142
|
const ue = /* @__PURE__ */ new Map();
|
|
3135
3143
|
function J(W) {
|
|
3136
|
-
const be =
|
|
3144
|
+
const be = Nn(u), ge = Nn(d), ie = be && ge ? be / ge : 0, Ce = Math.abs(x) > Math.abs(_) ? x : _, De = { srcEvent: n, isPanRecognized: g, isSwipeRecognized: i, firstTouch: l, previousTouch: d, currentTouch: u, deltaX: m, deltaY: y, offsetX: v, offsetY: S, velocityX: x, velocityY: _, velocity: Ce, angle: M, axis: r, scale: ie, center: o };
|
|
3137
3145
|
for (const at of ue.get(W) || []) at(De);
|
|
3138
3146
|
}
|
|
3139
3147
|
function _e(W) {
|
|
@@ -3159,7 +3167,7 @@ const En = (e, t) => {
|
|
|
3159
3167
|
if (!W.buttons || W.button !== 0) return;
|
|
3160
3168
|
Es(W);
|
|
3161
3169
|
}
|
|
3162
|
-
W instanceof MouseEvent && (window.addEventListener("mousemove", H), window.addEventListener("mouseup", q)), window.addEventListener("blur", I), n = W, u = ks(W), l = [...u], d = [], b = u.length, o =
|
|
3170
|
+
W instanceof MouseEvent && (window.addEventListener("mousemove", H), window.addEventListener("mouseup", q)), window.addEventListener("blur", I), n = W, u = ks(W), l = [...u], d = [], b = u.length, o = Nt(u), b === 1 && (g = !1, i = !1, f = !1), b && ae(Nt(u));
|
|
3163
3171
|
const be = Date.now(), ge = be - (p || be);
|
|
3164
3172
|
h = ge > 0 && ge <= 250 && b === 1, p = be, clearTimeout(a), J("start");
|
|
3165
3173
|
}
|
|
@@ -3167,13 +3175,13 @@ const En = (e, t) => {
|
|
|
3167
3175
|
var be;
|
|
3168
3176
|
if (!l.length || W.defaultPrevented || _e(W) === !1) return;
|
|
3169
3177
|
n = W, d = [...u], u = Ss(W);
|
|
3170
|
-
const ge =
|
|
3178
|
+
const ge = Nt(d), ie = Nt(Ss(W));
|
|
3171
3179
|
if (ae(ie), b = u.length, o = ie, d.length === u.length ? (m = ie.x - ge.x, y = ie.y - ge.y) : (m = 0, y = 0), l.length) {
|
|
3172
|
-
const Ce =
|
|
3180
|
+
const Ce = Nt(l);
|
|
3173
3181
|
v = ie.x - Ce.x, S = ie.y - Ce.y;
|
|
3174
3182
|
}
|
|
3175
3183
|
if (u.length > 1) {
|
|
3176
|
-
const Ce =
|
|
3184
|
+
const Ce = Nn(u), De = Nn(d);
|
|
3177
3185
|
Math.abs(Ce - De) >= 0.1 && (f = !0, J("pinch"));
|
|
3178
3186
|
}
|
|
3179
3187
|
g || (g = Math.abs(v) >= c.panThreshold || Math.abs(S) >= c.panThreshold, g && (_n = !1, clearTimeout(s), s = void 0, M = Math.abs(180 * Math.atan2(S, v) / Math.PI), r = M > 45 && M < 135 ? "y" : "x", l = [...u], d = [...u], v = 0, S = 0, m = 0, y = 0, (be = window.getSelection()) === null || be === void 0 || be.removeAllRanges(), J("panstart"))), g && (m || y) && J("pan"), J("move");
|
|
@@ -3181,7 +3189,7 @@ const En = (e, t) => {
|
|
|
3181
3189
|
function q(W) {
|
|
3182
3190
|
if (n = W, !l.length) return;
|
|
3183
3191
|
const be = ks(W), ge = ra(W);
|
|
3184
|
-
if (b = be.length, o =
|
|
3192
|
+
if (b = be.length, o = Nt(ge), ge.length && ae(Nt(ge)), d = [...u], u = [...be], l = [...be], b > 0) J("end"), g = !1, i = !1, ee = [];
|
|
3185
3193
|
else {
|
|
3186
3194
|
const ie = c.swipeThreshold;
|
|
3187
3195
|
(Math.abs(x) > ie || Math.abs(_) > ie) && (i = !0), g && J("panend"), i && J("swipe"), g || i || f || (J("tap"), h ? J("doubleTap") : a = setTimeout(function() {
|
|
@@ -3239,16 +3247,16 @@ const Vo = (e, t = {}, n = {}) => {
|
|
|
3239
3247
|
}
|
|
3240
3248
|
const v = /* @__PURE__ */ new Map();
|
|
3241
3249
|
function S(w, ...$) {
|
|
3242
|
-
const
|
|
3243
|
-
i.on &&
|
|
3244
|
-
for (const D of
|
|
3250
|
+
const B = [...v.get(w) || []];
|
|
3251
|
+
i.on && B.push(i.on[w]);
|
|
3252
|
+
for (const D of B) D && typeof D == "function" && D(U, ...$);
|
|
3245
3253
|
w !== "*" && S("*", w, ...$);
|
|
3246
3254
|
}
|
|
3247
3255
|
function x(w) {
|
|
3248
3256
|
if (!y()) return;
|
|
3249
3257
|
const $ = w.target;
|
|
3250
3258
|
if (on($)) return;
|
|
3251
|
-
const
|
|
3259
|
+
const B = Date.now(), D = [-w.deltaX || 0, -w.deltaY || 0, -w.detail || 0].reduce(function(Q, de) {
|
|
3252
3260
|
return Math.abs(de) > Math.abs(Q) ? de : Q;
|
|
3253
3261
|
}), C = Pe(-1, D, 1);
|
|
3254
3262
|
S("wheel", w, C);
|
|
@@ -3258,8 +3266,8 @@ const Vo = (e, t = {}, n = {}) => {
|
|
|
3258
3266
|
let K = G * (C > 0 ? 1.5 : 0.5);
|
|
3259
3267
|
if (O === re.Zoom) {
|
|
3260
3268
|
const Q = Math.abs(w.deltaY) < 100 && Math.abs(w.deltaX) < 100;
|
|
3261
|
-
if (
|
|
3262
|
-
_s =
|
|
3269
|
+
if (B - _s < (Q ? 200 : 45)) return void Kt(w);
|
|
3270
|
+
_s = B;
|
|
3263
3271
|
const de = ne(), ve = W();
|
|
3264
3272
|
if (ct(K) < ct(de) && ct(G) <= ct(de) ? (Un += Math.abs(C), K = de) : ct(K) > ct(ve) && ct(G) >= ct(ve) ? (Un += Math.abs(C), K = ve) : (Un = 0, K = Pe(de, K, ve)), Un > 7) return;
|
|
3265
3273
|
}
|
|
@@ -3275,10 +3283,10 @@ const Vo = (e, t = {}, n = {}) => {
|
|
|
3275
3283
|
}
|
|
3276
3284
|
}
|
|
3277
3285
|
function _(w) {
|
|
3278
|
-
var $,
|
|
3286
|
+
var $, B;
|
|
3279
3287
|
const D = w.composedPath()[0];
|
|
3280
3288
|
if (!En.isClickAllowed() || !mn(D) || w.defaultPrevented || !e?.contains(D) || D.hasAttribute("disabled") || D.hasAttribute("aria-disabled") || D.hasAttribute("data-carousel-go-prev") || D.hasAttribute("data-carousel-go-next")) return;
|
|
3281
|
-
const C = D.closest("[data-panzoom-action]"), O = ($ = C?.dataset) === null || $ === void 0 ? void 0 : $.panzoomAction, G = ((
|
|
3289
|
+
const C = D.closest("[data-panzoom-action]"), O = ($ = C?.dataset) === null || $ === void 0 ? void 0 : $.panzoomAction, G = ((B = C?.dataset) === null || B === void 0 ? void 0 : B.panzoomValue) || "";
|
|
3282
3290
|
if (O) {
|
|
3283
3291
|
switch (Kt(w), O) {
|
|
3284
3292
|
case re.ZoomTo:
|
|
@@ -3315,8 +3323,8 @@ const Vo = (e, t = {}, n = {}) => {
|
|
|
3315
3323
|
if (d = w, !y() || !H() || h.scale <= 1 || p.scale <= 1 || (o?.dataset.animationName || "").indexOf("zoom") > -1) return;
|
|
3316
3324
|
const $ = q(p.scale);
|
|
3317
3325
|
if (!$) return;
|
|
3318
|
-
const { x:
|
|
3319
|
-
Ce(re.Pan, { deltaX:
|
|
3326
|
+
const { x: B, y: D } = $;
|
|
3327
|
+
Ce(re.Pan, { deltaX: B - p.x, deltaY: D - p.y });
|
|
3320
3328
|
}
|
|
3321
3329
|
function ee() {
|
|
3322
3330
|
var w;
|
|
@@ -3333,7 +3341,7 @@ const Vo = (e, t = {}, n = {}) => {
|
|
|
3333
3341
|
p = Object.assign(Object.assign({}, wt), D);
|
|
3334
3342
|
}).on("step", (D) => {
|
|
3335
3343
|
if (!y()) return void (l == null || l.end());
|
|
3336
|
-
if (h = Object.assign(Object.assign({}, wt), D), H() || !m("bounds") ||
|
|
3344
|
+
if (h = Object.assign(Object.assign({}, wt), D), H() || !m("bounds") || Be() || p.scale > h.scale || p.scale < he()) return void De();
|
|
3337
3345
|
const C = be(p.scale);
|
|
3338
3346
|
let O = !1, G = !1, K = !1, Q = !1;
|
|
3339
3347
|
h.x < C.x[0] && (O = !0), h.x > C.x[1] && (G = !0), h.y < C.y[0] && (Q = !0), h.y > C.y[1] && (K = !0);
|
|
@@ -3376,16 +3384,16 @@ const Vo = (e, t = {}, n = {}) => {
|
|
|
3376
3384
|
})), e?.addEventListener("click", _), document?.addEventListener("mousemove", M), b.push(() => {
|
|
3377
3385
|
e?.removeEventListener("click", _), document?.removeEventListener("mousemove", M);
|
|
3378
3386
|
});
|
|
3379
|
-
const
|
|
3380
|
-
h = Object.assign({},
|
|
3387
|
+
const B = J();
|
|
3388
|
+
h = Object.assign({}, B), p = Object.assign({}, B), g = 3, De(), ie(), S("ready"), requestAnimationFrame(() => {
|
|
3381
3389
|
g === 3 && (ee(), s && (s.style.visibility = ""));
|
|
3382
3390
|
});
|
|
3383
3391
|
}
|
|
3384
3392
|
function J() {
|
|
3385
3393
|
const w = Object.assign({}, m("startPos") || {});
|
|
3386
|
-
let $ = w.scale,
|
|
3387
|
-
|
|
3388
|
-
const D = Object.assign(Object.assign(Object.assign({}, wt), w), { scale:
|
|
3394
|
+
let $ = w.scale, B = 1;
|
|
3395
|
+
B = typeof $ == "string" ? I($) : typeof $ == "number" ? $ : he();
|
|
3396
|
+
const D = Object.assign(Object.assign(Object.assign({}, wt), w), { scale: B }), C = H() ? q(B) : void 0;
|
|
3389
3397
|
if (C) {
|
|
3390
3398
|
const { x: O, y: G } = C;
|
|
3391
3399
|
D.x = O, D.y = G;
|
|
@@ -3403,12 +3411,12 @@ const Vo = (e, t = {}, n = {}) => {
|
|
|
3403
3411
|
function ae() {
|
|
3404
3412
|
let w = m("width"), $ = m("height");
|
|
3405
3413
|
if (r && w === "auto") {
|
|
3406
|
-
const
|
|
3407
|
-
w =
|
|
3414
|
+
const B = r.getAttribute("width");
|
|
3415
|
+
w = B ? parseFloat(B + "") : r.dataset.width !== void 0 ? parseFloat(r.dataset.width + "") : $t(s) ? s.naturalWidth : $t(r) ? r.naturalWidth : o?.getBoundingClientRect().width || 0;
|
|
3408
3416
|
} else w = Ie(w) ? parseFloat(w) : w;
|
|
3409
3417
|
if (r && $ === "auto") {
|
|
3410
|
-
const
|
|
3411
|
-
$ =
|
|
3418
|
+
const B = r.getAttribute("height");
|
|
3419
|
+
$ = B ? parseFloat(B + "") : r.dataset.height !== void 0 ? parseFloat(r.dataset.height + "") : $t(s) ? s.naturalHeight : $t(r) ? r.naturalHeight : o?.getBoundingClientRect().height || 0;
|
|
3412
3420
|
} else $ = Ie($) ? parseFloat($) : $;
|
|
3413
3421
|
return { width: w, height: $ };
|
|
3414
3422
|
}
|
|
@@ -3420,9 +3428,9 @@ const Vo = (e, t = {}, n = {}) => {
|
|
|
3420
3428
|
return m("panMode") === "mousemove" && matchMedia("(hover: hover)").matches;
|
|
3421
3429
|
}
|
|
3422
3430
|
function q(w) {
|
|
3423
|
-
const $ = d || m("event"),
|
|
3424
|
-
if (!$ || !
|
|
3425
|
-
const D = ($.clientX || 0) -
|
|
3431
|
+
const $ = d || m("event"), B = o?.getBoundingClientRect();
|
|
3432
|
+
if (!$ || !B || w <= 1) return { x: 0, y: 0 };
|
|
3433
|
+
const D = ($.clientX || 0) - B.left, C = ($.clientY || 0) - B.top, { width: O, height: G } = j(), K = be(w);
|
|
3426
3434
|
if (w > 1) {
|
|
3427
3435
|
const Me = m("mouseMoveFactor");
|
|
3428
3436
|
Me > 1 && (w *= Me);
|
|
@@ -3433,18 +3441,18 @@ const Vo = (e, t = {}, n = {}) => {
|
|
|
3433
3441
|
function I(w) {
|
|
3434
3442
|
if (!w) return p.scale;
|
|
3435
3443
|
if (!e) return 1;
|
|
3436
|
-
const $ = e.getBoundingClientRect(),
|
|
3444
|
+
const $ = e.getBoundingClientRect(), B = _e(), { width: D, height: C } = ae(), O = (ve) => {
|
|
3437
3445
|
if (typeof ve == "number") return ve;
|
|
3438
3446
|
switch (ve) {
|
|
3439
3447
|
case "min":
|
|
3440
3448
|
case "base":
|
|
3441
3449
|
return 1;
|
|
3442
3450
|
case "cover":
|
|
3443
|
-
return Math.max($.height /
|
|
3451
|
+
return Math.max($.height / B.height, $.width / B.width) || 1;
|
|
3444
3452
|
case "full":
|
|
3445
3453
|
case "max": {
|
|
3446
3454
|
const Te = Ye(p.angle) ? C : D;
|
|
3447
|
-
return Te &&
|
|
3455
|
+
return Te && B.width ? Te / B.width : 1;
|
|
3448
3456
|
}
|
|
3449
3457
|
}
|
|
3450
3458
|
}, G = m("minScale"), K = m("maxScale"), Q = Math.min(O("full"), O(G)), de = typeof K == "number" ? O("full") * K : Math.min(O("full"), O(K));
|
|
@@ -3474,9 +3482,9 @@ const Vo = (e, t = {}, n = {}) => {
|
|
|
3474
3482
|
return I("max");
|
|
3475
3483
|
}
|
|
3476
3484
|
function be(w) {
|
|
3477
|
-
const $ = { x: [0, 0], y: [0, 0] },
|
|
3478
|
-
if (!
|
|
3479
|
-
const D = _e(), C =
|
|
3485
|
+
const $ = { x: [0, 0], y: [0, 0] }, B = e?.getBoundingClientRect();
|
|
3486
|
+
if (!B) return $;
|
|
3487
|
+
const D = _e(), C = B.width, O = B.height;
|
|
3480
3488
|
let G = D.width, K = D.height, Q = w = w === void 0 ? p.scale : w, de = w;
|
|
3481
3489
|
if (H() && w > 1) {
|
|
3482
3490
|
const ve = m("mouseMoveFactor");
|
|
@@ -3484,68 +3492,68 @@ const Vo = (e, t = {}, n = {}) => {
|
|
|
3484
3492
|
}
|
|
3485
3493
|
if (G *= Q, K *= de, G > C) {
|
|
3486
3494
|
$.x[0] = 0.5 * (C - G), $.x[1] = 0.5 * (G - C);
|
|
3487
|
-
const ve = 0.5 * (D.left -
|
|
3495
|
+
const ve = 0.5 * (D.left - B.left), Te = 0.5 * (D.left + D.width - B.right);
|
|
3488
3496
|
$.x[0] -= ve + Te, $.x[1] -= ve + Te;
|
|
3489
3497
|
}
|
|
3490
3498
|
if (K > O) {
|
|
3491
3499
|
$.y[0] = 0.5 * (O - K), $.y[1] = 0.5 * (K - O);
|
|
3492
|
-
const ve = 0.5 * (D.top -
|
|
3500
|
+
const ve = 0.5 * (D.top - B.top), Te = 0.5 * (D.top + D.height - B.bottom);
|
|
3493
3501
|
$.y[0] -= ve + Te, $.y[1] -= ve + Te;
|
|
3494
3502
|
}
|
|
3495
3503
|
return $;
|
|
3496
3504
|
}
|
|
3497
3505
|
function ge() {
|
|
3498
3506
|
if (!y() || !m("bounds") || !l) return;
|
|
3499
|
-
const w = ne(), $ = W(),
|
|
3500
|
-
if (p.scale < w - 0.01 || p.scale > $ + 0.01) return void Ce(re.ZoomTo, { scale:
|
|
3501
|
-
if (l.isRunning() ||
|
|
3502
|
-
const D = be(
|
|
3507
|
+
const w = ne(), $ = W(), B = Pe(w, p.scale, $);
|
|
3508
|
+
if (p.scale < w - 0.01 || p.scale > $ + 0.01) return void Ce(re.ZoomTo, { scale: B });
|
|
3509
|
+
if (l.isRunning() || Be()) return;
|
|
3510
|
+
const D = be(B);
|
|
3503
3511
|
p.x < D.x[0] || p.x > D.x[1] || p.y < D.y[0] || p.y > D.y[1] ? (p.x = Pe(D.x[0], p.x, D.x[1]), p.y = Pe(D.y[0], p.y, D.y[1]), l.spring({ tension: 170, friction: 17, restDelta: 1e-3, restSpeed: 1e-3, maxSpeed: 1 / 0, velocity: l.getCurrentVelocities() }), l.from(h).to(p).start()) : De();
|
|
3504
3512
|
}
|
|
3505
3513
|
function ie(w) {
|
|
3506
3514
|
var $;
|
|
3507
3515
|
if (!y()) return;
|
|
3508
|
-
const
|
|
3509
|
-
lt(o, "is-fullsize", O), lt(o, "is-expanded", C), lt(o, "is-dragging", D), lt(o, "can-drag",
|
|
3516
|
+
const B = Vt(), D = Be(), C = A(), O = Z(), G = _t(), K = bt();
|
|
3517
|
+
lt(o, "is-fullsize", O), lt(o, "is-expanded", C), lt(o, "is-dragging", D), lt(o, "can-drag", B), lt(o, "will-zoom-in", G), lt(o, "will-zoom-out", K);
|
|
3510
3518
|
const Q = Pt(), de = dt(), ve = xt(), Te = !y();
|
|
3511
3519
|
for (const Me of (($ = w || e) === null || $ === void 0 ? void 0 : $.querySelectorAll("[data-panzoom-action]")) || []) {
|
|
3512
3520
|
const $e = Me.dataset.panzoomAction;
|
|
3513
|
-
let
|
|
3514
|
-
if (Te)
|
|
3521
|
+
let Ne = !1;
|
|
3522
|
+
if (Te) Ne = !0;
|
|
3515
3523
|
else switch ($e) {
|
|
3516
3524
|
case re.ZoomIn:
|
|
3517
|
-
Q || (
|
|
3525
|
+
Q || (Ne = !0);
|
|
3518
3526
|
break;
|
|
3519
3527
|
case re.ZoomOut:
|
|
3520
|
-
ve || (
|
|
3528
|
+
ve || (Ne = !0);
|
|
3521
3529
|
break;
|
|
3522
3530
|
case re.ToggleFull: {
|
|
3523
|
-
de || ve || (
|
|
3531
|
+
de || ve || (Ne = !0);
|
|
3524
3532
|
const Re = Me.querySelector("g");
|
|
3525
|
-
Re && (Re.style.display = O && !
|
|
3533
|
+
Re && (Re.style.display = O && !Ne ? "none" : "");
|
|
3526
3534
|
break;
|
|
3527
3535
|
}
|
|
3528
3536
|
case re.IterateZoom: {
|
|
3529
|
-
Q || ve || (
|
|
3537
|
+
Q || ve || (Ne = !0);
|
|
3530
3538
|
const Re = Me.querySelector("g");
|
|
3531
|
-
Re && (Re.style.display = Q ||
|
|
3539
|
+
Re && (Re.style.display = Q || Ne ? "" : "none");
|
|
3532
3540
|
break;
|
|
3533
3541
|
}
|
|
3534
3542
|
case re.ToggleCover:
|
|
3535
3543
|
case re.ToggleMax:
|
|
3536
|
-
Q || ve || (
|
|
3544
|
+
Q || ve || (Ne = !0);
|
|
3537
3545
|
}
|
|
3538
|
-
|
|
3546
|
+
Ne ? (Me.setAttribute("aria-disabled", ""), Me.setAttribute("tabindex", "-1")) : (Me.removeAttribute("aria-disabled"), Me.removeAttribute("tabindex"));
|
|
3539
3547
|
}
|
|
3540
3548
|
}
|
|
3541
3549
|
function Ce(w, $) {
|
|
3542
|
-
var
|
|
3550
|
+
var B;
|
|
3543
3551
|
if (!(w && e && r && l && y()) || w === re.Swipe && Math.abs(l.getCurrentVelocities().scale) > 0.01) return;
|
|
3544
3552
|
const D = Object.assign({}, p);
|
|
3545
3553
|
let C = Object.assign({}, p), O = be(H() ? D.scale : h.scale);
|
|
3546
|
-
const G = l.getCurrentVelocities(), K = _e(), Q = (((
|
|
3554
|
+
const G = l.getCurrentVelocities(), K = _e(), Q = (((B = ($ = $ || {}).currentTouch) === null || B === void 0 ? void 0 : B.length) || 0) > 1, de = $.velocityX || 0, ve = $.velocityY || 0;
|
|
3547
3555
|
let Te = $.center;
|
|
3548
|
-
$.srcEvent && (Te =
|
|
3556
|
+
$.srcEvent && (Te = Nt(ra($.srcEvent)));
|
|
3549
3557
|
let Me = $.deltaX || 0, $e = $.deltaY || 0;
|
|
3550
3558
|
switch (w) {
|
|
3551
3559
|
case re.MoveRight:
|
|
@@ -3560,7 +3568,7 @@ const Vo = (e, t = {}, n = {}) => {
|
|
|
3560
3568
|
case re.MoveDown:
|
|
3561
3569
|
$e = $.deltaY || 100;
|
|
3562
3570
|
}
|
|
3563
|
-
let
|
|
3571
|
+
let Ne = [];
|
|
3564
3572
|
if (typeof w == "number") C.scale = w;
|
|
3565
3573
|
else switch (w) {
|
|
3566
3574
|
case re.Reset:
|
|
@@ -3582,7 +3590,7 @@ const Vo = (e, t = {}, n = {}) => {
|
|
|
3582
3590
|
case re.MoveRight:
|
|
3583
3591
|
case re.MoveUp:
|
|
3584
3592
|
case re.MoveDown:
|
|
3585
|
-
if (
|
|
3593
|
+
if (Be()) {
|
|
3586
3594
|
let je = 1, ke = 1;
|
|
3587
3595
|
C.x <= O.x[0] && de <= 0 && (je = Math.max(0.01, 1 - Math.abs(1 / K.width * Math.abs(C.x - O.x[0]))), je *= 0.2), C.x >= O.x[1] && de >= 0 && (je = Math.max(0.01, 1 - Math.abs(1 / K.width * Math.abs(C.x - O.x[1]))), je *= 0.2), C.y <= O.y[0] && ve <= 0 && (ke = Math.max(0.01, 1 - Math.abs(1 / K.height * Math.abs(C.y - O.y[0]))), ke *= 0.2), C.y >= O.y[1] && ve >= 0 && (ke = Math.max(0.01, 1 - Math.abs(1 / K.height * Math.abs(C.y - O.y[1]))), ke *= 0.2), C.x += Me * je, C.y += $e * ke;
|
|
3588
3596
|
} else C.x = Pe(O.x[0], C.x + Me, O.x[1]), C.y = Pe(O.y[0], C.y + $e, O.y[1]);
|
|
@@ -3603,9 +3611,9 @@ const Vo = (e, t = {}, n = {}) => {
|
|
|
3603
3611
|
case re.FlipY:
|
|
3604
3612
|
C.flipY *= -1;
|
|
3605
3613
|
}
|
|
3606
|
-
if (h.angle !== void 0 && Math.abs(h.angle) >= 360 && (C.angle -= 360 * Math.floor(h.angle / 360), h.angle -= 360 * Math.floor(h.angle / 360)),
|
|
3607
|
-
const Re =
|
|
3608
|
-
C.scale =
|
|
3614
|
+
if (h.angle !== void 0 && Math.abs(h.angle) >= 360 && (C.angle -= 360 * Math.floor(h.angle / 360), h.angle -= 360 * Math.floor(h.angle / 360)), Ne.length) {
|
|
3615
|
+
const Re = Ne.findIndex((je) => je > C.scale + 1e-4);
|
|
3616
|
+
C.scale = Ne[Re] || Ne[0];
|
|
3609
3617
|
}
|
|
3610
3618
|
if (Q && (C.scale = Pe(ne() * (Q ? 0.8 : 1), C.scale, W() * (Q ? 1.6 : 1))), H()) {
|
|
3611
3619
|
const Re = q(C.scale);
|
|
@@ -3640,20 +3648,20 @@ const Vo = (e, t = {}, n = {}) => {
|
|
|
3640
3648
|
if (!r || !o || !s) return;
|
|
3641
3649
|
const { width: w, height: $ } = ae();
|
|
3642
3650
|
Object.assign(o.style, { maxWidth: `min(${w}px, 100%)`, maxHeight: `min(${$}px, 100%)` });
|
|
3643
|
-
const
|
|
3644
|
-
const { width: Me, height: $e } = ae(), { width:
|
|
3645
|
-
if (!e) return { x: 0, y: 0, width: 0, height: 0, scale: 0, flipX: 0, flipY: 0, angle: 0, fitWidth:
|
|
3651
|
+
const B = (function() {
|
|
3652
|
+
const { width: Me, height: $e } = ae(), { width: Ne, height: Re } = j();
|
|
3653
|
+
if (!e) return { x: 0, y: 0, width: 0, height: 0, scale: 0, flipX: 0, flipY: 0, angle: 0, fitWidth: Ne, fitHeight: Re, fullWidth: Me, fullHeight: $e };
|
|
3646
3654
|
let { x: je, y: ke, scale: k, angle: L, flipX: R, flipY: F } = h, X = 1 / me(), V = Me, z = $e, Y = h.scale * X, ce = p.scale * X;
|
|
3647
|
-
const fe = Math.max(
|
|
3655
|
+
const fe = Math.max(Ne, Re), xe = Math.min(Ne, Re);
|
|
3648
3656
|
Me > $e ? (V = fe, z = xe) : (V = xe, z = fe), Y = Me > $e ? fe * k / Me || 1 : fe * k / $e || 1;
|
|
3649
3657
|
let Ae = V ? Me * ce : 0, He = z ? $e * ce : 0, We = V && z ? Me * Y / Ae : 0;
|
|
3650
|
-
return je = je + 0.5 * V - 0.5 * Ae, ke = ke + 0.5 * z - 0.5 * He, { x: je, y: ke, width: Ae, height: He, scale: We, flipX: R, flipY: F, angle: L, fitWidth:
|
|
3651
|
-
})(), { x: D, y: C, width: O, height: G, scale: K, angle: Q, flipX: de, flipY: ve } =
|
|
3658
|
+
return je = je + 0.5 * V - 0.5 * Ae, ke = ke + 0.5 * z - 0.5 * He, { x: je, y: ke, width: Ae, height: He, scale: We, flipX: R, flipY: F, angle: L, fitWidth: Ne, fitHeight: Re, fullWidth: Me, fullHeight: $e };
|
|
3659
|
+
})(), { x: D, y: C, width: O, height: G, scale: K, angle: Q, flipX: de, flipY: ve } = B;
|
|
3652
3660
|
let Te = `translate(${ct(D, 100)}px, ${ct(C, 100)}px)`;
|
|
3653
3661
|
Te += de !== 1 || ve !== 1 ? ` scaleX(${ct(K * de)}) scaleY(${ct(K * ve)})` : ` scale(${ct(K)})`, Q !== 0 && (Te += ` rotate(${Q}deg)`), s.style.width = `${ct(O)}px`, s.style.height = `${ct(G)}px`, s.style.transform = `${Te}`, S("render");
|
|
3654
3662
|
}
|
|
3655
3663
|
function at(w = m("clickAction"), $ = {}) {
|
|
3656
|
-
let
|
|
3664
|
+
let B = p.scale, D = he(), C = [];
|
|
3657
3665
|
if (typeof w == "number") D = w;
|
|
3658
3666
|
else if (w) {
|
|
3659
3667
|
switch (w) {
|
|
@@ -3661,10 +3669,10 @@ const Vo = (e, t = {}, n = {}) => {
|
|
|
3661
3669
|
D = $.scale || 1;
|
|
3662
3670
|
break;
|
|
3663
3671
|
case re.ZoomIn:
|
|
3664
|
-
D =
|
|
3672
|
+
D = B * ($.scale || 2);
|
|
3665
3673
|
break;
|
|
3666
3674
|
case re.ZoomOut:
|
|
3667
|
-
D =
|
|
3675
|
+
D = B * ($.scale || 0.5);
|
|
3668
3676
|
break;
|
|
3669
3677
|
case re.ToggleCover:
|
|
3670
3678
|
C = [he(), I("cover")];
|
|
@@ -3680,12 +3688,12 @@ const Vo = (e, t = {}, n = {}) => {
|
|
|
3680
3688
|
break;
|
|
3681
3689
|
case re.Zoom: {
|
|
3682
3690
|
const O = me();
|
|
3683
|
-
D =
|
|
3691
|
+
D = B >= O - 0.05 ? he() : Math.min(O, B * ($.scale || 2));
|
|
3684
3692
|
break;
|
|
3685
3693
|
}
|
|
3686
3694
|
}
|
|
3687
3695
|
if (C.length) {
|
|
3688
|
-
const O = C.find((G) => G >
|
|
3696
|
+
const O = C.find((G) => G > B + 1e-4);
|
|
3689
3697
|
D = O ?? he();
|
|
3690
3698
|
}
|
|
3691
3699
|
}
|
|
@@ -3712,7 +3720,7 @@ const Vo = (e, t = {}, n = {}) => {
|
|
|
3712
3720
|
function Ye(w) {
|
|
3713
3721
|
return Math.abs(w % 180) === 90;
|
|
3714
3722
|
}
|
|
3715
|
-
function
|
|
3723
|
+
function Be() {
|
|
3716
3724
|
return !(!y() || !c?.isPointerDown() || H());
|
|
3717
3725
|
}
|
|
3718
3726
|
function A() {
|
|
@@ -3724,10 +3732,10 @@ const Vo = (e, t = {}, n = {}) => {
|
|
|
3724
3732
|
function le() {
|
|
3725
3733
|
const w = "in-fullscreen", $ = "with-panzoom-in-fullscreen";
|
|
3726
3734
|
e?.classList.toggle(w);
|
|
3727
|
-
const
|
|
3728
|
-
|
|
3735
|
+
const B = e?.classList.contains(w);
|
|
3736
|
+
B ? (document.documentElement.classList.add($), document.addEventListener("keydown", N, !0)) : (document.documentElement.classList.remove($), document.removeEventListener("keydown", N, !0)), De(), S(B ? "enterFS" : "exitFS");
|
|
3729
3737
|
}
|
|
3730
|
-
function
|
|
3738
|
+
function N(w) {
|
|
3731
3739
|
w.key !== "Escape" || w.defaultPrevented || le();
|
|
3732
3740
|
}
|
|
3733
3741
|
const U = { canDrag: Vt, canZoomIn: Pt, canZoomOut: xt, canZoomToFull: dt, destroy: function() {
|
|
@@ -3758,13 +3766,13 @@ const Vo = (e, t = {}, n = {}) => {
|
|
|
3758
3766
|
}, init: function() {
|
|
3759
3767
|
return g = 0, S("init"), (function() {
|
|
3760
3768
|
for (const [w, $] of Object.entries(Object.assign(Object.assign({}, n), i.plugins || {}))) if (w && !f[w] && $ instanceof Function) {
|
|
3761
|
-
const
|
|
3762
|
-
|
|
3769
|
+
const B = $();
|
|
3770
|
+
B.init(U), f[w] = B;
|
|
3763
3771
|
}
|
|
3764
3772
|
S("initPlugins");
|
|
3765
3773
|
})(), (function() {
|
|
3766
|
-
var w, $,
|
|
3767
|
-
const D = Object.assign(Object.assign({}, Ho.classes), m("classes")), C = (w = D.content) === null || w === void 0 ? void 0 : w.split(" ").shift(), O = ($ = D.wrapper) === null || $ === void 0 ? void 0 : $.split(" ").shift(), G = (
|
|
3774
|
+
var w, $, B;
|
|
3775
|
+
const D = Object.assign(Object.assign({}, Ho.classes), m("classes")), C = (w = D.content) === null || w === void 0 ? void 0 : w.split(" ").shift(), O = ($ = D.wrapper) === null || $ === void 0 ? void 0 : $.split(" ").shift(), G = (B = D.viewport) === null || B === void 0 ? void 0 : B.split(" ").shift();
|
|
3768
3776
|
if (!(!C || !O || !G) && e && (pe(e, D.container), r = e.querySelector(`.${C}:not(.is-clone)`), !!r)) {
|
|
3769
3777
|
if (r.setAttribute("draggable", "false"), o = e.querySelector(`.${O}`), o || (o = document.createElement("div"), pe(o, D.wrapper), r.insertAdjacentElement("beforebegin", o), o.insertAdjacentElement("afterbegin", r)), s = e.querySelector(`.${G}`), s || (s = document.createElement("div"), pe(s, D.viewport), o.insertAdjacentElement("beforeend", s)), s.contains(r) || s.insertAdjacentElement("afterbegin", r), a = e.querySelector(`.${C}.is-clone`), a || (a = r.cloneNode(!0), a.removeAttribute("id"), pe(a, "is-clone"), o.insertAdjacentElement("afterbegin", a)), r instanceof HTMLPictureElement && (r = r.querySelector("img")), a instanceof HTMLPictureElement && (a = a.querySelector("img")), s instanceof HTMLPictureElement && (s = s.querySelector("img")), s && (s.style.visibility = "hidden", m("protected"))) {
|
|
3770
3778
|
s.addEventListener("contextmenu", (Q) => {
|
|
@@ -3799,22 +3807,22 @@ const Vo = (e, t = {}, n = {}) => {
|
|
|
3799
3807
|
if (g = 1, e.classList.add("is-loading"), S("loading"), a.src && a.complete) return void w();
|
|
3800
3808
|
(function() {
|
|
3801
3809
|
if (!e || e?.querySelector(".f-spinner")) return;
|
|
3802
|
-
const $ = m("spinnerTpl"),
|
|
3803
|
-
|
|
3810
|
+
const $ = m("spinnerTpl"), B = Dt($);
|
|
3811
|
+
B && (B.classList.add("f-spinner"), e.classList.add("is-loading"), o?.insertAdjacentElement("afterbegin", B));
|
|
3804
3812
|
})(), a.addEventListener("load", w, !1), a.addEventListener("error", w, !1), b.push(() => {
|
|
3805
3813
|
a?.removeEventListener("load", w, !1), a?.removeEventListener("error", w, !1);
|
|
3806
3814
|
});
|
|
3807
3815
|
})(), U;
|
|
3808
|
-
}, isDragging:
|
|
3809
|
-
const
|
|
3810
|
-
w = String(w).replace(/\{\{(\w+)\}\}/g, (D, C) =>
|
|
3816
|
+
}, isDragging: Be, isExpanded: A, isFullsize: Z, isMousemoveMode: H, localize: function(w, $ = []) {
|
|
3817
|
+
const B = m("l10n") || {};
|
|
3818
|
+
w = String(w).replace(/\{\{(\w+)\}\}/g, (D, C) => B[C] || D);
|
|
3811
3819
|
for (let D = 0; D < $.length; D++) w = w.split($[D][0]).join($[D][1]);
|
|
3812
3820
|
return w = w.replace(/\{\{(.*?)\}\}/g, (D, C) => C);
|
|
3813
3821
|
}, off: function(w, $) {
|
|
3814
|
-
for (const
|
|
3822
|
+
for (const B of w instanceof Array ? w : [w]) v.has(B) && v.set(B, v.get(B).filter((D) => D !== $));
|
|
3815
3823
|
return U;
|
|
3816
3824
|
}, on: function(w, $) {
|
|
3817
|
-
for (const
|
|
3825
|
+
for (const B of w instanceof Array ? w : [w]) v.set(B, [...v.get(B) || [], $]);
|
|
3818
3826
|
return U;
|
|
3819
3827
|
}, toggleFS: le, updateControls: ie, version: "6.1.14", willZoomIn: _t, willZoomOut: bt };
|
|
3820
3828
|
return U;
|
|
@@ -3865,7 +3873,7 @@ const ro = (e, t = {}, n = {}) => {
|
|
|
3865
3873
|
V === void 0 && (V = d.initialSlide), R.initialSlide = V, R.slides = [];
|
|
3866
3874
|
for (const z of ae) z.isVirtual && R.slides.push(z);
|
|
3867
3875
|
}
|
|
3868
|
-
|
|
3876
|
+
Ne(), d = R, W("enabled") !== !1 && (l = 0, ie("init"), (function() {
|
|
3869
3877
|
for (const [V, z] of Object.entries(Object.assign(Object.assign({}, n), d.plugins || {}))) if (V && !g[V] && z instanceof Function) {
|
|
3870
3878
|
const Y = z();
|
|
3871
3879
|
Y.init(ke, ro), g[V] = Y;
|
|
@@ -3894,7 +3902,7 @@ const ro = (e, t = {}, n = {}) => {
|
|
|
3894
3902
|
Y?.parentElement === f && (pe(Y, d.classes.slide), pe(Y, z.class), ve(z), ie("attachSlideEl", z));
|
|
3895
3903
|
}
|
|
3896
3904
|
ie("initSlides");
|
|
3897
|
-
})(),
|
|
3905
|
+
})(), B(), l = 1, pe(i, (W("classes") || {}).isEnabled || ""), $e(), xt(), r = Gt().on("start", () => {
|
|
3898
3906
|
o && o.isPointerDown() || (bt(), $e());
|
|
3899
3907
|
}).on("step", (V) => {
|
|
3900
3908
|
const z = x;
|
|
@@ -3919,7 +3927,7 @@ const ro = (e, t = {}, n = {}) => {
|
|
|
3919
3927
|
(function() {
|
|
3920
3928
|
if (l !== 1 || !f) return;
|
|
3921
3929
|
const Y = I.length, ce = f.getBoundingClientRect(), fe = ce.height, xe = ce.width;
|
|
3922
|
-
Y > 1 && (v && Math.abs(fe - ne) < 0.5 || !v && Math.abs(xe - he) < 0.5) || (
|
|
3930
|
+
Y > 1 && (v && Math.abs(fe - ne) < 0.5 || !v && Math.abs(xe - he) < 0.5) || (B(), at(), ne = fe, he = xe, v && !ne || !v && !he || i && f && (Y === I.length && o?.isPointerDown() || (W("dragFree") && (m || x > ue && x < J) ? (bt(), $e()) : Te(M, { transition: !1 }))));
|
|
3923
3931
|
})(), z = null;
|
|
3924
3932
|
}));
|
|
3925
3933
|
}), a.observe(f);
|
|
@@ -4019,7 +4027,7 @@ const ro = (e, t = {}, n = {}) => {
|
|
|
4019
4027
|
function dt(k) {
|
|
4020
4028
|
var L, R, F;
|
|
4021
4029
|
if (!I.length) return 0;
|
|
4022
|
-
const X =
|
|
4030
|
+
const X = Be();
|
|
4023
4031
|
let V = k;
|
|
4024
4032
|
m ? V -= Math.floor((k - ((L = I[0]) === null || L === void 0 ? void 0 : L.pos)) / X) * X || 0 : V = Pe((R = I[0]) === null || R === void 0 ? void 0 : R.pos, k, (F = I[I.length - 1]) === null || F === void 0 ? void 0 : F.pos);
|
|
4025
4033
|
const z = /* @__PURE__ */ new Map();
|
|
@@ -4037,11 +4045,11 @@ const ro = (e, t = {}, n = {}) => {
|
|
|
4037
4045
|
function Ye() {
|
|
4038
4046
|
return h;
|
|
4039
4047
|
}
|
|
4040
|
-
function
|
|
4048
|
+
function Be(k = !0) {
|
|
4041
4049
|
return j.length ? j.reduce((L, R) => L + R.dim, 0) + (j.length - (m && k ? 0 : 1)) * me : 0;
|
|
4042
4050
|
}
|
|
4043
4051
|
function A(k) {
|
|
4044
|
-
const L =
|
|
4052
|
+
const L = Be(), R = Ye();
|
|
4045
4053
|
if (!L || !f || !R) return [];
|
|
4046
4054
|
const F = [];
|
|
4047
4055
|
k = k === void 0 ? x : k, m && (k -= Math.floor(k / L) * L || 0);
|
|
@@ -4061,13 +4069,13 @@ const ro = (e, t = {}, n = {}) => {
|
|
|
4061
4069
|
X.el || (X.el = document.createElement("div")), ie("createSlide", X), R.push(X);
|
|
4062
4070
|
}
|
|
4063
4071
|
ae.splice(L === void 0 ? ae.length : L, 0, ...R), $();
|
|
4064
|
-
for (const F of R) ie("addSlide", F),
|
|
4072
|
+
for (const F of R) ie("addSlide", F), N(F);
|
|
4065
4073
|
return _t(_e), R;
|
|
4066
4074
|
}
|
|
4067
4075
|
function le(k) {
|
|
4068
4076
|
return (Ie(k) || k instanceof HTMLElement) && (k = { html: k }), Object.assign({ index: -1, el: void 0, class: "", isVirtual: !0, dim: 0, pos: 0, offset: 0, html: "", src: "" }, k);
|
|
4069
4077
|
}
|
|
4070
|
-
function
|
|
4078
|
+
function N(k) {
|
|
4071
4079
|
let L = k.el;
|
|
4072
4080
|
if (!k || !L) return;
|
|
4073
4081
|
const R = k.html ? k.html instanceof HTMLElement ? k.html : Dt(k.html) : void 0;
|
|
@@ -4099,7 +4107,7 @@ const ro = (e, t = {}, n = {}) => {
|
|
|
4099
4107
|
R && (L.index !== k && D(R), R.setAttribute("index", `${k}`)), L.index = k;
|
|
4100
4108
|
}
|
|
4101
4109
|
}
|
|
4102
|
-
function
|
|
4110
|
+
function B() {
|
|
4103
4111
|
var k, L, R, F, X;
|
|
4104
4112
|
if (!i || !f) return;
|
|
4105
4113
|
y = W("rtl"), v = W("vertical"), S = v ? "height" : "width";
|
|
@@ -4131,7 +4139,7 @@ const ro = (e, t = {}, n = {}) => {
|
|
|
4131
4139
|
}
|
|
4132
4140
|
if (m = !1, W("infinite")) {
|
|
4133
4141
|
m = !0;
|
|
4134
|
-
const Y =
|
|
4142
|
+
const Y = Be();
|
|
4135
4143
|
let ce = h + p + b;
|
|
4136
4144
|
for (let fe = 0; fe < j.length; fe++) {
|
|
4137
4145
|
const xe = ((L = j[fe]) === null || L === void 0 ? void 0 : L.dim) + me;
|
|
@@ -4144,7 +4152,7 @@ const ro = (e, t = {}, n = {}) => {
|
|
|
4144
4152
|
(function() {
|
|
4145
4153
|
var Y;
|
|
4146
4154
|
if (!i) return;
|
|
4147
|
-
const ce = Ye(), fe =
|
|
4155
|
+
const ce = Ye(), fe = Be(!1);
|
|
4148
4156
|
let xe = W("slidesPerPage");
|
|
4149
4157
|
xe = xe === "auto" ? 1 / 0 : parseFloat(xe + ""), I = [];
|
|
4150
4158
|
let Ae = 0, He = 0;
|
|
@@ -4268,7 +4276,7 @@ const ro = (e, t = {}, n = {}) => {
|
|
|
4268
4276
|
const ce = r.isRunning() ? r.getEndValues().pos : x;
|
|
4269
4277
|
if (Math.abs(ee - ce) < 1) return x = ee, M !== k && (ve(), s = M, M = k, xt(), Pt(), ie("change", M, s)), $e(), void (_ || (_ = !0, ie("settle")));
|
|
4270
4278
|
if (r.pause(), C(), m) {
|
|
4271
|
-
const fe =
|
|
4279
|
+
const fe = Be(), xe = Math.floor((ce - ((F = I[0]) === null || F === void 0 ? void 0 : F.pos)) / fe) || 0, Ae = ee + xe * fe;
|
|
4272
4280
|
ee = [Ae + fe, Ae, Ae - fe].reduce(function(He, We) {
|
|
4273
4281
|
return Math.abs(We - ce) < Math.abs(He - ce) ? We : He;
|
|
4274
4282
|
});
|
|
@@ -4279,7 +4287,7 @@ const ro = (e, t = {}, n = {}) => {
|
|
|
4279
4287
|
var L;
|
|
4280
4288
|
let R = x;
|
|
4281
4289
|
if (m && k !== !0) {
|
|
4282
|
-
const F =
|
|
4290
|
+
const F = Be();
|
|
4283
4291
|
R -= (Math.floor((x - ((L = I[0]) === null || L === void 0 ? void 0 : L.pos) || 0) / F) || 0) * F;
|
|
4284
4292
|
}
|
|
4285
4293
|
return R;
|
|
@@ -4310,7 +4318,7 @@ const ro = (e, t = {}, n = {}) => {
|
|
|
4310
4318
|
ce || (Ae = v ? 0 : y ? -1 * xe : xe, He = v ? xe : 0, We = oo(Ae, 0, Y.dim, 0, 100), Xe = oo(He, 0, Y.dim, 0, 100)), X instanceof Function && !ce ? X(ke, Y, { x: Ae, y: He, xPercent: We, yPercent: Xe }) : z.style.transform = Ae || He ? `translate3d(${We}%, ${Xe}%,0)` : "";
|
|
4311
4319
|
}), ie("render", R);
|
|
4312
4320
|
}
|
|
4313
|
-
function
|
|
4321
|
+
function Ne() {
|
|
4314
4322
|
i?.removeEventListener("click", G), document.removeEventListener("mousemove", De), H.clear(), a?.disconnect(), a = void 0;
|
|
4315
4323
|
for (const k of ae) {
|
|
4316
4324
|
let L = k.el;
|
|
@@ -4330,12 +4338,12 @@ const ro = (e, t = {}, n = {}) => {
|
|
|
4330
4338
|
const ke = { add: function(k, L) {
|
|
4331
4339
|
var R;
|
|
4332
4340
|
let F = x;
|
|
4333
|
-
const X = M, V =
|
|
4334
|
-
return Z(k, L), _t(_e),
|
|
4341
|
+
const X = M, V = Be(), z = r?.isRunning() ? r.getEndValues().pos : x, Y = V && Math.floor((z - (((R = I[0]) === null || R === void 0 ? void 0 : R.pos) || 0)) / V) || 0;
|
|
4342
|
+
return Z(k, L), _t(_e), B(), r && V && (X === M && (F -= Y * V), F === ee ? x = ee : r.spring({ clamp: !0, mass: 1, tension: 300, friction: 25, restDelta: 1, restSpeed: 1 }).from({ pos: F }).to({ pos: ee }).start()), $e(), ke;
|
|
4335
4343
|
}, canGoPrev: Re, canGoNext: je, destroy: function() {
|
|
4336
|
-
return ie("destroy"), window.removeEventListener("resize", Ce),
|
|
4344
|
+
return ie("destroy"), window.removeEventListener("resize", Ce), Ne(), ge.clear(), i = null, I = [], ae = [], d = Object.assign({}, $n), g = {}, j = [], c = void 0, _e = "*", l = 2, ke;
|
|
4337
4345
|
}, emit: ie, filter: function(k = "*") {
|
|
4338
|
-
return _t(k),
|
|
4346
|
+
return _t(k), B(), x = Pe(ue, x, J), $e(), ie("filter", k), ke;
|
|
4339
4347
|
}, getContainer: function() {
|
|
4340
4348
|
return i;
|
|
4341
4349
|
}, getGapDim: Vt, getGestures: function() {
|
|
@@ -4359,7 +4367,7 @@ const ro = (e, t = {}, n = {}) => {
|
|
|
4359
4367
|
k === void 0 && (k = M);
|
|
4360
4368
|
const F = I[k];
|
|
4361
4369
|
if (!F) return k > M ? -1 : 1;
|
|
4362
|
-
const X =
|
|
4370
|
+
const X = Be(), V = Vt();
|
|
4363
4371
|
let z = F.pos, Y = Me();
|
|
4364
4372
|
if (m && L !== !0) {
|
|
4365
4373
|
const ce = Math.floor((Y - ((R = I[0]) === null || R === void 0 ? void 0 : R.pos)) / X) || 0;
|
|
@@ -4376,7 +4384,7 @@ const ro = (e, t = {}, n = {}) => {
|
|
|
4376
4384
|
const F = Me(), X = Ye();
|
|
4377
4385
|
let V = R.pos;
|
|
4378
4386
|
if (m) {
|
|
4379
|
-
const z =
|
|
4387
|
+
const z = Be(), Y = V + (Math.floor((F - ((L = I[0]) === null || L === void 0 ? void 0 : L.pos)) / z) || 0) * z;
|
|
4380
4388
|
V = [Y + z, Y, Y - z].reduce(function(ce, fe) {
|
|
4381
4389
|
return Math.abs(fe - F) < Math.abs(ce - F) ? fe : ce;
|
|
4382
4390
|
});
|
|
@@ -4390,7 +4398,7 @@ const ro = (e, t = {}, n = {}) => {
|
|
|
4390
4398
|
return ae;
|
|
4391
4399
|
}, getState: function() {
|
|
4392
4400
|
return l;
|
|
4393
|
-
}, getTotalSlideDim:
|
|
4401
|
+
}, getTotalSlideDim: Be, getTween: function() {
|
|
4394
4402
|
return r;
|
|
4395
4403
|
}, getViewport: function() {
|
|
4396
4404
|
return f;
|
|
@@ -4400,7 +4408,7 @@ const ro = (e, t = {}, n = {}) => {
|
|
|
4400
4408
|
return s !== void 0;
|
|
4401
4409
|
}, hideError: de, hideLoading: Q, init: function() {
|
|
4402
4410
|
if (!e || !mn(e)) throw new Error("No Element found");
|
|
4403
|
-
return l !== 0 && (
|
|
4411
|
+
return l !== 0 && (Ne(), l = 0), i = e, u = t, window.removeEventListener("resize", Ce), u.breakpoints && window.addEventListener("resize", Ce), Ce(), ke;
|
|
4404
4412
|
}, isInfinite: function() {
|
|
4405
4413
|
return m;
|
|
4406
4414
|
}, isInTransition: function() {
|
|
@@ -4422,11 +4430,11 @@ const ro = (e, t = {}, n = {}) => {
|
|
|
4422
4430
|
}, prev: function(k = {}) {
|
|
4423
4431
|
return Te(M - 1, k), ke;
|
|
4424
4432
|
}, reInit: function(k = {}, L) {
|
|
4425
|
-
return
|
|
4433
|
+
return Ne(), l = 0, c = void 0, _e = "*", t = k, u = k, ot(L) && (n = L), Ce(), ke;
|
|
4426
4434
|
}, remove: function(k) {
|
|
4427
4435
|
k === void 0 && (k = ae.length - 1);
|
|
4428
4436
|
const L = ae[k];
|
|
4429
|
-
return L && (ie("removeSlide", L), L.el && (D(L.el), L.el.remove(), L.el = void 0), ae.splice(k, 1), _t(_e),
|
|
4437
|
+
return L && (ie("removeSlide", L), L.el && (D(L.el), L.el.remove(), L.el = void 0), ae.splice(k, 1), _t(_e), B(), x = Pe(ue, x, J), $e()), ke;
|
|
4430
4438
|
}, setPosition: function(k) {
|
|
4431
4439
|
x = k, bt(), $e();
|
|
4432
4440
|
}, showError: function(k, L) {
|
|
@@ -4739,11 +4747,11 @@ const Vs = Object.assign({ counter: { tpl: '<div class="f-counter"><span data-ca
|
|
|
4739
4747
|
return !!t;
|
|
4740
4748
|
} };
|
|
4741
4749
|
};
|
|
4742
|
-
const
|
|
4750
|
+
const Bs = { autoStart: !0, pauseOnHover: !0, showProgressbar: !0, timeout: 2e3 }, Gc = () => {
|
|
4743
4751
|
let e, t, n = !1, o = !1, r = !1, a = null;
|
|
4744
4752
|
function s(x) {
|
|
4745
4753
|
const _ = e?.getOptions().Autoplay;
|
|
4746
|
-
let M = (ot(_) ? Object.assign(Object.assign({},
|
|
4754
|
+
let M = (ot(_) ? Object.assign(Object.assign({}, Bs), _) : Bs)[x];
|
|
4747
4755
|
return M && typeof M == "function" && e ? M(e) : M;
|
|
4748
4756
|
}
|
|
4749
4757
|
function c() {
|
|
@@ -5020,11 +5028,11 @@ const Yc = () => {
|
|
|
5020
5028
|
return l("type");
|
|
5021
5029
|
}, isEnabled: u };
|
|
5022
5030
|
};
|
|
5023
|
-
const
|
|
5031
|
+
const Ns = { autosize: !1, iframeAttr: { allow: "autoplay; fullscreen", scrolling: "auto" }, preload: !1 }, Xc = () => {
|
|
5024
5032
|
let e;
|
|
5025
5033
|
function t() {
|
|
5026
5034
|
const f = e?.getOptions().Html;
|
|
5027
|
-
return ot(f) ? pt({},
|
|
5035
|
+
return ot(f) ? pt({}, Ns, f) : Ns;
|
|
5028
5036
|
}
|
|
5029
5037
|
function n() {
|
|
5030
5038
|
return e?.getOptions().Html !== !1;
|
|
@@ -5336,7 +5344,7 @@ const Us = { autoStart: !1, btnTpl: '<button data-fullscreen-action="toggle" cla
|
|
|
5336
5344
|
e?.off("initPlugins", n), e?.off("ready", o), e?.off("click", r);
|
|
5337
5345
|
}, exit: l, inFullscreen: s, request: c, toggle: u };
|
|
5338
5346
|
};
|
|
5339
|
-
let ht, ua, zo = !1,
|
|
5347
|
+
let ht, ua, zo = !1, Bo = !1, Ln = !1, No = !1;
|
|
5340
5348
|
const po = () => {
|
|
5341
5349
|
const e = new URL(document.URL).hash, t = e.slice(1).split("-"), n = t[t.length - 1], o = n && /^\+?\d+$/.test(n) && parseInt(t.pop() || "1", 10) || 1;
|
|
5342
5350
|
return { urlHash: e, urlSlug: t.join("-"), urlIndex: o };
|
|
@@ -5364,8 +5372,8 @@ const po = () => {
|
|
|
5364
5372
|
if (r !== !1) {
|
|
5365
5373
|
if (e && e.getState() === 1 && t) {
|
|
5366
5374
|
const a = t.getSlides();
|
|
5367
|
-
for (const s of a || []) if (s.slug === n || (s.fancybox === n || ot(r) && r.slug === n) && s.index === o - 1) return
|
|
5368
|
-
|
|
5375
|
+
for (const s of a || []) if (s.slug === n || (s.fancybox === n || ot(r) && r.slug === n) && s.index === o - 1) return Bo = !1, void t.goTo(s.index);
|
|
5376
|
+
No = !0, e.close(), No = !1;
|
|
5369
5377
|
}
|
|
5370
5378
|
ss();
|
|
5371
5379
|
}
|
|
@@ -5395,7 +5403,7 @@ const Kn = () => {
|
|
|
5395
5403
|
l !== d && (t = l), history.scrollRestoration && !On && (On = history.scrollRestoration, history.scrollRestoration = "manual", window.addEventListener("beforeunload", _o)), s.on("change", o);
|
|
5396
5404
|
const g = c !== u;
|
|
5397
5405
|
try {
|
|
5398
|
-
window.history[g ? "pushState" : "replaceState"]({}, document.title, window.location.pathname + window.location.search + d), g && (
|
|
5406
|
+
window.history[g ? "pushState" : "replaceState"]({}, document.title, window.location.pathname + window.location.search + d), g && (Bo = !0);
|
|
5399
5407
|
} catch {
|
|
5400
5408
|
}
|
|
5401
5409
|
}
|
|
@@ -5411,10 +5419,10 @@ const Kn = () => {
|
|
|
5411
5419
|
}
|
|
5412
5420
|
function r() {
|
|
5413
5421
|
var a;
|
|
5414
|
-
if (!(!e || !e.isTopMost() || e.getOptions().Hash === !1 ||
|
|
5422
|
+
if (!(!e || !e.isTopMost() || e.getOptions().Hash === !1 || No) && Xn(e)) {
|
|
5415
5423
|
Ln = !0;
|
|
5416
5424
|
try {
|
|
5417
|
-
|
|
5425
|
+
Bo && !(function() {
|
|
5418
5426
|
if (window.parent === window) return !1;
|
|
5419
5427
|
try {
|
|
5420
5428
|
var s = window.frameElement;
|
|
@@ -5469,19 +5477,19 @@ const Ks = "with-fancybox", nu = () => {
|
|
|
5469
5477
|
let e, t, n, o, r, a, s, c = Ge.Init, l = Object.assign({}, Rn), u = -1, d = {}, g = [], i = !1, f = !0, h = 0;
|
|
5470
5478
|
function p(A, ...Z) {
|
|
5471
5479
|
let le = l[A];
|
|
5472
|
-
return le && typeof le == "function" ? le(
|
|
5480
|
+
return le && typeof le == "function" ? le(Be, ...Z) : le;
|
|
5473
5481
|
}
|
|
5474
5482
|
function b(A, Z = []) {
|
|
5475
5483
|
const le = p("l10n") || {};
|
|
5476
|
-
A = String(A).replace(/\{\{(\w+)\}\}/g, (
|
|
5477
|
-
for (let
|
|
5478
|
-
return A = A.replace(/\{\{(.*?)\}\}/g, (
|
|
5484
|
+
A = String(A).replace(/\{\{(\w+)\}\}/g, (N, U) => le[U] || N);
|
|
5485
|
+
for (let N = 0; N < Z.length; N++) A = A.split(Z[N][0]).join(Z[N][1]);
|
|
5486
|
+
return A = A.replace(/\{\{(.*?)\}\}/g, (N, U) => U);
|
|
5479
5487
|
}
|
|
5480
5488
|
const m = /* @__PURE__ */ new Map();
|
|
5481
5489
|
function y(A, ...Z) {
|
|
5482
5490
|
const le = [...m.get(A) || []];
|
|
5483
|
-
for (const [
|
|
5484
|
-
for (const
|
|
5491
|
+
for (const [N, U] of Object.entries(l.on || {})) (N === A || N.split(" ").indexOf(A) > -1) && le.push(U);
|
|
5492
|
+
for (const N of le) N && typeof N == "function" && N(Be, ...Z);
|
|
5485
5493
|
A !== "*" && y("*", A, ...Z);
|
|
5486
5494
|
}
|
|
5487
5495
|
function v() {
|
|
@@ -5493,50 +5501,50 @@ const Ks = "with-fancybox", nu = () => {
|
|
|
5493
5501
|
}
|
|
5494
5502
|
function S(A, Z) {
|
|
5495
5503
|
var le;
|
|
5496
|
-
he(Z), j(), (le = Z.el) === null || le === void 0 || le.addEventListener("click", _), Z.type !== "inline" && Z.type !== "clone" || (function(
|
|
5497
|
-
if (!o || !
|
|
5504
|
+
he(Z), j(), (le = Z.el) === null || le === void 0 || le.addEventListener("click", _), Z.type !== "inline" && Z.type !== "clone" || (function(N) {
|
|
5505
|
+
if (!o || !N || !N.el) return;
|
|
5498
5506
|
let U = null;
|
|
5499
|
-
if (Ie(
|
|
5500
|
-
const w =
|
|
5507
|
+
if (Ie(N.src)) {
|
|
5508
|
+
const w = N.src.split("#", 2).pop();
|
|
5501
5509
|
U = w ? document.getElementById(w) : null;
|
|
5502
5510
|
}
|
|
5503
5511
|
if (U) {
|
|
5504
|
-
if (pe(U, "f-html"),
|
|
5512
|
+
if (pe(U, "f-html"), N.type === "clone" || U.closest(".fancybox__carousel")) {
|
|
5505
5513
|
U = U.cloneNode(!0);
|
|
5506
5514
|
const w = U.dataset.animationName;
|
|
5507
5515
|
w && (U.classList.remove(w), delete U.dataset.animationName);
|
|
5508
5516
|
let $ = U.getAttribute("id");
|
|
5509
|
-
$ = $ ? `${$}--clone` : `clone-${u}-${
|
|
5517
|
+
$ = $ ? `${$}--clone` : `clone-${u}-${N.index}`, U.setAttribute("id", $);
|
|
5510
5518
|
} else if (U.parentNode) {
|
|
5511
5519
|
const w = document.createElement("div");
|
|
5512
|
-
w.inert = !0, U.parentNode.insertBefore(w, U),
|
|
5520
|
+
w.inert = !0, U.parentNode.insertBefore(w, U), N.placeholderEl = w;
|
|
5513
5521
|
}
|
|
5514
|
-
|
|
5515
|
-
} else o?.showError(
|
|
5516
|
-
})(Z), Z.type === "ajax" && (function(
|
|
5517
|
-
const U =
|
|
5518
|
-
if (!U ||
|
|
5519
|
-
o?.showLoading(
|
|
5522
|
+
N.htmlEl = U, pe(N.el, "has-html"), N.el.prepend(U), U.classList.remove("hidden"), U.style.display === "none" && (U.style.display = ""), getComputedStyle(U).getPropertyValue("display") === "none" && (U.style.display = U.dataset.display || "flex"), o?.emit("contentReady", N);
|
|
5523
|
+
} else o?.showError(N, "{{ELEMENT_NOT_FOUND}}");
|
|
5524
|
+
})(Z), Z.type === "ajax" && (function(N) {
|
|
5525
|
+
const U = N.el;
|
|
5526
|
+
if (!U || N.htmlEl || N.xhr) return;
|
|
5527
|
+
o?.showLoading(N), N.state = 0;
|
|
5520
5528
|
const w = new XMLHttpRequest();
|
|
5521
5529
|
w.onreadystatechange = function() {
|
|
5522
|
-
if (w.readyState === XMLHttpRequest.DONE && c === Ge.Ready) if (o?.hideLoading(
|
|
5523
|
-
let
|
|
5524
|
-
if (
|
|
5530
|
+
if (w.readyState === XMLHttpRequest.DONE && c === Ge.Ready) if (o?.hideLoading(N), N.state = 1, w.status === 200) {
|
|
5531
|
+
let B = w.responseText + "", D = null, C = null;
|
|
5532
|
+
if (N.filter) {
|
|
5525
5533
|
const O = document.createElement("div");
|
|
5526
|
-
O.innerHTML =
|
|
5534
|
+
O.innerHTML = B, C = O.querySelector(N.filter + "");
|
|
5527
5535
|
}
|
|
5528
|
-
C && C instanceof HTMLElement ? D = C : (D = document.createElement("div"), D.innerHTML =
|
|
5529
|
-
} else o?.showError(
|
|
5536
|
+
C && C instanceof HTMLElement ? D = C : (D = document.createElement("div"), D.innerHTML = B), D.classList.add("f-html"), N.htmlEl = D, U.classList.add("has-html"), U.classList.add("has-ajax"), U.prepend(D), o?.emit("contentReady", N);
|
|
5537
|
+
} else o?.showError(N);
|
|
5530
5538
|
};
|
|
5531
5539
|
const $ = p("ajax") || null;
|
|
5532
|
-
w.open($ ? "POST" : "GET",
|
|
5540
|
+
w.open($ ? "POST" : "GET", N.src + ""), w.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"), w.setRequestHeader("X-Requested-With", "XMLHttpRequest"), w.send($), N.xhr = w;
|
|
5533
5541
|
})(Z);
|
|
5534
5542
|
}
|
|
5535
5543
|
function x(A, Z) {
|
|
5536
5544
|
var le;
|
|
5537
|
-
me(Z), (le = Z.el) === null || le === void 0 || le.removeEventListener("click", _), Z.type !== "inline" && Z.type !== "clone" || (function(
|
|
5538
|
-
const U =
|
|
5539
|
-
U && (getComputedStyle(U).getPropertyValue("display") !== "none" && (U.style.display = "none"), U.offsetHeight), w && (U && w.parentNode && w.parentNode.insertBefore(U, w), w.remove()),
|
|
5545
|
+
me(Z), (le = Z.el) === null || le === void 0 || le.removeEventListener("click", _), Z.type !== "inline" && Z.type !== "clone" || (function(N) {
|
|
5546
|
+
const U = N.htmlEl, w = N.placeholderEl;
|
|
5547
|
+
U && (getComputedStyle(U).getPropertyValue("display") !== "none" && (U.style.display = "none"), U.offsetHeight), w && (U && w.parentNode && w.parentNode.insertBefore(U, w), w.remove()), N.htmlEl = void 0, N.placeholderEl = void 0;
|
|
5540
5548
|
})(Z), Z.xhr && (Z.xhr.abort(), Z.xhr = void 0);
|
|
5541
5549
|
}
|
|
5542
5550
|
function _(A) {
|
|
@@ -5559,14 +5567,14 @@ const Ks = "with-fancybox", nu = () => {
|
|
|
5559
5567
|
(function() {
|
|
5560
5568
|
const le = o?.getViewport();
|
|
5561
5569
|
if (!p("dragToClose") || !o || !le || (r = En(le).init(), !r)) return;
|
|
5562
|
-
let
|
|
5570
|
+
let N = !1, U = 0, w = 0, $ = {}, B = 1;
|
|
5563
5571
|
function D() {
|
|
5564
5572
|
var O, G;
|
|
5565
5573
|
a?.spring({ clamp: !0, mass: 1, tension: w === 0 ? 140 : 960, friction: 17, restDelta: 0.1, restSpeed: 0.1, maxSpeed: 1 / 0 }).from({ y: U }).to({ y: w }).start();
|
|
5566
5574
|
const K = ((O = o?.getViewport()) === null || O === void 0 ? void 0 : O.getBoundingClientRect().height) || 0, Q = (G = ge()) === null || G === void 0 ? void 0 : G.panzoomRef;
|
|
5567
5575
|
if (K && Q) if (w === 0) Q.execute(re.Reset);
|
|
5568
5576
|
else {
|
|
5569
|
-
const de = oo(Math.abs(U), 0, 0.33 * K,
|
|
5577
|
+
const de = oo(Math.abs(U), 0, 0.33 * K, B, 0.77 * B, !1);
|
|
5570
5578
|
Q.execute(re.ZoomTo, { scale: de });
|
|
5571
5579
|
}
|
|
5572
5580
|
}
|
|
@@ -5583,23 +5591,23 @@ const Ks = "with-fancybox", nu = () => {
|
|
|
5583
5591
|
t.style.setProperty("--f-drag-opacity", K + ""), t.style.setProperty("--f-drag-offset", U + "px");
|
|
5584
5592
|
}
|
|
5585
5593
|
}), r.on("start", function() {
|
|
5586
|
-
|
|
5594
|
+
N || (a?.pause(), w = U);
|
|
5587
5595
|
}).on("panstart", (O) => {
|
|
5588
5596
|
var G, K;
|
|
5589
|
-
if (!
|
|
5590
|
-
Lt(O.srcEvent),
|
|
5597
|
+
if (!N && C(O) && O.axis === "y") {
|
|
5598
|
+
Lt(O.srcEvent), N = !0, Pt(), (G = o?.getViewport()) === null || G === void 0 || G.classList.add("is-dragging");
|
|
5591
5599
|
const Q = (K = ge()) === null || K === void 0 ? void 0 : K.panzoomRef;
|
|
5592
5600
|
if (Q) {
|
|
5593
|
-
|
|
5601
|
+
B = Q.getTransform().scale || 1;
|
|
5594
5602
|
const de = Q.getOptions();
|
|
5595
5603
|
$ = Object.assign({}, de), de.bounds = !1, de.gestures = !1;
|
|
5596
5604
|
}
|
|
5597
|
-
} else
|
|
5605
|
+
} else N = !1;
|
|
5598
5606
|
}).on("pan", function(O) {
|
|
5599
|
-
|
|
5607
|
+
N && C(O) && (Lt(O.srcEvent), O.srcEvent.stopPropagation(), O.axis === "y" && (w += O.deltaY, D()));
|
|
5600
5608
|
}).on("end", (O) => {
|
|
5601
5609
|
var G, K, Q;
|
|
5602
|
-
if ((G = o?.getViewport()) === null || G === void 0 || G.classList.remove("is-dragging"),
|
|
5610
|
+
if ((G = o?.getViewport()) === null || G === void 0 || G.classList.remove("is-dragging"), N) {
|
|
5603
5611
|
const de = (K = ge()) === null || K === void 0 ? void 0 : K.panzoomRef;
|
|
5604
5612
|
if (de) {
|
|
5605
5613
|
(Q = de.getTween()) === null || Q === void 0 || Q.end();
|
|
@@ -5608,7 +5616,7 @@ const Ks = "with-fancybox", nu = () => {
|
|
|
5608
5616
|
}
|
|
5609
5617
|
C(O) && O.axis === "y" && (Math.abs(O.velocityY) > 5 || Math.abs(U) > 50) && dt(O.srcEvent, "f-throwOut" + (O.velocityY > 0 ? "Down" : "Up"));
|
|
5610
5618
|
}
|
|
5611
|
-
|
|
5619
|
+
N = !1, c === Ge.Ready && U !== 0 && (w = 0, D());
|
|
5612
5620
|
});
|
|
5613
5621
|
})(), document.body.addEventListener("click", ne), document.body.addEventListener("keydown", I, { passive: !1, capture: !0 }), j(), at();
|
|
5614
5622
|
const Z = p("sync");
|
|
@@ -5631,7 +5639,7 @@ const Ks = "with-fancybox", nu = () => {
|
|
|
5631
5639
|
function j() {
|
|
5632
5640
|
if (!t) return;
|
|
5633
5641
|
const A = o?.getPages().length || 0, Z = o?.getPageIndex() || 0, le = t.querySelectorAll("[data-fancybox-index],[data-fancybox-page],[data-fancybox-pages]");
|
|
5634
|
-
for (const
|
|
5642
|
+
for (const N of le) N.hasAttribute("data-fancybox-index") ? N.textContent = String(Z) : N.hasAttribute("data-fancybox-page") ? N.textContent = String(Z + 1) : N.textContent = String(A);
|
|
5635
5643
|
}
|
|
5636
5644
|
function H(A) {
|
|
5637
5645
|
if (A.composedPath()[0].closest("[data-fancybox-close]")) return void dt(A);
|
|
@@ -5644,11 +5652,11 @@ const Ks = "with-fancybox", nu = () => {
|
|
|
5644
5652
|
if (!be() || c !== Ge.Ready) return;
|
|
5645
5653
|
const Z = A.key, le = p("keyboard");
|
|
5646
5654
|
if (!le || A.ctrlKey || A.altKey || A.shiftKey) return;
|
|
5647
|
-
const
|
|
5648
|
-
if (!mn(
|
|
5655
|
+
const N = A.composedPath()[0];
|
|
5656
|
+
if (!mn(N) || Z !== "Escape" && ((w) => {
|
|
5649
5657
|
const $ = ["input", "textarea", "select", "option", "video", "iframe", "[contenteditable]", "[data-selectable]", "[data-draggable]"].join(",");
|
|
5650
5658
|
return w.matches($) || w.closest($);
|
|
5651
|
-
})(
|
|
5659
|
+
})(N) || (y("keydown", A), A.defaultPrevented)) return;
|
|
5652
5660
|
const U = le[Z];
|
|
5653
5661
|
if (U) switch (U) {
|
|
5654
5662
|
case "close":
|
|
@@ -5663,15 +5671,15 @@ const Ks = "with-fancybox", nu = () => {
|
|
|
5663
5671
|
}
|
|
5664
5672
|
function ne(A) {
|
|
5665
5673
|
if (!be() || c !== Ge.Ready || (bt(), A.defaultPrevented)) return;
|
|
5666
|
-
const Z = A.composedPath()[0], le = !!Z.closest("[data-fancybox-close]"),
|
|
5667
|
-
(le ||
|
|
5674
|
+
const Z = A.composedPath()[0], le = !!Z.closest("[data-fancybox-close]"), N = Z.classList.contains("fancybox__backdrop");
|
|
5675
|
+
(le || N) && H(A);
|
|
5668
5676
|
}
|
|
5669
5677
|
function he(A) {
|
|
5670
5678
|
var Z;
|
|
5671
|
-
const { el: le, htmlEl:
|
|
5679
|
+
const { el: le, htmlEl: N, panzoomRef: U, closeButtonEl: w } = A, $ = U ? U.getWrapper() : N;
|
|
5672
5680
|
if (!le || !le.parentElement || !$) return;
|
|
5673
|
-
let
|
|
5674
|
-
if (
|
|
5681
|
+
let B = p("closeButton");
|
|
5682
|
+
if (B === "auto" && (B = ((Z = o?.getPlugins().Toolbar) === null || Z === void 0 ? void 0 : Z.isEnabled()) !== !0), B) {
|
|
5675
5683
|
if (!w) {
|
|
5676
5684
|
const D = Dt(b(p("closeButtonTpl")));
|
|
5677
5685
|
D && (pe(D, "is-close-button"), A.closeButtonEl = $.insertAdjacentElement("afterbegin", D), pe(le, "has-close-btn"));
|
|
@@ -5684,10 +5692,10 @@ const Ks = "with-fancybox", nu = () => {
|
|
|
5684
5692
|
function W(A) {
|
|
5685
5693
|
if (!(f && o && o.getState() === 1 && A && A.index === o.getOptions().initialPage && A.el && A.el.parentElement) || A.state !== void 0 && A.state !== 1) return;
|
|
5686
5694
|
f = !1;
|
|
5687
|
-
const Z = A.panzoomRef, le = Z?.getTween(),
|
|
5688
|
-
if (Z && le &&
|
|
5689
|
-
const { x: w, y: $, scale:
|
|
5690
|
-
return void le.spring({ tension: 215, friction: 25, restDelta: 1e-3, restSpeed: 1e-3, maxSpeed: 1 / 0 }).from(
|
|
5695
|
+
const Z = A.panzoomRef, le = Z?.getTween(), N = p("zoomEffect") && le ? Ce(A) : void 0;
|
|
5696
|
+
if (Z && le && N) {
|
|
5697
|
+
const { x: w, y: $, scale: B } = Z.getStartPosition();
|
|
5698
|
+
return void le.spring({ tension: 215, friction: 25, restDelta: 1e-3, restSpeed: 1e-3, maxSpeed: 1 / 0 }).from(N).to({ x: w, y: $, scale: B }).start();
|
|
5691
5699
|
}
|
|
5692
5700
|
const U = Z?.getContent() || A.htmlEl;
|
|
5693
5701
|
U && Xs(U, p("showClass", A));
|
|
@@ -5706,8 +5714,8 @@ const Ks = "with-fancybox", nu = () => {
|
|
|
5706
5714
|
}
|
|
5707
5715
|
function Ce(A) {
|
|
5708
5716
|
var Z, le;
|
|
5709
|
-
const
|
|
5710
|
-
if (!
|
|
5717
|
+
const N = A.thumbEl;
|
|
5718
|
+
if (!N || !((K) => {
|
|
5711
5719
|
const Q = K.getBoundingClientRect(), de = K.closest("[style]"), ve = de?.parentElement;
|
|
5712
5720
|
if (de && de.style.transform && ve) {
|
|
5713
5721
|
const $e = ve.getBoundingClientRect();
|
|
@@ -5715,22 +5723,22 @@ const Ks = "with-fancybox", nu = () => {
|
|
|
5715
5723
|
}
|
|
5716
5724
|
const Te = Math.max(document.documentElement.clientHeight, window.innerHeight), Me = Math.max(document.documentElement.clientWidth, window.innerWidth);
|
|
5717
5725
|
return !(Q.bottom < 0 || Q.top - Te >= 0 || Q.right < 0 || Q.left - Me >= 0);
|
|
5718
|
-
})(
|
|
5726
|
+
})(N)) return;
|
|
5719
5727
|
const U = (le = (Z = A.panzoomRef) === null || Z === void 0 ? void 0 : Z.getWrapper()) === null || le === void 0 ? void 0 : le.getBoundingClientRect(), w = U?.width, $ = U?.height;
|
|
5720
5728
|
if (!w || !$) return;
|
|
5721
|
-
const
|
|
5722
|
-
let D =
|
|
5723
|
-
if (!(!
|
|
5724
|
-
if (
|
|
5725
|
-
const K = window.getComputedStyle(
|
|
5729
|
+
const B = N.getBoundingClientRect();
|
|
5730
|
+
let D = B.width, C = B.height, O = B.left, G = B.top;
|
|
5731
|
+
if (!(!B || !D || !C)) {
|
|
5732
|
+
if (N instanceof HTMLImageElement) {
|
|
5733
|
+
const K = window.getComputedStyle(N).getPropertyValue("object-fit");
|
|
5726
5734
|
if (K === "contain" || K === "scale-down") {
|
|
5727
|
-
const { width: Q, height: de } = ((ve, Te, Me, $e,
|
|
5728
|
-
if (
|
|
5735
|
+
const { width: Q, height: de } = ((ve, Te, Me, $e, Ne = "contain") => {
|
|
5736
|
+
if (Ne === "contain" || ve > Me || Te > $e) {
|
|
5729
5737
|
const Re = Me / ve, je = $e / Te, ke = Math.min(Re, je);
|
|
5730
5738
|
ve *= ke, Te *= ke;
|
|
5731
5739
|
}
|
|
5732
5740
|
return { width: ve, height: Te };
|
|
5733
|
-
})(
|
|
5741
|
+
})(N.naturalWidth, N.naturalHeight, D, C, K);
|
|
5734
5742
|
O += 0.5 * (D - Q), G += 0.5 * (C - de), D = Q, C = de;
|
|
5735
5743
|
}
|
|
5736
5744
|
}
|
|
@@ -5761,16 +5769,16 @@ const Ks = "with-fancybox", nu = () => {
|
|
|
5761
5769
|
!A || (Z = A.getBoundingClientRect()).bottom > 0 && Z.right > 0 && Z.left < (window.innerWidth || document.documentElement.clientWidth) && Z.top < (window.innerHeight || document.documentElement.clientHeight) || A.closest("[inert]") || A.scrollIntoView({ behavior: "instant", block: "center", inline: "center" });
|
|
5762
5770
|
}
|
|
5763
5771
|
function dt(A, Z) {
|
|
5764
|
-
var le,
|
|
5772
|
+
var le, N, U, w, $;
|
|
5765
5773
|
if (c === Ge.Closing || c === Ge.Destroyed) return;
|
|
5766
|
-
const
|
|
5767
|
-
if (y("shouldClose",
|
|
5774
|
+
const B = new Event("shouldClose", { bubbles: !0, cancelable: !0 });
|
|
5775
|
+
if (y("shouldClose", B, A), B.defaultPrevented) return;
|
|
5768
5776
|
if (De(), A) {
|
|
5769
5777
|
if (A.defaultPrevented) return;
|
|
5770
5778
|
Lt(A), A.stopPropagation(), A.stopImmediatePropagation();
|
|
5771
5779
|
}
|
|
5772
5780
|
if (c = Ge.Closing, a?.pause(), r?.destroy(), o) {
|
|
5773
|
-
(le = o.getGestures()) === null || le === void 0 || le.destroy(), (
|
|
5781
|
+
(le = o.getGestures()) === null || le === void 0 || le.destroy(), (N = o.getTween()) === null || N === void 0 || N.pause();
|
|
5774
5782
|
for (const O of o.getSlides()) {
|
|
5775
5783
|
const G = O.panzoomRef;
|
|
5776
5784
|
G && (pt(G.getOptions(), { clickAction: !1, dblClickAction: !1, wheelAction: !1, bounds: !1, minScale: 0, maxScale: 1 / 0 }), (U = G.getGestures()) === null || U === void 0 || U.destroy(), (w = G.getTween()) === null || w === void 0 || w.pause());
|
|
@@ -5786,28 +5794,28 @@ const Ks = "with-fancybox", nu = () => {
|
|
|
5786
5794
|
}) : Vt(A, Z);
|
|
5787
5795
|
}
|
|
5788
5796
|
function Vt(A, Z) {
|
|
5789
|
-
var le,
|
|
5797
|
+
var le, N;
|
|
5790
5798
|
if (c !== Ge.Closing) return;
|
|
5791
5799
|
y("close", A), f = !1, document.body.removeEventListener("click", ne), document.body.removeEventListener("keydown", I, { passive: !1, capture: !0 }), p("placeFocusBack") && Pt();
|
|
5792
5800
|
const U = document.activeElement;
|
|
5793
5801
|
U && e?.contains(U) && U.blur(), p("fadeEffect") && (t?.classList.remove("is-ready"), t?.classList.add("is-hiding")), t?.classList.add("is-closing");
|
|
5794
|
-
const w = ge(), $ = w?.el,
|
|
5802
|
+
const w = ge(), $ = w?.el, B = w?.panzoomRef, D = (le = w?.panzoomRef) === null || le === void 0 ? void 0 : le.getTween(), C = Z || p("hideClass");
|
|
5795
5803
|
let O = !1, G = !1;
|
|
5796
|
-
if (o && w && $ &&
|
|
5804
|
+
if (o && w && $ && B && D) {
|
|
5797
5805
|
let Q;
|
|
5798
5806
|
if (p("zoomEffect") && w.state === 1 && (Q = Ce(w)), Q) {
|
|
5799
5807
|
O = !0;
|
|
5800
5808
|
const de = () => {
|
|
5801
5809
|
Q = Ce(w), Q ? D.to(Object.assign(Object.assign({}, wt), Q)) : Ye();
|
|
5802
5810
|
};
|
|
5803
|
-
|
|
5811
|
+
B.on("refresh", () => {
|
|
5804
5812
|
de();
|
|
5805
|
-
}), D.easing(Gt.Easings.EaseOut).duration(350).from(Object.assign({},
|
|
5813
|
+
}), D.easing(Gt.Easings.EaseOut).duration(350).from(Object.assign({}, B.getTransform())).to(Object.assign(Object.assign({}, wt), Q)).start(), $?.getAnimations() && ($.style.animationPlayState = "paused", requestAnimationFrame(() => {
|
|
5806
5814
|
de();
|
|
5807
5815
|
}));
|
|
5808
5816
|
}
|
|
5809
5817
|
}
|
|
5810
|
-
const K = w?.htmlEl || ((
|
|
5818
|
+
const K = w?.htmlEl || ((N = w?.panzoomRef) === null || N === void 0 ? void 0 : N.getWrapper());
|
|
5811
5819
|
K && fa(K), !O && C && K && (G = !0, Xs(K, C, () => {
|
|
5812
5820
|
Ye();
|
|
5813
5821
|
})), O || G ? setTimeout(() => {
|
|
@@ -5815,18 +5823,18 @@ const Ks = "with-fancybox", nu = () => {
|
|
|
5815
5823
|
}, 350) : Ye();
|
|
5816
5824
|
}
|
|
5817
5825
|
function Ye() {
|
|
5818
|
-
var A, Z, le,
|
|
5826
|
+
var A, Z, le, N, U;
|
|
5819
5827
|
if (c === Ge.Destroyed) return;
|
|
5820
5828
|
c = Ge.Destroyed;
|
|
5821
5829
|
const w = ie();
|
|
5822
|
-
y("destroy"), (Z = (A = p("sync")) === null || A === void 0 ? void 0 : A.getPlugins().Autoplay) === null || Z === void 0 || Z.resume(), (
|
|
5830
|
+
y("destroy"), (Z = (A = p("sync")) === null || A === void 0 ? void 0 : A.getPlugins().Autoplay) === null || Z === void 0 || Z.resume(), (N = (le = p("sync")) === null || le === void 0 ? void 0 : le.getPlugins().Autoscroll) === null || N === void 0 || N.resume(), e instanceof HTMLDialogElement && e.close(), (U = o?.getContainer()) === null || U === void 0 || U.classList.remove("is-idle"), o?.destroy();
|
|
5823
5831
|
for (const $ of Object.values(d)) $?.destroy();
|
|
5824
5832
|
if (d = {}, e?.remove(), e = void 0, t = void 0, o = void 0, Rt.delete(u), !Rt.size && (xs(!1), document.documentElement.classList.remove(Ks), p("placeFocusBack") && w && !w.closest("[inert]"))) try {
|
|
5825
5833
|
w?.focus({ preventScroll: !0 });
|
|
5826
5834
|
} catch {
|
|
5827
5835
|
}
|
|
5828
5836
|
}
|
|
5829
|
-
const
|
|
5837
|
+
const Be = { close: dt, destroy: Ye, getCarousel: function() {
|
|
5830
5838
|
return o;
|
|
5831
5839
|
}, getContainer: function() {
|
|
5832
5840
|
return t;
|
|
@@ -5841,26 +5849,26 @@ const Ks = "with-fancybox", nu = () => {
|
|
|
5841
5849
|
}, getState: function() {
|
|
5842
5850
|
return c;
|
|
5843
5851
|
}, init: function(A = [], Z = {}) {
|
|
5844
|
-
c !== Ge.Init && (
|
|
5852
|
+
c !== Ge.Init && (Be.destroy(), c = Ge.Init), l = pt({}, Rn, Z), u = p("id") || "fancybox-" + ++tu;
|
|
5845
5853
|
const le = Rt.get(u);
|
|
5846
|
-
if (le && le.destroy(), Rt.set(u,
|
|
5847
|
-
for (const [
|
|
5854
|
+
if (le && le.destroy(), Rt.set(u, Be), y("init"), (function() {
|
|
5855
|
+
for (const [N, U] of Object.entries(Object.assign(Object.assign({}, qe.Plugins), l.plugins || {}))) if (N && !d[N] && U instanceof Function) {
|
|
5848
5856
|
const w = U();
|
|
5849
|
-
w.init(
|
|
5857
|
+
w.init(Be), d[N] = w;
|
|
5850
5858
|
}
|
|
5851
5859
|
y("initPlugins");
|
|
5852
|
-
})(), (function(
|
|
5853
|
-
y("initSlides",
|
|
5860
|
+
})(), (function(N = []) {
|
|
5861
|
+
y("initSlides", N), g = [...N];
|
|
5854
5862
|
})(A), (function() {
|
|
5855
|
-
const
|
|
5856
|
-
if (!(
|
|
5863
|
+
const N = p("parentEl") || document.body;
|
|
5864
|
+
if (!(N && N instanceof HTMLElement)) return;
|
|
5857
5865
|
const U = b(p("mainTpl") || "");
|
|
5858
5866
|
if (e = Dt(U) || void 0, !e || (t = e.querySelector(".fancybox__container"), !(t && t instanceof HTMLElement))) return;
|
|
5859
5867
|
const w = p("mainClass");
|
|
5860
5868
|
w && pe(t, w);
|
|
5861
5869
|
const $ = p("mainStyle");
|
|
5862
5870
|
if ($ && ot($)) for (const [C, O] of Object.entries($)) t.style.setProperty(C, O);
|
|
5863
|
-
const
|
|
5871
|
+
const B = p("theme"), D = B === "auto" ? window.matchMedia("(prefers-color-scheme:light)").matches : B === "light";
|
|
5864
5872
|
t.setAttribute("theme", D ? "light" : "dark"), e.setAttribute("id", `${u}`), e.addEventListener("keydown", (C) => {
|
|
5865
5873
|
C.key === "Escape" && Lt(C);
|
|
5866
5874
|
}), e.addEventListener("wheel", (C) => {
|
|
@@ -5873,19 +5881,19 @@ const Ks = "with-fancybox", nu = () => {
|
|
|
5873
5881
|
h && ve - h < 300 ? K && Lt(C) : (h = ve, y("wheel", C, de), C.defaultPrevented || (G === "close" ? dt(C) : G === "slide" && o && !on(O) && (Lt(C), o[de > 0 ? "prev" : "next"]())));
|
|
5874
5882
|
}, { capture: !0, passive: !1 }), e.addEventListener("cancel", (C) => {
|
|
5875
5883
|
dt(C);
|
|
5876
|
-
}),
|
|
5884
|
+
}), N.append(e), Rt.size === 1 && (p("hideScrollbar") && xs(!0), document.documentElement.classList.add(Ks)), y("initLayout"), e instanceof HTMLDialogElement && (p("modal") ? e.showModal() : e.show());
|
|
5877
5885
|
})(), (function() {
|
|
5878
5886
|
if (n = e?.querySelector(".fancybox__carousel") || void 0, !n) return;
|
|
5879
|
-
n.fancybox =
|
|
5880
|
-
const
|
|
5887
|
+
n.fancybox = Be;
|
|
5888
|
+
const N = pt({}, { Autoplay: { autoStart: !1, pauseOnHover: !1, progressbarParentEl: (U) => {
|
|
5881
5889
|
const w = U.getContainer();
|
|
5882
5890
|
return w?.querySelector(".f-carousel__toolbar [data-autoplay-action]") || w;
|
|
5883
5891
|
} }, Fullscreen: { el: t }, Toolbar: { absolute: !0, items: { counter: { tpl: '<div class="f-counter"><span data-fancybox-page></span>/<span data-fancybox-pages></span></div>' } }, display: { left: ["counter"], right: ["toggleFull", "autoplay", "fullscreen", "thumbs", "close"] } }, Video: { autoplay: !0 }, Thumbs: { minCount: 2, Carousel: { classes: { container: "fancybox__thumbs" } } }, classes: { container: "fancybox__carousel", viewport: "fancybox__viewport", slide: "fancybox__slide" }, spinnerTpl: '<div class="f-spinner" data-fancybox-close></div>', dragFree: !1, slidesPerPage: 1, plugins: { Sync: aa, Arrows: Zc, Lazyload: ia, Zoomable: Uc, Html: Xc, Video: Kc, Autoplay: Gc, Fullscreen: Jc, Thumbs: Yc, Toolbar: ca } }, p("Carousel") || {}, { slides: g, enabled: !0, initialPage: p("startIndex") || 0, l10n: p("l10n") });
|
|
5884
|
-
o = ro(n,
|
|
5892
|
+
o = ro(n, N), y("initCarousel", o), o.on("*", (U, w, ...$) => {
|
|
5885
5893
|
y(`Carousel.${w}`, U, ...$);
|
|
5886
5894
|
}), o.on("attachSlideEl", S), o.on("detachSlideEl", x), o.on("contentLoading", J), o.on("contentReady", _e), o.on("ready", ee), o.on("change", M), o.on("settle", ue), o.on("thumbs:ready", ae), o.on("thumbs:destroy", ae), o.init();
|
|
5887
5895
|
})(), e && t) {
|
|
5888
|
-
if (p("closeExisting")) for (const [
|
|
5896
|
+
if (p("closeExisting")) for (const [N, U] of Rt.entries()) N !== u && U.close();
|
|
5889
5897
|
p("fadeEffect") ? (setTimeout(() => {
|
|
5890
5898
|
v();
|
|
5891
5899
|
}, 500), pe(t, "is-revealing")) : v(), t.classList.add("is-ready"), c = Ge.Ready, y("ready");
|
|
@@ -5896,13 +5904,13 @@ const Ks = "with-fancybox", nu = () => {
|
|
|
5896
5904
|
}, isTopMost: function() {
|
|
5897
5905
|
return be();
|
|
5898
5906
|
}, localize: b, off: function(A, Z) {
|
|
5899
|
-
return m.has(A) && m.set(A, m.get(A).filter((le) => le !== Z)),
|
|
5907
|
+
return m.has(A) && m.set(A, m.get(A).filter((le) => le !== Z)), Be;
|
|
5900
5908
|
}, on: function(A, Z) {
|
|
5901
|
-
return m.set(A, [...m.get(A) || [], Z]),
|
|
5909
|
+
return m.set(A, [...m.get(A) || [], Z]), Be;
|
|
5902
5910
|
}, toggleIdle(A) {
|
|
5903
5911
|
(i || A === !0) && _t(), i && A !== !1 || xt();
|
|
5904
5912
|
} };
|
|
5905
|
-
return
|
|
5913
|
+
return Be;
|
|
5906
5914
|
};
|
|
5907
5915
|
function Js() {
|
|
5908
5916
|
for (const e of Object.values(qe.Plugins)) {
|
|
@@ -6120,7 +6128,7 @@ const qe = { Plugins: { Hash: Kn }, version: "6.1.14", openers: /* @__PURE__ */
|
|
|
6120
6128
|
floatingStyles: g,
|
|
6121
6129
|
middlewareData: i,
|
|
6122
6130
|
placement: f
|
|
6123
|
-
} =
|
|
6131
|
+
} = Bl(o, r, {
|
|
6124
6132
|
placement: te(() => t.placement),
|
|
6125
6133
|
middleware: d,
|
|
6126
6134
|
whileElementsMounted: Hl
|
|
@@ -6780,13 +6788,29 @@ class ku {
|
|
|
6780
6788
|
content: null,
|
|
6781
6789
|
props: {},
|
|
6782
6790
|
eventHandlers: {}
|
|
6783
|
-
});
|
|
6791
|
+
}), this._resolveShow = null;
|
|
6784
6792
|
}
|
|
6785
|
-
|
|
6786
|
-
|
|
6787
|
-
|
|
6788
|
-
|
|
6793
|
+
/**
|
|
6794
|
+
* Show a modal with a custom component.
|
|
6795
|
+
*
|
|
6796
|
+
* @param {Object} component - Vue component to render inside the modal
|
|
6797
|
+
* @param {Object} [props] - Props passed to the component
|
|
6798
|
+
* @param {Object} [eventHandlers] - Event handlers bound to the component
|
|
6799
|
+
* @returns {Promise<any>} - Resolves when the modal closes: with the value
|
|
6800
|
+
* passed to hide(result), or null on a plain hide() / backdrop / ESC dismiss
|
|
6801
|
+
*/
|
|
6802
|
+
show = (t, n = {}, o = {}) => (this._resolveShow?.(null), this.state.content = wn(t), this.state.props = n, this.state.eventHandlers = o, this.state.isVisible = !0, new Promise((r) => {
|
|
6803
|
+
this._resolveShow = r;
|
|
6804
|
+
}));
|
|
6805
|
+
/**
|
|
6806
|
+
* Close the current modal, resolving the pending show() promise.
|
|
6807
|
+
*
|
|
6808
|
+
* @param {any} [result=null] - Value the show() promise resolves with
|
|
6809
|
+
*/
|
|
6810
|
+
hide = (t = null) => {
|
|
6789
6811
|
this.state.isVisible = !1, this.state.eventHandlers = {};
|
|
6812
|
+
const n = this._resolveShow;
|
|
6813
|
+
this._resolveShow = null, n?.(t);
|
|
6790
6814
|
};
|
|
6791
6815
|
/**
|
|
6792
6816
|
* Show a confirmation dialog and return a Promise
|
|
@@ -6798,38 +6822,35 @@ class ku {
|
|
|
6798
6822
|
* @param {string} [options.confirmText='Confirm'] - Confirm button text
|
|
6799
6823
|
* @param {string} [options.cancelText='Cancel'] - Cancel button text
|
|
6800
6824
|
* @param {string} [options.confirmVariant='primary'] - Confirm button variant
|
|
6801
|
-
* @returns {Promise<boolean>} - Resolves to true if confirmed, false if
|
|
6825
|
+
* @returns {Promise<boolean>} - Resolves to true if confirmed, false if
|
|
6826
|
+
* cancelled or dismissed (backdrop / ESC)
|
|
6802
6827
|
*/
|
|
6803
|
-
confirm = (t = {}) =>
|
|
6828
|
+
confirm = async (t = {}) => {
|
|
6804
6829
|
const {
|
|
6805
|
-
title:
|
|
6806
|
-
message:
|
|
6807
|
-
type:
|
|
6808
|
-
confirmText:
|
|
6809
|
-
cancelText:
|
|
6810
|
-
confirmVariant:
|
|
6830
|
+
title: n = "Confirm",
|
|
6831
|
+
message: o = "Are you sure?",
|
|
6832
|
+
type: r = "warning",
|
|
6833
|
+
confirmText: a = "Confirm",
|
|
6834
|
+
cancelText: s = "Cancel",
|
|
6835
|
+
confirmVariant: c = "primary"
|
|
6811
6836
|
} = t;
|
|
6812
|
-
this.show(
|
|
6837
|
+
return !!await this.show(
|
|
6813
6838
|
Su,
|
|
6814
6839
|
{
|
|
6815
|
-
title:
|
|
6816
|
-
message:
|
|
6817
|
-
type:
|
|
6840
|
+
title: n,
|
|
6841
|
+
message: o,
|
|
6842
|
+
type: r,
|
|
6818
6843
|
buttons: [
|
|
6819
|
-
{ text:
|
|
6820
|
-
{ text:
|
|
6844
|
+
{ text: a, variant: c, event: "confirm" },
|
|
6845
|
+
{ text: s, variant: "secondary", event: "cancel" }
|
|
6821
6846
|
]
|
|
6822
6847
|
},
|
|
6823
6848
|
{
|
|
6824
|
-
confirm: () =>
|
|
6825
|
-
|
|
6826
|
-
},
|
|
6827
|
-
cancel: () => {
|
|
6828
|
-
this.hide(), n(!1);
|
|
6829
|
-
}
|
|
6849
|
+
confirm: () => this.hide(!0),
|
|
6850
|
+
cancel: () => this.hide(!1)
|
|
6830
6851
|
}
|
|
6831
6852
|
);
|
|
6832
|
-
}
|
|
6853
|
+
};
|
|
6833
6854
|
}
|
|
6834
6855
|
const It = new ku(), Eu = { class: "fixed inset-0 z-10 w-screen overflow-y-auto" }, Cu = { class: "flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0" }, Tu = {
|
|
6835
6856
|
__name: "SparkModalContainer",
|
|
@@ -6841,7 +6862,7 @@ const It = new ku(), Eu = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
6841
6862
|
default: Se(() => [
|
|
6842
6863
|
se(oe(Pr), {
|
|
6843
6864
|
class: "relative z-1000",
|
|
6844
|
-
onClose: oe(It).hide
|
|
6865
|
+
onClose: n[0] || (n[0] = () => oe(It).hide())
|
|
6845
6866
|
}, {
|
|
6846
6867
|
default: Se(() => [
|
|
6847
6868
|
se(oe(Jn), {
|
|
@@ -6853,7 +6874,7 @@ const It = new ku(), Eu = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
6853
6874
|
"leave-from": "opacity-100",
|
|
6854
6875
|
"leave-to": "opacity-0"
|
|
6855
6876
|
}, {
|
|
6856
|
-
default: Se(() => [...n[
|
|
6877
|
+
default: Se(() => [...n[1] || (n[1] = [
|
|
6857
6878
|
T("div", { class: "fixed inset-0 bg-gray-500/75 transition-opacity" }, null, -1)
|
|
6858
6879
|
])]),
|
|
6859
6880
|
_: 1
|
|
@@ -6883,7 +6904,7 @@ const It = new ku(), Eu = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
6883
6904
|
])
|
|
6884
6905
|
]),
|
|
6885
6906
|
_: 1
|
|
6886
|
-
}
|
|
6907
|
+
})
|
|
6887
6908
|
]),
|
|
6888
6909
|
_: 1
|
|
6889
6910
|
}, 8, ["show"]));
|
|
@@ -7315,7 +7336,7 @@ const It = new ku(), Eu = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
7315
7336
|
sm: "h-6 w-6",
|
|
7316
7337
|
md: "h-8 w-8",
|
|
7317
7338
|
lg: "h-12 w-12"
|
|
7318
|
-
},
|
|
7339
|
+
}, Bu = (e) => (t, n, o, r, a, s, c) => {
|
|
7319
7340
|
if (n.innerHTML = "", n.classList.add("spark-table-cell-image"), !s)
|
|
7320
7341
|
return;
|
|
7321
7342
|
const l = c.rendererConfig || {}, u = t.getSourceDataAtRow(t.toPhysicalRow(o)), d = l.size || "md", g = or[d] || or.md, i = l.rounded !== !1, f = l.lightbox || !1, h = l.group || "table-images";
|
|
@@ -7327,7 +7348,7 @@ const It = new ku(), Eu = { class: "fixed inset-0 z-10 w-screen overflow-y-auto"
|
|
|
7327
7348
|
m.href = s, m.setAttribute("data-fancybox", h), p && m.setAttribute("data-caption", p), b.classList.add("cursor-pointer", "hover:opacity-80", "transition-opacity"), m.appendChild(b), n.appendChild(m);
|
|
7328
7349
|
} else
|
|
7329
7350
|
n.appendChild(b);
|
|
7330
|
-
},
|
|
7351
|
+
}, Nu = (e) => (t, n, o, r, a, s, c) => {
|
|
7331
7352
|
if (n.innerHTML = "", n.classList.add("spark-table-cell-date"), !s)
|
|
7332
7353
|
return;
|
|
7333
7354
|
const l = c.rendererConfig || {}, u = l.format || "short", d = l.locale || "en-US";
|
|
@@ -7494,7 +7515,7 @@ const Wu = (e) => {
|
|
|
7494
7515
|
Ti.apply(null, [n, o, r, a, s, c, l]), t(n, o, r, a, s, c, l);
|
|
7495
7516
|
}), Qu.set(e, t);
|
|
7496
7517
|
}, ed = (e) => {
|
|
7497
|
-
At("spark.actions", Iu(e)), At("spark.badge", Fu()), At("spark.boolean", ju()), At("spark.currency", Vu()), At("spark.link", zu()), At("spark.image",
|
|
7518
|
+
At("spark.actions", Iu(e)), At("spark.badge", Fu()), At("spark.boolean", ju()), At("spark.currency", Vu()), At("spark.link", zu()), At("spark.image", Bu()), At("spark.date", Nu()), At("spark.datetime", Ju()), At("style.capitalize", (t, n, o, r, a, s) => {
|
|
7498
7519
|
if (!s || s.length === 0) {
|
|
7499
7520
|
n.innerText = "";
|
|
7500
7521
|
return;
|
|
@@ -7663,7 +7684,7 @@ const Wu = (e) => {
|
|
|
7663
7684
|
Math.floor((s.value - 1) / 10) * 10 + 1,
|
|
7664
7685
|
s.value > n.sparkTable.response.meta.last_page ? n.sparkTable.response.meta.last_page + 1 : s.value + 1
|
|
7665
7686
|
) : []), l = te(
|
|
7666
|
-
() => n.sparkTable.params.page <
|
|
7687
|
+
() => n.sparkTable.params.page < Bt(n.sparkTable.response.meta, "last_page", 1)
|
|
7667
7688
|
), u = te(() => n.sparkTable.params.page > 1);
|
|
7668
7689
|
return (d, g) => {
|
|
7669
7690
|
const i = Ze("font-awesome-icon");
|
|
@@ -8075,7 +8096,7 @@ const Wu = (e) => {
|
|
|
8075
8096
|
dataTransformer: {
|
|
8076
8097
|
type: Function,
|
|
8077
8098
|
default: (e, t) => ({
|
|
8078
|
-
data:
|
|
8099
|
+
data: Bt(t.settings, "nestedHeaders") ? e.data.data.map((o) => (t.settings.columnKeys || []).map((a) => o[a])) : e.data.data,
|
|
8079
8100
|
meta: {
|
|
8080
8101
|
last_page: e.data.last_page,
|
|
8081
8102
|
from: e.data.from,
|
|
@@ -8138,7 +8159,7 @@ const Wu = (e) => {
|
|
|
8138
8159
|
const y = {};
|
|
8139
8160
|
return m.cellPx !== void 0 && (y["--spark-table-cell-px"] = `${m.cellPx}px`), m.cellPy !== void 0 && (y["--spark-table-cell-py"] = `${m.cellPy}px`), m.headerPx !== void 0 && (y["--spark-table-header-px"] = `${m.headerPx}px`), m.headerPy !== void 0 && (y["--spark-table-header-py"] = `${m.headerPy}px`), y;
|
|
8140
8161
|
});
|
|
8141
|
-
Ei(), Vn(xi), Vn(wi), Vn(Si),
|
|
8162
|
+
Ei(), Vn(xi), Vn(wi), Vn(Si), Bt(o, "settings.nestedHeaders") && Vn(ki);
|
|
8142
8163
|
const a = n, s = io("axios"), c = Ee(null), l = Ee(!1), u = Ee(null);
|
|
8143
8164
|
let d = !1;
|
|
8144
8165
|
const g = {
|
|
@@ -8185,7 +8206,7 @@ const Wu = (e) => {
|
|
|
8185
8206
|
if (d) return;
|
|
8186
8207
|
i.hotInstance.updateData(i.response.data), i.options.callback && typeof i.options.callback == "function" && await i.options.callback();
|
|
8187
8208
|
const y = i.hotInstance.getPlugin("autoColumnSize");
|
|
8188
|
-
|
|
8209
|
+
Bt(o.settings, "columns", []).forEach((S, x) => {
|
|
8189
8210
|
S.width || y.calculateColumnsWidth(x, x, !0);
|
|
8190
8211
|
}), a("load", {
|
|
8191
8212
|
data: i.response.data,
|
|
@@ -8203,7 +8224,7 @@ const Wu = (e) => {
|
|
|
8203
8224
|
fireEvent: (m, y) => {
|
|
8204
8225
|
a(m, y);
|
|
8205
8226
|
},
|
|
8206
|
-
getSettingsForProp: (m) => yi(
|
|
8227
|
+
getSettingsForProp: (m) => yi(Bt(i.tableSettings, "columns"), { data: m }),
|
|
8207
8228
|
// Helper methods for easier param access
|
|
8208
8229
|
getParams: () => i.computed.params,
|
|
8209
8230
|
getParam: (m) => i.computed.params[m],
|
|
@@ -8229,7 +8250,7 @@ const Wu = (e) => {
|
|
|
8229
8250
|
...o.options
|
|
8230
8251
|
})),
|
|
8231
8252
|
tableSettings: te(() => {
|
|
8232
|
-
const m =
|
|
8253
|
+
const m = Bt(o.settings, "columns", []), y = m.map((x) => {
|
|
8233
8254
|
if (!x.wordWrap && !x.align) return x;
|
|
8234
8255
|
const _ = [x.className];
|
|
8235
8256
|
return x.wordWrap && _.push("spark-table-word-wrap"), x.align === "center" && _.push("spark-table-align-center"), x.align === "right" && _.push("spark-table-align-right"), { ...x, className: _.filter(Boolean).join(" ") };
|
|
@@ -8238,8 +8259,8 @@ const Wu = (e) => {
|
|
|
8238
8259
|
), S = o.settings.afterRenderer;
|
|
8239
8260
|
return {
|
|
8240
8261
|
...ar,
|
|
8241
|
-
nestedHeaders:
|
|
8242
|
-
...!
|
|
8262
|
+
nestedHeaders: Bt(o.settings, "nestedHeaders", []),
|
|
8263
|
+
...!Bt(o.settings, "nestedHeaders") && {
|
|
8243
8264
|
afterGetColHeader: (x, _) => Au(x, _, i)
|
|
8244
8265
|
},
|
|
8245
8266
|
afterChange: (x, _) => td(),
|
|
@@ -8477,7 +8498,7 @@ class Vd {
|
|
|
8477
8498
|
const Qt = new Vd(), zd = (e) => {
|
|
8478
8499
|
const t = document.cookie.match(new RegExp(`(^| )${e}=([^;]+)`));
|
|
8479
8500
|
return t ? t[2] : null;
|
|
8480
|
-
},
|
|
8501
|
+
}, Bd = (e, t, n = {}) => {
|
|
8481
8502
|
const {
|
|
8482
8503
|
maxAge: o = 31536e3,
|
|
8483
8504
|
// 365 days in seconds
|
|
@@ -8488,7 +8509,7 @@ const Qt = new Vd(), zd = (e) => {
|
|
|
8488
8509
|
} = n;
|
|
8489
8510
|
let l = `${e}=${t}; max-age=${o}; path=${c}; samesite=${s}`;
|
|
8490
8511
|
r && (l += `; domain=${r}`), a && (l += "; secure"), document.cookie = l;
|
|
8491
|
-
},
|
|
8512
|
+
}, Nd = (e, t = {}) => {
|
|
8492
8513
|
const { domain: n = pa(), path: o = "/" } = t;
|
|
8493
8514
|
let r = `${e}=; max-age=0; path=${o}`;
|
|
8494
8515
|
n && (r += `; domain=${n}`), document.cookie = r;
|
|
@@ -8553,9 +8574,9 @@ const Lo = "bolt-next-token", Ft = Fn("auth", () => {
|
|
|
8553
8574
|
}), t = (u = {}) => {
|
|
8554
8575
|
u.endpoints && Object.assign(e.endpoints, u.endpoints), u.routes && Object.assign(e.routes, u.routes), u.devCredentials && Object.assign(e.devCredentials, u.devCredentials), u.callbacks && Object.assign(e.callbacks, u.callbacks), u.overrideToken && (e.overrideToken = u.overrideToken);
|
|
8555
8576
|
}, n = (u) => {
|
|
8556
|
-
|
|
8577
|
+
Bd(Lo, u), e.token = u;
|
|
8557
8578
|
}, o = () => {
|
|
8558
|
-
|
|
8579
|
+
Nd(Lo), e.token = null;
|
|
8559
8580
|
}, r = () => zd(Lo), a = async (u) => {
|
|
8560
8581
|
const d = await vn.post(e.endpoints.login, u), g = d.headers.authorization;
|
|
8561
8582
|
return n(g), e.user = d.data, e.callbacks.onLoginSuccess && await e.callbacks.onLoginSuccess(d.data), d.data;
|
|
@@ -9359,10 +9380,10 @@ const pm = /* @__PURE__ */ ln(xf, [["render", Sf]]), kf = { class: "h-full grid
|
|
|
9359
9380
|
}, Vf = { class: "max-w-sm grid gap-y-1 -mt-8" }, zf = {
|
|
9360
9381
|
key: 0,
|
|
9361
9382
|
class: "text-red-600 text-sm mb-2"
|
|
9362
|
-
},
|
|
9383
|
+
}, Bf = {
|
|
9363
9384
|
key: 1,
|
|
9364
9385
|
class: "text-green-600 text-sm mb-2"
|
|
9365
|
-
},
|
|
9386
|
+
}, Nf = { key: 0 }, qf = { key: 1 }, Wf = {
|
|
9366
9387
|
__name: "SparkForgotPasswordView",
|
|
9367
9388
|
props: {
|
|
9368
9389
|
logo: {
|
|
@@ -9433,7 +9454,7 @@ const pm = /* @__PURE__ */ ln(xf, [["render", Sf]]), kf = { class: "h-full grid
|
|
|
9433
9454
|
"outer-class": "max-w-full"
|
|
9434
9455
|
}),
|
|
9435
9456
|
r.value ? (E(), P("div", zf, we(r.value), 1)) : ye("", !0),
|
|
9436
|
-
a.value ? (E(), P("div",
|
|
9457
|
+
a.value ? (E(), P("div", Bf, we(a.value), 1)) : ye("", !0),
|
|
9437
9458
|
se(oe(gt), {
|
|
9438
9459
|
type: "submit",
|
|
9439
9460
|
size: "xl",
|
|
@@ -9441,7 +9462,7 @@ const pm = /* @__PURE__ */ ln(xf, [["render", Sf]]), kf = { class: "h-full grid
|
|
|
9441
9462
|
"button-class": "w-full mb-2"
|
|
9442
9463
|
}, {
|
|
9443
9464
|
default: Se(() => [
|
|
9444
|
-
o.value ? (E(), P("span", qf, "Sending...")) : (E(), P("span",
|
|
9465
|
+
o.value ? (E(), P("span", qf, "Sending...")) : (E(), P("span", Nf, "Send reset link"))
|
|
9445
9466
|
]),
|
|
9446
9467
|
_: 1
|
|
9447
9468
|
}, 8, ["disabled"]),
|
|
@@ -10018,7 +10039,7 @@ const Sm = Fn("sparkNav", () => {
|
|
|
10018
10039
|
export {
|
|
10019
10040
|
dm as AUSTRALIAN_STATES,
|
|
10020
10041
|
Fe as Icons,
|
|
10021
|
-
|
|
10042
|
+
Np as SparkAddressInput,
|
|
10022
10043
|
pn as SparkAlert,
|
|
10023
10044
|
hc as SparkAppSelector,
|
|
10024
10045
|
Hc as SparkBrandSelector,
|
|
@@ -10064,7 +10085,7 @@ export {
|
|
|
10064
10085
|
sm as createBootstrapService,
|
|
10065
10086
|
wm as createPasswordTogglePlugin,
|
|
10066
10087
|
Au as customiseHeader,
|
|
10067
|
-
|
|
10088
|
+
Nd as deleteCookie,
|
|
10068
10089
|
Wp as formKitGenesisOverride,
|
|
10069
10090
|
Up as formKitIconLoader,
|
|
10070
10091
|
qp as formKitIcons,
|
|
@@ -10079,7 +10100,7 @@ export {
|
|
|
10079
10100
|
Ku as parseDatetime,
|
|
10080
10101
|
Zd as parseLaravelErrors,
|
|
10081
10102
|
Lu as renderHeaderTitle,
|
|
10082
|
-
|
|
10103
|
+
Bd as setCookie,
|
|
10083
10104
|
hm as setupAuthGuards,
|
|
10084
10105
|
rm as setupAxios,
|
|
10085
10106
|
bm as setupBootstrapGuard,
|