@cntrl-site/components 1.0.1-alpha.3 → 1.0.1-alpha.5
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/ControlSlider/ControlSliderComponent.d.ts +1 -1
- package/dist/Components/Form/FormComponent.d.ts +4 -0
- package/dist/Components/ImageRevealSlider/ControlImageRevealSliderComponent.d.ts +1 -1
- package/dist/index.js +60 -87
- package/dist/index.mjs +1373 -1405
- package/dist/types/SchemaV1.d.ts +16 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsx as N, Fragment as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { s as
|
|
1
|
+
import { jsx as N, Fragment as gt, jsxs as he } from "react/jsx-runtime";
|
|
2
|
+
import Ye, { useState as le, useEffect as ve, useRef as _e, useCallback as Qn } from "react";
|
|
3
|
+
import pe from "classnames";
|
|
4
|
+
import { s as F, u as dn, g as Dt } from "./useScopedStyles-Da2iLz5N.mjs";
|
|
5
5
|
import { createPortal as eo } from "react-dom";
|
|
6
6
|
function $l(e) {
|
|
7
7
|
return e.type === "object" && e.version === 1;
|
|
8
8
|
}
|
|
9
|
-
const to = "ControlSlider-module__wrapper___sHEkd", ro = "ControlSlider-module__hoverArrow___A-dOH", no = "ControlSlider-module__sliderItem___QQSkR", oo = "ControlSlider-module__sliderImage___9hRl-", io = "ControlSlider-module__arrow___05ghY", ao = "ControlSlider-module__arrowVertical___tBfVN", lo = "ControlSlider-module__nextArrow___-30Yc", so = "ControlSlider-module__arrowInner___aEra3", co = "ControlSlider-module__arrowIcon___S4ztF", uo = "ControlSlider-module__arrowImg___2dwJW", po = "ControlSlider-module__mirror___brd6U", fo = "ControlSlider-module__pagination___bicLF", go = "ControlSlider-module__paginationInner___bT-P-", mo = "ControlSlider-module__paginationVertical___zYqKw",
|
|
9
|
+
const to = "ControlSlider-module__wrapper___sHEkd", ro = "ControlSlider-module__hoverArrow___A-dOH", no = "ControlSlider-module__sliderItem___QQSkR", oo = "ControlSlider-module__sliderImage___9hRl-", io = "ControlSlider-module__arrow___05ghY", ao = "ControlSlider-module__arrowVertical___tBfVN", lo = "ControlSlider-module__nextArrow___-30Yc", so = "ControlSlider-module__arrowInner___aEra3", co = "ControlSlider-module__arrowIcon___S4ztF", uo = "ControlSlider-module__arrowImg___2dwJW", po = "ControlSlider-module__mirror___brd6U", fo = "ControlSlider-module__pagination___bicLF", go = "ControlSlider-module__paginationInner___bT-P-", mo = "ControlSlider-module__paginationVertical___zYqKw", yo = "ControlSlider-module__paginationItem___nTRbk", vo = "ControlSlider-module__dot___p1Qun", ho = "ControlSlider-module__activeDot___LHFaj", bo = "ControlSlider-module__paginationInsideBottom___R3FWn", Co = "ControlSlider-module__paginationInsideTop___V-qb-", _o = "ControlSlider-module__paginationOutsideBottom___14w8D", So = "ControlSlider-module__paginationOutsideTop___SCLqB", xo = "ControlSlider-module__paginationInsideLeft___yOBRZ", wo = "ControlSlider-module__paginationInsideRight___Rtt3o", $o = "ControlSlider-module__paginationOutsideLeft___lahaw", Eo = "ControlSlider-module__paginationOutsideRight___EtuQa", To = "ControlSlider-module__imgWrapper___UjEgB", Ao = "ControlSlider-module__captionBlock___dJ6-j", Io = "ControlSlider-module__captionTextWrapper___HFlpf", Lo = "ControlSlider-module__captionText___uGBVc", ko = "ControlSlider-module__active___WZK4G", Ro = "ControlSlider-module__withPointerEvents___t-18M", No = "ControlSlider-module__topLeftAlignment___zjnGM", Oo = "ControlSlider-module__topCenterAlignment___gD1xW", Bo = "ControlSlider-module__topRightAlignment___NMapS", Fo = "ControlSlider-module__middleLeftAlignment___OnUrY", Mo = "ControlSlider-module__middleCenterAlignment___Tdkl0", zo = "ControlSlider-module__middleRightAlignment___wEbfX", Do = "ControlSlider-module__bottomLeftAlignment___cTP2-", Vo = "ControlSlider-module__bottomCenterAlignment___c54fB", Wo = "ControlSlider-module__bottomRightAlignment___kEwrz", jo = "ControlSlider-module__clickOverlay___DZA28", Po = "ControlSlider-module__contain___pLyq7", Ho = "ControlSlider-module__cover___KdDat", Y = {
|
|
10
10
|
wrapper: to,
|
|
11
11
|
hoverArrow: ro,
|
|
12
12
|
sliderItem: no,
|
|
@@ -21,9 +21,9 @@ const to = "ControlSlider-module__wrapper___sHEkd", ro = "ControlSlider-module__
|
|
|
21
21
|
pagination: fo,
|
|
22
22
|
paginationInner: go,
|
|
23
23
|
paginationVertical: mo,
|
|
24
|
-
paginationItem:
|
|
25
|
-
dot:
|
|
26
|
-
activeDot:
|
|
24
|
+
paginationItem: yo,
|
|
25
|
+
dot: vo,
|
|
26
|
+
activeDot: ho,
|
|
27
27
|
paginationInsideBottom: bo,
|
|
28
28
|
paginationInsideTop: Co,
|
|
29
29
|
paginationOutsideBottom: _o,
|
|
@@ -46,8 +46,8 @@ const to = "ControlSlider-module__wrapper___sHEkd", ro = "ControlSlider-module__
|
|
|
46
46
|
middleRightAlignment: zo,
|
|
47
47
|
bottomLeftAlignment: Do,
|
|
48
48
|
bottomCenterAlignment: Vo,
|
|
49
|
-
bottomRightAlignment:
|
|
50
|
-
clickOverlay:
|
|
49
|
+
bottomRightAlignment: Wo,
|
|
50
|
+
clickOverlay: jo,
|
|
51
51
|
contain: Po,
|
|
52
52
|
cover: Ho
|
|
53
53
|
};
|
|
@@ -60,23 +60,23 @@ function Uo(e, t) {
|
|
|
60
60
|
function Go(e, t, r) {
|
|
61
61
|
return t && Uo(e.prototype, t), Object.defineProperty(e, "prototype", { writable: !1 }), e;
|
|
62
62
|
}
|
|
63
|
-
var Dr = "(prefers-reduced-motion: reduce)",
|
|
64
|
-
CREATED:
|
|
63
|
+
var Dr = "(prefers-reduced-motion: reduce)", rt = 1, Yo = 2, it = 3, st = 4, St = 5, Bt = 6, Vt = 7, Xo = {
|
|
64
|
+
CREATED: rt,
|
|
65
65
|
MOUNTED: Yo,
|
|
66
|
-
IDLE:
|
|
67
|
-
MOVING:
|
|
68
|
-
SCROLLING:
|
|
66
|
+
IDLE: it,
|
|
67
|
+
MOVING: st,
|
|
68
|
+
SCROLLING: St,
|
|
69
69
|
DRAGGING: Bt,
|
|
70
70
|
DESTROYED: Vt
|
|
71
71
|
};
|
|
72
|
-
function
|
|
72
|
+
function Me(e) {
|
|
73
73
|
e.length = 0;
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function Pe(e, t, r) {
|
|
76
76
|
return Array.prototype.slice.call(e, t, r);
|
|
77
77
|
}
|
|
78
78
|
function se(e) {
|
|
79
|
-
return e.bind.apply(e, [null].concat(
|
|
79
|
+
return e.bind.apply(e, [null].concat(Pe(arguments, 1)));
|
|
80
80
|
}
|
|
81
81
|
var fn = setTimeout, ur = function() {
|
|
82
82
|
};
|
|
@@ -86,10 +86,10 @@ function Vr(e) {
|
|
|
86
86
|
function Ut(e, t) {
|
|
87
87
|
return typeof t === e;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function mt(e) {
|
|
90
90
|
return !Cr(e) && Ut("object", e);
|
|
91
91
|
}
|
|
92
|
-
var br = Array.isArray, gn = se(Ut, "function"),
|
|
92
|
+
var br = Array.isArray, gn = se(Ut, "function"), We = se(Ut, "string"), xt = se(Ut, "undefined");
|
|
93
93
|
function Cr(e) {
|
|
94
94
|
return e === null;
|
|
95
95
|
}
|
|
@@ -100,31 +100,31 @@ function mn(e) {
|
|
|
100
100
|
return !1;
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function wt(e) {
|
|
104
104
|
return br(e) ? e : [e];
|
|
105
105
|
}
|
|
106
|
-
function
|
|
107
|
-
|
|
106
|
+
function we(e, t) {
|
|
107
|
+
wt(e).forEach(t);
|
|
108
108
|
}
|
|
109
109
|
function _r(e, t) {
|
|
110
110
|
return e.indexOf(t) > -1;
|
|
111
111
|
}
|
|
112
112
|
function Ft(e, t) {
|
|
113
|
-
return e.push.apply(e,
|
|
113
|
+
return e.push.apply(e, wt(t)), e;
|
|
114
114
|
}
|
|
115
|
-
function
|
|
116
|
-
e &&
|
|
115
|
+
function Oe(e, t, r) {
|
|
116
|
+
e && we(t, function(n) {
|
|
117
117
|
n && e.classList[r ? "add" : "remove"](n);
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
|
-
function
|
|
121
|
-
|
|
120
|
+
function Ie(e, t) {
|
|
121
|
+
Oe(e, We(t) ? t.split(" ") : t, !0);
|
|
122
122
|
}
|
|
123
|
-
function
|
|
124
|
-
|
|
123
|
+
function $t(e, t) {
|
|
124
|
+
we(t, e.appendChild.bind(e));
|
|
125
125
|
}
|
|
126
126
|
function Sr(e, t) {
|
|
127
|
-
|
|
127
|
+
we(e, function(r) {
|
|
128
128
|
var n = (t || r).parentNode;
|
|
129
129
|
n && n.insertBefore(r, t);
|
|
130
130
|
});
|
|
@@ -132,128 +132,128 @@ function Sr(e, t) {
|
|
|
132
132
|
function yt(e, t) {
|
|
133
133
|
return mn(e) && (e.msMatchesSelector || e.matches).call(e, t);
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
var r = e ?
|
|
135
|
+
function yn(e, t) {
|
|
136
|
+
var r = e ? Pe(e.children) : [];
|
|
137
137
|
return t ? r.filter(function(n) {
|
|
138
138
|
return yt(n, t);
|
|
139
139
|
}) : r;
|
|
140
140
|
}
|
|
141
|
-
function
|
|
142
|
-
return t ?
|
|
141
|
+
function Et(e, t) {
|
|
142
|
+
return t ? yn(e, t)[0] : e.firstElementChild;
|
|
143
143
|
}
|
|
144
144
|
var vt = Object.keys;
|
|
145
|
-
function
|
|
145
|
+
function Xe(e, t, r) {
|
|
146
146
|
return e && (r ? vt(e).reverse() : vt(e)).forEach(function(n) {
|
|
147
147
|
n !== "__proto__" && t(e[n], n);
|
|
148
148
|
}), e;
|
|
149
149
|
}
|
|
150
|
-
function
|
|
151
|
-
return
|
|
152
|
-
|
|
150
|
+
function ht(e) {
|
|
151
|
+
return Pe(arguments, 1).forEach(function(t) {
|
|
152
|
+
Xe(t, function(r, n) {
|
|
153
153
|
e[n] = t[n];
|
|
154
154
|
});
|
|
155
155
|
}), e;
|
|
156
156
|
}
|
|
157
|
-
function
|
|
158
|
-
return
|
|
159
|
-
|
|
160
|
-
br(r) ? e[n] = r.slice() :
|
|
157
|
+
function Ve(e) {
|
|
158
|
+
return Pe(arguments, 1).forEach(function(t) {
|
|
159
|
+
Xe(t, function(r, n) {
|
|
160
|
+
br(r) ? e[n] = r.slice() : mt(r) ? e[n] = Ve({}, mt(e[n]) ? e[n] : {}, r) : e[n] = r;
|
|
161
161
|
});
|
|
162
162
|
}), e;
|
|
163
163
|
}
|
|
164
|
-
function
|
|
165
|
-
|
|
164
|
+
function Wr(e, t) {
|
|
165
|
+
we(t || vt(e), function(r) {
|
|
166
166
|
delete e[r];
|
|
167
167
|
});
|
|
168
168
|
}
|
|
169
|
-
function
|
|
170
|
-
|
|
171
|
-
|
|
169
|
+
function Le(e, t) {
|
|
170
|
+
we(e, function(r) {
|
|
171
|
+
we(t, function(n) {
|
|
172
172
|
r && r.removeAttribute(n);
|
|
173
173
|
});
|
|
174
174
|
});
|
|
175
175
|
}
|
|
176
|
-
function
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}) :
|
|
180
|
-
Cr(r) || r === "" ?
|
|
176
|
+
function Z(e, t, r) {
|
|
177
|
+
mt(t) ? Xe(t, function(n, o) {
|
|
178
|
+
Z(e, o, n);
|
|
179
|
+
}) : we(e, function(n) {
|
|
180
|
+
Cr(r) || r === "" ? Le(n, t) : n.setAttribute(t, String(r));
|
|
181
181
|
});
|
|
182
182
|
}
|
|
183
|
-
function
|
|
183
|
+
function nt(e, t, r) {
|
|
184
184
|
var n = document.createElement(e);
|
|
185
|
-
return t && (
|
|
185
|
+
return t && (We(t) ? Ie(n, t) : Z(n, t)), r && $t(r, n), n;
|
|
186
186
|
}
|
|
187
|
-
function
|
|
188
|
-
if (
|
|
187
|
+
function Ee(e, t, r) {
|
|
188
|
+
if (xt(r))
|
|
189
189
|
return getComputedStyle(e)[t];
|
|
190
190
|
Cr(r) || (e.style[t] = "" + r);
|
|
191
191
|
}
|
|
192
|
-
function
|
|
193
|
-
|
|
192
|
+
function bt(e, t) {
|
|
193
|
+
Ee(e, "display", t);
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function vn(e) {
|
|
196
196
|
e.setActive && e.setActive() || e.focus({
|
|
197
197
|
preventScroll: !0
|
|
198
198
|
});
|
|
199
199
|
}
|
|
200
|
-
function
|
|
200
|
+
function Te(e, t) {
|
|
201
201
|
return e.getAttribute(t);
|
|
202
202
|
}
|
|
203
|
-
function
|
|
203
|
+
function jr(e, t) {
|
|
204
204
|
return e && e.classList.contains(t);
|
|
205
205
|
}
|
|
206
|
-
function
|
|
206
|
+
function Se(e) {
|
|
207
207
|
return e.getBoundingClientRect();
|
|
208
208
|
}
|
|
209
|
-
function
|
|
210
|
-
|
|
209
|
+
function qe(e) {
|
|
210
|
+
we(e, function(t) {
|
|
211
211
|
t && t.parentNode && t.parentNode.removeChild(t);
|
|
212
212
|
});
|
|
213
213
|
}
|
|
214
|
-
function
|
|
215
|
-
return
|
|
214
|
+
function hn(e) {
|
|
215
|
+
return Et(new DOMParser().parseFromString(e, "text/html").body);
|
|
216
216
|
}
|
|
217
|
-
function
|
|
217
|
+
function Ne(e, t) {
|
|
218
218
|
e.preventDefault(), t && (e.stopPropagation(), e.stopImmediatePropagation());
|
|
219
219
|
}
|
|
220
220
|
function bn(e, t) {
|
|
221
221
|
return e && e.querySelector(t);
|
|
222
222
|
}
|
|
223
223
|
function xr(e, t) {
|
|
224
|
-
return t ?
|
|
224
|
+
return t ? Pe(e.querySelectorAll(t)) : [];
|
|
225
225
|
}
|
|
226
|
-
function
|
|
227
|
-
|
|
226
|
+
function Be(e, t) {
|
|
227
|
+
Oe(e, t, !1);
|
|
228
228
|
}
|
|
229
229
|
function pr(e) {
|
|
230
230
|
return e.timeStamp;
|
|
231
231
|
}
|
|
232
|
-
function
|
|
233
|
-
return
|
|
232
|
+
function Ge(e) {
|
|
233
|
+
return We(e) ? e : e ? e + "px" : "";
|
|
234
234
|
}
|
|
235
|
-
var
|
|
236
|
-
function
|
|
235
|
+
var Tt = "splide", wr = "data-" + Tt;
|
|
236
|
+
function pt(e, t) {
|
|
237
237
|
if (!e)
|
|
238
|
-
throw new Error("[" +
|
|
238
|
+
throw new Error("[" + Tt + "] " + (t || ""));
|
|
239
239
|
}
|
|
240
|
-
var
|
|
240
|
+
var je = Math.min, Wt = Math.max, jt = Math.floor, Ct = Math.ceil, Ce = Math.abs;
|
|
241
241
|
function Cn(e, t, r) {
|
|
242
|
-
return
|
|
242
|
+
return Ce(e - t) < r;
|
|
243
243
|
}
|
|
244
244
|
function Mt(e, t, r, n) {
|
|
245
|
-
var o =
|
|
245
|
+
var o = je(t, r), a = Wt(t, r);
|
|
246
246
|
return n ? o < e && e < a : o <= e && e <= a;
|
|
247
247
|
}
|
|
248
|
-
function
|
|
249
|
-
var n =
|
|
250
|
-
return
|
|
248
|
+
function et(e, t, r) {
|
|
249
|
+
var n = je(t, r), o = Wt(t, r);
|
|
250
|
+
return je(Wt(n, e), o);
|
|
251
251
|
}
|
|
252
252
|
function dr(e) {
|
|
253
253
|
return +(e > 0) - +(e < 0);
|
|
254
254
|
}
|
|
255
255
|
function fr(e, t) {
|
|
256
|
-
return
|
|
256
|
+
return we(t, function(r) {
|
|
257
257
|
e = e.replace("%s", "" + r);
|
|
258
258
|
}), e;
|
|
259
259
|
}
|
|
@@ -268,8 +268,8 @@ function _n() {
|
|
|
268
268
|
var e = [];
|
|
269
269
|
function t(i, s, l, p) {
|
|
270
270
|
o(i, s, function(c, S, m) {
|
|
271
|
-
var
|
|
272
|
-
|
|
271
|
+
var y = "addEventListener" in c, u = y ? c.removeEventListener.bind(c, S, l, p) : c.removeListener.bind(c, l);
|
|
272
|
+
y ? c.addEventListener(S, l, p) : c.addListener(l), e.push([c, S, m, l, u]);
|
|
273
273
|
});
|
|
274
274
|
}
|
|
275
275
|
function r(i, s, l) {
|
|
@@ -287,8 +287,8 @@ function _n() {
|
|
|
287
287
|
}) : (p = document.createEvent("CustomEvent"), p.initCustomEvent(s, c, !1, l)), i.dispatchEvent(p), p;
|
|
288
288
|
}
|
|
289
289
|
function o(i, s, l) {
|
|
290
|
-
|
|
291
|
-
p &&
|
|
290
|
+
we(i, function(p) {
|
|
291
|
+
p && we(s, function(c) {
|
|
292
292
|
c.split(" ").forEach(function(S) {
|
|
293
293
|
var m = S.split(".");
|
|
294
294
|
l(p, m[0], m[1]);
|
|
@@ -299,7 +299,7 @@ function _n() {
|
|
|
299
299
|
function a() {
|
|
300
300
|
e.forEach(function(i) {
|
|
301
301
|
i[4]();
|
|
302
|
-
}),
|
|
302
|
+
}), Me(e);
|
|
303
303
|
}
|
|
304
304
|
return {
|
|
305
305
|
bind: t,
|
|
@@ -308,18 +308,18 @@ function _n() {
|
|
|
308
308
|
destroy: a
|
|
309
309
|
};
|
|
310
310
|
}
|
|
311
|
-
var
|
|
312
|
-
function
|
|
311
|
+
var He = "mounted", gr = "ready", ze = "move", ct = "moved", Er = "click", Sn = "active", xn = "inactive", wn = "visible", $n = "hidden", me = "refresh", be = "updated", at = "resize", Gt = "resized", En = "drag", Tn = "dragging", An = "dragged", Yt = "scroll", Je = "scrolled", Ko = "overflow", Tr = "destroy", In = "arrows:mounted", Ln = "arrows:updated", kn = "pagination:mounted", Rn = "pagination:updated", Ar = "navigation:mounted", Ir = "autoplay:play", Nn = "autoplay:playing", Lr = "autoplay:pause", kr = "lazyload:loaded", On = "sk", Bn = "sh", Pt = "ei";
|
|
312
|
+
function de(e) {
|
|
313
313
|
var t = e ? e.event.bus : document.createDocumentFragment(), r = _n();
|
|
314
314
|
function n(a, i) {
|
|
315
|
-
r.bind(t,
|
|
315
|
+
r.bind(t, wt(a).join(" "), function(s) {
|
|
316
316
|
i.apply(i, br(s.detail) ? s.detail : []);
|
|
317
317
|
});
|
|
318
318
|
}
|
|
319
319
|
function o(a) {
|
|
320
|
-
r.dispatch(t, a,
|
|
320
|
+
r.dispatch(t, a, Pe(arguments, 1));
|
|
321
321
|
}
|
|
322
|
-
return e && e.event.on(Tr, r.destroy),
|
|
322
|
+
return e && e.event.on(Tr, r.destroy), ht(r, {
|
|
323
323
|
bus: t,
|
|
324
324
|
on: n,
|
|
325
325
|
off: se(r.unbind, t),
|
|
@@ -330,36 +330,36 @@ function Xt(e, t, r, n) {
|
|
|
330
330
|
var o = Date.now, a, i = 0, s, l = !0, p = 0;
|
|
331
331
|
function c() {
|
|
332
332
|
if (!l) {
|
|
333
|
-
if (i = e ?
|
|
333
|
+
if (i = e ? je((o() - a) / e, 1) : 1, r && r(i), i >= 1 && (t(), a = o(), n && ++p >= n))
|
|
334
334
|
return m();
|
|
335
335
|
s = Vr(c);
|
|
336
336
|
}
|
|
337
337
|
}
|
|
338
|
-
function S(
|
|
339
|
-
|
|
338
|
+
function S($) {
|
|
339
|
+
$ || u(), a = o() - ($ ? i * e : 0), l = !1, s = Vr(c);
|
|
340
340
|
}
|
|
341
341
|
function m() {
|
|
342
342
|
l = !0;
|
|
343
343
|
}
|
|
344
|
-
function
|
|
344
|
+
function y() {
|
|
345
345
|
a = o(), i = 0, r && r(i);
|
|
346
346
|
}
|
|
347
347
|
function u() {
|
|
348
348
|
s && cancelAnimationFrame(s), i = 0, s = 0, l = !0;
|
|
349
349
|
}
|
|
350
|
-
function f(
|
|
351
|
-
e =
|
|
350
|
+
function f($) {
|
|
351
|
+
e = $;
|
|
352
352
|
}
|
|
353
|
-
function
|
|
353
|
+
function w() {
|
|
354
354
|
return l;
|
|
355
355
|
}
|
|
356
356
|
return {
|
|
357
357
|
start: S,
|
|
358
|
-
rewind:
|
|
358
|
+
rewind: y,
|
|
359
359
|
pause: m,
|
|
360
360
|
cancel: u,
|
|
361
361
|
set: f,
|
|
362
|
-
isPaused:
|
|
362
|
+
isPaused: w
|
|
363
363
|
};
|
|
364
364
|
}
|
|
365
365
|
function Jo(e) {
|
|
@@ -368,7 +368,7 @@ function Jo(e) {
|
|
|
368
368
|
t = o;
|
|
369
369
|
}
|
|
370
370
|
function n(o) {
|
|
371
|
-
return _r(
|
|
371
|
+
return _r(wt(o), t);
|
|
372
372
|
}
|
|
373
373
|
return {
|
|
374
374
|
set: r,
|
|
@@ -385,8 +385,8 @@ function Qo(e, t, r) {
|
|
|
385
385
|
var n = e.state, o = r.breakpoints || {}, a = r.reducedMotion || {}, i = _n(), s = [];
|
|
386
386
|
function l() {
|
|
387
387
|
var u = r.mediaQuery === "min";
|
|
388
|
-
vt(o).sort(function(f,
|
|
389
|
-
return u ? +f - +
|
|
388
|
+
vt(o).sort(function(f, w) {
|
|
389
|
+
return u ? +f - +w : +w - +f;
|
|
390
390
|
}).forEach(function(f) {
|
|
391
391
|
c(o[f], "(" + (u ? "min" : "max") + "-width:" + f + "px)");
|
|
392
392
|
}), c(a, Dr), S();
|
|
@@ -395,26 +395,26 @@ function Qo(e, t, r) {
|
|
|
395
395
|
u && i.destroy();
|
|
396
396
|
}
|
|
397
397
|
function c(u, f) {
|
|
398
|
-
var
|
|
399
|
-
i.bind(
|
|
398
|
+
var w = matchMedia(f);
|
|
399
|
+
i.bind(w, "change", S), s.push([u, w]);
|
|
400
400
|
}
|
|
401
401
|
function S() {
|
|
402
|
-
var u = n.is(Vt), f = r.direction,
|
|
403
|
-
return
|
|
402
|
+
var u = n.is(Vt), f = r.direction, w = s.reduce(function($, d) {
|
|
403
|
+
return Ve($, d[1].matches ? d[0] : {});
|
|
404
404
|
}, {});
|
|
405
|
-
|
|
405
|
+
Wr(r), y(w), r.destroy ? e.destroy(r.destroy === "completely") : u ? (p(!0), e.mount()) : f !== r.direction && e.refresh();
|
|
406
406
|
}
|
|
407
407
|
function m(u) {
|
|
408
|
-
matchMedia(Dr).matches && (u ?
|
|
408
|
+
matchMedia(Dr).matches && (u ? Ve(r, a) : Wr(r, vt(a)));
|
|
409
409
|
}
|
|
410
|
-
function
|
|
411
|
-
|
|
410
|
+
function y(u, f, w) {
|
|
411
|
+
Ve(r, u), f && Ve(Object.getPrototypeOf(r), u), (w || !n.is(rt)) && e.emit(be, r);
|
|
412
412
|
}
|
|
413
413
|
return {
|
|
414
414
|
setup: l,
|
|
415
415
|
destroy: p,
|
|
416
416
|
reduce: m,
|
|
417
|
-
set:
|
|
417
|
+
set: y
|
|
418
418
|
};
|
|
419
419
|
}
|
|
420
420
|
var qt = "Arrow", Kt = qt + "Left", Jt = qt + "Right", Fn = qt + "Up", Mn = qt + "Down", Hr = "rtl", Zt = "ttb", rr = {
|
|
@@ -444,13 +444,13 @@ function ei(e, t, r) {
|
|
|
444
444
|
orient: o
|
|
445
445
|
};
|
|
446
446
|
}
|
|
447
|
-
var
|
|
447
|
+
var Fe = "role", ot = "tabindex", ti = "disabled", Ae = "aria-", At = Ae + "controls", zn = Ae + "current", Ur = Ae + "selected", xe = Ae + "label", Rr = Ae + "labelledby", Dn = Ae + "hidden", Nr = Ae + "orientation", _t = Ae + "roledescription", Gr = Ae + "live", Yr = Ae + "busy", Xr = Ae + "atomic", Or = [Fe, ot, ti, At, zn, xe, Rr, Dn, Nr, _t], ke = Tt + "__", Ue = "is-", nr = Tt, qr = ke + "track", ri = ke + "list", Qt = ke + "slide", Vn = Qt + "--clone", ni = Qt + "__container", Br = ke + "arrows", er = ke + "arrow", Wn = er + "--prev", jn = er + "--next", tr = ke + "pagination", Pn = tr + "__page", oi = ke + "progress", ii = oi + "__bar", ai = ke + "toggle", li = ke + "spinner", si = ke + "sr", ci = Ue + "initialized", Ke = Ue + "active", Hn = Ue + "prev", Un = Ue + "next", mr = Ue + "visible", yr = Ue + "loading", Gn = Ue + "focus-in", Yn = Ue + "overflow", ui = [Ke, mr, Hn, Un, yr, Gn, Yn], pi = {
|
|
448
448
|
slide: Qt,
|
|
449
449
|
clone: Vn,
|
|
450
450
|
arrows: Br,
|
|
451
451
|
arrow: er,
|
|
452
|
-
prev:
|
|
453
|
-
next:
|
|
452
|
+
prev: Wn,
|
|
453
|
+
next: jn,
|
|
454
454
|
pagination: tr,
|
|
455
455
|
page: Pn,
|
|
456
456
|
spinner: li
|
|
@@ -464,339 +464,339 @@ function di(e, t) {
|
|
|
464
464
|
}
|
|
465
465
|
var fi = 5, Kr = 200, Xn = "touchstart mousedown", or = "touchmove mousemove", ir = "touchend touchcancel mouseup click";
|
|
466
466
|
function gi(e, t, r) {
|
|
467
|
-
var n =
|
|
467
|
+
var n = de(e), o = n.on, a = n.bind, i = e.root, s = r.i18n, l = {}, p = [], c = [], S = [], m, y, u;
|
|
468
468
|
function f() {
|
|
469
|
-
|
|
469
|
+
h(), W(), d();
|
|
470
470
|
}
|
|
471
|
-
function
|
|
472
|
-
o(
|
|
471
|
+
function w() {
|
|
472
|
+
o(me, $), o(me, f), o(be, d), a(document, Xn + " keydown", function(v) {
|
|
473
473
|
u = v.type === "keydown";
|
|
474
474
|
}, {
|
|
475
475
|
capture: !0
|
|
476
476
|
}), a(i, "focusin", function() {
|
|
477
|
-
|
|
477
|
+
Oe(i, Gn, !!u);
|
|
478
478
|
});
|
|
479
479
|
}
|
|
480
|
-
function
|
|
481
|
-
var
|
|
482
|
-
|
|
480
|
+
function $(v) {
|
|
481
|
+
var E = Or.concat("style");
|
|
482
|
+
Me(p), Be(i, c), Be(m, S), Le([m, y], E), Le(i, v ? E : ["style", _t]);
|
|
483
483
|
}
|
|
484
484
|
function d() {
|
|
485
|
-
|
|
485
|
+
Be(i, c), Be(m, S), c = x(nr), S = x(qr), Ie(i, c), Ie(m, S), Z(i, xe, r.label), Z(i, Rr, r.labelledby);
|
|
486
486
|
}
|
|
487
|
-
function
|
|
488
|
-
m = D("." + qr),
|
|
487
|
+
function h() {
|
|
488
|
+
m = D("." + qr), y = Et(m, "." + ri), pt(m && y, "A track/list element is missing."), Ft(p, yn(y, "." + Qt + ":not(." + Vn + ")")), Xe({
|
|
489
489
|
arrows: Br,
|
|
490
490
|
pagination: tr,
|
|
491
|
-
prev:
|
|
492
|
-
next:
|
|
491
|
+
prev: Wn,
|
|
492
|
+
next: jn,
|
|
493
493
|
bar: ii,
|
|
494
494
|
toggle: ai
|
|
495
|
-
}, function(v,
|
|
496
|
-
l[
|
|
497
|
-
}),
|
|
495
|
+
}, function(v, E) {
|
|
496
|
+
l[E] = D("." + v);
|
|
497
|
+
}), ht(l, {
|
|
498
498
|
root: i,
|
|
499
499
|
track: m,
|
|
500
|
-
list:
|
|
500
|
+
list: y,
|
|
501
501
|
slides: p
|
|
502
502
|
});
|
|
503
503
|
}
|
|
504
504
|
function W() {
|
|
505
|
-
var v = i.id || qo(
|
|
506
|
-
i.id = v, m.id = m.id || v + "-track",
|
|
505
|
+
var v = i.id || qo(Tt), E = r.role;
|
|
506
|
+
i.id = v, m.id = m.id || v + "-track", y.id = y.id || v + "-list", !Te(i, Fe) && i.tagName !== "SECTION" && E && Z(i, Fe, E), Z(i, _t, s.carousel), Z(y, Fe, "presentation");
|
|
507
507
|
}
|
|
508
508
|
function D(v) {
|
|
509
|
-
var
|
|
510
|
-
return
|
|
509
|
+
var E = bn(i, v);
|
|
510
|
+
return E && di(E, "." + nr) === i ? E : void 0;
|
|
511
511
|
}
|
|
512
|
-
function
|
|
513
|
-
return [v + "--" + r.type, v + "--" + r.direction, r.drag && v + "--draggable", r.isNavigation && v + "--nav", v === nr &&
|
|
512
|
+
function x(v) {
|
|
513
|
+
return [v + "--" + r.type, v + "--" + r.direction, r.drag && v + "--draggable", r.isNavigation && v + "--nav", v === nr && Ke];
|
|
514
514
|
}
|
|
515
|
-
return
|
|
515
|
+
return ht(l, {
|
|
516
516
|
setup: f,
|
|
517
|
-
mount:
|
|
518
|
-
destroy:
|
|
517
|
+
mount: w,
|
|
518
|
+
destroy: $
|
|
519
519
|
});
|
|
520
520
|
}
|
|
521
|
-
var
|
|
521
|
+
var lt = "slide", ut = "loop", It = "fade";
|
|
522
522
|
function mi(e, t, r, n) {
|
|
523
|
-
var o =
|
|
524
|
-
function
|
|
525
|
-
|
|
523
|
+
var o = de(e), a = o.on, i = o.emit, s = o.bind, l = e.Components, p = e.root, c = e.options, S = c.isNavigation, m = c.updateOnMove, y = c.i18n, u = c.pagination, f = c.slideFocus, w = l.Direction.resolve, $ = Te(n, "style"), d = Te(n, xe), h = r > -1, W = Et(n, "." + ni), D;
|
|
524
|
+
function x() {
|
|
525
|
+
h || (n.id = p.id + "-slide" + $r(t + 1), Z(n, Fe, u ? "tabpanel" : "group"), Z(n, _t, y.slide), Z(n, xe, d || fr(y.slideLabel, [t + 1, e.length]))), v();
|
|
526
526
|
}
|
|
527
527
|
function v() {
|
|
528
|
-
s(n, "click", se(i, Er,
|
|
528
|
+
s(n, "click", se(i, Er, T)), s(n, "keydown", se(i, On, T)), a([ct, Bn, Je], I), a(Ar, k), m && a(ze, V);
|
|
529
529
|
}
|
|
530
|
-
function
|
|
531
|
-
D = !0, o.destroy(),
|
|
530
|
+
function E() {
|
|
531
|
+
D = !0, o.destroy(), Be(n, ui), Le(n, Or), Z(n, "style", $), Z(n, xe, d || "");
|
|
532
532
|
}
|
|
533
|
-
function
|
|
534
|
-
var
|
|
535
|
-
var
|
|
536
|
-
return
|
|
533
|
+
function k() {
|
|
534
|
+
var b = e.splides.map(function(_) {
|
|
535
|
+
var B = _.splide.Components.Slides.getAt(t);
|
|
536
|
+
return B ? B.slide.id : "";
|
|
537
537
|
}).join(" ");
|
|
538
|
-
|
|
538
|
+
Z(n, xe, fr(y.slideX, (h ? r : t) + 1)), Z(n, At, b), Z(n, Fe, f ? "button" : ""), f && Le(n, _t);
|
|
539
539
|
}
|
|
540
540
|
function V() {
|
|
541
|
-
D ||
|
|
541
|
+
D || I();
|
|
542
542
|
}
|
|
543
|
-
function
|
|
543
|
+
function I() {
|
|
544
544
|
if (!D) {
|
|
545
|
-
var
|
|
546
|
-
O(),
|
|
545
|
+
var b = e.index;
|
|
546
|
+
O(), M(), Oe(n, Hn, t === b - 1), Oe(n, Un, t === b + 1);
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
549
|
function O() {
|
|
550
|
-
var
|
|
551
|
-
|
|
552
|
-
}
|
|
553
|
-
function
|
|
554
|
-
var
|
|
555
|
-
if (e.state.is([
|
|
556
|
-
var
|
|
557
|
-
|
|
550
|
+
var b = U();
|
|
551
|
+
b !== jr(n, Ke) && (Oe(n, Ke, b), Z(n, zn, S && b || ""), i(b ? Sn : xn, T));
|
|
552
|
+
}
|
|
553
|
+
function M() {
|
|
554
|
+
var b = g(), _ = !b && (!U() || h);
|
|
555
|
+
if (e.state.is([st, St]) || Z(n, Dn, _ || ""), Z(xr(n, c.focusableNodes || ""), ot, _ ? -1 : ""), f && Z(n, ot, _ ? -1 : 0), b !== jr(n, mr) && (Oe(n, mr, b), i(b ? wn : $n, T)), !b && document.activeElement === n) {
|
|
556
|
+
var B = l.Slides.getAt(e.index);
|
|
557
|
+
B && vn(B.slide);
|
|
558
558
|
}
|
|
559
559
|
}
|
|
560
|
-
function
|
|
561
|
-
|
|
560
|
+
function H(b, _, B) {
|
|
561
|
+
Ee(B && W || n, b, _);
|
|
562
562
|
}
|
|
563
|
-
function
|
|
564
|
-
var
|
|
565
|
-
return
|
|
563
|
+
function U() {
|
|
564
|
+
var b = e.index;
|
|
565
|
+
return b === t || c.cloneStatus && b === r;
|
|
566
566
|
}
|
|
567
567
|
function g() {
|
|
568
|
-
if (e.is(
|
|
569
|
-
return
|
|
570
|
-
var
|
|
571
|
-
return
|
|
568
|
+
if (e.is(It))
|
|
569
|
+
return U();
|
|
570
|
+
var b = Se(l.Elements.track), _ = Se(n), B = w("left", !0), J = w("right", !0);
|
|
571
|
+
return jt(b[B]) <= Ct(_[B]) && jt(_[J]) <= Ct(b[J]);
|
|
572
572
|
}
|
|
573
|
-
function
|
|
574
|
-
var
|
|
575
|
-
return !
|
|
573
|
+
function L(b, _) {
|
|
574
|
+
var B = Ce(b - t);
|
|
575
|
+
return !h && (c.rewind || e.is(ut)) && (B = je(B, e.length - B)), B <= _;
|
|
576
576
|
}
|
|
577
|
-
var
|
|
577
|
+
var T = {
|
|
578
578
|
index: t,
|
|
579
579
|
slideIndex: r,
|
|
580
580
|
slide: n,
|
|
581
581
|
container: W,
|
|
582
|
-
isClone:
|
|
583
|
-
mount:
|
|
584
|
-
destroy:
|
|
585
|
-
update:
|
|
586
|
-
style:
|
|
587
|
-
isWithin:
|
|
582
|
+
isClone: h,
|
|
583
|
+
mount: x,
|
|
584
|
+
destroy: E,
|
|
585
|
+
update: I,
|
|
586
|
+
style: H,
|
|
587
|
+
isWithin: L
|
|
588
588
|
};
|
|
589
|
-
return
|
|
589
|
+
return T;
|
|
590
590
|
}
|
|
591
|
-
function
|
|
592
|
-
var n =
|
|
591
|
+
function yi(e, t, r) {
|
|
592
|
+
var n = de(e), o = n.on, a = n.emit, i = n.bind, s = t.Elements, l = s.slides, p = s.list, c = [];
|
|
593
593
|
function S() {
|
|
594
|
-
m(), o(
|
|
594
|
+
m(), o(me, y), o(me, m);
|
|
595
595
|
}
|
|
596
596
|
function m() {
|
|
597
|
-
l.forEach(function(
|
|
598
|
-
f(
|
|
597
|
+
l.forEach(function(I, O) {
|
|
598
|
+
f(I, O, -1);
|
|
599
599
|
});
|
|
600
600
|
}
|
|
601
|
-
function
|
|
602
|
-
D(function(
|
|
603
|
-
|
|
604
|
-
}),
|
|
601
|
+
function y() {
|
|
602
|
+
D(function(I) {
|
|
603
|
+
I.destroy();
|
|
604
|
+
}), Me(c);
|
|
605
605
|
}
|
|
606
606
|
function u() {
|
|
607
|
-
D(function(
|
|
608
|
-
|
|
607
|
+
D(function(I) {
|
|
608
|
+
I.update();
|
|
609
609
|
});
|
|
610
610
|
}
|
|
611
|
-
function f(
|
|
612
|
-
var
|
|
613
|
-
|
|
614
|
-
return
|
|
611
|
+
function f(I, O, M) {
|
|
612
|
+
var H = mi(e, O, M, I);
|
|
613
|
+
H.mount(), c.push(H), c.sort(function(U, g) {
|
|
614
|
+
return U.index - g.index;
|
|
615
615
|
});
|
|
616
616
|
}
|
|
617
|
-
function
|
|
618
|
-
return
|
|
617
|
+
function w(I) {
|
|
618
|
+
return I ? x(function(O) {
|
|
619
619
|
return !O.isClone;
|
|
620
620
|
}) : c;
|
|
621
621
|
}
|
|
622
|
-
function
|
|
623
|
-
var O = t.Controller,
|
|
624
|
-
return
|
|
625
|
-
return Mt(
|
|
622
|
+
function $(I) {
|
|
623
|
+
var O = t.Controller, M = O.toIndex(I), H = O.hasFocus() ? 1 : r.perPage;
|
|
624
|
+
return x(function(U) {
|
|
625
|
+
return Mt(U.index, M, M + H - 1);
|
|
626
626
|
});
|
|
627
627
|
}
|
|
628
|
-
function d(
|
|
629
|
-
return
|
|
628
|
+
function d(I) {
|
|
629
|
+
return x(I)[0];
|
|
630
630
|
}
|
|
631
|
-
function
|
|
632
|
-
|
|
633
|
-
if (
|
|
634
|
-
var
|
|
635
|
-
|
|
631
|
+
function h(I, O) {
|
|
632
|
+
we(I, function(M) {
|
|
633
|
+
if (We(M) && (M = hn(M)), mn(M)) {
|
|
634
|
+
var H = l[O];
|
|
635
|
+
H ? Sr(M, H) : $t(p, M), Ie(M, r.classes.slide), E(M, se(a, at));
|
|
636
636
|
}
|
|
637
|
-
}), a(
|
|
637
|
+
}), a(me);
|
|
638
638
|
}
|
|
639
|
-
function W(
|
|
640
|
-
|
|
639
|
+
function W(I) {
|
|
640
|
+
qe(x(I).map(function(O) {
|
|
641
641
|
return O.slide;
|
|
642
|
-
})), a(
|
|
642
|
+
})), a(me);
|
|
643
643
|
}
|
|
644
|
-
function D(
|
|
645
|
-
|
|
644
|
+
function D(I, O) {
|
|
645
|
+
w(O).forEach(I);
|
|
646
646
|
}
|
|
647
|
-
function
|
|
648
|
-
return c.filter(gn(
|
|
649
|
-
return
|
|
647
|
+
function x(I) {
|
|
648
|
+
return c.filter(gn(I) ? I : function(O) {
|
|
649
|
+
return We(I) ? yt(O.slide, I) : _r(wt(I), O.index);
|
|
650
650
|
});
|
|
651
651
|
}
|
|
652
|
-
function v(
|
|
653
|
-
D(function(
|
|
654
|
-
|
|
652
|
+
function v(I, O, M) {
|
|
653
|
+
D(function(H) {
|
|
654
|
+
H.style(I, O, M);
|
|
655
655
|
});
|
|
656
656
|
}
|
|
657
|
-
function
|
|
658
|
-
var
|
|
659
|
-
|
|
660
|
-
i(
|
|
661
|
-
--
|
|
657
|
+
function E(I, O) {
|
|
658
|
+
var M = xr(I, "img"), H = M.length;
|
|
659
|
+
H ? M.forEach(function(U) {
|
|
660
|
+
i(U, "load error", function() {
|
|
661
|
+
--H || O();
|
|
662
662
|
});
|
|
663
663
|
}) : O();
|
|
664
664
|
}
|
|
665
|
-
function
|
|
666
|
-
return
|
|
665
|
+
function k(I) {
|
|
666
|
+
return I ? l.length : c.length;
|
|
667
667
|
}
|
|
668
668
|
function V() {
|
|
669
669
|
return c.length > r.perPage;
|
|
670
670
|
}
|
|
671
671
|
return {
|
|
672
672
|
mount: S,
|
|
673
|
-
destroy:
|
|
673
|
+
destroy: y,
|
|
674
674
|
update: u,
|
|
675
675
|
register: f,
|
|
676
|
-
get:
|
|
677
|
-
getIn:
|
|
676
|
+
get: w,
|
|
677
|
+
getIn: $,
|
|
678
678
|
getAt: d,
|
|
679
|
-
add:
|
|
679
|
+
add: h,
|
|
680
680
|
remove: W,
|
|
681
681
|
forEach: D,
|
|
682
|
-
filter:
|
|
682
|
+
filter: x,
|
|
683
683
|
style: v,
|
|
684
|
-
getLength:
|
|
684
|
+
getLength: k,
|
|
685
685
|
isEnough: V
|
|
686
686
|
};
|
|
687
687
|
}
|
|
688
|
-
function
|
|
689
|
-
var n =
|
|
688
|
+
function vi(e, t, r) {
|
|
689
|
+
var n = de(e), o = n.on, a = n.bind, i = n.emit, s = t.Slides, l = t.Direction.resolve, p = t.Elements, c = p.root, S = p.track, m = p.list, y = s.getAt, u = s.style, f, w, $;
|
|
690
690
|
function d() {
|
|
691
|
-
|
|
691
|
+
h(), a(window, "resize load", Zo(se(i, at))), o([be, me], h), o(at, W);
|
|
692
692
|
}
|
|
693
|
-
function
|
|
694
|
-
f = r.direction === Zt,
|
|
693
|
+
function h() {
|
|
694
|
+
f = r.direction === Zt, Ee(c, "maxWidth", Ge(r.width)), Ee(S, l("paddingLeft"), D(!1)), Ee(S, l("paddingRight"), D(!0)), W(!0);
|
|
695
695
|
}
|
|
696
|
-
function W(
|
|
697
|
-
var
|
|
698
|
-
(
|
|
696
|
+
function W(T) {
|
|
697
|
+
var b = Se(c);
|
|
698
|
+
(T || w.width !== b.width || w.height !== b.height) && (Ee(S, "height", x()), u(l("marginRight"), Ge(r.gap)), u("width", E()), u("height", k(), !0), w = b, i(Gt), $ !== ($ = L()) && (Oe(c, Yn, $), i(Ko, $)));
|
|
699
699
|
}
|
|
700
|
-
function D(
|
|
701
|
-
var
|
|
702
|
-
return
|
|
700
|
+
function D(T) {
|
|
701
|
+
var b = r.padding, _ = l(T ? "right" : "left");
|
|
702
|
+
return b && Ge(b[_] || (mt(b) ? 0 : b)) || "0px";
|
|
703
703
|
}
|
|
704
|
-
function
|
|
705
|
-
var
|
|
706
|
-
return f && (
|
|
704
|
+
function x() {
|
|
705
|
+
var T = "";
|
|
706
|
+
return f && (T = v(), pt(T, "height or heightRatio is missing."), T = "calc(" + T + " - " + D(!1) + " - " + D(!0) + ")"), T;
|
|
707
707
|
}
|
|
708
708
|
function v() {
|
|
709
|
-
return
|
|
709
|
+
return Ge(r.height || Se(m).width * r.heightRatio);
|
|
710
710
|
}
|
|
711
|
-
function
|
|
712
|
-
return r.autoWidth ? null :
|
|
711
|
+
function E() {
|
|
712
|
+
return r.autoWidth ? null : Ge(r.fixedWidth) || (f ? "" : V());
|
|
713
713
|
}
|
|
714
|
-
function
|
|
715
|
-
return
|
|
714
|
+
function k() {
|
|
715
|
+
return Ge(r.fixedHeight) || (f ? r.autoHeight ? null : V() : v());
|
|
716
716
|
}
|
|
717
717
|
function V() {
|
|
718
|
-
var
|
|
719
|
-
return "calc((100%" + (
|
|
718
|
+
var T = Ge(r.gap);
|
|
719
|
+
return "calc((100%" + (T && " + " + T) + ")/" + (r.perPage || 1) + (T && " - " + T) + ")";
|
|
720
720
|
}
|
|
721
|
-
function
|
|
722
|
-
return
|
|
721
|
+
function I() {
|
|
722
|
+
return Se(m)[l("width")];
|
|
723
723
|
}
|
|
724
|
-
function O(
|
|
725
|
-
var
|
|
726
|
-
return
|
|
724
|
+
function O(T, b) {
|
|
725
|
+
var _ = y(T || 0);
|
|
726
|
+
return _ ? Se(_.slide)[l("width")] + (b ? 0 : U()) : 0;
|
|
727
727
|
}
|
|
728
|
-
function
|
|
729
|
-
var
|
|
730
|
-
if (
|
|
731
|
-
var
|
|
732
|
-
return
|
|
728
|
+
function M(T, b) {
|
|
729
|
+
var _ = y(T);
|
|
730
|
+
if (_) {
|
|
731
|
+
var B = Se(_.slide)[l("right")], J = Se(m)[l("left")];
|
|
732
|
+
return Ce(B - J) + (b ? 0 : U());
|
|
733
733
|
}
|
|
734
734
|
return 0;
|
|
735
735
|
}
|
|
736
|
-
function
|
|
737
|
-
return
|
|
736
|
+
function H(T) {
|
|
737
|
+
return M(e.length - 1) - M(0) + O(0, T);
|
|
738
738
|
}
|
|
739
|
-
function
|
|
740
|
-
var
|
|
741
|
-
return
|
|
739
|
+
function U() {
|
|
740
|
+
var T = y(0);
|
|
741
|
+
return T && parseFloat(Ee(T.slide, l("marginRight"))) || 0;
|
|
742
742
|
}
|
|
743
|
-
function g(
|
|
744
|
-
return parseFloat(
|
|
743
|
+
function g(T) {
|
|
744
|
+
return parseFloat(Ee(S, l("padding" + (T ? "Right" : "Left")))) || 0;
|
|
745
745
|
}
|
|
746
|
-
function
|
|
747
|
-
return e.is(
|
|
746
|
+
function L() {
|
|
747
|
+
return e.is(It) || H(!0) > I();
|
|
748
748
|
}
|
|
749
749
|
return {
|
|
750
750
|
mount: d,
|
|
751
751
|
resize: W,
|
|
752
|
-
listSize:
|
|
752
|
+
listSize: I,
|
|
753
753
|
slideSize: O,
|
|
754
|
-
sliderSize:
|
|
755
|
-
totalSize:
|
|
754
|
+
sliderSize: H,
|
|
755
|
+
totalSize: M,
|
|
756
756
|
getPadding: g,
|
|
757
|
-
isOverflow:
|
|
757
|
+
isOverflow: L
|
|
758
758
|
};
|
|
759
759
|
}
|
|
760
|
-
var
|
|
760
|
+
var hi = 2;
|
|
761
761
|
function bi(e, t, r) {
|
|
762
|
-
var n =
|
|
762
|
+
var n = de(e), o = n.on, a = t.Elements, i = t.Slides, s = t.Direction.resolve, l = [], p;
|
|
763
763
|
function c() {
|
|
764
|
-
o(
|
|
764
|
+
o(me, S), o([be, at], y), (p = w()) && (u(p), t.Layout.resize(!0));
|
|
765
765
|
}
|
|
766
766
|
function S() {
|
|
767
767
|
m(), c();
|
|
768
768
|
}
|
|
769
769
|
function m() {
|
|
770
|
-
|
|
770
|
+
qe(l), Me(l), n.destroy();
|
|
771
771
|
}
|
|
772
|
-
function
|
|
773
|
-
var
|
|
774
|
-
p !==
|
|
772
|
+
function y() {
|
|
773
|
+
var $ = w();
|
|
774
|
+
p !== $ && (p < $ || !$) && n.emit(me);
|
|
775
775
|
}
|
|
776
|
-
function u(
|
|
777
|
-
var d = i.get().slice(),
|
|
778
|
-
if (
|
|
779
|
-
for (; d.length <
|
|
776
|
+
function u($) {
|
|
777
|
+
var d = i.get().slice(), h = d.length;
|
|
778
|
+
if (h) {
|
|
779
|
+
for (; d.length < $; )
|
|
780
780
|
Ft(d, d);
|
|
781
|
-
Ft(d.slice(
|
|
782
|
-
var
|
|
783
|
-
|
|
781
|
+
Ft(d.slice(-$), d.slice(0, $)).forEach(function(W, D) {
|
|
782
|
+
var x = D < $, v = f(W.slide, D);
|
|
783
|
+
x ? Sr(v, d[0].slide) : $t(a.list, v), Ft(l, v), i.register(v, D - $ + (x ? 0 : h), W.index);
|
|
784
784
|
});
|
|
785
785
|
}
|
|
786
786
|
}
|
|
787
|
-
function f(
|
|
788
|
-
var
|
|
789
|
-
return
|
|
787
|
+
function f($, d) {
|
|
788
|
+
var h = $.cloneNode(!0);
|
|
789
|
+
return Ie(h, r.classes.clone), h.id = e.root.id + "-clone" + $r(d + 1), h;
|
|
790
790
|
}
|
|
791
|
-
function
|
|
792
|
-
var
|
|
793
|
-
if (!e.is(
|
|
794
|
-
|
|
795
|
-
else if (
|
|
796
|
-
var d = r[s("fixedWidth")] && t.Layout.slideSize(0),
|
|
797
|
-
|
|
791
|
+
function w() {
|
|
792
|
+
var $ = r.clones;
|
|
793
|
+
if (!e.is(ut))
|
|
794
|
+
$ = 0;
|
|
795
|
+
else if (xt($)) {
|
|
796
|
+
var d = r[s("fixedWidth")] && t.Layout.slideSize(0), h = d && Ct(Se(a.track)[s("width")] / d);
|
|
797
|
+
$ = h || r[s("autoWidth")] && e.length || r.perPage * hi;
|
|
798
798
|
}
|
|
799
|
-
return
|
|
799
|
+
return $;
|
|
800
800
|
}
|
|
801
801
|
return {
|
|
802
802
|
mount: c,
|
|
@@ -804,296 +804,296 @@ function bi(e, t, r) {
|
|
|
804
804
|
};
|
|
805
805
|
}
|
|
806
806
|
function Ci(e, t, r) {
|
|
807
|
-
var n =
|
|
807
|
+
var n = de(e), o = n.on, a = n.emit, i = e.state.set, s = t.Layout, l = s.slideSize, p = s.getPadding, c = s.totalSize, S = s.listSize, m = s.sliderSize, y = t.Direction, u = y.resolve, f = y.orient, w = t.Elements, $ = w.list, d = w.track, h;
|
|
808
808
|
function W() {
|
|
809
|
-
|
|
809
|
+
h = t.Transition, o([He, Gt, be, me], D);
|
|
810
810
|
}
|
|
811
811
|
function D() {
|
|
812
812
|
t.Controller.isBusy() || (t.Scroll.cancel(), v(e.index), t.Slides.update());
|
|
813
813
|
}
|
|
814
|
-
function
|
|
815
|
-
|
|
816
|
-
i(
|
|
814
|
+
function x(_, B, J, ee) {
|
|
815
|
+
_ !== B && T(_ > J) && (I(), E(V(H(), _ > J), !0)), i(st), a(ze, B, J, _), h.start(B, function() {
|
|
816
|
+
i(it), a(ct, B, J, _), ee && ee();
|
|
817
817
|
});
|
|
818
818
|
}
|
|
819
|
-
function v(
|
|
820
|
-
|
|
819
|
+
function v(_) {
|
|
820
|
+
E(M(_, !0));
|
|
821
821
|
}
|
|
822
|
-
function
|
|
823
|
-
if (!e.is(
|
|
824
|
-
var
|
|
825
|
-
|
|
822
|
+
function E(_, B) {
|
|
823
|
+
if (!e.is(It)) {
|
|
824
|
+
var J = B ? _ : k(_);
|
|
825
|
+
Ee($, "transform", "translate" + u("X") + "(" + J + "px)"), _ !== J && a(Bn);
|
|
826
826
|
}
|
|
827
827
|
}
|
|
828
|
-
function
|
|
829
|
-
if (e.is(
|
|
830
|
-
var
|
|
831
|
-
(
|
|
828
|
+
function k(_) {
|
|
829
|
+
if (e.is(ut)) {
|
|
830
|
+
var B = O(_), J = B > t.Controller.getEnd(), ee = B < 0;
|
|
831
|
+
(ee || J) && (_ = V(_, J));
|
|
832
832
|
}
|
|
833
|
-
return
|
|
833
|
+
return _;
|
|
834
834
|
}
|
|
835
|
-
function V(
|
|
836
|
-
var
|
|
837
|
-
return
|
|
835
|
+
function V(_, B) {
|
|
836
|
+
var J = _ - L(B), ee = m();
|
|
837
|
+
return _ -= f(ee * (Ct(Ce(J) / ee) || 1)) * (B ? 1 : -1), _;
|
|
838
838
|
}
|
|
839
|
-
function
|
|
840
|
-
|
|
839
|
+
function I() {
|
|
840
|
+
E(H(), !0), h.cancel();
|
|
841
841
|
}
|
|
842
|
-
function O(
|
|
843
|
-
for (var
|
|
844
|
-
var
|
|
845
|
-
if (
|
|
846
|
-
|
|
842
|
+
function O(_) {
|
|
843
|
+
for (var B = t.Slides.get(), J = 0, ee = 1 / 0, Q = 0; Q < B.length; Q++) {
|
|
844
|
+
var fe = B[Q].index, A = Ce(M(fe, !0) - _);
|
|
845
|
+
if (A <= ee)
|
|
846
|
+
ee = A, J = fe;
|
|
847
847
|
else
|
|
848
848
|
break;
|
|
849
849
|
}
|
|
850
|
-
return
|
|
850
|
+
return J;
|
|
851
851
|
}
|
|
852
|
-
function
|
|
853
|
-
var
|
|
854
|
-
return
|
|
852
|
+
function M(_, B) {
|
|
853
|
+
var J = f(c(_ - 1) - g(_));
|
|
854
|
+
return B ? U(J) : J;
|
|
855
855
|
}
|
|
856
|
-
function
|
|
857
|
-
var
|
|
858
|
-
return
|
|
856
|
+
function H() {
|
|
857
|
+
var _ = u("left");
|
|
858
|
+
return Se($)[_] - Se(d)[_] + f(p(!1));
|
|
859
859
|
}
|
|
860
|
-
function
|
|
861
|
-
return r.trimSpace && e.is(
|
|
860
|
+
function U(_) {
|
|
861
|
+
return r.trimSpace && e.is(lt) && (_ = et(_, 0, f(m(!0) - S()))), _;
|
|
862
862
|
}
|
|
863
|
-
function g(
|
|
864
|
-
var
|
|
865
|
-
return
|
|
863
|
+
function g(_) {
|
|
864
|
+
var B = r.focus;
|
|
865
|
+
return B === "center" ? (S() - l(_, !0)) / 2 : +B * l(_) || 0;
|
|
866
866
|
}
|
|
867
|
-
function
|
|
868
|
-
return
|
|
867
|
+
function L(_) {
|
|
868
|
+
return M(_ ? t.Controller.getEnd() : 0, !!r.trimSpace);
|
|
869
869
|
}
|
|
870
|
-
function
|
|
871
|
-
var
|
|
872
|
-
return
|
|
870
|
+
function T(_) {
|
|
871
|
+
var B = f(V(H(), _));
|
|
872
|
+
return _ ? B >= 0 : B <= $[u("scrollWidth")] - Se(d)[u("width")];
|
|
873
873
|
}
|
|
874
|
-
function _
|
|
875
|
-
|
|
876
|
-
var
|
|
877
|
-
return
|
|
874
|
+
function b(_, B) {
|
|
875
|
+
B = xt(B) ? H() : B;
|
|
876
|
+
var J = _ !== !0 && f(B) < f(L(!1)), ee = _ !== !1 && f(B) > f(L(!0));
|
|
877
|
+
return J || ee;
|
|
878
878
|
}
|
|
879
879
|
return {
|
|
880
880
|
mount: W,
|
|
881
|
-
move:
|
|
881
|
+
move: x,
|
|
882
882
|
jump: v,
|
|
883
|
-
translate:
|
|
883
|
+
translate: E,
|
|
884
884
|
shift: V,
|
|
885
|
-
cancel:
|
|
885
|
+
cancel: I,
|
|
886
886
|
toIndex: O,
|
|
887
|
-
toPosition:
|
|
888
|
-
getPosition:
|
|
889
|
-
getLimit:
|
|
890
|
-
exceededLimit:
|
|
887
|
+
toPosition: M,
|
|
888
|
+
getPosition: H,
|
|
889
|
+
getLimit: L,
|
|
890
|
+
exceededLimit: b,
|
|
891
891
|
reposition: D
|
|
892
892
|
};
|
|
893
893
|
}
|
|
894
894
|
function _i(e, t, r) {
|
|
895
|
-
var n =
|
|
896
|
-
function
|
|
897
|
-
|
|
895
|
+
var n = de(e), o = n.on, a = n.emit, i = t.Move, s = i.getPosition, l = i.getLimit, p = i.toPosition, c = t.Slides, S = c.isEnough, m = c.getLength, y = r.omitEnd, u = e.is(ut), f = e.is(lt), w = se(H, !1), $ = se(H, !0), d = r.start || 0, h, W = d, D, x, v;
|
|
896
|
+
function E() {
|
|
897
|
+
k(), o([be, me, Pt], k), o(Gt, V);
|
|
898
898
|
}
|
|
899
|
-
function
|
|
900
|
-
D = m(!0),
|
|
901
|
-
var
|
|
902
|
-
|
|
899
|
+
function k() {
|
|
900
|
+
D = m(!0), x = r.perMove, v = r.perPage, h = T();
|
|
901
|
+
var A = et(d, 0, y ? h : D - 1);
|
|
902
|
+
A !== d && (d = A, i.reposition());
|
|
903
903
|
}
|
|
904
904
|
function V() {
|
|
905
|
-
|
|
905
|
+
h !== T() && a(Pt);
|
|
906
906
|
}
|
|
907
|
-
function
|
|
908
|
-
if (!
|
|
909
|
-
var
|
|
910
|
-
|
|
907
|
+
function I(A, X, ce) {
|
|
908
|
+
if (!fe()) {
|
|
909
|
+
var ie = M(A), ue = L(ie);
|
|
910
|
+
ue > -1 && (X || ue !== d) && (J(ue), i.move(ie, ue, W, ce));
|
|
911
911
|
}
|
|
912
912
|
}
|
|
913
|
-
function O(
|
|
914
|
-
t.Scroll.scroll(
|
|
915
|
-
var
|
|
916
|
-
|
|
913
|
+
function O(A, X, ce, ie) {
|
|
914
|
+
t.Scroll.scroll(A, X, ce, function() {
|
|
915
|
+
var ue = L(i.toIndex(s()));
|
|
916
|
+
J(y ? je(ue, h) : ue), ie && ie();
|
|
917
917
|
});
|
|
918
918
|
}
|
|
919
|
-
function
|
|
920
|
-
var
|
|
921
|
-
if (
|
|
922
|
-
var
|
|
923
|
-
|
|
919
|
+
function M(A) {
|
|
920
|
+
var X = d;
|
|
921
|
+
if (We(A)) {
|
|
922
|
+
var ce = A.match(/([+\-<>])(\d+)?/) || [], ie = ce[1], ue = ce[2];
|
|
923
|
+
ie === "+" || ie === "-" ? X = U(d + +("" + ie + (+ue || 1)), d) : ie === ">" ? X = ue ? b(+ue) : w(!0) : ie === "<" && (X = $(!0));
|
|
924
924
|
} else
|
|
925
|
-
|
|
926
|
-
return
|
|
925
|
+
X = u ? A : et(A, 0, h);
|
|
926
|
+
return X;
|
|
927
927
|
}
|
|
928
|
-
function
|
|
929
|
-
var
|
|
930
|
-
return
|
|
928
|
+
function H(A, X) {
|
|
929
|
+
var ce = x || (Q() ? 1 : v), ie = U(d + ce * (A ? -1 : 1), d, !(x || Q()));
|
|
930
|
+
return ie === -1 && f && !Cn(s(), l(!A), 1) ? A ? 0 : h : X ? ie : L(ie);
|
|
931
931
|
}
|
|
932
|
-
function
|
|
933
|
-
if (S() ||
|
|
934
|
-
var
|
|
935
|
-
|
|
932
|
+
function U(A, X, ce) {
|
|
933
|
+
if (S() || Q()) {
|
|
934
|
+
var ie = g(A);
|
|
935
|
+
ie !== A && (X = A, A = ie, ce = !1), A < 0 || A > h ? !x && (Mt(0, A, X, !0) || Mt(h, X, A, !0)) ? A = b(_(A)) : u ? A = ce ? A < 0 ? -(D % v || v) : D : A : r.rewind ? A = A < 0 ? h : 0 : A = -1 : ce && A !== X && (A = b(_(X) + (A < X ? -1 : 1)));
|
|
936
936
|
} else
|
|
937
|
-
|
|
938
|
-
return
|
|
939
|
-
}
|
|
940
|
-
function g(
|
|
941
|
-
if (f && r.trimSpace === "move" &&
|
|
942
|
-
for (var
|
|
943
|
-
|
|
944
|
-
return
|
|
945
|
-
}
|
|
946
|
-
function
|
|
947
|
-
return u ? (
|
|
948
|
-
}
|
|
949
|
-
function
|
|
950
|
-
for (var
|
|
951
|
-
if (p(D - 1, !0) !== p(
|
|
952
|
-
|
|
937
|
+
A = -1;
|
|
938
|
+
return A;
|
|
939
|
+
}
|
|
940
|
+
function g(A) {
|
|
941
|
+
if (f && r.trimSpace === "move" && A !== d)
|
|
942
|
+
for (var X = s(); X === p(A, !0) && Mt(A, 0, e.length - 1, !r.rewind); )
|
|
943
|
+
A < d ? --A : ++A;
|
|
944
|
+
return A;
|
|
945
|
+
}
|
|
946
|
+
function L(A) {
|
|
947
|
+
return u ? (A + D) % D || 0 : A;
|
|
948
|
+
}
|
|
949
|
+
function T() {
|
|
950
|
+
for (var A = D - (Q() || u && x ? 1 : v); y && A-- > 0; )
|
|
951
|
+
if (p(D - 1, !0) !== p(A, !0)) {
|
|
952
|
+
A++;
|
|
953
953
|
break;
|
|
954
954
|
}
|
|
955
|
-
return
|
|
955
|
+
return et(A, 0, D - 1);
|
|
956
956
|
}
|
|
957
|
-
function
|
|
958
|
-
return
|
|
957
|
+
function b(A) {
|
|
958
|
+
return et(Q() ? A : v * A, 0, h);
|
|
959
959
|
}
|
|
960
|
-
function
|
|
961
|
-
return
|
|
960
|
+
function _(A) {
|
|
961
|
+
return Q() ? je(A, h) : jt((A >= h ? D - 1 : A) / v);
|
|
962
962
|
}
|
|
963
|
-
function
|
|
964
|
-
var
|
|
965
|
-
return f ?
|
|
963
|
+
function B(A) {
|
|
964
|
+
var X = i.toIndex(A);
|
|
965
|
+
return f ? et(X, 0, h) : X;
|
|
966
966
|
}
|
|
967
|
-
function
|
|
968
|
-
|
|
967
|
+
function J(A) {
|
|
968
|
+
A !== d && (W = d, d = A);
|
|
969
969
|
}
|
|
970
|
-
function
|
|
971
|
-
return
|
|
970
|
+
function ee(A) {
|
|
971
|
+
return A ? W : d;
|
|
972
972
|
}
|
|
973
|
-
function
|
|
974
|
-
return !
|
|
973
|
+
function Q() {
|
|
974
|
+
return !xt(r.focus) || r.isNavigation;
|
|
975
975
|
}
|
|
976
|
-
function
|
|
977
|
-
return e.state.is([
|
|
976
|
+
function fe() {
|
|
977
|
+
return e.state.is([st, St]) && !!r.waitForTransition;
|
|
978
978
|
}
|
|
979
979
|
return {
|
|
980
|
-
mount:
|
|
981
|
-
go:
|
|
980
|
+
mount: E,
|
|
981
|
+
go: I,
|
|
982
982
|
scroll: O,
|
|
983
|
-
getNext:
|
|
984
|
-
getPrev:
|
|
985
|
-
getAdjacent:
|
|
986
|
-
getEnd:
|
|
987
|
-
setIndex:
|
|
988
|
-
getIndex:
|
|
989
|
-
toIndex:
|
|
990
|
-
toPage:
|
|
991
|
-
toDest:
|
|
992
|
-
hasFocus:
|
|
993
|
-
isBusy:
|
|
983
|
+
getNext: w,
|
|
984
|
+
getPrev: $,
|
|
985
|
+
getAdjacent: H,
|
|
986
|
+
getEnd: T,
|
|
987
|
+
setIndex: J,
|
|
988
|
+
getIndex: ee,
|
|
989
|
+
toIndex: b,
|
|
990
|
+
toPage: _,
|
|
991
|
+
toDest: B,
|
|
992
|
+
hasFocus: Q,
|
|
993
|
+
isBusy: fe
|
|
994
994
|
};
|
|
995
995
|
}
|
|
996
996
|
var Si = "http://www.w3.org/2000/svg", xi = "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", Rt = 40;
|
|
997
997
|
function wi(e, t, r) {
|
|
998
|
-
var n =
|
|
999
|
-
function
|
|
998
|
+
var n = de(e), o = n.on, a = n.bind, i = n.emit, s = r.classes, l = r.i18n, p = t.Elements, c = t.Controller, S = p.arrows, m = p.track, y = S, u = p.prev, f = p.next, w, $, d = {};
|
|
999
|
+
function h() {
|
|
1000
1000
|
D(), o(be, W);
|
|
1001
1001
|
}
|
|
1002
1002
|
function W() {
|
|
1003
|
-
|
|
1003
|
+
x(), h();
|
|
1004
1004
|
}
|
|
1005
1005
|
function D() {
|
|
1006
1006
|
var O = r.arrows;
|
|
1007
|
-
O && !(u && f) &&
|
|
1007
|
+
O && !(u && f) && k(), u && f && (ht(d, {
|
|
1008
1008
|
prev: u,
|
|
1009
1009
|
next: f
|
|
1010
|
-
}),
|
|
1010
|
+
}), bt(y, O ? "" : "none"), Ie(y, $ = Br + "--" + r.direction), O && (v(), I(), Z([u, f], At, m.id), i(In, u, f)));
|
|
1011
1011
|
}
|
|
1012
|
-
function
|
|
1013
|
-
n.destroy(),
|
|
1012
|
+
function x() {
|
|
1013
|
+
n.destroy(), Be(y, $), w ? (qe(S ? [u, f] : y), u = f = null) : Le([u, f], Or);
|
|
1014
1014
|
}
|
|
1015
1015
|
function v() {
|
|
1016
|
-
o([
|
|
1016
|
+
o([He, ct, me, Je, Pt], I), a(f, "click", se(E, ">")), a(u, "click", se(E, "<"));
|
|
1017
1017
|
}
|
|
1018
|
-
function
|
|
1018
|
+
function E(O) {
|
|
1019
1019
|
c.go(O, !0);
|
|
1020
1020
|
}
|
|
1021
|
-
function
|
|
1022
|
-
|
|
1021
|
+
function k() {
|
|
1022
|
+
y = S || nt("div", s.arrows), u = V(!0), f = V(!1), w = !0, $t(y, [u, f]), !S && Sr(y, m);
|
|
1023
1023
|
}
|
|
1024
1024
|
function V(O) {
|
|
1025
|
-
var
|
|
1026
|
-
return
|
|
1025
|
+
var M = '<button class="' + s.arrow + " " + (O ? s.prev : s.next) + '" type="button"><svg xmlns="' + Si + '" viewBox="0 0 ' + Rt + " " + Rt + '" width="' + Rt + '" height="' + Rt + '" focusable="false"><path d="' + (r.arrowPath || xi) + '" />';
|
|
1026
|
+
return hn(M);
|
|
1027
1027
|
}
|
|
1028
|
-
function
|
|
1028
|
+
function I() {
|
|
1029
1029
|
if (u && f) {
|
|
1030
|
-
var O = e.index,
|
|
1031
|
-
u.disabled =
|
|
1030
|
+
var O = e.index, M = c.getPrev(), H = c.getNext(), U = M > -1 && O < M ? l.last : l.prev, g = H > -1 && O > H ? l.first : l.next;
|
|
1031
|
+
u.disabled = M < 0, f.disabled = H < 0, Z(u, xe, U), Z(f, xe, g), i(Ln, u, f, M, H);
|
|
1032
1032
|
}
|
|
1033
1033
|
}
|
|
1034
1034
|
return {
|
|
1035
1035
|
arrows: d,
|
|
1036
|
-
mount:
|
|
1037
|
-
destroy:
|
|
1038
|
-
update:
|
|
1036
|
+
mount: h,
|
|
1037
|
+
destroy: x,
|
|
1038
|
+
update: I
|
|
1039
1039
|
};
|
|
1040
1040
|
}
|
|
1041
1041
|
var $i = wr + "-interval";
|
|
1042
1042
|
function Ei(e, t, r) {
|
|
1043
|
-
var n =
|
|
1044
|
-
function
|
|
1045
|
-
|
|
1043
|
+
var n = de(e), o = n.on, a = n.bind, i = n.emit, s = Xt(r.interval, e.go.bind(e, ">"), v), l = s.isPaused, p = t.Elements, c = t.Elements, S = c.root, m = c.toggle, y = r.autoplay, u, f, w = y === "pause";
|
|
1044
|
+
function $() {
|
|
1045
|
+
y && (d(), m && Z(m, At, p.track.id), w || h(), x());
|
|
1046
1046
|
}
|
|
1047
1047
|
function d() {
|
|
1048
|
-
r.pauseOnHover && a(S, "mouseenter mouseleave", function(
|
|
1049
|
-
u =
|
|
1050
|
-
}), r.pauseOnFocus && a(S, "focusin focusout", function(
|
|
1051
|
-
f =
|
|
1048
|
+
r.pauseOnHover && a(S, "mouseenter mouseleave", function(k) {
|
|
1049
|
+
u = k.type === "mouseenter", D();
|
|
1050
|
+
}), r.pauseOnFocus && a(S, "focusin focusout", function(k) {
|
|
1051
|
+
f = k.type === "focusin", D();
|
|
1052
1052
|
}), m && a(m, "click", function() {
|
|
1053
|
-
|
|
1054
|
-
}), o([
|
|
1053
|
+
w ? h() : W(!0);
|
|
1054
|
+
}), o([ze, Yt, me], s.rewind), o(ze, E);
|
|
1055
1055
|
}
|
|
1056
|
-
function
|
|
1057
|
-
l() && t.Slides.isEnough() && (s.start(!r.resetProgress), f = u =
|
|
1056
|
+
function h() {
|
|
1057
|
+
l() && t.Slides.isEnough() && (s.start(!r.resetProgress), f = u = w = !1, x(), i(Ir));
|
|
1058
1058
|
}
|
|
1059
|
-
function W(
|
|
1060
|
-
|
|
1059
|
+
function W(k) {
|
|
1060
|
+
k === void 0 && (k = !0), w = !!k, x(), l() || (s.pause(), i(Lr));
|
|
1061
1061
|
}
|
|
1062
1062
|
function D() {
|
|
1063
|
-
|
|
1063
|
+
w || (u || f ? W(!1) : h());
|
|
1064
1064
|
}
|
|
1065
|
-
function
|
|
1066
|
-
m && (
|
|
1065
|
+
function x() {
|
|
1066
|
+
m && (Oe(m, Ke, !w), Z(m, xe, r.i18n[w ? "play" : "pause"]));
|
|
1067
1067
|
}
|
|
1068
|
-
function v(
|
|
1068
|
+
function v(k) {
|
|
1069
1069
|
var V = p.bar;
|
|
1070
|
-
V &&
|
|
1070
|
+
V && Ee(V, "width", k * 100 + "%"), i(Nn, k);
|
|
1071
1071
|
}
|
|
1072
|
-
function
|
|
1073
|
-
var V = t.Slides.getAt(
|
|
1074
|
-
s.set(V && +
|
|
1072
|
+
function E(k) {
|
|
1073
|
+
var V = t.Slides.getAt(k);
|
|
1074
|
+
s.set(V && +Te(V.slide, $i) || r.interval);
|
|
1075
1075
|
}
|
|
1076
1076
|
return {
|
|
1077
|
-
mount:
|
|
1077
|
+
mount: $,
|
|
1078
1078
|
destroy: s.cancel,
|
|
1079
|
-
play:
|
|
1079
|
+
play: h,
|
|
1080
1080
|
pause: W,
|
|
1081
1081
|
isPaused: l
|
|
1082
1082
|
};
|
|
1083
1083
|
}
|
|
1084
1084
|
function Ti(e, t, r) {
|
|
1085
|
-
var n =
|
|
1085
|
+
var n = de(e), o = n.on;
|
|
1086
1086
|
function a() {
|
|
1087
|
-
r.cover && (o(kr, se(s, !0)), o([
|
|
1087
|
+
r.cover && (o(kr, se(s, !0)), o([He, be, me], se(i, !0)));
|
|
1088
1088
|
}
|
|
1089
1089
|
function i(l) {
|
|
1090
1090
|
t.Slides.forEach(function(p) {
|
|
1091
|
-
var c =
|
|
1091
|
+
var c = Et(p.container || p.slide, "img");
|
|
1092
1092
|
c && c.src && s(l, c, p);
|
|
1093
1093
|
});
|
|
1094
1094
|
}
|
|
1095
1095
|
function s(l, p, c) {
|
|
1096
|
-
c.style("background", l ? 'center/cover no-repeat url("' + p.src + '")' : "", !0),
|
|
1096
|
+
c.style("background", l ? 'center/cover no-repeat url("' + p.src + '")' : "", !0), bt(p, l ? "none" : "");
|
|
1097
1097
|
}
|
|
1098
1098
|
return {
|
|
1099
1099
|
mount: a,
|
|
@@ -1102,135 +1102,135 @@ function Ti(e, t, r) {
|
|
|
1102
1102
|
}
|
|
1103
1103
|
var Ai = 10, Ii = 600, Li = 0.6, ki = 1.5, Ri = 800;
|
|
1104
1104
|
function Ni(e, t, r) {
|
|
1105
|
-
var n =
|
|
1106
|
-
function
|
|
1107
|
-
o(
|
|
1105
|
+
var n = de(e), o = n.on, a = n.emit, i = e.state.set, s = t.Move, l = s.getPosition, p = s.getLimit, c = s.exceededLimit, S = s.translate, m = e.is(lt), y, u, f = 1;
|
|
1106
|
+
function w() {
|
|
1107
|
+
o(ze, W), o([be, me], D);
|
|
1108
1108
|
}
|
|
1109
|
-
function
|
|
1109
|
+
function $(v, E, k, V, I) {
|
|
1110
1110
|
var O = l();
|
|
1111
|
-
if (W(),
|
|
1112
|
-
var
|
|
1113
|
-
v = s.toPosition(t.Controller.toDest(v %
|
|
1111
|
+
if (W(), k && (!m || !c())) {
|
|
1112
|
+
var M = t.Layout.sliderSize(), H = dr(v) * M * jt(Ce(v) / M) || 0;
|
|
1113
|
+
v = s.toPosition(t.Controller.toDest(v % M)) + H;
|
|
1114
1114
|
}
|
|
1115
|
-
var
|
|
1116
|
-
f = 1,
|
|
1115
|
+
var U = Cn(O, v, 1);
|
|
1116
|
+
f = 1, E = U ? 0 : E || Wt(Ce(v - O) / ki, Ri), u = V, y = Xt(E, d, se(h, O, v, I), 1), i(St), a(Yt), y.start();
|
|
1117
1117
|
}
|
|
1118
1118
|
function d() {
|
|
1119
|
-
i(
|
|
1119
|
+
i(it), u && u(), a(Je);
|
|
1120
1120
|
}
|
|
1121
|
-
function
|
|
1122
|
-
var
|
|
1123
|
-
S(
|
|
1121
|
+
function h(v, E, k, V) {
|
|
1122
|
+
var I = l(), O = v + (E - v) * x(V), M = (O - I) * f;
|
|
1123
|
+
S(I + M), m && !k && c() && (f *= Li, Ce(M) < Ai && $(p(c(!0)), Ii, !1, u, !0));
|
|
1124
1124
|
}
|
|
1125
1125
|
function W() {
|
|
1126
|
-
|
|
1126
|
+
y && y.cancel();
|
|
1127
1127
|
}
|
|
1128
1128
|
function D() {
|
|
1129
|
-
|
|
1129
|
+
y && !y.isPaused() && (W(), d());
|
|
1130
1130
|
}
|
|
1131
|
-
function
|
|
1132
|
-
var
|
|
1133
|
-
return
|
|
1131
|
+
function x(v) {
|
|
1132
|
+
var E = r.easingFunc;
|
|
1133
|
+
return E ? E(v) : 1 - Math.pow(1 - v, 4);
|
|
1134
1134
|
}
|
|
1135
1135
|
return {
|
|
1136
|
-
mount:
|
|
1136
|
+
mount: w,
|
|
1137
1137
|
destroy: W,
|
|
1138
|
-
scroll:
|
|
1138
|
+
scroll: $,
|
|
1139
1139
|
cancel: D
|
|
1140
1140
|
};
|
|
1141
1141
|
}
|
|
1142
|
-
var
|
|
1142
|
+
var tt = {
|
|
1143
1143
|
passive: !1,
|
|
1144
1144
|
capture: !0
|
|
1145
1145
|
};
|
|
1146
1146
|
function Oi(e, t, r) {
|
|
1147
|
-
var n =
|
|
1147
|
+
var n = de(e), o = n.on, a = n.emit, i = n.bind, s = n.unbind, l = e.state, p = t.Move, c = t.Scroll, S = t.Controller, m = t.Elements.track, y = t.Media.reduce, u = t.Direction, f = u.resolve, w = u.orient, $ = p.getPosition, d = p.exceededLimit, h, W, D, x, v, E = !1, k, V, I;
|
|
1148
1148
|
function O() {
|
|
1149
|
-
i(m, or, ur,
|
|
1149
|
+
i(m, or, ur, tt), i(m, ir, ur, tt), i(m, Xn, H, tt), i(m, "click", L, {
|
|
1150
1150
|
capture: !0
|
|
1151
|
-
}), i(m, "dragstart",
|
|
1151
|
+
}), i(m, "dragstart", Ne), o([He, be], M);
|
|
1152
1152
|
}
|
|
1153
|
-
function
|
|
1154
|
-
var
|
|
1155
|
-
|
|
1153
|
+
function M() {
|
|
1154
|
+
var R = r.drag;
|
|
1155
|
+
De(!R), x = R === "free";
|
|
1156
1156
|
}
|
|
1157
|
-
function
|
|
1158
|
-
if (
|
|
1159
|
-
var C =
|
|
1160
|
-
|
|
1157
|
+
function H(R) {
|
|
1158
|
+
if (k = !1, !V) {
|
|
1159
|
+
var C = ue(R);
|
|
1160
|
+
ie(R.target) && (C || !R.button) && (S.isBusy() ? Ne(R, !0) : (I = C ? m : window, v = l.is([st, St]), D = null, i(I, or, U, tt), i(I, ir, g, tt), p.cancel(), c.cancel(), T(R)));
|
|
1161
1161
|
}
|
|
1162
1162
|
}
|
|
1163
|
-
function
|
|
1164
|
-
if (l.is(Bt) || (l.set(Bt), a(En)),
|
|
1163
|
+
function U(R) {
|
|
1164
|
+
if (l.is(Bt) || (l.set(Bt), a(En)), R.cancelable)
|
|
1165
1165
|
if (v) {
|
|
1166
|
-
p.translate(
|
|
1167
|
-
var C =
|
|
1168
|
-
(C ||
|
|
1169
|
-
} else
|
|
1166
|
+
p.translate(h + ce(Q(R)));
|
|
1167
|
+
var C = fe(R) > Kr, j = E !== (E = d());
|
|
1168
|
+
(C || j) && T(R), k = !0, a(Tn), Ne(R);
|
|
1169
|
+
} else B(R) && (v = _(R), Ne(R));
|
|
1170
1170
|
}
|
|
1171
|
-
function g(
|
|
1172
|
-
l.is(Bt) && (l.set(
|
|
1171
|
+
function g(R) {
|
|
1172
|
+
l.is(Bt) && (l.set(it), a(An)), v && (b(R), Ne(R)), s(I, or, U), s(I, ir, g), v = !1;
|
|
1173
1173
|
}
|
|
1174
|
-
function
|
|
1175
|
-
!V &&
|
|
1174
|
+
function L(R) {
|
|
1175
|
+
!V && k && Ne(R, !0);
|
|
1176
1176
|
}
|
|
1177
|
-
function
|
|
1178
|
-
D = W, W =
|
|
1177
|
+
function T(R) {
|
|
1178
|
+
D = W, W = R, h = $();
|
|
1179
1179
|
}
|
|
1180
|
-
function
|
|
1181
|
-
var C =
|
|
1182
|
-
|
|
1180
|
+
function b(R) {
|
|
1181
|
+
var C = J(R), j = ee(C), P = r.rewind && r.rewindByDrag;
|
|
1182
|
+
y(!1), x ? S.scroll(j, 0, r.snap) : e.is(It) ? S.go(w(dr(C)) < 0 ? P ? "<" : "-" : P ? ">" : "+") : e.is(lt) && E && P ? S.go(d(!0) ? ">" : "<") : S.go(S.toDest(j), !0), y(!0);
|
|
1183
1183
|
}
|
|
1184
|
-
function
|
|
1185
|
-
var C = r.dragMinThreshold,
|
|
1186
|
-
return
|
|
1184
|
+
function _(R) {
|
|
1185
|
+
var C = r.dragMinThreshold, j = mt(C), P = j && C.mouse || 0, q = (j ? C.touch : +C) || 10;
|
|
1186
|
+
return Ce(Q(R)) > (ue(R) ? q : P);
|
|
1187
1187
|
}
|
|
1188
|
-
function
|
|
1189
|
-
return
|
|
1188
|
+
function B(R) {
|
|
1189
|
+
return Ce(Q(R)) > Ce(Q(R, !0));
|
|
1190
1190
|
}
|
|
1191
|
-
function
|
|
1192
|
-
if (e.is(
|
|
1193
|
-
var C =
|
|
1191
|
+
function J(R) {
|
|
1192
|
+
if (e.is(ut) || !E) {
|
|
1193
|
+
var C = fe(R);
|
|
1194
1194
|
if (C && C < Kr)
|
|
1195
|
-
return
|
|
1195
|
+
return Q(R) / C;
|
|
1196
1196
|
}
|
|
1197
1197
|
return 0;
|
|
1198
1198
|
}
|
|
1199
|
-
function
|
|
1200
|
-
return
|
|
1199
|
+
function ee(R) {
|
|
1200
|
+
return $() + dr(R) * je(Ce(R) * (r.flickPower || 600), x ? 1 / 0 : t.Layout.listSize() * (r.flickMaxPages || 1));
|
|
1201
1201
|
}
|
|
1202
|
-
function
|
|
1203
|
-
return
|
|
1202
|
+
function Q(R, C) {
|
|
1203
|
+
return X(R, C) - X(A(R), C);
|
|
1204
1204
|
}
|
|
1205
|
-
function
|
|
1206
|
-
return pr(
|
|
1205
|
+
function fe(R) {
|
|
1206
|
+
return pr(R) - pr(A(R));
|
|
1207
1207
|
}
|
|
1208
|
-
function
|
|
1209
|
-
return W ===
|
|
1208
|
+
function A(R) {
|
|
1209
|
+
return W === R && D || W;
|
|
1210
1210
|
}
|
|
1211
|
-
function
|
|
1212
|
-
return (
|
|
1211
|
+
function X(R, C) {
|
|
1212
|
+
return (ue(R) ? R.changedTouches[0] : R)["page" + f(C ? "Y" : "X")];
|
|
1213
1213
|
}
|
|
1214
|
-
function
|
|
1215
|
-
return
|
|
1214
|
+
function ce(R) {
|
|
1215
|
+
return R / (E && e.is(lt) ? fi : 1);
|
|
1216
1216
|
}
|
|
1217
|
-
function
|
|
1217
|
+
function ie(R) {
|
|
1218
1218
|
var C = r.noDrag;
|
|
1219
|
-
return !yt(
|
|
1219
|
+
return !yt(R, "." + Pn + ", ." + er) && (!C || !yt(R, C));
|
|
1220
1220
|
}
|
|
1221
|
-
function
|
|
1222
|
-
return typeof TouchEvent < "u" &&
|
|
1221
|
+
function ue(R) {
|
|
1222
|
+
return typeof TouchEvent < "u" && R instanceof TouchEvent;
|
|
1223
1223
|
}
|
|
1224
|
-
function
|
|
1224
|
+
function $e() {
|
|
1225
1225
|
return v;
|
|
1226
1226
|
}
|
|
1227
|
-
function
|
|
1228
|
-
V =
|
|
1227
|
+
function De(R) {
|
|
1228
|
+
V = R;
|
|
1229
1229
|
}
|
|
1230
1230
|
return {
|
|
1231
1231
|
mount: O,
|
|
1232
|
-
disable:
|
|
1233
|
-
isDragging:
|
|
1232
|
+
disable: De,
|
|
1233
|
+
isDragging: $e
|
|
1234
1234
|
};
|
|
1235
1235
|
}
|
|
1236
1236
|
var Bi = {
|
|
@@ -1241,155 +1241,155 @@ var Bi = {
|
|
|
1241
1241
|
Down: Mn
|
|
1242
1242
|
};
|
|
1243
1243
|
function Fr(e) {
|
|
1244
|
-
return e =
|
|
1244
|
+
return e = We(e) ? e : e.key, Bi[e] || e;
|
|
1245
1245
|
}
|
|
1246
1246
|
var Jr = "keydown";
|
|
1247
1247
|
function Fi(e, t, r) {
|
|
1248
|
-
var n =
|
|
1248
|
+
var n = de(e), o = n.on, a = n.bind, i = n.unbind, s = e.root, l = t.Direction.resolve, p, c;
|
|
1249
1249
|
function S() {
|
|
1250
|
-
m(), o(be,
|
|
1250
|
+
m(), o(be, y), o(be, m), o(ze, f);
|
|
1251
1251
|
}
|
|
1252
1252
|
function m() {
|
|
1253
|
-
var
|
|
1254
|
-
|
|
1253
|
+
var $ = r.keyboard;
|
|
1254
|
+
$ && (p = $ === "global" ? window : s, a(p, Jr, w));
|
|
1255
1255
|
}
|
|
1256
|
-
function
|
|
1256
|
+
function y() {
|
|
1257
1257
|
i(p, Jr);
|
|
1258
1258
|
}
|
|
1259
|
-
function u(
|
|
1260
|
-
c =
|
|
1259
|
+
function u($) {
|
|
1260
|
+
c = $;
|
|
1261
1261
|
}
|
|
1262
1262
|
function f() {
|
|
1263
|
-
var
|
|
1263
|
+
var $ = c;
|
|
1264
1264
|
c = !0, fn(function() {
|
|
1265
|
-
c =
|
|
1265
|
+
c = $;
|
|
1266
1266
|
});
|
|
1267
1267
|
}
|
|
1268
|
-
function
|
|
1268
|
+
function w($) {
|
|
1269
1269
|
if (!c) {
|
|
1270
|
-
var d = Fr(
|
|
1270
|
+
var d = Fr($);
|
|
1271
1271
|
d === l(Kt) ? e.go("<") : d === l(Jt) && e.go(">");
|
|
1272
1272
|
}
|
|
1273
1273
|
}
|
|
1274
1274
|
return {
|
|
1275
1275
|
mount: S,
|
|
1276
|
-
destroy:
|
|
1276
|
+
destroy: y,
|
|
1277
1277
|
disable: u
|
|
1278
1278
|
};
|
|
1279
1279
|
}
|
|
1280
|
-
var
|
|
1280
|
+
var dt = wr + "-lazy", zt = dt + "-srcset", Mi = "[" + dt + "], [" + zt + "]";
|
|
1281
1281
|
function zi(e, t, r) {
|
|
1282
|
-
var n =
|
|
1282
|
+
var n = de(e), o = n.on, a = n.off, i = n.bind, s = n.emit, l = r.lazyLoad === "sequential", p = [ct, Je], c = [];
|
|
1283
1283
|
function S() {
|
|
1284
|
-
r.lazyLoad && (m(), o(
|
|
1284
|
+
r.lazyLoad && (m(), o(me, m));
|
|
1285
1285
|
}
|
|
1286
1286
|
function m() {
|
|
1287
|
-
|
|
1287
|
+
Me(c), y(), l ? $() : (a(p), o(p, u), u());
|
|
1288
1288
|
}
|
|
1289
|
-
function
|
|
1289
|
+
function y() {
|
|
1290
1290
|
t.Slides.forEach(function(d) {
|
|
1291
|
-
xr(d.slide, Mi).forEach(function(
|
|
1292
|
-
var W =
|
|
1293
|
-
if (W !==
|
|
1294
|
-
var
|
|
1295
|
-
c.push([
|
|
1291
|
+
xr(d.slide, Mi).forEach(function(h) {
|
|
1292
|
+
var W = Te(h, dt), D = Te(h, zt);
|
|
1293
|
+
if (W !== h.src || D !== h.srcset) {
|
|
1294
|
+
var x = r.classes.spinner, v = h.parentElement, E = Et(v, "." + x) || nt("span", x, v);
|
|
1295
|
+
c.push([h, d, E]), h.src || bt(h, "none");
|
|
1296
1296
|
}
|
|
1297
1297
|
});
|
|
1298
1298
|
});
|
|
1299
1299
|
}
|
|
1300
1300
|
function u() {
|
|
1301
1301
|
c = c.filter(function(d) {
|
|
1302
|
-
var
|
|
1303
|
-
return d[1].isWithin(e.index,
|
|
1302
|
+
var h = r.perPage * ((r.preloadPages || 1) + 1) - 1;
|
|
1303
|
+
return d[1].isWithin(e.index, h) ? f(d) : !0;
|
|
1304
1304
|
}), c.length || a(p);
|
|
1305
1305
|
}
|
|
1306
1306
|
function f(d) {
|
|
1307
|
-
var
|
|
1308
|
-
|
|
1307
|
+
var h = d[0];
|
|
1308
|
+
Ie(d[1].slide, yr), i(h, "load error", se(w, d)), Z(h, "src", Te(h, dt)), Z(h, "srcset", Te(h, zt)), Le(h, dt), Le(h, zt);
|
|
1309
1309
|
}
|
|
1310
|
-
function
|
|
1310
|
+
function w(d, h) {
|
|
1311
1311
|
var W = d[0], D = d[1];
|
|
1312
|
-
|
|
1312
|
+
Be(D.slide, yr), h.type !== "error" && (qe(d[2]), bt(W, ""), s(kr, W, D), s(at)), l && $();
|
|
1313
1313
|
}
|
|
1314
|
-
function
|
|
1314
|
+
function $() {
|
|
1315
1315
|
c.length && f(c.shift());
|
|
1316
1316
|
}
|
|
1317
1317
|
return {
|
|
1318
1318
|
mount: S,
|
|
1319
|
-
destroy: se(
|
|
1319
|
+
destroy: se(Me, c),
|
|
1320
1320
|
check: u
|
|
1321
1321
|
};
|
|
1322
1322
|
}
|
|
1323
1323
|
function Di(e, t, r) {
|
|
1324
|
-
var n =
|
|
1324
|
+
var n = de(e), o = n.on, a = n.emit, i = n.bind, s = t.Slides, l = t.Elements, p = t.Controller, c = p.hasFocus, S = p.getIndex, m = p.go, y = t.Direction.resolve, u = l.pagination, f = [], w, $;
|
|
1325
1325
|
function d() {
|
|
1326
|
-
|
|
1326
|
+
h(), o([be, me, Pt], d);
|
|
1327
1327
|
var V = r.pagination;
|
|
1328
|
-
u &&
|
|
1329
|
-
list:
|
|
1328
|
+
u && bt(u, V ? "" : "none"), V && (o([ze, Yt, Je], k), W(), k(), a(kn, {
|
|
1329
|
+
list: w,
|
|
1330
1330
|
items: f
|
|
1331
|
-
},
|
|
1331
|
+
}, E(e.index)));
|
|
1332
1332
|
}
|
|
1333
|
-
function
|
|
1334
|
-
|
|
1333
|
+
function h() {
|
|
1334
|
+
w && (qe(u ? Pe(w.children) : w), Be(w, $), Me(f), w = null), n.destroy();
|
|
1335
1335
|
}
|
|
1336
1336
|
function W() {
|
|
1337
|
-
var V = e.length,
|
|
1338
|
-
|
|
1339
|
-
for (var
|
|
1340
|
-
var g =
|
|
1341
|
-
class:
|
|
1337
|
+
var V = e.length, I = r.classes, O = r.i18n, M = r.perPage, H = c() ? p.getEnd() + 1 : Ct(V / M);
|
|
1338
|
+
w = u || nt("ul", I.pagination, l.track.parentElement), Ie(w, $ = tr + "--" + v()), Z(w, Fe, "tablist"), Z(w, xe, O.select), Z(w, Nr, v() === Zt ? "vertical" : "");
|
|
1339
|
+
for (var U = 0; U < H; U++) {
|
|
1340
|
+
var g = nt("li", null, w), L = nt("button", {
|
|
1341
|
+
class: I.page,
|
|
1342
1342
|
type: "button"
|
|
1343
|
-
}, g),
|
|
1344
|
-
return
|
|
1345
|
-
}),
|
|
1346
|
-
i(
|
|
1343
|
+
}, g), T = s.getIn(U).map(function(_) {
|
|
1344
|
+
return _.slide.id;
|
|
1345
|
+
}), b = !c() && M > 1 ? O.pageX : O.slideX;
|
|
1346
|
+
i(L, "click", se(D, U)), r.paginationKeyboard && i(L, "keydown", se(x, U)), Z(g, Fe, "presentation"), Z(L, Fe, "tab"), Z(L, At, T.join(" ")), Z(L, xe, fr(b, U + 1)), Z(L, ot, -1), f.push({
|
|
1347
1347
|
li: g,
|
|
1348
|
-
button:
|
|
1349
|
-
page:
|
|
1348
|
+
button: L,
|
|
1349
|
+
page: U
|
|
1350
1350
|
});
|
|
1351
1351
|
}
|
|
1352
1352
|
}
|
|
1353
1353
|
function D(V) {
|
|
1354
1354
|
m(">" + V, !0);
|
|
1355
1355
|
}
|
|
1356
|
-
function
|
|
1357
|
-
var O = f.length,
|
|
1358
|
-
|
|
1359
|
-
var g = f[
|
|
1360
|
-
g && (
|
|
1356
|
+
function x(V, I) {
|
|
1357
|
+
var O = f.length, M = Fr(I), H = v(), U = -1;
|
|
1358
|
+
M === y(Jt, !1, H) ? U = ++V % O : M === y(Kt, !1, H) ? U = (--V + O) % O : M === "Home" ? U = 0 : M === "End" && (U = O - 1);
|
|
1359
|
+
var g = f[U];
|
|
1360
|
+
g && (vn(g.button), m(">" + U), Ne(I, !0));
|
|
1361
1361
|
}
|
|
1362
1362
|
function v() {
|
|
1363
1363
|
return r.paginationDirection || r.direction;
|
|
1364
1364
|
}
|
|
1365
|
-
function
|
|
1365
|
+
function E(V) {
|
|
1366
1366
|
return f[p.toPage(V)];
|
|
1367
1367
|
}
|
|
1368
|
-
function
|
|
1369
|
-
var V =
|
|
1368
|
+
function k() {
|
|
1369
|
+
var V = E(S(!0)), I = E(S());
|
|
1370
1370
|
if (V) {
|
|
1371
1371
|
var O = V.button;
|
|
1372
|
-
|
|
1372
|
+
Be(O, Ke), Le(O, Ur), Z(O, ot, -1);
|
|
1373
1373
|
}
|
|
1374
|
-
if (
|
|
1375
|
-
var
|
|
1376
|
-
|
|
1374
|
+
if (I) {
|
|
1375
|
+
var M = I.button;
|
|
1376
|
+
Ie(M, Ke), Z(M, Ur, !0), Z(M, ot, "");
|
|
1377
1377
|
}
|
|
1378
1378
|
a(Rn, {
|
|
1379
|
-
list:
|
|
1379
|
+
list: w,
|
|
1380
1380
|
items: f
|
|
1381
|
-
}, V,
|
|
1381
|
+
}, V, I);
|
|
1382
1382
|
}
|
|
1383
1383
|
return {
|
|
1384
1384
|
items: f,
|
|
1385
1385
|
mount: d,
|
|
1386
|
-
destroy:
|
|
1387
|
-
getAt:
|
|
1388
|
-
update:
|
|
1386
|
+
destroy: h,
|
|
1387
|
+
getAt: E,
|
|
1388
|
+
update: k
|
|
1389
1389
|
};
|
|
1390
1390
|
}
|
|
1391
1391
|
var Vi = [" ", "Enter"];
|
|
1392
|
-
function
|
|
1392
|
+
function Wi(e, t, r) {
|
|
1393
1393
|
var n = r.isNavigation, o = r.slideFocus, a = [];
|
|
1394
1394
|
function i() {
|
|
1395
1395
|
e.splides.forEach(function(u) {
|
|
@@ -1399,52 +1399,52 @@ function ji(e, t, r) {
|
|
|
1399
1399
|
function s() {
|
|
1400
1400
|
a.forEach(function(u) {
|
|
1401
1401
|
u.destroy();
|
|
1402
|
-
}),
|
|
1402
|
+
}), Me(a);
|
|
1403
1403
|
}
|
|
1404
1404
|
function l() {
|
|
1405
1405
|
s(), i();
|
|
1406
1406
|
}
|
|
1407
1407
|
function p(u, f) {
|
|
1408
|
-
var
|
|
1409
|
-
|
|
1410
|
-
f.go(f.is(
|
|
1411
|
-
}), a.push(
|
|
1408
|
+
var w = de(u);
|
|
1409
|
+
w.on(ze, function($, d, h) {
|
|
1410
|
+
f.go(f.is(ut) ? h : $);
|
|
1411
|
+
}), a.push(w);
|
|
1412
1412
|
}
|
|
1413
1413
|
function c() {
|
|
1414
|
-
var u =
|
|
1415
|
-
f(Er, m), f(On,
|
|
1414
|
+
var u = de(e), f = u.on;
|
|
1415
|
+
f(Er, m), f(On, y), f([He, be], S), a.push(u), u.emit(Ar, e.splides);
|
|
1416
1416
|
}
|
|
1417
1417
|
function S() {
|
|
1418
|
-
|
|
1418
|
+
Z(t.Elements.list, Nr, r.direction === Zt ? "vertical" : "");
|
|
1419
1419
|
}
|
|
1420
1420
|
function m(u) {
|
|
1421
1421
|
e.go(u.index);
|
|
1422
1422
|
}
|
|
1423
|
-
function
|
|
1424
|
-
_r(Vi, Fr(f)) && (m(u),
|
|
1423
|
+
function y(u, f) {
|
|
1424
|
+
_r(Vi, Fr(f)) && (m(u), Ne(f));
|
|
1425
1425
|
}
|
|
1426
1426
|
return {
|
|
1427
1427
|
setup: se(t.Media.set, {
|
|
1428
|
-
slideFocus:
|
|
1428
|
+
slideFocus: xt(o) ? n : o
|
|
1429
1429
|
}, !0),
|
|
1430
1430
|
mount: i,
|
|
1431
1431
|
destroy: s,
|
|
1432
1432
|
remount: l
|
|
1433
1433
|
};
|
|
1434
1434
|
}
|
|
1435
|
-
function
|
|
1436
|
-
var n =
|
|
1435
|
+
function ji(e, t, r) {
|
|
1436
|
+
var n = de(e), o = n.bind, a = 0;
|
|
1437
1437
|
function i() {
|
|
1438
|
-
r.wheel && o(t.Elements.track, "wheel", s,
|
|
1438
|
+
r.wheel && o(t.Elements.track, "wheel", s, tt);
|
|
1439
1439
|
}
|
|
1440
1440
|
function s(p) {
|
|
1441
1441
|
if (p.cancelable) {
|
|
1442
|
-
var c = p.deltaY, S = c < 0, m = pr(p),
|
|
1443
|
-
|
|
1442
|
+
var c = p.deltaY, S = c < 0, m = pr(p), y = r.wheelMinThreshold || 0, u = r.wheelSleep || 0;
|
|
1443
|
+
Ce(c) > y && m - a > u && (e.go(S ? "<" : ">"), a = m), l(S) && Ne(p);
|
|
1444
1444
|
}
|
|
1445
1445
|
}
|
|
1446
1446
|
function l(p) {
|
|
1447
|
-
return !r.releaseWheel || e.state.is(
|
|
1447
|
+
return !r.releaseWheel || e.state.is(st) || t.Controller.getAdjacent(p) !== -1;
|
|
1448
1448
|
}
|
|
1449
1449
|
return {
|
|
1450
1450
|
mount: i
|
|
@@ -1452,18 +1452,18 @@ function Wi(e, t, r) {
|
|
|
1452
1452
|
}
|
|
1453
1453
|
var Pi = 90;
|
|
1454
1454
|
function Hi(e, t, r) {
|
|
1455
|
-
var n =
|
|
1455
|
+
var n = de(e), o = n.on, a = t.Elements.track, i = r.live && !r.isNavigation, s = nt("span", si), l = Xt(Pi, se(c, !1));
|
|
1456
1456
|
function p() {
|
|
1457
|
-
i && (m(!t.Autoplay.isPaused()),
|
|
1457
|
+
i && (m(!t.Autoplay.isPaused()), Z(a, Xr, !0), s.textContent = "…", o(Ir, se(m, !0)), o(Lr, se(m, !1)), o([ct, Je], se(c, !0)));
|
|
1458
1458
|
}
|
|
1459
|
-
function c(
|
|
1460
|
-
|
|
1459
|
+
function c(y) {
|
|
1460
|
+
Z(a, Yr, y), y ? ($t(a, s), l.start()) : (qe(s), l.cancel());
|
|
1461
1461
|
}
|
|
1462
1462
|
function S() {
|
|
1463
|
-
|
|
1463
|
+
Le(a, [Gr, Xr, Yr]), qe(s);
|
|
1464
1464
|
}
|
|
1465
|
-
function m(
|
|
1466
|
-
i &&
|
|
1465
|
+
function m(y) {
|
|
1466
|
+
i && Z(a, Gr, y ? "off" : "polite");
|
|
1467
1467
|
}
|
|
1468
1468
|
return {
|
|
1469
1469
|
mount: p,
|
|
@@ -1476,8 +1476,8 @@ var Ui = /* @__PURE__ */ Object.freeze({
|
|
|
1476
1476
|
Media: Qo,
|
|
1477
1477
|
Direction: ei,
|
|
1478
1478
|
Elements: gi,
|
|
1479
|
-
Slides:
|
|
1480
|
-
Layout:
|
|
1479
|
+
Slides: yi,
|
|
1480
|
+
Layout: vi,
|
|
1481
1481
|
Clones: bi,
|
|
1482
1482
|
Move: Ci,
|
|
1483
1483
|
Controller: _i,
|
|
@@ -1489,8 +1489,8 @@ var Ui = /* @__PURE__ */ Object.freeze({
|
|
|
1489
1489
|
Keyboard: Fi,
|
|
1490
1490
|
LazyLoad: zi,
|
|
1491
1491
|
Pagination: Di,
|
|
1492
|
-
Sync:
|
|
1493
|
-
Wheel:
|
|
1492
|
+
Sync: Wi,
|
|
1493
|
+
Wheel: ji,
|
|
1494
1494
|
Live: Hi
|
|
1495
1495
|
}), Gi = {
|
|
1496
1496
|
prev: "Previous slide",
|
|
@@ -1535,7 +1535,7 @@ var Ui = /* @__PURE__ */ Object.freeze({
|
|
|
1535
1535
|
function Xi(e, t, r) {
|
|
1536
1536
|
var n = t.Slides;
|
|
1537
1537
|
function o() {
|
|
1538
|
-
|
|
1538
|
+
de(e).on([He, me], a);
|
|
1539
1539
|
}
|
|
1540
1540
|
function a() {
|
|
1541
1541
|
n.forEach(function(s) {
|
|
@@ -1552,24 +1552,24 @@ function Xi(e, t, r) {
|
|
|
1552
1552
|
};
|
|
1553
1553
|
}
|
|
1554
1554
|
function qi(e, t, r) {
|
|
1555
|
-
var n = t.Move, o = t.Controller, a = t.Scroll, i = t.Elements.list, s = se(
|
|
1555
|
+
var n = t.Move, o = t.Controller, a = t.Scroll, i = t.Elements.list, s = se(Ee, i, "transition"), l;
|
|
1556
1556
|
function p() {
|
|
1557
|
-
|
|
1558
|
-
|
|
1557
|
+
de(e).bind(i, "transitionend", function(y) {
|
|
1558
|
+
y.target === i && l && (S(), l());
|
|
1559
1559
|
});
|
|
1560
1560
|
}
|
|
1561
|
-
function c(
|
|
1562
|
-
var f = n.toPosition(
|
|
1563
|
-
|
|
1561
|
+
function c(y, u) {
|
|
1562
|
+
var f = n.toPosition(y, !0), w = n.getPosition(), $ = m(y);
|
|
1563
|
+
Ce(f - w) >= 1 && $ >= 1 ? r.useScroll ? a.scroll(f, $, !1, u) : (s("transform " + $ + "ms " + r.easing), n.translate(f, !0), l = u) : (n.jump(y), u());
|
|
1564
1564
|
}
|
|
1565
1565
|
function S() {
|
|
1566
1566
|
s(""), a.cancel();
|
|
1567
1567
|
}
|
|
1568
|
-
function m(
|
|
1568
|
+
function m(y) {
|
|
1569
1569
|
var u = r.rewindSpeed;
|
|
1570
|
-
if (e.is(
|
|
1571
|
-
var f = o.getIndex(!0),
|
|
1572
|
-
if (f === 0 &&
|
|
1570
|
+
if (e.is(lt) && u) {
|
|
1571
|
+
var f = o.getIndex(!0), w = o.getEnd();
|
|
1572
|
+
if (f === 0 && y >= w || f >= w && y === 0)
|
|
1573
1573
|
return u;
|
|
1574
1574
|
}
|
|
1575
1575
|
return r.speed;
|
|
@@ -1582,39 +1582,39 @@ function qi(e, t, r) {
|
|
|
1582
1582
|
}
|
|
1583
1583
|
var Ki = /* @__PURE__ */ (function() {
|
|
1584
1584
|
function e(r, n) {
|
|
1585
|
-
this.event =
|
|
1586
|
-
var o =
|
|
1587
|
-
|
|
1588
|
-
label:
|
|
1589
|
-
labelledby:
|
|
1585
|
+
this.event = de(), this.Components = {}, this.state = Jo(rt), this.splides = [], this._o = {}, this._E = {};
|
|
1586
|
+
var o = We(r) ? bn(document, r) : r;
|
|
1587
|
+
pt(o, o + " is invalid."), this.root = o, n = Ve({
|
|
1588
|
+
label: Te(o, xe) || "",
|
|
1589
|
+
labelledby: Te(o, Rr) || ""
|
|
1590
1590
|
}, Yi, e.defaults, n || {});
|
|
1591
1591
|
try {
|
|
1592
|
-
|
|
1592
|
+
Ve(n, JSON.parse(Te(o, wr)));
|
|
1593
1593
|
} catch {
|
|
1594
|
-
|
|
1594
|
+
pt(!1, "Invalid JSON");
|
|
1595
1595
|
}
|
|
1596
|
-
this._o = Object.create(
|
|
1596
|
+
this._o = Object.create(Ve({}, n));
|
|
1597
1597
|
}
|
|
1598
1598
|
var t = e.prototype;
|
|
1599
1599
|
return t.mount = function(n, o) {
|
|
1600
1600
|
var a = this, i = this.state, s = this.Components;
|
|
1601
|
-
|
|
1602
|
-
var l =
|
|
1601
|
+
pt(i.is([rt, Vt]), "Already mounted!"), i.set(rt), this._C = s, this._T = o || this._T || (this.is(It) ? Xi : qi), this._E = n || this._E;
|
|
1602
|
+
var l = ht({}, Ui, this._E, {
|
|
1603
1603
|
Transition: this._T
|
|
1604
1604
|
});
|
|
1605
|
-
return
|
|
1605
|
+
return Xe(l, function(p, c) {
|
|
1606
1606
|
var S = p(a, s, a._o);
|
|
1607
1607
|
s[c] = S, S.setup && S.setup();
|
|
1608
|
-
}),
|
|
1608
|
+
}), Xe(s, function(p) {
|
|
1609
1609
|
p.mount && p.mount();
|
|
1610
|
-
}), this.emit(
|
|
1610
|
+
}), this.emit(He), Ie(this.root, ci), i.set(it), this.emit(gr), this;
|
|
1611
1611
|
}, t.sync = function(n) {
|
|
1612
1612
|
return this.splides.push({
|
|
1613
1613
|
splide: n
|
|
1614
1614
|
}), n.splides.push({
|
|
1615
1615
|
splide: this,
|
|
1616
1616
|
isParent: !0
|
|
1617
|
-
}), this.state.is(
|
|
1617
|
+
}), this.state.is(it) && (this._C.Sync.remount(), n.Components.Sync.remount()), this;
|
|
1618
1618
|
}, t.go = function(n) {
|
|
1619
1619
|
return this._C.Controller.go(n), this;
|
|
1620
1620
|
}, t.on = function(n, o) {
|
|
@@ -1623,7 +1623,7 @@ var Ki = /* @__PURE__ */ (function() {
|
|
|
1623
1623
|
return this.event.off(n), this;
|
|
1624
1624
|
}, t.emit = function(n) {
|
|
1625
1625
|
var o;
|
|
1626
|
-
return (o = this.event).emit.apply(o, [n].concat(
|
|
1626
|
+
return (o = this.event).emit.apply(o, [n].concat(Pe(arguments, 1))), this;
|
|
1627
1627
|
}, t.add = function(n, o) {
|
|
1628
1628
|
return this._C.Slides.add(n, o), this;
|
|
1629
1629
|
}, t.remove = function(n) {
|
|
@@ -1631,13 +1631,13 @@ var Ki = /* @__PURE__ */ (function() {
|
|
|
1631
1631
|
}, t.is = function(n) {
|
|
1632
1632
|
return this._o.type === n;
|
|
1633
1633
|
}, t.refresh = function() {
|
|
1634
|
-
return this.emit(
|
|
1634
|
+
return this.emit(me), this;
|
|
1635
1635
|
}, t.destroy = function(n) {
|
|
1636
1636
|
n === void 0 && (n = !0);
|
|
1637
1637
|
var o = this.event, a = this.state;
|
|
1638
|
-
return a.is(
|
|
1638
|
+
return a.is(rt) ? de(this).on(gr, this.destroy.bind(this, n)) : (Xe(this._C, function(i) {
|
|
1639
1639
|
i.destroy && i.destroy(n);
|
|
1640
|
-
}, !0), o.emit(Tr), o.destroy(), n &&
|
|
1640
|
+
}, !0), o.emit(Tr), o.destroy(), n && Me(this.splides), a.set(Vt)), this;
|
|
1641
1641
|
}, Go(e, [{
|
|
1642
1642
|
key: "options",
|
|
1643
1643
|
get: function() {
|
|
@@ -1661,24 +1661,24 @@ var Ki = /* @__PURE__ */ (function() {
|
|
|
1661
1661
|
Mr.defaults = {};
|
|
1662
1662
|
Mr.STATES = Xo;
|
|
1663
1663
|
var Zr = [
|
|
1664
|
-
[
|
|
1664
|
+
[He, "onMounted"],
|
|
1665
1665
|
[gr, "onReady"],
|
|
1666
|
-
[
|
|
1667
|
-
[
|
|
1666
|
+
[ze, "onMove"],
|
|
1667
|
+
[ct, "onMoved"],
|
|
1668
1668
|
[Er, "onClick"],
|
|
1669
1669
|
[Sn, "onActive"],
|
|
1670
1670
|
[xn, "onInactive"],
|
|
1671
1671
|
[wn, "onVisible"],
|
|
1672
1672
|
[$n, "onHidden"],
|
|
1673
|
-
[
|
|
1673
|
+
[me, "onRefresh"],
|
|
1674
1674
|
[be, "onUpdated"],
|
|
1675
|
-
[
|
|
1675
|
+
[at, "onResize"],
|
|
1676
1676
|
[Gt, "onResized"],
|
|
1677
1677
|
[En, "onDrag"],
|
|
1678
1678
|
[Tn, "onDragging"],
|
|
1679
1679
|
[An, "onDragged"],
|
|
1680
1680
|
[Yt, "onScroll"],
|
|
1681
|
-
[
|
|
1681
|
+
[Je, "onScrolled"],
|
|
1682
1682
|
[Tr, "onDestroy"],
|
|
1683
1683
|
[In, "onArrowsMounted"],
|
|
1684
1684
|
[Ln, "onArrowsUpdated"],
|
|
@@ -1696,12 +1696,12 @@ function zr(...e) {
|
|
|
1696
1696
|
function Ht(e) {
|
|
1697
1697
|
return e !== null && typeof e == "object";
|
|
1698
1698
|
}
|
|
1699
|
-
function
|
|
1699
|
+
function vr(e, t) {
|
|
1700
1700
|
if (Array.isArray(e) && Array.isArray(t))
|
|
1701
|
-
return e.length === t.length && !e.some((r, n) => !
|
|
1701
|
+
return e.length === t.length && !e.some((r, n) => !vr(r, t[n]));
|
|
1702
1702
|
if (Ht(e) && Ht(t)) {
|
|
1703
1703
|
const r = Object.keys(e), n = Object.keys(t);
|
|
1704
|
-
return r.length === n.length && !r.some((o) => !Object.prototype.hasOwnProperty.call(t, o) || !
|
|
1704
|
+
return r.length === n.length && !r.some((o) => !Object.prototype.hasOwnProperty.call(t, o) || !vr(e[o], t[o]));
|
|
1705
1705
|
}
|
|
1706
1706
|
return e === t;
|
|
1707
1707
|
}
|
|
@@ -1719,24 +1719,24 @@ function Zi(e, t) {
|
|
|
1719
1719
|
}
|
|
1720
1720
|
return e;
|
|
1721
1721
|
}
|
|
1722
|
-
function
|
|
1722
|
+
function hr(e, t) {
|
|
1723
1723
|
const r = e;
|
|
1724
1724
|
return Zi(t, (n, o) => {
|
|
1725
|
-
Array.isArray(n) ? r[o] = n.slice() : Ht(n) ? r[o] =
|
|
1725
|
+
Array.isArray(n) ? r[o] = n.slice() : Ht(n) ? r[o] = hr(Ht(r[o]) ? r[o] : {}, n) : r[o] = n;
|
|
1726
1726
|
}), r;
|
|
1727
1727
|
}
|
|
1728
|
-
var Qi = ({ children: e, className: t, ...r }) => /* @__PURE__ */
|
|
1728
|
+
var Qi = ({ children: e, className: t, ...r }) => /* @__PURE__ */ Ye.createElement("div", {
|
|
1729
1729
|
className: zr("splide__track", t),
|
|
1730
1730
|
...r
|
|
1731
|
-
}, /* @__PURE__ */
|
|
1731
|
+
}, /* @__PURE__ */ Ye.createElement("ul", {
|
|
1732
1732
|
className: "splide__list"
|
|
1733
|
-
}, e)), qn = class extends
|
|
1733
|
+
}, e)), qn = class extends Ye.Component {
|
|
1734
1734
|
constructor() {
|
|
1735
|
-
super(...arguments), this.splideRef =
|
|
1735
|
+
super(...arguments), this.splideRef = Ye.createRef(), this.slides = [];
|
|
1736
1736
|
}
|
|
1737
1737
|
componentDidMount() {
|
|
1738
1738
|
const { options: e, extensions: t, transition: r } = this.props, { current: n } = this.splideRef;
|
|
1739
|
-
n && (this.splide = new Mr(n, e), this.bind(this.splide), this.splide.mount(t, r), this.options =
|
|
1739
|
+
n && (this.splide = new Mr(n, e), this.bind(this.splide), this.splide.mount(t, r), this.options = hr({}, e || {}), this.slides = this.getSlides());
|
|
1740
1740
|
}
|
|
1741
1741
|
componentWillUnmount() {
|
|
1742
1742
|
this.splide && (this.splide.destroy(), this.splide = void 0), this.options = void 0, this.slides.length = 0;
|
|
@@ -1745,7 +1745,7 @@ var Qi = ({ children: e, className: t, ...r }) => /* @__PURE__ */ je.createEleme
|
|
|
1745
1745
|
if (!this.splide)
|
|
1746
1746
|
return;
|
|
1747
1747
|
const { options: e } = this.props;
|
|
1748
|
-
e && !
|
|
1748
|
+
e && !vr(this.options, e) && (this.splide.options = e, this.options = hr({}, e));
|
|
1749
1749
|
const t = this.getSlides();
|
|
1750
1750
|
Ji(this.slides, t) || (this.splide.refresh(), this.slides = t);
|
|
1751
1751
|
}
|
|
@@ -1780,13 +1780,13 @@ var Qi = ({ children: e, className: t, ...r }) => /* @__PURE__ */ je.createEleme
|
|
|
1780
1780
|
}
|
|
1781
1781
|
render() {
|
|
1782
1782
|
const { className: e, tag: t = "div", hasTrack: r = !0, children: n, ...o } = this.props;
|
|
1783
|
-
return /* @__PURE__ */
|
|
1783
|
+
return /* @__PURE__ */ Ye.createElement(t, {
|
|
1784
1784
|
className: zr("splide", e),
|
|
1785
1785
|
ref: this.splideRef,
|
|
1786
1786
|
...this.omit(o, ["options", ...Zr.map((a) => a[1])])
|
|
1787
|
-
}, r ? /* @__PURE__ */
|
|
1787
|
+
}, r ? /* @__PURE__ */ Ye.createElement(Qi, null, n) : n);
|
|
1788
1788
|
}
|
|
1789
|
-
}, Kn = ({ children: e, className: t, ...r }) => /* @__PURE__ */
|
|
1789
|
+
}, Kn = ({ children: e, className: t, ...r }) => /* @__PURE__ */ Ye.createElement("li", {
|
|
1790
1790
|
className: zr("splide__slide", t),
|
|
1791
1791
|
...r
|
|
1792
1792
|
}, e);
|
|
@@ -1800,7 +1800,7 @@ const ea = "RichTextRenderer-module__link___BWeZ2", ta = {
|
|
|
1800
1800
|
link: ea
|
|
1801
1801
|
}, Jn = ({ content: e }) => {
|
|
1802
1802
|
const t = (r) => r.map((n, o) => n.type === "link" ? /* @__PURE__ */ N("a", { className: ta.link, href: n.value, target: n.target, children: t(n.children) }, o) : /* @__PURE__ */ N("span", { style: ra(n), children: n.text }, o));
|
|
1803
|
-
return /* @__PURE__ */ N(
|
|
1803
|
+
return /* @__PURE__ */ N(gt, { children: e.map((r, n) => {
|
|
1804
1804
|
const o = r.children;
|
|
1805
1805
|
return /* @__PURE__ */ N("div", { children: t(o) }, n);
|
|
1806
1806
|
}) });
|
|
@@ -1822,18 +1822,18 @@ function ra(e) {
|
|
|
1822
1822
|
const na = "SvgImage-module__svg___q3xE-", oa = "SvgImage-module__img___VsTm-", Qr = {
|
|
1823
1823
|
svg: na,
|
|
1824
1824
|
img: oa
|
|
1825
|
-
},
|
|
1825
|
+
}, ft = ({ url: e, fill: t = "#000000", hoverFill: r = "#CCCCCC", className: n = "" }) => {
|
|
1826
1826
|
const [o, a] = le(!0);
|
|
1827
1827
|
return ve(() => {
|
|
1828
1828
|
if (typeof window < "u" && window.CSS) {
|
|
1829
1829
|
const i = CSS.supports("mask-image", 'url("")') || CSS.supports("-webkit-mask-image", 'url("")');
|
|
1830
1830
|
a(i);
|
|
1831
1831
|
}
|
|
1832
|
-
}, []), !e.endsWith(".svg") || !o ? /* @__PURE__ */ N("img", { src: e, alt: "", className:
|
|
1832
|
+
}, []), !e.endsWith(".svg") || !o ? /* @__PURE__ */ N("img", { src: e, alt: "", className: pe(Qr.img, n) }) : /* @__PURE__ */ N(
|
|
1833
1833
|
"span",
|
|
1834
1834
|
{
|
|
1835
1835
|
"data-supports-mask": o,
|
|
1836
|
-
className:
|
|
1836
|
+
className: pe(Qr.svg, n),
|
|
1837
1837
|
style: {
|
|
1838
1838
|
"--svg": `url(${e})`,
|
|
1839
1839
|
"--fill": t,
|
|
@@ -1842,37 +1842,37 @@ const na = "SvgImage-module__svg___q3xE-", oa = "SvgImage-module__img___VsTm-",
|
|
|
1842
1842
|
}
|
|
1843
1843
|
);
|
|
1844
1844
|
}, ia = {
|
|
1845
|
-
"top-left":
|
|
1846
|
-
"top-center":
|
|
1847
|
-
"top-right":
|
|
1848
|
-
"middle-left":
|
|
1849
|
-
"middle-center":
|
|
1850
|
-
"middle-right":
|
|
1851
|
-
"bottom-left":
|
|
1852
|
-
"bottom-center":
|
|
1853
|
-
"bottom-right":
|
|
1845
|
+
"top-left": Y.topLeftAlignment,
|
|
1846
|
+
"top-center": Y.topCenterAlignment,
|
|
1847
|
+
"top-right": Y.topRightAlignment,
|
|
1848
|
+
"middle-left": Y.middleLeftAlignment,
|
|
1849
|
+
"middle-center": Y.middleCenterAlignment,
|
|
1850
|
+
"middle-right": Y.middleRightAlignment,
|
|
1851
|
+
"bottom-left": Y.bottomLeftAlignment,
|
|
1852
|
+
"bottom-center": Y.bottomCenterAlignment,
|
|
1853
|
+
"bottom-right": Y.bottomRightAlignment
|
|
1854
1854
|
};
|
|
1855
1855
|
function aa({ settings: e, content: t, styles: r, isEditor: n }) {
|
|
1856
|
-
const [o, a] = le(null), { widthSettings: i, fontSettings: s, letterSpacing: l, textAlign: p, wordSpacing: c, fontSizeLineHeight: S, textAppearance: m, color:
|
|
1856
|
+
const [o, a] = le(null), { widthSettings: i, fontSettings: s, letterSpacing: l, textAlign: p, wordSpacing: c, fontSizeLineHeight: S, textAppearance: m, color: y } = r.imageCaption, [u, f] = le(void 0), [w, $] = le(null), [d, h] = le(0), [W, D] = le(0), { direction: x, transition: v, controls: E, pagination: k, imageCaption: V, triggers: I } = e, O = _e(v.type), { x: M, y: H } = e.controls.offset, U = (g) => {
|
|
1857
1857
|
o && o.go(g);
|
|
1858
1858
|
};
|
|
1859
1859
|
return ve(() => {
|
|
1860
|
-
if (!
|
|
1861
|
-
const g = new ResizeObserver((
|
|
1860
|
+
if (!w) return;
|
|
1861
|
+
const g = new ResizeObserver((L) => {
|
|
1862
1862
|
if (!o) return;
|
|
1863
|
-
const [
|
|
1863
|
+
const [T] = L;
|
|
1864
1864
|
f({
|
|
1865
|
-
width: Math.round(
|
|
1866
|
-
height: Math.round(
|
|
1865
|
+
width: Math.round(T.contentRect.width),
|
|
1866
|
+
height: Math.round(T.contentRect.height)
|
|
1867
1867
|
});
|
|
1868
1868
|
});
|
|
1869
|
-
return g.observe(
|
|
1870
|
-
}, [
|
|
1869
|
+
return g.observe(w), () => g.unobserve(w);
|
|
1870
|
+
}, [w]), ve(() => {
|
|
1871
1871
|
!o || O.current === v.type || (D((g) => g + 1), O.current = v.type);
|
|
1872
|
-
}, [v.type]), /* @__PURE__ */ N("div", { className:
|
|
1872
|
+
}, [v.type]), /* @__PURE__ */ N("div", { className: pe(Y.wrapper, { [Y.editor]: n }), ref: $, children: /* @__PURE__ */ he(
|
|
1873
1873
|
"div",
|
|
1874
1874
|
{
|
|
1875
|
-
className:
|
|
1875
|
+
className: Y.sliderInner,
|
|
1876
1876
|
style: {
|
|
1877
1877
|
width: u ? u.width : "100%",
|
|
1878
1878
|
height: u ? u.height : "100%",
|
|
@@ -1882,51 +1882,51 @@ function aa({ settings: e, content: t, styles: r, isEditor: n }) {
|
|
|
1882
1882
|
e.imageCaption.isActive && /* @__PURE__ */ N(
|
|
1883
1883
|
"div",
|
|
1884
1884
|
{
|
|
1885
|
-
className:
|
|
1885
|
+
className: pe(Y.captionBlock),
|
|
1886
1886
|
children: /* @__PURE__ */ N(
|
|
1887
1887
|
"div",
|
|
1888
1888
|
{
|
|
1889
|
-
className:
|
|
1890
|
-
children: t.map((g,
|
|
1889
|
+
className: Y.captionTextWrapper,
|
|
1890
|
+
children: t.map((g, L) => /* @__PURE__ */ N(
|
|
1891
1891
|
"div",
|
|
1892
1892
|
{
|
|
1893
|
-
className:
|
|
1894
|
-
[
|
|
1895
|
-
[
|
|
1893
|
+
className: pe(Y.captionText, ia[V.alignment], {
|
|
1894
|
+
[Y.withPointerEvents]: L === d && n,
|
|
1895
|
+
[Y.active]: L === d
|
|
1896
1896
|
}),
|
|
1897
1897
|
style: {
|
|
1898
1898
|
fontFamily: s.fontFamily,
|
|
1899
1899
|
fontWeight: s.fontWeight,
|
|
1900
1900
|
fontStyle: s.fontStyle,
|
|
1901
|
-
width: i.sizing === "auto" ? "max-content" :
|
|
1902
|
-
letterSpacing:
|
|
1903
|
-
wordSpacing:
|
|
1901
|
+
width: i.sizing === "auto" ? "max-content" : F(i.width, n),
|
|
1902
|
+
letterSpacing: F(l, n),
|
|
1903
|
+
wordSpacing: F(c, n),
|
|
1904
1904
|
textAlign: p,
|
|
1905
|
-
fontSize:
|
|
1906
|
-
lineHeight:
|
|
1905
|
+
fontSize: F(S.fontSize, n),
|
|
1906
|
+
lineHeight: F(S.lineHeight, n),
|
|
1907
1907
|
textTransform: m.textTransform ?? "none",
|
|
1908
1908
|
textDecoration: m.textDecoration ?? "none",
|
|
1909
1909
|
fontVariant: m.fontVariant ?? "normal",
|
|
1910
|
-
color:
|
|
1910
|
+
color: y,
|
|
1911
1911
|
transitionDuration: v.duration ? `${Math.round(parseInt(v.duration) / 2)}ms` : "500ms"
|
|
1912
1912
|
},
|
|
1913
1913
|
children: /* @__PURE__ */ N(
|
|
1914
1914
|
"div",
|
|
1915
1915
|
{
|
|
1916
1916
|
"data-styles": "imageCaption",
|
|
1917
|
-
className:
|
|
1917
|
+
className: Y.captionTextInner,
|
|
1918
1918
|
style: {
|
|
1919
1919
|
"--link-hover-color": V.linkHoverColor,
|
|
1920
1920
|
"--link-color": V.linkColor,
|
|
1921
1921
|
position: "relative",
|
|
1922
|
-
top:
|
|
1923
|
-
left:
|
|
1922
|
+
top: F(V.offset.y, n),
|
|
1923
|
+
left: F(V.offset.x, n)
|
|
1924
1924
|
},
|
|
1925
1925
|
children: /* @__PURE__ */ N(Jn, { content: g.imageCaption })
|
|
1926
1926
|
}
|
|
1927
1927
|
)
|
|
1928
1928
|
},
|
|
1929
|
-
|
|
1929
|
+
L
|
|
1930
1930
|
))
|
|
1931
1931
|
}
|
|
1932
1932
|
)
|
|
@@ -1936,39 +1936,39 @@ function aa({ settings: e, content: t, styles: r, isEditor: n }) {
|
|
|
1936
1936
|
qn,
|
|
1937
1937
|
{
|
|
1938
1938
|
onMove: (g) => {
|
|
1939
|
-
|
|
1939
|
+
h(g.index);
|
|
1940
1940
|
},
|
|
1941
1941
|
ref: a,
|
|
1942
1942
|
options: {
|
|
1943
1943
|
arrows: !1,
|
|
1944
1944
|
speed: v.duration ? parseInt(v.duration) : 500,
|
|
1945
|
-
autoplay:
|
|
1946
|
-
...
|
|
1947
|
-
interval: parseInt(
|
|
1945
|
+
autoplay: I.autoPlay !== null,
|
|
1946
|
+
...I.autoPlay !== null && {
|
|
1947
|
+
interval: parseInt(I.autoPlay) * 1e3
|
|
1948
1948
|
},
|
|
1949
|
-
direction:
|
|
1949
|
+
direction: x === "horiz" || v.type === "fade in" ? "ltr" : "ttb",
|
|
1950
1950
|
pagination: !1,
|
|
1951
|
-
drag:
|
|
1951
|
+
drag: I.triggersList.drag,
|
|
1952
1952
|
perPage: 1,
|
|
1953
1953
|
width: u ? u.width : "100%",
|
|
1954
1954
|
height: u ? u.height : "100%",
|
|
1955
1955
|
type: v.type === "fade in" ? "fade" : "loop",
|
|
1956
1956
|
rewind: !0
|
|
1957
1957
|
},
|
|
1958
|
-
children: t.map((g,
|
|
1958
|
+
children: t.map((g, L) => /* @__PURE__ */ N(Kn, { children: /* @__PURE__ */ N(
|
|
1959
1959
|
"div",
|
|
1960
1960
|
{
|
|
1961
|
-
className:
|
|
1961
|
+
className: Y.sliderItem,
|
|
1962
1962
|
children: /* @__PURE__ */ N(
|
|
1963
1963
|
"div",
|
|
1964
1964
|
{
|
|
1965
|
-
className:
|
|
1965
|
+
className: Y.imgWrapper,
|
|
1966
1966
|
children: /* @__PURE__ */ N(
|
|
1967
1967
|
"img",
|
|
1968
1968
|
{
|
|
1969
|
-
className:
|
|
1970
|
-
[
|
|
1971
|
-
[
|
|
1969
|
+
className: pe(Y.sliderImage, {
|
|
1970
|
+
[Y.contain]: g.image.objectFit === "contain",
|
|
1971
|
+
[Y.cover]: g.image.objectFit === "cover"
|
|
1972
1972
|
}),
|
|
1973
1973
|
src: g.image.url,
|
|
1974
1974
|
alt: g.image.name ?? ""
|
|
@@ -1977,43 +1977,43 @@ function aa({ settings: e, content: t, styles: r, isEditor: n }) {
|
|
|
1977
1977
|
}
|
|
1978
1978
|
)
|
|
1979
1979
|
}
|
|
1980
|
-
) },
|
|
1980
|
+
) }, L))
|
|
1981
1981
|
},
|
|
1982
1982
|
W
|
|
1983
1983
|
),
|
|
1984
|
-
|
|
1984
|
+
E.isActive && /* @__PURE__ */ he(gt, { children: [
|
|
1985
1985
|
/* @__PURE__ */ N(
|
|
1986
1986
|
"div",
|
|
1987
1987
|
{
|
|
1988
|
-
className:
|
|
1989
|
-
[
|
|
1990
|
-
[
|
|
1988
|
+
className: pe(Y.arrow, {
|
|
1989
|
+
[Y.arrowVertical]: x === "vert",
|
|
1990
|
+
[Y.hoverArrow]: E.show === "on hover"
|
|
1991
1991
|
}),
|
|
1992
1992
|
style: {
|
|
1993
|
-
color:
|
|
1994
|
-
"--arrow-hover-color":
|
|
1993
|
+
color: E.color,
|
|
1994
|
+
"--arrow-hover-color": E.hover
|
|
1995
1995
|
},
|
|
1996
|
-
children: /* @__PURE__ */
|
|
1996
|
+
children: /* @__PURE__ */ he(
|
|
1997
1997
|
"button",
|
|
1998
1998
|
{
|
|
1999
1999
|
onClick: () => {
|
|
2000
|
-
|
|
2000
|
+
U("-1");
|
|
2001
2001
|
},
|
|
2002
|
-
className:
|
|
2002
|
+
className: Y.arrowInner,
|
|
2003
2003
|
style: {
|
|
2004
|
-
transform: `translate(${
|
|
2004
|
+
transform: `translate(${F(M, n)}, ${F(H * (x === "horiz" ? 1 : -1), n)}) scale(${e.controls.scale / 100}) rotate(${x === "horiz" ? "0deg" : "90deg"})`
|
|
2005
2005
|
},
|
|
2006
2006
|
children: [
|
|
2007
|
-
|
|
2008
|
-
|
|
2007
|
+
E.arrowsImgUrl && /* @__PURE__ */ N(
|
|
2008
|
+
ft,
|
|
2009
2009
|
{
|
|
2010
|
-
url:
|
|
2011
|
-
fill:
|
|
2012
|
-
hoverFill:
|
|
2013
|
-
className:
|
|
2010
|
+
url: E.arrowsImgUrl,
|
|
2011
|
+
fill: E.color,
|
|
2012
|
+
hoverFill: E.hover,
|
|
2013
|
+
className: pe(Y.arrowImg, Y.mirror)
|
|
2014
2014
|
}
|
|
2015
2015
|
),
|
|
2016
|
-
!
|
|
2016
|
+
!E.arrowsImgUrl && /* @__PURE__ */ N(en, { color: E.color, className: pe(Y.arrowIcon, Y.arrowImg, Y.mirror) })
|
|
2017
2017
|
]
|
|
2018
2018
|
}
|
|
2019
2019
|
)
|
|
@@ -2022,91 +2022,91 @@ function aa({ settings: e, content: t, styles: r, isEditor: n }) {
|
|
|
2022
2022
|
/* @__PURE__ */ N(
|
|
2023
2023
|
"div",
|
|
2024
2024
|
{
|
|
2025
|
-
className:
|
|
2026
|
-
[
|
|
2027
|
-
[
|
|
2025
|
+
className: pe(Y.arrow, Y.nextArrow, {
|
|
2026
|
+
[Y.arrowVertical]: x === "vert",
|
|
2027
|
+
[Y.hoverArrow]: E.show === "on hover"
|
|
2028
2028
|
}),
|
|
2029
2029
|
style: {
|
|
2030
|
-
color:
|
|
2031
|
-
"--arrow-hover-color":
|
|
2030
|
+
color: E.color,
|
|
2031
|
+
"--arrow-hover-color": E.hover
|
|
2032
2032
|
},
|
|
2033
|
-
children: /* @__PURE__ */
|
|
2033
|
+
children: /* @__PURE__ */ he(
|
|
2034
2034
|
"button",
|
|
2035
2035
|
{
|
|
2036
|
-
className:
|
|
2037
|
-
onClick: () =>
|
|
2036
|
+
className: Y.arrowInner,
|
|
2037
|
+
onClick: () => U("+1"),
|
|
2038
2038
|
style: {
|
|
2039
|
-
transform: `translate(${
|
|
2039
|
+
transform: `translate(${F(M * (x === "horiz" ? -1 : 1), n)}, ${F(H, n)}) scale(${e.controls.scale / 100}) rotate(${x === "horiz" ? "0deg" : "90deg"})`
|
|
2040
2040
|
},
|
|
2041
2041
|
children: [
|
|
2042
|
-
|
|
2043
|
-
|
|
2042
|
+
E.arrowsImgUrl && /* @__PURE__ */ N(
|
|
2043
|
+
ft,
|
|
2044
2044
|
{
|
|
2045
|
-
url:
|
|
2046
|
-
fill:
|
|
2047
|
-
hoverFill:
|
|
2048
|
-
className:
|
|
2045
|
+
url: E.arrowsImgUrl,
|
|
2046
|
+
fill: E.color,
|
|
2047
|
+
hoverFill: E.hover,
|
|
2048
|
+
className: Y.arrowImg
|
|
2049
2049
|
}
|
|
2050
2050
|
),
|
|
2051
|
-
!
|
|
2051
|
+
!E.arrowsImgUrl && /* @__PURE__ */ N(en, { color: E.color, className: pe(Y.arrowIcon, Y.arrowImg) })
|
|
2052
2052
|
]
|
|
2053
2053
|
}
|
|
2054
2054
|
)
|
|
2055
2055
|
}
|
|
2056
2056
|
)
|
|
2057
2057
|
] }),
|
|
2058
|
-
|
|
2058
|
+
I.triggersList.click && /* @__PURE__ */ N(
|
|
2059
2059
|
"div",
|
|
2060
2060
|
{
|
|
2061
|
-
className:
|
|
2061
|
+
className: Y.clickOverlay,
|
|
2062
2062
|
onClick: () => {
|
|
2063
2063
|
o && o.go("+1");
|
|
2064
2064
|
}
|
|
2065
2065
|
}
|
|
2066
2066
|
),
|
|
2067
|
-
|
|
2067
|
+
k.isActive && /* @__PURE__ */ N(
|
|
2068
2068
|
"div",
|
|
2069
2069
|
{
|
|
2070
|
-
className:
|
|
2071
|
-
[
|
|
2072
|
-
[
|
|
2073
|
-
[
|
|
2074
|
-
[
|
|
2075
|
-
[
|
|
2076
|
-
[
|
|
2077
|
-
[
|
|
2078
|
-
[
|
|
2079
|
-
[
|
|
2070
|
+
className: pe(Y.pagination, {
|
|
2071
|
+
[Y.paginationInsideBottom]: k.position === "inside-1" && x === "horiz",
|
|
2072
|
+
[Y.paginationInsideTop]: k.position === "inside-2" && x === "horiz",
|
|
2073
|
+
[Y.paginationOutsideBottom]: k.position === "outside-1" && x === "horiz",
|
|
2074
|
+
[Y.paginationOutsideTop]: k.position === "outside-2" && x === "horiz",
|
|
2075
|
+
[Y.paginationInsideLeft]: k.position === "inside-1" && x === "vert",
|
|
2076
|
+
[Y.paginationInsideRight]: k.position === "inside-2" && x === "vert",
|
|
2077
|
+
[Y.paginationOutsideLeft]: k.position === "outside-1" && x === "vert",
|
|
2078
|
+
[Y.paginationOutsideRight]: k.position === "outside-2" && x === "vert",
|
|
2079
|
+
[Y.paginationVertical]: x === "vert"
|
|
2080
2080
|
}),
|
|
2081
2081
|
children: /* @__PURE__ */ N(
|
|
2082
2082
|
"div",
|
|
2083
2083
|
{
|
|
2084
|
-
className:
|
|
2084
|
+
className: Y.paginationInner,
|
|
2085
2085
|
style: {
|
|
2086
|
-
backgroundColor:
|
|
2087
|
-
transform: `scale(${
|
|
2086
|
+
backgroundColor: k.colors[2],
|
|
2087
|
+
transform: `scale(${k.scale / 100}) translate(${F(k.offset.x, n)}, ${F(k.offset.y, n)}) rotate(${x === "horiz" ? "0deg" : "90deg"})`
|
|
2088
2088
|
},
|
|
2089
|
-
children: t.map((g,
|
|
2089
|
+
children: t.map((g, L) => /* @__PURE__ */ N(
|
|
2090
2090
|
"button",
|
|
2091
2091
|
{
|
|
2092
2092
|
onClick: () => {
|
|
2093
|
-
o && o.go(
|
|
2093
|
+
o && o.go(L);
|
|
2094
2094
|
},
|
|
2095
|
-
className:
|
|
2095
|
+
className: pe(Y.paginationItem),
|
|
2096
2096
|
children: /* @__PURE__ */ N(
|
|
2097
2097
|
"div",
|
|
2098
2098
|
{
|
|
2099
|
-
className:
|
|
2100
|
-
[
|
|
2099
|
+
className: pe(Y.dot, {
|
|
2100
|
+
[Y.activeDot]: L === d
|
|
2101
2101
|
}),
|
|
2102
2102
|
style: {
|
|
2103
|
-
backgroundColor:
|
|
2104
|
-
"--pagination-hover-color":
|
|
2103
|
+
backgroundColor: L === d ? k.colors[0] : k.colors[1],
|
|
2104
|
+
"--pagination-hover-color": k.hover
|
|
2105
2105
|
}
|
|
2106
2106
|
}
|
|
2107
2107
|
)
|
|
2108
2108
|
},
|
|
2109
|
-
|
|
2109
|
+
L
|
|
2110
2110
|
))
|
|
2111
2111
|
}
|
|
2112
2112
|
)
|
|
@@ -2124,8 +2124,8 @@ const la = {
|
|
|
2124
2124
|
id: "control-slider",
|
|
2125
2125
|
name: "Slider",
|
|
2126
2126
|
preview: {
|
|
2127
|
-
type: "
|
|
2128
|
-
url: "https://cdn.cntrl.site/component-assets/
|
|
2127
|
+
type: "image",
|
|
2128
|
+
url: "https://cdn.cntrl.site/component-assets/sliderPreview.png"
|
|
2129
2129
|
},
|
|
2130
2130
|
defaultSize: {
|
|
2131
2131
|
width: 400,
|
|
@@ -2719,7 +2719,7 @@ const la = {
|
|
|
2719
2719
|
},
|
|
2720
2720
|
required: ["settings", "content", "styles"]
|
|
2721
2721
|
}
|
|
2722
|
-
}, sa = "ImageRevealSlider-module__imageRevealSlider___UE5Ob", ca = "ImageRevealSlider-module__image___Qjt-e", ua = "ImageRevealSlider-module__link___N-iLG", pa = "ImageRevealSlider-module__cursor___2U03d",
|
|
2722
|
+
}, sa = "ImageRevealSlider-module__imageRevealSlider___UE5Ob", ca = "ImageRevealSlider-module__image___Qjt-e", ua = "ImageRevealSlider-module__link___N-iLG", pa = "ImageRevealSlider-module__cursor___2U03d", Ze = {
|
|
2723
2723
|
imageRevealSlider: sa,
|
|
2724
2724
|
image: ca,
|
|
2725
2725
|
link: ua,
|
|
@@ -2760,95 +2760,95 @@ async function da(e, t, r, n) {
|
|
|
2760
2760
|
return { width: o, height: a, finalWidth: `${o}px` };
|
|
2761
2761
|
}
|
|
2762
2762
|
function fa({ settings: e, content: t, isEditor: r }) {
|
|
2763
|
-
const [n, o] = le(null), [a, i] = le([]), [s, l] = le(0), p =
|
|
2763
|
+
const [n, o] = le(null), [a, i] = le([]), [s, l] = le(0), p = _e(0), [c, S] = le({ x: 0, y: 0 }), [m, y] = le(1), [u, f] = le("none"), w = _e({ x: 0, y: 0 }), [$, d] = le(!1), { sizeType: h, imageWidth: W, randomRangeImageWidth: D } = e.imageSize, { revealPosition: x, visible: v } = e.position, { cursorType: E, target: k, defaultCursorScale: V, defaultCursor: I, hoverCursorScale: O, hoverCursor: M } = e.cursor;
|
|
2764
2764
|
ve(() => {
|
|
2765
2765
|
if (!n) return;
|
|
2766
|
-
const g = (
|
|
2767
|
-
const
|
|
2768
|
-
if (S({ x:
|
|
2769
|
-
f("none"),
|
|
2766
|
+
const g = (b, _) => {
|
|
2767
|
+
const B = n.getBoundingClientRect(), J = b - B.left, ee = _ - B.top;
|
|
2768
|
+
if (S({ x: J, y: ee }), E === "system") {
|
|
2769
|
+
f("none"), y(1);
|
|
2770
2770
|
return;
|
|
2771
2771
|
}
|
|
2772
|
-
const
|
|
2773
|
-
if (
|
|
2774
|
-
f("none"),
|
|
2772
|
+
const Q = J, fe = ee, A = document.elementFromPoint(B.left + Q, B.top + fe);
|
|
2773
|
+
if (A && A.closest("a")) {
|
|
2774
|
+
f("none"), y(1);
|
|
2775
2775
|
return;
|
|
2776
2776
|
}
|
|
2777
|
-
const
|
|
2778
|
-
f(
|
|
2779
|
-
},
|
|
2780
|
-
|
|
2781
|
-
},
|
|
2782
|
-
|
|
2777
|
+
const X = tn(Q, fe, a) || k === "area" ? { img: M ?? "none", scale: O } : { img: I ?? "none", scale: V };
|
|
2778
|
+
f(X.img), y(X.scale);
|
|
2779
|
+
}, L = (b) => {
|
|
2780
|
+
b.stopPropagation(), w.current = { x: b.clientX, y: b.clientY }, g(b.clientX, b.clientY);
|
|
2781
|
+
}, T = () => {
|
|
2782
|
+
$ && g(w.current.x, w.current.y);
|
|
2783
2783
|
};
|
|
2784
|
-
return n.addEventListener("mousemove",
|
|
2785
|
-
n.removeEventListener("mousemove",
|
|
2784
|
+
return n.addEventListener("mousemove", L), window.addEventListener("scroll", T, !0), () => {
|
|
2785
|
+
n.removeEventListener("mousemove", L), window.removeEventListener("scroll", T, !0);
|
|
2786
2786
|
};
|
|
2787
2787
|
}, [
|
|
2788
2788
|
n,
|
|
2789
|
-
|
|
2789
|
+
$,
|
|
2790
2790
|
c,
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2791
|
+
E,
|
|
2792
|
+
k,
|
|
2793
|
+
M,
|
|
2794
|
+
I,
|
|
2795
2795
|
O,
|
|
2796
2796
|
V,
|
|
2797
2797
|
a
|
|
2798
2798
|
]), ve(() => {
|
|
2799
|
-
|
|
2800
|
-
}, [
|
|
2801
|
-
const
|
|
2802
|
-
const { width:
|
|
2799
|
+
$ || (f("none"), y(0));
|
|
2800
|
+
}, [$]);
|
|
2801
|
+
const H = async (g, L, T, b = {}) => {
|
|
2802
|
+
const { width: _, height: B, finalWidth: J } = await da(
|
|
2803
2803
|
g.image.url,
|
|
2804
|
-
|
|
2804
|
+
h,
|
|
2805
2805
|
W,
|
|
2806
2806
|
D
|
|
2807
2807
|
);
|
|
2808
|
-
let
|
|
2809
|
-
|
|
2810
|
-
const
|
|
2808
|
+
let ee = 0, Q = 0;
|
|
2809
|
+
x === "same" ? (ee = L / 2, Q = T / 2) : (ee = b.x ?? Math.random() * L, Q = b.y ?? Math.random() * T);
|
|
2810
|
+
const fe = Math.min(Math.max(ee, _ / 2), L - _ / 2), A = Math.min(Math.max(Q, B / 2), T - B / 2);
|
|
2811
2811
|
return {
|
|
2812
2812
|
id: p.current++,
|
|
2813
2813
|
url: g.image.url,
|
|
2814
2814
|
link: g.link,
|
|
2815
2815
|
name: g.image.name,
|
|
2816
|
-
x:
|
|
2817
|
-
y:
|
|
2818
|
-
width:
|
|
2816
|
+
x: fe,
|
|
2817
|
+
y: A,
|
|
2818
|
+
width: J
|
|
2819
2819
|
};
|
|
2820
2820
|
};
|
|
2821
2821
|
return ve(() => {
|
|
2822
2822
|
if (!n || t.length === 0) return;
|
|
2823
|
-
const g = n.getBoundingClientRect(),
|
|
2823
|
+
const g = n.getBoundingClientRect(), L = g.width, T = g.height, b = [];
|
|
2824
2824
|
(async () => {
|
|
2825
|
-
const
|
|
2826
|
-
|
|
2825
|
+
const B = t[0], J = await H(B, L, T);
|
|
2826
|
+
b.push(J), i(b), l(1);
|
|
2827
2827
|
})();
|
|
2828
|
-
}, [
|
|
2828
|
+
}, [h, W, D, x, n]), ve(() => {
|
|
2829
2829
|
v === "last One" && i((g) => g.length > 0 ? [g[g.length - 1]] : []);
|
|
2830
|
-
}, [v]), /* @__PURE__ */
|
|
2830
|
+
}, [v]), /* @__PURE__ */ he(
|
|
2831
2831
|
"div",
|
|
2832
2832
|
{
|
|
2833
2833
|
ref: o,
|
|
2834
2834
|
onClick: async (g) => {
|
|
2835
2835
|
if (!n) return;
|
|
2836
|
-
const
|
|
2837
|
-
if (
|
|
2838
|
-
let
|
|
2839
|
-
|
|
2840
|
-
const
|
|
2841
|
-
i((
|
|
2836
|
+
const L = n.getBoundingClientRect(), T = g.clientX - L.left, b = g.clientY - L.top;
|
|
2837
|
+
if (k === "image" && !tn(T, b, a)) return;
|
|
2838
|
+
let _ = 0, B = 0;
|
|
2839
|
+
x === "on Click" ? (_ = T, B = b) : x === "same" ? (_ = L.width / 2, B = L.height / 2) : (_ = Math.random() * L.width, B = Math.random() * L.height);
|
|
2840
|
+
const J = t[s], ee = await H(J, L.width, L.height, { x: _, y: B });
|
|
2841
|
+
i((Q) => v === "all" ? [...Q, ee] : [ee]), l((Q) => Q >= t.length - 1 ? 0 : Q + 1);
|
|
2842
2842
|
},
|
|
2843
2843
|
onMouseEnter: () => d(!0),
|
|
2844
2844
|
onMouseLeave: () => d(!1),
|
|
2845
|
-
className:
|
|
2845
|
+
className: Ze.imageRevealSlider,
|
|
2846
2846
|
style: { cursor: u === "none" ? "default" : "none" },
|
|
2847
2847
|
children: [
|
|
2848
2848
|
a.map((g) => /* @__PURE__ */ N(
|
|
2849
2849
|
"div",
|
|
2850
2850
|
{
|
|
2851
|
-
className:
|
|
2851
|
+
className: Ze.wrapper,
|
|
2852
2852
|
style: {
|
|
2853
2853
|
top: `${g.y}px`,
|
|
2854
2854
|
left: `${g.x}px`,
|
|
@@ -2858,12 +2858,12 @@ function fa({ settings: e, content: t, isEditor: r }) {
|
|
|
2858
2858
|
height: "auto",
|
|
2859
2859
|
cursor: u === "none" ? "default" : "none"
|
|
2860
2860
|
},
|
|
2861
|
-
children:
|
|
2861
|
+
children: k === "area" && g.link ? /* @__PURE__ */ N("a", { href: g.link, target: "_blank", className: Ze.link, children: /* @__PURE__ */ N(
|
|
2862
2862
|
"img",
|
|
2863
2863
|
{
|
|
2864
2864
|
src: g.url,
|
|
2865
2865
|
alt: g.name,
|
|
2866
|
-
className:
|
|
2866
|
+
className: Ze.image
|
|
2867
2867
|
},
|
|
2868
2868
|
g.id
|
|
2869
2869
|
) }) : /* @__PURE__ */ N(
|
|
@@ -2871,17 +2871,17 @@ function fa({ settings: e, content: t, isEditor: r }) {
|
|
|
2871
2871
|
{
|
|
2872
2872
|
src: g.url,
|
|
2873
2873
|
alt: g.name,
|
|
2874
|
-
className:
|
|
2874
|
+
className: Ze.image
|
|
2875
2875
|
},
|
|
2876
2876
|
g.id
|
|
2877
2877
|
)
|
|
2878
2878
|
},
|
|
2879
2879
|
g.id
|
|
2880
2880
|
)),
|
|
2881
|
-
|
|
2881
|
+
$ && /* @__PURE__ */ N(
|
|
2882
2882
|
"div",
|
|
2883
2883
|
{
|
|
2884
|
-
className:
|
|
2884
|
+
className: Ze.cursor,
|
|
2885
2885
|
style: {
|
|
2886
2886
|
left: `${c.x}px`,
|
|
2887
2887
|
top: `${c.y}px`,
|
|
@@ -2903,8 +2903,8 @@ const ga = {
|
|
|
2903
2903
|
id: "control-image-reveal",
|
|
2904
2904
|
name: "Click Gallery",
|
|
2905
2905
|
preview: {
|
|
2906
|
-
type: "
|
|
2907
|
-
url: "https://cdn.cntrl.site/
|
|
2906
|
+
type: "image",
|
|
2907
|
+
url: "https://cdn.cntrl.site/component-assets/clickGalleryPreview.png"
|
|
2908
2908
|
},
|
|
2909
2909
|
defaultSize: {
|
|
2910
2910
|
width: "100%",
|
|
@@ -3209,11 +3209,11 @@ const ga = {
|
|
|
3209
3209
|
}
|
|
3210
3210
|
}
|
|
3211
3211
|
}
|
|
3212
|
-
}, ma = "LightBox-module__hidden___9s-9x",
|
|
3212
|
+
}, ma = "LightBox-module__hidden___9s-9x", ya = "LightBox-module__heroImage___sTxNF", va = "LightBox-module__background___rm9ml", ha = "LightBox-module__editor___4ACaY", ba = "LightBox-module__contentStyle___Bgnsq", Ca = "LightBox-module__imageStyle___tLIlB", _a = "LightBox-module__imgWrapper___LuFUp", Sa = "LightBox-module__contain___8-yaS", xa = "LightBox-module__cover___hNvOG", wa = "LightBox-module__caption___b6L2I", $a = "LightBox-module__captionTextInner___rCGNH", Ea = "LightBox-module__lightboxSplide___XFuWC", Ta = "LightBox-module__arrow___iz38X", Aa = "LightBox-module__arrowVertical___Zfz81", Ia = "LightBox-module__nextArrow___zkAQN", La = "LightBox-module__arrowInner___p48sW", ka = "LightBox-module__arrowIcon___3VaFf", Ra = "LightBox-module__arrowImg___pNV88", Na = "LightBox-module__mirror___pjeXc", Oa = "LightBox-module__thumbsWrapper___GB-nU", Ba = "LightBox-module__thumbsContainerVertical___wttk5", Fa = "LightBox-module__thumbsContainer___osSma", Ma = "LightBox-module__thumbsAlignStart___MO6tY", za = "LightBox-module__thumbsAlignCenter___Q4sUx", Da = "LightBox-module__thumbsAlignEnd___p4y9R", Va = "LightBox-module__thumbItem___HvnF3", Wa = "LightBox-module__closeButton___g2khP", ja = "LightBox-module__fadeIn___0m5GW", Pa = "LightBox-module__slideInLeft___gPYwC", Ha = "LightBox-module__slideInRight___S-pPp", Ua = "LightBox-module__slideInTop___DFdAj", Ga = "LightBox-module__slideInBottom___m27kZ", Ya = "LightBox-module__fadeOut___55qBR", Xa = "LightBox-module__slideOutLeft___NvU7P", qa = "LightBox-module__slideOutRight___SK7eC", Ka = "LightBox-module__slideOutTop___Vgg0z", Ja = "LightBox-module__slideOutBottom___nJ0Ef", Za = "LightBox-module__scaleSlide___vZriG", z = {
|
|
3213
3213
|
hidden: ma,
|
|
3214
|
-
heroImage:
|
|
3215
|
-
background:
|
|
3216
|
-
editor:
|
|
3214
|
+
heroImage: ya,
|
|
3215
|
+
background: va,
|
|
3216
|
+
editor: ha,
|
|
3217
3217
|
contentStyle: ba,
|
|
3218
3218
|
imageStyle: Ca,
|
|
3219
3219
|
imgWrapper: _a,
|
|
@@ -3236,8 +3236,8 @@ const ga = {
|
|
|
3236
3236
|
thumbsAlignCenter: za,
|
|
3237
3237
|
thumbsAlignEnd: Da,
|
|
3238
3238
|
thumbItem: Va,
|
|
3239
|
-
closeButton:
|
|
3240
|
-
fadeIn:
|
|
3239
|
+
closeButton: Wa,
|
|
3240
|
+
fadeIn: ja,
|
|
3241
3241
|
slideInLeft: Pa,
|
|
3242
3242
|
slideInRight: Ha,
|
|
3243
3243
|
slideInTop: Ua,
|
|
@@ -3250,7 +3250,7 @@ const ga = {
|
|
|
3250
3250
|
scaleSlide: Za
|
|
3251
3251
|
}, Nt = (e, t, r) => {
|
|
3252
3252
|
const n = {}, [o, a] = e.split("-");
|
|
3253
|
-
return o === "top" ? (n.top = "0", n.bottom = "auto") : o === "middle" ? (n.top = "50%", n.bottom = "auto") : o === "bottom" && (n.top = "auto", n.bottom = "0"), a === "left" ? (n.left = "0", n.right = "auto") : a === "center" ? (n.left = "50%", n.right = "auto") : a === "right" && (n.left = "auto", n.right = "0"), o === "middle" && a === "center" ? n.transform = `translate(calc(-50% + ${
|
|
3253
|
+
return o === "top" ? (n.top = "0", n.bottom = "auto") : o === "middle" ? (n.top = "50%", n.bottom = "auto") : o === "bottom" && (n.top = "auto", n.bottom = "0"), a === "left" ? (n.left = "0", n.right = "auto") : a === "center" ? (n.left = "50%", n.right = "auto") : a === "right" && (n.left = "auto", n.right = "0"), o === "middle" && a === "center" ? n.transform = `translate(calc(-50% + ${F(t.x, r)}), calc(-50% + ${F(t.y, r)}))` : o === "middle" ? n.transform = `translate(${F(t.x, r)}, calc(-50% + ${F(t.y, r)}))` : a === "center" ? n.transform = `translate(calc(-50% + ${F(t.x, r)}), ${F(t.y, r)})` : n.transform = `translate(${F(t.x, r)}, ${F(t.y, r)})`, n;
|
|
3254
3254
|
};
|
|
3255
3255
|
function Zn(e) {
|
|
3256
3256
|
const t = window.getComputedStyle(e);
|
|
@@ -3265,9 +3265,9 @@ function rn(e) {
|
|
|
3265
3265
|
const t = e.getBoundingClientRect(), r = Zn(e), n = Math.max(0, t.width - r.left - r.right), o = Math.max(0, t.height - r.top - r.bottom), a = e.naturalWidth, i = e.naturalHeight, s = n / o, l = a / i;
|
|
3266
3266
|
let p, c;
|
|
3267
3267
|
l > s ? (p = n, c = n / l) : (c = o, p = o * l);
|
|
3268
|
-
const S = t.left + r.left, m = t.top + r.top,
|
|
3268
|
+
const S = t.left + r.left, m = t.top + r.top, y = (n - p) / 2 + S, u = (o - c) / 2 + m;
|
|
3269
3269
|
return {
|
|
3270
|
-
x:
|
|
3270
|
+
x: y,
|
|
3271
3271
|
y: u,
|
|
3272
3272
|
width: p,
|
|
3273
3273
|
height: c
|
|
@@ -3367,7 +3367,7 @@ const el = ({ settings: e, content: t, styles: r, portalId: n, activeEvent: o, i
|
|
|
3367
3367
|
const [i, s] = le(!1), { url: l } = e.thumbnailBlock.cover;
|
|
3368
3368
|
return ve(() => {
|
|
3369
3369
|
o === "close" && s(!1), o === "open" && s(!0);
|
|
3370
|
-
}, [o]), /* @__PURE__ */
|
|
3370
|
+
}, [o]), /* @__PURE__ */ he(gt, { children: [
|
|
3371
3371
|
/* @__PURE__ */ N(
|
|
3372
3372
|
"img",
|
|
3373
3373
|
{
|
|
@@ -3391,161 +3391,161 @@ const el = ({ settings: e, content: t, styles: r, portalId: n, activeEvent: o, i
|
|
|
3391
3391
|
)
|
|
3392
3392
|
] });
|
|
3393
3393
|
}, tl = ({ isOpen: e, onClose: t, content: r, lightboxStyles: n, settings: o, portalId: a, isEditor: i, metadata: s }) => {
|
|
3394
|
-
var
|
|
3395
|
-
const [l, p] = le(0), [c, S] = le(0), [m,
|
|
3394
|
+
var R;
|
|
3395
|
+
const [l, p] = le(0), [c, S] = le(0), [m, y] = le(!1), [u, f] = le(!1), [w, $] = le({}), d = _e(null), h = _e(null), W = _e(null), D = _e(!1), x = _e(null), v = _e(null), E = _e(null), k = _e(null), V = _e(!1), I = _e(null), [O, M] = le(!1), { appear: H, triggers: U, slider: g, thumbnail: L, controls: T, area: b, caption: _, layout: B } = o.lightboxBlock, { appearClass: J, backdropAppearClass: ee, backdropDisappearClass: Q, disappearClass: fe } = Qa(H.type, H.direction), A = (s == null ? void 0 : s.itemId) ?? null;
|
|
3396
3396
|
ve(() => {
|
|
3397
3397
|
const C = () => {
|
|
3398
3398
|
setTimeout(() => {
|
|
3399
|
-
var
|
|
3400
|
-
(
|
|
3399
|
+
var P, q;
|
|
3400
|
+
(q = (P = d.current) == null ? void 0 : P.splide) == null || q.refresh();
|
|
3401
3401
|
}, 16);
|
|
3402
|
-
},
|
|
3403
|
-
S((
|
|
3402
|
+
}, j = () => {
|
|
3403
|
+
S((P) => P + 1);
|
|
3404
3404
|
};
|
|
3405
|
-
return window.addEventListener("ArticleEditor.Layout:change", C), window.addEventListener("ArticleEditor.ComponentContent:change",
|
|
3406
|
-
window.removeEventListener("ArticleEditor.Layout:change", C), window.removeEventListener("ArticleEditor.ComponentContent:change",
|
|
3405
|
+
return window.addEventListener("ArticleEditor.Layout:change", C), window.addEventListener("ArticleEditor.ComponentContent:change", j), () => {
|
|
3406
|
+
window.removeEventListener("ArticleEditor.Layout:change", C), window.removeEventListener("ArticleEditor.ComponentContent:change", j);
|
|
3407
3407
|
};
|
|
3408
3408
|
}, []), ve(() => {
|
|
3409
|
-
if (!e || !
|
|
3410
|
-
|
|
3409
|
+
if (!e || !L.isActive) {
|
|
3410
|
+
M(!1);
|
|
3411
3411
|
return;
|
|
3412
3412
|
}
|
|
3413
|
-
const C =
|
|
3413
|
+
const C = I.current;
|
|
3414
3414
|
if (!C) return;
|
|
3415
|
-
const
|
|
3416
|
-
g.direction === "horiz" ?
|
|
3415
|
+
const j = () => {
|
|
3416
|
+
g.direction === "horiz" ? M(C.scrollWidth > C.clientWidth) : M(C.scrollHeight > C.clientHeight);
|
|
3417
3417
|
};
|
|
3418
|
-
|
|
3419
|
-
const
|
|
3420
|
-
return
|
|
3421
|
-
}, [e,
|
|
3422
|
-
const
|
|
3423
|
-
const C = window.matchMedia("(max-width: 768px)").matches,
|
|
3424
|
-
C && !i &&
|
|
3425
|
-
const
|
|
3426
|
-
|
|
3418
|
+
j();
|
|
3419
|
+
const P = new ResizeObserver(j);
|
|
3420
|
+
return P.observe(C), () => P.disconnect();
|
|
3421
|
+
}, [e, L.isActive, r.length, w, g.direction]);
|
|
3422
|
+
const X = Qn(() => {
|
|
3423
|
+
const C = window.matchMedia("(max-width: 768px)").matches, j = on(b.color);
|
|
3424
|
+
C && !i && j > 0.9 && (document.body.style.backgroundColor = ""), y(!0), D.current = !0;
|
|
3425
|
+
const P = (q) => {
|
|
3426
|
+
q.target === x.current && q.animationName && (x.current && v.current && x.current.removeEventListener("animationend", v.current), v.current = null, D.current && (D.current = !1, t()), y(!1));
|
|
3427
3427
|
};
|
|
3428
|
-
|
|
3429
|
-
}, [t,
|
|
3430
|
-
var
|
|
3428
|
+
x.current && (v.current = P, x.current.addEventListener("animationend", P));
|
|
3429
|
+
}, [t, b.color, i]), ce = (C, j, P) => {
|
|
3430
|
+
var q, re;
|
|
3431
3431
|
if (C) {
|
|
3432
|
-
if (
|
|
3433
|
-
|
|
3434
|
-
else if (
|
|
3435
|
-
const
|
|
3436
|
-
let
|
|
3437
|
-
g.direction === "horiz" ?
|
|
3432
|
+
if (U.type === "click" && U.switch === "image")
|
|
3433
|
+
U.repeat === "close" && l === r.length - 1 ? X() : (q = d.current) == null || q.go("+1");
|
|
3434
|
+
else if (U.type === "click" && U.switch === "50/50") {
|
|
3435
|
+
const G = C.getBoundingClientRect(), K = j - G.left, ne = P - G.top, ae = G.width, oe = G.height;
|
|
3436
|
+
let ye;
|
|
3437
|
+
g.direction === "horiz" ? ye = K < ae / 2 ? "-1" : "+1" : ye = ne < oe / 2 ? "-1" : "+1", (re = d.current) == null || re.go(ye);
|
|
3438
3438
|
}
|
|
3439
3439
|
}
|
|
3440
|
-
},
|
|
3440
|
+
}, ie = (C) => {
|
|
3441
3441
|
if (V.current) {
|
|
3442
3442
|
V.current = !1;
|
|
3443
3443
|
return;
|
|
3444
3444
|
}
|
|
3445
|
-
const
|
|
3446
|
-
let
|
|
3445
|
+
const j = r[l], P = (j == null ? void 0 : j.image.objectFit) === "cover";
|
|
3446
|
+
let q, re;
|
|
3447
3447
|
if ("changedTouches" in C && C.changedTouches.length > 0)
|
|
3448
|
-
|
|
3448
|
+
q = C.changedTouches[0].clientX, re = C.changedTouches[0].clientY;
|
|
3449
3449
|
else if ("clientX" in C)
|
|
3450
|
-
|
|
3450
|
+
q = C.clientX, re = C.clientY;
|
|
3451
3451
|
else
|
|
3452
3452
|
return;
|
|
3453
|
-
let
|
|
3454
|
-
if (
|
|
3453
|
+
let G;
|
|
3454
|
+
if (P && W.current) {
|
|
3455
3455
|
const K = nn(W.current);
|
|
3456
|
-
|
|
3456
|
+
G = q >= K.left && q <= K.right && re >= K.top && re <= K.bottom;
|
|
3457
3457
|
} else {
|
|
3458
3458
|
const K = W.current ? rn(W.current) : null;
|
|
3459
3459
|
if (!K) {
|
|
3460
|
-
C.target === C.currentTarget &&
|
|
3460
|
+
C.target === C.currentTarget && X();
|
|
3461
3461
|
return;
|
|
3462
3462
|
}
|
|
3463
|
-
|
|
3463
|
+
G = q >= K.x && q <= K.x + K.width && re >= K.y && re <= K.y + K.height;
|
|
3464
3464
|
}
|
|
3465
|
-
|
|
3466
|
-
},
|
|
3467
|
-
const
|
|
3468
|
-
(
|
|
3465
|
+
G ? ce(W.current, q, re) : X();
|
|
3466
|
+
}, ue = (C) => {
|
|
3467
|
+
const j = C.target;
|
|
3468
|
+
(j.classList.contains(z.thumbsWrapper) || j.classList.contains(z.thumbsContainer)) && ie(C);
|
|
3469
3469
|
};
|
|
3470
3470
|
ve(() => {
|
|
3471
3471
|
if (!e) return;
|
|
3472
|
-
const C = (
|
|
3473
|
-
var
|
|
3474
|
-
if (
|
|
3475
|
-
|
|
3472
|
+
const C = (j) => {
|
|
3473
|
+
var P, q;
|
|
3474
|
+
if (j.key === "Escape") {
|
|
3475
|
+
X();
|
|
3476
3476
|
return;
|
|
3477
3477
|
}
|
|
3478
|
-
if (
|
|
3479
|
-
p((
|
|
3478
|
+
if (j.key === "ArrowRight") {
|
|
3479
|
+
p((re) => (re + 1) % Math.max(r.length, 1)), (P = d.current) == null || P.go("+1");
|
|
3480
3480
|
return;
|
|
3481
3481
|
}
|
|
3482
|
-
|
|
3482
|
+
j.key === "ArrowLeft" && (p((re) => (re - 1 + Math.max(r.length, 1)) % Math.max(r.length, 1)), (q = d.current) == null || q.go("-1"));
|
|
3483
3483
|
};
|
|
3484
3484
|
return window.addEventListener("keydown", C), () => {
|
|
3485
3485
|
window.removeEventListener("keydown", C);
|
|
3486
3486
|
};
|
|
3487
|
-
}, [e,
|
|
3487
|
+
}, [e, X, r.length]), ve(() => {
|
|
3488
3488
|
if (e) {
|
|
3489
|
-
if (p(0), S((
|
|
3490
|
-
const C = new CustomEvent("page-overlay", { detail: { itemId:
|
|
3489
|
+
if (p(0), S((j) => j + 1), D.current = !1, y(!1), f(!1), $({}), !A) return;
|
|
3490
|
+
const C = new CustomEvent("page-overlay", { detail: { itemId: A } });
|
|
3491
3491
|
window.dispatchEvent(C);
|
|
3492
3492
|
}
|
|
3493
3493
|
return () => {
|
|
3494
|
-
|
|
3494
|
+
x.current && v.current && (x.current.removeEventListener("animationend", v.current), v.current = null), f(!1);
|
|
3495
3495
|
};
|
|
3496
|
-
}, [e,
|
|
3497
|
-
|
|
3496
|
+
}, [e, A]), ve(() => {
|
|
3497
|
+
h.current !== null && h.current !== g.type && S((C) => C + 1), h.current = g.type;
|
|
3498
3498
|
}, [g.type]), ve(() => {
|
|
3499
3499
|
if (!e) return;
|
|
3500
|
-
const C = document.body.style.overflow,
|
|
3500
|
+
const C = document.body.style.overflow, j = window.matchMedia("(max-width: 768px)").matches, P = on(b.color);
|
|
3501
3501
|
document.body.style.overflow = "hidden", f(!1);
|
|
3502
|
-
const
|
|
3503
|
-
|
|
3502
|
+
const q = (G) => {
|
|
3503
|
+
G.target === x.current && !D.current && G.animationName && (j && !i && P > 0.9 && (document.body.style.backgroundColor = b.color), f(!0), x.current && E.current && x.current.removeEventListener("animationend", E.current), E.current = null);
|
|
3504
3504
|
};
|
|
3505
|
-
|
|
3506
|
-
const
|
|
3507
|
-
const K =
|
|
3508
|
-
K && (K.closest(`.${z.thumbsWrapper}`) || K.closest(`.${z.thumbsContainer}`)) || g.type !== "slide" &&
|
|
3505
|
+
x.current && (E.current = q, x.current.addEventListener("animationend", q));
|
|
3506
|
+
const re = (G) => {
|
|
3507
|
+
const K = G.target;
|
|
3508
|
+
K && (K.closest(`.${z.thumbsWrapper}`) || K.closest(`.${z.thumbsContainer}`)) || g.type !== "slide" && G.preventDefault();
|
|
3509
3509
|
};
|
|
3510
|
-
return document.addEventListener("touchmove",
|
|
3511
|
-
document.body.style.overflow = C, document.removeEventListener("touchmove",
|
|
3510
|
+
return document.addEventListener("touchmove", re, { passive: !1 }), () => {
|
|
3511
|
+
document.body.style.overflow = C, document.removeEventListener("touchmove", re), x.current && E.current && (x.current.removeEventListener("animationend", E.current), E.current = null), f(!1);
|
|
3512
3512
|
};
|
|
3513
|
-
}, [e, i,
|
|
3513
|
+
}, [e, i, b.color, g.type]), ve(() => {
|
|
3514
3514
|
if (!e) return;
|
|
3515
|
-
const C = (
|
|
3516
|
-
var
|
|
3515
|
+
const C = (j) => {
|
|
3516
|
+
var q, re;
|
|
3517
3517
|
if (D.current) {
|
|
3518
|
-
|
|
3518
|
+
j.stopPropagation();
|
|
3519
3519
|
return;
|
|
3520
3520
|
}
|
|
3521
3521
|
if (V.current) {
|
|
3522
3522
|
V.current = !1;
|
|
3523
3523
|
return;
|
|
3524
3524
|
}
|
|
3525
|
-
const
|
|
3526
|
-
if (!(
|
|
3527
|
-
if (g.type === "slide" &&
|
|
3528
|
-
const
|
|
3529
|
-
if (
|
|
3525
|
+
const P = j.target;
|
|
3526
|
+
if (!(P && (P.closest(`.${z.thumbsContainer}`) || P.closest(`.${z.thumbItem}`)))) {
|
|
3527
|
+
if (g.type === "slide" && U.type === "drag" && ((re = (q = d.current) == null ? void 0 : q.splide) != null && re.root)) {
|
|
3528
|
+
const G = d.current.splide.root;
|
|
3529
|
+
if (P && (G.contains(P) || G === P))
|
|
3530
3530
|
return;
|
|
3531
3531
|
}
|
|
3532
|
-
if (
|
|
3533
|
-
const
|
|
3534
|
-
let
|
|
3532
|
+
if (j.touches.length === 0 && j.changedTouches.length > 0) {
|
|
3533
|
+
const G = r[l], K = (G == null ? void 0 : G.image.objectFit) === "cover", ne = j.changedTouches[0];
|
|
3534
|
+
let ae;
|
|
3535
3535
|
if (K && W.current) {
|
|
3536
|
-
const
|
|
3537
|
-
|
|
3536
|
+
const oe = nn(W.current);
|
|
3537
|
+
ae = ne.clientX >= oe.left && ne.clientX <= oe.right && ne.clientY >= oe.top && ne.clientY <= oe.bottom;
|
|
3538
3538
|
} else {
|
|
3539
|
-
const
|
|
3540
|
-
if (!
|
|
3541
|
-
|
|
3539
|
+
const oe = W.current ? rn(W.current) : null;
|
|
3540
|
+
if (!oe) return;
|
|
3541
|
+
ae = ne.clientX >= oe.x && ne.clientX <= oe.x + oe.width && ne.clientY >= oe.y && ne.clientY <= oe.y + oe.height;
|
|
3542
3542
|
}
|
|
3543
|
-
if (!
|
|
3544
|
-
|
|
3545
|
-
const
|
|
3546
|
-
|
|
3543
|
+
if (!ae) {
|
|
3544
|
+
j.stopPropagation(), D.current = !0;
|
|
3545
|
+
const oe = (ye) => {
|
|
3546
|
+
ye.stopPropagation(), ye.preventDefault(), document.removeEventListener("click", oe, !0);
|
|
3547
3547
|
};
|
|
3548
|
-
document.addEventListener("click",
|
|
3548
|
+
document.addEventListener("click", oe, !0), X();
|
|
3549
3549
|
}
|
|
3550
3550
|
}
|
|
3551
3551
|
}
|
|
@@ -3553,73 +3553,73 @@ const el = ({ settings: e, content: t, styles: r, portalId: n, activeEvent: o, i
|
|
|
3553
3553
|
return document.addEventListener("touchend", C, { passive: !0 }), () => {
|
|
3554
3554
|
document.removeEventListener("touchend", C);
|
|
3555
3555
|
};
|
|
3556
|
-
}, [e,
|
|
3557
|
-
const
|
|
3556
|
+
}, [e, X, l, r]);
|
|
3557
|
+
const $e = (g.type === "scale" || g.type === "fade") && g.direction === "vert" && U.type === "drag";
|
|
3558
3558
|
ve(() => {
|
|
3559
|
-
var
|
|
3560
|
-
if (!e ||
|
|
3561
|
-
const C = d.current.splide.root,
|
|
3562
|
-
if (
|
|
3563
|
-
const
|
|
3564
|
-
(
|
|
3559
|
+
var ye, Lt;
|
|
3560
|
+
if (!e || !$e || !((Lt = (ye = d.current) == null ? void 0 : ye.splide) != null && Lt.root)) return;
|
|
3561
|
+
const C = d.current.splide.root, j = 30, P = (te, ge) => {
|
|
3562
|
+
if (k.current) {
|
|
3563
|
+
const Re = Math.abs(te - k.current.x), kt = Math.abs(ge - k.current.y);
|
|
3564
|
+
(Re > 0 || kt > 0) && (V.current = !0);
|
|
3565
3565
|
}
|
|
3566
|
-
},
|
|
3567
|
-
|
|
3568
|
-
},
|
|
3569
|
-
|
|
3570
|
-
},
|
|
3571
|
-
if (!
|
|
3572
|
-
|
|
3566
|
+
}, q = (te) => {
|
|
3567
|
+
k.current && (te.preventDefault(), P(te.clientX, te.clientY));
|
|
3568
|
+
}, re = (te) => {
|
|
3569
|
+
k.current && te.touches.length > 0 && (te.preventDefault(), P(te.touches[0].clientX, te.touches[0].clientY));
|
|
3570
|
+
}, G = (te, ge) => {
|
|
3571
|
+
if (!k.current || !d.current) {
|
|
3572
|
+
k.current = null;
|
|
3573
3573
|
return;
|
|
3574
3574
|
}
|
|
3575
|
-
const
|
|
3576
|
-
kt >
|
|
3577
|
-
}, K = (
|
|
3578
|
-
|
|
3579
|
-
},
|
|
3580
|
-
if (
|
|
3581
|
-
if (
|
|
3582
|
-
const
|
|
3583
|
-
|
|
3575
|
+
const Re = Math.abs(te - k.current.x), kt = Math.abs(ge - k.current.y);
|
|
3576
|
+
kt > j && kt > Re && d.current.go(ge < k.current.y ? "+1" : "-1"), k.current = null;
|
|
3577
|
+
}, K = (te) => {
|
|
3578
|
+
k.current && G(te.clientX, te.clientY), document.removeEventListener("pointerup", K), document.removeEventListener("pointercancel", K), document.removeEventListener("pointermove", q);
|
|
3579
|
+
}, ne = (te) => {
|
|
3580
|
+
if (k.current) {
|
|
3581
|
+
if (te.changedTouches.length > 0) {
|
|
3582
|
+
const ge = te.changedTouches[0];
|
|
3583
|
+
G(ge.clientX, ge.clientY);
|
|
3584
3584
|
}
|
|
3585
|
-
document.removeEventListener("touchend",
|
|
3585
|
+
document.removeEventListener("touchend", ne), document.removeEventListener("touchcancel", ne), document.removeEventListener("touchmove", re);
|
|
3586
3586
|
}
|
|
3587
|
-
},
|
|
3588
|
-
|
|
3589
|
-
},
|
|
3590
|
-
|
|
3587
|
+
}, ae = (te) => {
|
|
3588
|
+
k.current = { x: te.clientX, y: te.clientY }, V.current = !1, document.addEventListener("pointermove", q, { passive: !1 }), document.addEventListener("pointerup", K), document.addEventListener("pointercancel", K);
|
|
3589
|
+
}, oe = (te) => {
|
|
3590
|
+
te.touches.length > 0 && (k.current = { x: te.touches[0].clientX, y: te.touches[0].clientY }, V.current = !1, document.addEventListener("touchmove", re, { passive: !1 }), document.addEventListener("touchend", ne), document.addEventListener("touchcancel", ne));
|
|
3591
3591
|
};
|
|
3592
|
-
return C.addEventListener("pointerdown",
|
|
3593
|
-
C.removeEventListener("pointerdown",
|
|
3592
|
+
return C.addEventListener("pointerdown", ae), C.addEventListener("touchstart", oe), () => {
|
|
3593
|
+
C.removeEventListener("pointerdown", ae), C.removeEventListener("touchstart", oe), document.removeEventListener("pointermove", q), document.removeEventListener("pointerup", K), document.removeEventListener("pointercancel", K), document.removeEventListener("touchmove", re), document.removeEventListener("touchend", ne), document.removeEventListener("touchcancel", ne), k.current = null, V.current = !1;
|
|
3594
3594
|
};
|
|
3595
|
-
}, [e,
|
|
3596
|
-
const
|
|
3597
|
-
backgroundColor:
|
|
3598
|
-
backdropFilter: `blur(${
|
|
3599
|
-
animationDuration: `${parseInt(
|
|
3595
|
+
}, [e, $e, c]);
|
|
3596
|
+
const De = {
|
|
3597
|
+
backgroundColor: b.color,
|
|
3598
|
+
backdropFilter: `blur(${b.blur}px)`,
|
|
3599
|
+
animationDuration: `${parseInt(H.duration)}ms`,
|
|
3600
3600
|
animationTimingFunction: "ease",
|
|
3601
3601
|
animationFillMode: "both"
|
|
3602
3602
|
};
|
|
3603
3603
|
return document.getElementById(a) ? eo(
|
|
3604
|
-
/* @__PURE__ */
|
|
3604
|
+
/* @__PURE__ */ he(gt, { children: [
|
|
3605
3605
|
/* @__PURE__ */ N(
|
|
3606
3606
|
"div",
|
|
3607
3607
|
{
|
|
3608
|
-
ref: i ? null :
|
|
3609
|
-
className:
|
|
3608
|
+
ref: i ? null : x,
|
|
3609
|
+
className: pe(z.background, m ? Q : ee, { [z.editor]: i }, { [z.hidden]: !e }),
|
|
3610
3610
|
style: {
|
|
3611
|
-
...
|
|
3611
|
+
...De,
|
|
3612
3612
|
...u && !i && !m ? { position: "absolute" } : {}
|
|
3613
3613
|
}
|
|
3614
3614
|
}
|
|
3615
3615
|
),
|
|
3616
|
-
/* @__PURE__ */
|
|
3616
|
+
/* @__PURE__ */ he(
|
|
3617
3617
|
"div",
|
|
3618
3618
|
{
|
|
3619
|
-
ref: i ?
|
|
3620
|
-
className:
|
|
3619
|
+
ref: i ? x : null,
|
|
3620
|
+
className: pe(z.contentStyle, m ? fe : J, { [z.editor]: i }, { [z.hidden]: !e }),
|
|
3621
3621
|
style: {
|
|
3622
|
-
animationDuration: `${parseInt(
|
|
3622
|
+
animationDuration: `${parseInt(H.duration)}ms`,
|
|
3623
3623
|
animationTimingFunction: "ease",
|
|
3624
3624
|
animationFillMode: "both"
|
|
3625
3625
|
},
|
|
@@ -3636,72 +3636,72 @@ const el = ({ settings: e, content: t, styles: r, portalId: n, activeEvent: o, i
|
|
|
3636
3636
|
direction: g.direction === "horiz" || g.type === "fade" || g.type === "scale" ? "ltr" : "ttb",
|
|
3637
3637
|
pagination: !1,
|
|
3638
3638
|
// Disable Splide's drag when we need custom vertical drag handling
|
|
3639
|
-
drag:
|
|
3639
|
+
drag: U.type === "drag" && !$e,
|
|
3640
3640
|
perPage: 1,
|
|
3641
3641
|
width: "100%",
|
|
3642
3642
|
height: "100%",
|
|
3643
3643
|
type: g.type === "fade" || g.type === "scale" ? "fade" : "loop",
|
|
3644
3644
|
padding: 0,
|
|
3645
|
-
rewind:
|
|
3645
|
+
rewind: U.repeat !== "close",
|
|
3646
3646
|
start: 0
|
|
3647
3647
|
},
|
|
3648
3648
|
style: { "--splide-speed": g.duration },
|
|
3649
|
-
children: r.map((C,
|
|
3650
|
-
const
|
|
3651
|
-
const { transform:
|
|
3649
|
+
children: r.map((C, j) => {
|
|
3650
|
+
const P = Nt(B.position, B.offset, i), q = `${F(B.padding.top, i)} ${F(B.padding.right, i)} ${F(B.padding.bottom, i)} ${F(B.padding.left, i)}`, re = g.type === "scale" ? (() => {
|
|
3651
|
+
const { transform: G, ...K } = P;
|
|
3652
3652
|
return {
|
|
3653
3653
|
...K,
|
|
3654
3654
|
position: "absolute",
|
|
3655
|
-
padding:
|
|
3655
|
+
padding: q,
|
|
3656
3656
|
boxSizing: "border-box",
|
|
3657
|
-
"--position-transform":
|
|
3657
|
+
"--position-transform": G || "none"
|
|
3658
3658
|
};
|
|
3659
|
-
})() : { ...
|
|
3660
|
-
return /* @__PURE__ */ N(Kn, { children: /* @__PURE__ */ N("div", { className: z.imgWrapper, onClick:
|
|
3659
|
+
})() : { ...P, position: "absolute", padding: q, boxSizing: "border-box" };
|
|
3660
|
+
return /* @__PURE__ */ N(Kn, { children: /* @__PURE__ */ N("div", { className: z.imgWrapper, onClick: ie, children: /* @__PURE__ */ N(
|
|
3661
3661
|
"img",
|
|
3662
3662
|
{
|
|
3663
|
-
ref:
|
|
3664
|
-
className:
|
|
3663
|
+
ref: j === l ? W : null,
|
|
3664
|
+
className: pe(z.imageStyle, {
|
|
3665
3665
|
[z.contain]: C.image.objectFit === "contain",
|
|
3666
3666
|
[z.cover]: C.image.objectFit === "cover",
|
|
3667
3667
|
[z.scaleSlide]: g.type === "scale"
|
|
3668
3668
|
}),
|
|
3669
3669
|
src: C.image.url,
|
|
3670
3670
|
alt: C.image.name ?? "",
|
|
3671
|
-
style: { ...
|
|
3671
|
+
style: { ...re, pointerEvents: C.image.objectFit === "contain" ? "none" : "auto" }
|
|
3672
3672
|
}
|
|
3673
|
-
) }) },
|
|
3673
|
+
) }) }, j);
|
|
3674
3674
|
})
|
|
3675
3675
|
},
|
|
3676
3676
|
c
|
|
3677
3677
|
),
|
|
3678
|
-
|
|
3678
|
+
T.isActive && /* @__PURE__ */ he(gt, { children: [
|
|
3679
3679
|
/* @__PURE__ */ N(
|
|
3680
3680
|
"div",
|
|
3681
3681
|
{
|
|
3682
|
-
className:
|
|
3683
|
-
style: { color:
|
|
3684
|
-
children: /* @__PURE__ */
|
|
3682
|
+
className: pe(z.arrow, { [z.arrowVertical]: g.direction === "vert" }),
|
|
3683
|
+
style: { color: T.color, "--arrow-hover-color": T.hover },
|
|
3684
|
+
children: /* @__PURE__ */ he(
|
|
3685
3685
|
"button",
|
|
3686
3686
|
{
|
|
3687
3687
|
className: z.arrowInner,
|
|
3688
|
-
style: { transform: `translate(${
|
|
3688
|
+
style: { transform: `translate(${F(T.offset.x, i)}, ${F(T.offset.y * (g.direction === "horiz" ? 1 : -1), i)}) scale(${T.scale}) rotate(${g.direction === "horiz" ? "0deg" : "90deg"})` },
|
|
3689
3689
|
onClick: () => {
|
|
3690
3690
|
var C;
|
|
3691
3691
|
return (C = d.current) == null ? void 0 : C.go("-1");
|
|
3692
3692
|
},
|
|
3693
3693
|
"aria-label": "Previous",
|
|
3694
3694
|
children: [
|
|
3695
|
-
|
|
3696
|
-
|
|
3695
|
+
T.arrowsImgUrl && /* @__PURE__ */ N(
|
|
3696
|
+
ft,
|
|
3697
3697
|
{
|
|
3698
|
-
url:
|
|
3699
|
-
fill:
|
|
3700
|
-
hoverFill:
|
|
3701
|
-
className:
|
|
3698
|
+
url: T.arrowsImgUrl,
|
|
3699
|
+
fill: T.color,
|
|
3700
|
+
hoverFill: T.hover,
|
|
3701
|
+
className: pe(z.arrowImg, z.mirror)
|
|
3702
3702
|
}
|
|
3703
3703
|
),
|
|
3704
|
-
!
|
|
3704
|
+
!T.arrowsImgUrl && /* @__PURE__ */ N(an, { color: T.color, className: pe(z.arrowIcon, z.arrowImg, z.mirror) })
|
|
3705
3705
|
]
|
|
3706
3706
|
}
|
|
3707
3707
|
)
|
|
@@ -3710,70 +3710,70 @@ const el = ({ settings: e, content: t, styles: r, portalId: n, activeEvent: o, i
|
|
|
3710
3710
|
/* @__PURE__ */ N(
|
|
3711
3711
|
"div",
|
|
3712
3712
|
{
|
|
3713
|
-
className:
|
|
3714
|
-
style: { color:
|
|
3715
|
-
children: /* @__PURE__ */
|
|
3713
|
+
className: pe(z.arrow, z.nextArrow, { [z.arrowVertical]: g.direction === "vert" }),
|
|
3714
|
+
style: { color: T.color, "--arrow-hover-color": T.hover },
|
|
3715
|
+
children: /* @__PURE__ */ he(
|
|
3716
3716
|
"button",
|
|
3717
3717
|
{
|
|
3718
3718
|
className: z.arrowInner,
|
|
3719
|
-
style: { transform: `translate(${
|
|
3719
|
+
style: { transform: `translate(${F(T.offset.x * (g.direction === "horiz" ? -1 : 1), i)}, ${F(T.offset.y, i)}) scale(${T.scale}) rotate(${g.direction === "horiz" ? "0deg" : "90deg"})` },
|
|
3720
3720
|
onClick: () => {
|
|
3721
3721
|
var C;
|
|
3722
3722
|
return (C = d.current) == null ? void 0 : C.go("+1");
|
|
3723
3723
|
},
|
|
3724
3724
|
"aria-label": "Next",
|
|
3725
3725
|
children: [
|
|
3726
|
-
|
|
3727
|
-
|
|
3726
|
+
T.arrowsImgUrl && /* @__PURE__ */ N(
|
|
3727
|
+
ft,
|
|
3728
3728
|
{
|
|
3729
|
-
url:
|
|
3730
|
-
fill:
|
|
3731
|
-
hoverFill:
|
|
3729
|
+
url: T.arrowsImgUrl,
|
|
3730
|
+
fill: T.color,
|
|
3731
|
+
hoverFill: T.hover,
|
|
3732
3732
|
className: z.arrowImg
|
|
3733
3733
|
}
|
|
3734
3734
|
),
|
|
3735
|
-
!
|
|
3735
|
+
!T.arrowsImgUrl && /* @__PURE__ */ N(an, { color: T.color, className: pe(z.arrowIcon, z.arrowImg) })
|
|
3736
3736
|
]
|
|
3737
3737
|
}
|
|
3738
3738
|
)
|
|
3739
3739
|
}
|
|
3740
3740
|
)
|
|
3741
3741
|
] }),
|
|
3742
|
-
|
|
3743
|
-
const C = Nt(
|
|
3744
|
-
return /* @__PURE__ */ N("button", { className: z.closeButton, style: { ...C, transform:
|
|
3742
|
+
b.closeIconUrl && (() => {
|
|
3743
|
+
const C = Nt(b.closeIconAlign, b.closeIconOffset, i), j = `scale(${b.closeIconScale})`, P = C.transform ? `${C.transform} ${j}` : j;
|
|
3744
|
+
return /* @__PURE__ */ N("button", { className: z.closeButton, style: { ...C, transform: P }, onClick: X, "aria-label": "Close lightbox", children: /* @__PURE__ */ N(ft, { url: b.closeIconUrl, fill: b.closeIconColor ?? "#000000", hoverFill: b.closeIconHover ?? "#cccccc" }) });
|
|
3745
3745
|
})(),
|
|
3746
|
-
|
|
3747
|
-
const { widthSettings: C, fontSettings:
|
|
3746
|
+
_ && _.isActive && n.imageCaption && ((R = r[l]) == null ? void 0 : R.imageCaption) && (() => {
|
|
3747
|
+
const { widthSettings: C, fontSettings: j, letterSpacing: P, textAlign: q, wordSpacing: re, fontSizeLineHeight: G, textAppearance: K, color: ne } = n.imageCaption;
|
|
3748
3748
|
return /* @__PURE__ */ N(
|
|
3749
3749
|
"div",
|
|
3750
3750
|
{
|
|
3751
3751
|
className: z.caption,
|
|
3752
3752
|
style: {
|
|
3753
|
-
...Nt(
|
|
3754
|
-
fontFamily:
|
|
3755
|
-
fontWeight:
|
|
3756
|
-
fontStyle:
|
|
3757
|
-
width: C.sizing === "auto" ? "max-content" :
|
|
3758
|
-
letterSpacing:
|
|
3759
|
-
wordSpacing:
|
|
3760
|
-
textAlign:
|
|
3761
|
-
fontSize:
|
|
3762
|
-
lineHeight:
|
|
3753
|
+
...Nt(_.alignment, _.offset, i),
|
|
3754
|
+
fontFamily: j.fontFamily,
|
|
3755
|
+
fontWeight: j.fontWeight,
|
|
3756
|
+
fontStyle: j.fontStyle,
|
|
3757
|
+
width: C.sizing === "auto" ? "max-content" : F(C.width, i),
|
|
3758
|
+
letterSpacing: F(P, i),
|
|
3759
|
+
wordSpacing: F(re, i),
|
|
3760
|
+
textAlign: q,
|
|
3761
|
+
fontSize: F(G.fontSize, i),
|
|
3762
|
+
lineHeight: F(G.lineHeight, i),
|
|
3763
3763
|
textTransform: K.textTransform ?? "none",
|
|
3764
3764
|
textDecoration: K.textDecoration ?? "none",
|
|
3765
3765
|
fontVariant: K.fontVariant ?? "normal",
|
|
3766
|
-
color:
|
|
3766
|
+
color: ne
|
|
3767
3767
|
},
|
|
3768
|
-
onClick: (
|
|
3768
|
+
onClick: (ae) => ae.stopPropagation(),
|
|
3769
3769
|
children: /* @__PURE__ */ N(
|
|
3770
3770
|
"div",
|
|
3771
3771
|
{
|
|
3772
3772
|
"data-styles": "imageCaption",
|
|
3773
3773
|
className: z.captionTextInner,
|
|
3774
3774
|
style: {
|
|
3775
|
-
"--link-color":
|
|
3776
|
-
"--link-hover-color":
|
|
3775
|
+
"--link-color": _.linkColor,
|
|
3776
|
+
"--link-hover-color": _.linkHoverColor
|
|
3777
3777
|
},
|
|
3778
3778
|
children: /* @__PURE__ */ N(Jn, { content: r[l].imageCaption })
|
|
3779
3779
|
}
|
|
@@ -3781,12 +3781,12 @@ const el = ({ settings: e, content: t, styles: r, portalId: n, activeEvent: o, i
|
|
|
3781
3781
|
}
|
|
3782
3782
|
);
|
|
3783
3783
|
})(),
|
|
3784
|
-
|
|
3785
|
-
const [C,
|
|
3784
|
+
L.isActive && (() => {
|
|
3785
|
+
const [C, j] = L.position.split("-"), P = g.direction === "horiz" ? `${C}-left` : L.position, q = Nt(P, L.offset, i), re = () => {
|
|
3786
3786
|
if (g.direction === "horiz") {
|
|
3787
|
-
if (
|
|
3788
|
-
if (
|
|
3789
|
-
if (
|
|
3787
|
+
if (j === "left") return "flex-start";
|
|
3788
|
+
if (j === "center") return "center";
|
|
3789
|
+
if (j === "right") return "flex-end";
|
|
3790
3790
|
} else {
|
|
3791
3791
|
if (C === "top") return "flex-start";
|
|
3792
3792
|
if (C === "middle") return "center";
|
|
@@ -3797,12 +3797,12 @@ const el = ({ settings: e, content: t, styles: r, portalId: n, activeEvent: o, i
|
|
|
3797
3797
|
return /* @__PURE__ */ N(
|
|
3798
3798
|
"div",
|
|
3799
3799
|
{
|
|
3800
|
-
ref:
|
|
3800
|
+
ref: I,
|
|
3801
3801
|
className: z.thumbsWrapper,
|
|
3802
|
-
onClick: (
|
|
3802
|
+
onClick: (G) => ue(G),
|
|
3803
3803
|
style: {
|
|
3804
3804
|
position: i ? "absolute" : "fixed",
|
|
3805
|
-
...
|
|
3805
|
+
...q,
|
|
3806
3806
|
...g.direction === "horiz" ? {
|
|
3807
3807
|
maxWidth: "100vw",
|
|
3808
3808
|
width: "100%",
|
|
@@ -3817,33 +3817,33 @@ const el = ({ settings: e, content: t, styles: r, portalId: n, activeEvent: o, i
|
|
|
3817
3817
|
children: /* @__PURE__ */ N(
|
|
3818
3818
|
"div",
|
|
3819
3819
|
{
|
|
3820
|
-
className:
|
|
3820
|
+
className: pe(z.thumbsContainer, {
|
|
3821
3821
|
[z.thumbsContainerVertical]: g.direction === "vert",
|
|
3822
|
-
[z.thumbsAlignStart]:
|
|
3823
|
-
[z.thumbsAlignCenter]:
|
|
3824
|
-
[z.thumbsAlignEnd]:
|
|
3822
|
+
[z.thumbsAlignStart]: L.align === "start",
|
|
3823
|
+
[z.thumbsAlignCenter]: L.align === "center",
|
|
3824
|
+
[z.thumbsAlignEnd]: L.align === "end"
|
|
3825
3825
|
}),
|
|
3826
3826
|
style: {
|
|
3827
|
-
gap:
|
|
3828
|
-
justifyContent: O ? "flex-start" :
|
|
3827
|
+
gap: F(L.grid.gap, i),
|
|
3828
|
+
justifyContent: O ? "flex-start" : re()
|
|
3829
3829
|
},
|
|
3830
|
-
children: r.map((
|
|
3831
|
-
const
|
|
3832
|
-
if (
|
|
3833
|
-
if (!
|
|
3834
|
-
return g.direction === "horiz" ? { height:
|
|
3835
|
-
const
|
|
3830
|
+
children: r.map((G, K) => {
|
|
3831
|
+
const ne = K === l, ae = w[K], ye = L.grid.size * (ne ? L.activeState.scale : 1), Lt = () => {
|
|
3832
|
+
if (L.fit !== "fit") return {};
|
|
3833
|
+
if (!ae)
|
|
3834
|
+
return g.direction === "horiz" ? { height: F(ye, i) } : { width: F(ye, i) };
|
|
3835
|
+
const te = ae.width / ae.height;
|
|
3836
3836
|
if (g.direction === "horiz") {
|
|
3837
|
-
const
|
|
3837
|
+
const ge = ye, Re = ge * te;
|
|
3838
3838
|
return {
|
|
3839
|
-
width:
|
|
3840
|
-
height:
|
|
3839
|
+
width: F(Re, i),
|
|
3840
|
+
height: F(ge, i)
|
|
3841
3841
|
};
|
|
3842
3842
|
} else {
|
|
3843
|
-
const
|
|
3843
|
+
const ge = ye, Re = ge / te;
|
|
3844
3844
|
return {
|
|
3845
|
-
width:
|
|
3846
|
-
height:
|
|
3845
|
+
width: F(ge, i),
|
|
3846
|
+
height: F(Re, i)
|
|
3847
3847
|
};
|
|
3848
3848
|
}
|
|
3849
3849
|
};
|
|
@@ -3852,43 +3852,43 @@ const el = ({ settings: e, content: t, styles: r, portalId: n, activeEvent: o, i
|
|
|
3852
3852
|
{
|
|
3853
3853
|
className: z.thumbItem,
|
|
3854
3854
|
style: {
|
|
3855
|
-
...g.direction === "horiz" &&
|
|
3856
|
-
...g.direction === "vert" &&
|
|
3857
|
-
...
|
|
3858
|
-
...
|
|
3859
|
-
transition:
|
|
3860
|
-
opacity:
|
|
3861
|
-
"--thumb-hover":
|
|
3855
|
+
...g.direction === "horiz" && L.fit !== "fit" ? { height: F(ye, i) } : {},
|
|
3856
|
+
...g.direction === "vert" && L.fit !== "fit" ? { width: F(ye, i) } : {},
|
|
3857
|
+
...L.fit === "cover" ? { width: F(ye, i), height: F(ye, i) } : {},
|
|
3858
|
+
...Lt(),
|
|
3859
|
+
transition: ne ? "all 0.25s ease-out" : "none",
|
|
3860
|
+
opacity: ne ? L.activeState.opacity / 100 : L.opacity / 100,
|
|
3861
|
+
"--thumb-hover": L.activeState.opacity / 100
|
|
3862
3862
|
},
|
|
3863
|
-
onClick: (
|
|
3864
|
-
var
|
|
3865
|
-
|
|
3863
|
+
onClick: (te) => {
|
|
3864
|
+
var ge;
|
|
3865
|
+
te.stopPropagation(), p(K), (ge = d.current) == null || ge.go(K);
|
|
3866
3866
|
},
|
|
3867
3867
|
onMouseEnter: () => {
|
|
3868
|
-
var
|
|
3869
|
-
|
|
3868
|
+
var te;
|
|
3869
|
+
L.triggers === "hov" && ((te = d.current) == null || te.go(K));
|
|
3870
3870
|
},
|
|
3871
3871
|
children: /* @__PURE__ */ N(
|
|
3872
3872
|
"img",
|
|
3873
3873
|
{
|
|
3874
|
-
src:
|
|
3875
|
-
alt:
|
|
3876
|
-
onLoad: (
|
|
3877
|
-
const
|
|
3878
|
-
|
|
3879
|
-
...
|
|
3880
|
-
[K]: { width:
|
|
3874
|
+
src: G.image.url,
|
|
3875
|
+
alt: G.image.name ?? "",
|
|
3876
|
+
onLoad: (te) => {
|
|
3877
|
+
const ge = te.currentTarget;
|
|
3878
|
+
ge.naturalWidth && ge.naturalHeight && $((Re) => ({
|
|
3879
|
+
...Re,
|
|
3880
|
+
[K]: { width: ge.naturalWidth, height: ge.naturalHeight }
|
|
3881
3881
|
}));
|
|
3882
3882
|
},
|
|
3883
3883
|
style: {
|
|
3884
|
-
objectFit:
|
|
3885
|
-
...
|
|
3886
|
-
...
|
|
3884
|
+
objectFit: L.fit === "cover" ? "cover" : "contain",
|
|
3885
|
+
...L.fit === "fit" ? { maxWidth: "100%", maxHeight: "100%", objectFit: "contain" } : {},
|
|
3886
|
+
...L.fit === "cover" ? { width: "100%", height: "100%" } : {}
|
|
3887
3887
|
}
|
|
3888
3888
|
}
|
|
3889
3889
|
)
|
|
3890
3890
|
},
|
|
3891
|
-
`${
|
|
3891
|
+
`${G.image.name}-${K}`
|
|
3892
3892
|
);
|
|
3893
3893
|
})
|
|
3894
3894
|
}
|
|
@@ -3911,8 +3911,8 @@ const rl = {
|
|
|
3911
3911
|
id: "lightbox",
|
|
3912
3912
|
name: "Lightbox",
|
|
3913
3913
|
preview: {
|
|
3914
|
-
type: "
|
|
3915
|
-
url: "https://cdn.cntrl.site/component-assets/
|
|
3914
|
+
type: "image",
|
|
3915
|
+
url: "https://cdn.cntrl.site/component-assets/lightboxPreview.png"
|
|
3916
3916
|
},
|
|
3917
3917
|
defaultSize: {
|
|
3918
3918
|
width: 440,
|
|
@@ -4970,7 +4970,7 @@ const rl = {
|
|
|
4970
4970
|
required: ["settings", "content", "styles"]
|
|
4971
4971
|
}
|
|
4972
4972
|
};
|
|
4973
|
-
function
|
|
4973
|
+
function Qe(e) {
|
|
4974
4974
|
return `calc(var(--cntrl-article-width, 100vw) * ${e / 1440})`;
|
|
4975
4975
|
}
|
|
4976
4976
|
function nl(e) {
|
|
@@ -4979,7 +4979,7 @@ function nl(e) {
|
|
|
4979
4979
|
display: flex;
|
|
4980
4980
|
flex-direction: column;
|
|
4981
4981
|
width: 100%;
|
|
4982
|
-
min-height: ${
|
|
4982
|
+
min-height: ${Qe(48)};
|
|
4983
4983
|
}
|
|
4984
4984
|
.${e}-form {
|
|
4985
4985
|
display: flex;
|
|
@@ -4999,7 +4999,7 @@ function nl(e) {
|
|
|
4999
4999
|
min-width: 0;
|
|
5000
5000
|
}
|
|
5001
5001
|
.${e}-field-group.${e}-labeled {
|
|
5002
|
-
gap: ${
|
|
5002
|
+
gap: ${Qe(4)};
|
|
5003
5003
|
}
|
|
5004
5004
|
.${e}-field-label {
|
|
5005
5005
|
white-space: nowrap;
|
|
@@ -5091,26 +5091,19 @@ function nl(e) {
|
|
|
5091
5091
|
outline: 1px solid var(--${e}-focus-button-border-color, var(--${e}-button-border-color));
|
|
5092
5092
|
}
|
|
5093
5093
|
.${e}-success {
|
|
5094
|
-
margin-top: ${
|
|
5095
|
-
font-size: ${
|
|
5094
|
+
margin-top: ${Qe(8)};
|
|
5095
|
+
font-size: ${Qe(14)};
|
|
5096
5096
|
color: var(--${e}-success-success-color, var(--${e}-success-color));
|
|
5097
5097
|
}
|
|
5098
5098
|
.${e}-error {
|
|
5099
|
-
margin-top: ${
|
|
5100
|
-
font-size: ${
|
|
5099
|
+
margin-top: ${Qe(8)};
|
|
5100
|
+
font-size: ${Qe(14)};
|
|
5101
5101
|
color: var(--${e}-error-error-color, var(--${e}-error-color));
|
|
5102
5102
|
}
|
|
5103
5103
|
.${e}-overlay-anchor {
|
|
5104
5104
|
position: relative;
|
|
5105
5105
|
height: auto;
|
|
5106
5106
|
}
|
|
5107
|
-
.${e}-gap-spacer {
|
|
5108
|
-
flex: 0 0 auto;
|
|
5109
|
-
align-self: stretch;
|
|
5110
|
-
}
|
|
5111
|
-
.${e}-fields-gap-spacer {
|
|
5112
|
-
flex: 0 0 auto;
|
|
5113
|
-
}
|
|
5114
5107
|
`;
|
|
5115
5108
|
}
|
|
5116
5109
|
function ol({ settings: e, isEditor: t, metadata: r, activeEvent: n }) {
|
|
@@ -5123,158 +5116,143 @@ function ol({ settings: e, isEditor: t, metadata: r, activeEvent: n }) {
|
|
|
5123
5116
|
button: c,
|
|
5124
5117
|
gap: S = 8e-3,
|
|
5125
5118
|
fieldsGap: m = 8e-3,
|
|
5126
|
-
label:
|
|
5119
|
+
label: y,
|
|
5127
5120
|
buttonCorners: u,
|
|
5128
5121
|
buttonStroke: f,
|
|
5129
|
-
inputCorners:
|
|
5130
|
-
inputStroke:
|
|
5122
|
+
inputCorners: w,
|
|
5123
|
+
inputStroke: $,
|
|
5131
5124
|
buttonPadding: d,
|
|
5132
|
-
inputPadding:
|
|
5125
|
+
inputPadding: h,
|
|
5133
5126
|
inputColor: W,
|
|
5134
5127
|
inputTextColor: D,
|
|
5135
|
-
inputBorderColor:
|
|
5128
|
+
inputBorderColor: x,
|
|
5136
5129
|
placeholderColor: v,
|
|
5137
|
-
buttonColor:
|
|
5138
|
-
buttonTextColor:
|
|
5130
|
+
buttonColor: E,
|
|
5131
|
+
buttonTextColor: k,
|
|
5139
5132
|
buttonBorderColor: V,
|
|
5140
|
-
labelTextColor:
|
|
5133
|
+
labelTextColor: I,
|
|
5141
5134
|
successColor: O,
|
|
5142
|
-
errorColor:
|
|
5143
|
-
fontFamily:
|
|
5144
|
-
successMessage:
|
|
5135
|
+
errorColor: M,
|
|
5136
|
+
fontFamily: H,
|
|
5137
|
+
successMessage: U,
|
|
5145
5138
|
errorMessage: g,
|
|
5146
|
-
stateOverrides:
|
|
5147
|
-
} = e,
|
|
5139
|
+
stateOverrides: L
|
|
5140
|
+
} = e, T = a === "B", b = s.slice(0, Math.min(i, s.length)), _ = p ? lr(
|
|
5148
5141
|
{
|
|
5149
5142
|
...p,
|
|
5150
|
-
fontSettings: { ...p.fontSettings, fontFamily:
|
|
5143
|
+
fontSettings: { ...p.fontSettings, fontFamily: H }
|
|
5151
5144
|
},
|
|
5152
5145
|
t
|
|
5153
|
-
) : void 0,
|
|
5154
|
-
...
|
|
5146
|
+
) : void 0, B = {
|
|
5147
|
+
..._,
|
|
5155
5148
|
borderStyle: "solid",
|
|
5156
|
-
borderRadius:
|
|
5157
|
-
borderWidth:
|
|
5158
|
-
paddingTop:
|
|
5159
|
-
paddingRight:
|
|
5160
|
-
paddingBottom:
|
|
5161
|
-
paddingLeft:
|
|
5162
|
-
},
|
|
5149
|
+
borderRadius: F(w ?? 0, t),
|
|
5150
|
+
borderWidth: F($ ?? 0, t),
|
|
5151
|
+
paddingTop: F((h == null ? void 0 : h.top) ?? 0, t),
|
|
5152
|
+
paddingRight: F((h == null ? void 0 : h.right) ?? 0, t),
|
|
5153
|
+
paddingBottom: F((h == null ? void 0 : h.bottom) ?? 0, t),
|
|
5154
|
+
paddingLeft: F((h == null ? void 0 : h.left) ?? 0, t)
|
|
5155
|
+
}, J = c ? lr(
|
|
5163
5156
|
{
|
|
5164
5157
|
...c,
|
|
5165
|
-
fontSettings: { ...c.fontSettings, fontFamily:
|
|
5158
|
+
fontSettings: { ...c.fontSettings, fontFamily: H }
|
|
5166
5159
|
},
|
|
5167
5160
|
t
|
|
5168
|
-
) : void 0,
|
|
5161
|
+
) : void 0, ee = y ? lr(
|
|
5169
5162
|
{
|
|
5170
|
-
...
|
|
5171
|
-
fontSettings: { ...
|
|
5163
|
+
...y,
|
|
5164
|
+
fontSettings: { ...y.fontSettings, fontFamily: H }
|
|
5172
5165
|
},
|
|
5173
5166
|
t
|
|
5174
|
-
) : void 0,
|
|
5167
|
+
) : void 0, Q = al(o, {
|
|
5175
5168
|
inputColor: W,
|
|
5176
5169
|
inputTextColor: D,
|
|
5177
|
-
inputBorderColor:
|
|
5178
|
-
placeholderColor: v,
|
|
5179
|
-
buttonColor:
|
|
5180
|
-
buttonTextColor:
|
|
5170
|
+
inputBorderColor: x,
|
|
5171
|
+
placeholderColor: v != null && v.trim() ? v : "#cccccc",
|
|
5172
|
+
buttonColor: E,
|
|
5173
|
+
buttonTextColor: k,
|
|
5181
5174
|
buttonBorderColor: V,
|
|
5182
|
-
labelTextColor:
|
|
5175
|
+
labelTextColor: I,
|
|
5183
5176
|
successColor: O,
|
|
5184
|
-
errorColor:
|
|
5185
|
-
},
|
|
5186
|
-
() => Object.fromEntries(
|
|
5187
|
-
), [
|
|
5188
|
-
|
|
5189
|
-
},
|
|
5190
|
-
|
|
5191
|
-
const
|
|
5192
|
-
|
|
5193
|
-
var
|
|
5194
|
-
return [
|
|
5195
|
-
}).filter(([,
|
|
5177
|
+
errorColor: M
|
|
5178
|
+
}, L), [fe, A] = le(
|
|
5179
|
+
() => Object.fromEntries(b.map((G) => [G.name, ""]))
|
|
5180
|
+
), [X, ce] = le("idle"), [ie, ue] = le(null), $e = n === "success" ? "success" : n === "error" ? "error" : X, De = n === "error" ? g : ie, R = n === "filled" ? Object.fromEntries(b.map((G) => [G.name, "Filled"])) : fe, C = $e === "error" ? Dt(b, R) : null, j = n && n !== "default" ? `${o}-state-${n}` : "", P = r == null ? void 0 : r.submitUrl, q = (G, K) => {
|
|
5181
|
+
A((ne) => ({ ...ne, [G]: K }));
|
|
5182
|
+
}, re = async (G) => {
|
|
5183
|
+
G.preventDefault();
|
|
5184
|
+
const K = Object.fromEntries(
|
|
5185
|
+
b.map((ae) => {
|
|
5186
|
+
var oe;
|
|
5187
|
+
return [ae.name, ((oe = fe[ae.name]) == null ? void 0 : oe.trim()) ?? ""];
|
|
5188
|
+
}).filter(([, ae]) => ae)
|
|
5196
5189
|
);
|
|
5197
|
-
if (!
|
|
5198
|
-
const
|
|
5199
|
-
if (
|
|
5200
|
-
|
|
5190
|
+
if (!P || Object.keys(K).length === 0) return;
|
|
5191
|
+
const ne = Dt(b, fe);
|
|
5192
|
+
if (ne) {
|
|
5193
|
+
ce("error"), ue(ne);
|
|
5201
5194
|
return;
|
|
5202
5195
|
}
|
|
5203
|
-
|
|
5196
|
+
ce("submitting"), ue(null);
|
|
5204
5197
|
try {
|
|
5205
|
-
const
|
|
5198
|
+
const ae = await fetch(P, {
|
|
5206
5199
|
method: "POST",
|
|
5207
5200
|
headers: { "Content-Type": "application/json" },
|
|
5208
|
-
body: JSON.stringify(
|
|
5209
|
-
...ie,
|
|
5210
|
-
pageUrl: typeof window < "u" ? window.location.href : ""
|
|
5211
|
-
})
|
|
5201
|
+
body: JSON.stringify(K)
|
|
5212
5202
|
});
|
|
5213
|
-
if (!
|
|
5214
|
-
const
|
|
5215
|
-
throw new Error(
|
|
5203
|
+
if (!ae.ok) {
|
|
5204
|
+
const oe = await ae.text();
|
|
5205
|
+
throw new Error(oe || `Request failed: ${ae.status}`);
|
|
5216
5206
|
}
|
|
5217
|
-
|
|
5218
|
-
} catch (
|
|
5219
|
-
|
|
5207
|
+
ce("success"), A(Object.fromEntries(b.map((oe) => [oe.name, ""])));
|
|
5208
|
+
} catch (ae) {
|
|
5209
|
+
ce("error"), ue(ae instanceof Error ? ae.message : "Something went wrong");
|
|
5220
5210
|
}
|
|
5221
5211
|
};
|
|
5222
|
-
return /* @__PURE__ */
|
|
5212
|
+
return /* @__PURE__ */ he("div", { className: `${o}-wrapper ${j}`.trim(), style: Q, children: [
|
|
5223
5213
|
/* @__PURE__ */ N("style", { children: nl(o) }),
|
|
5224
|
-
/* @__PURE__ */
|
|
5214
|
+
/* @__PURE__ */ he(
|
|
5225
5215
|
"form",
|
|
5226
5216
|
{
|
|
5227
|
-
onSubmit:
|
|
5217
|
+
onSubmit: re,
|
|
5228
5218
|
className: `${o}-form`,
|
|
5219
|
+
style: { gap: F(S, t) },
|
|
5229
5220
|
children: [
|
|
5230
|
-
/* @__PURE__ */ N("div", { className: `${o}-fields`, children: _.map((te, ie) => /* @__PURE__ */ ye(je.Fragment, { children: [
|
|
5231
|
-
/* @__PURE__ */ ye("div", { className: `${o}-field-group${I ? ` ${o}-labeled` : ""}`, children: [
|
|
5232
|
-
I && /* @__PURE__ */ N("span", { className: `${o}-field-label`, style: oe ? { ...oe, lineHeight: oe.fontSize } : void 0, children: te.label || te.name }),
|
|
5233
|
-
te.type === "textarea" ? /* @__PURE__ */ N(
|
|
5234
|
-
"textarea",
|
|
5235
|
-
{
|
|
5236
|
-
name: te.name,
|
|
5237
|
-
autoComplete: "off",
|
|
5238
|
-
value: j[te.name] ?? "",
|
|
5239
|
-
onChange: (ae) => K(te.name, ae.target.value),
|
|
5240
|
-
placeholder: te.placeholder,
|
|
5241
|
-
className: `${o}-input`,
|
|
5242
|
-
style: $,
|
|
5243
|
-
rows: 1,
|
|
5244
|
-
"data-field-type": "textarea"
|
|
5245
|
-
}
|
|
5246
|
-
) : /* @__PURE__ */ N(
|
|
5247
|
-
"input",
|
|
5248
|
-
{
|
|
5249
|
-
type: te.type === "phone" ? "tel" : te.type === "email" ? "email" : "text",
|
|
5250
|
-
name: te.name,
|
|
5251
|
-
autoComplete: "off",
|
|
5252
|
-
value: j[te.name] ?? "",
|
|
5253
|
-
onChange: (ae) => K(te.name, ae.target.value),
|
|
5254
|
-
placeholder: te.placeholder,
|
|
5255
|
-
required: te.type === "email",
|
|
5256
|
-
className: `${o}-input`,
|
|
5257
|
-
style: $
|
|
5258
|
-
}
|
|
5259
|
-
)
|
|
5260
|
-
] }),
|
|
5261
|
-
ie < _.length - 1 && /* @__PURE__ */ N(
|
|
5262
|
-
"div",
|
|
5263
|
-
{
|
|
5264
|
-
"data-axis": "y",
|
|
5265
|
-
className: `${o}-overlay-anchor ${o}-fields-gap-spacer`,
|
|
5266
|
-
"data-controls": "settings.fieldsGap",
|
|
5267
|
-
style: { height: B(m, t), width: "100%" }
|
|
5268
|
-
}
|
|
5269
|
-
)
|
|
5270
|
-
] }, ie)) }),
|
|
5271
5221
|
/* @__PURE__ */ N(
|
|
5272
5222
|
"div",
|
|
5273
5223
|
{
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
"
|
|
5277
|
-
|
|
5224
|
+
className: `${o}-fields`,
|
|
5225
|
+
style: { gap: F(m, t) },
|
|
5226
|
+
children: b.map((G, K) => /* @__PURE__ */ he("div", { className: `${o}-field-group${T ? ` ${o}-labeled` : ""}`, children: [
|
|
5227
|
+
T && /* @__PURE__ */ N("span", { className: `${o}-field-label`, style: ee ? { ...ee, lineHeight: ee.fontSize } : void 0, children: G.label || G.name }),
|
|
5228
|
+
G.type === "textarea" ? /* @__PURE__ */ N(
|
|
5229
|
+
"textarea",
|
|
5230
|
+
{
|
|
5231
|
+
name: G.name,
|
|
5232
|
+
autoComplete: "off",
|
|
5233
|
+
value: R[G.name] ?? "",
|
|
5234
|
+
onChange: (ne) => q(G.name, ne.target.value),
|
|
5235
|
+
placeholder: G.placeholder,
|
|
5236
|
+
className: `${o}-input`,
|
|
5237
|
+
style: B,
|
|
5238
|
+
rows: 1,
|
|
5239
|
+
"data-field-type": "textarea"
|
|
5240
|
+
}
|
|
5241
|
+
) : /* @__PURE__ */ N(
|
|
5242
|
+
"input",
|
|
5243
|
+
{
|
|
5244
|
+
type: G.type === "phone" ? "tel" : G.type === "email" ? "email" : "text",
|
|
5245
|
+
name: G.name,
|
|
5246
|
+
autoComplete: "off",
|
|
5247
|
+
value: R[G.name] ?? "",
|
|
5248
|
+
onChange: (ne) => q(G.name, ne.target.value),
|
|
5249
|
+
placeholder: G.placeholder,
|
|
5250
|
+
required: G.type === "email",
|
|
5251
|
+
className: `${o}-input`,
|
|
5252
|
+
style: B
|
|
5253
|
+
}
|
|
5254
|
+
)
|
|
5255
|
+
] }, K))
|
|
5278
5256
|
}
|
|
5279
5257
|
),
|
|
5280
5258
|
/* @__PURE__ */ N("div", { className: `${o}-overlay-anchor`, children: /* @__PURE__ */ N(
|
|
@@ -5284,35 +5262,35 @@ function ol({ settings: e, isEditor: t, metadata: r, activeEvent: n }) {
|
|
|
5284
5262
|
className: `${o}-button`,
|
|
5285
5263
|
style: {
|
|
5286
5264
|
borderStyle: "solid",
|
|
5287
|
-
borderRadius:
|
|
5288
|
-
borderWidth:
|
|
5289
|
-
paddingTop:
|
|
5290
|
-
paddingRight:
|
|
5291
|
-
paddingBottom:
|
|
5292
|
-
paddingLeft:
|
|
5293
|
-
...
|
|
5265
|
+
borderRadius: F(u ?? 0, t),
|
|
5266
|
+
borderWidth: F(f ?? 0, t),
|
|
5267
|
+
paddingTop: F((d == null ? void 0 : d.top) ?? 0, t),
|
|
5268
|
+
paddingRight: F((d == null ? void 0 : d.right) ?? 0, t),
|
|
5269
|
+
paddingBottom: F((d == null ? void 0 : d.bottom) ?? 0, t),
|
|
5270
|
+
paddingLeft: F((d == null ? void 0 : d.left) ?? 0, t),
|
|
5271
|
+
...J
|
|
5294
5272
|
},
|
|
5295
|
-
children: /* @__PURE__ */ N("span", { className: `${o}-overlay-anchor`, children:
|
|
5273
|
+
children: /* @__PURE__ */ N("span", { className: `${o}-overlay-anchor`, children: X === "submitting" ? "..." : l })
|
|
5296
5274
|
}
|
|
5297
5275
|
) })
|
|
5298
5276
|
]
|
|
5299
5277
|
}
|
|
5300
5278
|
),
|
|
5301
|
-
|
|
5279
|
+
$e === "success" && /* @__PURE__ */ N(
|
|
5302
5280
|
"p",
|
|
5303
5281
|
{
|
|
5304
5282
|
className: `${o}-success`,
|
|
5305
|
-
style: { ...
|
|
5306
|
-
children:
|
|
5283
|
+
style: { ..._, lineHeight: _ == null ? void 0 : _.fontSize },
|
|
5284
|
+
children: U
|
|
5307
5285
|
}
|
|
5308
5286
|
),
|
|
5309
|
-
|
|
5287
|
+
$e === "error" && /* @__PURE__ */ N(
|
|
5310
5288
|
"p",
|
|
5311
5289
|
{
|
|
5312
5290
|
className: `${o}-error`,
|
|
5313
|
-
style: { ...
|
|
5291
|
+
style: { ..._, lineHeight: _ == null ? void 0 : _.fontSize },
|
|
5314
5292
|
role: "alert",
|
|
5315
|
-
children: C ??
|
|
5293
|
+
children: C ?? De ?? g
|
|
5316
5294
|
}
|
|
5317
5295
|
)
|
|
5318
5296
|
] });
|
|
@@ -5350,10 +5328,10 @@ function lr(e, t) {
|
|
|
5350
5328
|
fontFamily: e.fontSettings.fontFamily,
|
|
5351
5329
|
fontWeight: e.fontSettings.fontWeight,
|
|
5352
5330
|
fontStyle: e.fontSettings.fontStyle,
|
|
5353
|
-
letterSpacing:
|
|
5354
|
-
wordSpacing:
|
|
5355
|
-
fontSize:
|
|
5356
|
-
lineHeight: e.lineHeight !== void 0 ?
|
|
5331
|
+
letterSpacing: F(e.letterSpacing, t),
|
|
5332
|
+
wordSpacing: F(e.wordSpacing, t),
|
|
5333
|
+
fontSize: F(e.fontSize, t),
|
|
5334
|
+
lineHeight: e.lineHeight !== void 0 ? F(e.lineHeight, t) : void 0,
|
|
5357
5335
|
textTransform: (r = e.textAppearance) == null ? void 0 : r.textTransform,
|
|
5358
5336
|
textDecoration: (n = e.textAppearance) == null ? void 0 : n.textDecoration,
|
|
5359
5337
|
fontVariant: (o = e.textAppearance) == null ? void 0 : o.fontVariant
|
|
@@ -5498,13 +5476,6 @@ function getCSS(P: string): string {
|
|
|
5498
5476
|
position: relative;
|
|
5499
5477
|
height: auto;
|
|
5500
5478
|
}
|
|
5501
|
-
.\${P}-gap-spacer {
|
|
5502
|
-
flex: 0 0 auto;
|
|
5503
|
-
align-self: stretch;
|
|
5504
|
-
}
|
|
5505
|
-
.\${P}-fields-gap-spacer {
|
|
5506
|
-
flex: 0 0 auto;
|
|
5507
|
-
}
|
|
5508
5479
|
\`;
|
|
5509
5480
|
}
|
|
5510
5481
|
|
|
@@ -5591,9 +5562,16 @@ export function Form({ settings, isEditor, metadata, activeEvent }: FormProps) {
|
|
|
5591
5562
|
: undefined;
|
|
5592
5563
|
|
|
5593
5564
|
const colorVars = buildColorVars(P, {
|
|
5594
|
-
inputColor,
|
|
5595
|
-
|
|
5596
|
-
|
|
5565
|
+
inputColor,
|
|
5566
|
+
inputTextColor,
|
|
5567
|
+
inputBorderColor,
|
|
5568
|
+
placeholderColor: placeholderColor?.trim() ? placeholderColor : '#cccccc',
|
|
5569
|
+
buttonColor,
|
|
5570
|
+
buttonTextColor,
|
|
5571
|
+
buttonBorderColor,
|
|
5572
|
+
labelTextColor,
|
|
5573
|
+
successColor,
|
|
5574
|
+
errorColor,
|
|
5597
5575
|
}, stateOverrides);
|
|
5598
5576
|
|
|
5599
5577
|
const [fieldValues, setFieldValues] = useState<Record<string, string>>(() =>
|
|
@@ -5615,11 +5593,7 @@ export function Form({ settings, isEditor, metadata, activeEvent }: FormProps) {
|
|
|
5615
5593
|
: null;
|
|
5616
5594
|
const stateClass = activeEvent && activeEvent !== 'default' ? \`\${P}-state-\${activeEvent}\` : '';
|
|
5617
5595
|
|
|
5618
|
-
const
|
|
5619
|
-
const projectId = metadata?.projectId as string | undefined;
|
|
5620
|
-
const configId = metadata?.pluginConfigId as string | undefined;
|
|
5621
|
-
const canSubmit = Boolean(apiBase && projectId && configId);
|
|
5622
|
-
|
|
5596
|
+
const submitUrl = metadata?.submitUrl as string | undefined;
|
|
5623
5597
|
const handleFieldChange = (name: string, value: string) => {
|
|
5624
5598
|
setFieldValues((prev) => ({ ...prev, [name]: value }));
|
|
5625
5599
|
};
|
|
@@ -5629,7 +5603,7 @@ export function Form({ settings, isEditor, metadata, activeEvent }: FormProps) {
|
|
|
5629
5603
|
const payload = Object.fromEntries(
|
|
5630
5604
|
visibleFields.map((f) => [f.name, fieldValues[f.name]?.trim() ?? '']).filter(([, v]) => v)
|
|
5631
5605
|
);
|
|
5632
|
-
if (!
|
|
5606
|
+
if (!submitUrl || Object.keys(payload).length === 0) return;
|
|
5633
5607
|
|
|
5634
5608
|
const validationError = getFormFieldValidationError(visibleFields, fieldValues);
|
|
5635
5609
|
if (validationError) {
|
|
@@ -5642,14 +5616,10 @@ export function Form({ settings, isEditor, metadata, activeEvent }: FormProps) {
|
|
|
5642
5616
|
setErrorMessage(null);
|
|
5643
5617
|
|
|
5644
5618
|
try {
|
|
5645
|
-
const
|
|
5646
|
-
const res = await fetch(url, {
|
|
5619
|
+
const res = await fetch(submitUrl, {
|
|
5647
5620
|
method: 'POST',
|
|
5648
5621
|
headers: { 'Content-Type': 'application/json' },
|
|
5649
|
-
body: JSON.stringify(
|
|
5650
|
-
...payload,
|
|
5651
|
-
pageUrl: typeof window !== 'undefined' ? window.location.href : '',
|
|
5652
|
-
}),
|
|
5622
|
+
body: JSON.stringify(payload),
|
|
5653
5623
|
});
|
|
5654
5624
|
if (!res.ok) {
|
|
5655
5625
|
const text = await res.text();
|
|
@@ -5670,59 +5640,47 @@ export function Form({ settings, isEditor, metadata, activeEvent }: FormProps) {
|
|
|
5670
5640
|
<form
|
|
5671
5641
|
onSubmit={handleSubmit}
|
|
5672
5642
|
className={\`\${P}-form\`}
|
|
5643
|
+
style={{ gap: scalingValue(gap, isEditor) }}
|
|
5673
5644
|
>
|
|
5674
|
-
<div
|
|
5645
|
+
<div
|
|
5646
|
+
className={\`\${P}-fields\`}
|
|
5647
|
+
style={{ gap: scalingValue(fieldsGap, isEditor) }}
|
|
5648
|
+
>
|
|
5675
5649
|
{visibleFields.map((field, index) => (
|
|
5676
|
-
<
|
|
5677
|
-
|
|
5678
|
-
{
|
|
5679
|
-
|
|
5680
|
-
|
|
5681
|
-
|
|
5682
|
-
|
|
5683
|
-
|
|
5684
|
-
|
|
5685
|
-
|
|
5686
|
-
|
|
5687
|
-
|
|
5688
|
-
|
|
5689
|
-
|
|
5690
|
-
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
|
-
|
|
5700
|
-
|
|
5701
|
-
|
|
5702
|
-
|
|
5703
|
-
|
|
5704
|
-
|
|
5705
|
-
style={inputFieldCss}
|
|
5706
|
-
/>
|
|
5707
|
-
)}
|
|
5708
|
-
</div>
|
|
5709
|
-
{index < visibleFields.length - 1 && (
|
|
5710
|
-
<div
|
|
5711
|
-
data-axis="y"
|
|
5712
|
-
className={\`\${P}-overlay-anchor \${P}-fields-gap-spacer\`}
|
|
5713
|
-
data-controls="settings.fieldsGap"
|
|
5714
|
-
style={{ height: scalingValue(fieldsGap, isEditor), width: '100%' }}
|
|
5650
|
+
<div key={index} className={\`\${P}-field-group\${showLabels ? \` \${P}-labeled\` : ''}\`}>
|
|
5651
|
+
{showLabels && (
|
|
5652
|
+
<span className={\`\${P}-field-label\`} style={labelTextCss ? { ...labelTextCss, lineHeight: labelTextCss.fontSize } : undefined}>
|
|
5653
|
+
{field.label || field.name}
|
|
5654
|
+
</span>
|
|
5655
|
+
)}
|
|
5656
|
+
{field.type === 'textarea' ? (
|
|
5657
|
+
<textarea
|
|
5658
|
+
name={field.name}
|
|
5659
|
+
autoComplete="off"
|
|
5660
|
+
value={displayValues[field.name] ?? ''}
|
|
5661
|
+
onChange={(e) => handleFieldChange(field.name, e.target.value)}
|
|
5662
|
+
placeholder={field.placeholder}
|
|
5663
|
+
className={\`\${P}-input\`}
|
|
5664
|
+
style={inputFieldCss}
|
|
5665
|
+
rows={1}
|
|
5666
|
+
data-field-type="textarea"
|
|
5667
|
+
/>
|
|
5668
|
+
) : (
|
|
5669
|
+
<input
|
|
5670
|
+
type={field.type === 'phone' ? 'tel' : field.type === 'email' ? 'email' : 'text'}
|
|
5671
|
+
name={field.name}
|
|
5672
|
+
autoComplete="off"
|
|
5673
|
+
value={displayValues[field.name] ?? ''}
|
|
5674
|
+
onChange={(e) => handleFieldChange(field.name, e.target.value)}
|
|
5675
|
+
placeholder={field.placeholder}
|
|
5676
|
+
required={field.type === 'email'}
|
|
5677
|
+
className={\`\${P}-input\`}
|
|
5678
|
+
style={inputFieldCss}
|
|
5715
5679
|
/>
|
|
5716
5680
|
)}
|
|
5717
|
-
</
|
|
5681
|
+
</div>
|
|
5718
5682
|
))}
|
|
5719
5683
|
</div>
|
|
5720
|
-
<div
|
|
5721
|
-
data-axis="y"
|
|
5722
|
-
className={\`\${P}-overlay-anchor \${P}-gap-spacer\`}
|
|
5723
|
-
data-controls="settings.gap"
|
|
5724
|
-
style={{ height: scalingValue(gap, isEditor), width: '100%' }}
|
|
5725
|
-
/>
|
|
5726
5684
|
<div className={\`\${P}-overlay-anchor\`}>
|
|
5727
5685
|
<button
|
|
5728
5686
|
type="submit"
|
|
@@ -6121,7 +6079,7 @@ function textStylesToCss(textStyles: TextStyles, isEditor?: boolean): React.CSSP
|
|
|
6121
6079
|
type: "string",
|
|
6122
6080
|
scope: "layout",
|
|
6123
6081
|
title: "Label Color",
|
|
6124
|
-
display: { type: "palette-color-picker" }
|
|
6082
|
+
display: { type: "palette-color-picker", visible: !1 }
|
|
6125
6083
|
},
|
|
6126
6084
|
successColor: {
|
|
6127
6085
|
type: "string",
|
|
@@ -6200,6 +6158,7 @@ function textStylesToCss(textStyles: TextStyles, isEditor?: boolean): React.CSSP
|
|
|
6200
6158
|
inputColor: "#000000",
|
|
6201
6159
|
inputTextColor: "#999999",
|
|
6202
6160
|
inputBorderColor: "#cccccc",
|
|
6161
|
+
placeholderColor: "#cccccc",
|
|
6203
6162
|
buttonColor: "#666666",
|
|
6204
6163
|
buttonTextColor: "#ffffff",
|
|
6205
6164
|
buttonBorderColor: "#cccccc",
|
|
@@ -6213,7 +6172,13 @@ function textStylesToCss(textStyles: TextStyles, isEditor?: boolean): React.CSSP
|
|
|
6213
6172
|
label: cr(400),
|
|
6214
6173
|
successMessage: "Thanks for subscribing!",
|
|
6215
6174
|
errorMessage: "Please, fill all required fields."
|
|
6216
|
-
}
|
|
6175
|
+
},
|
|
6176
|
+
displayRules: [
|
|
6177
|
+
{
|
|
6178
|
+
if: { name: "type", value: "B" },
|
|
6179
|
+
then: { name: "properties.labelTextColor.display.visible", value: !0 }
|
|
6180
|
+
}
|
|
6181
|
+
]
|
|
6217
6182
|
},
|
|
6218
6183
|
panels: [
|
|
6219
6184
|
{
|
|
@@ -6299,9 +6264,9 @@ function textStylesToCss(textStyles: TextStyles, isEditor?: boolean): React.CSSP
|
|
|
6299
6264
|
items: [...cl],
|
|
6300
6265
|
panelIds: ["general", "typeStyle"],
|
|
6301
6266
|
stateItems: {
|
|
6302
|
-
default: ["inputColor", "
|
|
6303
|
-
hover: ["inputColor", "inputBorderColor", "buttonColor", "buttonTextColor", "buttonBorderColor"],
|
|
6304
|
-
focus: ["inputColor", "
|
|
6267
|
+
default: ["inputColor", "inputBorderColor", "placeholderColor", "placeholderTextColor", "buttonColor", "buttonTextColor", "buttonBorderColor", "labelTextColor"],
|
|
6268
|
+
hover: ["inputColor", "inputBorderColor", "placeholderColor", "buttonColor", "buttonTextColor", "buttonBorderColor"],
|
|
6269
|
+
focus: ["inputColor", "inputBorderColor", "placeholderColor", "buttonColor", "buttonTextColor", "buttonBorderColor"],
|
|
6305
6270
|
filled: ["inputColor", "inputTextColor", "inputBorderColor"],
|
|
6306
6271
|
success: ["successColor"],
|
|
6307
6272
|
error: ["errorColor"]
|
|
@@ -6313,6 +6278,10 @@ function textStylesToCss(textStyles: TextStyles, isEditor?: boolean): React.CSSP
|
|
|
6313
6278
|
element: ol,
|
|
6314
6279
|
id: "form",
|
|
6315
6280
|
name: "Form",
|
|
6281
|
+
preview: {
|
|
6282
|
+
type: "image",
|
|
6283
|
+
url: "https://cdn.cntrl.site/component-assets/clickGalleryPreview.png"
|
|
6284
|
+
},
|
|
6316
6285
|
version: 1,
|
|
6317
6286
|
defaultSize: {
|
|
6318
6287
|
width: 400,
|
|
@@ -6466,18 +6435,18 @@ const fl = ({ settings: e, isEditor: t, metadata: r, activeEvent: n }) => {
|
|
|
6466
6435
|
fieldsToShow: c = 1,
|
|
6467
6436
|
fontFamily: S,
|
|
6468
6437
|
input: m,
|
|
6469
|
-
button:
|
|
6438
|
+
button: y,
|
|
6470
6439
|
height: u,
|
|
6471
6440
|
corners: f,
|
|
6472
|
-
stroke:
|
|
6473
|
-
stateOverrides:
|
|
6441
|
+
stroke: w,
|
|
6442
|
+
stateOverrides: $,
|
|
6474
6443
|
inputPadding: d,
|
|
6475
|
-
buttonPadding:
|
|
6444
|
+
buttonPadding: h,
|
|
6476
6445
|
successMessage: W = "Thanks for subscribing!",
|
|
6477
6446
|
errorMessage: D = "Please, fill all required fields."
|
|
6478
|
-
} = e,
|
|
6479
|
-
() => Object.fromEntries(
|
|
6480
|
-
), [
|
|
6447
|
+
} = e, x = a.slice(0, Math.min(c, a.length)), [v, E] = le(
|
|
6448
|
+
() => Object.fromEntries(x.map((R) => [R.name, ""]))
|
|
6449
|
+
), [k, V] = le("idle"), [I, O] = le(null), M = n === "success" ? "success" : n === "error" ? "error" : k, H = n === "error" ? D : I, U = n === "filled" ? Object.fromEntries(x.map((R) => [R.name, "Filled"])) : v, g = M === "error" ? Dt(x, U) : null, L = n && n !== "default" ? `${o}-state-${n}` : "", T = r == null ? void 0 : r.submitUrl, b = i, _ = (b == null ? void 0 : b.mode) === "Icon" || (b == null ? void 0 : b.mode) === "Label" ? b.mode : s === "Icon" ? "Icon" : "Label", B = b === void 0 ? l : b.label !== void 0 ? b.label : l, J = b === void 0 ? p : b.icon !== void 0 ? b.icon : p, ee = B ?? "", Q = J ?? "", fe = _ === "Icon", A = ee || "Submit", X = m ? cn(
|
|
6481
6450
|
{
|
|
6482
6451
|
...m,
|
|
6483
6452
|
fontSettings: {
|
|
@@ -6486,16 +6455,16 @@ const fl = ({ settings: e, isEditor: t, metadata: r, activeEvent: n }) => {
|
|
|
6486
6455
|
}
|
|
6487
6456
|
},
|
|
6488
6457
|
t
|
|
6489
|
-
) : void 0,
|
|
6458
|
+
) : void 0, ce = y ? cn(
|
|
6490
6459
|
{
|
|
6491
|
-
...
|
|
6460
|
+
...y,
|
|
6492
6461
|
fontSettings: {
|
|
6493
|
-
...
|
|
6494
|
-
fontFamily: S ??
|
|
6462
|
+
...y.fontSettings,
|
|
6463
|
+
fontFamily: S ?? y.fontSettings.fontFamily
|
|
6495
6464
|
}
|
|
6496
6465
|
},
|
|
6497
6466
|
t
|
|
6498
|
-
) : void 0,
|
|
6467
|
+
) : void 0, ie = ml(o, {
|
|
6499
6468
|
strokeColor: e.strokeColor,
|
|
6500
6469
|
inputColor: e.inputColor,
|
|
6501
6470
|
placeholderColor: e.placeholderColor,
|
|
@@ -6503,71 +6472,70 @@ const fl = ({ settings: e, isEditor: t, metadata: r, activeEvent: n }) => {
|
|
|
6503
6472
|
successColor: e.successColor,
|
|
6504
6473
|
errorColor: e.errorColor,
|
|
6505
6474
|
inputTextColor: e.inputTextColor ?? (m == null ? void 0 : m.color) ?? "#111111",
|
|
6506
|
-
buttonTextColor: e.buttonTextColor ?? (
|
|
6507
|
-
},
|
|
6508
|
-
borderRadius:
|
|
6509
|
-
borderWidth:
|
|
6475
|
+
buttonTextColor: e.buttonTextColor ?? (y == null ? void 0 : y.color) ?? "#ffffff"
|
|
6476
|
+
}, $), ue = {
|
|
6477
|
+
borderRadius: F(f, t),
|
|
6478
|
+
borderWidth: F(w, t),
|
|
6510
6479
|
borderStyle: "solid",
|
|
6511
6480
|
borderColor: `var(--${o}-stroke-color)`
|
|
6512
|
-
},
|
|
6513
|
-
|
|
6514
|
-
const
|
|
6515
|
-
|
|
6516
|
-
|
|
6517
|
-
|
|
6518
|
-
|
|
6519
|
-
|
|
6520
|
-
if (
|
|
6521
|
-
|
|
6481
|
+
}, $e = { borderLeftWidth: F(w, t) }, De = async (R) => {
|
|
6482
|
+
R.preventDefault();
|
|
6483
|
+
const C = Object.fromEntries(
|
|
6484
|
+
x.map((P) => {
|
|
6485
|
+
var q;
|
|
6486
|
+
return [P.name, ((q = v[P.name]) == null ? void 0 : q.trim()) ?? ""];
|
|
6487
|
+
}).filter(([, P]) => P)
|
|
6488
|
+
);
|
|
6489
|
+
if (!T || Object.keys(C).length === 0) return;
|
|
6490
|
+
const j = Dt(x, v);
|
|
6491
|
+
if (j) {
|
|
6492
|
+
V("error"), O(j);
|
|
6522
6493
|
return;
|
|
6523
6494
|
}
|
|
6524
6495
|
V("submitting"), O(null);
|
|
6525
6496
|
try {
|
|
6526
|
-
const
|
|
6497
|
+
const P = await fetch(T, {
|
|
6527
6498
|
method: "POST",
|
|
6528
6499
|
headers: { "Content-Type": "application/json" },
|
|
6529
|
-
body: JSON.stringify(
|
|
6530
|
-
...a.map((q) => ({ [q.name]: G })),
|
|
6531
|
-
pageUrl: typeof window < "u" ? window.location.href : ""
|
|
6532
|
-
})
|
|
6500
|
+
body: JSON.stringify(C)
|
|
6533
6501
|
});
|
|
6534
|
-
if (!
|
|
6535
|
-
const q = await
|
|
6536
|
-
throw new Error(q || `Request failed: ${
|
|
6502
|
+
if (!P.ok) {
|
|
6503
|
+
const q = await P.text();
|
|
6504
|
+
throw new Error(q || `Request failed: ${P.status}`);
|
|
6537
6505
|
}
|
|
6538
|
-
V("success"),
|
|
6539
|
-
} catch (
|
|
6540
|
-
V("error"), O(
|
|
6506
|
+
V("success"), E(Object.fromEntries(x.map((q) => [q.name, ""])));
|
|
6507
|
+
} catch (P) {
|
|
6508
|
+
V("error"), O(P instanceof Error ? P.message : "Something went wrong");
|
|
6541
6509
|
}
|
|
6542
6510
|
};
|
|
6543
|
-
return /* @__PURE__ */
|
|
6511
|
+
return /* @__PURE__ */ he("div", { className: `${o}-wrapper ${L}`.trim(), style: ie, children: [
|
|
6544
6512
|
/* @__PURE__ */ N("style", { children: dl(o) }),
|
|
6545
|
-
/* @__PURE__ */
|
|
6513
|
+
/* @__PURE__ */ he("form", { onSubmit: De, className: `${o}-form`, style: { ...ue, height: F(u, t) }, children: [
|
|
6546
6514
|
/* @__PURE__ */ N(
|
|
6547
6515
|
"div",
|
|
6548
6516
|
{
|
|
6549
6517
|
className: `${o}-inputWrap ${o}-overlayAnchor`,
|
|
6550
6518
|
style: { flex: 1, minWidth: 0 },
|
|
6551
|
-
children:
|
|
6519
|
+
children: x.map((R) => /* @__PURE__ */ N(
|
|
6552
6520
|
"input",
|
|
6553
6521
|
{
|
|
6554
|
-
type:
|
|
6555
|
-
name:
|
|
6522
|
+
type: R.type === "email" ? "email" : R.type === "phone" ? "tel" : "text",
|
|
6523
|
+
name: R.name,
|
|
6556
6524
|
autoComplete: "off",
|
|
6557
|
-
value:
|
|
6558
|
-
onChange: (
|
|
6559
|
-
placeholder:
|
|
6560
|
-
required:
|
|
6525
|
+
value: U[R.name] ?? "",
|
|
6526
|
+
onChange: (C) => E((j) => ({ ...j, [R.name]: C.target.value })),
|
|
6527
|
+
placeholder: R.placeholder,
|
|
6528
|
+
required: R.type === "email",
|
|
6561
6529
|
className: `${o}-input`,
|
|
6562
6530
|
style: {
|
|
6563
|
-
...
|
|
6564
|
-
paddingRight:
|
|
6565
|
-
paddingLeft:
|
|
6566
|
-
paddingTop:
|
|
6567
|
-
paddingBottom:
|
|
6531
|
+
...X,
|
|
6532
|
+
paddingRight: F(d.right, t),
|
|
6533
|
+
paddingLeft: F(d.left, t),
|
|
6534
|
+
paddingTop: F(d.top, t),
|
|
6535
|
+
paddingBottom: F(d.bottom, t)
|
|
6568
6536
|
}
|
|
6569
6537
|
},
|
|
6570
|
-
|
|
6538
|
+
R.name
|
|
6571
6539
|
))
|
|
6572
6540
|
}
|
|
6573
6541
|
),
|
|
@@ -6576,34 +6544,34 @@ const fl = ({ settings: e, isEditor: t, metadata: r, activeEvent: n }) => {
|
|
|
6576
6544
|
{
|
|
6577
6545
|
type: "submit",
|
|
6578
6546
|
className: `${o}-submitBtn`,
|
|
6579
|
-
"aria-label":
|
|
6547
|
+
"aria-label": A,
|
|
6580
6548
|
style: {
|
|
6581
|
-
...
|
|
6582
|
-
|
|
6583
|
-
paddingRight:
|
|
6584
|
-
paddingLeft:
|
|
6585
|
-
paddingTop:
|
|
6586
|
-
paddingBottom:
|
|
6549
|
+
...ce,
|
|
6550
|
+
...$e,
|
|
6551
|
+
paddingRight: F(h.right, t),
|
|
6552
|
+
paddingLeft: F(h.left, t),
|
|
6553
|
+
paddingTop: F(h.top, t),
|
|
6554
|
+
paddingBottom: F(h.bottom, t)
|
|
6587
6555
|
},
|
|
6588
|
-
children:
|
|
6556
|
+
children: k === "submitting" ? "..." : fe ? Q ? /* @__PURE__ */ N("img", { src: Q, alt: "", draggable: !1 }) : null : ee
|
|
6589
6557
|
}
|
|
6590
6558
|
) })
|
|
6591
6559
|
] }),
|
|
6592
|
-
|
|
6560
|
+
M === "success" && /* @__PURE__ */ N(
|
|
6593
6561
|
"p",
|
|
6594
6562
|
{
|
|
6595
6563
|
className: `${o}-success`,
|
|
6596
|
-
style: { ...
|
|
6564
|
+
style: { ...X, lineHeight: X == null ? void 0 : X.fontSize },
|
|
6597
6565
|
children: W
|
|
6598
6566
|
}
|
|
6599
6567
|
),
|
|
6600
|
-
|
|
6568
|
+
M === "error" && /* @__PURE__ */ N(
|
|
6601
6569
|
"p",
|
|
6602
6570
|
{
|
|
6603
6571
|
className: `${o}-error`,
|
|
6604
|
-
style: { ...
|
|
6572
|
+
style: { ...X, lineHeight: X == null ? void 0 : X.fontSize },
|
|
6605
6573
|
role: "alert",
|
|
6606
|
-
children: g ??
|
|
6574
|
+
children: g ?? H ?? D
|
|
6607
6575
|
}
|
|
6608
6576
|
)
|
|
6609
6577
|
] });
|
|
@@ -6637,12 +6605,12 @@ function cn(e, t) {
|
|
|
6637
6605
|
fontFamily: e.fontSettings.fontFamily,
|
|
6638
6606
|
fontWeight: e.fontSettings.fontWeight,
|
|
6639
6607
|
fontStyle: e.fontSettings.fontStyle,
|
|
6640
|
-
letterSpacing:
|
|
6641
|
-
wordSpacing:
|
|
6642
|
-
fontSize:
|
|
6608
|
+
letterSpacing: F(e.letterSpacing, t),
|
|
6609
|
+
wordSpacing: F(e.wordSpacing, t),
|
|
6610
|
+
fontSize: F(e.fontSize, t)
|
|
6643
6611
|
};
|
|
6644
6612
|
}
|
|
6645
|
-
const
|
|
6613
|
+
const yl = [
|
|
6646
6614
|
{ name: "email", type: "email", placeholder: "Enter your email", label: "Email", isRequired: !0, error: "Please, enter a valid e-mail." },
|
|
6647
6615
|
{ name: "name", type: "text", placeholder: "Enter your name", label: "Name", isRequired: !1, error: "Please, enter your name." },
|
|
6648
6616
|
{ name: "company", type: "text", placeholder: "Enter company", label: "Company", isRequired: !1, error: "Please, enter your company name." },
|
|
@@ -6677,7 +6645,7 @@ const hl = [
|
|
|
6677
6645
|
title: "Text Color",
|
|
6678
6646
|
display: { type: "palette-color-picker" }
|
|
6679
6647
|
}
|
|
6680
|
-
},
|
|
6648
|
+
}, vl = [
|
|
6681
6649
|
"strokeColor",
|
|
6682
6650
|
"inputColor",
|
|
6683
6651
|
"inputTextColor",
|
|
@@ -6696,7 +6664,7 @@ const hl = [
|
|
|
6696
6664
|
fontSize: 0.01,
|
|
6697
6665
|
lineHeight: 0.01,
|
|
6698
6666
|
color: "#111111"
|
|
6699
|
-
}),
|
|
6667
|
+
}), hl = {
|
|
6700
6668
|
type: "object",
|
|
6701
6669
|
version: 1,
|
|
6702
6670
|
settings: {
|
|
@@ -6869,7 +6837,7 @@ const hl = [
|
|
|
6869
6837
|
}
|
|
6870
6838
|
},
|
|
6871
6839
|
defaults: {
|
|
6872
|
-
fields:
|
|
6840
|
+
fields: yl,
|
|
6873
6841
|
fieldsToShow: 1,
|
|
6874
6842
|
buttonContent: {
|
|
6875
6843
|
mode: "Label",
|
|
@@ -6961,7 +6929,7 @@ const hl = [
|
|
|
6961
6929
|
}
|
|
6962
6930
|
],
|
|
6963
6931
|
paletteBookmark: {
|
|
6964
|
-
items: [...
|
|
6932
|
+
items: [...vl],
|
|
6965
6933
|
panelIds: ["general", "typeStyle"],
|
|
6966
6934
|
stateItems: {
|
|
6967
6935
|
default: ["strokeColor", "inputColor", "inputTextColor", "placeholderColor", "buttonColor", "buttonTextColor"],
|
|
@@ -6982,7 +6950,7 @@ const hl = [
|
|
|
6982
6950
|
width: "50%",
|
|
6983
6951
|
height: 60
|
|
6984
6952
|
},
|
|
6985
|
-
schema:
|
|
6953
|
+
schema: hl
|
|
6986
6954
|
}, El = [
|
|
6987
6955
|
la,
|
|
6988
6956
|
ga,
|