@cntrl-site/components 1.0.7-1 → 1.0.7-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Components/utils/getMainFontBaseOnSystem.d.ts +1 -0
- package/dist/index.js +200 -188
- package/dist/index.mjs +381 -359
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import ue, { useState as it, useEffect as St, useRef as _t, useCallback as Br, u
|
|
|
3
3
|
import yt from "classnames";
|
|
4
4
|
import { s as W, u as Hn, b as Vn, g as sn } from "./useScopedStyles-BSwFAT27.mjs";
|
|
5
5
|
import { createPortal as Wr } from "react-dom";
|
|
6
|
-
function
|
|
6
|
+
function gs(t) {
|
|
7
7
|
return t.type === "object" && t.version === 1;
|
|
8
8
|
}
|
|
9
9
|
const Ao = "ControlSlider-module__wrapper___sHEkd", Eo = "ControlSlider-module__hoverArrow___A-dOH", Io = "ControlSlider-module__sliderItem___QQSkR", Fo = "ControlSlider-module__sliderImage___9hRl-", ko = "ControlSlider-module__arrow___05ghY", Ro = "ControlSlider-module__arrowVertical___tBfVN", Oo = "ControlSlider-module__nextArrow___-30Yc", Bo = "ControlSlider-module__arrowInner___aEra3", Po = "ControlSlider-module__arrowIcon___S4ztF", Wo = "ControlSlider-module__arrowImg___2dwJW", zo = "ControlSlider-module__mirror___brd6U", No = "ControlSlider-module__pagination___bicLF", Mo = "ControlSlider-module__paginationInner___bT-P-", Ho = "ControlSlider-module__paginationVertical___zYqKw", Vo = "ControlSlider-module__paginationItem___nTRbk", Do = "ControlSlider-module__dot___p1Qun", jo = "ControlSlider-module__activeDot___LHFaj", Go = "ControlSlider-module__paginationInsideBottom___R3FWn", Uo = "ControlSlider-module__paginationInsideTop___V-qb-", Xo = "ControlSlider-module__paginationOutsideBottom___14w8D", Yo = "ControlSlider-module__paginationOutsideTop___SCLqB", qo = "ControlSlider-module__paginationInsideLeft___yOBRZ", Ko = "ControlSlider-module__paginationInsideRight___Rtt3o", Jo = "ControlSlider-module__paginationOutsideLeft___lahaw", Zo = "ControlSlider-module__paginationOutsideRight___EtuQa", Qo = "ControlSlider-module__imgWrapper___UjEgB", ti = "ControlSlider-module__captionBlock___dJ6-j", ei = "ControlSlider-module__captionTextWrapper___HFlpf", ni = "ControlSlider-module__captionText___uGBVc", ri = "ControlSlider-module__active___WZK4G", oi = "ControlSlider-module__withPointerEvents___t-18M", ii = "ControlSlider-module__topLeftAlignment___zjnGM", li = "ControlSlider-module__topCenterAlignment___gD1xW", ai = "ControlSlider-module__topRightAlignment___NMapS", si = "ControlSlider-module__middleLeftAlignment___OnUrY", ci = "ControlSlider-module__middleCenterAlignment___Tdkl0", ui = "ControlSlider-module__middleRightAlignment___wEbfX", pi = "ControlSlider-module__bottomLeftAlignment___cTP2-", di = "ControlSlider-module__bottomCenterAlignment___c54fB", gi = "ControlSlider-module__bottomRightAlignment___kEwrz", mi = "ControlSlider-module__clickOverlay___DZA28", fi = "ControlSlider-module__contain___pLyq7", hi = "ControlSlider-module__cover___KdDat", G = {
|
|
@@ -267,15 +267,15 @@ function xi(t) {
|
|
|
267
267
|
function Ur() {
|
|
268
268
|
var t = [];
|
|
269
269
|
function e(i, c, s, p) {
|
|
270
|
-
o(i, c, function(a,
|
|
271
|
-
var d = "addEventListener" in a, u = d ? a.removeEventListener.bind(a,
|
|
272
|
-
d ? a.addEventListener(
|
|
270
|
+
o(i, c, function(a, C, y) {
|
|
271
|
+
var d = "addEventListener" in a, u = d ? a.removeEventListener.bind(a, C, s, p) : a.removeListener.bind(a, s);
|
|
272
|
+
d ? a.addEventListener(C, s, p) : a.addListener(s), t.push([a, C, y, s, u]);
|
|
273
273
|
});
|
|
274
274
|
}
|
|
275
275
|
function n(i, c, s) {
|
|
276
|
-
o(i, c, function(p, a,
|
|
276
|
+
o(i, c, function(p, a, C) {
|
|
277
277
|
t = t.filter(function(y) {
|
|
278
|
-
return y[0] === p && y[1] === a && y[2] ===
|
|
278
|
+
return y[0] === p && y[1] === a && y[2] === C && (!s || y[3] === s) ? (y[4](), !1) : !0;
|
|
279
279
|
});
|
|
280
280
|
});
|
|
281
281
|
}
|
|
@@ -289,8 +289,8 @@ function Ur() {
|
|
|
289
289
|
function o(i, c, s) {
|
|
290
290
|
Rt(i, function(p) {
|
|
291
291
|
p && Rt(c, function(a) {
|
|
292
|
-
a.split(" ").forEach(function(
|
|
293
|
-
var y =
|
|
292
|
+
a.split(" ").forEach(function(C) {
|
|
293
|
+
var y = C.split(".");
|
|
294
294
|
s(p, y[0], y[1]);
|
|
295
295
|
});
|
|
296
296
|
});
|
|
@@ -335,7 +335,7 @@ function yn(t, e, n, r) {
|
|
|
335
335
|
c = mr(a);
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function C(h) {
|
|
339
339
|
h || u(), l = o() - (h ? i * t : 0), s = !1, c = mr(a);
|
|
340
340
|
}
|
|
341
341
|
function y() {
|
|
@@ -354,7 +354,7 @@ function yn(t, e, n, r) {
|
|
|
354
354
|
return s;
|
|
355
355
|
}
|
|
356
356
|
return {
|
|
357
|
-
start:
|
|
357
|
+
start: C,
|
|
358
358
|
rewind: d,
|
|
359
359
|
pause: y,
|
|
360
360
|
cancel: u,
|
|
@@ -389,16 +389,16 @@ function _i(t, e, n) {
|
|
|
389
389
|
return u ? +g - +v : +v - +g;
|
|
390
390
|
}).forEach(function(g) {
|
|
391
391
|
a(o[g], "(" + (u ? "min" : "max") + "-width:" + g + "px)");
|
|
392
|
-
}), a(l, gr),
|
|
392
|
+
}), a(l, gr), C();
|
|
393
393
|
}
|
|
394
394
|
function p(u) {
|
|
395
395
|
u && i.destroy();
|
|
396
396
|
}
|
|
397
397
|
function a(u, g) {
|
|
398
398
|
var v = matchMedia(g);
|
|
399
|
-
i.bind(v, "change",
|
|
399
|
+
i.bind(v, "change", C), c.push([u, v]);
|
|
400
400
|
}
|
|
401
|
-
function
|
|
401
|
+
function C() {
|
|
402
402
|
var u = r.is(cn), g = n.direction, v = c.reduce(function(h, b) {
|
|
403
403
|
return te(h, b[1].matches ? b[0] : {});
|
|
404
404
|
}, {});
|
|
@@ -432,8 +432,8 @@ function Ti(t, e, n) {
|
|
|
432
432
|
c = c || n.direction;
|
|
433
433
|
var s = c === br && !i ? 1 : c === xn ? 0 : -1;
|
|
434
434
|
return Tn[l] && Tn[l][s] || l.replace(/width|left|right/i, function(p, a) {
|
|
435
|
-
var
|
|
436
|
-
return a > 0 ?
|
|
435
|
+
var C = Tn[p.toLowerCase()][s] || p;
|
|
436
|
+
return a > 0 ? C.charAt(0).toUpperCase() + C.slice(1) : C;
|
|
437
437
|
});
|
|
438
438
|
}
|
|
439
439
|
function o(l) {
|
|
@@ -464,9 +464,9 @@ function zi(t, e) {
|
|
|
464
464
|
}
|
|
465
465
|
var Ni = 5, wr = 200, So = "touchstart mousedown", An = "touchmove mousemove", En = "touchend touchcancel mouseup click";
|
|
466
466
|
function Mi(t, e, n) {
|
|
467
|
-
var r = bt(t), o = r.on, l = r.bind, i = t.root, c = n.i18n, s = {}, p = [], a = [],
|
|
467
|
+
var r = bt(t), o = r.on, l = r.bind, i = t.root, c = n.i18n, s = {}, p = [], a = [], C = [], y, d, u;
|
|
468
468
|
function g() {
|
|
469
|
-
|
|
469
|
+
$(), H(), b();
|
|
470
470
|
}
|
|
471
471
|
function v() {
|
|
472
472
|
o(xt, h), o(xt, g), o(Tt, b), l(document, So + " keydown", function(m) {
|
|
@@ -479,12 +479,12 @@ function Mi(t, e, n) {
|
|
|
479
479
|
}
|
|
480
480
|
function h(m) {
|
|
481
481
|
var T = or.concat("style");
|
|
482
|
-
Kt(p), Xt(i, a), Xt(y,
|
|
482
|
+
Kt(p), Xt(i, a), Xt(y, C), Ht([y, d], T), Ht(i, m ? T : ["style", Me]);
|
|
483
483
|
}
|
|
484
484
|
function b() {
|
|
485
|
-
Xt(i, a), Xt(y,
|
|
485
|
+
Xt(i, a), Xt(y, C), a = w(Ln), C = w($r), Mt(i, a), Mt(y, C), Q(i, kt, n.label), Q(i, nr, n.labelledby);
|
|
486
486
|
}
|
|
487
|
-
function
|
|
487
|
+
function $() {
|
|
488
488
|
y = B("." + $r), d = Ge(y, "." + Ai), ke(y && d, "A track/list element is missing."), on(p, Hr(d, "." + Cn + ":not(." + po + ")")), pe({
|
|
489
489
|
arrows: ir,
|
|
490
490
|
pagination: wn,
|
|
@@ -509,7 +509,7 @@ function Mi(t, e, n) {
|
|
|
509
509
|
var T = jr(i, m);
|
|
510
510
|
return T && zi(T, "." + Ln) === i ? T : void 0;
|
|
511
511
|
}
|
|
512
|
-
function
|
|
512
|
+
function w(m) {
|
|
513
513
|
return [m + "--" + n.type, m + "--" + n.direction, n.drag && m + "--draggable", n.isNavigation && m + "--nav", m === Ln && me];
|
|
514
514
|
}
|
|
515
515
|
return We(s, {
|
|
@@ -520,9 +520,9 @@ function Mi(t, e, n) {
|
|
|
520
520
|
}
|
|
521
521
|
var Te = "slide", Ee = "loop", Ye = "fade";
|
|
522
522
|
function Hi(t, e, n, r) {
|
|
523
|
-
var o = bt(t), l = o.on, i = o.emit, c = o.bind, s = t.Components, p = t.root, a = t.options,
|
|
524
|
-
function
|
|
525
|
-
|
|
523
|
+
var o = bt(t), l = o.on, i = o.emit, c = o.bind, s = t.Components, p = t.root, a = t.options, C = a.isNavigation, y = a.updateOnMove, d = a.i18n, u = a.pagination, g = a.slideFocus, v = s.Direction.resolve, h = Pt(r, "style"), b = Pt(r, kt), $ = n > -1, H = Ge(r, "." + Ei), B;
|
|
524
|
+
function w() {
|
|
525
|
+
$ || (r.id = p.id + "-slide" + qn(e + 1), Q(r, qt, u ? "tabpanel" : "group"), Q(r, Me, d.slide), Q(r, kt, b || Bn(d.slideLabel, [e + 1, t.length]))), m();
|
|
526
526
|
}
|
|
527
527
|
function m() {
|
|
528
528
|
c(r, "click", mt(i, Kn, I)), c(r, "keydown", mt(i, io, I)), l([Ae, lo, fe], L), l(Zn, A), y && l(Jt, z);
|
|
@@ -535,7 +535,7 @@ function Hi(t, e, n, r) {
|
|
|
535
535
|
var O = _.splide.Components.Slides.getAt(e);
|
|
536
536
|
return O ? O.slide.id : "";
|
|
537
537
|
}).join(" ");
|
|
538
|
-
Q(r, kt, Bn(d.slideX, (
|
|
538
|
+
Q(r, kt, Bn(d.slideX, ($ ? n : e) + 1)), Q(r, Xe, E), Q(r, qt, g ? "button" : ""), g && Ht(r, Me);
|
|
539
539
|
}
|
|
540
540
|
function z() {
|
|
541
541
|
B || L();
|
|
@@ -548,10 +548,10 @@ function Hi(t, e, n, r) {
|
|
|
548
548
|
}
|
|
549
549
|
function F() {
|
|
550
550
|
var E = D();
|
|
551
|
-
E !== hr(r, me) && (Ut(r, me, E), Q(r, co,
|
|
551
|
+
E !== hr(r, me) && (Ut(r, me, E), Q(r, co, C && E || ""), i(E ? Xr : Yr, I));
|
|
552
552
|
}
|
|
553
553
|
function P() {
|
|
554
|
-
var E = f(), _ = !E && (!D() ||
|
|
554
|
+
var E = f(), _ = !E && (!D() || $);
|
|
555
555
|
if (t.state.is([Le, He]) || Q(r, uo, _ || ""), Q(Xn(r, a.focusableNodes || ""), Ce, _ ? -1 : ""), g && Q(r, Ce, _ ? -1 : 0), E !== hr(r, Wn) && (Ut(r, Wn, E), i(E ? qr : Kr, I)), !E && document.activeElement === r) {
|
|
556
556
|
var O = s.Slides.getAt(t.index);
|
|
557
557
|
O && Vr(O.slide);
|
|
@@ -572,15 +572,15 @@ function Hi(t, e, n, r) {
|
|
|
572
572
|
}
|
|
573
573
|
function R(E, _) {
|
|
574
574
|
var O = Et(E - e);
|
|
575
|
-
return
|
|
575
|
+
return !$ && (a.rewind || t.is(Ee)) && (O = re(O, t.length - O)), O <= _;
|
|
576
576
|
}
|
|
577
577
|
var I = {
|
|
578
578
|
index: e,
|
|
579
579
|
slideIndex: n,
|
|
580
580
|
slide: r,
|
|
581
581
|
container: H,
|
|
582
|
-
isClone:
|
|
583
|
-
mount:
|
|
582
|
+
isClone: $,
|
|
583
|
+
mount: w,
|
|
584
584
|
destroy: T,
|
|
585
585
|
update: L,
|
|
586
586
|
style: V,
|
|
@@ -590,7 +590,7 @@ function Hi(t, e, n, r) {
|
|
|
590
590
|
}
|
|
591
591
|
function Vi(t, e, n) {
|
|
592
592
|
var r = bt(t), o = r.on, l = r.emit, i = r.bind, c = e.Elements, s = c.slides, p = c.list, a = [];
|
|
593
|
-
function
|
|
593
|
+
function C() {
|
|
594
594
|
y(), o(xt, d), o(xt, y);
|
|
595
595
|
}
|
|
596
596
|
function y() {
|
|
@@ -615,20 +615,20 @@ function Vi(t, e, n) {
|
|
|
615
615
|
});
|
|
616
616
|
}
|
|
617
617
|
function v(L) {
|
|
618
|
-
return L ?
|
|
618
|
+
return L ? w(function(F) {
|
|
619
619
|
return !F.isClone;
|
|
620
620
|
}) : a;
|
|
621
621
|
}
|
|
622
622
|
function h(L) {
|
|
623
623
|
var F = e.Controller, P = F.toIndex(L), V = F.hasFocus() ? 1 : n.perPage;
|
|
624
|
-
return
|
|
624
|
+
return w(function(D) {
|
|
625
625
|
return ln(D.index, P, P + V - 1);
|
|
626
626
|
});
|
|
627
627
|
}
|
|
628
628
|
function b(L) {
|
|
629
|
-
return
|
|
629
|
+
return w(L)[0];
|
|
630
630
|
}
|
|
631
|
-
function
|
|
631
|
+
function $(L, F) {
|
|
632
632
|
Rt(L, function(P) {
|
|
633
633
|
if (ne(P) && (P = Dr(P)), Mr(P)) {
|
|
634
634
|
var V = s[F];
|
|
@@ -637,14 +637,14 @@ function Vi(t, e, n) {
|
|
|
637
637
|
}), l(xt);
|
|
638
638
|
}
|
|
639
639
|
function H(L) {
|
|
640
|
-
ge(
|
|
640
|
+
ge(w(L).map(function(F) {
|
|
641
641
|
return F.slide;
|
|
642
642
|
})), l(xt);
|
|
643
643
|
}
|
|
644
644
|
function B(L, F) {
|
|
645
645
|
v(F).forEach(L);
|
|
646
646
|
}
|
|
647
|
-
function
|
|
647
|
+
function w(L) {
|
|
648
648
|
return a.filter(Nr(L) ? L : function(F) {
|
|
649
649
|
return ne(L) ? Be(F.slide, L) : Gn(De(L), F.index);
|
|
650
650
|
});
|
|
@@ -669,39 +669,39 @@ function Vi(t, e, n) {
|
|
|
669
669
|
return a.length > n.perPage;
|
|
670
670
|
}
|
|
671
671
|
return {
|
|
672
|
-
mount:
|
|
672
|
+
mount: C,
|
|
673
673
|
destroy: d,
|
|
674
674
|
update: u,
|
|
675
675
|
register: g,
|
|
676
676
|
get: v,
|
|
677
677
|
getIn: h,
|
|
678
678
|
getAt: b,
|
|
679
|
-
add:
|
|
679
|
+
add: $,
|
|
680
680
|
remove: H,
|
|
681
681
|
forEach: B,
|
|
682
|
-
filter:
|
|
682
|
+
filter: w,
|
|
683
683
|
style: m,
|
|
684
684
|
getLength: A,
|
|
685
685
|
isEnough: z
|
|
686
686
|
};
|
|
687
687
|
}
|
|
688
688
|
function Di(t, e, n) {
|
|
689
|
-
var r = bt(t), o = r.on, l = r.bind, i = r.emit, c = e.Slides, s = e.Direction.resolve, p = e.Elements, a = p.root,
|
|
689
|
+
var r = bt(t), o = r.on, l = r.bind, i = r.emit, c = e.Slides, s = e.Direction.resolve, p = e.Elements, a = p.root, C = p.track, y = p.list, d = c.getAt, u = c.style, g, v, h;
|
|
690
690
|
function b() {
|
|
691
|
-
|
|
691
|
+
$(), l(window, "resize load", wi(mt(i, _e))), o([Tt, xt], $), o(_e, H);
|
|
692
692
|
}
|
|
693
|
-
function
|
|
694
|
-
g = n.direction === xn, Bt(a, "maxWidth", se(n.width)), Bt(
|
|
693
|
+
function $() {
|
|
694
|
+
g = n.direction === xn, Bt(a, "maxWidth", se(n.width)), Bt(C, s("paddingLeft"), B(!1)), Bt(C, s("paddingRight"), B(!0)), H(!0);
|
|
695
695
|
}
|
|
696
696
|
function H(I) {
|
|
697
697
|
var E = Ft(a);
|
|
698
|
-
(I || v.width !== E.width || v.height !== E.height) && (Bt(
|
|
698
|
+
(I || v.width !== E.width || v.height !== E.height) && (Bt(C, "height", w()), u(s("marginRight"), se(n.gap)), u("width", T()), u("height", A(), !0), v = E, i(fn), h !== (h = R()) && (Ut(a, vo, h), i(Ci, h)));
|
|
699
699
|
}
|
|
700
700
|
function B(I) {
|
|
701
701
|
var E = n.padding, _ = s(I ? "right" : "left");
|
|
702
702
|
return E && se(E[_] || (Oe(E) ? 0 : E)) || "0px";
|
|
703
703
|
}
|
|
704
|
-
function
|
|
704
|
+
function w() {
|
|
705
705
|
var I = "";
|
|
706
706
|
return g && (I = m(), ke(I, "height or heightRatio is missing."), I = "calc(" + I + " - " + B(!1) + " - " + B(!0) + ")"), I;
|
|
707
707
|
}
|
|
@@ -741,7 +741,7 @@ function Di(t, e, n) {
|
|
|
741
741
|
return I && parseFloat(Bt(I.slide, s("marginRight"))) || 0;
|
|
742
742
|
}
|
|
743
743
|
function f(I) {
|
|
744
|
-
return parseFloat(Bt(
|
|
744
|
+
return parseFloat(Bt(C, s("padding" + (I ? "Right" : "Left")))) || 0;
|
|
745
745
|
}
|
|
746
746
|
function R() {
|
|
747
747
|
return t.is(Ye) || V(!0) > L();
|
|
@@ -761,9 +761,9 @@ var ji = 2;
|
|
|
761
761
|
function Gi(t, e, n) {
|
|
762
762
|
var r = bt(t), o = r.on, l = e.Elements, i = e.Slides, c = e.Direction.resolve, s = [], p;
|
|
763
763
|
function a() {
|
|
764
|
-
o(xt,
|
|
764
|
+
o(xt, C), o([Tt, _e], d), (p = v()) && (u(p), e.Layout.resize(!0));
|
|
765
765
|
}
|
|
766
|
-
function
|
|
766
|
+
function C() {
|
|
767
767
|
y(), a();
|
|
768
768
|
}
|
|
769
769
|
function y() {
|
|
@@ -774,27 +774,27 @@ function Gi(t, e, n) {
|
|
|
774
774
|
p !== h && (p < h || !h) && r.emit(xt);
|
|
775
775
|
}
|
|
776
776
|
function u(h) {
|
|
777
|
-
var b = i.get().slice(),
|
|
778
|
-
if (
|
|
777
|
+
var b = i.get().slice(), $ = b.length;
|
|
778
|
+
if ($) {
|
|
779
779
|
for (; b.length < h; )
|
|
780
780
|
on(b, b);
|
|
781
781
|
on(b.slice(-h), b.slice(0, h)).forEach(function(H, B) {
|
|
782
|
-
var
|
|
783
|
-
|
|
782
|
+
var w = B < h, m = g(H.slide, B);
|
|
783
|
+
w ? Un(m, b[0].slide) : je(l.list, m), on(s, m), i.register(m, B - h + (w ? 0 : $), H.index);
|
|
784
784
|
});
|
|
785
785
|
}
|
|
786
786
|
}
|
|
787
787
|
function g(h, b) {
|
|
788
|
-
var
|
|
789
|
-
return Mt(
|
|
788
|
+
var $ = h.cloneNode(!0);
|
|
789
|
+
return Mt($, n.classes.clone), $.id = t.root.id + "-clone" + qn(b + 1), $;
|
|
790
790
|
}
|
|
791
791
|
function v() {
|
|
792
792
|
var h = n.clones;
|
|
793
793
|
if (!t.is(Ee))
|
|
794
794
|
h = 0;
|
|
795
795
|
else if (Ve(h)) {
|
|
796
|
-
var b = n[c("fixedWidth")] && e.Layout.slideSize(0),
|
|
797
|
-
h =
|
|
796
|
+
var b = n[c("fixedWidth")] && e.Layout.slideSize(0), $ = b && Ne(Ft(l.track)[c("width")] / b);
|
|
797
|
+
h = $ || n[c("autoWidth")] && t.length || n.perPage * ji;
|
|
798
798
|
}
|
|
799
799
|
return h;
|
|
800
800
|
}
|
|
@@ -804,15 +804,15 @@ function Gi(t, e, n) {
|
|
|
804
804
|
};
|
|
805
805
|
}
|
|
806
806
|
function Ui(t, e, n) {
|
|
807
|
-
var r = bt(t), o = r.on, l = r.emit, i = t.state.set, c = e.Layout, s = c.slideSize, p = c.getPadding, a = c.totalSize,
|
|
807
|
+
var r = bt(t), o = r.on, l = r.emit, i = t.state.set, c = e.Layout, s = c.slideSize, p = c.getPadding, a = c.totalSize, C = c.listSize, y = c.sliderSize, d = e.Direction, u = d.resolve, g = d.orient, v = e.Elements, h = v.list, b = v.track, $;
|
|
808
808
|
function H() {
|
|
809
|
-
|
|
809
|
+
$ = e.Transition, o([ie, fn, Tt, xt], B);
|
|
810
810
|
}
|
|
811
811
|
function B() {
|
|
812
812
|
e.Controller.isBusy() || (e.Scroll.cancel(), m(t.index), e.Slides.update());
|
|
813
813
|
}
|
|
814
|
-
function
|
|
815
|
-
_ !== O && I(_ > U) && (L(), T(z(V(), _ > U), !0)), i(Le), l(Jt, O, U, _),
|
|
814
|
+
function w(_, O, U, ot) {
|
|
815
|
+
_ !== O && I(_ > U) && (L(), T(z(V(), _ > U), !0)), i(Le), l(Jt, O, U, _), $.start(O, function() {
|
|
816
816
|
i(we), l(Ae, O, U, _), ot && ot();
|
|
817
817
|
});
|
|
818
818
|
}
|
|
@@ -837,11 +837,11 @@ function Ui(t, e, n) {
|
|
|
837
837
|
return _ -= g(ot * (Ne(Et(U) / ot) || 1)) * (O ? 1 : -1), _;
|
|
838
838
|
}
|
|
839
839
|
function L() {
|
|
840
|
-
T(V(), !0),
|
|
840
|
+
T(V(), !0), $.cancel();
|
|
841
841
|
}
|
|
842
842
|
function F(_) {
|
|
843
|
-
for (var O = e.Slides.get(), U = 0, ot = 1 / 0,
|
|
844
|
-
var st = O[
|
|
843
|
+
for (var O = e.Slides.get(), U = 0, ot = 1 / 0, et = 0; et < O.length; et++) {
|
|
844
|
+
var st = O[et].index, k = Et(P(st, !0) - _);
|
|
845
845
|
if (k <= ot)
|
|
846
846
|
ot = k, U = st;
|
|
847
847
|
else
|
|
@@ -858,11 +858,11 @@ function Ui(t, e, n) {
|
|
|
858
858
|
return Ft(h)[_] - Ft(b)[_] + g(p(!1));
|
|
859
859
|
}
|
|
860
860
|
function D(_) {
|
|
861
|
-
return n.trimSpace && t.is(Te) && (_ = be(_, 0, g(y(!0) -
|
|
861
|
+
return n.trimSpace && t.is(Te) && (_ = be(_, 0, g(y(!0) - C()))), _;
|
|
862
862
|
}
|
|
863
863
|
function f(_) {
|
|
864
864
|
var O = n.focus;
|
|
865
|
-
return O === "center" ? (
|
|
865
|
+
return O === "center" ? (C() - s(_, !0)) / 2 : +O * s(_) || 0;
|
|
866
866
|
}
|
|
867
867
|
function R(_) {
|
|
868
868
|
return P(_ ? e.Controller.getEnd() : 0, !!n.trimSpace);
|
|
@@ -878,7 +878,7 @@ function Ui(t, e, n) {
|
|
|
878
878
|
}
|
|
879
879
|
return {
|
|
880
880
|
mount: H,
|
|
881
|
-
move:
|
|
881
|
+
move: w,
|
|
882
882
|
jump: m,
|
|
883
883
|
translate: T,
|
|
884
884
|
shift: z,
|
|
@@ -892,17 +892,17 @@ function Ui(t, e, n) {
|
|
|
892
892
|
};
|
|
893
893
|
}
|
|
894
894
|
function Xi(t, e, n) {
|
|
895
|
-
var r = bt(t), o = r.on, l = r.emit, i = e.Move, c = i.getPosition, s = i.getLimit, p = i.toPosition, a = e.Slides,
|
|
895
|
+
var r = bt(t), o = r.on, l = r.emit, i = e.Move, c = i.getPosition, s = i.getLimit, p = i.toPosition, a = e.Slides, C = a.isEnough, y = a.getLength, d = n.omitEnd, u = t.is(Ee), g = t.is(Te), v = mt(V, !1), h = mt(V, !0), b = n.start || 0, $, H = b, B, w, m;
|
|
896
896
|
function T() {
|
|
897
897
|
A(), o([Tt, xt, dn], A), o(fn, z);
|
|
898
898
|
}
|
|
899
899
|
function A() {
|
|
900
|
-
B = y(!0),
|
|
901
|
-
var k = be(b, 0, d ?
|
|
900
|
+
B = y(!0), w = n.perMove, m = n.perPage, $ = I();
|
|
901
|
+
var k = be(b, 0, d ? $ : B - 1);
|
|
902
902
|
k !== b && (b = k, i.reposition());
|
|
903
903
|
}
|
|
904
904
|
function z() {
|
|
905
|
-
|
|
905
|
+
$ !== I() && l(dn);
|
|
906
906
|
}
|
|
907
907
|
function L(k, q, ft) {
|
|
908
908
|
if (!st()) {
|
|
@@ -913,7 +913,7 @@ function Xi(t, e, n) {
|
|
|
913
913
|
function F(k, q, ft, ct) {
|
|
914
914
|
e.Scroll.scroll(k, q, ft, function() {
|
|
915
915
|
var dt = R(i.toIndex(c()));
|
|
916
|
-
U(d ? re(dt,
|
|
916
|
+
U(d ? re(dt, $) : dt), ct && ct();
|
|
917
917
|
});
|
|
918
918
|
}
|
|
919
919
|
function P(k) {
|
|
@@ -922,17 +922,17 @@ function Xi(t, e, n) {
|
|
|
922
922
|
var ft = k.match(/([+\-<>])(\d+)?/) || [], ct = ft[1], dt = ft[2];
|
|
923
923
|
ct === "+" || ct === "-" ? q = D(b + +("" + ct + (+dt || 1)), b) : ct === ">" ? q = dt ? E(+dt) : v(!0) : ct === "<" && (q = h(!0));
|
|
924
924
|
} else
|
|
925
|
-
q = u ? k : be(k, 0,
|
|
925
|
+
q = u ? k : be(k, 0, $);
|
|
926
926
|
return q;
|
|
927
927
|
}
|
|
928
928
|
function V(k, q) {
|
|
929
|
-
var ft =
|
|
930
|
-
return ct === -1 && g && !Gr(c(), s(!k), 1) ? k ? 0 :
|
|
929
|
+
var ft = w || (et() ? 1 : m), ct = D(b + ft * (k ? -1 : 1), b, !(w || et()));
|
|
930
|
+
return ct === -1 && g && !Gr(c(), s(!k), 1) ? k ? 0 : $ : q ? ct : R(ct);
|
|
931
931
|
}
|
|
932
932
|
function D(k, q, ft) {
|
|
933
|
-
if (
|
|
933
|
+
if (C() || et()) {
|
|
934
934
|
var ct = f(k);
|
|
935
|
-
ct !== k && (q = k, k = ct, ft = !1), k < 0 || k >
|
|
935
|
+
ct !== k && (q = k, k = ct, ft = !1), k < 0 || k > $ ? !w && (ln(0, k, q, !0) || ln($, q, k, !0)) ? k = E(_(k)) : u ? k = ft ? k < 0 ? -(B % m || m) : B : k : n.rewind ? k = k < 0 ? $ : 0 : k = -1 : ft && k !== q && (k = E(_(q) + (k < q ? -1 : 1)));
|
|
936
936
|
} else
|
|
937
937
|
k = -1;
|
|
938
938
|
return k;
|
|
@@ -947,7 +947,7 @@ function Xi(t, e, n) {
|
|
|
947
947
|
return u ? (k + B) % B || 0 : k;
|
|
948
948
|
}
|
|
949
949
|
function I() {
|
|
950
|
-
for (var k = B - (
|
|
950
|
+
for (var k = B - (et() || u && w ? 1 : m); d && k-- > 0; )
|
|
951
951
|
if (p(B - 1, !0) !== p(k, !0)) {
|
|
952
952
|
k++;
|
|
953
953
|
break;
|
|
@@ -955,14 +955,14 @@ function Xi(t, e, n) {
|
|
|
955
955
|
return be(k, 0, B - 1);
|
|
956
956
|
}
|
|
957
957
|
function E(k) {
|
|
958
|
-
return be(
|
|
958
|
+
return be(et() ? k : m * k, 0, $);
|
|
959
959
|
}
|
|
960
960
|
function _(k) {
|
|
961
|
-
return
|
|
961
|
+
return et() ? re(k, $) : pn((k >= $ ? B - 1 : k) / m);
|
|
962
962
|
}
|
|
963
963
|
function O(k) {
|
|
964
964
|
var q = i.toIndex(k);
|
|
965
|
-
return g ? be(q, 0,
|
|
965
|
+
return g ? be(q, 0, $) : q;
|
|
966
966
|
}
|
|
967
967
|
function U(k) {
|
|
968
968
|
k !== b && (H = b, b = k);
|
|
@@ -970,7 +970,7 @@ function Xi(t, e, n) {
|
|
|
970
970
|
function ot(k) {
|
|
971
971
|
return k ? H : b;
|
|
972
972
|
}
|
|
973
|
-
function
|
|
973
|
+
function et() {
|
|
974
974
|
return !Ve(n.focus) || n.isNavigation;
|
|
975
975
|
}
|
|
976
976
|
function st() {
|
|
@@ -989,18 +989,18 @@ function Xi(t, e, n) {
|
|
|
989
989
|
toIndex: E,
|
|
990
990
|
toPage: _,
|
|
991
991
|
toDest: O,
|
|
992
|
-
hasFocus:
|
|
992
|
+
hasFocus: et,
|
|
993
993
|
isBusy: st
|
|
994
994
|
};
|
|
995
995
|
}
|
|
996
996
|
var Yi = "http://www.w3.org/2000/svg", qi = "m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z", Ze = 40;
|
|
997
997
|
function Ki(t, e, n) {
|
|
998
|
-
var r = bt(t), o = r.on, l = r.bind, i = r.emit, c = n.classes, s = n.i18n, p = e.Elements, a = e.Controller,
|
|
999
|
-
function
|
|
998
|
+
var r = bt(t), o = r.on, l = r.bind, i = r.emit, c = n.classes, s = n.i18n, p = e.Elements, a = e.Controller, C = p.arrows, y = p.track, d = C, u = p.prev, g = p.next, v, h, b = {};
|
|
999
|
+
function $() {
|
|
1000
1000
|
B(), o(Tt, H);
|
|
1001
1001
|
}
|
|
1002
1002
|
function H() {
|
|
1003
|
-
|
|
1003
|
+
w(), $();
|
|
1004
1004
|
}
|
|
1005
1005
|
function B() {
|
|
1006
1006
|
var F = n.arrows;
|
|
@@ -1009,8 +1009,8 @@ function Ki(t, e, n) {
|
|
|
1009
1009
|
next: g
|
|
1010
1010
|
}), ze(d, F ? "" : "none"), Mt(d, h = ir + "--" + n.direction), F && (m(), L(), Q([u, g], Xe, y.id), i(to, u, g)));
|
|
1011
1011
|
}
|
|
1012
|
-
function
|
|
1013
|
-
r.destroy(), Xt(d, h), v ? (ge(
|
|
1012
|
+
function w() {
|
|
1013
|
+
r.destroy(), Xt(d, h), v ? (ge(C ? [u, g] : d), u = g = null) : Ht([u, g], or);
|
|
1014
1014
|
}
|
|
1015
1015
|
function m() {
|
|
1016
1016
|
o([ie, Ae, xt, fe, dn], L), l(g, "click", mt(T, ">")), l(u, "click", mt(T, "<"));
|
|
@@ -1019,7 +1019,7 @@ function Ki(t, e, n) {
|
|
|
1019
1019
|
a.go(F, !0);
|
|
1020
1020
|
}
|
|
1021
1021
|
function A() {
|
|
1022
|
-
d =
|
|
1022
|
+
d = C || xe("div", c.arrows), u = z(!0), g = z(!1), v = !0, je(d, [u, g]), !C && Un(d, y);
|
|
1023
1023
|
}
|
|
1024
1024
|
function z(F) {
|
|
1025
1025
|
var P = '<button class="' + c.arrow + " " + (F ? c.prev : c.next) + '" type="button"><svg xmlns="' + Yi + '" viewBox="0 0 ' + Ze + " " + Ze + '" width="' + Ze + '" height="' + Ze + '" focusable="false"><path d="' + (n.arrowPath || qi) + '" />';
|
|
@@ -1033,36 +1033,36 @@ function Ki(t, e, n) {
|
|
|
1033
1033
|
}
|
|
1034
1034
|
return {
|
|
1035
1035
|
arrows: b,
|
|
1036
|
-
mount:
|
|
1037
|
-
destroy:
|
|
1036
|
+
mount: $,
|
|
1037
|
+
destroy: w,
|
|
1038
1038
|
update: L
|
|
1039
1039
|
};
|
|
1040
1040
|
}
|
|
1041
1041
|
var Ji = Yn + "-interval";
|
|
1042
1042
|
function Zi(t, e, n) {
|
|
1043
|
-
var r = bt(t), o = r.on, l = r.bind, i = r.emit, c = yn(n.interval, t.go.bind(t, ">"), m), s = c.isPaused, p = e.Elements, a = e.Elements,
|
|
1043
|
+
var r = bt(t), o = r.on, l = r.bind, i = r.emit, c = yn(n.interval, t.go.bind(t, ">"), m), s = c.isPaused, p = e.Elements, a = e.Elements, C = a.root, y = a.toggle, d = n.autoplay, u, g, v = d === "pause";
|
|
1044
1044
|
function h() {
|
|
1045
|
-
d && (b(), y && Q(y, Xe, p.track.id), v ||
|
|
1045
|
+
d && (b(), y && Q(y, Xe, p.track.id), v || $(), w());
|
|
1046
1046
|
}
|
|
1047
1047
|
function b() {
|
|
1048
|
-
n.pauseOnHover && l(
|
|
1048
|
+
n.pauseOnHover && l(C, "mouseenter mouseleave", function(A) {
|
|
1049
1049
|
u = A.type === "mouseenter", B();
|
|
1050
|
-
}), n.pauseOnFocus && l(
|
|
1050
|
+
}), n.pauseOnFocus && l(C, "focusin focusout", function(A) {
|
|
1051
1051
|
g = A.type === "focusin", B();
|
|
1052
1052
|
}), y && l(y, "click", function() {
|
|
1053
|
-
v ?
|
|
1053
|
+
v ? $() : H(!0);
|
|
1054
1054
|
}), o([Jt, hn, xt], c.rewind), o(Jt, T);
|
|
1055
1055
|
}
|
|
1056
|
-
function
|
|
1057
|
-
s() && e.Slides.isEnough() && (c.start(!n.resetProgress), g = u = v = !1,
|
|
1056
|
+
function $() {
|
|
1057
|
+
s() && e.Slides.isEnough() && (c.start(!n.resetProgress), g = u = v = !1, w(), i(Qn));
|
|
1058
1058
|
}
|
|
1059
1059
|
function H(A) {
|
|
1060
|
-
A === void 0 && (A = !0), v = !!A,
|
|
1060
|
+
A === void 0 && (A = !0), v = !!A, w(), s() || (c.pause(), i(tr));
|
|
1061
1061
|
}
|
|
1062
1062
|
function B() {
|
|
1063
|
-
v || (u || g ? H(!1) :
|
|
1063
|
+
v || (u || g ? H(!1) : $());
|
|
1064
1064
|
}
|
|
1065
|
-
function
|
|
1065
|
+
function w() {
|
|
1066
1066
|
y && (Ut(y, me, !v), Q(y, kt, n.i18n[v ? "play" : "pause"]));
|
|
1067
1067
|
}
|
|
1068
1068
|
function m(A) {
|
|
@@ -1076,7 +1076,7 @@ function Zi(t, e, n) {
|
|
|
1076
1076
|
return {
|
|
1077
1077
|
mount: h,
|
|
1078
1078
|
destroy: c.cancel,
|
|
1079
|
-
play:
|
|
1079
|
+
play: $,
|
|
1080
1080
|
pause: H,
|
|
1081
1081
|
isPaused: s
|
|
1082
1082
|
};
|
|
@@ -1102,7 +1102,7 @@ function Qi(t, e, n) {
|
|
|
1102
1102
|
}
|
|
1103
1103
|
var tl = 10, el = 600, nl = 0.6, rl = 1.5, ol = 800;
|
|
1104
1104
|
function il(t, e, n) {
|
|
1105
|
-
var r = bt(t), o = r.on, l = r.emit, i = t.state.set, c = e.Move, s = c.getPosition, p = c.getLimit, a = c.exceededLimit,
|
|
1105
|
+
var r = bt(t), o = r.on, l = r.emit, i = t.state.set, c = e.Move, s = c.getPosition, p = c.getLimit, a = c.exceededLimit, C = c.translate, y = t.is(Te), d, u, g = 1;
|
|
1106
1106
|
function v() {
|
|
1107
1107
|
o(Jt, H), o([Tt, xt], B);
|
|
1108
1108
|
}
|
|
@@ -1113,14 +1113,14 @@ function il(t, e, n) {
|
|
|
1113
1113
|
m = c.toPosition(e.Controller.toDest(m % P)) + V;
|
|
1114
1114
|
}
|
|
1115
1115
|
var D = Gr(F, m, 1);
|
|
1116
|
-
g = 1, T = D ? 0 : T || un(Et(m - F) / rl, ol), u = z, d = yn(T, b, mt(
|
|
1116
|
+
g = 1, T = D ? 0 : T || un(Et(m - F) / rl, ol), u = z, d = yn(T, b, mt($, F, m, L), 1), i(He), l(hn), d.start();
|
|
1117
1117
|
}
|
|
1118
1118
|
function b() {
|
|
1119
1119
|
i(we), u && u(), l(fe);
|
|
1120
1120
|
}
|
|
1121
|
-
function
|
|
1122
|
-
var L = s(), F = m + (T - m) *
|
|
1123
|
-
|
|
1121
|
+
function $(m, T, A, z) {
|
|
1122
|
+
var L = s(), F = m + (T - m) * w(z), P = (F - L) * g;
|
|
1123
|
+
C(L + P), y && !A && a() && (g *= nl, Et(P) < tl && h(p(a(!0)), el, !1, u, !0));
|
|
1124
1124
|
}
|
|
1125
1125
|
function H() {
|
|
1126
1126
|
d && d.cancel();
|
|
@@ -1128,7 +1128,7 @@ function il(t, e, n) {
|
|
|
1128
1128
|
function B() {
|
|
1129
1129
|
d && !d.isPaused() && (H(), b());
|
|
1130
1130
|
}
|
|
1131
|
-
function
|
|
1131
|
+
function w(m) {
|
|
1132
1132
|
var T = n.easingFunc;
|
|
1133
1133
|
return T ? T(m) : 1 - Math.pow(1 - m, 4);
|
|
1134
1134
|
}
|
|
@@ -1144,7 +1144,7 @@ var ve = {
|
|
|
1144
1144
|
capture: !0
|
|
1145
1145
|
};
|
|
1146
1146
|
function ll(t, e, n) {
|
|
1147
|
-
var r = bt(t), o = r.on, l = r.emit, i = r.bind, c = r.unbind, s = t.state, p = e.Move, a = e.Scroll,
|
|
1147
|
+
var r = bt(t), o = r.on, l = r.emit, i = r.bind, c = r.unbind, s = t.state, p = e.Move, a = e.Scroll, C = e.Controller, y = e.Elements.track, d = e.Media.reduce, u = e.Direction, g = u.resolve, v = u.orient, h = p.getPosition, b = p.exceededLimit, $, H, B, w, m, T = !1, A, z, L;
|
|
1148
1148
|
function F() {
|
|
1149
1149
|
i(y, An, kn, ve), i(y, En, kn, ve), i(y, So, V, ve), i(y, "click", R, {
|
|
1150
1150
|
capture: !0
|
|
@@ -1152,18 +1152,18 @@ function ll(t, e, n) {
|
|
|
1152
1152
|
}
|
|
1153
1153
|
function P() {
|
|
1154
1154
|
var M = n.drag;
|
|
1155
|
-
zt(!M),
|
|
1155
|
+
zt(!M), w = M === "free";
|
|
1156
1156
|
}
|
|
1157
1157
|
function V(M) {
|
|
1158
1158
|
if (A = !1, !z) {
|
|
1159
1159
|
var S = dt(M);
|
|
1160
|
-
ct(M.target) && (S || !M.button) && (
|
|
1160
|
+
ct(M.target) && (S || !M.button) && (C.isBusy() ? Gt(M, !0) : (L = S ? y : window, m = s.is([Le, He]), B = null, i(L, An, D, ve), i(L, En, f, ve), p.cancel(), a.cancel(), I(M)));
|
|
1161
1161
|
}
|
|
1162
1162
|
}
|
|
1163
1163
|
function D(M) {
|
|
1164
1164
|
if (s.is(rn) || (s.set(rn), l(Jr)), M.cancelable)
|
|
1165
1165
|
if (m) {
|
|
1166
|
-
p.translate(
|
|
1166
|
+
p.translate($ + ft(et(M)));
|
|
1167
1167
|
var S = st(M) > wr, j = T !== (T = b());
|
|
1168
1168
|
(S || j) && I(M), A = !0, l(Zr), Gt(M);
|
|
1169
1169
|
} else O(M) && (m = _(M), Gt(M));
|
|
@@ -1175,31 +1175,31 @@ function ll(t, e, n) {
|
|
|
1175
1175
|
!z && A && Gt(M, !0);
|
|
1176
1176
|
}
|
|
1177
1177
|
function I(M) {
|
|
1178
|
-
B = H, H = M,
|
|
1178
|
+
B = H, H = M, $ = h();
|
|
1179
1179
|
}
|
|
1180
1180
|
function E(M) {
|
|
1181
1181
|
var S = U(M), j = ot(S), X = n.rewind && n.rewindByDrag;
|
|
1182
|
-
d(!1),
|
|
1182
|
+
d(!1), w ? C.scroll(j, 0, n.snap) : t.is(Ye) ? C.go(v(On(S)) < 0 ? X ? "<" : "-" : X ? ">" : "+") : t.is(Te) && T && X ? C.go(b(!0) ? ">" : "<") : C.go(C.toDest(j), !0), d(!0);
|
|
1183
1183
|
}
|
|
1184
1184
|
function _(M) {
|
|
1185
1185
|
var S = n.dragMinThreshold, j = Oe(S), X = j && S.mouse || 0, K = (j ? S.touch : +S) || 10;
|
|
1186
|
-
return Et(
|
|
1186
|
+
return Et(et(M)) > (dt(M) ? K : X);
|
|
1187
1187
|
}
|
|
1188
1188
|
function O(M) {
|
|
1189
|
-
return Et(
|
|
1189
|
+
return Et(et(M)) > Et(et(M, !0));
|
|
1190
1190
|
}
|
|
1191
1191
|
function U(M) {
|
|
1192
1192
|
if (t.is(Ee) || !T) {
|
|
1193
1193
|
var S = st(M);
|
|
1194
1194
|
if (S && S < wr)
|
|
1195
|
-
return
|
|
1195
|
+
return et(M) / S;
|
|
1196
1196
|
}
|
|
1197
1197
|
return 0;
|
|
1198
1198
|
}
|
|
1199
1199
|
function ot(M) {
|
|
1200
|
-
return h() + On(M) * re(Et(M) * (n.flickPower || 600),
|
|
1200
|
+
return h() + On(M) * re(Et(M) * (n.flickPower || 600), w ? 1 / 0 : e.Layout.listSize() * (n.flickMaxPages || 1));
|
|
1201
1201
|
}
|
|
1202
|
-
function
|
|
1202
|
+
function et(M, S) {
|
|
1203
1203
|
return q(M, S) - q(k(M), S);
|
|
1204
1204
|
}
|
|
1205
1205
|
function st(M) {
|
|
@@ -1246,7 +1246,7 @@ function lr(t) {
|
|
|
1246
1246
|
var _r = "keydown";
|
|
1247
1247
|
function sl(t, e, n) {
|
|
1248
1248
|
var r = bt(t), o = r.on, l = r.bind, i = r.unbind, c = t.root, s = e.Direction.resolve, p, a;
|
|
1249
|
-
function
|
|
1249
|
+
function C() {
|
|
1250
1250
|
y(), o(Tt, d), o(Tt, y), o(Jt, g);
|
|
1251
1251
|
}
|
|
1252
1252
|
function y() {
|
|
@@ -1272,7 +1272,7 @@ function sl(t, e, n) {
|
|
|
1272
1272
|
}
|
|
1273
1273
|
}
|
|
1274
1274
|
return {
|
|
1275
|
-
mount:
|
|
1275
|
+
mount: C,
|
|
1276
1276
|
destroy: d,
|
|
1277
1277
|
disable: u
|
|
1278
1278
|
};
|
|
@@ -1280,7 +1280,7 @@ function sl(t, e, n) {
|
|
|
1280
1280
|
var Re = Yn + "-lazy", an = Re + "-srcset", cl = "[" + Re + "], [" + an + "]";
|
|
1281
1281
|
function ul(t, e, n) {
|
|
1282
1282
|
var r = bt(t), o = r.on, l = r.off, i = r.bind, c = r.emit, s = n.lazyLoad === "sequential", p = [Ae, fe], a = [];
|
|
1283
|
-
function
|
|
1283
|
+
function C() {
|
|
1284
1284
|
n.lazyLoad && (y(), o(xt, y));
|
|
1285
1285
|
}
|
|
1286
1286
|
function y() {
|
|
@@ -1288,49 +1288,49 @@ function ul(t, e, n) {
|
|
|
1288
1288
|
}
|
|
1289
1289
|
function d() {
|
|
1290
1290
|
e.Slides.forEach(function(b) {
|
|
1291
|
-
Xn(b.slide, cl).forEach(function(
|
|
1292
|
-
var H = Pt(
|
|
1293
|
-
if (H !==
|
|
1294
|
-
var
|
|
1295
|
-
a.push([
|
|
1291
|
+
Xn(b.slide, cl).forEach(function($) {
|
|
1292
|
+
var H = Pt($, Re), B = Pt($, an);
|
|
1293
|
+
if (H !== $.src || B !== $.srcset) {
|
|
1294
|
+
var w = n.classes.spinner, m = $.parentElement, T = Ge(m, "." + w) || xe("span", w, m);
|
|
1295
|
+
a.push([$, b, T]), $.src || ze($, "none");
|
|
1296
1296
|
}
|
|
1297
1297
|
});
|
|
1298
1298
|
});
|
|
1299
1299
|
}
|
|
1300
1300
|
function u() {
|
|
1301
1301
|
a = a.filter(function(b) {
|
|
1302
|
-
var
|
|
1303
|
-
return b[1].isWithin(t.index,
|
|
1302
|
+
var $ = n.perPage * ((n.preloadPages || 1) + 1) - 1;
|
|
1303
|
+
return b[1].isWithin(t.index, $) ? g(b) : !0;
|
|
1304
1304
|
}), a.length || l(p);
|
|
1305
1305
|
}
|
|
1306
1306
|
function g(b) {
|
|
1307
|
-
var
|
|
1308
|
-
Mt(b[1].slide, zn), i(
|
|
1307
|
+
var $ = b[0];
|
|
1308
|
+
Mt(b[1].slide, zn), i($, "load error", mt(v, b)), Q($, "src", Pt($, Re)), Q($, "srcset", Pt($, an)), Ht($, Re), Ht($, an);
|
|
1309
1309
|
}
|
|
1310
|
-
function v(b,
|
|
1310
|
+
function v(b, $) {
|
|
1311
1311
|
var H = b[0], B = b[1];
|
|
1312
|
-
Xt(B.slide, zn),
|
|
1312
|
+
Xt(B.slide, zn), $.type !== "error" && (ge(b[2]), ze(H, ""), c(er, H, B), c(_e)), s && h();
|
|
1313
1313
|
}
|
|
1314
1314
|
function h() {
|
|
1315
1315
|
a.length && g(a.shift());
|
|
1316
1316
|
}
|
|
1317
1317
|
return {
|
|
1318
|
-
mount:
|
|
1318
|
+
mount: C,
|
|
1319
1319
|
destroy: mt(Kt, a),
|
|
1320
1320
|
check: u
|
|
1321
1321
|
};
|
|
1322
1322
|
}
|
|
1323
1323
|
function pl(t, e, n) {
|
|
1324
|
-
var r = bt(t), o = r.on, l = r.emit, i = r.bind, c = e.Slides, s = e.Elements, p = e.Controller, a = p.hasFocus,
|
|
1324
|
+
var r = bt(t), o = r.on, l = r.emit, i = r.bind, c = e.Slides, s = e.Elements, p = e.Controller, a = p.hasFocus, C = p.getIndex, y = p.go, d = e.Direction.resolve, u = s.pagination, g = [], v, h;
|
|
1325
1325
|
function b() {
|
|
1326
|
-
|
|
1326
|
+
$(), o([Tt, xt, dn], b);
|
|
1327
1327
|
var z = n.pagination;
|
|
1328
1328
|
u && ze(u, z ? "" : "none"), z && (o([Jt, hn, fe], A), H(), A(), l(no, {
|
|
1329
1329
|
list: v,
|
|
1330
1330
|
items: g
|
|
1331
1331
|
}, T(t.index)));
|
|
1332
1332
|
}
|
|
1333
|
-
function
|
|
1333
|
+
function $() {
|
|
1334
1334
|
v && (ge(u ? oe(v.children) : v), Xt(v, h), Kt(g), v = null), r.destroy();
|
|
1335
1335
|
}
|
|
1336
1336
|
function H() {
|
|
@@ -1343,7 +1343,7 @@ function pl(t, e, n) {
|
|
|
1343
1343
|
}, f), I = c.getIn(D).map(function(_) {
|
|
1344
1344
|
return _.slide.id;
|
|
1345
1345
|
}), E = !a() && P > 1 ? F.pageX : F.slideX;
|
|
1346
|
-
i(R, "click", mt(B, D)), n.paginationKeyboard && i(R, "keydown", mt(
|
|
1346
|
+
i(R, "click", mt(B, D)), n.paginationKeyboard && i(R, "keydown", mt(w, D)), Q(f, qt, "presentation"), Q(R, qt, "tab"), Q(R, Xe, I.join(" ")), Q(R, kt, Bn(E, D + 1)), Q(R, Ce, -1), g.push({
|
|
1347
1347
|
li: f,
|
|
1348
1348
|
button: R,
|
|
1349
1349
|
page: D
|
|
@@ -1353,7 +1353,7 @@ function pl(t, e, n) {
|
|
|
1353
1353
|
function B(z) {
|
|
1354
1354
|
y(">" + z, !0);
|
|
1355
1355
|
}
|
|
1356
|
-
function
|
|
1356
|
+
function w(z, L) {
|
|
1357
1357
|
var F = g.length, P = lr(L), V = m(), D = -1;
|
|
1358
1358
|
P === d(Sn, !1, V) ? D = ++z % F : P === d(vn, !1, V) ? D = (--z + F) % F : P === "Home" ? D = 0 : P === "End" && (D = F - 1);
|
|
1359
1359
|
var f = g[D];
|
|
@@ -1366,7 +1366,7 @@ function pl(t, e, n) {
|
|
|
1366
1366
|
return g[p.toPage(z)];
|
|
1367
1367
|
}
|
|
1368
1368
|
function A() {
|
|
1369
|
-
var z = T(
|
|
1369
|
+
var z = T(C(!0)), L = T(C());
|
|
1370
1370
|
if (z) {
|
|
1371
1371
|
var F = z.button;
|
|
1372
1372
|
Xt(F, me), Ht(F, vr), Q(F, Ce, -1);
|
|
@@ -1383,7 +1383,7 @@ function pl(t, e, n) {
|
|
|
1383
1383
|
return {
|
|
1384
1384
|
items: g,
|
|
1385
1385
|
mount: b,
|
|
1386
|
-
destroy:
|
|
1386
|
+
destroy: $,
|
|
1387
1387
|
getAt: T,
|
|
1388
1388
|
update: A
|
|
1389
1389
|
};
|
|
@@ -1406,15 +1406,15 @@ function gl(t, e, n) {
|
|
|
1406
1406
|
}
|
|
1407
1407
|
function p(u, g) {
|
|
1408
1408
|
var v = bt(u);
|
|
1409
|
-
v.on(Jt, function(h, b,
|
|
1410
|
-
g.go(g.is(Ee) ?
|
|
1409
|
+
v.on(Jt, function(h, b, $) {
|
|
1410
|
+
g.go(g.is(Ee) ? $ : h);
|
|
1411
1411
|
}), l.push(v);
|
|
1412
1412
|
}
|
|
1413
1413
|
function a() {
|
|
1414
1414
|
var u = bt(t), g = u.on;
|
|
1415
|
-
g(Kn, y), g(io, d), g([ie, Tt],
|
|
1415
|
+
g(Kn, y), g(io, d), g([ie, Tt], C), l.push(u), u.emit(Zn, t.splides);
|
|
1416
1416
|
}
|
|
1417
|
-
function
|
|
1417
|
+
function C() {
|
|
1418
1418
|
Q(e.Elements.list, rr, n.direction === xn ? "vertical" : "");
|
|
1419
1419
|
}
|
|
1420
1420
|
function y(u) {
|
|
@@ -1439,8 +1439,8 @@ function ml(t, e, n) {
|
|
|
1439
1439
|
}
|
|
1440
1440
|
function c(p) {
|
|
1441
1441
|
if (p.cancelable) {
|
|
1442
|
-
var a = p.deltaY,
|
|
1443
|
-
Et(a) > d && y - l > u && (t.go(
|
|
1442
|
+
var a = p.deltaY, C = a < 0, y = Rn(p), d = n.wheelMinThreshold || 0, u = n.wheelSleep || 0;
|
|
1443
|
+
Et(a) > d && y - l > u && (t.go(C ? "<" : ">"), l = y), s(C) && Gt(p);
|
|
1444
1444
|
}
|
|
1445
1445
|
}
|
|
1446
1446
|
function s(p) {
|
|
@@ -1459,7 +1459,7 @@ function hl(t, e, n) {
|
|
|
1459
1459
|
function a(d) {
|
|
1460
1460
|
Q(l, xr, d), d ? (je(l, c), s.start()) : (ge(c), s.cancel());
|
|
1461
1461
|
}
|
|
1462
|
-
function
|
|
1462
|
+
function C() {
|
|
1463
1463
|
Ht(l, [Sr, Cr, xr]), ge(c);
|
|
1464
1464
|
}
|
|
1465
1465
|
function y(d) {
|
|
@@ -1468,7 +1468,7 @@ function hl(t, e, n) {
|
|
|
1468
1468
|
return {
|
|
1469
1469
|
mount: p,
|
|
1470
1470
|
disable: y,
|
|
1471
|
-
destroy:
|
|
1471
|
+
destroy: C
|
|
1472
1472
|
};
|
|
1473
1473
|
}
|
|
1474
1474
|
var yl = /* @__PURE__ */ Object.freeze({
|
|
@@ -1555,14 +1555,14 @@ function xl(t, e, n) {
|
|
|
1555
1555
|
var r = e.Move, o = e.Controller, l = e.Scroll, i = e.Elements.list, c = mt(Bt, i, "transition"), s;
|
|
1556
1556
|
function p() {
|
|
1557
1557
|
bt(t).bind(i, "transitionend", function(d) {
|
|
1558
|
-
d.target === i && s && (
|
|
1558
|
+
d.target === i && s && (C(), s());
|
|
1559
1559
|
});
|
|
1560
1560
|
}
|
|
1561
1561
|
function a(d, u) {
|
|
1562
1562
|
var g = r.toPosition(d, !0), v = r.getPosition(), h = y(d);
|
|
1563
1563
|
Et(g - v) >= 1 && h >= 1 ? n.useScroll ? l.scroll(g, h, !1, u) : (c("transform " + h + "ms " + n.easing), r.translate(g, !0), s = u) : (r.jump(d), u());
|
|
1564
1564
|
}
|
|
1565
|
-
function
|
|
1565
|
+
function C() {
|
|
1566
1566
|
c(""), l.cancel();
|
|
1567
1567
|
}
|
|
1568
1568
|
function y(d) {
|
|
@@ -1577,7 +1577,7 @@ function xl(t, e, n) {
|
|
|
1577
1577
|
return {
|
|
1578
1578
|
mount: p,
|
|
1579
1579
|
start: a,
|
|
1580
|
-
cancel:
|
|
1580
|
+
cancel: C
|
|
1581
1581
|
};
|
|
1582
1582
|
}
|
|
1583
1583
|
var Cl = /* @__PURE__ */ (function() {
|
|
@@ -1603,8 +1603,8 @@ var Cl = /* @__PURE__ */ (function() {
|
|
|
1603
1603
|
Transition: this._T
|
|
1604
1604
|
});
|
|
1605
1605
|
return pe(s, function(p, a) {
|
|
1606
|
-
var
|
|
1607
|
-
c[a] =
|
|
1606
|
+
var C = p(l, c, l._o);
|
|
1607
|
+
c[a] = C, C.setup && C.setup();
|
|
1608
1608
|
}), pe(c, function(p) {
|
|
1609
1609
|
p.mount && p.mount();
|
|
1610
1610
|
}), this.emit(ie), Mt(this.root, Bi), i.set(we), this.emit(Pn), this;
|
|
@@ -1857,7 +1857,7 @@ const El = "SvgImage-module__svg___q3xE-", Il = "SvgImage-module__img___VsTm-",
|
|
|
1857
1857
|
"bottom-right": G.bottomRightAlignment
|
|
1858
1858
|
};
|
|
1859
1859
|
function Ol({ settings: t, content: e, styles: n, isEditor: r }) {
|
|
1860
|
-
const [o, l] = it(null), { widthSettings: i, fontSettings: c, letterSpacing: s, textAlign: p, wordSpacing: a, fontSizeLineHeight:
|
|
1860
|
+
const [o, l] = it(null), { widthSettings: i, fontSettings: c, letterSpacing: s, textAlign: p, wordSpacing: a, fontSizeLineHeight: C, textAppearance: y, color: d } = n.imageCaption, [u, g] = it(void 0), [v, h] = it(null), [b, $] = it(0), [H, B] = it(0), { direction: w, transition: m, controls: T, pagination: A, imageCaption: z, triggers: L } = t, F = _t(m.type), { x: P, y: V } = t.controls.offset, D = (f) => {
|
|
1861
1861
|
o && o.go(f);
|
|
1862
1862
|
};
|
|
1863
1863
|
return St(() => {
|
|
@@ -1906,8 +1906,8 @@ function Ol({ settings: t, content: e, styles: n, isEditor: r }) {
|
|
|
1906
1906
|
letterSpacing: W(s, r),
|
|
1907
1907
|
wordSpacing: W(a, r),
|
|
1908
1908
|
textAlign: p,
|
|
1909
|
-
fontSize: W(
|
|
1910
|
-
lineHeight: W(
|
|
1909
|
+
fontSize: W(C.fontSize, r),
|
|
1910
|
+
lineHeight: W(C.lineHeight, r),
|
|
1911
1911
|
textTransform: y.textTransform ?? "none",
|
|
1912
1912
|
textDecoration: y.textDecoration ?? "none",
|
|
1913
1913
|
fontVariant: y.fontVariant ?? "normal",
|
|
@@ -1940,7 +1940,7 @@ function Ol({ settings: t, content: e, styles: n, isEditor: r }) {
|
|
|
1940
1940
|
cr,
|
|
1941
1941
|
{
|
|
1942
1942
|
onMove: (f) => {
|
|
1943
|
-
|
|
1943
|
+
$(f.index);
|
|
1944
1944
|
},
|
|
1945
1945
|
ref: l,
|
|
1946
1946
|
options: {
|
|
@@ -1950,7 +1950,7 @@ function Ol({ settings: t, content: e, styles: n, isEditor: r }) {
|
|
|
1950
1950
|
...L.autoPlay !== null && {
|
|
1951
1951
|
interval: parseInt(L.autoPlay) * 1e3
|
|
1952
1952
|
},
|
|
1953
|
-
direction:
|
|
1953
|
+
direction: w === "horiz" || m.type === "fade in" ? "ltr" : "ttb",
|
|
1954
1954
|
pagination: !1,
|
|
1955
1955
|
drag: L.triggersList.drag,
|
|
1956
1956
|
perPage: 1,
|
|
@@ -1990,7 +1990,7 @@ function Ol({ settings: t, content: e, styles: n, isEditor: r }) {
|
|
|
1990
1990
|
"div",
|
|
1991
1991
|
{
|
|
1992
1992
|
className: yt(G.arrow, {
|
|
1993
|
-
[G.arrowVertical]:
|
|
1993
|
+
[G.arrowVertical]: w === "vert",
|
|
1994
1994
|
[G.hoverArrow]: T.show === "on hover"
|
|
1995
1995
|
}),
|
|
1996
1996
|
style: {
|
|
@@ -2005,7 +2005,7 @@ function Ol({ settings: t, content: e, styles: n, isEditor: r }) {
|
|
|
2005
2005
|
},
|
|
2006
2006
|
className: G.arrowInner,
|
|
2007
2007
|
style: {
|
|
2008
|
-
transform: `translate(${W(P, r)}, ${W(V * (
|
|
2008
|
+
transform: `translate(${W(P, r)}, ${W(V * (w === "horiz" ? 1 : -1), r)}) scale(${t.controls.scale / 100}) rotate(${w === "horiz" ? "0deg" : "90deg"})`
|
|
2009
2009
|
},
|
|
2010
2010
|
children: [
|
|
2011
2011
|
T.arrowsImgUrl && /* @__PURE__ */ x(
|
|
@@ -2027,7 +2027,7 @@ function Ol({ settings: t, content: e, styles: n, isEditor: r }) {
|
|
|
2027
2027
|
"div",
|
|
2028
2028
|
{
|
|
2029
2029
|
className: yt(G.arrow, G.nextArrow, {
|
|
2030
|
-
[G.arrowVertical]:
|
|
2030
|
+
[G.arrowVertical]: w === "vert",
|
|
2031
2031
|
[G.hoverArrow]: T.show === "on hover"
|
|
2032
2032
|
}),
|
|
2033
2033
|
style: {
|
|
@@ -2040,7 +2040,7 @@ function Ol({ settings: t, content: e, styles: n, isEditor: r }) {
|
|
|
2040
2040
|
className: G.arrowInner,
|
|
2041
2041
|
onClick: () => D("+1"),
|
|
2042
2042
|
style: {
|
|
2043
|
-
transform: `translate(${W(P * (
|
|
2043
|
+
transform: `translate(${W(P * (w === "horiz" ? -1 : 1), r)}, ${W(V, r)}) scale(${t.controls.scale / 100}) rotate(${w === "horiz" ? "0deg" : "90deg"})`
|
|
2044
2044
|
},
|
|
2045
2045
|
children: [
|
|
2046
2046
|
T.arrowsImgUrl && /* @__PURE__ */ x(
|
|
@@ -2072,15 +2072,15 @@ function Ol({ settings: t, content: e, styles: n, isEditor: r }) {
|
|
|
2072
2072
|
"div",
|
|
2073
2073
|
{
|
|
2074
2074
|
className: yt(G.pagination, {
|
|
2075
|
-
[G.paginationInsideBottom]: A.position === "inside-1" &&
|
|
2076
|
-
[G.paginationInsideTop]: A.position === "inside-2" &&
|
|
2077
|
-
[G.paginationOutsideBottom]: A.position === "outside-1" &&
|
|
2078
|
-
[G.paginationOutsideTop]: A.position === "outside-2" &&
|
|
2079
|
-
[G.paginationInsideLeft]: A.position === "inside-1" &&
|
|
2080
|
-
[G.paginationInsideRight]: A.position === "inside-2" &&
|
|
2081
|
-
[G.paginationOutsideLeft]: A.position === "outside-1" &&
|
|
2082
|
-
[G.paginationOutsideRight]: A.position === "outside-2" &&
|
|
2083
|
-
[G.paginationVertical]:
|
|
2075
|
+
[G.paginationInsideBottom]: A.position === "inside-1" && w === "horiz",
|
|
2076
|
+
[G.paginationInsideTop]: A.position === "inside-2" && w === "horiz",
|
|
2077
|
+
[G.paginationOutsideBottom]: A.position === "outside-1" && w === "horiz",
|
|
2078
|
+
[G.paginationOutsideTop]: A.position === "outside-2" && w === "horiz",
|
|
2079
|
+
[G.paginationInsideLeft]: A.position === "inside-1" && w === "vert",
|
|
2080
|
+
[G.paginationInsideRight]: A.position === "inside-2" && w === "vert",
|
|
2081
|
+
[G.paginationOutsideLeft]: A.position === "outside-1" && w === "vert",
|
|
2082
|
+
[G.paginationOutsideRight]: A.position === "outside-2" && w === "vert",
|
|
2083
|
+
[G.paginationVertical]: w === "vert"
|
|
2084
2084
|
}),
|
|
2085
2085
|
children: /* @__PURE__ */ x(
|
|
2086
2086
|
"div",
|
|
@@ -2088,7 +2088,7 @@ function Ol({ settings: t, content: e, styles: n, isEditor: r }) {
|
|
|
2088
2088
|
className: G.paginationInner,
|
|
2089
2089
|
style: {
|
|
2090
2090
|
backgroundColor: A.colors[2],
|
|
2091
|
-
transform: `scale(${A.scale / 100}) translate(${W(A.offset.x, r)}, ${W(A.offset.y, r)}) rotate(${
|
|
2091
|
+
transform: `scale(${A.scale / 100}) translate(${W(A.offset.x, r)}, ${W(A.offset.y, r)}) rotate(${w === "horiz" ? "0deg" : "90deg"})`
|
|
2092
2092
|
},
|
|
2093
2093
|
children: e.map((f, R) => /* @__PURE__ */ x(
|
|
2094
2094
|
"button",
|
|
@@ -2767,21 +2767,21 @@ async function Ml(t, e, n, r) {
|
|
|
2767
2767
|
return { width: o, height: l, finalWidth: `${o}px` };
|
|
2768
2768
|
}
|
|
2769
2769
|
function Hl({ settings: t, content: e, isEditor: n }) {
|
|
2770
|
-
const [r, o] = it(null), [l, i] = it([]), [c, s] = it(0), p = _t(0), [a,
|
|
2770
|
+
const [r, o] = it(null), [l, i] = it([]), [c, s] = it(0), p = _t(0), [a, C] = it({ x: 0, y: 0 }), [y, d] = it(1), [u, g] = it("none"), v = _t({ x: 0, y: 0 }), [h, b] = it(!1), { sizeType: $, imageWidth: H, randomRangeImageWidth: B } = t.imageSize, { revealPosition: w, visible: m } = t.position, { cursorType: T, target: A, defaultCursorScale: z, defaultCursor: L, hoverCursorScale: F, hoverCursor: P } = t.cursor;
|
|
2771
2771
|
St(() => {
|
|
2772
2772
|
if (!r) return;
|
|
2773
2773
|
const f = (E, _) => {
|
|
2774
2774
|
const O = r.getBoundingClientRect(), U = E - O.left, ot = _ - O.top;
|
|
2775
|
-
if (
|
|
2775
|
+
if (C({ x: U, y: ot }), T === "system") {
|
|
2776
2776
|
g("none"), d(1);
|
|
2777
2777
|
return;
|
|
2778
2778
|
}
|
|
2779
|
-
const
|
|
2779
|
+
const et = U, st = ot, k = document.elementFromPoint(O.left + et, O.top + st);
|
|
2780
2780
|
if (k && k.closest("a")) {
|
|
2781
2781
|
g("none"), d(1);
|
|
2782
2782
|
return;
|
|
2783
2783
|
}
|
|
2784
|
-
const q = Er(
|
|
2784
|
+
const q = Er(et, st, l) || A === "area" ? { img: P ?? "none", scale: F } : { img: L ?? "none", scale: z };
|
|
2785
2785
|
g(q.img), d(q.scale);
|
|
2786
2786
|
}, R = (E) => {
|
|
2787
2787
|
E.stopPropagation(), v.current = { x: E.clientX, y: E.clientY }, f(E.clientX, E.clientY);
|
|
@@ -2808,13 +2808,13 @@ function Hl({ settings: t, content: e, isEditor: n }) {
|
|
|
2808
2808
|
const V = async (f, R, I, E = {}) => {
|
|
2809
2809
|
const { width: _, height: O, finalWidth: U } = await Ml(
|
|
2810
2810
|
f.image.url,
|
|
2811
|
-
|
|
2811
|
+
$,
|
|
2812
2812
|
H,
|
|
2813
2813
|
B
|
|
2814
2814
|
);
|
|
2815
|
-
let ot = 0,
|
|
2816
|
-
|
|
2817
|
-
const st = Math.min(Math.max(ot, _ / 2), R - _ / 2), k = Math.min(Math.max(
|
|
2815
|
+
let ot = 0, et = 0;
|
|
2816
|
+
w === "same" ? (ot = R / 2, et = I / 2) : (ot = E.x ?? Math.random() * R, et = E.y ?? Math.random() * I);
|
|
2817
|
+
const st = Math.min(Math.max(ot, _ / 2), R - _ / 2), k = Math.min(Math.max(et, O / 2), I - O / 2);
|
|
2818
2818
|
return {
|
|
2819
2819
|
id: p.current++,
|
|
2820
2820
|
url: f.image.url,
|
|
@@ -2832,7 +2832,7 @@ function Hl({ settings: t, content: e, isEditor: n }) {
|
|
|
2832
2832
|
const O = e[0], U = await V(O, R, I);
|
|
2833
2833
|
E.push(U), i(E), s(1);
|
|
2834
2834
|
})();
|
|
2835
|
-
}, [
|
|
2835
|
+
}, [$, H, B, w, r]), St(() => {
|
|
2836
2836
|
m === "last One" && i((f) => f.length > 0 ? [f[f.length - 1]] : []);
|
|
2837
2837
|
}, [m]), /* @__PURE__ */ vt(
|
|
2838
2838
|
"div",
|
|
@@ -2843,9 +2843,9 @@ function Hl({ settings: t, content: e, isEditor: n }) {
|
|
|
2843
2843
|
const R = r.getBoundingClientRect(), I = f.clientX - R.left, E = f.clientY - R.top;
|
|
2844
2844
|
if (A === "image" && !Er(I, E, l)) return;
|
|
2845
2845
|
let _ = 0, O = 0;
|
|
2846
|
-
|
|
2846
|
+
w === "on Click" ? (_ = I, O = E) : w === "same" ? (_ = R.width / 2, O = R.height / 2) : (_ = Math.random() * R.width, O = Math.random() * R.height);
|
|
2847
2847
|
const U = e[c], ot = await V(U, R.width, R.height, { x: _, y: O });
|
|
2848
|
-
i((
|
|
2848
|
+
i((et) => m === "all" ? [...et, ot] : [ot]), s((et) => et >= e.length - 1 ? 0 : et + 1);
|
|
2849
2849
|
},
|
|
2850
2850
|
onMouseEnter: () => b(!0),
|
|
2851
2851
|
onMouseLeave: () => b(!1),
|
|
@@ -3275,7 +3275,7 @@ function Ir(t) {
|
|
|
3275
3275
|
const e = t.getBoundingClientRect(), n = Co(t), r = Math.max(0, e.width - n.left - n.right), o = Math.max(0, e.height - n.top - n.bottom), l = t.naturalWidth, i = t.naturalHeight, c = r / o, s = l / i;
|
|
3276
3276
|
let p, a;
|
|
3277
3277
|
s > c ? (p = r, a = r / s) : (a = o, p = o * s);
|
|
3278
|
-
const
|
|
3278
|
+
const C = e.left + n.left, y = e.top + n.top, d = (r - p) / 2 + C, u = (o - a) / 2 + y;
|
|
3279
3279
|
return {
|
|
3280
3280
|
x: d,
|
|
3281
3281
|
y: u,
|
|
@@ -3402,7 +3402,7 @@ const Aa = ({ settings: t, content: e, styles: n, portalId: r, activeEvent: o, i
|
|
|
3402
3402
|
] });
|
|
3403
3403
|
}, Ea = ({ isOpen: t, onClose: e, content: n, lightboxStyles: r, settings: o, portalId: l, isEditor: i, metadata: c }) => {
|
|
3404
3404
|
var M;
|
|
3405
|
-
const [s, p] = it(0), [a,
|
|
3405
|
+
const [s, p] = it(0), [a, C] = it(0), [y, d] = it(!1), [u, g] = it(!1), [v, h] = it({}), b = _t(null), $ = _t(null), H = _t(null), B = _t(!1), w = _t(null), m = _t(null), T = _t(null), A = _t(null), z = _t(!1), L = _t(null), [F, P] = it(!1), { appear: V, triggers: D, slider: f, thumbnail: R, controls: I, area: E, caption: _, layout: O } = o.lightboxBlock, { appearClass: U, backdropAppearClass: ot, backdropDisappearClass: et, disappearClass: st } = La(V.type, V.direction), k = (c == null ? void 0 : c.itemId) ?? null;
|
|
3406
3406
|
St(() => {
|
|
3407
3407
|
const S = () => {
|
|
3408
3408
|
setTimeout(() => {
|
|
@@ -3410,7 +3410,7 @@ const Aa = ({ settings: t, content: e, styles: n, portalId: r, activeEvent: o, i
|
|
|
3410
3410
|
(K = (X = b.current) == null ? void 0 : X.splide) == null || K.refresh();
|
|
3411
3411
|
}, 16);
|
|
3412
3412
|
}, j = () => {
|
|
3413
|
-
|
|
3413
|
+
C((X) => X + 1);
|
|
3414
3414
|
};
|
|
3415
3415
|
return window.addEventListener("ArticleEditor.Layout:change", S), window.addEventListener("ArticleEditor.ComponentContent:change", j), () => {
|
|
3416
3416
|
window.removeEventListener("ArticleEditor.Layout:change", S), window.removeEventListener("ArticleEditor.ComponentContent:change", j);
|
|
@@ -3433,18 +3433,18 @@ const Aa = ({ settings: t, content: e, styles: n, portalId: r, activeEvent: o, i
|
|
|
3433
3433
|
const S = window.matchMedia("(max-width: 768px)").matches, j = kr(E.color);
|
|
3434
3434
|
S && !i && j > 0.9 && (document.body.style.backgroundColor = ""), d(!0), B.current = !0;
|
|
3435
3435
|
const X = (K) => {
|
|
3436
|
-
K.target ===
|
|
3436
|
+
K.target === w.current && K.animationName && (w.current && m.current && w.current.removeEventListener("animationend", m.current), m.current = null, B.current && (B.current = !1, e()), d(!1));
|
|
3437
3437
|
};
|
|
3438
|
-
|
|
3438
|
+
w.current && (m.current = X, w.current.addEventListener("animationend", X));
|
|
3439
3439
|
}, [e, E.color, i]), ft = (S, j, X) => {
|
|
3440
|
-
var K,
|
|
3440
|
+
var K, nt;
|
|
3441
3441
|
if (S) {
|
|
3442
3442
|
if (D.type === "click" && D.switch === "image")
|
|
3443
3443
|
D.repeat === "close" && s === n.length - 1 ? q() : (K = b.current) == null || K.go("+1");
|
|
3444
3444
|
else if (D.type === "click" && D.switch === "50/50") {
|
|
3445
|
-
const J = S.getBoundingClientRect(), Y = j - J.left, rt = X - J.top, ht = J.width,
|
|
3445
|
+
const J = S.getBoundingClientRect(), Y = j - J.left, rt = X - J.top, ht = J.width, lt = J.height;
|
|
3446
3446
|
let gt;
|
|
3447
|
-
f.direction === "horiz" ? gt = Y < ht / 2 ? "-1" : "+1" : gt = rt <
|
|
3447
|
+
f.direction === "horiz" ? gt = Y < ht / 2 ? "-1" : "+1" : gt = rt < lt / 2 ? "-1" : "+1", (nt = b.current) == null || nt.go(gt);
|
|
3448
3448
|
}
|
|
3449
3449
|
}
|
|
3450
3450
|
}, ct = (S) => {
|
|
@@ -3453,26 +3453,26 @@ const Aa = ({ settings: t, content: e, styles: n, portalId: r, activeEvent: o, i
|
|
|
3453
3453
|
return;
|
|
3454
3454
|
}
|
|
3455
3455
|
const j = n[s], X = (j == null ? void 0 : j.image.objectFit) === "cover";
|
|
3456
|
-
let K,
|
|
3456
|
+
let K, nt;
|
|
3457
3457
|
if ("changedTouches" in S && S.changedTouches.length > 0)
|
|
3458
|
-
K = S.changedTouches[0].clientX,
|
|
3458
|
+
K = S.changedTouches[0].clientX, nt = S.changedTouches[0].clientY;
|
|
3459
3459
|
else if ("clientX" in S)
|
|
3460
|
-
K = S.clientX,
|
|
3460
|
+
K = S.clientX, nt = S.clientY;
|
|
3461
3461
|
else
|
|
3462
3462
|
return;
|
|
3463
3463
|
let J;
|
|
3464
3464
|
if (X && H.current) {
|
|
3465
3465
|
const Y = Fr(H.current);
|
|
3466
|
-
J = K >= Y.left && K <= Y.right &&
|
|
3466
|
+
J = K >= Y.left && K <= Y.right && nt >= Y.top && nt <= Y.bottom;
|
|
3467
3467
|
} else {
|
|
3468
3468
|
const Y = H.current ? Ir(H.current) : null;
|
|
3469
3469
|
if (!Y) {
|
|
3470
3470
|
S.target === S.currentTarget && q();
|
|
3471
3471
|
return;
|
|
3472
3472
|
}
|
|
3473
|
-
J = K >= Y.x && K <= Y.x + Y.width &&
|
|
3473
|
+
J = K >= Y.x && K <= Y.x + Y.width && nt >= Y.y && nt <= Y.y + Y.height;
|
|
3474
3474
|
}
|
|
3475
|
-
J ? ft(H.current, K,
|
|
3475
|
+
J ? ft(H.current, K, nt) : q();
|
|
3476
3476
|
}, dt = (S) => {
|
|
3477
3477
|
const j = S.target;
|
|
3478
3478
|
(j.classList.contains(N.thumbsWrapper) || j.classList.contains(N.thumbsContainer)) && ct(S);
|
|
@@ -3486,44 +3486,44 @@ const Aa = ({ settings: t, content: e, styles: n, portalId: r, activeEvent: o, i
|
|
|
3486
3486
|
return;
|
|
3487
3487
|
}
|
|
3488
3488
|
if (j.key === "ArrowRight") {
|
|
3489
|
-
p((
|
|
3489
|
+
p((nt) => (nt + 1) % Math.max(n.length, 1)), (X = b.current) == null || X.go("+1");
|
|
3490
3490
|
return;
|
|
3491
3491
|
}
|
|
3492
|
-
j.key === "ArrowLeft" && (p((
|
|
3492
|
+
j.key === "ArrowLeft" && (p((nt) => (nt - 1 + Math.max(n.length, 1)) % Math.max(n.length, 1)), (K = b.current) == null || K.go("-1"));
|
|
3493
3493
|
};
|
|
3494
3494
|
return window.addEventListener("keydown", S), () => {
|
|
3495
3495
|
window.removeEventListener("keydown", S);
|
|
3496
3496
|
};
|
|
3497
3497
|
}, [t, q, n.length]), St(() => {
|
|
3498
3498
|
if (t) {
|
|
3499
|
-
if (p(0),
|
|
3499
|
+
if (p(0), C((j) => j + 1), B.current = !1, d(!1), g(!1), h({}), !k) return;
|
|
3500
3500
|
const S = new CustomEvent("page-overlay", { detail: { itemId: k } });
|
|
3501
3501
|
window.dispatchEvent(S);
|
|
3502
3502
|
}
|
|
3503
3503
|
return () => {
|
|
3504
|
-
|
|
3504
|
+
w.current && m.current && (w.current.removeEventListener("animationend", m.current), m.current = null), g(!1);
|
|
3505
3505
|
};
|
|
3506
3506
|
}, [t, k]), St(() => {
|
|
3507
|
-
|
|
3507
|
+
$.current !== null && $.current !== f.type && C((S) => S + 1), $.current = f.type;
|
|
3508
3508
|
}, [f.type]), St(() => {
|
|
3509
3509
|
if (!t) return;
|
|
3510
3510
|
const S = document.body.style.overflow, j = window.matchMedia("(max-width: 768px)").matches, X = kr(E.color);
|
|
3511
3511
|
document.body.style.overflow = "hidden", g(!1);
|
|
3512
3512
|
const K = (J) => {
|
|
3513
|
-
J.target ===
|
|
3513
|
+
J.target === w.current && !B.current && J.animationName && (j && !i && X > 0.9 && (document.body.style.backgroundColor = E.color), g(!0), w.current && T.current && w.current.removeEventListener("animationend", T.current), T.current = null);
|
|
3514
3514
|
};
|
|
3515
|
-
|
|
3516
|
-
const
|
|
3515
|
+
w.current && (T.current = K, w.current.addEventListener("animationend", K));
|
|
3516
|
+
const nt = (J) => {
|
|
3517
3517
|
const Y = J.target;
|
|
3518
3518
|
Y && (Y.closest(`.${N.thumbsWrapper}`) || Y.closest(`.${N.thumbsContainer}`)) || f.type !== "slide" && J.preventDefault();
|
|
3519
3519
|
};
|
|
3520
|
-
return document.addEventListener("touchmove",
|
|
3521
|
-
document.body.style.overflow = S, document.removeEventListener("touchmove",
|
|
3520
|
+
return document.addEventListener("touchmove", nt, { passive: !1 }), () => {
|
|
3521
|
+
document.body.style.overflow = S, document.removeEventListener("touchmove", nt), w.current && T.current && (w.current.removeEventListener("animationend", T.current), T.current = null), g(!1);
|
|
3522
3522
|
};
|
|
3523
3523
|
}, [t, i, E.color, f.type]), St(() => {
|
|
3524
3524
|
if (!t) return;
|
|
3525
3525
|
const S = (j) => {
|
|
3526
|
-
var K,
|
|
3526
|
+
var K, nt;
|
|
3527
3527
|
if (B.current) {
|
|
3528
3528
|
j.stopPropagation();
|
|
3529
3529
|
return;
|
|
@@ -3534,7 +3534,7 @@ const Aa = ({ settings: t, content: e, styles: n, portalId: r, activeEvent: o, i
|
|
|
3534
3534
|
}
|
|
3535
3535
|
const X = j.target;
|
|
3536
3536
|
if (!(X && (X.closest(`.${N.thumbsContainer}`) || X.closest(`.${N.thumbItem}`)))) {
|
|
3537
|
-
if (f.type === "slide" && D.type === "drag" && ((
|
|
3537
|
+
if (f.type === "slide" && D.type === "drag" && ((nt = (K = b.current) == null ? void 0 : K.splide) != null && nt.root)) {
|
|
3538
3538
|
const J = b.current.splide.root;
|
|
3539
3539
|
if (X && (J.contains(X) || J === X))
|
|
3540
3540
|
return;
|
|
@@ -3543,19 +3543,19 @@ const Aa = ({ settings: t, content: e, styles: n, portalId: r, activeEvent: o, i
|
|
|
3543
3543
|
const J = n[s], Y = (J == null ? void 0 : J.image.objectFit) === "cover", rt = j.changedTouches[0];
|
|
3544
3544
|
let ht;
|
|
3545
3545
|
if (Y && H.current) {
|
|
3546
|
-
const
|
|
3547
|
-
ht = rt.clientX >=
|
|
3546
|
+
const lt = Fr(H.current);
|
|
3547
|
+
ht = rt.clientX >= lt.left && rt.clientX <= lt.right && rt.clientY >= lt.top && rt.clientY <= lt.bottom;
|
|
3548
3548
|
} else {
|
|
3549
|
-
const
|
|
3550
|
-
if (!
|
|
3551
|
-
ht = rt.clientX >=
|
|
3549
|
+
const lt = H.current ? Ir(H.current) : null;
|
|
3550
|
+
if (!lt) return;
|
|
3551
|
+
ht = rt.clientX >= lt.x && rt.clientX <= lt.x + lt.width && rt.clientY >= lt.y && rt.clientY <= lt.y + lt.height;
|
|
3552
3552
|
}
|
|
3553
3553
|
if (!ht) {
|
|
3554
3554
|
j.stopPropagation(), B.current = !0;
|
|
3555
|
-
const
|
|
3556
|
-
gt.stopPropagation(), gt.preventDefault(), document.removeEventListener("click",
|
|
3555
|
+
const lt = (gt) => {
|
|
3556
|
+
gt.stopPropagation(), gt.preventDefault(), document.removeEventListener("click", lt, !0);
|
|
3557
3557
|
};
|
|
3558
|
-
document.addEventListener("click",
|
|
3558
|
+
document.addEventListener("click", lt, !0), q();
|
|
3559
3559
|
}
|
|
3560
3560
|
}
|
|
3561
3561
|
}
|
|
@@ -3575,7 +3575,7 @@ const Aa = ({ settings: t, content: e, styles: n, portalId: r, activeEvent: o, i
|
|
|
3575
3575
|
}
|
|
3576
3576
|
}, K = (Z) => {
|
|
3577
3577
|
A.current && (Z.preventDefault(), X(Z.clientX, Z.clientY));
|
|
3578
|
-
},
|
|
3578
|
+
}, nt = (Z) => {
|
|
3579
3579
|
A.current && Z.touches.length > 0 && (Z.preventDefault(), X(Z.touches[0].clientX, Z.touches[0].clientY));
|
|
3580
3580
|
}, J = (Z, ut) => {
|
|
3581
3581
|
if (!A.current || !b.current) {
|
|
@@ -3592,15 +3592,15 @@ const Aa = ({ settings: t, content: e, styles: n, portalId: r, activeEvent: o, i
|
|
|
3592
3592
|
const ut = Z.changedTouches[0];
|
|
3593
3593
|
J(ut.clientX, ut.clientY);
|
|
3594
3594
|
}
|
|
3595
|
-
document.removeEventListener("touchend", rt), document.removeEventListener("touchcancel", rt), document.removeEventListener("touchmove",
|
|
3595
|
+
document.removeEventListener("touchend", rt), document.removeEventListener("touchcancel", rt), document.removeEventListener("touchmove", nt);
|
|
3596
3596
|
}
|
|
3597
3597
|
}, ht = (Z) => {
|
|
3598
3598
|
A.current = { x: Z.clientX, y: Z.clientY }, z.current = !1, document.addEventListener("pointermove", K, { passive: !1 }), document.addEventListener("pointerup", Y), document.addEventListener("pointercancel", Y);
|
|
3599
|
-
},
|
|
3600
|
-
Z.touches.length > 0 && (A.current = { x: Z.touches[0].clientX, y: Z.touches[0].clientY }, z.current = !1, document.addEventListener("touchmove",
|
|
3599
|
+
}, lt = (Z) => {
|
|
3600
|
+
Z.touches.length > 0 && (A.current = { x: Z.touches[0].clientX, y: Z.touches[0].clientY }, z.current = !1, document.addEventListener("touchmove", nt, { passive: !1 }), document.addEventListener("touchend", rt), document.addEventListener("touchcancel", rt));
|
|
3601
3601
|
};
|
|
3602
|
-
return S.addEventListener("pointerdown", ht), S.addEventListener("touchstart",
|
|
3603
|
-
S.removeEventListener("pointerdown", ht), S.removeEventListener("touchstart",
|
|
3602
|
+
return S.addEventListener("pointerdown", ht), S.addEventListener("touchstart", lt), () => {
|
|
3603
|
+
S.removeEventListener("pointerdown", ht), S.removeEventListener("touchstart", lt), document.removeEventListener("pointermove", K), document.removeEventListener("pointerup", Y), document.removeEventListener("pointercancel", Y), document.removeEventListener("touchmove", nt), document.removeEventListener("touchend", rt), document.removeEventListener("touchcancel", rt), A.current = null, z.current = !1;
|
|
3604
3604
|
};
|
|
3605
3605
|
}, [t, Ct, a]);
|
|
3606
3606
|
const zt = {
|
|
@@ -3615,8 +3615,8 @@ const Aa = ({ settings: t, content: e, styles: n, portalId: r, activeEvent: o, i
|
|
|
3615
3615
|
/* @__PURE__ */ x(
|
|
3616
3616
|
"div",
|
|
3617
3617
|
{
|
|
3618
|
-
ref: i ? null :
|
|
3619
|
-
className: yt(N.background, y ?
|
|
3618
|
+
ref: i ? null : w,
|
|
3619
|
+
className: yt(N.background, y ? et : ot, { [N.editor]: i }, { [N.hidden]: !t }),
|
|
3620
3620
|
style: {
|
|
3621
3621
|
...zt,
|
|
3622
3622
|
...u && !i && !y ? { position: "absolute" } : {}
|
|
@@ -3626,7 +3626,7 @@ const Aa = ({ settings: t, content: e, styles: n, portalId: r, activeEvent: o, i
|
|
|
3626
3626
|
/* @__PURE__ */ vt(
|
|
3627
3627
|
"div",
|
|
3628
3628
|
{
|
|
3629
|
-
ref: i ?
|
|
3629
|
+
ref: i ? w : null,
|
|
3630
3630
|
className: yt(N.contentStyle, y ? st : U, { [N.editor]: i }, { [N.hidden]: !t }),
|
|
3631
3631
|
style: {
|
|
3632
3632
|
animationDuration: `${parseInt(V.duration)}ms`,
|
|
@@ -3657,7 +3657,7 @@ const Aa = ({ settings: t, content: e, styles: n, portalId: r, activeEvent: o, i
|
|
|
3657
3657
|
},
|
|
3658
3658
|
style: { "--splide-speed": f.duration },
|
|
3659
3659
|
children: n.map((S, j) => {
|
|
3660
|
-
const X = Qe(O.position, O.offset, i), K = `${W(O.padding.top, i)} ${W(O.padding.right, i)} ${W(O.padding.bottom, i)} ${W(O.padding.left, i)}`,
|
|
3660
|
+
const X = Qe(O.position, O.offset, i), K = `${W(O.padding.top, i)} ${W(O.padding.right, i)} ${W(O.padding.bottom, i)} ${W(O.padding.left, i)}`, nt = f.type === "scale" ? (() => {
|
|
3661
3661
|
const { transform: J, ...Y } = X;
|
|
3662
3662
|
return {
|
|
3663
3663
|
...Y,
|
|
@@ -3678,7 +3678,7 @@ const Aa = ({ settings: t, content: e, styles: n, portalId: r, activeEvent: o, i
|
|
|
3678
3678
|
}),
|
|
3679
3679
|
src: S.image.url,
|
|
3680
3680
|
alt: S.image.name ?? "",
|
|
3681
|
-
style: { ...
|
|
3681
|
+
style: { ...nt, pointerEvents: S.image.objectFit === "contain" ? "none" : "auto" }
|
|
3682
3682
|
}
|
|
3683
3683
|
) }) }, j);
|
|
3684
3684
|
})
|
|
@@ -3754,7 +3754,7 @@ const Aa = ({ settings: t, content: e, styles: n, portalId: r, activeEvent: o, i
|
|
|
3754
3754
|
return /* @__PURE__ */ x("button", { className: N.closeButton, style: { ...S, transform: X }, onClick: q, "aria-label": "Close lightbox", children: /* @__PURE__ */ x($e, { url: E.closeIconUrl, fill: E.closeIconColor ?? "#000000", hoverFill: E.closeIconHover ?? "#cccccc" }) });
|
|
3755
3755
|
})(),
|
|
3756
3756
|
_ && _.isActive && r.imageCaption && ((M = n[s]) == null ? void 0 : M.imageCaption) && (() => {
|
|
3757
|
-
const { widthSettings: S, fontSettings: j, letterSpacing: X, textAlign: K, wordSpacing:
|
|
3757
|
+
const { widthSettings: S, fontSettings: j, letterSpacing: X, textAlign: K, wordSpacing: nt, fontSizeLineHeight: J, textAppearance: Y, color: rt } = r.imageCaption;
|
|
3758
3758
|
return /* @__PURE__ */ x(
|
|
3759
3759
|
"div",
|
|
3760
3760
|
{
|
|
@@ -3766,7 +3766,7 @@ const Aa = ({ settings: t, content: e, styles: n, portalId: r, activeEvent: o, i
|
|
|
3766
3766
|
fontStyle: j.fontStyle,
|
|
3767
3767
|
width: S.sizing === "auto" ? "max-content" : W(S.width, i),
|
|
3768
3768
|
letterSpacing: W(X, i),
|
|
3769
|
-
wordSpacing: W(
|
|
3769
|
+
wordSpacing: W(nt, i),
|
|
3770
3770
|
textAlign: K,
|
|
3771
3771
|
fontSize: W(J.fontSize, i),
|
|
3772
3772
|
lineHeight: W(J.lineHeight, i),
|
|
@@ -3792,7 +3792,7 @@ const Aa = ({ settings: t, content: e, styles: n, portalId: r, activeEvent: o, i
|
|
|
3792
3792
|
);
|
|
3793
3793
|
})(),
|
|
3794
3794
|
R.isActive && (() => {
|
|
3795
|
-
const [S, j] = R.position.split("-"), X = f.direction === "horiz" ? `${S}-left` : R.position, K = Qe(X, R.offset, i),
|
|
3795
|
+
const [S, j] = R.position.split("-"), X = f.direction === "horiz" ? `${S}-left` : R.position, K = Qe(X, R.offset, i), nt = () => {
|
|
3796
3796
|
if (f.direction === "horiz") {
|
|
3797
3797
|
if (j === "left") return "flex-start";
|
|
3798
3798
|
if (j === "center") return "center";
|
|
@@ -3835,7 +3835,7 @@ const Aa = ({ settings: t, content: e, styles: n, portalId: r, activeEvent: o, i
|
|
|
3835
3835
|
}),
|
|
3836
3836
|
style: {
|
|
3837
3837
|
gap: W(R.grid.gap, i),
|
|
3838
|
-
justifyContent: F ? "flex-start" :
|
|
3838
|
+
justifyContent: F ? "flex-start" : nt()
|
|
3839
3839
|
},
|
|
3840
3840
|
children: n.map((J, Y) => {
|
|
3841
3841
|
const rt = Y === s, ht = v[Y], gt = R.grid.size * (rt ? R.activeState.scale : 1), Lt = () => {
|
|
@@ -5157,7 +5157,7 @@ function ka({ settings: t, isEditor: e, metadata: n, activeEvent: r }) {
|
|
|
5157
5157
|
buttonLabel: s,
|
|
5158
5158
|
gap: p,
|
|
5159
5159
|
fieldsGap: a,
|
|
5160
|
-
buttonCorners:
|
|
5160
|
+
buttonCorners: C,
|
|
5161
5161
|
buttonStroke: y,
|
|
5162
5162
|
buttonPadding: d,
|
|
5163
5163
|
isButtonFullWidth: u,
|
|
@@ -5165,10 +5165,10 @@ function ka({ settings: t, isEditor: e, metadata: n, activeEvent: r }) {
|
|
|
5165
5165
|
inputStroke: v,
|
|
5166
5166
|
inputPadding: h,
|
|
5167
5167
|
inputColor: b,
|
|
5168
|
-
inputTextColor:
|
|
5168
|
+
inputTextColor: $,
|
|
5169
5169
|
inputBorderColor: H,
|
|
5170
5170
|
placeholderColor: B,
|
|
5171
|
-
buttonColor:
|
|
5171
|
+
buttonColor: w,
|
|
5172
5172
|
buttonTextColor: m,
|
|
5173
5173
|
buttonBorderColor: T,
|
|
5174
5174
|
labelTextColor: A,
|
|
@@ -5186,7 +5186,7 @@ function ka({ settings: t, isEditor: e, metadata: n, activeEvent: r }) {
|
|
|
5186
5186
|
buttonLineHeight: O,
|
|
5187
5187
|
buttonLetterSpacing: U,
|
|
5188
5188
|
buttonWordSpacing: ot,
|
|
5189
|
-
buttonTextAppearance:
|
|
5189
|
+
buttonTextAppearance: et,
|
|
5190
5190
|
labelFontSettings: st,
|
|
5191
5191
|
labelFontSize: k,
|
|
5192
5192
|
labelLineHeight: q,
|
|
@@ -5200,7 +5200,7 @@ function ka({ settings: t, isEditor: e, metadata: n, activeEvent: r }) {
|
|
|
5200
5200
|
statusWordSpacing: j,
|
|
5201
5201
|
statusTextAppearance: X,
|
|
5202
5202
|
successMessage: K,
|
|
5203
|
-
errorMessage:
|
|
5203
|
+
errorMessage: nt,
|
|
5204
5204
|
stateOverrides: J
|
|
5205
5205
|
} = t, Y = l === "B", rt = c.slice(0, Math.min(i, c.length)), ht = {
|
|
5206
5206
|
fontSettings: {
|
|
@@ -5213,12 +5213,12 @@ function ka({ settings: t, isEditor: e, metadata: n, activeEvent: r }) {
|
|
|
5213
5213
|
letterSpacing: f ?? 0,
|
|
5214
5214
|
wordSpacing: R ?? 0,
|
|
5215
5215
|
textAppearance: I,
|
|
5216
|
-
color:
|
|
5217
|
-
},
|
|
5216
|
+
color: $
|
|
5217
|
+
}, lt = ee(Yt(ht, e)), gt = W(v ?? 0, e), Lt = W(
|
|
5218
5218
|
(D ?? V ?? 0.01) + ((h == null ? void 0 : h.top) ?? 0) + ((h == null ? void 0 : h.bottom) ?? 0) + (l === "C" ? v ?? 0 : (v ?? 0) * 2),
|
|
5219
5219
|
e
|
|
5220
5220
|
), Z = {
|
|
5221
|
-
...
|
|
5221
|
+
...lt,
|
|
5222
5222
|
borderStyle: "solid",
|
|
5223
5223
|
borderRadius: l === "C" ? 0 : W(g ?? 0, e),
|
|
5224
5224
|
...l === "C" ? {
|
|
@@ -5243,7 +5243,7 @@ function ka({ settings: t, isEditor: e, metadata: n, activeEvent: r }) {
|
|
|
5243
5243
|
lineHeight: O,
|
|
5244
5244
|
letterSpacing: U ?? 0,
|
|
5245
5245
|
wordSpacing: ot ?? 0,
|
|
5246
|
-
textAppearance:
|
|
5246
|
+
textAppearance: et,
|
|
5247
5247
|
color: m
|
|
5248
5248
|
}, $t = ee(Yt(ut, e)), Nt = W(y ?? 0, e), Ie = {
|
|
5249
5249
|
fontSettings: {
|
|
@@ -5257,7 +5257,7 @@ function ka({ settings: t, isEditor: e, metadata: n, activeEvent: r }) {
|
|
|
5257
5257
|
wordSpacing: ct ?? 0,
|
|
5258
5258
|
textAppearance: dt,
|
|
5259
5259
|
color: A
|
|
5260
|
-
}, Zt = Yt(Ie, e),
|
|
5260
|
+
}, Zt = Yt(Ie, e), tt = {
|
|
5261
5261
|
fontSettings: {
|
|
5262
5262
|
fontFamily: F,
|
|
5263
5263
|
fontWeight: (Ct == null ? void 0 : Ct.fontWeight) ?? 400,
|
|
@@ -5269,33 +5269,33 @@ function ka({ settings: t, isEditor: e, metadata: n, activeEvent: r }) {
|
|
|
5269
5269
|
wordSpacing: j ?? 0,
|
|
5270
5270
|
textAppearance: X,
|
|
5271
5271
|
color: z
|
|
5272
|
-
}, At = ee(Yt(
|
|
5272
|
+
}, At = ee(Yt(tt, e)), It = Vn(o, {
|
|
5273
5273
|
inputColor: b,
|
|
5274
|
-
inputTextColor:
|
|
5274
|
+
inputTextColor: $,
|
|
5275
5275
|
inputBorderColor: H,
|
|
5276
5276
|
placeholderColor: B != null && B.trim() ? B : "#cccccc",
|
|
5277
|
-
buttonColor:
|
|
5277
|
+
buttonColor: w,
|
|
5278
5278
|
buttonTextColor: m,
|
|
5279
5279
|
buttonBorderColor: T,
|
|
5280
5280
|
labelTextColor: A,
|
|
5281
5281
|
successColor: z,
|
|
5282
5282
|
errorColor: L
|
|
5283
|
-
}, Ra, Oa, J), [
|
|
5283
|
+
}, Ra, Oa, J), [at, wt] = it(
|
|
5284
5284
|
() => Object.fromEntries(rt.map((pt) => [pt.name, ""]))
|
|
5285
|
-
), [qe, ae] = it("idle"), [$o, Ke] = it(null), _n = r === "success" ? "success" : r === "error" ? "error" : qe, wo = r === "error" ?
|
|
5286
|
-
if (!Je) return
|
|
5285
|
+
), [qe, ae] = it("idle"), [$o, Ke] = it(null), _n = r === "success" ? "success" : r === "error" ? "error" : qe, wo = r === "error" ? nt : $o, Je = r === "filled", Fe = Pr(() => {
|
|
5286
|
+
if (!Je) return at;
|
|
5287
5287
|
let pt = null;
|
|
5288
5288
|
for (const Dt of rt)
|
|
5289
|
-
(
|
|
5290
|
-
return pt ??
|
|
5291
|
-
}, [
|
|
5289
|
+
(at[Dt.name] ?? "").trim().length > 0 || (pt = pt ?? { ...at }, pt[Dt.name] = "Filled");
|
|
5290
|
+
return pt ?? at;
|
|
5291
|
+
}, [at, Je, rt]), _o = _n === "error" ? sn(rt, Fe) : null, To = `${r && r !== "default" ? `${o}-state-${r}` : ""}`.trim(), pr = n == null ? void 0 : n.submitUrl, dr = (pt, Dt) => {
|
|
5292
5292
|
wt((jt) => ({ ...jt, [pt]: Dt }));
|
|
5293
5293
|
}, Lo = async (pt) => {
|
|
5294
5294
|
pt.preventDefault();
|
|
5295
5295
|
const Dt = Object.fromEntries(
|
|
5296
5296
|
rt.map((Ot) => {
|
|
5297
5297
|
var he;
|
|
5298
|
-
return [Ot.name, ((he =
|
|
5298
|
+
return [Ot.name, ((he = at[Ot.name]) == null ? void 0 : he.trim()) ?? ""];
|
|
5299
5299
|
}).filter(([, Ot]) => Ot)
|
|
5300
5300
|
);
|
|
5301
5301
|
if (!pr) {
|
|
@@ -5303,7 +5303,7 @@ function ka({ settings: t, isEditor: e, metadata: n, activeEvent: r }) {
|
|
|
5303
5303
|
return;
|
|
5304
5304
|
}
|
|
5305
5305
|
if (Object.keys(Dt).length === 0) return;
|
|
5306
|
-
const jt = sn(rt,
|
|
5306
|
+
const jt = sn(rt, at);
|
|
5307
5307
|
if (jt) {
|
|
5308
5308
|
ae("error"), Ke(jt);
|
|
5309
5309
|
return;
|
|
@@ -5379,7 +5379,7 @@ function ka({ settings: t, isEditor: e, metadata: n, activeEvent: r }) {
|
|
|
5379
5379
|
className: `${o}-button`,
|
|
5380
5380
|
style: {
|
|
5381
5381
|
borderStyle: "solid",
|
|
5382
|
-
borderRadius: W(
|
|
5382
|
+
borderRadius: W(C ?? 0, e),
|
|
5383
5383
|
borderWidth: Nt,
|
|
5384
5384
|
paddingTop: W((d == null ? void 0 : d.top) ?? 0, e),
|
|
5385
5385
|
paddingRight: W((d == null ? void 0 : d.right) ?? 0, e),
|
|
@@ -5424,7 +5424,7 @@ function ka({ settings: t, isEditor: e, metadata: n, activeEvent: r }) {
|
|
|
5424
5424
|
className: `${o}-error`,
|
|
5425
5425
|
style: { ...At },
|
|
5426
5426
|
role: "alert",
|
|
5427
|
-
children: _o ?? wo ??
|
|
5427
|
+
children: _o ?? wo ?? nt
|
|
5428
5428
|
}
|
|
5429
5429
|
)
|
|
5430
5430
|
] });
|
|
@@ -6887,7 +6887,7 @@ const Ha = ({ settings: t, isEditor: e, metadata: n, activeEvent: r }) => {
|
|
|
6887
6887
|
fieldsToShow: s = 1,
|
|
6888
6888
|
fontFamily: p,
|
|
6889
6889
|
inputFontSettings: a,
|
|
6890
|
-
inputFontSize:
|
|
6890
|
+
inputFontSize: C,
|
|
6891
6891
|
inputLineHeight: y,
|
|
6892
6892
|
inputLetterSpacing: d,
|
|
6893
6893
|
inputWordSpacing: u,
|
|
@@ -6895,10 +6895,10 @@ const Ha = ({ settings: t, isEditor: e, metadata: n, activeEvent: r }) => {
|
|
|
6895
6895
|
buttonFontSettings: v,
|
|
6896
6896
|
buttonFontSize: h,
|
|
6897
6897
|
buttonLineHeight: b,
|
|
6898
|
-
buttonLetterSpacing:
|
|
6898
|
+
buttonLetterSpacing: $,
|
|
6899
6899
|
buttonWordSpacing: H,
|
|
6900
6900
|
buttonTextAppearance: B,
|
|
6901
|
-
statusFontSettings:
|
|
6901
|
+
statusFontSettings: w,
|
|
6902
6902
|
statusFontSize: m,
|
|
6903
6903
|
statusLineHeight: T,
|
|
6904
6904
|
statusLetterSpacing: A,
|
|
@@ -6914,26 +6914,26 @@ const Ha = ({ settings: t, isEditor: e, metadata: n, activeEvent: r }) => {
|
|
|
6914
6914
|
successMessage: E = "Thanks for subscribing!",
|
|
6915
6915
|
errorMessage: _ = "Please, fill all required fields."
|
|
6916
6916
|
} = t, O = l.slice(0, Math.min(s, l.length)), [U, ot] = it(
|
|
6917
|
-
() => Object.fromEntries(O.map((
|
|
6918
|
-
), [
|
|
6917
|
+
() => Object.fromEntries(O.map((tt) => [tt.name, ""]))
|
|
6918
|
+
), [et, st] = it("idle"), [k, q] = it(null), ft = r === "success" ? "success" : r === "error" ? "error" : et, ct = r === "error" ? _ : k, dt = r === "filled", Ct = Pr(() => {
|
|
6919
6919
|
if (!dt) return U;
|
|
6920
|
-
let
|
|
6920
|
+
let tt = null;
|
|
6921
6921
|
for (const At of O)
|
|
6922
|
-
(U[At.name] ?? "").trim().length > 0 || (
|
|
6923
|
-
return
|
|
6924
|
-
}, [dt, U, O]), zt = ft === "error" ? sn(O, Ct) : null, M = r && r !== "default" ? `${o}-state-${r}` : "", S = O.some((
|
|
6922
|
+
(U[At.name] ?? "").trim().length > 0 || (tt = tt ?? { ...U }, tt[At.name] = "Filled");
|
|
6923
|
+
return tt ?? U;
|
|
6924
|
+
}, [dt, U, O]), zt = ft === "error" ? sn(O, Ct) : null, M = r && r !== "default" ? `${o}-state-${r}` : "", S = O.some((tt) => (Ct[tt.name] ?? "").trim().length > 0), j = M !== `${o}-state-filled` && S ? `${o}-state-filled` : "", X = `${M} ${j}`.trim(), K = n == null ? void 0 : n.submitUrl, nt = c ?? "", J = (i == null ? void 0 : i.icon) ?? "", Y = (i == null ? void 0 : i.mode) === "On", rt = nt || "Submit", ht = {
|
|
6925
6925
|
fontSettings: {
|
|
6926
6926
|
fontFamily: p,
|
|
6927
6927
|
fontWeight: (a == null ? void 0 : a.fontWeight) ?? 400,
|
|
6928
6928
|
fontStyle: (a == null ? void 0 : a.fontStyle) ?? "normal"
|
|
6929
6929
|
},
|
|
6930
|
-
fontSize:
|
|
6930
|
+
fontSize: C ?? 0.01,
|
|
6931
6931
|
lineHeight: y,
|
|
6932
6932
|
letterSpacing: d ?? 0,
|
|
6933
6933
|
wordSpacing: u ?? 0,
|
|
6934
6934
|
textAppearance: g,
|
|
6935
6935
|
color: t.inputTextColor ?? "#111111"
|
|
6936
|
-
},
|
|
6936
|
+
}, lt = {
|
|
6937
6937
|
fontSettings: {
|
|
6938
6938
|
fontFamily: p,
|
|
6939
6939
|
fontWeight: (v == null ? void 0 : v.fontWeight) ?? 400,
|
|
@@ -6941,15 +6941,15 @@ const Ha = ({ settings: t, isEditor: e, metadata: n, activeEvent: r }) => {
|
|
|
6941
6941
|
},
|
|
6942
6942
|
fontSize: h ?? 0.01,
|
|
6943
6943
|
lineHeight: b,
|
|
6944
|
-
letterSpacing:
|
|
6944
|
+
letterSpacing: $ ?? 0,
|
|
6945
6945
|
wordSpacing: H ?? 0,
|
|
6946
6946
|
textAppearance: B,
|
|
6947
6947
|
color: t.buttonTextColor ?? "#ffffff"
|
|
6948
6948
|
}, gt = {
|
|
6949
6949
|
fontSettings: {
|
|
6950
6950
|
fontFamily: p,
|
|
6951
|
-
fontWeight: (
|
|
6952
|
-
fontStyle: (
|
|
6951
|
+
fontWeight: (w == null ? void 0 : w.fontWeight) ?? 400,
|
|
6952
|
+
fontStyle: (w == null ? void 0 : w.fontStyle) ?? "normal"
|
|
6953
6953
|
},
|
|
6954
6954
|
fontSize: m ?? 0.01,
|
|
6955
6955
|
lineHeight: T,
|
|
@@ -6957,7 +6957,7 @@ const Ha = ({ settings: t, isEditor: e, metadata: n, activeEvent: r }) => {
|
|
|
6957
6957
|
wordSpacing: z ?? 0,
|
|
6958
6958
|
textAppearance: L,
|
|
6959
6959
|
color: t.successColor ?? "#22c55e"
|
|
6960
|
-
}, Lt = ee(Yt(ht, e)), Z = ee(Yt(
|
|
6960
|
+
}, Lt = ee(Yt(ht, e)), Z = ee(Yt(lt, e)), ut = ee(Yt(gt, e)), $t = Vn(o, {
|
|
6961
6961
|
strokeColor: t.strokeColor,
|
|
6962
6962
|
inputColor: t.inputColor,
|
|
6963
6963
|
placeholderColor: t.placeholderColor,
|
|
@@ -6965,18 +6965,18 @@ const Ha = ({ settings: t, isEditor: e, metadata: n, activeEvent: r }) => {
|
|
|
6965
6965
|
successColor: t.successColor,
|
|
6966
6966
|
errorColor: t.errorColor,
|
|
6967
6967
|
inputTextColor: t.inputTextColor ?? (ht == null ? void 0 : ht.color) ?? "#111111",
|
|
6968
|
-
buttonTextColor: t.buttonTextColor ?? (
|
|
6968
|
+
buttonTextColor: t.buttonTextColor ?? (lt == null ? void 0 : lt.color) ?? "#ffffff"
|
|
6969
6969
|
}, Va, Da, f), Nt = {
|
|
6970
6970
|
borderRadius: W(V, e),
|
|
6971
6971
|
borderWidth: W(D, e),
|
|
6972
6972
|
borderStyle: "solid"
|
|
6973
|
-
}, Ie = { borderLeftWidth: W(D, e) }, Zt = async (
|
|
6974
|
-
|
|
6973
|
+
}, Ie = { borderLeftWidth: W(D, e) }, Zt = async (tt) => {
|
|
6974
|
+
tt.preventDefault();
|
|
6975
6975
|
const At = Object.fromEntries(
|
|
6976
|
-
O.map((
|
|
6976
|
+
O.map((at) => {
|
|
6977
6977
|
var wt;
|
|
6978
|
-
return [
|
|
6979
|
-
}).filter(([,
|
|
6978
|
+
return [at.name, ((wt = U[at.name]) == null ? void 0 : wt.trim()) ?? ""];
|
|
6979
|
+
}).filter(([, at]) => at)
|
|
6980
6980
|
);
|
|
6981
6981
|
if (!K) {
|
|
6982
6982
|
st("error"), q("No integrations were found for this form.");
|
|
@@ -6990,18 +6990,18 @@ const Ha = ({ settings: t, isEditor: e, metadata: n, activeEvent: r }) => {
|
|
|
6990
6990
|
}
|
|
6991
6991
|
st("submitting"), q(null);
|
|
6992
6992
|
try {
|
|
6993
|
-
const
|
|
6993
|
+
const at = await fetch(K, {
|
|
6994
6994
|
method: "POST",
|
|
6995
6995
|
headers: { "Content-Type": "application/json" },
|
|
6996
6996
|
body: JSON.stringify(At)
|
|
6997
6997
|
});
|
|
6998
|
-
if (!
|
|
6999
|
-
const wt = await
|
|
7000
|
-
throw new Error(wt || `Request failed: ${
|
|
6998
|
+
if (!at.ok) {
|
|
6999
|
+
const wt = await at.text();
|
|
7000
|
+
throw new Error(wt || `Request failed: ${at.status}`);
|
|
7001
7001
|
}
|
|
7002
7002
|
st("success"), ot(Object.fromEntries(O.map((wt) => [wt.name, ""])));
|
|
7003
|
-
} catch (
|
|
7004
|
-
st("error"), q(
|
|
7003
|
+
} catch (at) {
|
|
7004
|
+
st("error"), q(at instanceof Error ? at.message : "Something went wrong");
|
|
7005
7005
|
}
|
|
7006
7006
|
};
|
|
7007
7007
|
return /* @__PURE__ */ vt("div", { className: `${o}-wrapper ${X}`.trim(), style: $t, children: [
|
|
@@ -7022,16 +7022,16 @@ const Ha = ({ settings: t, isEditor: e, metadata: n, activeEvent: r }) => {
|
|
|
7022
7022
|
{
|
|
7023
7023
|
className: `${o}-inputWrap ${o}-overlayAnchor`,
|
|
7024
7024
|
style: { flex: 1, minWidth: 0 },
|
|
7025
|
-
children: O.map((
|
|
7025
|
+
children: O.map((tt) => /* @__PURE__ */ x(
|
|
7026
7026
|
"input",
|
|
7027
7027
|
{
|
|
7028
|
-
type:
|
|
7029
|
-
name:
|
|
7028
|
+
type: tt.type === "email" ? "email" : tt.type === "phone" ? "tel" : "text",
|
|
7029
|
+
name: tt.name,
|
|
7030
7030
|
autoComplete: "off",
|
|
7031
|
-
value: Ct[
|
|
7032
|
-
onChange: (At) => ot((It) => ({ ...It, [
|
|
7033
|
-
placeholder:
|
|
7034
|
-
required:
|
|
7031
|
+
value: Ct[tt.name] ?? "",
|
|
7032
|
+
onChange: (At) => ot((It) => ({ ...It, [tt.name]: At.target.value })),
|
|
7033
|
+
placeholder: tt.placeholder,
|
|
7034
|
+
required: tt.isRequired ?? tt.type === "email",
|
|
7035
7035
|
className: `${o}-input`,
|
|
7036
7036
|
style: {
|
|
7037
7037
|
...Lt,
|
|
@@ -7041,7 +7041,7 @@ const Ha = ({ settings: t, isEditor: e, metadata: n, activeEvent: r }) => {
|
|
|
7041
7041
|
paddingBottom: W(R.bottom, e)
|
|
7042
7042
|
}
|
|
7043
7043
|
},
|
|
7044
|
-
|
|
7044
|
+
tt.name
|
|
7045
7045
|
))
|
|
7046
7046
|
}
|
|
7047
7047
|
),
|
|
@@ -7059,7 +7059,7 @@ const Ha = ({ settings: t, isEditor: e, metadata: n, activeEvent: r }) => {
|
|
|
7059
7059
|
paddingTop: W(I.top, e),
|
|
7060
7060
|
paddingBottom: W(I.bottom, e)
|
|
7061
7061
|
},
|
|
7062
|
-
children:
|
|
7062
|
+
children: et === "submitting" ? "..." : Y ? J && /* @__PURE__ */ x(
|
|
7063
7063
|
$e,
|
|
7064
7064
|
{
|
|
7065
7065
|
url: J,
|
|
@@ -7068,7 +7068,7 @@ const Ha = ({ settings: t, isEditor: e, metadata: n, activeEvent: r }) => {
|
|
|
7068
7068
|
fill: `var(--${o}-button-text-color)`,
|
|
7069
7069
|
hoverFill: `var(--${o}-button-text-color)`
|
|
7070
7070
|
}
|
|
7071
|
-
) :
|
|
7071
|
+
) : nt
|
|
7072
7072
|
}
|
|
7073
7073
|
) })
|
|
7074
7074
|
]
|
|
@@ -8188,17 +8188,20 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;\r
|
|
|
8188
8188
|
schema: Ya,
|
|
8189
8189
|
sourceCode: ja
|
|
8190
8190
|
};
|
|
8191
|
-
function Ka(
|
|
8192
|
-
return
|
|
8191
|
+
function Ka() {
|
|
8192
|
+
return window.navigator.platform === "Win32" || window.navigator.platform === "Win64" ? '"InputMono-Regular", monospace' : '"DepartureMono-Regular", monospace';
|
|
8193
8193
|
}
|
|
8194
8194
|
function Ja(t) {
|
|
8195
|
+
return `calc(var(--cntrl-article-width, 100vw) * ${t / 1440})`;
|
|
8196
|
+
}
|
|
8197
|
+
function Za(t) {
|
|
8195
8198
|
return `
|
|
8196
8199
|
.${t}-wrapper {
|
|
8197
8200
|
display: grid;
|
|
8198
8201
|
align-items: start;
|
|
8199
8202
|
width: 100%;
|
|
8200
8203
|
column-gap: 10%;
|
|
8201
|
-
min-height: ${
|
|
8204
|
+
min-height: ${Ja(48)};
|
|
8202
8205
|
}
|
|
8203
8206
|
.${t}-item {
|
|
8204
8207
|
display: flex;
|
|
@@ -8250,23 +8253,23 @@ function Ja(t) {
|
|
|
8250
8253
|
`;
|
|
8251
8254
|
}
|
|
8252
8255
|
const Qt = 500, ce = "cubic-bezier(0.22, 1, 0.36, 1)";
|
|
8253
|
-
function
|
|
8254
|
-
const s = _t(null), p = _t(null), [a,
|
|
8256
|
+
function Qa({ images: t, index: e, imageDisplay: n, originRect: r, reverseClose: o, onClose: l, onPrev: i, onNext: c }) {
|
|
8257
|
+
const s = _t(null), p = _t(null), [a, C] = it(null), [y, d] = it(r ? "opening" : "open"), [u, g] = it(!0), v = _t(e), h = Br(() => {
|
|
8255
8258
|
const m = s.current, T = p.current;
|
|
8256
8259
|
if (!m || !T) return;
|
|
8257
8260
|
const A = m.getBoundingClientRect(), z = A.width, L = A.height, F = T.naturalWidth, P = T.naturalHeight;
|
|
8258
8261
|
if (!z || !L || !F || !P) return;
|
|
8259
8262
|
if (n === "Cover") {
|
|
8260
|
-
|
|
8263
|
+
C({ width: z, height: L, left: A.left, top: A.top });
|
|
8261
8264
|
return;
|
|
8262
8265
|
}
|
|
8263
8266
|
const V = F / P, D = z / L;
|
|
8264
8267
|
if (V > D) {
|
|
8265
8268
|
const f = z / V;
|
|
8266
|
-
|
|
8269
|
+
C({ width: z, height: f, left: A.left, top: A.top + (L - f) / 2 });
|
|
8267
8270
|
} else {
|
|
8268
8271
|
const f = L * V;
|
|
8269
|
-
|
|
8272
|
+
C({ width: f, height: L, left: A.left + (z - f) / 2, top: A.top });
|
|
8270
8273
|
}
|
|
8271
8274
|
}, [n]);
|
|
8272
8275
|
St(() => {
|
|
@@ -8290,7 +8293,7 @@ function Za({ images: t, index: e, imageDisplay: n, originRect: r, reverseClose:
|
|
|
8290
8293
|
}, [e]);
|
|
8291
8294
|
const b = () => {
|
|
8292
8295
|
y !== "closing" && d("closing");
|
|
8293
|
-
},
|
|
8296
|
+
}, $ = y === "open", H = y === "closing", B = H && o && !!r, w = y === "opening" ? r ?? a : B ? r : a;
|
|
8294
8297
|
return /* @__PURE__ */ vt(
|
|
8295
8298
|
"div",
|
|
8296
8299
|
{
|
|
@@ -8311,7 +8314,7 @@ function Za({ images: t, index: e, imageDisplay: n, originRect: r, reverseClose:
|
|
|
8311
8314
|
position: "absolute",
|
|
8312
8315
|
inset: 0,
|
|
8313
8316
|
background: "rgba(28,31,34,0.9)",
|
|
8314
|
-
opacity:
|
|
8317
|
+
opacity: $ ? 1 : 0,
|
|
8315
8318
|
transition: `opacity ${Qt}ms ${ce}`,
|
|
8316
8319
|
pointerEvents: "none"
|
|
8317
8320
|
}
|
|
@@ -8356,8 +8359,9 @@ function Za({ images: t, index: e, imageDisplay: n, originRect: r, reverseClose:
|
|
|
8356
8359
|
color: "#E6E6E6",
|
|
8357
8360
|
letterSpacing: "-0.6px",
|
|
8358
8361
|
lineHeight: "16px",
|
|
8359
|
-
opacity:
|
|
8360
|
-
transition: `opacity ${Qt}ms ${ce}
|
|
8362
|
+
opacity: $ ? 1 : 0,
|
|
8363
|
+
transition: `opacity ${Qt}ms ${ce}`,
|
|
8364
|
+
fontFamily: Ka()
|
|
8361
8365
|
},
|
|
8362
8366
|
children: [
|
|
8363
8367
|
/* @__PURE__ */ x("p", { children: e + 1 }),
|
|
@@ -8369,7 +8373,7 @@ function Za({ images: t, index: e, imageDisplay: n, originRect: r, reverseClose:
|
|
|
8369
8373
|
]
|
|
8370
8374
|
}
|
|
8371
8375
|
),
|
|
8372
|
-
|
|
8376
|
+
w && /* @__PURE__ */ x(
|
|
8373
8377
|
"img",
|
|
8374
8378
|
{
|
|
8375
8379
|
ref: p,
|
|
@@ -8377,10 +8381,10 @@ function Za({ images: t, index: e, imageDisplay: n, originRect: r, reverseClose:
|
|
|
8377
8381
|
onLoad: h,
|
|
8378
8382
|
style: {
|
|
8379
8383
|
position: "fixed",
|
|
8380
|
-
top:
|
|
8381
|
-
left:
|
|
8382
|
-
width:
|
|
8383
|
-
height:
|
|
8384
|
+
top: w.top,
|
|
8385
|
+
left: w.left,
|
|
8386
|
+
width: w.width,
|
|
8387
|
+
height: w.height,
|
|
8384
8388
|
objectFit: n === "Cover" ? "cover" : "contain",
|
|
8385
8389
|
opacity: H && !B ? 0 : 1,
|
|
8386
8390
|
transition: H && !B ? `opacity ${Qt}ms ${ce}` : B || u ? `top ${Qt}ms ${ce}, left ${Qt}ms ${ce}, width ${Qt}ms ${ce}, height ${Qt}ms ${ce}` : "none",
|
|
@@ -8389,7 +8393,7 @@ function Za({ images: t, index: e, imageDisplay: n, originRect: r, reverseClose:
|
|
|
8389
8393
|
}
|
|
8390
8394
|
}
|
|
8391
8395
|
),
|
|
8392
|
-
|
|
8396
|
+
$ && a && /* @__PURE__ */ vt(de, { children: [
|
|
8393
8397
|
/* @__PURE__ */ x(
|
|
8394
8398
|
"div",
|
|
8395
8399
|
{
|
|
@@ -8429,14 +8433,14 @@ function Za({ images: t, index: e, imageDisplay: n, originRect: r, reverseClose:
|
|
|
8429
8433
|
}
|
|
8430
8434
|
);
|
|
8431
8435
|
}
|
|
8432
|
-
function
|
|
8436
|
+
function ts({ settings: t, content: e, isEditor: n, metadata: r, activeEvent: o }) {
|
|
8433
8437
|
const { prefix: l } = Hn(), {
|
|
8434
8438
|
type: i = "A",
|
|
8435
8439
|
fieldsToShow: c = 2,
|
|
8436
8440
|
textBoxWidth: s,
|
|
8437
8441
|
verticalGap: p,
|
|
8438
8442
|
entriesCount: a,
|
|
8439
|
-
lightbox:
|
|
8443
|
+
lightbox: C,
|
|
8440
8444
|
imageSize: y,
|
|
8441
8445
|
imageDisplay: d,
|
|
8442
8446
|
slider: u,
|
|
@@ -8444,10 +8448,10 @@ function Qa({ settings: t, content: e, isEditor: n, metadata: r, activeEvent: o
|
|
|
8444
8448
|
direction: v,
|
|
8445
8449
|
transition: h,
|
|
8446
8450
|
titleColor: b,
|
|
8447
|
-
subtitleColor:
|
|
8451
|
+
subtitleColor: $,
|
|
8448
8452
|
titleFontFamily: H,
|
|
8449
8453
|
titleFontSettings: B,
|
|
8450
|
-
titleFontSize:
|
|
8454
|
+
titleFontSize: w,
|
|
8451
8455
|
titleLineHeight: m,
|
|
8452
8456
|
titleLetterSpacing: T,
|
|
8453
8457
|
titleWordSpacing: A,
|
|
@@ -8465,7 +8469,7 @@ function Qa({ settings: t, content: e, isEditor: n, metadata: r, activeEvent: o
|
|
|
8465
8469
|
fontWeight: (B == null ? void 0 : B.fontWeight) ?? 400,
|
|
8466
8470
|
fontStyle: (B == null ? void 0 : B.fontStyle) ?? "normal"
|
|
8467
8471
|
},
|
|
8468
|
-
fontSize:
|
|
8472
|
+
fontSize: w ?? 0.01,
|
|
8469
8473
|
lineHeight: m,
|
|
8470
8474
|
letterSpacing: T ?? 0,
|
|
8471
8475
|
wordSpacing: A ?? 0,
|
|
@@ -8484,31 +8488,37 @@ function Qa({ settings: t, content: e, isEditor: n, metadata: r, activeEvent: o
|
|
|
8484
8488
|
letterSpacing: D ?? 0,
|
|
8485
8489
|
wordSpacing: f ?? 0,
|
|
8486
8490
|
textAppearance: R,
|
|
8487
|
-
color:
|
|
8491
|
+
color: $
|
|
8488
8492
|
}, ot = {
|
|
8489
8493
|
...ee(Yt(O, n))
|
|
8490
|
-
},
|
|
8494
|
+
}, et = Vn(l, {
|
|
8491
8495
|
titleColor: b,
|
|
8492
|
-
subtitleColor:
|
|
8493
|
-
},
|
|
8496
|
+
subtitleColor: $
|
|
8497
|
+
}, es, ns), k = `${o && o !== "default" ? `${l}-state-${o}` : ""}`.trim(), q = a === 0 ? 1 / 0 : a, ft = (e ?? []).slice(0, q), dt = {
|
|
8494
8498
|
Small: 0.1,
|
|
8495
8499
|
Medium: 0.2,
|
|
8496
8500
|
Big: 0.3
|
|
8497
|
-
}[y] ?? 0.2, Ct = (d == null ? void 0 : d.display) === "Cover", zt = (d == null ? void 0 : d.ratioValue) ?? "1:1", M = (d == null ? void 0 : d.reversed) ?? !1, [S, j] = zt.split(":").map(Number), X = M ? j : S, K = M ? S : j,
|
|
8501
|
+
}[y] ?? 0.2, Ct = (d == null ? void 0 : d.display) === "Cover", zt = (d == null ? void 0 : d.ratioValue) ?? "1:1", M = (d == null ? void 0 : d.reversed) ?? !1, [S, j] = zt.split(":").map(Number), X = M ? j : S, K = M ? S : j, nt = `${X} / ${K}`, J = X >= K, Y = {
|
|
8498
8502
|
objectFit: Ct ? "cover" : "contain",
|
|
8499
8503
|
...Ct && {
|
|
8500
|
-
aspectRatio:
|
|
8504
|
+
aspectRatio: nt,
|
|
8501
8505
|
width: J ? "100%" : "auto",
|
|
8502
8506
|
height: J ? "auto" : "100%"
|
|
8503
8507
|
}
|
|
8504
|
-
}, [rt, ht] = it("ltr"), [
|
|
8505
|
-
if (
|
|
8506
|
-
const
|
|
8507
|
-
Ie({ top:
|
|
8508
|
+
}, [rt, ht] = it("ltr"), [lt, gt] = it(!1), [Lt, Z] = it([]), [ut, $t] = it(0), [Nt, Ie] = it(null), Zt = (tt, At, It) => {
|
|
8509
|
+
if (C === "Off") return;
|
|
8510
|
+
const at = tt.currentTarget.getBoundingClientRect();
|
|
8511
|
+
Ie({ top: at.top, left: at.left, width: at.width, height: at.height }), Z(At), $t(It), gt(!0);
|
|
8508
8512
|
};
|
|
8509
|
-
return
|
|
8510
|
-
|
|
8511
|
-
|
|
8513
|
+
return St(() => {
|
|
8514
|
+
if (!lt || C !== "On" || typeof document > "u") return;
|
|
8515
|
+
const tt = document.body.style.overflow;
|
|
8516
|
+
return document.body.style.overflow = "hidden", () => {
|
|
8517
|
+
document.body.style.overflow = tt;
|
|
8518
|
+
};
|
|
8519
|
+
}, [lt, C]), /* @__PURE__ */ vt(de, { children: [
|
|
8520
|
+
/* @__PURE__ */ x("style", { dangerouslySetInnerHTML: { __html: Za(l) } }),
|
|
8521
|
+
/* @__PURE__ */ x("div", { style: et, children: /* @__PURE__ */ x(
|
|
8512
8522
|
"div",
|
|
8513
8523
|
{
|
|
8514
8524
|
className: `${l}-wrapper ${l}-type-${i} ${k}`.trim(),
|
|
@@ -8516,21 +8526,21 @@ function Qa({ settings: t, content: e, isEditor: n, metadata: r, activeEvent: o
|
|
|
8516
8526
|
gridTemplateColumns: `repeat(${c}, 1fr)`,
|
|
8517
8527
|
rowGap: W(p ?? 0, n)
|
|
8518
8528
|
},
|
|
8519
|
-
children: ft.map((
|
|
8529
|
+
children: ft.map((tt, At) => {
|
|
8520
8530
|
var It;
|
|
8521
8531
|
return /* @__PURE__ */ vt(
|
|
8522
8532
|
"div",
|
|
8523
8533
|
{
|
|
8524
8534
|
className: `${l}-item`.trim(),
|
|
8525
8535
|
children: [
|
|
8526
|
-
/* @__PURE__ */ x("div", { className: `${l}-item-image-wrapper`, style: { width: W(dt ?? 0, n), height: W(dt ?? 0, n) }, children: (((It =
|
|
8536
|
+
/* @__PURE__ */ x("div", { className: `${l}-item-image-wrapper`, style: { width: W(dt ?? 0, n), height: W(dt ?? 0, n) }, children: (((It = tt.image) == null ? void 0 : It.length) ?? 0) === 0 ? null : u === "Off" ? /* @__PURE__ */ x(
|
|
8527
8537
|
"img",
|
|
8528
8538
|
{
|
|
8529
|
-
src:
|
|
8530
|
-
alt:
|
|
8539
|
+
src: tt.image[0].url,
|
|
8540
|
+
alt: tt.image[0].name,
|
|
8531
8541
|
className: `${l}-item-image`.trim(),
|
|
8532
8542
|
style: Y,
|
|
8533
|
-
onClick: (
|
|
8543
|
+
onClick: (at) => Zt(at, tt.image.map((wt) => wt.url), 0)
|
|
8534
8544
|
}
|
|
8535
8545
|
) : /* @__PURE__ */ x(
|
|
8536
8546
|
cr,
|
|
@@ -8552,28 +8562,28 @@ function Qa({ settings: t, content: e, isEditor: n, metadata: r, activeEvent: o
|
|
|
8552
8562
|
pauseOnFocus: !1,
|
|
8553
8563
|
direction: h === "Fade" ? "ltr" : v !== "Random" ? v === "Horizontal" ? "ltr" : "ttb" : rt
|
|
8554
8564
|
},
|
|
8555
|
-
onMoved: (
|
|
8565
|
+
onMoved: (at) => {
|
|
8556
8566
|
if (v !== "Random" || h === "Fade") return;
|
|
8557
8567
|
const wt = Math.random() > 0.5 ? Math.random() > 0.5 ? "rtl" : "ltr" : Math.random() > 0.5 ? "btt" : "ttb";
|
|
8558
8568
|
ht(wt), setTimeout(() => {
|
|
8559
|
-
|
|
8569
|
+
at.refresh();
|
|
8560
8570
|
}, 0);
|
|
8561
8571
|
},
|
|
8562
|
-
children:
|
|
8572
|
+
children: tt.image.map((at, wt) => /* @__PURE__ */ x(ur, { children: /* @__PURE__ */ x(
|
|
8563
8573
|
"img",
|
|
8564
8574
|
{
|
|
8565
|
-
src:
|
|
8566
|
-
alt:
|
|
8575
|
+
src: at.url,
|
|
8576
|
+
alt: at.name,
|
|
8567
8577
|
className: `${l}-item-image`.trim(),
|
|
8568
8578
|
style: Y,
|
|
8569
|
-
onClick: (qe) => Zt(qe,
|
|
8579
|
+
onClick: (qe) => Zt(qe, tt.image.map((ae) => ae.url), wt)
|
|
8570
8580
|
}
|
|
8571
8581
|
) }, wt))
|
|
8572
8582
|
},
|
|
8573
8583
|
`${h}-${y}-${v}-${g}`
|
|
8574
8584
|
) }),
|
|
8575
|
-
/* @__PURE__ */ x("p", { className: `${l}-item-title`.trim(), style: { width: `calc(${W(dt ?? 0, n)} * (${s} / 100))`, ..._ }, children:
|
|
8576
|
-
i === "B" && /* @__PURE__ */ x("p", { className: `${l}-item-subtitle`.trim(), style: { width: `calc(${W(dt ?? 0, n)} * (${s} / 100))`, ...ot }, children:
|
|
8585
|
+
/* @__PURE__ */ x("p", { className: `${l}-item-title`.trim(), style: { width: `calc(${W(dt ?? 0, n)} * (${s} / 100))`, ..._ }, children: tt.title }),
|
|
8586
|
+
i === "B" && /* @__PURE__ */ x("p", { className: `${l}-item-subtitle`.trim(), style: { width: `calc(${W(dt ?? 0, n)} * (${s} / 100))`, ...ot }, children: tt.subtitle })
|
|
8577
8587
|
]
|
|
8578
8588
|
},
|
|
8579
8589
|
At
|
|
@@ -8581,9 +8591,9 @@ function Qa({ settings: t, content: e, isEditor: n, metadata: r, activeEvent: o
|
|
|
8581
8591
|
})
|
|
8582
8592
|
}
|
|
8583
8593
|
) }),
|
|
8584
|
-
|
|
8594
|
+
lt && typeof document && document.getElementById("grid-component-lightbox-portal") && C === "On" && Wr(
|
|
8585
8595
|
/* @__PURE__ */ x("div", { "data-selection": "none", children: /* @__PURE__ */ x(
|
|
8586
|
-
|
|
8596
|
+
Qa,
|
|
8587
8597
|
{
|
|
8588
8598
|
images: Lt,
|
|
8589
8599
|
index: ut,
|
|
@@ -8591,24 +8601,25 @@ function Qa({ settings: t, content: e, isEditor: n, metadata: r, activeEvent: o
|
|
|
8591
8601
|
originRect: Nt,
|
|
8592
8602
|
reverseClose: u === "Off",
|
|
8593
8603
|
onClose: () => gt(!1),
|
|
8594
|
-
onPrev: () => $t((
|
|
8595
|
-
onNext: () => $t((
|
|
8604
|
+
onPrev: () => $t((tt) => (tt - 1 + Lt.length) % Lt.length),
|
|
8605
|
+
onNext: () => $t((tt) => (tt + 1) % Lt.length)
|
|
8596
8606
|
}
|
|
8597
8607
|
) }),
|
|
8598
8608
|
document.body
|
|
8599
8609
|
)
|
|
8600
8610
|
] });
|
|
8601
8611
|
}
|
|
8602
|
-
const
|
|
8612
|
+
const es = {
|
|
8603
8613
|
titleColor: "title-color",
|
|
8604
8614
|
subtitleColor: "subtitle-color"
|
|
8605
|
-
},
|
|
8615
|
+
}, ns = ["hover", "focus", "filled", "success", "error"], rs = `import { Splide, SplideSlide } from '@splidejs/react-splide';
|
|
8606
8616
|
import '@splidejs/react-splide/css/core';
|
|
8607
8617
|
import { CommonComponentProps } from '../props';
|
|
8608
8618
|
import { buildColorVars, getFormFieldValidationError, scalingValue, useScopedStyles } from '../utils/index';
|
|
8609
8619
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
8610
8620
|
import { createPortal } from 'react-dom';
|
|
8611
8621
|
import { omitTextColors, TextStyles, textStylesToCss } from '../utils/textStylesToCss';
|
|
8622
|
+
import { getFontBasedOnSystem } from '../utils/getMainFontBaseOnSystem';
|
|
8612
8623
|
|
|
8613
8624
|
function sv(px: number): string {
|
|
8614
8625
|
return \`calc(var(--cntrl-article-width, 100vw) * \${px / 1440})\`;
|
|
@@ -8831,6 +8842,7 @@ function Lightbox({ images, index, imageDisplay, originRect, reverseClose, onClo
|
|
|
8831
8842
|
lineHeight: '16px',
|
|
8832
8843
|
opacity: isOpen ? 1 : 0,
|
|
8833
8844
|
transition: \`opacity \${LIGHTBOX_ANIM_MS}ms \${LIGHTBOX_EASING}\`,
|
|
8845
|
+
fontFamily: getFontBasedOnSystem(),
|
|
8834
8846
|
}}
|
|
8835
8847
|
>
|
|
8836
8848
|
<p>{index + 1}</p>
|
|
@@ -9024,6 +9036,16 @@ export function Grid({ settings, content, isEditor, metadata, activeEvent }: Gri
|
|
|
9024
9036
|
setLightboxOpen(true);
|
|
9025
9037
|
};
|
|
9026
9038
|
|
|
9039
|
+
useEffect(() => {
|
|
9040
|
+
if (!lightboxOpen || lightbox !== 'On') return;
|
|
9041
|
+
if (typeof document === 'undefined') return;
|
|
9042
|
+
const prevOverflow = document.body.style.overflow;
|
|
9043
|
+
document.body.style.overflow = 'hidden';
|
|
9044
|
+
return () => {
|
|
9045
|
+
document.body.style.overflow = prevOverflow;
|
|
9046
|
+
};
|
|
9047
|
+
}, [lightboxOpen, lightbox]);
|
|
9048
|
+
|
|
9027
9049
|
return (
|
|
9028
9050
|
<>
|
|
9029
9051
|
<style dangerouslySetInnerHTML={{ __html: getCSS(P) }} />
|
|
@@ -9183,10 +9205,10 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
|
9183
9205
|
fontStyle: { type: "string" }
|
|
9184
9206
|
}
|
|
9185
9207
|
}
|
|
9186
|
-
},
|
|
9208
|
+
}, os = [
|
|
9187
9209
|
"titleColor",
|
|
9188
9210
|
"subtitleColor"
|
|
9189
|
-
],
|
|
9211
|
+
], is = {
|
|
9190
9212
|
type: "object",
|
|
9191
9213
|
version: 1,
|
|
9192
9214
|
properties: {
|
|
@@ -9667,14 +9689,14 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
|
9667
9689
|
}
|
|
9668
9690
|
],
|
|
9669
9691
|
paletteBookmark: {
|
|
9670
|
-
items: [...
|
|
9692
|
+
items: [...os],
|
|
9671
9693
|
panelIds: ["general", "typeStyle"],
|
|
9672
9694
|
stateItems: {
|
|
9673
9695
|
default: ["titleColor", "subtitleColor"]
|
|
9674
9696
|
}
|
|
9675
9697
|
}
|
|
9676
|
-
},
|
|
9677
|
-
element:
|
|
9698
|
+
}, ls = {
|
|
9699
|
+
element: ts,
|
|
9678
9700
|
id: "grid",
|
|
9679
9701
|
name: "Neptune",
|
|
9680
9702
|
preview: {
|
|
@@ -9690,17 +9712,17 @@ const STATE_KEYS = ['hover', 'focus', 'filled', 'success', 'error'] as const;
|
|
|
9690
9712
|
content: [{ path: "image.url", placeholderEnabled: !0 }],
|
|
9691
9713
|
parameters: []
|
|
9692
9714
|
},
|
|
9693
|
-
schema:
|
|
9694
|
-
sourceCode:
|
|
9695
|
-
},
|
|
9715
|
+
schema: is,
|
|
9716
|
+
sourceCode: rs
|
|
9717
|
+
}, ms = [
|
|
9696
9718
|
Bl,
|
|
9697
9719
|
Vl,
|
|
9698
9720
|
Ia,
|
|
9699
9721
|
Na,
|
|
9700
9722
|
qa,
|
|
9701
|
-
|
|
9723
|
+
ls
|
|
9702
9724
|
];
|
|
9703
9725
|
export {
|
|
9704
|
-
|
|
9705
|
-
|
|
9726
|
+
ms as components,
|
|
9727
|
+
gs as isSchemaV1
|
|
9706
9728
|
};
|