@innovastudio/contentbox-runtime-base 1.0.5 → 1.0.7
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Ie = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
2
2
|
function je(o) {
|
|
3
3
|
return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
|
|
4
4
|
}
|
|
@@ -8,57 +8,57 @@ function Qe() {
|
|
|
8
8
|
(function(i, s) {
|
|
9
9
|
o.exports = s();
|
|
10
10
|
})(Ge, function() {
|
|
11
|
-
var i = typeof window < "u" ? window : typeof
|
|
11
|
+
var i = typeof window < "u" ? window : typeof Ie < "u" ? Ie : typeof self < "u" ? self : {}, s = "Expected a function", e = NaN, a = "[object Symbol]", r = /^\s+|\s+$/g, n = /^[-+]0x[0-9a-f]+$/i, h = /^0b[01]+$/i, d = /^0o[0-7]+$/i, u = parseInt, p = typeof i == "object" && i && i.Object === Object && i, b = typeof self == "object" && self && self.Object === Object && self, C = p || b || Function("return this")(), k = Object.prototype.toString, L = Math.max, at = Math.min, ft = function() {
|
|
12
12
|
return C.Date.now();
|
|
13
13
|
};
|
|
14
|
-
function
|
|
15
|
-
var w, j,
|
|
14
|
+
function Wt(g, m, y) {
|
|
15
|
+
var w, j, H, B, S, $, M = 0, ht = !1, F = !1, K = !0;
|
|
16
16
|
if (typeof g != "function") throw new TypeError(s);
|
|
17
17
|
function ct(E) {
|
|
18
18
|
var U = w, ut = j;
|
|
19
|
-
return w = j = void 0,
|
|
19
|
+
return w = j = void 0, M = E, B = g.apply(ut, U);
|
|
20
20
|
}
|
|
21
21
|
function zt(E) {
|
|
22
|
-
var U = E -
|
|
23
|
-
return
|
|
22
|
+
var U = E - $;
|
|
23
|
+
return $ === void 0 || U >= m || U < 0 || F && E - M >= H;
|
|
24
24
|
}
|
|
25
25
|
function St() {
|
|
26
26
|
var E = ft();
|
|
27
|
-
if (zt(E)) return
|
|
27
|
+
if (zt(E)) return Xt(E);
|
|
28
28
|
S = setTimeout(St, (function(U) {
|
|
29
|
-
var ut = m - (U -
|
|
30
|
-
return F ? at(ut,
|
|
29
|
+
var ut = m - (U - $);
|
|
30
|
+
return F ? at(ut, H - (U - M)) : ut;
|
|
31
31
|
})(E));
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function Xt(E) {
|
|
34
34
|
return S = void 0, K && w ? ct(E) : (w = j = void 0, B);
|
|
35
35
|
}
|
|
36
36
|
function st() {
|
|
37
37
|
var E = ft(), U = zt(E);
|
|
38
|
-
if (w = arguments, j = this,
|
|
38
|
+
if (w = arguments, j = this, $ = E, U) {
|
|
39
39
|
if (S === void 0) return (function(ut) {
|
|
40
|
-
return
|
|
41
|
-
})(
|
|
42
|
-
if (F) return S = setTimeout(St, m), ct(
|
|
40
|
+
return M = ut, S = setTimeout(St, m), ht ? ct(ut) : B;
|
|
41
|
+
})($);
|
|
42
|
+
if (F) return S = setTimeout(St, m), ct($);
|
|
43
43
|
}
|
|
44
44
|
return S === void 0 && (S = setTimeout(St, m)), B;
|
|
45
45
|
}
|
|
46
|
-
return m =
|
|
47
|
-
S !== void 0 && clearTimeout(S),
|
|
46
|
+
return m = Lt(m) || 0, Ct(y) && (ht = !!y.leading, H = (F = "maxWait" in y) ? L(Lt(y.maxWait) || 0, m) : H, K = "trailing" in y ? !!y.trailing : K), st.cancel = function() {
|
|
47
|
+
S !== void 0 && clearTimeout(S), M = 0, w = $ = j = S = void 0;
|
|
48
48
|
}, st.flush = function() {
|
|
49
|
-
return S === void 0 ? B :
|
|
49
|
+
return S === void 0 ? B : Xt(ft());
|
|
50
50
|
}, st;
|
|
51
51
|
}
|
|
52
52
|
function Ct(g) {
|
|
53
53
|
var m = typeof g;
|
|
54
54
|
return !!g && (m == "object" || m == "function");
|
|
55
55
|
}
|
|
56
|
-
function
|
|
56
|
+
function Lt(g) {
|
|
57
57
|
if (typeof g == "number") return g;
|
|
58
58
|
if ((function(w) {
|
|
59
59
|
return typeof w == "symbol" || /* @__PURE__ */ (function(j) {
|
|
60
60
|
return !!j && typeof j == "object";
|
|
61
|
-
})(w) &&
|
|
61
|
+
})(w) && k.call(w) == a;
|
|
62
62
|
})(g)) return e;
|
|
63
63
|
if (Ct(g)) {
|
|
64
64
|
var m = typeof g.valueOf == "function" ? g.valueOf() : g;
|
|
@@ -67,20 +67,20 @@ function Qe() {
|
|
|
67
67
|
if (typeof g != "string") return g === 0 ? g : +g;
|
|
68
68
|
g = g.replace(r, "");
|
|
69
69
|
var y = h.test(g);
|
|
70
|
-
return y || d.test(g) ?
|
|
70
|
+
return y || d.test(g) ? u(g.slice(2), y ? 2 : 8) : n.test(g) ? e : +g;
|
|
71
71
|
}
|
|
72
|
-
var
|
|
72
|
+
var kt = function(g, m, y) {
|
|
73
73
|
var w = !0, j = !0;
|
|
74
74
|
if (typeof g != "function") throw new TypeError(s);
|
|
75
|
-
return Ct(y) && (w = "leading" in y ? !!y.leading : w, j = "trailing" in y ? !!y.trailing : j),
|
|
76
|
-
}, l = "Expected a function", c = NaN, v = "[object Symbol]", _ = /^\s+|\s+$/g, O = /^[-+]0x[0-9a-f]+$/i,
|
|
75
|
+
return Ct(y) && (w = "leading" in y ? !!y.leading : w, j = "trailing" in y ? !!y.trailing : j), Wt(g, m, { leading: w, maxWait: m, trailing: j });
|
|
76
|
+
}, l = "Expected a function", c = NaN, v = "[object Symbol]", _ = /^\s+|\s+$/g, O = /^[-+]0x[0-9a-f]+$/i, I = /^0b[01]+$/i, J = /^0o[0-7]+$/i, At = parseInt, W = typeof i == "object" && i && i.Object === Object && i, gt = typeof self == "object" && self && self.Object === Object && self, x = W || gt || Function("return this")(), A = Object.prototype.toString, X = Math.max, T = Math.min, Z = function() {
|
|
77
77
|
return x.Date.now();
|
|
78
78
|
};
|
|
79
79
|
function G(g) {
|
|
80
80
|
var m = typeof g;
|
|
81
81
|
return !!g && (m == "object" || m == "function");
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function R(g) {
|
|
84
84
|
if (typeof g == "number") return g;
|
|
85
85
|
if ((function(w) {
|
|
86
86
|
return typeof w == "symbol" || /* @__PURE__ */ (function(j) {
|
|
@@ -93,66 +93,66 @@ function Qe() {
|
|
|
93
93
|
}
|
|
94
94
|
if (typeof g != "string") return g === 0 ? g : +g;
|
|
95
95
|
g = g.replace(_, "");
|
|
96
|
-
var y =
|
|
96
|
+
var y = I.test(g);
|
|
97
97
|
return y || J.test(g) ? At(g.slice(2), y ? 2 : 8) : O.test(g) ? c : +g;
|
|
98
98
|
}
|
|
99
|
-
var
|
|
100
|
-
var w, j,
|
|
99
|
+
var It = function(g, m, y) {
|
|
100
|
+
var w, j, H, B, S, $, M = 0, ht = !1, F = !1, K = !0;
|
|
101
101
|
if (typeof g != "function") throw new TypeError(l);
|
|
102
102
|
function ct(E) {
|
|
103
103
|
var U = w, ut = j;
|
|
104
|
-
return w = j = void 0,
|
|
104
|
+
return w = j = void 0, M = E, B = g.apply(ut, U);
|
|
105
105
|
}
|
|
106
106
|
function zt(E) {
|
|
107
|
-
var U = E -
|
|
108
|
-
return
|
|
107
|
+
var U = E - $;
|
|
108
|
+
return $ === void 0 || U >= m || U < 0 || F && E - M >= H;
|
|
109
109
|
}
|
|
110
110
|
function St() {
|
|
111
111
|
var E = Z();
|
|
112
|
-
if (zt(E)) return
|
|
112
|
+
if (zt(E)) return Xt(E);
|
|
113
113
|
S = setTimeout(St, (function(U) {
|
|
114
|
-
var ut = m - (U -
|
|
115
|
-
return F ? T(ut,
|
|
114
|
+
var ut = m - (U - $);
|
|
115
|
+
return F ? T(ut, H - (U - M)) : ut;
|
|
116
116
|
})(E));
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function Xt(E) {
|
|
119
119
|
return S = void 0, K && w ? ct(E) : (w = j = void 0, B);
|
|
120
120
|
}
|
|
121
121
|
function st() {
|
|
122
122
|
var E = Z(), U = zt(E);
|
|
123
|
-
if (w = arguments, j = this,
|
|
123
|
+
if (w = arguments, j = this, $ = E, U) {
|
|
124
124
|
if (S === void 0) return (function(ut) {
|
|
125
|
-
return
|
|
126
|
-
})(
|
|
127
|
-
if (F) return S = setTimeout(St, m), ct(
|
|
125
|
+
return M = ut, S = setTimeout(St, m), ht ? ct(ut) : B;
|
|
126
|
+
})($);
|
|
127
|
+
if (F) return S = setTimeout(St, m), ct($);
|
|
128
128
|
}
|
|
129
129
|
return S === void 0 && (S = setTimeout(St, m)), B;
|
|
130
130
|
}
|
|
131
|
-
return m =
|
|
132
|
-
S !== void 0 && clearTimeout(S),
|
|
131
|
+
return m = R(m) || 0, G(y) && (ht = !!y.leading, H = (F = "maxWait" in y) ? X(R(y.maxWait) || 0, m) : H, K = "trailing" in y ? !!y.trailing : K), st.cancel = function() {
|
|
132
|
+
S !== void 0 && clearTimeout(S), M = 0, w = $ = j = S = void 0;
|
|
133
133
|
}, st.flush = function() {
|
|
134
|
-
return S === void 0 ? B :
|
|
134
|
+
return S === void 0 ? B : Xt(Z());
|
|
135
135
|
}, st;
|
|
136
136
|
}, Q = function() {
|
|
137
137
|
};
|
|
138
|
-
function
|
|
138
|
+
function P(g) {
|
|
139
139
|
g && g.forEach(function(m) {
|
|
140
140
|
var y = Array.prototype.slice.call(m.addedNodes), w = Array.prototype.slice.call(m.removedNodes);
|
|
141
|
-
if ((function j(
|
|
141
|
+
if ((function j(H) {
|
|
142
142
|
var B = void 0, S = void 0;
|
|
143
|
-
for (B = 0; B <
|
|
144
|
-
if ((S =
|
|
143
|
+
for (B = 0; B < H.length; B += 1)
|
|
144
|
+
if ((S = H[B]).dataset && S.dataset.aos || S.children && j(S.children)) return !0;
|
|
145
145
|
return !1;
|
|
146
146
|
})(y.concat(w))) return Q();
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function D() {
|
|
150
150
|
return window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver;
|
|
151
151
|
}
|
|
152
152
|
var rt = { isSupported: function() {
|
|
153
|
-
return !!
|
|
153
|
+
return !!D();
|
|
154
154
|
}, ready: function(g, m) {
|
|
155
|
-
var y = window.document, w = new (
|
|
155
|
+
var y = window.document, w = new (D())(P);
|
|
156
156
|
Q = m, w.observe(y.documentElement, { childList: !0, subtree: !0, removedNodes: !0 });
|
|
157
157
|
} }, _t = function(g, m) {
|
|
158
158
|
if (!(g instanceof m)) throw new TypeError("Cannot call a class as a function");
|
|
@@ -197,24 +197,24 @@ function Qe() {
|
|
|
197
197
|
}, it = function(g) {
|
|
198
198
|
return g.forEach(function(m, y) {
|
|
199
199
|
return (function(w, j) {
|
|
200
|
-
var
|
|
201
|
-
w.animated && ((function(
|
|
200
|
+
var H = w.options, B = w.position, S = w.node, $ = (w.data, function() {
|
|
201
|
+
w.animated && ((function(M, ht) {
|
|
202
202
|
ht && ht.forEach(function(F) {
|
|
203
|
-
return
|
|
203
|
+
return M.classList.remove(F);
|
|
204
204
|
});
|
|
205
|
-
})(S,
|
|
205
|
+
})(S, H.animatedClassNames), bt("aos:out", S), w.options.id && bt("aos:in:" + w.options.id, S), w.animated = !1);
|
|
206
206
|
});
|
|
207
|
-
|
|
207
|
+
H.mirror && j >= B.out && !H.once ? $() : j >= B.in ? w.animated || ((function(M, ht) {
|
|
208
208
|
ht && ht.forEach(function(F) {
|
|
209
|
-
return
|
|
209
|
+
return M.classList.add(F);
|
|
210
210
|
});
|
|
211
|
-
})(S,
|
|
211
|
+
})(S, H.animatedClassNames), bt("aos:in", S), w.options.id && bt("aos:in:" + w.options.id, S), w.animated = !0) : w.animated && !H.once && $();
|
|
212
212
|
})(m, window.pageYOffset);
|
|
213
213
|
});
|
|
214
214
|
}, yt = function(g) {
|
|
215
215
|
for (var m = 0, y = 0; g && !isNaN(g.offsetLeft) && !isNaN(g.offsetTop); ) m += g.offsetLeft - (g.tagName != "BODY" ? g.scrollLeft : 0), y += g.offsetTop - (g.tagName != "BODY" ? g.scrollTop : 0), g = g.offsetParent;
|
|
216
216
|
return { top: y, left: m };
|
|
217
|
-
},
|
|
217
|
+
}, q = function(g, m, y) {
|
|
218
218
|
var w = g.getAttribute("data-aos-" + m);
|
|
219
219
|
if (w !== void 0) {
|
|
220
220
|
if (w === "true") return !0;
|
|
@@ -223,14 +223,14 @@ function Qe() {
|
|
|
223
223
|
return w || y;
|
|
224
224
|
}, Et = function(g, m) {
|
|
225
225
|
return g.forEach(function(y, w) {
|
|
226
|
-
var j =
|
|
227
|
-
return typeof
|
|
226
|
+
var j = q(y.node, "mirror", m.mirror), H = q(y.node, "once", m.once), B = q(y.node, "id"), S = m.useClassNames && y.node.getAttribute("data-aos"), $ = [m.animatedClassName].concat(S ? S.split(" ") : []).filter(function(M) {
|
|
227
|
+
return typeof M == "string";
|
|
228
228
|
});
|
|
229
|
-
m.initClassName && y.node.classList.add(m.initClassName), y.position = { in: (function(
|
|
230
|
-
var K = window.innerHeight, ct = M
|
|
229
|
+
m.initClassName && y.node.classList.add(m.initClassName), y.position = { in: (function(M, ht, F) {
|
|
230
|
+
var K = window.innerHeight, ct = q(M, "anchor"), zt = q(M, "anchor-placement"), St = Number(q(M, "offset", zt ? 0 : ht)), Xt = zt || F, st = M;
|
|
231
231
|
ct && document.querySelectorAll(ct) && (st = document.querySelectorAll(ct)[0]);
|
|
232
232
|
var E = yt(st).top - K;
|
|
233
|
-
switch (
|
|
233
|
+
switch (Xt) {
|
|
234
234
|
case "top-bottom":
|
|
235
235
|
break;
|
|
236
236
|
case "center-bottom":
|
|
@@ -258,30 +258,30 @@ function Qe() {
|
|
|
258
258
|
E += K + st.offsetHeight / 2;
|
|
259
259
|
}
|
|
260
260
|
return E + St;
|
|
261
|
-
})(y.node, m.offset, m.anchorPlacement), out: j && (function(
|
|
262
|
-
var F = M
|
|
261
|
+
})(y.node, m.offset, m.anchorPlacement), out: j && (function(M, ht) {
|
|
262
|
+
var F = q(M, "anchor"), K = q(M, "offset", ht), ct = M;
|
|
263
263
|
return F && document.querySelectorAll(F) && (ct = document.querySelectorAll(F)[0]), yt(ct).top + ct.offsetHeight - K;
|
|
264
|
-
})(y.node, m.offset) }, y.options = { once:
|
|
264
|
+
})(y.node, m.offset) }, y.options = { once: H, mirror: j, animatedClassNames: $, id: B };
|
|
265
265
|
}), g;
|
|
266
266
|
}, Vt = function() {
|
|
267
267
|
var g = document.querySelectorAll("[data-aos]");
|
|
268
268
|
return Array.prototype.map.call(g, function(m) {
|
|
269
269
|
return { node: m };
|
|
270
270
|
});
|
|
271
|
-
}, dt = [], Yt = !1, V = { offset: 120, delay: 0, easing: "ease", duration: 400, disable: !1, once: !1, mirror: !1, anchorPlacement: "top-bottom", startEvent: "DOMContentLoaded", animatedClassName: "aos-animate", initClassName: "aos-init", useClassNames: !1, disableMutationObserver: !1, throttleDelay: 99, debounceDelay: 50 },
|
|
271
|
+
}, dt = [], Yt = !1, V = { offset: 120, delay: 0, easing: "ease", duration: 400, disable: !1, once: !1, mirror: !1, anchorPlacement: "top-bottom", startEvent: "DOMContentLoaded", animatedClassName: "aos-animate", initClassName: "aos-init", useClassNames: !1, disableMutationObserver: !1, throttleDelay: 99, debounceDelay: 50 }, Mt = function() {
|
|
272
272
|
return document.all && !window.atob;
|
|
273
273
|
}, vt = function() {
|
|
274
|
-
arguments.length > 0 && arguments[0] !== void 0 && arguments[0] && (Yt = !0), Yt && (dt = Et(dt, V), it(dt), window.addEventListener("scroll",
|
|
274
|
+
arguments.length > 0 && arguments[0] !== void 0 && arguments[0] && (Yt = !0), Yt && (dt = Et(dt, V), it(dt), window.addEventListener("scroll", kt(function() {
|
|
275
275
|
it(dt, V.once);
|
|
276
276
|
}, V.throttleDelay)));
|
|
277
|
-
},
|
|
278
|
-
if (dt = Vt(),
|
|
277
|
+
}, Pt = function() {
|
|
278
|
+
if (dt = Vt(), Dt(V.disable) || Mt()) return qt();
|
|
279
279
|
vt();
|
|
280
|
-
},
|
|
280
|
+
}, qt = function() {
|
|
281
281
|
dt.forEach(function(g, m) {
|
|
282
282
|
g.node.removeAttribute("data-aos"), g.node.removeAttribute("data-aos-easing"), g.node.removeAttribute("data-aos-duration"), g.node.removeAttribute("data-aos-delay"), V.initClassName && g.node.classList.remove(V.initClassName), V.animatedClassName && g.node.classList.remove(V.animatedClassName);
|
|
283
283
|
});
|
|
284
|
-
},
|
|
284
|
+
}, Dt = function(g) {
|
|
285
285
|
return g === !0 || g === "mobile" && mt.mobile() || g === "phone" && mt.phone() || g === "tablet" && mt.tablet() || typeof g == "function" && g() === !0;
|
|
286
286
|
};
|
|
287
287
|
return { init: function(g) {
|
|
@@ -289,12 +289,12 @@ function Qe() {
|
|
|
289
289
|
aos: MutationObserver is not supported on this browser,
|
|
290
290
|
code mutations observing has been disabled.
|
|
291
291
|
You may have to call "refreshHard()" by yourself.
|
|
292
|
-
`), V.disableMutationObserver = !0), V.disableMutationObserver || rt.ready("[data-aos]",
|
|
292
|
+
`), V.disableMutationObserver = !0), V.disableMutationObserver || rt.ready("[data-aos]", Pt), Dt(V.disable) || Mt() ? qt() : (document.querySelector("body").setAttribute("data-aos-easing", V.easing), document.querySelector("body").setAttribute("data-aos-duration", V.duration), document.querySelector("body").setAttribute("data-aos-delay", V.delay), ["DOMContentLoaded", "load"].indexOf(V.startEvent) === -1 ? document.addEventListener(V.startEvent, function() {
|
|
293
293
|
vt(!0);
|
|
294
294
|
}) : window.addEventListener("load", function() {
|
|
295
295
|
vt(!0);
|
|
296
|
-
}), V.startEvent === "DOMContentLoaded" && ["complete", "interactive"].indexOf(document.readyState) > -1 && vt(!0), window.addEventListener("resize",
|
|
297
|
-
}, refresh: vt, refreshHard:
|
|
296
|
+
}), V.startEvent === "DOMContentLoaded" && ["complete", "interactive"].indexOf(document.readyState) > -1 && vt(!0), window.addEventListener("resize", It(vt, V.debounceDelay, !0)), window.addEventListener("orientationchange", It(vt, V.debounceDelay, !0)), dt);
|
|
297
|
+
}, refresh: vt, refreshHard: Pt };
|
|
298
298
|
});
|
|
299
299
|
})(me)), me.exports;
|
|
300
300
|
}
|
|
@@ -303,43 +303,43 @@ const Je = /* @__PURE__ */ je(Ke);
|
|
|
303
303
|
var Oe = { exports: {} }, Ye;
|
|
304
304
|
function ti() {
|
|
305
305
|
return Ye || (Ye = 1, (function(o) {
|
|
306
|
-
function t(d,
|
|
307
|
-
if (!(d instanceof
|
|
306
|
+
function t(d, u) {
|
|
307
|
+
if (!(d instanceof u)) throw new TypeError("Cannot call a class as a function");
|
|
308
308
|
}
|
|
309
|
-
function i(d,
|
|
310
|
-
return
|
|
309
|
+
function i(d, u, p) {
|
|
310
|
+
return u in d ? Object.defineProperty(d, u, { value: p, enumerable: !0, configurable: !0, writable: !0 }) : d[u] = p, d;
|
|
311
311
|
}
|
|
312
|
-
function s(d,
|
|
313
|
-
return h(d) || n(d,
|
|
312
|
+
function s(d, u) {
|
|
313
|
+
return h(d) || n(d, u) || a(d, u) || e();
|
|
314
314
|
}
|
|
315
315
|
function e() {
|
|
316
316
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
317
317
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
318
318
|
}
|
|
319
|
-
function a(d,
|
|
319
|
+
function a(d, u) {
|
|
320
320
|
if (d) {
|
|
321
|
-
if (typeof d == "string") return r(d,
|
|
321
|
+
if (typeof d == "string") return r(d, u);
|
|
322
322
|
var p = Object.prototype.toString.call(d).slice(8, -1);
|
|
323
|
-
return p === "Object" && d.constructor && (p = d.constructor.name), p === "Map" || p === "Set" ? Array.from(d) : p === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(p) ? r(d,
|
|
323
|
+
return p === "Object" && d.constructor && (p = d.constructor.name), p === "Map" || p === "Set" ? Array.from(d) : p === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(p) ? r(d, u) : void 0;
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
|
-
function r(d,
|
|
327
|
-
(
|
|
328
|
-
for (var p = 0, b = new Array(
|
|
326
|
+
function r(d, u) {
|
|
327
|
+
(u == null || u > d.length) && (u = d.length);
|
|
328
|
+
for (var p = 0, b = new Array(u); p < u; p++) b[p] = d[p];
|
|
329
329
|
return b;
|
|
330
330
|
}
|
|
331
|
-
function n(d,
|
|
331
|
+
function n(d, u) {
|
|
332
332
|
if (typeof Symbol < "u" && Symbol.iterator in Object(d)) {
|
|
333
|
-
var p = [], b = !0, C = !1,
|
|
333
|
+
var p = [], b = !0, C = !1, k = void 0;
|
|
334
334
|
try {
|
|
335
|
-
for (var
|
|
335
|
+
for (var L, at = d[Symbol.iterator](); !(b = (L = at.next()).done) && (p.push(L.value), !u || p.length !== u); b = !0) ;
|
|
336
336
|
} catch (ft) {
|
|
337
|
-
C = !0,
|
|
337
|
+
C = !0, k = ft;
|
|
338
338
|
} finally {
|
|
339
339
|
try {
|
|
340
340
|
b || at.return == null || at.return();
|
|
341
341
|
} finally {
|
|
342
|
-
if (C) throw
|
|
342
|
+
if (C) throw k;
|
|
343
343
|
}
|
|
344
344
|
}
|
|
345
345
|
return p;
|
|
@@ -352,7 +352,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
352
352
|
function d(l) {
|
|
353
353
|
return ["elInY+elHeight", "elCenterY-".concat(l = 0 < arguments.length && l !== void 0 ? l : 30), "elCenterY", "elCenterY+".concat(l), "elOutY-elHeight"];
|
|
354
354
|
}
|
|
355
|
-
var
|
|
355
|
+
var u, p, b, C, k, L, at = { fadeInOut: function(l, c) {
|
|
356
356
|
return c = 1 < arguments.length && c !== void 0 ? c : 0, { opacity: [d(0 < arguments.length && l !== void 0 ? l : 30), [c, 1, 1, 1, c]] };
|
|
357
357
|
}, fadeIn: function(l, c) {
|
|
358
358
|
return { opacity: [["elInY+elHeight", 0 < arguments.length && l !== void 0 ? l : "elCenterY"], [1 < arguments.length && c !== void 0 ? c : 0, 1]] };
|
|
@@ -388,7 +388,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
388
388
|
return l = 0 < arguments.length && l !== void 0 ? l : 100, c = 1 < arguments.length && c !== void 0 ? c : 100, { translateX: [[0, +l, 2 * l, 3 * l, 4 * l], [0, c, 0, -c, 0], { modValue: 4 * l }] };
|
|
389
389
|
}, hueRotate: function(l, c) {
|
|
390
390
|
return l = 0 < arguments.length && l !== void 0 ? l : 600, { "hue-rotate": [[0, l], [0, 1 < arguments.length && c !== void 0 ? c : 360], { modValue: l }] };
|
|
391
|
-
} }, ft = (
|
|
391
|
+
} }, ft = (u = ["perspective", "scaleX", "scaleY", "scale", "skewX", "skewY", "skew", "rotateX", "rotateY", "rotate"], p = ["blur", "hue-rotate", "brightness"], b = ["translateX", "translateY", "translateZ"], C = ["perspective", "border-radius", "blur", "translateX", "translateY", "translateZ"], k = ["hue-rotate", "rotate", "rotateX", "rotateY", "skew", "skewX", "skewY"], L = { easeInQuad: function(l) {
|
|
392
392
|
return l * l;
|
|
393
393
|
}, easeOutQuad: function(l) {
|
|
394
394
|
return l * (2 - l);
|
|
@@ -416,7 +416,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
416
416
|
var c = 7.5625, v = 2.75;
|
|
417
417
|
return l < 1 / v ? c * l * l : l < 2 / v ? c * (l -= 1.5 / v) * l + 0.75 : l < 2.5 / v ? c * (l -= 2.25 / v) * l + 0.9375 : c * (l -= 2.625 / v) * l + 0.984375;
|
|
418
418
|
}, easeInBounce: function(l) {
|
|
419
|
-
return 1 -
|
|
419
|
+
return 1 - L.easeOutBounce(1 - l);
|
|
420
420
|
}, easeOutBack: function(l) {
|
|
421
421
|
return 1 + 2.70158 * Math.pow(l - 1, 3) + 1.70158 * Math.pow(l - 1, 2);
|
|
422
422
|
}, easeInBack: function(l) {
|
|
@@ -432,16 +432,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
432
432
|
}), i(this, "onAnimationFrame", function(v) {
|
|
433
433
|
c.debug && (c.debugData.frameStart = Date.now());
|
|
434
434
|
var _, O = {};
|
|
435
|
-
c.drivers.forEach(function(
|
|
436
|
-
O[
|
|
437
|
-
}), c.elements.forEach(function(
|
|
438
|
-
|
|
439
|
-
}), c.debug && c.debugData.frameLengths.push(Date.now() - c.debugData.frameStart), c.frame % 60 == 0 && c.debug && (_ = Math.ceil(c.debugData.frameLengths.reduce(function(
|
|
440
|
-
return
|
|
435
|
+
c.drivers.forEach(function(I) {
|
|
436
|
+
O[I.name] = I.getValue(c.frame);
|
|
437
|
+
}), c.elements.forEach(function(I) {
|
|
438
|
+
I.update(O, c.frame);
|
|
439
|
+
}), c.debug && c.debugData.frameLengths.push(Date.now() - c.debugData.frameStart), c.frame % 60 == 0 && c.debug && (_ = Math.ceil(c.debugData.frameLengths.reduce(function(I, J) {
|
|
440
|
+
return I + J;
|
|
441
441
|
}, 0) / 60), console.log("Average frame calculation time: ".concat(_, "ms")), c.debugData.frameLengths = []), c.frame++, window.requestAnimationFrame(c.onAnimationFrame);
|
|
442
442
|
}), i(this, "addDriver", function(v, _) {
|
|
443
443
|
var O = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : {};
|
|
444
|
-
c.drivers.push(new
|
|
444
|
+
c.drivers.push(new Lt(v, _, O));
|
|
445
445
|
}), i(this, "removeDriver", function(v) {
|
|
446
446
|
c.drivers = c.drivers.filter(function(_) {
|
|
447
447
|
return _.name !== v;
|
|
@@ -449,113 +449,113 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
449
449
|
}), i(this, "findAndAddElements", function() {
|
|
450
450
|
c.elements = [], document.querySelectorAll(".lax").forEach(function(v) {
|
|
451
451
|
var _ = [];
|
|
452
|
-
v.classList.forEach(function(
|
|
453
|
-
|
|
452
|
+
v.classList.forEach(function(I) {
|
|
453
|
+
I.includes("lax_preset") && (I = I.replace("lax_preset_", ""), _.push(I));
|
|
454
454
|
});
|
|
455
455
|
var O = i({}, "scrollY", { presets: _ });
|
|
456
|
-
c.elements.push(new
|
|
456
|
+
c.elements.push(new kt(".lax", c, v, O, 0, {}));
|
|
457
457
|
});
|
|
458
458
|
}), i(this, "addElements", function(v, _, O) {
|
|
459
|
-
document.querySelectorAll(v).forEach(function(
|
|
460
|
-
c.elements.push(new
|
|
459
|
+
document.querySelectorAll(v).forEach(function(I, J) {
|
|
460
|
+
c.elements.push(new kt(v, c, I, _, J, O));
|
|
461
461
|
});
|
|
462
462
|
}), i(this, "removeElements", function(v) {
|
|
463
463
|
c.elements = c.elements.filter(function(_) {
|
|
464
464
|
return _.selector !== v;
|
|
465
465
|
});
|
|
466
466
|
}), i(this, "addElement", function(v, _, O) {
|
|
467
|
-
c.elements.push(new
|
|
467
|
+
c.elements.push(new kt("", c, v, _, 0, O));
|
|
468
468
|
}), i(this, "removeElement", function(v) {
|
|
469
469
|
c.elements = c.elements.filter(function(_) {
|
|
470
470
|
return _.domElement !== v;
|
|
471
471
|
});
|
|
472
472
|
});
|
|
473
473
|
}());
|
|
474
|
-
function
|
|
474
|
+
function Wt(l, c) {
|
|
475
475
|
if (Array.isArray(l)) return l;
|
|
476
476
|
for (var v = Object.keys(l).map(function(J) {
|
|
477
477
|
return parseInt(J);
|
|
478
478
|
}).sort(function(J, At) {
|
|
479
479
|
return At < J ? 1 : -1;
|
|
480
480
|
}), _ = v[v.length - 1], O = 0; O < v.length; O++) {
|
|
481
|
-
var
|
|
482
|
-
if (c <
|
|
483
|
-
_ =
|
|
481
|
+
var I = v[O];
|
|
482
|
+
if (c < I) {
|
|
483
|
+
_ = I;
|
|
484
484
|
break;
|
|
485
485
|
}
|
|
486
486
|
}
|
|
487
487
|
return l[_];
|
|
488
488
|
}
|
|
489
489
|
function Ct(l, T, v) {
|
|
490
|
-
var _ = T.width, O = T.height, x = T.x,
|
|
490
|
+
var _ = T.width, O = T.height, x = T.x, X = T.y;
|
|
491
491
|
if (typeof l == "number") return l;
|
|
492
|
-
var
|
|
493
|
-
return Function("return ".concat(l.replace(/screenWidth/g,
|
|
492
|
+
var I, J = document.body.scrollHeight, At = document.body.scrollWidth, W = window.innerWidth, gt = window.innerHeight, A = s((I = window.pageXOffset !== void 0, A = (document.compatMode || "") === "CSS1Compat", T = I ? window.pageXOffset : (A ? document.documentElement : document.body).scrollLeft, [I ? window.pageYOffset : (A ? document.documentElement : document.body).scrollTop, T]), 2), T = A[0], x = x + A[1], A = x + _, X = X + T, T = X + O;
|
|
493
|
+
return Function("return ".concat(l.replace(/screenWidth/g, W).replace(/screenHeight/g, gt).replace(/pageHeight/g, J).replace(/pageWidth/g, At).replace(/elWidth/g, _).replace(/elHeight/g, O).replace(/elInY/g, X - gt).replace(/elOutY/g, T).replace(/elCenterY/g, X + O / 2 - gt / 2).replace(/elInX/g, x - W).replace(/elOutX/g, A).replace(/elCenterX/g, x + _ / 2 - W / 2).replace(/index/g, v)))();
|
|
494
494
|
}
|
|
495
|
-
function
|
|
495
|
+
function Lt(l, c) {
|
|
496
496
|
var v = this, _ = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : {};
|
|
497
|
-
t(this,
|
|
498
|
-
var
|
|
499
|
-
return O % v.frameStep == 0 && (
|
|
497
|
+
t(this, Lt), i(this, "getValueFn", void 0), i(this, "name", ""), i(this, "lastValue", 0), i(this, "frameStep", 1), i(this, "m1", 0), i(this, "m2", 0), i(this, "inertia", 0), i(this, "inertiaEnabled", !1), i(this, "getValue", function(O) {
|
|
498
|
+
var I = v.lastValue;
|
|
499
|
+
return O % v.frameStep == 0 && (I = v.getValueFn(O)), v.inertiaEnabled && (O = I - v.lastValue, v.m1 = 0.8 * v.m1 + O * (1 - 0.8), v.m2 = 0.8 * v.m2 + v.m1 * (1 - 0.8), v.inertia = Math.round(5e3 * v.m2) / 15e3), v.lastValue = I, [v.lastValue, v.inertia];
|
|
500
500
|
}), this.name = l, this.getValueFn = c, Object.keys(_).forEach(function(O) {
|
|
501
501
|
v[O] = _[O];
|
|
502
502
|
}), this.lastValue = this.getValueFn(0);
|
|
503
503
|
}
|
|
504
|
-
function
|
|
505
|
-
var O = this,
|
|
506
|
-
t(this,
|
|
507
|
-
var x, A = O.transforms,
|
|
504
|
+
function kt(l, c, v, _) {
|
|
505
|
+
var O = this, I = 4 < arguments.length && arguments[4] !== void 0 ? arguments[4] : 0, At = 5 < arguments.length && arguments[5] !== void 0 ? arguments[5] : {};
|
|
506
|
+
t(this, kt), i(this, "domElement", void 0), i(this, "transformsData", void 0), i(this, "styles", {}), i(this, "selector", ""), i(this, "groupIndex", 0), i(this, "laxInstance", void 0), i(this, "onUpdate", void 0), i(this, "update", function(W, gt) {
|
|
507
|
+
var x, A = O.transforms, X = {};
|
|
508
508
|
for (x in A) {
|
|
509
509
|
var T = A[x];
|
|
510
|
-
|
|
511
|
-
var Z, G = s(
|
|
510
|
+
W[x] || console.error("No lax driver with name: ", x);
|
|
511
|
+
var Z, G = s(W[x], 2), R = G[0], It = G[1];
|
|
512
512
|
for (Z in T) {
|
|
513
|
-
var Q, ot = s(T[Z], 3),
|
|
513
|
+
var Q, ot = s(T[Z], 3), P = ot[0], D = ot[1], Ot = ot[2], z = Ot === void 0 ? {} : Ot, rt = z.modValue, pt = z.frameStep, _t = pt === void 0 ? 1 : pt, lt = z.easing, ot = z.inertia, Ot = z.inertiaMode, pt = z.cssFn, z = z.cssUnit, z = z === void 0 ? "" : z, lt = L[lt];
|
|
514
514
|
gt % _t == 0 && (lt = (function(tt, et, mt, bt) {
|
|
515
515
|
var it = 0;
|
|
516
516
|
if (tt.forEach(function(Et) {
|
|
517
517
|
Et < mt && it++;
|
|
518
518
|
}), it <= 0) return et[0];
|
|
519
519
|
if (it >= tt.length) return et[tt.length - 1];
|
|
520
|
-
var yt,
|
|
521
|
-
return bt && (
|
|
522
|
-
})(
|
|
520
|
+
var yt, q = (q = tt[yt = it - 1], tt = tt[it], (mt - q) / (tt - q));
|
|
521
|
+
return bt && (q = bt(q)), yt = et[yt], et = et[it], yt * (1 - (q = q)) + et * q;
|
|
522
|
+
})(P, D, rt ? R % rt : R, lt), ot && (Q = It * ot, Ot === "absolute" && (Q = Math.abs(Q)), lt += Q), Q = (z || C.includes(Z) ? "px" : k.includes(Z) ? "deg" : "") == "px" ? 0 : 3, Q = lt.toFixed(Q), X[Z] = pt ? pt(Q, O.domElement) : Q + z);
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
|
-
O.applyStyles(
|
|
525
|
+
O.applyStyles(X), O.onUpdate && O.onUpdate(W, O.domElement);
|
|
526
526
|
}), i(this, "calculateTransforms", function() {
|
|
527
527
|
O.transforms = {};
|
|
528
|
-
var
|
|
529
|
-
for (
|
|
530
|
-
var A = O.transformsData[x],
|
|
531
|
-
(T === void 0 ? [] : T).forEach(function(
|
|
532
|
-
var
|
|
533
|
-
|
|
534
|
-
A[rt] =
|
|
535
|
-
})) : console.error("Lax preset cannot be found with name: ",
|
|
528
|
+
var W, gt = O.laxInstance.windowWidth;
|
|
529
|
+
for (W in O.transformsData) (function(x) {
|
|
530
|
+
var A = O.transformsData[x], X = {}, T = A.presets;
|
|
531
|
+
(T === void 0 ? [] : T).forEach(function(P) {
|
|
532
|
+
var R, D = s(P.split(":"), 3), It = D[0], Q = D[1], P = D[2], D = window.lax.presets[It];
|
|
533
|
+
D ? (R = D(Q, P), Object.keys(R).forEach(function(rt) {
|
|
534
|
+
A[rt] = R[rt];
|
|
535
|
+
})) : console.error("Lax preset cannot be found with name: ", It);
|
|
536
536
|
}), delete A.presets;
|
|
537
537
|
for (var Z in A) (function(G) {
|
|
538
|
-
var
|
|
539
|
-
return Ct(
|
|
540
|
-
}),
|
|
541
|
-
return Ct(
|
|
538
|
+
var R = s(A[G], 3), P = R[0], Q = P === void 0 ? [-1e9, 1e9] : P, P = R[1], P = P === void 0 ? [-1e9, 1e9] : P, R = R[2], R = R === void 0 ? {} : R, It = O.domElement.getBoundingClientRect(), Q = Wt(Q, gt).map(function(D) {
|
|
539
|
+
return Ct(D, It, O.groupIndex);
|
|
540
|
+
}), P = Wt(P, gt).map(function(D) {
|
|
541
|
+
return Ct(D, It, O.groupIndex);
|
|
542
542
|
});
|
|
543
|
-
|
|
543
|
+
X[G] = [Q, P, R];
|
|
544
544
|
})(Z);
|
|
545
|
-
O.transforms[x] =
|
|
546
|
-
})(
|
|
547
|
-
}), i(this, "applyStyles", function(
|
|
548
|
-
var gt, x, A,
|
|
549
|
-
var Z = gt[T], G = C.includes(T) ? "px" :
|
|
550
|
-
b.includes(T) ? A[T] = Z :
|
|
545
|
+
O.transforms[x] = X;
|
|
546
|
+
})(W);
|
|
547
|
+
}), i(this, "applyStyles", function(W) {
|
|
548
|
+
var gt, x, A, X = (gt = W, x = { transform: "", filter: "" }, A = { translateX: 1e-5, translateY: 1e-5, translateZ: 1e-5 }, Object.keys(gt).forEach(function(T) {
|
|
549
|
+
var Z = gt[T], G = C.includes(T) ? "px" : k.includes(T) ? "deg" : "";
|
|
550
|
+
b.includes(T) ? A[T] = Z : u.includes(T) ? x.transform += "".concat(T, "(").concat(Z).concat(G, ") ") : p.includes(T) ? x.filter += "".concat(T, "(").concat(Z).concat(G, ") ") : x[T] = "".concat(Z).concat(G, " ");
|
|
551
551
|
}), x.transform = "translate3d(".concat(A.translateX, "px, ").concat(A.translateY, "px, ").concat(A.translateZ, "px) ").concat(x.transform), x);
|
|
552
|
-
Object.keys(
|
|
553
|
-
O.domElement.style.setProperty(T,
|
|
552
|
+
Object.keys(X).forEach(function(T) {
|
|
553
|
+
O.domElement.style.setProperty(T, X[T]);
|
|
554
554
|
});
|
|
555
|
-
}), this.selector = l, this.laxInstance = c, this.domElement = v, this.transformsData = _, this.groupIndex =
|
|
556
|
-
var J = (
|
|
557
|
-
Object.keys(J).forEach(function(
|
|
558
|
-
v.style.setProperty(
|
|
555
|
+
}), this.selector = l, this.laxInstance = c, this.domElement = v, this.transformsData = _, this.groupIndex = I;
|
|
556
|
+
var J = (I = At.style) === void 0 ? {} : I, At = At.onUpdate;
|
|
557
|
+
Object.keys(J).forEach(function(W) {
|
|
558
|
+
v.style.setProperty(W, J[W]);
|
|
559
559
|
}), At && (this.onUpdate = At), this.calculateTransforms();
|
|
560
560
|
}
|
|
561
561
|
o.exports !== void 0 ? o.exports = ft : window.lax = ft;
|
|
@@ -589,19 +589,19 @@ class ii {
|
|
|
589
589
|
return;
|
|
590
590
|
}
|
|
591
591
|
e.style.transform = "";
|
|
592
|
-
let r = this.getObjVal(e, "data-top-bottom"), n = this.getObjVal(e, "data-top"), h = this.getObjVal(e, "data-50-top"), d = this.getObjVal(e, "data-100-top"),
|
|
592
|
+
let r = this.getObjVal(e, "data-top-bottom"), n = this.getObjVal(e, "data-top"), h = this.getObjVal(e, "data-50-top"), d = this.getObjVal(e, "data-100-top"), u = this.getObjVal(e, "data-center-bottom"), p = this.getObjVal(e, "data-center"), b = this.getObjVal(e, "data-center-top"), C = this.getObjVal(e, "data--400-bottom"), k = this.getObjVal(e, "data--300-bottom"), L = this.getObjVal(e, "data--200-bottom"), at = this.getObjVal(e, "data--150-bottom"), ft = this.getObjVal(e, "data--100-bottom"), Wt = this.getObjVal(e, "data--50-bottom"), Ct = this.getObjVal(e, "data-bottom"), Lt = this.getObjVal(e, "data-50-bottom"), kt = this.getObjVal(e, "data-100-bottom"), l = this.getObjVal(e, "data-150-bottom"), c = this.getObjVal(e, "data-200-bottom"), v = this.getObjVal(e, "data-300-bottom"), _ = this.getObjVal(e, "data-400-bottom"), O = this.getObjVal(e, "data-bottom-top"), I = this.getObjVal(e, "data-in"), J = this.getObjVal(e, "data-in-150"), At = this.getObjVal(e, "data-in-300"), W = this.getObjVal(e, "data-cen--150"), gt = this.getObjVal(e, "data-cen"), x = this.getObjVal(e, "data-cen-150"), A = this.getObjVal(e, "data-out--300"), X = this.getObjVal(e, "data-out--150"), T = this.getObjVal(e, "data-out"), Z = !1;
|
|
593
593
|
e.hasAttribute("data-xs") && (Z = !0);
|
|
594
594
|
let G = !1;
|
|
595
595
|
e.hasAttribute("data-sm") && (G = !0);
|
|
596
|
-
let
|
|
597
|
-
e.hasAttribute("data-md") && (
|
|
598
|
-
let
|
|
599
|
-
(i > 1280 || i > 970 && i <= 1280 &&
|
|
600
|
-
let
|
|
601
|
-
Ft < 730 ? (
|
|
602
|
-
let
|
|
603
|
-
Object.keys(O).length !== 0 && (
|
|
604
|
-
scrollY:
|
|
596
|
+
let R = !1;
|
|
597
|
+
e.hasAttribute("data-md") && (R = !0), e.hasAttribute("data-lg"), e.hasAttribute("data-xl");
|
|
598
|
+
let It = {}, Q = {}, P = {}, D = {}, rt = {}, _t = {}, ot = {}, Ot = {}, pt = {}, z = {}, lt = {}, tt = {}, et = {}, mt = {}, bt = {}, it = {}, yt = {}, q = {}, Et = {}, Vt = {}, dt = {}, Yt = {}, V = {}, Mt = {}, vt = {}, Pt = {}, qt = {}, Dt = {}, g = {}, m = {}, y = {}, w = {}, j = {};
|
|
599
|
+
(i > 1280 || i > 970 && i <= 1280 && !R || i > 760 && i <= 970 && !G || i <= 760 && !Z) && (P = this.getObjVal(e, "data-t"), D = this.getObjVal(e, "data-t-100"), rt = this.getObjVal(e, "data-t-200"), _t = this.getObjVal(e, "data-t-300"), ot = this.getObjVal(e, "data-t-400"), Ot = this.getObjVal(e, "data-t-500"), pt = this.getObjVal(e, "data-t-600"), z = this.getObjVal(e, "data-t-700"), lt = this.getObjVal(e, "data-t-800"), tt = this.getObjVal(e, "data-t-900"), et = this.getObjVal(e, "data-t-1000"), mt = this.getObjVal(e, "data-t-1100"), bt = this.getObjVal(e, "data-t-1200"), it = this.getObjVal(e, "data-t-1300"), yt = this.getObjVal(e, "data-t-1400"), q = this.getObjVal(e, "data-t-1500"), Et = this.getObjVal(e, "data-t-1600"), Vt = this.getObjVal(e, "data-t-1700"), dt = this.getObjVal(e, "data-t-1800"), Yt = this.getObjVal(e, "data-t-1900"), V = this.getObjVal(e, "data-t-2000"), Mt = this.getObjVal(e, "data-t-2100"), vt = this.getObjVal(e, "data-t-2200"), Pt = this.getObjVal(e, "data-t-2300"), qt = this.getObjVal(e, "data-t-2400"), Dt = this.getObjVal(e, "data-t-2500"), g = this.getObjVal(e, "data-t-2600"), m = this.getObjVal(e, "data-t-2700"), y = this.getObjVal(e, "data-t-2800")), i > 970 && i <= 1280 && R && (e.hasAttribute("data-md-t") && (P = this.getObjVal(e, "data-md-t")), e.hasAttribute("data-md-t-100") && (D = this.getObjVal(e, "data-md-t-100")), e.hasAttribute("data-md-t-200") && (rt = this.getObjVal(e, "data-md-t-200")), e.hasAttribute("data-md-t-300") && (_t = this.getObjVal(e, "data-md-t-300")), e.hasAttribute("data-md-t-400") && (ot = this.getObjVal(e, "data-md-t-400")), e.hasAttribute("data-md-t-500") && (Ot = this.getObjVal(e, "data-md-t-500")), e.hasAttribute("data-md-t-600") && (pt = this.getObjVal(e, "data-md-t-600")), e.hasAttribute("data-md-t-700") && (z = this.getObjVal(e, "data-md-t-700")), e.hasAttribute("data-md-t-800") && (lt = this.getObjVal(e, "data-md-t-800")), e.hasAttribute("data-md-t-900") && (tt = this.getObjVal(e, "data-md-t-900")), e.hasAttribute("data-md-t-1000") && (et = this.getObjVal(e, "data-md-t-1000")), e.hasAttribute("data-md-t-1100") && (mt = this.getObjVal(e, "data-md-t-1100")), e.hasAttribute("data-md-t-1200") && (bt = this.getObjVal(e, "data-md-t-1200")), e.hasAttribute("data-md-t-1300") && (it = this.getObjVal(e, "data-md-t-1300")), e.hasAttribute("data-md-t-1400") && (yt = this.getObjVal(e, "data-md-t-1400")), e.hasAttribute("data-md-t-1500") && (q = this.getObjVal(e, "data-md-t-1500")), e.hasAttribute("data-md-t-1600") && (Et = this.getObjVal(e, "data-md-t-1600")), e.hasAttribute("data-md-t-1700") && (Vt = this.getObjVal(e, "data-md-t-1700")), e.hasAttribute("data-md-t-1800") && (dt = this.getObjVal(e, "data-md-t-1800")), e.hasAttribute("data-md-t-1900") && (Yt = this.getObjVal(e, "data-md-t-1900")), e.hasAttribute("data-md-t-2000") && (V = this.getObjVal(e, "data-md-t-2000")), e.hasAttribute("data-md-t-2100") && (Mt = this.getObjVal(e, "data-md-t-2100")), e.hasAttribute("data-md-t-2200") && (vt = this.getObjVal(e, "data-md-t-2200")), e.hasAttribute("data-md-t-2300") && (Pt = this.getObjVal(e, "data-md-t-2300")), e.hasAttribute("data-md-t-2400") && (qt = this.getObjVal(e, "data-md-t-2400")), e.hasAttribute("data-md-t-2500") && (Dt = this.getObjVal(e, "data-md-t-2500")), e.hasAttribute("data-md-t-2600") && (g = this.getObjVal(e, "data-md-t-2600")), e.hasAttribute("data-md-t-2700") && (m = this.getObjVal(e, "data-md-t-2700")), e.hasAttribute("data-md-t-2800") && (y = this.getObjVal(e, "data-md-t-2800"))), i <= 970 && e.hasAttribute("m-data-out") && (T = this.getObjVal(e, "m-data-out")), (i > 760 && i <= 970 && G || i <= 760 && !Z && G) && (e.hasAttribute("data-sm-t") && (P = this.getObjVal(e, "data-sm-t")), e.hasAttribute("data-sm-t-100") && (D = this.getObjVal(e, "data-sm-t-100")), e.hasAttribute("data-sm-t-200") && (rt = this.getObjVal(e, "data-sm-t-200")), e.hasAttribute("data-sm-t-300") && (_t = this.getObjVal(e, "data-sm-t-300")), e.hasAttribute("data-sm-t-400") && (ot = this.getObjVal(e, "data-sm-t-400")), e.hasAttribute("data-sm-t-500") && (Ot = this.getObjVal(e, "data-sm-t-500")), e.hasAttribute("data-sm-t-600") && (pt = this.getObjVal(e, "data-sm-t-600")), e.hasAttribute("data-sm-t-700") && (z = this.getObjVal(e, "data-sm-t-700")), e.hasAttribute("data-sm-t-800") && (lt = this.getObjVal(e, "data-sm-t-800")), e.hasAttribute("data-sm-t-900") && (tt = this.getObjVal(e, "data-sm-t-900")), e.hasAttribute("data-sm-t-1000") && (et = this.getObjVal(e, "data-sm-t-1000")), e.hasAttribute("data-sm-t-1100") && (mt = this.getObjVal(e, "data-sm-t-1100")), e.hasAttribute("data-sm-t-1200") && (bt = this.getObjVal(e, "data-sm-t-1200")), e.hasAttribute("data-sm-t-1300") && (it = this.getObjVal(e, "data-sm-t-1300")), e.hasAttribute("data-sm-t-1400") && (yt = this.getObjVal(e, "data-sm-t-1400")), e.hasAttribute("data-sm-t-1500") && (q = this.getObjVal(e, "data-sm-t-1500")), e.hasAttribute("data-sm-t-1600") && (Et = this.getObjVal(e, "data-sm-t-1600")), e.hasAttribute("data-sm-t-1700") && (Vt = this.getObjVal(e, "data-sm-t-1700")), e.hasAttribute("data-sm-t-1800") && (dt = this.getObjVal(e, "data-sm-t-1800")), e.hasAttribute("data-sm-t-1900") && (Yt = this.getObjVal(e, "data-sm-t-1900")), e.hasAttribute("data-sm-t-2000") && (V = this.getObjVal(e, "data-sm-t-2000")), e.hasAttribute("data-sm-t-2100") && (Mt = this.getObjVal(e, "data-sm-t-2100")), e.hasAttribute("data-sm-t-2200") && (vt = this.getObjVal(e, "data-sm-t-2200")), e.hasAttribute("data-sm-t-2300") && (Pt = this.getObjVal(e, "data-sm-t-2300")), e.hasAttribute("data-sm-t-2400") && (qt = this.getObjVal(e, "data-sm-t-2400")), e.hasAttribute("data-sm-t-2500") && (Dt = this.getObjVal(e, "data-sm-t-2500")), e.hasAttribute("data-sm-t-2600") && (g = this.getObjVal(e, "data-sm-t-2600")), e.hasAttribute("data-sm-t-2700") && (m = this.getObjVal(e, "data-sm-t-2700")), e.hasAttribute("data-sm-t-2800") && (y = this.getObjVal(e, "data-sm-t-2800"))), i <= 414 && Z && (e.hasAttribute("data-xs-t") && (P = this.getObjVal(e, "data-xs-t")), e.hasAttribute("data-xs-t-100") && (D = this.getObjVal(e, "data-xs-t-100")), e.hasAttribute("data-xs-t-200") && (rt = this.getObjVal(e, "data-xs-t-200")), e.hasAttribute("data-xs-t-300") && (_t = this.getObjVal(e, "data-xs-t-300")), e.hasAttribute("data-xs-t-400") && (ot = this.getObjVal(e, "data-xs-t-400")), e.hasAttribute("data-xs-t-500") && (Ot = this.getObjVal(e, "data-xs-t-500")), e.hasAttribute("data-xs-t-600") && (pt = this.getObjVal(e, "data-xs-t-600")), e.hasAttribute("data-xs-t-700") && (z = this.getObjVal(e, "data-xs-t-700")), e.hasAttribute("data-xs-t-800") && (lt = this.getObjVal(e, "data-xs-t-800")), e.hasAttribute("data-xs-t-900") && (tt = this.getObjVal(e, "data-xs-t-900")), e.hasAttribute("data-xs-t-1000") && (et = this.getObjVal(e, "data-xs-t-1000")), e.hasAttribute("data-xs-t-1100") && (mt = this.getObjVal(e, "data-xs-t-1100")), e.hasAttribute("data-xs-t-1200") && (bt = this.getObjVal(e, "data-xs-t-1200")), e.hasAttribute("data-xs-t-1300") && (it = this.getObjVal(e, "data-xs-t-1300")), e.hasAttribute("data-xs-t-1400") && (yt = this.getObjVal(e, "data-xs-t-1400")), e.hasAttribute("data-xs-t-1500") && (q = this.getObjVal(e, "data-xs-t-1500")), e.hasAttribute("data-xs-t-1600") && (Et = this.getObjVal(e, "data-xs-t-1600")), e.hasAttribute("data-xs-t-1700") && (Vt = this.getObjVal(e, "data-xs-t-1700")), e.hasAttribute("data-xs-t-1800") && (dt = this.getObjVal(e, "data-xs-t-1800")), e.hasAttribute("data-xs-t-1900") && (Yt = this.getObjVal(e, "data-xs-t-1900")), e.hasAttribute("data-xs-t-2000") && (V = this.getObjVal(e, "data-xs-t-2000")), e.hasAttribute("data-xs-t-2100") && (Mt = this.getObjVal(e, "data-xs-t-2100")), e.hasAttribute("data-xs-t-2200") && (vt = this.getObjVal(e, "data-xs-t-2200")), e.hasAttribute("data-xs-t-2300") && (Pt = this.getObjVal(e, "data-xs-t-2300")), e.hasAttribute("data-xs-t-2400") && (qt = this.getObjVal(e, "data-xs-t-2400")), e.hasAttribute("data-xs-t-2500") && (Dt = this.getObjVal(e, "data-xs-t-2500")), e.hasAttribute("data-xs-t-2600") && (g = this.getObjVal(e, "data-xs-t-2600")), e.hasAttribute("data-xs-t-2700") && (m = this.getObjVal(e, "data-xs-t-2700")), e.hasAttribute("data-xs-t-2800") && (y = this.getObjVal(e, "data-xs-t-2800")));
|
|
600
|
+
let H = P, B = D, S = rt, $ = _t, M = ot, ht = Ot, F = pt, K = z, ct = lt, zt = tt, St = et, Xt = mt, st = bt, E = it, U = yt, ut = q, te = Et, ee = Vt, ie = dt, se = Yt, ne = V, ae = Mt, re = vt, oe = Pt, le = qt, de = Dt, he = g, ce = m, ue = y, Ft = window.innerHeight;
|
|
601
|
+
Ft < 730 ? (It = H, Q = B, P = S, D = $, rt = M, _t = ht, ot = F, Ot = K, pt = ct, z = zt, lt = St, tt = Xt, et = st, mt = E, bt = U, it = ut, yt = te, q = ee, Et = ie, Vt = se, dt = ne, Yt = ae, V = re, Mt = oe, vt = le, Pt = de, qt = he, Dt = ce, g = ue, m = {}, y = {}) : Ft >= 730 && Ft < 790 ? (Q = H, P = B, D = S, rt = $, _t = M, ot = ht, Ot = F, pt = K, z = ct, lt = zt, tt = St, et = Xt, mt = st, bt = E, it = U, yt = ut, q = te, Et = ee, Vt = ie, dt = se, Yt = ne, V = ae, Mt = re, vt = oe, Pt = le, qt = de, Dt = he, g = ce, m = ue, y = {}) : Ft >= 790 && Ft < 840 || (Ft >= 840 && Ft < 1125 ? (P = {}, D = H, rt = B, _t = S, ot = $, Ot = M, pt = ht, z = F, lt = K, tt = ct, et = zt, mt = St, bt = Xt, it = st, yt = E, q = U, Et = ut, Vt = te, dt = ee, Yt = ie, V = se, Mt = ne, vt = ae, Pt = re, qt = oe, Dt = le, g = de, m = he, y = ce, w = ue) : (P = {}, D = {}, rt = H, _t = B, ot = S, Ot = $, pt = M, z = ht, lt = F, tt = K, et = ct, mt = zt, bt = St, it = Xt, yt = st, q = E, Et = U, Vt = ut, dt = te, Yt = ee, V = ie, Mt = se, vt = ne, Pt = ae, qt = re, Dt = oe, g = le, m = de, y = he, w = ce, j = ue));
|
|
602
|
+
let f = {};
|
|
603
|
+
Object.keys(O).length !== 0 && (f = this.parseObj(O, "elInY", f)), Object.keys(_).length !== 0 && (f = this.parseObj(_, "elInY+50", f)), Object.keys(v).length !== 0 && (f = this.parseObj(v, "elInY+100", f)), Object.keys(c).length !== 0 && (f = this.parseObj(c, "elInY+150", f)), Object.keys(l).length !== 0 && (f = this.parseObj(l, "elInY+200", f)), Object.keys(kt).length !== 0 && (f = this.parseObj(kt, "elInY+250", f)), Object.keys(Lt).length !== 0 && (f = this.parseObj(Lt, "elInY+300", f)), Object.keys(Ct).length !== 0 && (f = this.parseObj(Ct, "elInY+350", f)), Object.keys(Wt).length !== 0 && (f = this.parseObj(Wt, "elInY+400", f)), Object.keys(ft).length !== 0 && (f = this.parseObj(ft, "elInY+450", f)), Object.keys(at).length !== 0 && (f = this.parseObj(at, "elInY+500", f)), Object.keys(L).length !== 0 && (f = this.parseObj(L, "elInY+550", f)), Object.keys(k).length !== 0 && (f = this.parseObj(k, "elInY+600", f)), Object.keys(C).length !== 0 && (f = this.parseObj(C, "elInY+650", f)), Object.keys(b).length !== 0 && (f = this.parseObj(b, "elCenterY-300", f)), Object.keys(p).length !== 0 && (f = this.parseObj(p, "elCenterY", f)), Object.keys(u).length !== 0 && (f = this.parseObj(u, "elCenterY+100", f)), Object.keys(d).length !== 0 && (f = this.parseObj(d, "elCenterY+200", f)), Object.keys(h).length !== 0 && (f = this.parseObj(h, "elCenterY+300", f)), Object.keys(n).length !== 0 && (f = this.parseObj(n, "elOutY-300", f)), Object.keys(r).length !== 0 && (f = this.parseObj(r, "elOutY", f)), Object.keys(I).length !== 0 && (f = this.parseObj(I, "elInY", f)), Object.keys(J).length !== 0 && (f = this.parseObj(J, "elInY+150", f)), Object.keys(At).length !== 0 && (f = this.parseObj(At, "elInY+300 ", f)), Object.keys(W).length !== 0 && (f = this.parseObj(W, "elCenterY-150", f)), Object.keys(gt).length !== 0 && (f = this.parseObj(gt, "elCenterY", f)), Object.keys(x).length !== 0 && (f = this.parseObj(x, "elCenterY+150", f)), Object.keys(A).length !== 0 && (f = this.parseObj(A, "elOutY-300 ", f)), Object.keys(X).length !== 0 && (f = this.parseObj(X, "elOutY-150 ", f)), Object.keys(T).length !== 0 && (f = this.parseObj(T, "elOutY", f)), Object.keys(It).length !== 0 && (f = this.parseObj(It, "elInY-200", f)), Object.keys(Q).length !== 0 && (f = this.parseObj(Q, "elInY-100", f)), Object.keys(P).length !== 0 && (f = this.parseObj(P, "elInY", f)), Object.keys(D).length !== 0 && (f = this.parseObj(D, "elInY+100", f)), Object.keys(rt).length !== 0 && (f = this.parseObj(rt, "elInY+200", f)), Object.keys(_t).length !== 0 && (f = this.parseObj(_t, "elInY+300 ", f)), Object.keys(ot).length !== 0 && (f = this.parseObj(ot, "elInY+400 ", f)), Object.keys(Ot).length !== 0 && (f = this.parseObj(Ot, "elInY+500 ", f)), Object.keys(pt).length !== 0 && (f = this.parseObj(pt, "elInY+600 ", f)), Object.keys(z).length !== 0 && (f = this.parseObj(z, "elInY+700 ", f)), Object.keys(lt).length !== 0 && (f = this.parseObj(lt, "elInY+800 ", f)), Object.keys(tt).length !== 0 && (f = this.parseObj(tt, "elInY+900 ", f)), Object.keys(et).length !== 0 && (f = this.parseObj(et, "elInY+1000 ", f)), Object.keys(mt).length !== 0 && (f = this.parseObj(mt, "elInY+1100 ", f)), Object.keys(bt).length !== 0 && (f = this.parseObj(bt, "elInY+1200 ", f)), Object.keys(it).length !== 0 && (f = this.parseObj(it, "elInY+1300 ", f)), Object.keys(yt).length !== 0 && (f = this.parseObj(yt, "elInY+1400 ", f)), Object.keys(q).length !== 0 && (f = this.parseObj(q, "elInY+1500 ", f)), Object.keys(Et).length !== 0 && (f = this.parseObj(Et, "elInY+1600 ", f)), Object.keys(Vt).length !== 0 && (f = this.parseObj(Vt, "elInY+1700 ", f)), Object.keys(dt).length !== 0 && (f = this.parseObj(dt, "elInY+1800 ", f)), Object.keys(Yt).length !== 0 && (f = this.parseObj(Yt, "elInY+1900 ", f)), Object.keys(V).length !== 0 && (f = this.parseObj(V, "elInY+2000 ", f)), Object.keys(Mt).length !== 0 && (f = this.parseObj(Mt, "elInY+2100 ", f)), Object.keys(vt).length !== 0 && (f = this.parseObj(vt, "elInY+2200 ", f)), Object.keys(Pt).length !== 0 && (f = this.parseObj(Pt, "elInY+2300 ", f)), Object.keys(qt).length !== 0 && (f = this.parseObj(qt, "elInY+2400 ", f)), Object.keys(Dt).length !== 0 && (f = this.parseObj(Dt, "elInY+2500 ", f)), Object.keys(g).length !== 0 && (f = this.parseObj(g, "elInY+2600 ", f)), Object.keys(m).length !== 0 && (f = this.parseObj(m, "elInY+2700 ", f)), Object.keys(y).length !== 0 && (f = this.parseObj(y, "elInY+2800 ", f)), Object.keys(w).length !== 0 && (f = this.parseObj(w, "elInY+2900 ", f)), Object.keys(j).length !== 0 && (f = this.parseObj(j, "elInY+3000 ", f)), e.style.transition = "", e.setAttribute("data-dummy-selector", "1"), Zt.addElements("[data-dummy-selector]", {
|
|
604
|
+
scrollY: f
|
|
605
605
|
}), this.elements.push(document.querySelector("[data-dummy-selector]")), e.removeAttribute("data-dummy-selector"), setTimeout(() => {
|
|
606
606
|
e.style.opacity = 1, e.getAttribute("data-smooth-scrolling") === "off" || this.settings.transition && (e.style.transition = this.settings.transition);
|
|
607
607
|
}, 100);
|
|
@@ -694,9 +694,9 @@ function Ce() {
|
|
|
694
694
|
*
|
|
695
695
|
* Date: 2013-04-10
|
|
696
696
|
*/
|
|
697
|
-
var Ae,
|
|
697
|
+
var Ae, Me;
|
|
698
698
|
function si() {
|
|
699
|
-
return
|
|
699
|
+
return Me || (Me = 1, Ae = function o(t, i) {
|
|
700
700
|
return t == null || i == null || Object.keys(i).forEach(function(s) {
|
|
701
701
|
Object.prototype.toString.call(i[s]) == "[object Object]" ? Object.prototype.toString.call(t[s]) != "[object Object]" ? t[s] = i[s] : t[s] = o(t[s], i[s]) : t[s] = i[s];
|
|
702
702
|
}), t;
|
|
@@ -1134,13 +1134,13 @@ class di {
|
|
|
1134
1134
|
this.loop.kill(), this.loop = null;
|
|
1135
1135
|
}
|
|
1136
1136
|
}
|
|
1137
|
-
const
|
|
1138
|
-
function
|
|
1137
|
+
const Pe = Date.now();
|
|
1138
|
+
function $t() {
|
|
1139
1139
|
let o = {}, t = !0, i = 0, s = arguments.length;
|
|
1140
1140
|
Object.prototype.toString.call(arguments[0]) === "[object Boolean]" && (t = arguments[0], i++);
|
|
1141
1141
|
let e = (a) => {
|
|
1142
1142
|
for (let r in a)
|
|
1143
|
-
Object.prototype.hasOwnProperty.call(a, r) && (t && Object.prototype.toString.call(a[r]) === "[object Object]" ? o[r] =
|
|
1143
|
+
Object.prototype.hasOwnProperty.call(a, r) && (t && Object.prototype.toString.call(a[r]) === "[object Object]" ? o[r] = $t(!0, o[r], a[r]) : o[r] = a[r]);
|
|
1144
1144
|
};
|
|
1145
1145
|
for (; i < s; i++) {
|
|
1146
1146
|
let a = arguments[i];
|
|
@@ -1149,8 +1149,8 @@ function Rt() {
|
|
|
1149
1149
|
return o;
|
|
1150
1150
|
}
|
|
1151
1151
|
function nt(o, t) {
|
|
1152
|
-
if ((
|
|
1153
|
-
if (
|
|
1152
|
+
if ((Rt(o) || o === window || o === document) && (o = [o]), !Ne(o) && !Kt(o) && (o = [o]), Ze(o) != 0) {
|
|
1153
|
+
if (Ne(o) && !Kt(o)) {
|
|
1154
1154
|
let i = o.length, s = 0;
|
|
1155
1155
|
for (; s < i && t.call(o[s], o[s], s, o) !== !1; s++)
|
|
1156
1156
|
;
|
|
@@ -1161,8 +1161,8 @@ function nt(o, t) {
|
|
|
1161
1161
|
}
|
|
1162
1162
|
}
|
|
1163
1163
|
}
|
|
1164
|
-
function
|
|
1165
|
-
const s = o[
|
|
1164
|
+
function qe(o, t = null, i = null) {
|
|
1165
|
+
const s = o[Pe] = o[Pe] || [], e = { all: s, evt: null, found: null };
|
|
1166
1166
|
return t && i && Ze(s) > 0 && nt(s, (a, r) => {
|
|
1167
1167
|
if (a.eventName == t && a.fn.toString() == i.toString())
|
|
1168
1168
|
return e.found = !0, e.evt = r, !1;
|
|
@@ -1172,16 +1172,16 @@ function Bt(o, { onElement: t, withCallback: i, avoidDuplicate: s = !0, once: e
|
|
|
1172
1172
|
let n = t || [];
|
|
1173
1173
|
Jt(n) && (n = document.querySelectorAll(n));
|
|
1174
1174
|
function h(d) {
|
|
1175
|
-
|
|
1175
|
+
N(i) && i.call(r, d, this), e && h.destroy();
|
|
1176
1176
|
}
|
|
1177
1177
|
return h.destroy = function() {
|
|
1178
1178
|
nt(n, (d) => {
|
|
1179
|
-
const
|
|
1180
|
-
|
|
1179
|
+
const u = qe(d, o, h);
|
|
1180
|
+
u.found && u.all.splice(u.evt, 1), d.removeEventListener && d.removeEventListener(o, h, a);
|
|
1181
1181
|
});
|
|
1182
1182
|
}, nt(n, (d) => {
|
|
1183
|
-
const
|
|
1184
|
-
(d.addEventListener && s && !
|
|
1183
|
+
const u = qe(d, o, h);
|
|
1184
|
+
(d.addEventListener && s && !u.found || !s) && (d.addEventListener(o, h, a), u.all.push({ eventName: o, fn: h }));
|
|
1185
1185
|
}), h;
|
|
1186
1186
|
}
|
|
1187
1187
|
function Y(o, t) {
|
|
@@ -1193,7 +1193,7 @@ function wt(o, t) {
|
|
|
1193
1193
|
function jt(o, t) {
|
|
1194
1194
|
return o.classList.contains(t);
|
|
1195
1195
|
}
|
|
1196
|
-
function
|
|
1196
|
+
function Ht(o, t) {
|
|
1197
1197
|
for (; o !== document.body; ) {
|
|
1198
1198
|
if (o = o.parentElement, !o)
|
|
1199
1199
|
return !1;
|
|
@@ -1205,7 +1205,7 @@ function Qt(o, t = "", i = !1) {
|
|
|
1205
1205
|
if (!o || t === "")
|
|
1206
1206
|
return !1;
|
|
1207
1207
|
if (t === "none")
|
|
1208
|
-
return
|
|
1208
|
+
return N(i) && i(), !1;
|
|
1209
1209
|
const s = hi(), e = t.split(" ");
|
|
1210
1210
|
nt(e, (a) => {
|
|
1211
1211
|
Y(o, "g" + a);
|
|
@@ -1216,7 +1216,7 @@ function Qt(o, t = "", i = !1) {
|
|
|
1216
1216
|
withCallback: (a, r) => {
|
|
1217
1217
|
nt(e, (n) => {
|
|
1218
1218
|
wt(r, "g" + n);
|
|
1219
|
-
}),
|
|
1219
|
+
}), N(i) && i();
|
|
1220
1220
|
}
|
|
1221
1221
|
});
|
|
1222
1222
|
}
|
|
@@ -1225,7 +1225,7 @@ function ye(o, t = "") {
|
|
|
1225
1225
|
return o.style.webkitTransform = "", o.style.MozTransform = "", o.style.msTransform = "", o.style.OTransform = "", o.style.transform = "", !1;
|
|
1226
1226
|
o.style.webkitTransform = t, o.style.MozTransform = t, o.style.msTransform = t, o.style.OTransform = t, o.style.transform = t;
|
|
1227
1227
|
}
|
|
1228
|
-
function
|
|
1228
|
+
function De(o) {
|
|
1229
1229
|
o.style.display = "block";
|
|
1230
1230
|
}
|
|
1231
1231
|
function Se(o) {
|
|
@@ -1269,7 +1269,7 @@ function ci() {
|
|
|
1269
1269
|
function ui(o) {
|
|
1270
1270
|
let { url: t, allow: i, callback: s, appendTo: e } = o, a = document.createElement("iframe");
|
|
1271
1271
|
return a.className = "vimeo-video gvideo", a.src = t, a.style.width = "100%", a.style.height = "100%", i && a.setAttribute("allow", i), a.onload = function() {
|
|
1272
|
-
a.onload = null, Y(a, "node-ready"),
|
|
1272
|
+
a.onload = null, Y(a, "node-ready"), N(s) && s();
|
|
1273
1273
|
}, e && e.appendChild(a), a;
|
|
1274
1274
|
}
|
|
1275
1275
|
function Ee(o, t, i, s) {
|
|
@@ -1283,26 +1283,26 @@ function Ee(o, t, i, s) {
|
|
|
1283
1283
|
}, i);
|
|
1284
1284
|
}
|
|
1285
1285
|
function ze(o, t, i) {
|
|
1286
|
-
if (
|
|
1286
|
+
if (Nt(o)) {
|
|
1287
1287
|
console.error("Inject assets error");
|
|
1288
1288
|
return;
|
|
1289
1289
|
}
|
|
1290
|
-
if (
|
|
1291
|
-
|
|
1290
|
+
if (N(t) && (i = t, t = !1), Jt(t) && t in window) {
|
|
1291
|
+
N(i) && i();
|
|
1292
1292
|
return;
|
|
1293
1293
|
}
|
|
1294
1294
|
let s;
|
|
1295
1295
|
if (o.indexOf(".css") !== -1) {
|
|
1296
1296
|
if (s = document.querySelectorAll('link[href="' + o + '"]'), s && s.length > 0) {
|
|
1297
|
-
|
|
1297
|
+
N(i) && i();
|
|
1298
1298
|
return;
|
|
1299
1299
|
}
|
|
1300
1300
|
const a = document.getElementsByTagName("head")[0], r = a.querySelectorAll('link[rel="stylesheet"]'), n = document.createElement("link");
|
|
1301
|
-
n.rel = "stylesheet", n.type = "text/css", n.href = o, n.media = "all", r ? a.insertBefore(n, r[0]) : a.appendChild(n),
|
|
1301
|
+
n.rel = "stylesheet", n.type = "text/css", n.href = o, n.media = "all", r ? a.insertBefore(n, r[0]) : a.appendChild(n), N(i) && i();
|
|
1302
1302
|
return;
|
|
1303
1303
|
}
|
|
1304
1304
|
if (s = document.querySelectorAll('script[src="' + o + '"]'), s && s.length > 0) {
|
|
1305
|
-
if (
|
|
1305
|
+
if (N(i)) {
|
|
1306
1306
|
if (Jt(t))
|
|
1307
1307
|
return Ee(
|
|
1308
1308
|
() => typeof window[t] < "u",
|
|
@@ -1316,7 +1316,7 @@ function ze(o, t, i) {
|
|
|
1316
1316
|
}
|
|
1317
1317
|
let e = document.createElement("script");
|
|
1318
1318
|
e.type = "text/javascript", e.src = o, e.onload = () => {
|
|
1319
|
-
if (
|
|
1319
|
+
if (N(i)) {
|
|
1320
1320
|
if (Jt(t))
|
|
1321
1321
|
return Ee(
|
|
1322
1322
|
() => typeof window[t] < "u",
|
|
@@ -1328,31 +1328,31 @@ function ze(o, t, i) {
|
|
|
1328
1328
|
}
|
|
1329
1329
|
}, document.body.appendChild(e);
|
|
1330
1330
|
}
|
|
1331
|
-
function
|
|
1331
|
+
function Le() {
|
|
1332
1332
|
return typeof window > "u" ? !1 : "navigator" in window && window.navigator.userAgent.match(/(iPad)|(iPhone)|(iPod)|(Android)|(PlayBook)|(BB10)|(BlackBerry)|(Opera Mini)|(IEMobile)|(webOS)|(MeeGo)/i);
|
|
1333
1333
|
}
|
|
1334
1334
|
function fi() {
|
|
1335
|
-
return typeof document > "u" ? !1 :
|
|
1335
|
+
return typeof document > "u" ? !1 : Le() !== null || document.createTouch !== void 0 || "ontouchstart" in window || "onmsgesturechange" in window || navigator.msMaxTouchPoints;
|
|
1336
1336
|
}
|
|
1337
|
-
function
|
|
1337
|
+
function N(o) {
|
|
1338
1338
|
return typeof o == "function";
|
|
1339
1339
|
}
|
|
1340
1340
|
function Jt(o) {
|
|
1341
1341
|
return typeof o == "string";
|
|
1342
1342
|
}
|
|
1343
|
-
function
|
|
1343
|
+
function Rt(o) {
|
|
1344
1344
|
return !!(o && o.nodeType && o.nodeType == 1);
|
|
1345
1345
|
}
|
|
1346
1346
|
function Ue(o) {
|
|
1347
1347
|
return Array.isArray(o);
|
|
1348
1348
|
}
|
|
1349
|
-
function
|
|
1349
|
+
function Ne(o) {
|
|
1350
1350
|
return o && o.length && isFinite(o.length);
|
|
1351
1351
|
}
|
|
1352
1352
|
function Kt(o) {
|
|
1353
|
-
return typeof o === "object" && o != null && !
|
|
1353
|
+
return typeof o === "object" && o != null && !N(o) && !Ue(o);
|
|
1354
1354
|
}
|
|
1355
|
-
function
|
|
1355
|
+
function Nt(o) {
|
|
1356
1356
|
return o == null;
|
|
1357
1357
|
}
|
|
1358
1358
|
function xt(o, t) {
|
|
@@ -1372,7 +1372,7 @@ function Ze(o) {
|
|
|
1372
1372
|
function ve(o) {
|
|
1373
1373
|
return !isNaN(parseFloat(o)) && isFinite(o);
|
|
1374
1374
|
}
|
|
1375
|
-
function
|
|
1375
|
+
function Xe(o = -1) {
|
|
1376
1376
|
const t = document.querySelectorAll(".gbtn[data-taborder]:not(.disabled)");
|
|
1377
1377
|
if (!t.length)
|
|
1378
1378
|
return !1;
|
|
@@ -1409,11 +1409,11 @@ function gi(o) {
|
|
|
1409
1409
|
if (!a || a.length <= 0)
|
|
1410
1410
|
return;
|
|
1411
1411
|
if (!e) {
|
|
1412
|
-
const h =
|
|
1412
|
+
const h = Xe();
|
|
1413
1413
|
h && (h.focus(), Y(h, "focused"));
|
|
1414
1414
|
return;
|
|
1415
1415
|
}
|
|
1416
|
-
let r = e.getAttribute("data-taborder"), n =
|
|
1416
|
+
let r = e.getAttribute("data-taborder"), n = Xe(r);
|
|
1417
1417
|
wt(e, "focused"), n && (n.focus(), Y(n, "focused"));
|
|
1418
1418
|
}
|
|
1419
1419
|
s == 39 && o.nextSlide(), s == 37 && o.prevSlide(), s == 27 && o.close();
|
|
@@ -1501,8 +1501,8 @@ class wi {
|
|
|
1501
1501
|
} else {
|
|
1502
1502
|
if (this.x2 !== null) {
|
|
1503
1503
|
t.deltaX = e - this.x2, t.deltaY = a - this.y2;
|
|
1504
|
-
var d = Math.abs(this.x1 - this.x2),
|
|
1505
|
-
(d > 10 ||
|
|
1504
|
+
var d = Math.abs(this.x1 - this.x2), u = Math.abs(this.y1 - this.y2);
|
|
1505
|
+
(d > 10 || u > 10) && (this._preventTap = !0);
|
|
1506
1506
|
} else
|
|
1507
1507
|
t.deltaX = 0, t.deltaY = 0;
|
|
1508
1508
|
this.pressMove.dispatch(t, this.element);
|
|
@@ -1550,7 +1550,7 @@ class wi {
|
|
|
1550
1550
|
}
|
|
1551
1551
|
function _e(o) {
|
|
1552
1552
|
const t = ci(), i = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
|
|
1553
|
-
let s = jt(o, "gslide-media") ? o : o.querySelector(".gslide-media"), e =
|
|
1553
|
+
let s = jt(o, "gslide-media") ? o : o.querySelector(".gslide-media"), e = Ht(s, ".ginner-container"), a = o.querySelector(".gslide-description");
|
|
1554
1554
|
i > 769 && (s = e), Y(s, "greset"), ye(s, "translate3d(0, 0, 0)"), Bt(t, {
|
|
1555
1555
|
onElement: s,
|
|
1556
1556
|
once: !0,
|
|
@@ -1562,11 +1562,11 @@ function _e(o) {
|
|
|
1562
1562
|
function xi(o) {
|
|
1563
1563
|
if (o.events.hasOwnProperty("touch"))
|
|
1564
1564
|
return !1;
|
|
1565
|
-
let t = Fe(), i = t.width, s = t.height, e = !1, a = null, r = null, n = null, h = !1, d = 1,
|
|
1566
|
-
const At = document.getElementById("glightbox-slider"),
|
|
1565
|
+
let t = Fe(), i = t.width, s = t.height, e = !1, a = null, r = null, n = null, h = !1, d = 1, u = 4.5, p = 1, b = !1, C = !1, k = null, L = null, at = null, ft = null, Wt, Ct, Lt = 0, kt = 0, l = !1, c = !1, v = {}, _ = {}, O = 0, I = 0, J;
|
|
1566
|
+
const At = document.getElementById("glightbox-slider"), W = document.querySelector(".goverlay"), gt = new wi(At, {
|
|
1567
1567
|
touchStart: (x) => {
|
|
1568
|
-
if (e = !0, (jt(x.targetTouches[0].target, "ginner-container") ||
|
|
1569
|
-
if (_ = x.targetTouches[0], v.pageX = x.targetTouches[0].pageX, v.pageY = x.targetTouches[0].pageY, O = x.targetTouches[0].clientX,
|
|
1568
|
+
if (e = !0, (jt(x.targetTouches[0].target, "ginner-container") || Ht(x.targetTouches[0].target, ".gslide-desc") || x.targetTouches[0].target.nodeName.toLowerCase() == "a") && (e = !1), Ht(x.targetTouches[0].target, ".gslide-inline") && !jt(x.targetTouches[0].target.parentNode, "gslide-inline") && (e = !1), e) {
|
|
1569
|
+
if (_ = x.targetTouches[0], v.pageX = x.targetTouches[0].pageX, v.pageY = x.targetTouches[0].pageY, O = x.targetTouches[0].clientX, I = x.targetTouches[0].clientY, a = o.activeSlide, r = a.querySelector(".gslide-media"), J = a.querySelector(".gslide-inline"), n = null, jt(r, "gslide-image") && (n = r.querySelector("img")), (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) > 769 && (r = a.querySelector(".ginner-container")), wt(W, "greset"), x.pageX > 20 && x.pageX < window.innerWidth - 20)
|
|
1570
1570
|
return;
|
|
1571
1571
|
x.preventDefault();
|
|
1572
1572
|
}
|
|
@@ -1575,32 +1575,32 @@ function xi(o) {
|
|
|
1575
1575
|
if (!e || (_ = x.targetTouches[0], b || C))
|
|
1576
1576
|
return;
|
|
1577
1577
|
if (J && J.offsetHeight > s) {
|
|
1578
|
-
const
|
|
1579
|
-
if (Math.abs(
|
|
1578
|
+
const R = v.pageX - _.pageX;
|
|
1579
|
+
if (Math.abs(R) <= 13)
|
|
1580
1580
|
return !1;
|
|
1581
1581
|
}
|
|
1582
1582
|
h = !0;
|
|
1583
|
-
let A = x.targetTouches[0].clientX,
|
|
1584
|
-
Math.abs(T) > Math.abs(Z) ? (l = !1, c = !0) : (c = !1, l = !0),
|
|
1583
|
+
let A = x.targetTouches[0].clientX, X = x.targetTouches[0].clientY, T = O - A, Z = I - X;
|
|
1584
|
+
Math.abs(T) > Math.abs(Z) ? (l = !1, c = !0) : (c = !1, l = !0), Wt = _.pageX - v.pageX, Lt = Wt * 100 / i, Ct = _.pageY - v.pageY, kt = Ct * 100 / s;
|
|
1585
1585
|
let G;
|
|
1586
|
-
if (l && n && (G = 1 - Math.abs(Ct) / s,
|
|
1587
|
-
return ye(r, `translate3d(${
|
|
1588
|
-
ye(r, `translate3d(${
|
|
1586
|
+
if (l && n && (G = 1 - Math.abs(Ct) / s, W.style.opacity = G, o.settings.touchFollowAxis && (Lt = 0)), c && (G = 1 - Math.abs(Wt) / i, r.style.opacity = G, o.settings.touchFollowAxis && (kt = 0)), !n)
|
|
1587
|
+
return ye(r, `translate3d(${Lt}%, 0, 0)`);
|
|
1588
|
+
ye(r, `translate3d(${Lt}%, ${kt}%, 0)`);
|
|
1589
1589
|
},
|
|
1590
1590
|
touchEnd: () => {
|
|
1591
1591
|
if (!e)
|
|
1592
1592
|
return;
|
|
1593
1593
|
if (h = !1, C || b) {
|
|
1594
|
-
at =
|
|
1594
|
+
at = k, ft = L;
|
|
1595
1595
|
return;
|
|
1596
1596
|
}
|
|
1597
|
-
const x = Math.abs(parseInt(
|
|
1597
|
+
const x = Math.abs(parseInt(kt)), A = Math.abs(parseInt(Lt));
|
|
1598
1598
|
if (x > 29 && n) {
|
|
1599
1599
|
o.close();
|
|
1600
1600
|
return;
|
|
1601
1601
|
}
|
|
1602
1602
|
if (x < 29 && A < 25)
|
|
1603
|
-
return Y(
|
|
1603
|
+
return Y(W, "greset"), W.style.opacity = 1, _e(r);
|
|
1604
1604
|
},
|
|
1605
1605
|
multipointEnd: () => {
|
|
1606
1606
|
setTimeout(() => {
|
|
@@ -1616,16 +1616,16 @@ function xi(o) {
|
|
|
1616
1616
|
b = !0, n.scaleX = n.scaleY = d * x.zoom;
|
|
1617
1617
|
let A = d * x.zoom;
|
|
1618
1618
|
if (C = !0, A <= 1) {
|
|
1619
|
-
C = !1, A = 1, ft = null, at = null,
|
|
1619
|
+
C = !1, A = 1, ft = null, at = null, k = null, L = null, n.setAttribute("style", "");
|
|
1620
1620
|
return;
|
|
1621
1621
|
}
|
|
1622
|
-
A >
|
|
1622
|
+
A > u && (A = u), n.style.transform = `scale3d(${A}, ${A}, 1)`, p = A;
|
|
1623
1623
|
},
|
|
1624
1624
|
pressMove: (x) => {
|
|
1625
1625
|
if (C && !b) {
|
|
1626
|
-
var A = _.pageX - v.pageX,
|
|
1627
|
-
at && (A = A + at), ft && (
|
|
1628
|
-
let T = `translate3d(${A}px, ${
|
|
1626
|
+
var A = _.pageX - v.pageX, X = _.pageY - v.pageY;
|
|
1627
|
+
at && (A = A + at), ft && (X = X + ft), k = A, L = X;
|
|
1628
|
+
let T = `translate3d(${A}px, ${X}px, 0)`;
|
|
1629
1629
|
p && (T += ` scale3d(${p}, ${p}, 1)`), ye(n, T);
|
|
1630
1630
|
}
|
|
1631
1631
|
},
|
|
@@ -1720,11 +1720,11 @@ class Be {
|
|
|
1720
1720
|
}
|
|
1721
1721
|
t.type === "touchstart" ? (this.initialX = t.touches[0].clientX - this.xOffset, this.initialY = t.touches[0].clientY - this.yOffset) : (this.initialX = t.clientX - this.xOffset, this.initialY = t.clientY - this.yOffset);
|
|
1722
1722
|
let i = t.target.nodeName.toLowerCase(), s = ["input", "select", "textarea", "button", "a"];
|
|
1723
|
-
if (t.target.classList.contains("nodrag") ||
|
|
1723
|
+
if (t.target.classList.contains("nodrag") || Ht(t.target, ".nodrag") || s.indexOf(i) !== -1) {
|
|
1724
1724
|
this.active = !1;
|
|
1725
1725
|
return;
|
|
1726
1726
|
}
|
|
1727
|
-
t.preventDefault(), (t.target === this.el || i !== "img" &&
|
|
1727
|
+
t.preventDefault(), (t.target === this.el || i !== "img" && Ht(t.target, ".gslide-inline")) && (this.active = !0, this.el.classList.add("dragging"), this.dragContainer = Ht(t.target, ".ginner-container"));
|
|
1728
1728
|
}
|
|
1729
1729
|
dragEnd(t) {
|
|
1730
1730
|
t && t.preventDefault(), this.initialX = 0, this.initialY = 0, this.currentX = null, this.currentY = null, this.initialX = null, this.initialY = null, this.xOffset = 0, this.yOffset = 0, this.active = !1, this.doSlideChange && (this.instance.preventOutsideClick = !0, this.doSlideChange == "right" && this.instance.prevSlide(), this.doSlideChange == "left" && this.instance.nextSlide()), this.doSlideClose && this.instance.close(), this.toleranceReached || this.setTranslate(this.dragContainer, 0, 0, !0), setTimeout(() => {
|
|
@@ -1771,42 +1771,42 @@ function Ai(o, t, i, s) {
|
|
|
1771
1771
|
const e = o.querySelector(".gslide-media");
|
|
1772
1772
|
let a = new Image(), r = "gSlideTitle_" + i, n = "gSlideDesc_" + i;
|
|
1773
1773
|
a.addEventListener("load", () => {
|
|
1774
|
-
|
|
1775
|
-
}, !1), a.src = t.href, t.sizes != "" && t.srcset != "" && (a.sizes = t.sizes, a.srcset = t.srcset), a.alt = "", !
|
|
1774
|
+
N(s) && s();
|
|
1775
|
+
}, !1), a.src = t.href, t.sizes != "" && t.srcset != "" && (a.sizes = t.sizes, a.srcset = t.srcset), a.alt = "", !Nt(t.alt) && t.alt !== "" && (a.alt = t.alt), t.title !== "" && a.setAttribute("aria-labelledby", r), t.description !== "" && a.setAttribute("aria-describedby", n), t.hasOwnProperty("_hasCustomWidth") && t._hasCustomWidth && (a.style.width = t.width), t.hasOwnProperty("_hasCustomHeight") && t._hasCustomHeight && (a.style.height = t.height), e.insertBefore(a, e.firstChild);
|
|
1776
1776
|
}
|
|
1777
1777
|
function Si(o, t, i, s) {
|
|
1778
1778
|
const e = o.querySelector(".ginner-container"), a = "gvideo" + i, r = o.querySelector(".gslide-media"), n = this.getAllPlayers();
|
|
1779
1779
|
Y(e, "gvideo-container"), r.insertBefore(Ut('<div class="gvideo-wrapper"></div>'), r.firstChild);
|
|
1780
1780
|
const h = o.querySelector(".gvideo-wrapper");
|
|
1781
1781
|
ze(this.settings.plyr.css, "Plyr");
|
|
1782
|
-
let d = t.href,
|
|
1782
|
+
let d = t.href, u = t?.videoProvider, p = !1;
|
|
1783
1783
|
r.style.maxWidth = t.width, ze(this.settings.plyr.js, "Plyr", () => {
|
|
1784
|
-
if (!
|
|
1785
|
-
|
|
1786
|
-
let
|
|
1787
|
-
|
|
1788
|
-
}
|
|
1789
|
-
const b = p || Ut(`<div id="${a}" data-plyr-provider="${
|
|
1790
|
-
Y(h, `${
|
|
1791
|
-
const C = xt(this.settings.plyr, "config") ? this.settings.plyr.config : {},
|
|
1792
|
-
|
|
1793
|
-
n[a] =
|
|
1784
|
+
if (!u && d.match(/vimeo\.com\/([0-9]*)/) && (u = "vimeo"), !u && (d.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/) || d.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/) || d.match(/(youtube\.com|youtube-nocookie\.com)\/embed\/([a-zA-Z0-9\-_]+)/)) && (u = "youtube"), u === "local" || !u) {
|
|
1785
|
+
u = "local";
|
|
1786
|
+
let L = '<video id="' + a + '" ';
|
|
1787
|
+
L += `style="background:#000; max-width: ${t.width};" `, L += 'preload="metadata" ', L += 'x-webkit-airplay="allow" ', L += "playsinline ", L += "controls ", L += 'class="gvideo-local">', L += `<source src="${d}">`, L += "</video>", p = Ut(L);
|
|
1788
|
+
}
|
|
1789
|
+
const b = p || Ut(`<div id="${a}" data-plyr-provider="${u}" data-plyr-embed-id="${d}"></div>`);
|
|
1790
|
+
Y(h, `${u}-video gvideo`), h.appendChild(b), h.setAttribute("data-id", a), h.setAttribute("data-index", i);
|
|
1791
|
+
const C = xt(this.settings.plyr, "config") ? this.settings.plyr.config : {}, k = new Plyr("#" + a, C);
|
|
1792
|
+
k.on("ready", (L) => {
|
|
1793
|
+
n[a] = L.detail.plyr, N(s) && s();
|
|
1794
1794
|
}), Ee(
|
|
1795
1795
|
() => o.querySelector("iframe") && o.querySelector("iframe").dataset.ready == "true",
|
|
1796
1796
|
() => {
|
|
1797
1797
|
this.resize(o);
|
|
1798
1798
|
}
|
|
1799
|
-
),
|
|
1799
|
+
), k.on("enterfullscreen", We), k.on("exitfullscreen", We);
|
|
1800
1800
|
});
|
|
1801
1801
|
}
|
|
1802
|
-
function
|
|
1803
|
-
const t =
|
|
1802
|
+
function We(o) {
|
|
1803
|
+
const t = Ht(o.target, ".gslide-media");
|
|
1804
1804
|
o.type === "enterfullscreen" && Y(t, "fullscreen"), o.type === "exitfullscreen" && wt(t, "fullscreen");
|
|
1805
1805
|
}
|
|
1806
1806
|
function _i(o, t, i, s) {
|
|
1807
1807
|
const e = o.querySelector(".gslide-media"), a = xt(t, "href") && t.href ? t.href.split("#").pop().trim() : !1, r = xt(t, "content") && t.content ? t.content : !1;
|
|
1808
1808
|
let n;
|
|
1809
|
-
if (r && (Jt(r) && (n = Ut(`<div class="ginlined-content">${r}</div>`)),
|
|
1809
|
+
if (r && (Jt(r) && (n = Ut(`<div class="ginlined-content">${r}</div>`)), Rt(r))) {
|
|
1810
1810
|
r.style.display == "none" && (r.style.display = "block");
|
|
1811
1811
|
const h = document.createElement("div");
|
|
1812
1812
|
h.className = "ginlined-content", h.appendChild(r), n = h;
|
|
@@ -1825,7 +1825,7 @@ function _i(o, t, i, s) {
|
|
|
1825
1825
|
withCallback: (h) => {
|
|
1826
1826
|
h.preventDefault(), this.close();
|
|
1827
1827
|
}
|
|
1828
|
-
}),
|
|
1828
|
+
}), N(s) && s();
|
|
1829
1829
|
}
|
|
1830
1830
|
function Ei(o, t, i, s) {
|
|
1831
1831
|
const e = o.querySelector(".gslide-media"), a = ui({
|
|
@@ -1852,7 +1852,7 @@ class Ti {
|
|
|
1852
1852
|
content: !1,
|
|
1853
1853
|
zoomable: !0,
|
|
1854
1854
|
draggable: !0
|
|
1855
|
-
}, Kt(t) && (this.defaults =
|
|
1855
|
+
}, Kt(t) && (this.defaults = $t(this.defaults, t));
|
|
1856
1856
|
}
|
|
1857
1857
|
/**
|
|
1858
1858
|
* Get source type
|
|
@@ -1865,35 +1865,35 @@ class Ti {
|
|
|
1865
1865
|
return t = t.toLowerCase(), t.match(/\.(jpeg|jpg|jpe|gif|png|apn|webp|avif|svg)/) !== null ? "image" : t.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/) || t.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/) || t.match(/(youtube\.com|youtube-nocookie\.com)\/embed\/([a-zA-Z0-9\-_]+)/) || t.match(/vimeo\.com\/([0-9]*)/) || t.match(/\.(mp4|ogg|webm|mov)/) !== null ? "video" : t.match(/\.(mp3|wav|wma|aac|ogg)/) !== null ? "audio" : t.indexOf("#") > -1 && i.split("#").pop().trim() !== "" ? "inline" : t.indexOf("goajax=true") > -1 ? "ajax" : "external";
|
|
1866
1866
|
}
|
|
1867
1867
|
parseConfig(t, i) {
|
|
1868
|
-
let s =
|
|
1869
|
-
if (Kt(t) &&
|
|
1868
|
+
let s = $t({ descPosition: i.descPosition }, this.defaults);
|
|
1869
|
+
if (Kt(t) && !Rt(t)) {
|
|
1870
1870
|
xt(t, "type") || (xt(t, "content") && t.content ? t.type = "inline" : xt(t, "href") && (t.type = this.sourceType(t.href)));
|
|
1871
|
-
let n =
|
|
1871
|
+
let n = $t(s, t);
|
|
1872
1872
|
return this.setSize(n, i), n;
|
|
1873
1873
|
}
|
|
1874
1874
|
let e = "", a = t.getAttribute("data-glightbox"), r = t.nodeName.toLowerCase();
|
|
1875
1875
|
if (r === "a" && (e = t.href), r === "img" && (e = t.src, s.alt = t.alt), s.href = e, nt(s, (n, h) => {
|
|
1876
1876
|
xt(i, h) && h !== "width" && (s[h] = i[h]);
|
|
1877
1877
|
const d = t.dataset[h];
|
|
1878
|
-
|
|
1879
|
-
}), s.content && (s.type = "inline"), !s.type && e && (s.type = this.sourceType(e)),
|
|
1878
|
+
Nt(d) || (s[h] = this.sanitizeValue(d));
|
|
1879
|
+
}), s.content && (s.type = "inline"), !s.type && e && (s.type = this.sourceType(e)), Nt(a)) {
|
|
1880
1880
|
if (!s.title && r == "a") {
|
|
1881
1881
|
let n = t.title;
|
|
1882
|
-
!
|
|
1882
|
+
!Nt(n) && n !== "" && (s.title = n);
|
|
1883
1883
|
}
|
|
1884
1884
|
if (!s.title && r == "img") {
|
|
1885
1885
|
let n = t.alt;
|
|
1886
|
-
!
|
|
1886
|
+
!Nt(n) && n !== "" && (s.title = n);
|
|
1887
1887
|
}
|
|
1888
1888
|
} else {
|
|
1889
1889
|
let n = [];
|
|
1890
1890
|
nt(s, (h, d) => {
|
|
1891
1891
|
n.push(";\\s?" + d);
|
|
1892
1892
|
}), n = n.join("\\s?:|"), a.trim() !== "" && nt(s, (h, d) => {
|
|
1893
|
-
const
|
|
1893
|
+
const u = a, p = "s?" + d + "s?:s?(.*?)(" + n + "s?:|$)", b = new RegExp(p), C = u.match(b);
|
|
1894
1894
|
if (C && C.length && C[1]) {
|
|
1895
|
-
const
|
|
1896
|
-
s[d] = this.sanitizeValue(
|
|
1895
|
+
const k = C[1].trim().replace(/;\s*$/, "");
|
|
1896
|
+
s[d] = this.sanitizeValue(k);
|
|
1897
1897
|
}
|
|
1898
1898
|
});
|
|
1899
1899
|
}
|
|
@@ -1960,20 +1960,20 @@ class pe {
|
|
|
1960
1960
|
setContent(t = null, i = !1) {
|
|
1961
1961
|
if (jt(t, "loaded"))
|
|
1962
1962
|
return !1;
|
|
1963
|
-
const s = this.instance.settings, e = this.slideConfig, a =
|
|
1964
|
-
|
|
1963
|
+
const s = this.instance.settings, e = this.slideConfig, a = Le();
|
|
1964
|
+
N(s.beforeSlideLoad) && s.beforeSlideLoad({
|
|
1965
1965
|
index: this.index,
|
|
1966
1966
|
slide: t,
|
|
1967
1967
|
player: !1
|
|
1968
1968
|
});
|
|
1969
|
-
let r = e.type, n = e.descPosition, h = t.querySelector(".gslide-media"), d = t.querySelector(".gslide-title"),
|
|
1970
|
-
if (
|
|
1971
|
-
|
|
1969
|
+
let r = e.type, n = e.descPosition, h = t.querySelector(".gslide-media"), d = t.querySelector(".gslide-title"), u = t.querySelector(".gslide-desc"), p = t.querySelector(".gdesc-inner"), b = i, C = "gSlideTitle_" + this.index, k = "gSlideDesc_" + this.index;
|
|
1970
|
+
if (N(s.afterSlideLoad) && (b = () => {
|
|
1971
|
+
N(i) && i(), s.afterSlideLoad({
|
|
1972
1972
|
index: this.index,
|
|
1973
1973
|
slide: t,
|
|
1974
1974
|
player: this.instance.getSlidePlayerInstance(this.index)
|
|
1975
1975
|
});
|
|
1976
|
-
}), e.title == "" && e.description == "" ? p && p.parentNode.parentNode.removeChild(p.parentNode) : (d && e.title !== "" ? (d.id = C, d.innerHTML = e.title) : d.parentNode.removeChild(d),
|
|
1976
|
+
}), e.title == "" && e.description == "" ? p && p.parentNode.parentNode.removeChild(p.parentNode) : (d && e.title !== "" ? (d.id = C, d.innerHTML = e.title) : d.parentNode.removeChild(d), u && e.description !== "" ? (u.id = k, a && s.moreLength > 0 ? (e.smallDescription = this.slideShortDesc(e.description, s.moreLength, s.moreText), u.innerHTML = e.smallDescription, this.descriptionEvents(u, e)) : u.innerHTML = e.description) : u.parentNode.removeChild(u), Y(h.parentNode, `desc-${n}`), Y(p.parentNode, `description-${n}`)), Y(h, `gslide-${r}`), Y(t, "loaded"), r === "video") {
|
|
1977
1977
|
Si.apply(this.instance, [t, e, this.index, b]);
|
|
1978
1978
|
return;
|
|
1979
1979
|
}
|
|
@@ -1993,20 +1993,20 @@ class pe {
|
|
|
1993
1993
|
}
|
|
1994
1994
|
if (r === "image") {
|
|
1995
1995
|
Ai(t, e, this.index, () => {
|
|
1996
|
-
const
|
|
1996
|
+
const L = t.querySelector("img");
|
|
1997
1997
|
e.draggable && new Be({
|
|
1998
|
-
dragEl:
|
|
1998
|
+
dragEl: L,
|
|
1999
1999
|
toleranceX: s.dragToleranceX,
|
|
2000
2000
|
toleranceY: s.dragToleranceY,
|
|
2001
2001
|
slide: t,
|
|
2002
2002
|
instance: this.instance
|
|
2003
|
-
}), e.zoomable &&
|
|
2003
|
+
}), e.zoomable && L.naturalWidth > L.offsetWidth && (Y(L, "zoomable"), new Oi(L, t, () => {
|
|
2004
2004
|
this.instance.resize();
|
|
2005
|
-
})),
|
|
2005
|
+
})), N(b) && b();
|
|
2006
2006
|
});
|
|
2007
2007
|
return;
|
|
2008
2008
|
}
|
|
2009
|
-
|
|
2009
|
+
N(b) && b();
|
|
2010
2010
|
}
|
|
2011
2011
|
slideShortDesc(t, i = 50, s = !1) {
|
|
2012
2012
|
let e = document.createElement("div");
|
|
@@ -2026,13 +2026,13 @@ class pe {
|
|
|
2026
2026
|
withCallback: (e, a) => {
|
|
2027
2027
|
e.preventDefault();
|
|
2028
2028
|
const r = document.body;
|
|
2029
|
-
let n =
|
|
2029
|
+
let n = Ht(a, ".gslide-desc");
|
|
2030
2030
|
if (!n)
|
|
2031
2031
|
return !1;
|
|
2032
2032
|
n.innerHTML = i.description, Y(r, "gdesc-open");
|
|
2033
2033
|
let h = Bt("click", {
|
|
2034
|
-
onElement: [r,
|
|
2035
|
-
withCallback: (d,
|
|
2034
|
+
onElement: [r, Ht(n, ".gslide-description")],
|
|
2035
|
+
withCallback: (d, u) => {
|
|
2036
2036
|
d.target.nodeName.toLowerCase() !== "a" && (wt(r, "gdesc-open"), Y(r, "gdesc-closed"), n.innerHTML = i.smallDescription, this.descriptionEvents(n, i), setTimeout(() => {
|
|
2037
2037
|
wt(r, "gdesc-closed");
|
|
2038
2038
|
}, 400), h.destroy());
|
|
@@ -2059,15 +2059,15 @@ class pe {
|
|
|
2059
2059
|
* @return { object }
|
|
2060
2060
|
*/
|
|
2061
2061
|
getConfig() {
|
|
2062
|
-
|
|
2062
|
+
!Rt(this.element) && !this.element.hasOwnProperty("draggable") && (this.element.draggable = this.instance.settings.draggable);
|
|
2063
2063
|
const t = new Ti(this.instance.settings.slideExtraAttributes);
|
|
2064
2064
|
return this.slideConfig = t.parseConfig(this.element, this.instance.settings), this.slideConfig;
|
|
2065
2065
|
}
|
|
2066
2066
|
}
|
|
2067
|
-
const ji = "3.2.0",
|
|
2067
|
+
const ji = "3.2.0", He = Le(), $e = fi();
|
|
2068
2068
|
let Te;
|
|
2069
2069
|
typeof document > "u" || (Te = document.getElementsByTagName("html")[0]);
|
|
2070
|
-
const
|
|
2070
|
+
const ke = {
|
|
2071
2071
|
selector: ".glightbox",
|
|
2072
2072
|
elements: null,
|
|
2073
2073
|
skin: "clean",
|
|
@@ -2145,7 +2145,7 @@ const Ie = {
|
|
|
2145
2145
|
prev: '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 477.175 477.175" xml:space="preserve"><g><path d="M145.188,238.575l215.5-215.5c5.3-5.3,5.3-13.8,0-19.1s-13.8-5.3-19.1,0l-225.1,225.1c-5.3,5.3-5.3,13.8,0,19.1l225.1,225c2.6,2.6,6.1,4,9.5,4s6.9-1.3,9.5-4c5.3-5.3,5.3-13.8,0-19.1L145.188,238.575z"/></g></svg>'
|
|
2146
2146
|
}
|
|
2147
2147
|
};
|
|
2148
|
-
|
|
2148
|
+
ke.slideHTML = `<div class="gslide">
|
|
2149
2149
|
<div class="gslide-inner-content">
|
|
2150
2150
|
<div class="ginner-container">
|
|
2151
2151
|
<div class="gslide-media">
|
|
@@ -2159,7 +2159,7 @@ Ie.slideHTML = `<div class="gslide">
|
|
|
2159
2159
|
</div>
|
|
2160
2160
|
</div>
|
|
2161
2161
|
</div>`;
|
|
2162
|
-
|
|
2162
|
+
ke.lightboxHTML = `<div id="glightbox-body" class="glightbox-container" tabindex="-1" role="dialog" aria-hidden="false">
|
|
2163
2163
|
<div class="gloader visible"></div>
|
|
2164
2164
|
<div class="goverlay"></div>
|
|
2165
2165
|
<div class="gcontainer">
|
|
@@ -2169,9 +2169,9 @@ Ie.lightboxHTML = `<div id="glightbox-body" class="glightbox-container" tabindex
|
|
|
2169
2169
|
<button class="gnext gbtn" aria-label="Next" data-taborder="1">{nextSVG}</button>
|
|
2170
2170
|
</div>
|
|
2171
2171
|
</div>`;
|
|
2172
|
-
class
|
|
2172
|
+
class Re {
|
|
2173
2173
|
constructor(t = {}) {
|
|
2174
|
-
this.customOptions = t, this.settings =
|
|
2174
|
+
this.customOptions = t, this.settings = $t(ke, t), this.effectsClasses = this.getAnimationClasses(), this.videoPlayers = {}, this.apiEvents = [], this.fullElementsList = !1;
|
|
2175
2175
|
}
|
|
2176
2176
|
init() {
|
|
2177
2177
|
const t = this.getSelector();
|
|
@@ -2187,9 +2187,9 @@ class $e {
|
|
|
2187
2187
|
return !1;
|
|
2188
2188
|
this.activeSlide = null, this.prevActiveSlideIndex = null, this.prevActiveSlide = null;
|
|
2189
2189
|
let s = ve(i) ? i : this.settings.startAt;
|
|
2190
|
-
if (
|
|
2190
|
+
if (Rt(t)) {
|
|
2191
2191
|
const n = t.getAttribute("data-gallery");
|
|
2192
|
-
n && (this.fullElementsList = this.elements, this.elements = this.getGalleryElements(this.elements, n)),
|
|
2192
|
+
n && (this.fullElementsList = this.elements, this.elements = this.getGalleryElements(this.elements, n)), Nt(s) && (s = this.getElementIndex(t), s < 0 && (s = 0));
|
|
2193
2193
|
}
|
|
2194
2194
|
ve(s) || (s = 0), this.build(), Qt(this.overlay, this.settings.openEffect === "none" ? "none" : this.settings.cssEfects.fade.in);
|
|
2195
2195
|
const e = document.body, a = window.innerWidth - document.documentElement.clientWidth;
|
|
@@ -2197,7 +2197,7 @@ class $e {
|
|
|
2197
2197
|
var r = document.createElement("style");
|
|
2198
2198
|
r.type = "text/css", r.className = "gcss-styles", r.innerText = `.gscrollbar-fixer {margin-right: ${a}px}`, document.head.appendChild(r), Y(e, "gscrollbar-fixer");
|
|
2199
2199
|
}
|
|
2200
|
-
Y(e, "glightbox-open"), Y(Te, "glightbox-open"),
|
|
2200
|
+
Y(e, "glightbox-open"), Y(Te, "glightbox-open"), He && (Y(document.body, "glightbox-mobile"), this.settings.slideEffect = "slide"), this.showSlide(s, !0), this.elements.length === 1 ? (Y(this.prevButton, "glightbox-button-hidden"), Y(this.nextButton, "glightbox-button-hidden")) : (wt(this.prevButton, "glightbox-button-hidden"), wt(this.nextButton, "glightbox-button-hidden")), this.lightboxOpen = !0, this.trigger("open"), N(this.settings.onOpen) && this.settings.onOpen(), $e && this.settings.touchNavigation && xi(this), this.settings.keyboardNavigation && gi(this);
|
|
2201
2201
|
}
|
|
2202
2202
|
/**
|
|
2203
2203
|
* Open at specific index
|
|
@@ -2210,14 +2210,14 @@ class $e {
|
|
|
2210
2210
|
* Set Slide
|
|
2211
2211
|
*/
|
|
2212
2212
|
showSlide(t = 0, i = !1) {
|
|
2213
|
-
|
|
2213
|
+
De(this.loader), this.index = parseInt(t);
|
|
2214
2214
|
let s = this.slidesContainer.querySelector(".current");
|
|
2215
2215
|
s && wt(s, "current"), this.slideAnimateOut();
|
|
2216
2216
|
let e = this.slidesContainer.querySelectorAll(".gslide")[t];
|
|
2217
2217
|
if (jt(e, "loaded"))
|
|
2218
2218
|
this.slideAnimateIn(e, i), Se(this.loader);
|
|
2219
2219
|
else {
|
|
2220
|
-
|
|
2220
|
+
De(this.loader);
|
|
2221
2221
|
const a = this.elements[t], r = {
|
|
2222
2222
|
index: this.index,
|
|
2223
2223
|
slide: e,
|
|
@@ -2240,7 +2240,7 @@ class $e {
|
|
|
2240
2240
|
* @return {null}
|
|
2241
2241
|
*/
|
|
2242
2242
|
preloadSlide(t) {
|
|
2243
|
-
if (t < 0 || t > this.elements.length - 1 ||
|
|
2243
|
+
if (t < 0 || t > this.elements.length - 1 || Nt(this.elements[t]))
|
|
2244
2244
|
return !1;
|
|
2245
2245
|
let i = this.slidesContainer.querySelectorAll(".gslide")[t];
|
|
2246
2246
|
if (jt(i, "loaded"))
|
|
@@ -2295,15 +2295,15 @@ class $e {
|
|
|
2295
2295
|
*/
|
|
2296
2296
|
insertSlide(t = {}, i = -1) {
|
|
2297
2297
|
i < 0 && (i = this.elements.length);
|
|
2298
|
-
const s = new pe(t, this, i), e = s.getConfig(), a =
|
|
2298
|
+
const s = new pe(t, this, i), e = s.getConfig(), a = $t({}, e), r = s.create(), n = this.elements.length - 1;
|
|
2299
2299
|
a.index = i, a.node = !1, a.instance = s, a.slideConfig = e, this.elements.splice(i, 0, a);
|
|
2300
2300
|
let h = null, d = null;
|
|
2301
2301
|
if (this.slidesContainer) {
|
|
2302
2302
|
if (i > n)
|
|
2303
2303
|
this.slidesContainer.appendChild(r);
|
|
2304
2304
|
else {
|
|
2305
|
-
let
|
|
2306
|
-
this.slidesContainer.insertBefore(r,
|
|
2305
|
+
let u = this.slidesContainer.querySelectorAll(".gslide")[i];
|
|
2306
|
+
this.slidesContainer.insertBefore(r, u);
|
|
2307
2307
|
}
|
|
2308
2308
|
(this.settings.preload && this.index == 0 && i == 0 || this.index - 1 == i || this.index + 1 == i) && this.preloadSlide(i), this.index === 0 && i === 0 && (this.index = 1), this.updateNavigationClasses(), h = this.slidesContainer.querySelectorAll(".gslide")[i], d = this.getSlidePlayerInstance(i), a.slideNode = h;
|
|
2309
2309
|
}
|
|
@@ -2315,7 +2315,7 @@ class $e {
|
|
|
2315
2315
|
slideIndex: i,
|
|
2316
2316
|
trigger: null,
|
|
2317
2317
|
player: d
|
|
2318
|
-
}),
|
|
2318
|
+
}), N(this.settings.slideInserted) && this.settings.slideInserted({
|
|
2319
2319
|
index: i,
|
|
2320
2320
|
slide: h,
|
|
2321
2321
|
player: d
|
|
@@ -2330,7 +2330,7 @@ class $e {
|
|
|
2330
2330
|
if (t < 0 || t > this.elements.length - 1)
|
|
2331
2331
|
return !1;
|
|
2332
2332
|
const i = this.slidesContainer && this.slidesContainer.querySelectorAll(".gslide")[t];
|
|
2333
|
-
i && (this.getActiveSlideIndex() == t && (t == this.elements.length - 1 ? this.prevSlide() : this.nextSlide()), i.parentNode.removeChild(i)), this.elements.splice(t, 1), this.trigger("slide_removed", t),
|
|
2333
|
+
i && (this.getActiveSlideIndex() == t && (t == this.elements.length - 1 ? this.prevSlide() : this.nextSlide()), i.parentNode.removeChild(i)), this.elements.splice(t, 1), this.trigger("slide_removed", t), N(this.settings.slideRemoved) && this.settings.slideRemoved(t);
|
|
2334
2334
|
}
|
|
2335
2335
|
/**
|
|
2336
2336
|
* Slide In
|
|
@@ -2343,8 +2343,8 @@ class $e {
|
|
|
2343
2343
|
//this will be removed in the future
|
|
2344
2344
|
slideNode: this.prevActiveSlide,
|
|
2345
2345
|
slideIndex: this.prevActiveSlide,
|
|
2346
|
-
slideConfig:
|
|
2347
|
-
trigger:
|
|
2346
|
+
slideConfig: Nt(this.prevActiveSlideIndex) ? null : this.elements[this.prevActiveSlideIndex].slideConfig,
|
|
2347
|
+
trigger: Nt(this.prevActiveSlideIndex) ? null : this.elements[this.prevActiveSlideIndex].node,
|
|
2348
2348
|
player: this.getSlidePlayerInstance(this.prevActiveSlideIndex)
|
|
2349
2349
|
}, r = {
|
|
2350
2350
|
index: this.index,
|
|
@@ -2361,7 +2361,7 @@ class $e {
|
|
|
2361
2361
|
this.settings.autoplayVideos && this.slidePlayerPlay(t), this.trigger("slide_changed", {
|
|
2362
2362
|
prev: a,
|
|
2363
2363
|
current: r
|
|
2364
|
-
}),
|
|
2364
|
+
}), N(this.settings.afterSlideChange) && this.settings.afterSlideChange.apply(this, [a, r]);
|
|
2365
2365
|
});
|
|
2366
2366
|
else {
|
|
2367
2367
|
let n = this.settings.slideEffect, h = n !== "none" ? this.settings.cssEfects[n].in : n;
|
|
@@ -2369,7 +2369,7 @@ class $e {
|
|
|
2369
2369
|
this.settings.autoplayVideos && this.slidePlayerPlay(t), this.trigger("slide_changed", {
|
|
2370
2370
|
prev: a,
|
|
2371
2371
|
current: r
|
|
2372
|
-
}),
|
|
2372
|
+
}), N(this.settings.afterSlideChange) && this.settings.afterSlideChange.apply(this, [a, r]);
|
|
2373
2373
|
});
|
|
2374
2374
|
}
|
|
2375
2375
|
setTimeout(() => {
|
|
@@ -2393,8 +2393,8 @@ class $e {
|
|
|
2393
2393
|
//this will be removed in the future
|
|
2394
2394
|
slideNode: this.prevActiveSlide,
|
|
2395
2395
|
slideIndex: this.prevActiveSlideIndex,
|
|
2396
|
-
slideConfig:
|
|
2397
|
-
trigger:
|
|
2396
|
+
slideConfig: Nt(this.prevActiveSlideIndex) ? null : this.elements[this.prevActiveSlideIndex].slideConfig,
|
|
2397
|
+
trigger: Nt(this.prevActiveSlideIndex) ? null : this.elements[this.prevActiveSlideIndex].node,
|
|
2398
2398
|
player: this.getSlidePlayerInstance(this.prevActiveSlideIndex)
|
|
2399
2399
|
},
|
|
2400
2400
|
current: {
|
|
@@ -2408,7 +2408,7 @@ class $e {
|
|
|
2408
2408
|
trigger: this.elements[this.index].node,
|
|
2409
2409
|
player: this.getSlidePlayerInstance(this.index)
|
|
2410
2410
|
}
|
|
2411
|
-
}),
|
|
2411
|
+
}), N(this.settings.beforeSlideChange) && this.settings.beforeSlideChange.apply(this, [
|
|
2412
2412
|
{
|
|
2413
2413
|
index: this.prevActiveSlideIndex,
|
|
2414
2414
|
slide: this.prevActiveSlide,
|
|
@@ -2448,7 +2448,7 @@ class $e {
|
|
|
2448
2448
|
* @return void
|
|
2449
2449
|
*/
|
|
2450
2450
|
stopSlideVideo(t) {
|
|
2451
|
-
if (
|
|
2451
|
+
if (Rt(t)) {
|
|
2452
2452
|
let s = t.querySelector(".gvideo-wrapper");
|
|
2453
2453
|
s && (t = s.getAttribute("data-index"));
|
|
2454
2454
|
}
|
|
@@ -2463,7 +2463,7 @@ class $e {
|
|
|
2463
2463
|
* @return void
|
|
2464
2464
|
*/
|
|
2465
2465
|
slidePlayerPause(t) {
|
|
2466
|
-
if (
|
|
2466
|
+
if (Rt(t)) {
|
|
2467
2467
|
let s = t.querySelector(".gvideo-wrapper");
|
|
2468
2468
|
s && (t = s.getAttribute("data-index"));
|
|
2469
2469
|
}
|
|
@@ -2478,7 +2478,7 @@ class $e {
|
|
|
2478
2478
|
* @return void
|
|
2479
2479
|
*/
|
|
2480
2480
|
playSlideVideo(t) {
|
|
2481
|
-
if (
|
|
2481
|
+
if (Rt(t)) {
|
|
2482
2482
|
let s = t.querySelector(".gvideo-wrapper");
|
|
2483
2483
|
s && (t = s.getAttribute("data-index"));
|
|
2484
2484
|
}
|
|
@@ -2494,9 +2494,9 @@ class $e {
|
|
|
2494
2494
|
* @return void
|
|
2495
2495
|
*/
|
|
2496
2496
|
slidePlayerPlay(t) {
|
|
2497
|
-
if (
|
|
2497
|
+
if (He && !this.settings.plyr.config?.muted)
|
|
2498
2498
|
return;
|
|
2499
|
-
if (
|
|
2499
|
+
if (Rt(t)) {
|
|
2500
2500
|
let s = t.querySelector(".gvideo-wrapper");
|
|
2501
2501
|
s && (t = s.getAttribute("data-index"));
|
|
2502
2502
|
}
|
|
@@ -2515,7 +2515,7 @@ class $e {
|
|
|
2515
2515
|
this.settings.elements = !1;
|
|
2516
2516
|
const i = [];
|
|
2517
2517
|
t && t.length && nt(t, (s, e) => {
|
|
2518
|
-
const a = new pe(s, this, e), r = a.getConfig(), n =
|
|
2518
|
+
const a = new pe(s, this, e), r = a.getConfig(), n = $t({}, r);
|
|
2519
2519
|
n.slideConfig = r, n.instance = a, n.index = e, i.push(n);
|
|
2520
2520
|
}), this.elements = i, this.lightboxOpen && (this.slidesContainer.innerHTML = "", this.elements.length && (nt(this.elements, () => {
|
|
2521
2521
|
let s = Ut(this.settings.slideHTML);
|
|
@@ -2551,13 +2551,13 @@ class $e {
|
|
|
2551
2551
|
*/
|
|
2552
2552
|
getElements() {
|
|
2553
2553
|
let t = [];
|
|
2554
|
-
this.elements = this.elements ? this.elements : [], !
|
|
2555
|
-
const r = new pe(e, this, a), n = r.getConfig(), h =
|
|
2554
|
+
this.elements = this.elements ? this.elements : [], !Nt(this.settings.elements) && Ue(this.settings.elements) && this.settings.elements.length && nt(this.settings.elements, (e, a) => {
|
|
2555
|
+
const r = new pe(e, this, a), n = r.getConfig(), h = $t({}, n);
|
|
2556
2556
|
h.node = !1, h.index = a, h.instance = r, h.slideConfig = n, t.push(h);
|
|
2557
2557
|
});
|
|
2558
2558
|
let i = !1;
|
|
2559
2559
|
return this.getSelector() && (i = document.querySelectorAll(this.getSelector())), i && nt(i, (e, a) => {
|
|
2560
|
-
const r = new pe(e, this, a), n = r.getConfig(), h =
|
|
2560
|
+
const r = new pe(e, this, a), n = r.getConfig(), h = $t({}, n);
|
|
2561
2561
|
h.node = e, h.index = a, h.instance = r, h.slideConfig = n, h.gallery = e.getAttribute("data-gallery"), t.push(h);
|
|
2562
2562
|
}), t;
|
|
2563
2563
|
}
|
|
@@ -2620,27 +2620,27 @@ class $e {
|
|
|
2620
2620
|
let h = n.querySelector(".gclose");
|
|
2621
2621
|
this.prevButton = n.querySelector(".gprev"), this.nextButton = n.querySelector(".gnext"), this.overlay = n.querySelector(".goverlay"), this.loader = n.querySelector(".gloader"), this.slidesContainer = document.getElementById("glightbox-slider"), this.bodyHiddenChildElms = i, this.events = {}, Y(this.modal, "glightbox-" + this.settings.skin), this.settings.closeButton && h && (this.events.close = Bt("click", {
|
|
2622
2622
|
onElement: h,
|
|
2623
|
-
withCallback: (d,
|
|
2623
|
+
withCallback: (d, u) => {
|
|
2624
2624
|
d.preventDefault(), this.close();
|
|
2625
2625
|
}
|
|
2626
2626
|
})), h && !this.settings.closeButton && h.parentNode.removeChild(h), this.nextButton && (this.events.next = Bt("click", {
|
|
2627
2627
|
onElement: this.nextButton,
|
|
2628
|
-
withCallback: (d,
|
|
2628
|
+
withCallback: (d, u) => {
|
|
2629
2629
|
d.preventDefault(), this.nextSlide();
|
|
2630
2630
|
}
|
|
2631
2631
|
})), this.prevButton && (this.events.prev = Bt("click", {
|
|
2632
2632
|
onElement: this.prevButton,
|
|
2633
|
-
withCallback: (d,
|
|
2633
|
+
withCallback: (d, u) => {
|
|
2634
2634
|
d.preventDefault(), this.prevSlide();
|
|
2635
2635
|
}
|
|
2636
2636
|
})), this.settings.closeOnOutsideClick && (this.events.outClose = Bt("click", {
|
|
2637
2637
|
onElement: n,
|
|
2638
|
-
withCallback: (d,
|
|
2639
|
-
!this.preventOutsideClick && !jt(document.body, "glightbox-mobile") && !
|
|
2638
|
+
withCallback: (d, u) => {
|
|
2639
|
+
!this.preventOutsideClick && !jt(document.body, "glightbox-mobile") && !Ht(d.target, ".ginner-container") && !Ht(d.target, ".gbtn") && !jt(d.target, "gnext") && !jt(d.target, "gprev") && this.close();
|
|
2640
2640
|
}
|
|
2641
|
-
})), nt(this.elements, (d,
|
|
2642
|
-
this.slidesContainer.appendChild(d.instance.create()), d.slideNode = this.slidesContainer.querySelectorAll(".gslide")[
|
|
2643
|
-
}),
|
|
2641
|
+
})), nt(this.elements, (d, u) => {
|
|
2642
|
+
this.slidesContainer.appendChild(d.instance.create()), d.slideNode = this.slidesContainer.querySelectorAll(".gslide")[u];
|
|
2643
|
+
}), $e && Y(document.body, "glightbox-touch"), this.events.resize = Bt("resize", {
|
|
2644
2644
|
onElement: window,
|
|
2645
2645
|
withCallback: () => {
|
|
2646
2646
|
this.resize();
|
|
@@ -2667,22 +2667,22 @@ class $e {
|
|
|
2667
2667
|
if (r <= 768)
|
|
2668
2668
|
e.querySelector("img");
|
|
2669
2669
|
else if (h) {
|
|
2670
|
-
let d = a.offsetHeight,
|
|
2670
|
+
let d = a.offsetHeight, u = e.querySelector("img");
|
|
2671
2671
|
const b = this.elements[this.index].node.getAttribute("data-height") ?? "100vh";
|
|
2672
|
-
|
|
2672
|
+
u.setAttribute("style", `max-height: calc(${b} - ${d}px)`), a.setAttribute("style", `max-width: ${u.offsetWidth}px;`);
|
|
2673
2673
|
}
|
|
2674
2674
|
}
|
|
2675
2675
|
if (s) {
|
|
2676
2676
|
let d = xt(this.settings.plyr.config, "ratio") ? this.settings.plyr.config.ratio : "";
|
|
2677
2677
|
if (!d) {
|
|
2678
|
-
const
|
|
2679
|
-
d = `${
|
|
2678
|
+
const k = s.clientWidth, L = s.clientHeight, at = k / L;
|
|
2679
|
+
d = `${k / at}:${L / at}`;
|
|
2680
2680
|
}
|
|
2681
|
-
let
|
|
2681
|
+
let u = d.split(":"), p = this.settings.videosWidth, b = this.settings.videosWidth;
|
|
2682
2682
|
ve(p) || p.indexOf("px") !== -1 ? b = parseInt(p) : p.indexOf("vw") !== -1 ? b = r * parseInt(p) / 100 : p.indexOf("vh") !== -1 ? b = n * parseInt(p) / 100 : p.indexOf("%") !== -1 ? b = r * parseInt(p) / 100 : b = parseInt(s.clientWidth);
|
|
2683
|
-
let C = b / (parseInt(
|
|
2683
|
+
let C = b / (parseInt(u[0]) / parseInt(u[1]));
|
|
2684
2684
|
if (C = Math.floor(C), h && (n = n - a.offsetHeight), b > r || C > n || n < C && r > b) {
|
|
2685
|
-
let
|
|
2685
|
+
let k = s.offsetWidth, L = s.offsetHeight, at = n / L, ft = { width: k * at };
|
|
2686
2686
|
s.parentNode.setAttribute("style", `max-width: ${ft.width}px`), h && a.setAttribute("style", `max-width: ${ft.width}px;`);
|
|
2687
2687
|
} else
|
|
2688
2688
|
s.parentNode.style.maxWidth = `${p}`, h && a.setAttribute("style", `max-width: ${p};`);
|
|
@@ -2734,7 +2734,7 @@ class $e {
|
|
|
2734
2734
|
this.events = null;
|
|
2735
2735
|
}
|
|
2736
2736
|
const t = document.body;
|
|
2737
|
-
wt(Te, "glightbox-open"), wt(t, "glightbox-open touching gdesc-open glightbox-touch glightbox-mobile gscrollbar-fixer"), this.modal.parentNode.removeChild(this.modal), this.trigger("close"),
|
|
2737
|
+
wt(Te, "glightbox-open"), wt(t, "glightbox-open touching gdesc-open glightbox-touch glightbox-mobile gscrollbar-fixer"), this.modal.parentNode.removeChild(this.modal), this.trigger("close"), N(this.settings.onClose) && this.settings.onClose();
|
|
2738
2738
|
const i = document.querySelector(".gcss-styles");
|
|
2739
2739
|
i && i.parentNode.removeChild(i), this.lightboxOpen = !1, this.closing = null;
|
|
2740
2740
|
});
|
|
@@ -2750,7 +2750,7 @@ class $e {
|
|
|
2750
2750
|
* Set event
|
|
2751
2751
|
*/
|
|
2752
2752
|
on(t, i, s = !1) {
|
|
2753
|
-
if (!t || !
|
|
2753
|
+
if (!t || !N(i))
|
|
2754
2754
|
throw new TypeError("Event name and callback must be defined");
|
|
2755
2755
|
this.apiEvents.push({ evt: t, once: s, callback: i });
|
|
2756
2756
|
}
|
|
@@ -2856,9 +2856,9 @@ class Ci {
|
|
|
2856
2856
|
(r !== this.direction.x || n !== this.direction.y) && (this.direction = { x: r, y: n }, this.queue = [], this.lastScrollTime = 0);
|
|
2857
2857
|
const h = Date.now(), d = h - this.lastScrollTime;
|
|
2858
2858
|
if (d < this.accelerationDelta) {
|
|
2859
|
-
const
|
|
2860
|
-
if (
|
|
2861
|
-
const p = Math.min(
|
|
2859
|
+
const u = (1 + 50 / d) / 2;
|
|
2860
|
+
if (u > 1) {
|
|
2861
|
+
const p = Math.min(u, this.accelerationMax);
|
|
2862
2862
|
i *= p, s *= p;
|
|
2863
2863
|
}
|
|
2864
2864
|
}
|
|
@@ -2881,8 +2881,8 @@ class Ci {
|
|
|
2881
2881
|
const i = document.scrollingElement || document.documentElement;
|
|
2882
2882
|
let s = t;
|
|
2883
2883
|
for (; s && s !== document.body; ) {
|
|
2884
|
-
const e = window.getComputedStyle(s), a = e.overflowY, r = e.overflowX, n = ["auto", "scroll"].includes(a), h = ["auto", "scroll"].includes(r), d = s.scrollHeight > s.clientHeight,
|
|
2885
|
-
if (n && d || h &&
|
|
2884
|
+
const e = window.getComputedStyle(s), a = e.overflowY, r = e.overflowX, n = ["auto", "scroll"].includes(a), h = ["auto", "scroll"].includes(r), d = s.scrollHeight > s.clientHeight, u = s.scrollWidth > s.clientWidth;
|
|
2885
|
+
if (n && d || h && u)
|
|
2886
2886
|
return s;
|
|
2887
2887
|
if (s === i) return i;
|
|
2888
2888
|
s = s.parentElement;
|
|
@@ -2908,8 +2908,8 @@ class Ci {
|
|
|
2908
2908
|
const s = Date.now();
|
|
2909
2909
|
let e = 0, a = 0;
|
|
2910
2910
|
for (let n = this.queue.length - 1; n >= 0; n--) {
|
|
2911
|
-
const h = this.queue[n], d = s - h.start,
|
|
2912
|
-
e += C, a +=
|
|
2911
|
+
const h = this.queue[n], d = s - h.start, u = d >= this.animationTime, p = u ? 1 : d / this.animationTime, b = this._pulse(p), C = h.x * b - h.lastX >> 0, k = h.y * b - h.lastY >> 0;
|
|
2912
|
+
e += C, a += k, h.lastX += C, h.lastY += k, u && this.queue.splice(n, 1);
|
|
2913
2913
|
}
|
|
2914
2914
|
if (t === document.scrollingElement || t === document.documentElement || t === document.body ? window.scrollBy(e, a) : (e && (t.scrollLeft += e), a && (t.scrollTop += a)), this.queue.length > 0)
|
|
2915
2915
|
requestAnimationFrame(i);
|
|
@@ -2934,17 +2934,551 @@ class Ci {
|
|
|
2934
2934
|
return t >= 1 ? 1 : t <= 0 ? 0 : this._pulseRaw(t) * this.pulseNormalize;
|
|
2935
2935
|
}
|
|
2936
2936
|
}
|
|
2937
|
-
class
|
|
2937
|
+
class Li {
|
|
2938
|
+
constructor(t = {}) {
|
|
2939
|
+
this.config = {
|
|
2940
|
+
plugins: {},
|
|
2941
|
+
// Plugin registry
|
|
2942
|
+
autoLoad: !0,
|
|
2943
|
+
pluginBaseUrl: "",
|
|
2944
|
+
allowExternalPlugins: !0,
|
|
2945
|
+
// Simple on/off for external plugins
|
|
2946
|
+
trustedDomains: [],
|
|
2947
|
+
// Optional: whitelist specific domains
|
|
2948
|
+
...t
|
|
2949
|
+
}, this.plugins = /* @__PURE__ */ new Map(), this.loadedStyles = /* @__PURE__ */ new Set(), this.components = /* @__PURE__ */ new Map(), this.externalPlugins = /* @__PURE__ */ new Map();
|
|
2950
|
+
}
|
|
2951
|
+
/**
|
|
2952
|
+
* Auto-detect and load plugins based on DOM elements
|
|
2953
|
+
*/
|
|
2954
|
+
async autoLoadPlugins() {
|
|
2955
|
+
const i = this.detectComponentTypes().filter(
|
|
2956
|
+
(s) => this.config.plugins[s] && !this.plugins.has(s)
|
|
2957
|
+
);
|
|
2958
|
+
return i.length > 0 && await Promise.all(
|
|
2959
|
+
i.map((s) => this.loadPlugin(s))
|
|
2960
|
+
), i;
|
|
2961
|
+
}
|
|
2962
|
+
/**
|
|
2963
|
+
* Detect all component types used in the page
|
|
2964
|
+
*/
|
|
2965
|
+
detectComponentTypes() {
|
|
2966
|
+
const t = /* @__PURE__ */ new Set();
|
|
2967
|
+
return document.querySelectorAll("[data-cb-type]").forEach((i) => {
|
|
2968
|
+
t.add(i.dataset.cbType);
|
|
2969
|
+
}), document.querySelectorAll('[class*="cb-"]').forEach((i) => {
|
|
2970
|
+
i.classList.forEach((s) => {
|
|
2971
|
+
if (s.startsWith("cb-")) {
|
|
2972
|
+
const e = s.replace("cb-", "");
|
|
2973
|
+
t.add(e);
|
|
2974
|
+
}
|
|
2975
|
+
});
|
|
2976
|
+
}), Array.from(t);
|
|
2977
|
+
}
|
|
2978
|
+
/**
|
|
2979
|
+
* Load a plugin dynamically
|
|
2980
|
+
*/
|
|
2981
|
+
async loadPlugin(t) {
|
|
2982
|
+
if (this.plugins.has(t))
|
|
2983
|
+
return this.plugins.get(t);
|
|
2984
|
+
const i = this.config.plugins[t];
|
|
2985
|
+
if (!i)
|
|
2986
|
+
return console.warn(`[PluginManager] Plugin "${t}" not found in registry`), null;
|
|
2987
|
+
try {
|
|
2988
|
+
i.css && this.loadCSS(this.resolveUrl(i.css));
|
|
2989
|
+
const s = this.resolveUrl(i.url), e = await this.importModule(s), a = e.default || e;
|
|
2990
|
+
return this.plugins.set(t, a), typeof a.init == "function" && await a.init(this), this.emit("plugin-loaded", { name: t, plugin: a }), a;
|
|
2991
|
+
} catch (s) {
|
|
2992
|
+
return console.error(`[PluginManager] Failed to load plugin "${t}":`, s), null;
|
|
2993
|
+
}
|
|
2994
|
+
}
|
|
2995
|
+
/**
|
|
2996
|
+
* Dynamically import ES module
|
|
2997
|
+
*/
|
|
2998
|
+
async importModule(t) {
|
|
2999
|
+
return import(
|
|
3000
|
+
/* @vite-ignore */
|
|
3001
|
+
t
|
|
3002
|
+
);
|
|
3003
|
+
}
|
|
3004
|
+
/**
|
|
3005
|
+
* Load CSS file
|
|
3006
|
+
*/
|
|
3007
|
+
loadCSS(t) {
|
|
3008
|
+
if (this.loadedStyles.has(t)) return;
|
|
3009
|
+
const i = document.createElement("link");
|
|
3010
|
+
i.rel = "stylesheet", i.href = t, i.onload = () => {
|
|
3011
|
+
this.emit("css-loaded", { url: t });
|
|
3012
|
+
}, i.onerror = () => {
|
|
3013
|
+
console.error(`[PluginManager] Failed to load CSS: ${t}`);
|
|
3014
|
+
}, document.head.appendChild(i), this.loadedStyles.add(t);
|
|
3015
|
+
}
|
|
3016
|
+
/**
|
|
3017
|
+
* Resolve URL (handle relative paths)
|
|
3018
|
+
*/
|
|
3019
|
+
resolveUrl(t) {
|
|
3020
|
+
return t.startsWith("http://") || t.startsWith("https://") || t.startsWith("//") ? t : this.config.pluginBaseUrl + t;
|
|
3021
|
+
}
|
|
3022
|
+
/**
|
|
3023
|
+
* Initialize all components in the page
|
|
3024
|
+
*/
|
|
3025
|
+
initializeComponents() {
|
|
3026
|
+
return document.querySelectorAll("[data-cb-type]").forEach((i) => {
|
|
3027
|
+
const s = i.dataset.cbType, e = this.plugins.get(s);
|
|
3028
|
+
if (e && typeof e.mount == "function")
|
|
3029
|
+
try {
|
|
3030
|
+
const a = this.parseOptions(i);
|
|
3031
|
+
i.hasAttribute("data-cb-original-content") || i.setAttribute("data-cb-original-content", i.innerHTML);
|
|
3032
|
+
const r = e.mount(i, a);
|
|
3033
|
+
this.components.set(i, r), i.setAttribute("data-cb-loaded", "true");
|
|
3034
|
+
} catch (a) {
|
|
3035
|
+
console.error(`[PluginManager] Failed to mount component "${s}":`, a);
|
|
3036
|
+
}
|
|
3037
|
+
}), this.components.size;
|
|
3038
|
+
}
|
|
3039
|
+
/**
|
|
3040
|
+
* Parse component options from data attributes
|
|
3041
|
+
*/
|
|
3042
|
+
parseOptions(t) {
|
|
3043
|
+
const i = {};
|
|
3044
|
+
return Array.from(t.attributes).forEach((s) => {
|
|
3045
|
+
if (s.name.startsWith("data-cb-")) {
|
|
3046
|
+
const e = s.name.replace("data-cb-", "").replace(/-([a-z])/g, (a, r) => r.toUpperCase());
|
|
3047
|
+
i[e] = this.parseValue(s.value);
|
|
3048
|
+
}
|
|
3049
|
+
}), i;
|
|
3050
|
+
}
|
|
3051
|
+
/**
|
|
3052
|
+
* Parse string value to appropriate type
|
|
3053
|
+
*/
|
|
3054
|
+
parseValue(t) {
|
|
3055
|
+
if (t === "true") return !0;
|
|
3056
|
+
if (t === "false") return !1;
|
|
3057
|
+
if (!isNaN(t) && t !== "") return Number(t);
|
|
3058
|
+
try {
|
|
3059
|
+
return JSON.parse(t);
|
|
3060
|
+
} catch {
|
|
3061
|
+
return t;
|
|
3062
|
+
}
|
|
3063
|
+
}
|
|
3064
|
+
/**
|
|
3065
|
+
* Manually load a plugin (if not auto-loaded)
|
|
3066
|
+
*/
|
|
3067
|
+
async use(t) {
|
|
3068
|
+
return await this.loadPlugin(t);
|
|
3069
|
+
}
|
|
3070
|
+
/**
|
|
3071
|
+
* Get a loaded plugin by name
|
|
3072
|
+
*/
|
|
3073
|
+
getPlugin(t) {
|
|
3074
|
+
return this.plugins.get(t);
|
|
3075
|
+
}
|
|
3076
|
+
/**
|
|
3077
|
+
* Get all loaded plugins
|
|
3078
|
+
*/
|
|
3079
|
+
getAllPlugins() {
|
|
3080
|
+
return Array.from(this.plugins.entries());
|
|
3081
|
+
}
|
|
3082
|
+
/**
|
|
3083
|
+
* Check if a plugin is loaded
|
|
3084
|
+
*/
|
|
3085
|
+
hasPlugin(t) {
|
|
3086
|
+
return this.plugins.has(t);
|
|
3087
|
+
}
|
|
3088
|
+
/**
|
|
3089
|
+
* Get component instance for an element
|
|
3090
|
+
*/
|
|
3091
|
+
getComponent(t) {
|
|
3092
|
+
return this.components.get(t);
|
|
3093
|
+
}
|
|
3094
|
+
/**
|
|
3095
|
+
* Reinitialize components in a specific container
|
|
3096
|
+
* Useful when content is dynamically updated
|
|
3097
|
+
* @param {HTMLElement} container - Container element (defaults to document)
|
|
3098
|
+
*/
|
|
3099
|
+
/*
|
|
3100
|
+
async reinitialize(container = document) {
|
|
3101
|
+
console.log('[PluginManager] Reinitializing components in container');
|
|
3102
|
+
|
|
3103
|
+
// Step 1: Destroy existing components in this container
|
|
3104
|
+
const elementsToDestroy = [];
|
|
3105
|
+
this.components.forEach((instance, element) => {
|
|
3106
|
+
if (container === document || container.contains(element)) {
|
|
3107
|
+
elementsToDestroy.push({ element, instance });
|
|
3108
|
+
}
|
|
3109
|
+
});
|
|
3110
|
+
|
|
3111
|
+
elementsToDestroy.forEach(({ element, instance }) => {
|
|
3112
|
+
const type = element.dataset.cbType;
|
|
3113
|
+
const plugin = this.plugins.get(type);
|
|
3114
|
+
|
|
3115
|
+
if (plugin && typeof plugin.unmount === 'function') {
|
|
3116
|
+
plugin.unmount(element, instance);
|
|
3117
|
+
}
|
|
3118
|
+
|
|
3119
|
+
this.components.delete(element);
|
|
3120
|
+
});
|
|
3121
|
+
|
|
3122
|
+
console.log(`[PluginManager] Destroyed ${elementsToDestroy.length} components`);
|
|
3123
|
+
|
|
3124
|
+
// Step 2: Detect new component types in container
|
|
3125
|
+
const componentTypes = this.detectComponentTypesInContainer(container);
|
|
3126
|
+
|
|
3127
|
+
// Step 3: Load any new plugins that aren't loaded yet
|
|
3128
|
+
const pluginsToLoad = componentTypes.filter(type =>
|
|
3129
|
+
this.config.plugins[type] && !this.plugins.has(type)
|
|
3130
|
+
);
|
|
3131
|
+
|
|
3132
|
+
if (pluginsToLoad.length > 0) {
|
|
3133
|
+
await Promise.all(
|
|
3134
|
+
pluginsToLoad.map(type => this.loadPlugin(type))
|
|
3135
|
+
);
|
|
3136
|
+
}
|
|
3137
|
+
|
|
3138
|
+
// Step 4: Initialize all components in container
|
|
3139
|
+
const newElements = container.querySelectorAll('[data-cb-type]');
|
|
3140
|
+
let mountedCount = 0;
|
|
3141
|
+
|
|
3142
|
+
newElements.forEach(el => {
|
|
3143
|
+
const type = el.dataset.cbType;
|
|
3144
|
+
const plugin = this.plugins.get(type);
|
|
3145
|
+
|
|
3146
|
+
if (plugin && typeof plugin.mount === 'function') {
|
|
3147
|
+
try {
|
|
3148
|
+
const options = this.parseOptions(el);
|
|
3149
|
+
const instance = plugin.mount(el, options);
|
|
3150
|
+
this.components.set(el, instance);
|
|
3151
|
+
mountedCount++;
|
|
3152
|
+
} catch (error) {
|
|
3153
|
+
console.error(`[PluginManager] Failed to mount component "${type}":`, error);
|
|
3154
|
+
}
|
|
3155
|
+
}
|
|
3156
|
+
});
|
|
3157
|
+
|
|
3158
|
+
console.log(`[PluginManager] Mounted ${mountedCount} new components`);
|
|
3159
|
+
this.emit('reinitialized', { container, count: mountedCount });
|
|
3160
|
+
|
|
3161
|
+
return mountedCount;
|
|
3162
|
+
}
|
|
3163
|
+
*/
|
|
3164
|
+
async reinitialize(t = document) {
|
|
3165
|
+
if (this.reinitializeInProgress)
|
|
3166
|
+
return clearTimeout(this.pendingReinitialize), new Promise((i) => {
|
|
3167
|
+
this.pendingReinitialize = setTimeout(async () => {
|
|
3168
|
+
this.pendingReinitialize = null;
|
|
3169
|
+
const s = await this.reinitialize(t);
|
|
3170
|
+
i(s);
|
|
3171
|
+
}, 100);
|
|
3172
|
+
});
|
|
3173
|
+
this.reinitializeInProgress = !0;
|
|
3174
|
+
try {
|
|
3175
|
+
const i = [];
|
|
3176
|
+
this.components.forEach((n, h) => {
|
|
3177
|
+
(t === document || t.contains(h)) && i.push({ element: h, instance: n });
|
|
3178
|
+
}), i.forEach(({ element: n, instance: h }) => {
|
|
3179
|
+
const d = n.dataset.cbType, u = this.plugins.get(d);
|
|
3180
|
+
u && typeof u.unmount == "function" && u.unmount(n, h), this.components.delete(n);
|
|
3181
|
+
});
|
|
3182
|
+
const e = this.detectComponentTypesInContainer(t).filter(
|
|
3183
|
+
(n) => this.config.plugins[n] && !this.plugins.has(n)
|
|
3184
|
+
);
|
|
3185
|
+
e.length > 0 && await Promise.all(
|
|
3186
|
+
e.map((n) => this.loadPlugin(n))
|
|
3187
|
+
);
|
|
3188
|
+
const a = t.querySelectorAll("[data-cb-type]");
|
|
3189
|
+
let r = 0;
|
|
3190
|
+
for (const n of a) {
|
|
3191
|
+
const h = n.dataset.cbType, d = this.plugins.get(h);
|
|
3192
|
+
if (d && typeof d.mount == "function")
|
|
3193
|
+
try {
|
|
3194
|
+
const u = this.parseOptions(n);
|
|
3195
|
+
n.hasAttribute("data-cb-original-content") ? n.innerHTML = n.getAttribute("data-cb-original-content") : n.setAttribute("data-cb-original-content", n.innerHTML);
|
|
3196
|
+
const p = await d.mount(n, u);
|
|
3197
|
+
this.components.set(n, p), n.setAttribute("data-cb-loaded", "true"), r++;
|
|
3198
|
+
} catch (u) {
|
|
3199
|
+
console.error(`[PluginManager] Failed to mount component "${h}":`, u);
|
|
3200
|
+
}
|
|
3201
|
+
}
|
|
3202
|
+
return this.emit("reinitialized", { container: t, count: r }), r;
|
|
3203
|
+
} finally {
|
|
3204
|
+
this.reinitializeInProgress = !1;
|
|
3205
|
+
}
|
|
3206
|
+
}
|
|
3207
|
+
/**
|
|
3208
|
+
* Detect component types within a specific container
|
|
3209
|
+
* @param {HTMLElement} container
|
|
3210
|
+
*/
|
|
3211
|
+
detectComponentTypesInContainer(t) {
|
|
3212
|
+
const i = /* @__PURE__ */ new Set();
|
|
3213
|
+
return t.querySelectorAll("[data-cb-type]").forEach((e) => {
|
|
3214
|
+
i.add(e.dataset.cbType);
|
|
3215
|
+
}), Array.from(i);
|
|
3216
|
+
}
|
|
3217
|
+
/**
|
|
3218
|
+
* Register and load plugin from external URL
|
|
3219
|
+
* @param {string} pluginId - Unique identifier for the plugin
|
|
3220
|
+
* @param {object} config - Plugin configuration
|
|
3221
|
+
* @param {string} config.url - JavaScript module URL
|
|
3222
|
+
* @param {string} config.css - CSS file URL (optional)
|
|
3223
|
+
*/
|
|
3224
|
+
async loadExternalPlugin(t, i) {
|
|
3225
|
+
if (!t || typeof t != "string")
|
|
3226
|
+
throw new Error("Plugin ID is required and must be a string");
|
|
3227
|
+
if (!i.url)
|
|
3228
|
+
throw new Error("Plugin URL is required");
|
|
3229
|
+
if (this.plugins.has(t))
|
|
3230
|
+
return console.warn(`[PluginManager] Plugin "${t}" is already loaded`), this.plugins.get(t);
|
|
3231
|
+
const s = this.validatePluginSource(i.url);
|
|
3232
|
+
if (!s.allowed)
|
|
3233
|
+
throw new Error(`Security: ${s.reason}`);
|
|
3234
|
+
s.warning && (console.warn(`[PluginManager] ${s.warning}`), this.emit("plugin-security-warning", {
|
|
3235
|
+
pluginId: t,
|
|
3236
|
+
url: i.url,
|
|
3237
|
+
warning: s.warning
|
|
3238
|
+
}));
|
|
3239
|
+
try {
|
|
3240
|
+
this.config.plugins[t] = {
|
|
3241
|
+
url: i.url,
|
|
3242
|
+
css: i.css || null,
|
|
3243
|
+
source: "external",
|
|
3244
|
+
loadedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
3245
|
+
}, this.externalPlugins.set(t, this.config.plugins[t]);
|
|
3246
|
+
const e = await this.loadPlugin(t);
|
|
3247
|
+
return this.emit("external-plugin-loaded", {
|
|
3248
|
+
pluginId: t,
|
|
3249
|
+
url: i.url
|
|
3250
|
+
}), e;
|
|
3251
|
+
} catch (e) {
|
|
3252
|
+
throw delete this.config.plugins[t], this.externalPlugins.delete(t), console.error(`[PluginManager] Failed to load external plugin "${t}":`, e), e;
|
|
3253
|
+
}
|
|
3254
|
+
}
|
|
3255
|
+
/**
|
|
3256
|
+
* Validate plugin source URL
|
|
3257
|
+
* @param {string} url - Plugin URL to validate
|
|
3258
|
+
* @returns {object} Validation result
|
|
3259
|
+
*/
|
|
3260
|
+
validatePluginSource(t) {
|
|
3261
|
+
const i = t.includes("localhost") || t.includes("127.0.0.1");
|
|
3262
|
+
if (!t.startsWith("https://") && !i)
|
|
3263
|
+
return {
|
|
3264
|
+
allowed: !1,
|
|
3265
|
+
reason: "Only HTTPS URLs are allowed (except localhost for development)"
|
|
3266
|
+
};
|
|
3267
|
+
if (!this.config.allowExternalPlugins)
|
|
3268
|
+
return {
|
|
3269
|
+
allowed: !1,
|
|
3270
|
+
reason: "External plugins are disabled. Enable allowExternalPlugins in configuration."
|
|
3271
|
+
};
|
|
3272
|
+
if (this.config.trustedDomains.length > 0) {
|
|
3273
|
+
const e = new URL(t).hostname;
|
|
3274
|
+
if (!this.config.trustedDomains.some((r) => {
|
|
3275
|
+
if (r.startsWith("*.")) {
|
|
3276
|
+
const n = r.slice(2);
|
|
3277
|
+
return e === n || e.endsWith("." + n);
|
|
3278
|
+
}
|
|
3279
|
+
return e === r;
|
|
3280
|
+
}))
|
|
3281
|
+
return {
|
|
3282
|
+
allowed: !0,
|
|
3283
|
+
warning: `Loading plugin from external domain: ${e}. Only add plugins from sources you trust.`
|
|
3284
|
+
};
|
|
3285
|
+
} else
|
|
3286
|
+
return {
|
|
3287
|
+
allowed: !0,
|
|
3288
|
+
warning: `Loading external plugin from: ${new URL(t).hostname}. This plugin will have full access to your page.`
|
|
3289
|
+
};
|
|
3290
|
+
return { allowed: !0 };
|
|
3291
|
+
}
|
|
3292
|
+
/**
|
|
3293
|
+
* Batch load external plugins
|
|
3294
|
+
* Useful for loading user's saved plugins on page init
|
|
3295
|
+
* @param {object} pluginsConfig - Object with pluginId as key and config as value
|
|
3296
|
+
*/
|
|
3297
|
+
async loadExternalPlugins(t) {
|
|
3298
|
+
const i = [];
|
|
3299
|
+
for (const [s, e] of Object.entries(t))
|
|
3300
|
+
try {
|
|
3301
|
+
const a = await this.loadExternalPlugin(s, e);
|
|
3302
|
+
i.push({ pluginId: s, success: !0, plugin: a });
|
|
3303
|
+
} catch (a) {
|
|
3304
|
+
i.push({ pluginId: s, success: !1, error: a.message }), console.error(`[PluginManager] Failed to load external plugin "${s}":`, a);
|
|
3305
|
+
}
|
|
3306
|
+
return i;
|
|
3307
|
+
}
|
|
3308
|
+
/**
|
|
3309
|
+
* Remove/unregister an external plugin
|
|
3310
|
+
* @param {string} pluginId - Plugin to remove
|
|
3311
|
+
*/
|
|
3312
|
+
unregisterPlugin(t) {
|
|
3313
|
+
if (!this.externalPlugins.has(t))
|
|
3314
|
+
return console.warn(`[PluginManager] Plugin "${t}" is not an external plugin`), !1;
|
|
3315
|
+
const i = this.plugins.get(t), s = [];
|
|
3316
|
+
return this.components.forEach((e, a) => {
|
|
3317
|
+
a.dataset.cbType === t && s.push({ element: a, instance: e });
|
|
3318
|
+
}), s.forEach(({ element: e, instance: a }) => {
|
|
3319
|
+
i && typeof i.unmount == "function" && i.unmount(e, a), this.components.delete(e);
|
|
3320
|
+
}), i && typeof i.destroy == "function" && i.destroy(this), this.plugins.delete(t), this.externalPlugins.delete(t), delete this.config.plugins[t], this.emit("plugin-unregistered", { pluginId: t }), !0;
|
|
3321
|
+
}
|
|
3322
|
+
/**
|
|
3323
|
+
* Get list of all external (user-added) plugins
|
|
3324
|
+
*/
|
|
3325
|
+
getExternalPlugins() {
|
|
3326
|
+
return Array.from(this.externalPlugins.entries()).map(([t, i]) => ({
|
|
3327
|
+
id: t,
|
|
3328
|
+
...i
|
|
3329
|
+
}));
|
|
3330
|
+
}
|
|
3331
|
+
/**
|
|
3332
|
+
* Check if a plugin is external (user-added)
|
|
3333
|
+
*/
|
|
3334
|
+
isExternalPlugin(t) {
|
|
3335
|
+
return this.externalPlugins.has(t);
|
|
3336
|
+
}
|
|
3337
|
+
/**
|
|
3338
|
+
* Destroy all components and plugins
|
|
3339
|
+
*/
|
|
3340
|
+
destroy() {
|
|
3341
|
+
this.components.forEach((t, i) => {
|
|
3342
|
+
const s = i.dataset.cbType, e = this.plugins.get(s);
|
|
3343
|
+
e && typeof e.unmount == "function" && e.unmount(i, t);
|
|
3344
|
+
}), this.plugins.forEach((t, i) => {
|
|
3345
|
+
typeof t.destroy == "function" && t.destroy(this);
|
|
3346
|
+
}), this.components.clear(), this.plugins.clear();
|
|
3347
|
+
}
|
|
3348
|
+
/**
|
|
3349
|
+
* Event emitter (delegate to runtime if available)
|
|
3350
|
+
*/
|
|
3351
|
+
emit(t, i) {
|
|
3352
|
+
if (this.runtime && typeof this.runtime.emit == "function")
|
|
3353
|
+
this.runtime.emit(t, i);
|
|
3354
|
+
else {
|
|
3355
|
+
const s = new CustomEvent(`contentbox:${t}`, { detail: i });
|
|
3356
|
+
document.dispatchEvent(s);
|
|
3357
|
+
}
|
|
3358
|
+
}
|
|
3359
|
+
/**
|
|
3360
|
+
* Set runtime reference (for event delegation)
|
|
3361
|
+
*/
|
|
3362
|
+
setRuntime(t) {
|
|
3363
|
+
this.runtime = t;
|
|
3364
|
+
}
|
|
3365
|
+
}
|
|
3366
|
+
class Yi {
|
|
2938
3367
|
constructor(t = {}) {
|
|
2939
3368
|
const i = {
|
|
2940
3369
|
skin: "light",
|
|
2941
|
-
smoothScroll: !0
|
|
3370
|
+
smoothScroll: !0,
|
|
3371
|
+
plugins: {},
|
|
3372
|
+
// Plugin registry: { 'plugin-name': { url: '...', css: '...' } }
|
|
3373
|
+
autoLoadPlugins: !0,
|
|
3374
|
+
// Auto-load plugins based on detected components
|
|
3375
|
+
pluginBaseUrl: "",
|
|
3376
|
+
// Base URL for plugins if using relative paths
|
|
3377
|
+
allowExternalPlugins: !0,
|
|
3378
|
+
// Simple on/off for external plugins
|
|
3379
|
+
trustedDomains: []
|
|
3380
|
+
// Optional: whitelist specific domains
|
|
2942
3381
|
};
|
|
2943
|
-
this.settings =
|
|
3382
|
+
this.settings = { ...i, ...t }, this.initialized = !1, this.pluginManager = new Li({
|
|
3383
|
+
plugins: this.settings.plugins,
|
|
3384
|
+
autoLoad: this.settings.autoLoadPlugins,
|
|
3385
|
+
pluginBaseUrl: this.settings.pluginBaseUrl,
|
|
3386
|
+
allowExternalPlugins: this.settings.allowExternalPlugins,
|
|
3387
|
+
trustedDomains: this.settings.trustedDomains
|
|
3388
|
+
}), this.pluginManager.setRuntime(this), window.pageReRender = () => {
|
|
2944
3389
|
this.pageReRender();
|
|
2945
3390
|
};
|
|
2946
3391
|
}
|
|
2947
|
-
|
|
3392
|
+
/**
|
|
3393
|
+
* Plugin management delegation methods
|
|
3394
|
+
*/
|
|
3395
|
+
/**
|
|
3396
|
+
* Manually load a plugin
|
|
3397
|
+
*/
|
|
3398
|
+
async use(t) {
|
|
3399
|
+
return await this.pluginManager.use(t);
|
|
3400
|
+
}
|
|
3401
|
+
/**
|
|
3402
|
+
* Get a loaded plugin
|
|
3403
|
+
*/
|
|
3404
|
+
getPlugin(t) {
|
|
3405
|
+
return this.pluginManager.getPlugin(t);
|
|
3406
|
+
}
|
|
3407
|
+
/**
|
|
3408
|
+
* Get all loaded plugins
|
|
3409
|
+
*/
|
|
3410
|
+
getPlugins() {
|
|
3411
|
+
return this.pluginManager.getAllPlugins();
|
|
3412
|
+
}
|
|
3413
|
+
/**
|
|
3414
|
+
* Check if plugin is loaded
|
|
3415
|
+
*/
|
|
3416
|
+
hasPlugin(t) {
|
|
3417
|
+
return this.pluginManager.hasPlugin(t);
|
|
3418
|
+
}
|
|
3419
|
+
/**
|
|
3420
|
+
* Get component instance for an element
|
|
3421
|
+
*/
|
|
3422
|
+
getComponent(t) {
|
|
3423
|
+
return this.pluginManager.getComponent(t);
|
|
3424
|
+
}
|
|
3425
|
+
/**
|
|
3426
|
+
* Get all component instances
|
|
3427
|
+
*/
|
|
3428
|
+
getComponents() {
|
|
3429
|
+
return this.pluginManager.components;
|
|
3430
|
+
}
|
|
3431
|
+
/**
|
|
3432
|
+
* Reinitialize components (after content update)
|
|
3433
|
+
* @param {HTMLElement} container - Container to reinitialize (optional, defaults to document)
|
|
3434
|
+
*/
|
|
3435
|
+
async reinitialize(t) {
|
|
3436
|
+
return await this.pluginManager.reinitialize(t);
|
|
3437
|
+
}
|
|
3438
|
+
/**
|
|
3439
|
+
* Register and load plugin from external URL
|
|
3440
|
+
*/
|
|
3441
|
+
async loadExternalPlugin(t, i) {
|
|
3442
|
+
return await this.pluginManager.loadExternalPlugin(t, i);
|
|
3443
|
+
}
|
|
3444
|
+
/**
|
|
3445
|
+
* Batch load external plugins
|
|
3446
|
+
*/
|
|
3447
|
+
async loadExternalPlugins(t) {
|
|
3448
|
+
return await this.pluginManager.loadExternalPlugins(t);
|
|
3449
|
+
}
|
|
3450
|
+
/**
|
|
3451
|
+
* Remove/unregister an external plugin
|
|
3452
|
+
*/
|
|
3453
|
+
unregisterPlugin(t) {
|
|
3454
|
+
return this.pluginManager.unregisterPlugin(t);
|
|
3455
|
+
}
|
|
3456
|
+
/**
|
|
3457
|
+
* Simple event emitter
|
|
3458
|
+
*/
|
|
3459
|
+
emit(t, i) {
|
|
3460
|
+
const s = new CustomEvent(`contentbox:${t}`, { detail: i });
|
|
3461
|
+
document.dispatchEvent(s);
|
|
3462
|
+
}
|
|
3463
|
+
/**
|
|
3464
|
+
* Listen to events
|
|
3465
|
+
*/
|
|
3466
|
+
on(t, i) {
|
|
3467
|
+
document.addEventListener(`contentbox:${t}`, i);
|
|
3468
|
+
}
|
|
3469
|
+
/**
|
|
3470
|
+
* Remove event listener
|
|
3471
|
+
*/
|
|
3472
|
+
off(t, i) {
|
|
3473
|
+
document.removeEventListener(`contentbox:${t}`, i);
|
|
3474
|
+
}
|
|
3475
|
+
async init() {
|
|
3476
|
+
this.initialized || (this.initCore(), this.initPlugins(), this.initialized = !0, this.emit("init"));
|
|
3477
|
+
}
|
|
3478
|
+
async initPlugins() {
|
|
3479
|
+
this.settings.autoLoadPlugins && await this.pluginManager.autoLoadPlugins(), this.pluginManager.initializeComponents();
|
|
3480
|
+
}
|
|
3481
|
+
initCore() {
|
|
2948
3482
|
this.prepareContent(), this.updateOnResize(), this.blockInit(), this.initeSkrollrr(), this.contentBoxOnRenderUpdate(), this.functionLightboxInit(), this.inViewSetup(), setTimeout(() => {
|
|
2949
3483
|
Je.init({
|
|
2950
3484
|
duration: 1200
|
|
@@ -2972,17 +3506,17 @@ class Vi {
|
|
|
2972
3506
|
let d = n.getAttribute("href");
|
|
2973
3507
|
if (d && d.indexOf("#") === 0)
|
|
2974
3508
|
if (d.indexOf("#section") === 0) {
|
|
2975
|
-
let
|
|
2976
|
-
if (!isNaN(parseInt(
|
|
3509
|
+
let u = d.replace("#section", "");
|
|
3510
|
+
if (!isNaN(parseInt(u))) {
|
|
2977
3511
|
let p = document.querySelectorAll(".is-section"), b, C = 0;
|
|
2978
|
-
p.forEach(function(
|
|
2979
|
-
|
|
3512
|
+
p.forEach(function(k) {
|
|
3513
|
+
k.classList.contains("is-section-navbar") || (C === u - 1 && (b = k), C++);
|
|
2980
3514
|
}), b && scrollIt(b, 1e3, "easeInQuad"), h.preventDefault();
|
|
2981
3515
|
}
|
|
2982
3516
|
} else
|
|
2983
3517
|
try {
|
|
2984
|
-
let
|
|
2985
|
-
|
|
3518
|
+
let u = document.querySelector(d);
|
|
3519
|
+
u && (scrollIt(u, 1e3, "easeInQuad"), h.preventDefault());
|
|
2986
3520
|
} catch {
|
|
2987
3521
|
}
|
|
2988
3522
|
});
|
|
@@ -3048,12 +3582,12 @@ class Vi {
|
|
|
3048
3582
|
let a;
|
|
3049
3583
|
e ? a = document.querySelectorAll(".is-wrapper .section-pin") : a = document.querySelectorAll(".is-wrapper:not(.is-edit) .section-pin"), a.length > 0 && window.scrollTo(0, 0), a.forEach(function(n) {
|
|
3050
3584
|
s <= 970 && n.querySelector(".is-box") && (n.querySelectorAll(".is-box").forEach((d) => {
|
|
3051
|
-
const
|
|
3585
|
+
const u = n.cloneNode(!1);
|
|
3052
3586
|
d.getAttributeNames().map((p) => {
|
|
3053
|
-
p.indexOf("data-") !== -1 &&
|
|
3054
|
-
}),
|
|
3055
|
-
(p.indexOf("is-box-") !== -1 || p.indexOf("is-content-") !== -1 || p.indexOf("box-autofit") !== -1 || p.indexOf("is-light-text") !== -1 || p.indexOf("is-dark-text") !== -1 || p.indexOf("is-align-") !== -1 || p.indexOf("type-") !== -1 || p.indexOf("block-click") !== -1 || p.indexOf("hover-zoom") !== -1) &&
|
|
3056
|
-
}),
|
|
3587
|
+
p.indexOf("data-") !== -1 && u.setAttribute(p, d.getAttribute(p));
|
|
3588
|
+
}), u.classList.add("is-box"), d.classList.forEach((p) => {
|
|
3589
|
+
(p.indexOf("is-box-") !== -1 || p.indexOf("is-content-") !== -1 || p.indexOf("box-autofit") !== -1 || p.indexOf("is-light-text") !== -1 || p.indexOf("is-dark-text") !== -1 || p.indexOf("is-align-") !== -1 || p.indexOf("type-") !== -1 || p.indexOf("block-click") !== -1 || p.indexOf("hover-zoom") !== -1) && u.classList.add(p);
|
|
3590
|
+
}), u.setAttribute("data-section-clone", ""), u.innerHTML = d.innerHTML, n.parentNode.insertBefore(u, n);
|
|
3057
3591
|
}), n.setAttribute("data-section-original", ""), n.style.display = "none");
|
|
3058
3592
|
}), e ? a = document.querySelectorAll(".is-wrapper .section-pin") : a = document.querySelectorAll(".is-wrapper:not(.is-edit) .section-pin"), a.forEach(function(n) {
|
|
3059
3593
|
if (n.parentNode.closest(".section-wrap") || s <= 970 && n.hasAttribute("data-section-original")) return;
|
|
@@ -3062,10 +3596,10 @@ class Vi {
|
|
|
3062
3596
|
});
|
|
3063
3597
|
const r = (n) => {
|
|
3064
3598
|
document.querySelectorAll(".is-section").forEach((d) => {
|
|
3065
|
-
const
|
|
3599
|
+
const u = d.getBoundingClientRect().top;
|
|
3066
3600
|
let p, b;
|
|
3067
|
-
d.parentNode.classList.contains("pin-wrap") ? (p = d.parentNode.nextElementSibling, b = d.parentNode.previousElementSibling) : (p = d.nextElementSibling, b = d.previousElementSibling), p && p.classList.contains("pin-wrap") && (p = p.querySelector(".is-section")), b && b.classList.contains("pin-wrap") && (b = b.querySelector(".is-section")),
|
|
3068
|
-
|
|
3601
|
+
d.parentNode.classList.contains("pin-wrap") ? (p = d.parentNode.nextElementSibling, b = d.parentNode.previousElementSibling) : (p = d.nextElementSibling, b = d.previousElementSibling), p && p.classList.contains("pin-wrap") && (p = p.querySelector(".is-section")), b && b.classList.contains("pin-wrap") && (b = b.querySelector(".is-section")), u <= 0 && ((d.classList.contains("no-spacing") || d.classList.contains("pin-overlap")) && d.classList.add("section-inview"), document.querySelectorAll(".is-section").forEach((k) => {
|
|
3602
|
+
k !== d && k.classList.remove("section-inview");
|
|
3069
3603
|
}));
|
|
3070
3604
|
});
|
|
3071
3605
|
};
|
|
@@ -3181,20 +3715,20 @@ class Vi {
|
|
|
3181
3715
|
});
|
|
3182
3716
|
}
|
|
3183
3717
|
refreshLightbox(t) {
|
|
3184
|
-
this.glightbox && this.glightbox.destroy(), this.glightbox = new
|
|
3718
|
+
this.glightbox && this.glightbox.destroy(), this.glightbox = new Re(t), window.GLightbox = Re.default;
|
|
3185
3719
|
}
|
|
3186
3720
|
openLightbox(t, i, s) {
|
|
3187
3721
|
let e = [], a = 0;
|
|
3188
3722
|
if (i) {
|
|
3189
3723
|
const n = i.closest("[data-gallery]");
|
|
3190
3724
|
let h = [];
|
|
3191
|
-
n ? h = n.querySelectorAll(".is-lightbox") : document.querySelectorAll(".is-lightbox,.block-click").forEach((
|
|
3192
|
-
|
|
3193
|
-
}), h.forEach((d,
|
|
3725
|
+
n ? h = n.querySelectorAll(".is-lightbox") : document.querySelectorAll(".is-lightbox,.block-click").forEach((u) => {
|
|
3726
|
+
u.closest("[data-gallery]") || h.push(u);
|
|
3727
|
+
}), h.forEach((d, u) => {
|
|
3194
3728
|
let p = d.getAttribute("href");
|
|
3195
3729
|
p || (p = d.getAttribute("data-modal-url")), e.push({
|
|
3196
3730
|
href: p
|
|
3197
|
-
}), t === p && (a =
|
|
3731
|
+
}), t === p && (a = u);
|
|
3198
3732
|
});
|
|
3199
3733
|
}
|
|
3200
3734
|
const r = document.activeElement;
|
|
@@ -3295,25 +3829,25 @@ class Vi {
|
|
|
3295
3829
|
n.push(b);
|
|
3296
3830
|
}
|
|
3297
3831
|
}
|
|
3298
|
-
n = [...new Set(n)], n.sort((d,
|
|
3832
|
+
n = [...new Set(n)], n.sort((d, u) => u - d);
|
|
3299
3833
|
for (let d = 0; d < n.length; d++) {
|
|
3300
|
-
const
|
|
3834
|
+
const u = n[d];
|
|
3301
3835
|
if (d === 0) {
|
|
3302
|
-
if (a >
|
|
3836
|
+
if (a > u) {
|
|
3303
3837
|
let p = r.getAttribute("data--h");
|
|
3304
3838
|
p ? r.style.height = p : r.style.height = "";
|
|
3305
3839
|
}
|
|
3306
3840
|
} else {
|
|
3307
3841
|
const p = n[d - 1];
|
|
3308
|
-
if (p >= a && a >
|
|
3842
|
+
if (p >= a && a > u) {
|
|
3309
3843
|
let b = r.getAttribute("data--h-" + p);
|
|
3310
3844
|
b && (r.style.height = b);
|
|
3311
3845
|
}
|
|
3312
3846
|
}
|
|
3313
3847
|
}
|
|
3314
3848
|
if (n.length > 0 && n[n.length - 1] >= a) {
|
|
3315
|
-
const
|
|
3316
|
-
let p = r.getAttribute("data--h-" +
|
|
3849
|
+
const u = n[n.length - 1];
|
|
3850
|
+
let p = r.getAttribute("data--h-" + u);
|
|
3317
3851
|
p && (r.style.height = p);
|
|
3318
3852
|
}
|
|
3319
3853
|
}), document.querySelectorAll(".is-block").forEach((r) => {
|
|
@@ -3325,29 +3859,29 @@ class Vi {
|
|
|
3325
3859
|
let n = [];
|
|
3326
3860
|
const h = r.attributes;
|
|
3327
3861
|
for (let d = 0; d < h.length; d++) {
|
|
3328
|
-
const
|
|
3329
|
-
let p =
|
|
3862
|
+
const u = h[d].name;
|
|
3863
|
+
let p = u.match(/^data--t-(\d+)$/);
|
|
3330
3864
|
if (p) {
|
|
3331
3865
|
const b = parseInt(p[1], 10);
|
|
3332
3866
|
n.push(b);
|
|
3333
3867
|
}
|
|
3334
|
-
if (p =
|
|
3868
|
+
if (p = u.match(/^data--w-(\d+)$/), p) {
|
|
3335
3869
|
const b = parseInt(p[1], 10);
|
|
3336
3870
|
n.push(b);
|
|
3337
3871
|
}
|
|
3338
|
-
if (p =
|
|
3872
|
+
if (p = u.match(/^data--transform-(\d+)$/), p) {
|
|
3339
3873
|
const b = parseInt(p[1], 10);
|
|
3340
3874
|
n.push(b);
|
|
3341
3875
|
}
|
|
3342
3876
|
}
|
|
3343
|
-
n = [...new Set(n)], n.sort((d,
|
|
3877
|
+
n = [...new Set(n)], n.sort((d, u) => u - d);
|
|
3344
3878
|
for (let d = 0; d < n.length; d++) {
|
|
3345
|
-
const
|
|
3879
|
+
const u = n[d];
|
|
3346
3880
|
if (d === 0)
|
|
3347
|
-
a >
|
|
3881
|
+
a > u && t.apply(r, 1e4, e);
|
|
3348
3882
|
else {
|
|
3349
3883
|
const p = n[d - 1];
|
|
3350
|
-
p >= a && a >
|
|
3884
|
+
p >= a && a > u && t.apply(r, p, e);
|
|
3351
3885
|
}
|
|
3352
3886
|
}
|
|
3353
3887
|
if (n.length > 0) {
|
|
@@ -3375,9 +3909,9 @@ class Vi {
|
|
|
3375
3909
|
destroy() {
|
|
3376
3910
|
this.glightbox && (this.glightbox.destroy(), this.glightbox = null), document.querySelectorAll(".is-lightbox,.block-click").forEach((i) => {
|
|
3377
3911
|
i._lightboxHandler && (i.removeEventListener("click", i._lightboxHandler), delete i._lightboxHandler);
|
|
3378
|
-
});
|
|
3912
|
+
}), this.pluginManager.destroy(), this.initialized = !1, this.emit("destroy");
|
|
3379
3913
|
}
|
|
3380
3914
|
}
|
|
3381
3915
|
export {
|
|
3382
|
-
|
|
3916
|
+
Yi as default
|
|
3383
3917
|
};
|