@innovastudio/contentbox-interactive-runtime 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,7 +2,7 @@ var Oi = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
2
2
|
function gi(u) {
|
|
3
3
|
return u && u.__esModule && Object.prototype.hasOwnProperty.call(u, "default") ? u.default : u;
|
|
4
4
|
}
|
|
5
|
-
var
|
|
5
|
+
var Dt = { exports: {} }, ws = Dt.exports, Ai;
|
|
6
6
|
function xs() {
|
|
7
7
|
return Ai || (Ai = 1, (function(u, e) {
|
|
8
8
|
(function(t, s) {
|
|
@@ -12,38 +12,38 @@ function xs() {
|
|
|
12
12
|
return p.Date.now();
|
|
13
13
|
};
|
|
14
14
|
function x(O, j, z) {
|
|
15
|
-
var V, K, ve, be, X, we, ue = 0,
|
|
15
|
+
var V, K, ve, be, X, we, ue = 0, qe = !1, xe = !1, Le = !0;
|
|
16
16
|
if (typeof O != "function") throw new TypeError(s);
|
|
17
|
-
function
|
|
17
|
+
function Re(Z) {
|
|
18
18
|
var _e = V, Ie = K;
|
|
19
19
|
return V = K = void 0, ue = Z, be = O.apply(Ie, _e);
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function Ye(Z) {
|
|
22
22
|
var _e = Z - we;
|
|
23
23
|
return we === void 0 || _e >= j || _e < 0 || xe && Z - ue >= ve;
|
|
24
24
|
}
|
|
25
25
|
function He() {
|
|
26
26
|
var Z = b();
|
|
27
|
-
if (
|
|
27
|
+
if (Ye(Z)) return Ge(Z);
|
|
28
28
|
X = setTimeout(He, (function(_e) {
|
|
29
29
|
var Ie = j - (_e - we);
|
|
30
30
|
return xe ? S(Ie, ve - (_e - ue)) : Ie;
|
|
31
31
|
})(Z));
|
|
32
32
|
}
|
|
33
33
|
function Ge(Z) {
|
|
34
|
-
return X = void 0, Le && V ?
|
|
34
|
+
return X = void 0, Le && V ? Re(Z) : (V = K = void 0, be);
|
|
35
35
|
}
|
|
36
36
|
function Oe() {
|
|
37
|
-
var Z = b(), _e =
|
|
37
|
+
var Z = b(), _e = Ye(Z);
|
|
38
38
|
if (V = arguments, K = this, we = Z, _e) {
|
|
39
39
|
if (X === void 0) return (function(Ie) {
|
|
40
|
-
return ue = Ie, X = setTimeout(He, j),
|
|
40
|
+
return ue = Ie, X = setTimeout(He, j), qe ? Re(Ie) : be;
|
|
41
41
|
})(we);
|
|
42
|
-
if (xe) return X = setTimeout(He, j),
|
|
42
|
+
if (xe) return X = setTimeout(He, j), Re(we);
|
|
43
43
|
}
|
|
44
44
|
return X === void 0 && (X = setTimeout(He, j)), be;
|
|
45
45
|
}
|
|
46
|
-
return j = v(j) || 0, m(z) && (
|
|
46
|
+
return j = v(j) || 0, m(z) && (qe = !!z.leading, ve = (xe = "maxWait" in z) ? w(v(z.maxWait) || 0, j) : ve, Le = "trailing" in z ? !!z.trailing : Le), Oe.cancel = function() {
|
|
47
47
|
X !== void 0 && clearTimeout(X), ue = 0, V = we = K = X = void 0;
|
|
48
48
|
}, Oe.flush = function() {
|
|
49
49
|
return X === void 0 ? be : Ge(b());
|
|
@@ -73,8 +73,8 @@ function xs() {
|
|
|
73
73
|
var V = !0, K = !0;
|
|
74
74
|
if (typeof O != "function") throw new TypeError(s);
|
|
75
75
|
return m(z) && (V = "leading" in z ? !!z.leading : V, K = "trailing" in z ? !!z.trailing : K), x(O, j, { leading: V, maxWait: j, trailing: K });
|
|
76
|
-
}, f = "Expected a function", y = NaN, k = "[object Symbol]", C = /^\s+|\s+$/g, T = /^[-+]0x[0-9a-f]+$/i, A = /^0b[01]+$/i,
|
|
77
|
-
return
|
|
76
|
+
}, f = "Expected a function", y = NaN, k = "[object Symbol]", C = /^\s+|\s+$/g, T = /^[-+]0x[0-9a-f]+$/i, A = /^0b[01]+$/i, R = /^0o[0-7]+$/i, B = parseInt, P = typeof t == "object" && t && t.Object === Object && t, D = typeof self == "object" && self && self.Object === Object && self, M = P || D || Function("return this")(), q = Object.prototype.toString, I = Math.max, E = Math.min, $ = function() {
|
|
77
|
+
return M.Date.now();
|
|
78
78
|
};
|
|
79
79
|
function H(O) {
|
|
80
80
|
var j = typeof O;
|
|
@@ -85,7 +85,7 @@ function xs() {
|
|
|
85
85
|
if ((function(V) {
|
|
86
86
|
return typeof V == "symbol" || /* @__PURE__ */ (function(K) {
|
|
87
87
|
return !!K && typeof K == "object";
|
|
88
|
-
})(V) &&
|
|
88
|
+
})(V) && q.call(V) == k;
|
|
89
89
|
})(O)) return y;
|
|
90
90
|
if (H(O)) {
|
|
91
91
|
var j = typeof O.valueOf == "function" ? O.valueOf() : O;
|
|
@@ -94,46 +94,46 @@ function xs() {
|
|
|
94
94
|
if (typeof O != "string") return O === 0 ? O : +O;
|
|
95
95
|
O = O.replace(C, "");
|
|
96
96
|
var z = A.test(O);
|
|
97
|
-
return z ||
|
|
97
|
+
return z || R.test(O) ? B(O.slice(2), z ? 2 : 8) : T.test(O) ? y : +O;
|
|
98
98
|
}
|
|
99
99
|
var J = function(O, j, z) {
|
|
100
|
-
var V, K, ve, be, X, we, ue = 0,
|
|
100
|
+
var V, K, ve, be, X, we, ue = 0, qe = !1, xe = !1, Le = !0;
|
|
101
101
|
if (typeof O != "function") throw new TypeError(f);
|
|
102
|
-
function
|
|
102
|
+
function Re(Z) {
|
|
103
103
|
var _e = V, Ie = K;
|
|
104
104
|
return V = K = void 0, ue = Z, be = O.apply(Ie, _e);
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function Ye(Z) {
|
|
107
107
|
var _e = Z - we;
|
|
108
108
|
return we === void 0 || _e >= j || _e < 0 || xe && Z - ue >= ve;
|
|
109
109
|
}
|
|
110
110
|
function He() {
|
|
111
111
|
var Z = $();
|
|
112
|
-
if (
|
|
112
|
+
if (Ye(Z)) return Ge(Z);
|
|
113
113
|
X = setTimeout(He, (function(_e) {
|
|
114
114
|
var Ie = j - (_e - we);
|
|
115
115
|
return xe ? E(Ie, ve - (_e - ue)) : Ie;
|
|
116
116
|
})(Z));
|
|
117
117
|
}
|
|
118
118
|
function Ge(Z) {
|
|
119
|
-
return X = void 0, Le && V ?
|
|
119
|
+
return X = void 0, Le && V ? Re(Z) : (V = K = void 0, be);
|
|
120
120
|
}
|
|
121
121
|
function Oe() {
|
|
122
|
-
var Z = $(), _e =
|
|
122
|
+
var Z = $(), _e = Ye(Z);
|
|
123
123
|
if (V = arguments, K = this, we = Z, _e) {
|
|
124
124
|
if (X === void 0) return (function(Ie) {
|
|
125
|
-
return ue = Ie, X = setTimeout(He, j),
|
|
125
|
+
return ue = Ie, X = setTimeout(He, j), qe ? Re(Ie) : be;
|
|
126
126
|
})(we);
|
|
127
|
-
if (xe) return X = setTimeout(He, j),
|
|
127
|
+
if (xe) return X = setTimeout(He, j), Re(we);
|
|
128
128
|
}
|
|
129
129
|
return X === void 0 && (X = setTimeout(He, j)), be;
|
|
130
130
|
}
|
|
131
|
-
return j = U(j) || 0, H(z) && (
|
|
131
|
+
return j = U(j) || 0, H(z) && (qe = !!z.leading, ve = (xe = "maxWait" in z) ? I(U(z.maxWait) || 0, j) : ve, Le = "trailing" in z ? !!z.trailing : Le), Oe.cancel = function() {
|
|
132
132
|
X !== void 0 && clearTimeout(X), ue = 0, V = we = K = X = void 0;
|
|
133
133
|
}, Oe.flush = function() {
|
|
134
134
|
return X === void 0 ? be : Ge($());
|
|
135
135
|
}, Oe;
|
|
136
|
-
},
|
|
136
|
+
}, Y = function() {
|
|
137
137
|
};
|
|
138
138
|
function ee(O) {
|
|
139
139
|
O && O.forEach(function(j) {
|
|
@@ -143,7 +143,7 @@ function xs() {
|
|
|
143
143
|
for (be = 0; be < ve.length; be += 1)
|
|
144
144
|
if ((X = ve[be]).dataset && X.dataset.aos || X.children && K(X.children)) return !0;
|
|
145
145
|
return !1;
|
|
146
|
-
})(z.concat(V))) return
|
|
146
|
+
})(z.concat(V))) return Y();
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
149
|
function Q() {
|
|
@@ -153,7 +153,7 @@ function xs() {
|
|
|
153
153
|
return !!Q();
|
|
154
154
|
}, ready: function(O, j) {
|
|
155
155
|
var z = window.document, V = new (Q())(ee);
|
|
156
|
-
|
|
156
|
+
Y = j, V.observe(z.documentElement, { childList: !0, subtree: !0, removedNodes: !0 });
|
|
157
157
|
} }, Ee = function(O, j) {
|
|
158
158
|
if (!(O instanceof j)) throw new TypeError("Cannot call a class as a function");
|
|
159
159
|
}, me = /* @__PURE__ */ (function() {
|
|
@@ -198,14 +198,14 @@ function xs() {
|
|
|
198
198
|
return O.forEach(function(j, z) {
|
|
199
199
|
return (function(V, K) {
|
|
200
200
|
var ve = V.options, be = V.position, X = V.node, we = (V.data, function() {
|
|
201
|
-
V.animated && ((function(ue,
|
|
202
|
-
|
|
201
|
+
V.animated && ((function(ue, qe) {
|
|
202
|
+
qe && qe.forEach(function(xe) {
|
|
203
203
|
return ue.classList.remove(xe);
|
|
204
204
|
});
|
|
205
205
|
})(X, ve.animatedClassNames), fe("aos:out", X), V.options.id && fe("aos:in:" + V.options.id, X), V.animated = !1);
|
|
206
206
|
});
|
|
207
|
-
ve.mirror && K >= be.out && !ve.once ? we() : K >= be.in ? V.animated || ((function(ue,
|
|
208
|
-
|
|
207
|
+
ve.mirror && K >= be.out && !ve.once ? we() : K >= be.in ? V.animated || ((function(ue, qe) {
|
|
208
|
+
qe && qe.forEach(function(xe) {
|
|
209
209
|
return ue.classList.add(xe);
|
|
210
210
|
});
|
|
211
211
|
})(X, ve.animatedClassNames), fe("aos:in", X), V.options.id && fe("aos:in:" + V.options.id, X), V.animated = !0) : V.animated && !ve.once && we();
|
|
@@ -221,14 +221,14 @@ function xs() {
|
|
|
221
221
|
if (V === "false") return !1;
|
|
222
222
|
}
|
|
223
223
|
return V || z;
|
|
224
|
-
},
|
|
224
|
+
}, F = function(O, j) {
|
|
225
225
|
return O.forEach(function(z, V) {
|
|
226
226
|
var K = te(z.node, "mirror", j.mirror), ve = te(z.node, "once", j.once), be = te(z.node, "id"), X = j.useClassNames && z.node.getAttribute("data-aos"), we = [j.animatedClassName].concat(X ? X.split(" ") : []).filter(function(ue) {
|
|
227
227
|
return typeof ue == "string";
|
|
228
228
|
});
|
|
229
|
-
j.initClassName && z.node.classList.add(j.initClassName), z.position = { in: (function(ue,
|
|
230
|
-
var Le = window.innerHeight,
|
|
231
|
-
|
|
229
|
+
j.initClassName && z.node.classList.add(j.initClassName), z.position = { in: (function(ue, qe, xe) {
|
|
230
|
+
var Le = window.innerHeight, Re = te(ue, "anchor"), Ye = te(ue, "anchor-placement"), He = Number(te(ue, "offset", Ye ? 0 : qe)), Ge = Ye || xe, Oe = ue;
|
|
231
|
+
Re && document.querySelectorAll(Re) && (Oe = document.querySelectorAll(Re)[0]);
|
|
232
232
|
var Z = se(Oe).top - Le;
|
|
233
233
|
switch (Ge) {
|
|
234
234
|
case "top-bottom":
|
|
@@ -258,9 +258,9 @@ function xs() {
|
|
|
258
258
|
Z += Le + Oe.offsetHeight / 2;
|
|
259
259
|
}
|
|
260
260
|
return Z + He;
|
|
261
|
-
})(z.node, j.offset, j.anchorPlacement), out: K && (function(ue,
|
|
262
|
-
var xe = te(ue, "anchor"), Le = te(ue, "offset",
|
|
263
|
-
return xe && document.querySelectorAll(xe) && (
|
|
261
|
+
})(z.node, j.offset, j.anchorPlacement), out: K && (function(ue, qe) {
|
|
262
|
+
var xe = te(ue, "anchor"), Le = te(ue, "offset", qe), Re = ue;
|
|
263
|
+
return xe && document.querySelectorAll(xe) && (Re = document.querySelectorAll(xe)[0]), se(Re).top + Re.offsetHeight - Le;
|
|
264
264
|
})(z.node, j.offset) }, z.options = { once: ve, mirror: K, animatedClassNames: we, id: be };
|
|
265
265
|
}), O;
|
|
266
266
|
}, Se = function() {
|
|
@@ -268,20 +268,20 @@ function xs() {
|
|
|
268
268
|
return Array.prototype.map.call(O, function(j) {
|
|
269
269
|
return { node: j };
|
|
270
270
|
});
|
|
271
|
-
}, pe = [],
|
|
271
|
+
}, pe = [], Me = !1, ne = { 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 }, Pe = function() {
|
|
272
272
|
return document.all && !window.atob;
|
|
273
273
|
}, Ce = function() {
|
|
274
|
-
arguments.length > 0 && arguments[0] !== void 0 && arguments[0] && (
|
|
274
|
+
arguments.length > 0 && arguments[0] !== void 0 && arguments[0] && (Me = !0), Me && (pe = F(pe, ne), le(pe), window.addEventListener("scroll", _(function() {
|
|
275
275
|
le(pe, ne.once);
|
|
276
276
|
}, ne.throttleDelay)));
|
|
277
|
-
},
|
|
278
|
-
if (pe = Se(),
|
|
277
|
+
}, De = function() {
|
|
278
|
+
if (pe = Se(), Fe(ne.disable) || Pe()) return Ue();
|
|
279
279
|
Ce();
|
|
280
280
|
}, Ue = function() {
|
|
281
281
|
pe.forEach(function(O, j) {
|
|
282
282
|
O.node.removeAttribute("data-aos"), O.node.removeAttribute("data-aos-easing"), O.node.removeAttribute("data-aos-duration"), O.node.removeAttribute("data-aos-delay"), ne.initClassName && O.node.classList.remove(ne.initClassName), ne.animatedClassName && O.node.classList.remove(ne.animatedClassName);
|
|
283
283
|
});
|
|
284
|
-
},
|
|
284
|
+
}, Fe = function(O) {
|
|
285
285
|
return O === !0 || O === "mobile" && ce.mobile() || O === "phone" && ce.phone() || O === "tablet" && ce.tablet() || typeof O == "function" && O() === !0;
|
|
286
286
|
};
|
|
287
287
|
return { init: function(O) {
|
|
@@ -289,20 +289,20 @@ function xs() {
|
|
|
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
|
-
`), ne.disableMutationObserver = !0), ne.disableMutationObserver || he.ready("[data-aos]",
|
|
292
|
+
`), ne.disableMutationObserver = !0), ne.disableMutationObserver || he.ready("[data-aos]", De), Fe(ne.disable) || Pe() ? Ue() : (document.querySelector("body").setAttribute("data-aos-easing", ne.easing), document.querySelector("body").setAttribute("data-aos-duration", ne.duration), document.querySelector("body").setAttribute("data-aos-delay", ne.delay), ["DOMContentLoaded", "load"].indexOf(ne.startEvent) === -1 ? document.addEventListener(ne.startEvent, function() {
|
|
293
293
|
Ce(!0);
|
|
294
294
|
}) : window.addEventListener("load", function() {
|
|
295
295
|
Ce(!0);
|
|
296
296
|
}), ne.startEvent === "DOMContentLoaded" && ["complete", "interactive"].indexOf(document.readyState) > -1 && Ce(!0), window.addEventListener("resize", J(Ce, ne.debounceDelay, !0)), window.addEventListener("orientationchange", J(Ce, ne.debounceDelay, !0)), pe);
|
|
297
|
-
}, refresh: Ce, refreshHard:
|
|
297
|
+
}, refresh: Ce, refreshHard: De };
|
|
298
298
|
});
|
|
299
|
-
})(
|
|
299
|
+
})(Dt)), Dt.exports;
|
|
300
300
|
}
|
|
301
301
|
var _s = xs();
|
|
302
302
|
const ks = /* @__PURE__ */ gi(_s);
|
|
303
|
-
var ii = { exports: {} },
|
|
303
|
+
var ii = { exports: {} }, Mi;
|
|
304
304
|
function Ss() {
|
|
305
|
-
return
|
|
305
|
+
return Mi || (Mi = 1, (function(u) {
|
|
306
306
|
function e(c, d) {
|
|
307
307
|
if (!(c instanceof d)) throw new TypeError("Cannot call a class as a function");
|
|
308
308
|
}
|
|
@@ -436,8 +436,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
436
436
|
T[A.name] = A.getValue(y.frame);
|
|
437
437
|
}), y.elements.forEach(function(A) {
|
|
438
438
|
A.update(T, y.frame);
|
|
439
|
-
}), y.debug && y.debugData.frameLengths.push(Date.now() - y.debugData.frameStart), y.frame % 60 == 0 && y.debug && (C = Math.ceil(y.debugData.frameLengths.reduce(function(A,
|
|
440
|
-
return A +
|
|
439
|
+
}), y.debug && y.debugData.frameLengths.push(Date.now() - y.debugData.frameStart), y.frame % 60 == 0 && y.debug && (C = Math.ceil(y.debugData.frameLengths.reduce(function(A, R) {
|
|
440
|
+
return A + R;
|
|
441
441
|
}, 0) / 60), console.log("Average frame calculation time: ".concat(C, "ms")), y.debugData.frameLengths = []), y.frame++, window.requestAnimationFrame(y.onAnimationFrame);
|
|
442
442
|
}), t(this, "addDriver", function(k, C) {
|
|
443
443
|
var T = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : {};
|
|
@@ -456,8 +456,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
456
456
|
y.elements.push(new _(".lax", y, k, T, 0, {}));
|
|
457
457
|
});
|
|
458
458
|
}), t(this, "addElements", function(k, C, T) {
|
|
459
|
-
document.querySelectorAll(k).forEach(function(A,
|
|
460
|
-
y.elements.push(new _(k, y, A, C,
|
|
459
|
+
document.querySelectorAll(k).forEach(function(A, R) {
|
|
460
|
+
y.elements.push(new _(k, y, A, C, R, T));
|
|
461
461
|
});
|
|
462
462
|
}), t(this, "removeElements", function(k) {
|
|
463
463
|
y.elements = y.elements.filter(function(C) {
|
|
@@ -473,10 +473,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
473
473
|
}());
|
|
474
474
|
function x(f, y) {
|
|
475
475
|
if (Array.isArray(f)) return f;
|
|
476
|
-
for (var k = Object.keys(f).map(function(
|
|
477
|
-
return parseInt(
|
|
478
|
-
}).sort(function(
|
|
479
|
-
return B <
|
|
476
|
+
for (var k = Object.keys(f).map(function(R) {
|
|
477
|
+
return parseInt(R);
|
|
478
|
+
}).sort(function(R, B) {
|
|
479
|
+
return B < R ? 1 : -1;
|
|
480
480
|
}), C = k[k.length - 1], T = 0; T < k.length; T++) {
|
|
481
481
|
var A = k[T];
|
|
482
482
|
if (y < A) {
|
|
@@ -487,10 +487,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
487
487
|
return f[C];
|
|
488
488
|
}
|
|
489
489
|
function m(f, E, k) {
|
|
490
|
-
var C = E.width, T = E.height,
|
|
490
|
+
var C = E.width, T = E.height, M = E.x, I = E.y;
|
|
491
491
|
if (typeof f == "number") return f;
|
|
492
|
-
var A,
|
|
493
|
-
return Function("return ".concat(f.replace(/screenWidth/g,
|
|
492
|
+
var A, R = document.body.scrollHeight, B = document.body.scrollWidth, P = window.innerWidth, D = window.innerHeight, q = s((A = window.pageXOffset !== void 0, q = (document.compatMode || "") === "CSS1Compat", E = A ? window.pageXOffset : (q ? document.documentElement : document.body).scrollLeft, [A ? window.pageYOffset : (q ? document.documentElement : document.body).scrollTop, E]), 2), E = q[0], M = M + q[1], q = M + C, I = I + E, E = I + T;
|
|
493
|
+
return Function("return ".concat(f.replace(/screenWidth/g, P).replace(/screenHeight/g, D).replace(/pageHeight/g, R).replace(/pageWidth/g, B).replace(/elWidth/g, C).replace(/elHeight/g, T).replace(/elInY/g, I - D).replace(/elOutY/g, E).replace(/elCenterY/g, I + T / 2 - D / 2).replace(/elInX/g, M - P).replace(/elOutX/g, q).replace(/elCenterX/g, M + C / 2 - P / 2).replace(/index/g, k)))();
|
|
494
494
|
}
|
|
495
495
|
function v(f, y) {
|
|
496
496
|
var k = this, C = 2 < arguments.length && arguments[2] !== void 0 ? arguments[2] : {};
|
|
@@ -503,59 +503,59 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
503
503
|
}
|
|
504
504
|
function _(f, y, k, C) {
|
|
505
505
|
var T = this, A = 4 < arguments.length && arguments[4] !== void 0 ? arguments[4] : 0, B = 5 < arguments.length && arguments[5] !== void 0 ? arguments[5] : {};
|
|
506
|
-
e(this, _), t(this, "domElement", void 0), t(this, "transformsData", void 0), t(this, "styles", {}), t(this, "selector", ""), t(this, "groupIndex", 0), t(this, "laxInstance", void 0), t(this, "onUpdate", void 0), t(this, "update", function(
|
|
507
|
-
var
|
|
508
|
-
for (
|
|
509
|
-
var E =
|
|
510
|
-
|
|
511
|
-
var $, H = s(
|
|
506
|
+
e(this, _), t(this, "domElement", void 0), t(this, "transformsData", void 0), t(this, "styles", {}), t(this, "selector", ""), t(this, "groupIndex", 0), t(this, "laxInstance", void 0), t(this, "onUpdate", void 0), t(this, "update", function(P, D) {
|
|
507
|
+
var M, q = T.transforms, I = {};
|
|
508
|
+
for (M in q) {
|
|
509
|
+
var E = q[M];
|
|
510
|
+
P[M] || console.error("No lax driver with name: ", M);
|
|
511
|
+
var $, H = s(P[M], 2), U = H[0], J = H[1];
|
|
512
512
|
for ($ in E) {
|
|
513
|
-
var
|
|
514
|
-
|
|
513
|
+
var Y, me = s(E[$], 3), ee = me[0], Q = me[1], Te = me[2], re = Te === void 0 ? {} : Te, he = re.modValue, ye = re.frameStep, Ee = ye === void 0 ? 1 : ye, N = re.easing, me = re.inertia, Te = re.inertiaMode, ye = re.cssFn, re = re.cssUnit, re = re === void 0 ? "" : re, N = w[N];
|
|
514
|
+
D % Ee == 0 && (N = (function(G, ie, ce, fe) {
|
|
515
515
|
var le = 0;
|
|
516
|
-
if (G.forEach(function(
|
|
517
|
-
|
|
516
|
+
if (G.forEach(function(F) {
|
|
517
|
+
F < ce && le++;
|
|
518
518
|
}), le <= 0) return ie[0];
|
|
519
519
|
if (le >= G.length) return ie[G.length - 1];
|
|
520
520
|
var se, te = (te = G[se = le - 1], G = G[le], (ce - te) / (G - te));
|
|
521
521
|
return fe && (te = fe(te)), se = ie[se], ie = ie[le], se * (1 - (te = te)) + ie * te;
|
|
522
|
-
})(ee, Q, he ? U % he : U, N), me && (
|
|
522
|
+
})(ee, Q, he ? U % he : U, N), me && (Y = J * me, Te === "absolute" && (Y = Math.abs(Y)), N += Y), Y = (re || p.includes($) ? "px" : g.includes($) ? "deg" : "") == "px" ? 0 : 3, Y = N.toFixed(Y), I[$] = ye ? ye(Y, T.domElement) : Y + re);
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
|
-
T.applyStyles(I), T.onUpdate && T.onUpdate(
|
|
525
|
+
T.applyStyles(I), T.onUpdate && T.onUpdate(P, T.domElement);
|
|
526
526
|
}), t(this, "calculateTransforms", function() {
|
|
527
527
|
T.transforms = {};
|
|
528
|
-
var
|
|
529
|
-
for (
|
|
530
|
-
var
|
|
528
|
+
var P, D = T.laxInstance.windowWidth;
|
|
529
|
+
for (P in T.transformsData) (function(M) {
|
|
530
|
+
var q = T.transformsData[M], I = {}, E = q.presets;
|
|
531
531
|
(E === void 0 ? [] : E).forEach(function(ee) {
|
|
532
|
-
var U, Q = s(ee.split(":"), 3), J = Q[0],
|
|
533
|
-
Q ? (U = Q(
|
|
534
|
-
|
|
532
|
+
var U, Q = s(ee.split(":"), 3), J = Q[0], Y = Q[1], ee = Q[2], Q = window.lax.presets[J];
|
|
533
|
+
Q ? (U = Q(Y, ee), Object.keys(U).forEach(function(he) {
|
|
534
|
+
q[he] = U[he];
|
|
535
535
|
})) : console.error("Lax preset cannot be found with name: ", J);
|
|
536
|
-
}), delete
|
|
537
|
-
for (var $ in
|
|
538
|
-
var U = s(
|
|
536
|
+
}), delete q.presets;
|
|
537
|
+
for (var $ in q) (function(H) {
|
|
538
|
+
var U = s(q[H], 3), ee = U[0], Y = ee === void 0 ? [-1e9, 1e9] : ee, ee = U[1], ee = ee === void 0 ? [-1e9, 1e9] : ee, U = U[2], U = U === void 0 ? {} : U, J = T.domElement.getBoundingClientRect(), Y = x(Y, D).map(function(Q) {
|
|
539
539
|
return m(Q, J, T.groupIndex);
|
|
540
|
-
}), ee = x(ee,
|
|
540
|
+
}), ee = x(ee, D).map(function(Q) {
|
|
541
541
|
return m(Q, J, T.groupIndex);
|
|
542
542
|
});
|
|
543
|
-
I[H] = [
|
|
543
|
+
I[H] = [Y, ee, U];
|
|
544
544
|
})($);
|
|
545
|
-
T.transforms[
|
|
546
|
-
})(
|
|
547
|
-
}), t(this, "applyStyles", function(
|
|
548
|
-
var
|
|
549
|
-
var $ =
|
|
550
|
-
h.includes(E) ?
|
|
551
|
-
}),
|
|
545
|
+
T.transforms[M] = I;
|
|
546
|
+
})(P);
|
|
547
|
+
}), t(this, "applyStyles", function(P) {
|
|
548
|
+
var D, M, q, I = (D = P, M = { transform: "", filter: "" }, q = { translateX: 1e-5, translateY: 1e-5, translateZ: 1e-5 }, Object.keys(D).forEach(function(E) {
|
|
549
|
+
var $ = D[E], H = p.includes(E) ? "px" : g.includes(E) ? "deg" : "";
|
|
550
|
+
h.includes(E) ? q[E] = $ : d.includes(E) ? M.transform += "".concat(E, "(").concat($).concat(H, ") ") : o.includes(E) ? M.filter += "".concat(E, "(").concat($).concat(H, ") ") : M[E] = "".concat($).concat(H, " ");
|
|
551
|
+
}), M.transform = "translate3d(".concat(q.translateX, "px, ").concat(q.translateY, "px, ").concat(q.translateZ, "px) ").concat(M.transform), M);
|
|
552
552
|
Object.keys(I).forEach(function(E) {
|
|
553
553
|
T.domElement.style.setProperty(E, I[E]);
|
|
554
554
|
});
|
|
555
555
|
}), this.selector = f, this.laxInstance = y, this.domElement = k, this.transformsData = C, this.groupIndex = A;
|
|
556
|
-
var
|
|
557
|
-
Object.keys(
|
|
558
|
-
k.style.setProperty(
|
|
556
|
+
var R = (A = B.style) === void 0 ? {} : A, B = B.onUpdate;
|
|
557
|
+
Object.keys(R).forEach(function(P) {
|
|
558
|
+
k.style.setProperty(P, R[P]);
|
|
559
559
|
}), B && (this.onUpdate = B), this.calculateTransforms();
|
|
560
560
|
}
|
|
561
561
|
u.exports !== void 0 ? u.exports = b : window.lax = b;
|
|
@@ -589,18 +589,18 @@ class Ts {
|
|
|
589
589
|
return;
|
|
590
590
|
}
|
|
591
591
|
i.style.transform = "";
|
|
592
|
-
let r = this.getObjVal(i, "data-top-bottom"), a = this.getObjVal(i, "data-top"), l = this.getObjVal(i, "data-50-top"), c = this.getObjVal(i, "data-100-top"), d = this.getObjVal(i, "data-center-bottom"), o = this.getObjVal(i, "data-center"), h = this.getObjVal(i, "data-center-top"), p = this.getObjVal(i, "data--400-bottom"), g = this.getObjVal(i, "data--300-bottom"), w = this.getObjVal(i, "data--200-bottom"), S = this.getObjVal(i, "data--150-bottom"), b = this.getObjVal(i, "data--100-bottom"), x = this.getObjVal(i, "data--50-bottom"), m = this.getObjVal(i, "data-bottom"), v = this.getObjVal(i, "data-50-bottom"), _ = this.getObjVal(i, "data-100-bottom"), f = this.getObjVal(i, "data-150-bottom"), y = this.getObjVal(i, "data-200-bottom"), k = this.getObjVal(i, "data-300-bottom"), C = this.getObjVal(i, "data-400-bottom"), T = this.getObjVal(i, "data-bottom-top"), A = this.getObjVal(i, "data-in"),
|
|
592
|
+
let r = this.getObjVal(i, "data-top-bottom"), a = this.getObjVal(i, "data-top"), l = this.getObjVal(i, "data-50-top"), c = this.getObjVal(i, "data-100-top"), d = this.getObjVal(i, "data-center-bottom"), o = this.getObjVal(i, "data-center"), h = this.getObjVal(i, "data-center-top"), p = this.getObjVal(i, "data--400-bottom"), g = this.getObjVal(i, "data--300-bottom"), w = this.getObjVal(i, "data--200-bottom"), S = this.getObjVal(i, "data--150-bottom"), b = this.getObjVal(i, "data--100-bottom"), x = this.getObjVal(i, "data--50-bottom"), m = this.getObjVal(i, "data-bottom"), v = this.getObjVal(i, "data-50-bottom"), _ = this.getObjVal(i, "data-100-bottom"), f = this.getObjVal(i, "data-150-bottom"), y = this.getObjVal(i, "data-200-bottom"), k = this.getObjVal(i, "data-300-bottom"), C = this.getObjVal(i, "data-400-bottom"), T = this.getObjVal(i, "data-bottom-top"), A = this.getObjVal(i, "data-in"), R = this.getObjVal(i, "data-in-150"), B = this.getObjVal(i, "data-in-300"), P = this.getObjVal(i, "data-cen--150"), D = this.getObjVal(i, "data-cen"), M = this.getObjVal(i, "data-cen-150"), q = this.getObjVal(i, "data-out--300"), I = this.getObjVal(i, "data-out--150"), E = this.getObjVal(i, "data-out"), $ = !1;
|
|
593
593
|
i.hasAttribute("data-xs") && ($ = !0);
|
|
594
594
|
let H = !1;
|
|
595
595
|
i.hasAttribute("data-sm") && (H = !0);
|
|
596
596
|
let U = !1;
|
|
597
597
|
i.hasAttribute("data-md") && (U = !0), i.hasAttribute("data-lg"), i.hasAttribute("data-xl");
|
|
598
|
-
let J = {},
|
|
599
|
-
(t > 1280 || t > 970 && t <= 1280 && !U || t > 760 && t <= 970 && !H || t <= 760 && !$) && (ee = this.getObjVal(i, "data-t"), Q = this.getObjVal(i, "data-t-100"), he = this.getObjVal(i, "data-t-200"), Ee = this.getObjVal(i, "data-t-300"), me = this.getObjVal(i, "data-t-400"), Te = this.getObjVal(i, "data-t-500"), ye = this.getObjVal(i, "data-t-600"), re = this.getObjVal(i, "data-t-700"), N = this.getObjVal(i, "data-t-800"), G = this.getObjVal(i, "data-t-900"), ie = this.getObjVal(i, "data-t-1000"), ce = this.getObjVal(i, "data-t-1100"), fe = this.getObjVal(i, "data-t-1200"), le = this.getObjVal(i, "data-t-1300"), se = this.getObjVal(i, "data-t-1400"), te = this.getObjVal(i, "data-t-1500"),
|
|
600
|
-
let ve = ee, be = Q, X = he, we = Ee, ue = me,
|
|
601
|
-
nt < 730 ? (J = ve,
|
|
598
|
+
let J = {}, Y = {}, ee = {}, Q = {}, he = {}, Ee = {}, me = {}, Te = {}, ye = {}, re = {}, N = {}, G = {}, ie = {}, ce = {}, fe = {}, le = {}, se = {}, te = {}, F = {}, Se = {}, pe = {}, Me = {}, ne = {}, Pe = {}, Ce = {}, De = {}, Ue = {}, Fe = {}, O = {}, j = {}, z = {}, V = {}, K = {};
|
|
599
|
+
(t > 1280 || t > 970 && t <= 1280 && !U || t > 760 && t <= 970 && !H || t <= 760 && !$) && (ee = this.getObjVal(i, "data-t"), Q = this.getObjVal(i, "data-t-100"), he = this.getObjVal(i, "data-t-200"), Ee = this.getObjVal(i, "data-t-300"), me = this.getObjVal(i, "data-t-400"), Te = this.getObjVal(i, "data-t-500"), ye = this.getObjVal(i, "data-t-600"), re = this.getObjVal(i, "data-t-700"), N = this.getObjVal(i, "data-t-800"), G = this.getObjVal(i, "data-t-900"), ie = this.getObjVal(i, "data-t-1000"), ce = this.getObjVal(i, "data-t-1100"), fe = this.getObjVal(i, "data-t-1200"), le = this.getObjVal(i, "data-t-1300"), se = this.getObjVal(i, "data-t-1400"), te = this.getObjVal(i, "data-t-1500"), F = this.getObjVal(i, "data-t-1600"), Se = this.getObjVal(i, "data-t-1700"), pe = this.getObjVal(i, "data-t-1800"), Me = this.getObjVal(i, "data-t-1900"), ne = this.getObjVal(i, "data-t-2000"), Pe = this.getObjVal(i, "data-t-2100"), Ce = this.getObjVal(i, "data-t-2200"), De = this.getObjVal(i, "data-t-2300"), Ue = this.getObjVal(i, "data-t-2400"), Fe = this.getObjVal(i, "data-t-2500"), O = this.getObjVal(i, "data-t-2600"), j = this.getObjVal(i, "data-t-2700"), z = this.getObjVal(i, "data-t-2800")), t > 970 && t <= 1280 && U && (i.hasAttribute("data-md-t") && (ee = this.getObjVal(i, "data-md-t")), i.hasAttribute("data-md-t-100") && (Q = this.getObjVal(i, "data-md-t-100")), i.hasAttribute("data-md-t-200") && (he = this.getObjVal(i, "data-md-t-200")), i.hasAttribute("data-md-t-300") && (Ee = this.getObjVal(i, "data-md-t-300")), i.hasAttribute("data-md-t-400") && (me = this.getObjVal(i, "data-md-t-400")), i.hasAttribute("data-md-t-500") && (Te = this.getObjVal(i, "data-md-t-500")), i.hasAttribute("data-md-t-600") && (ye = this.getObjVal(i, "data-md-t-600")), i.hasAttribute("data-md-t-700") && (re = this.getObjVal(i, "data-md-t-700")), i.hasAttribute("data-md-t-800") && (N = this.getObjVal(i, "data-md-t-800")), i.hasAttribute("data-md-t-900") && (G = this.getObjVal(i, "data-md-t-900")), i.hasAttribute("data-md-t-1000") && (ie = this.getObjVal(i, "data-md-t-1000")), i.hasAttribute("data-md-t-1100") && (ce = this.getObjVal(i, "data-md-t-1100")), i.hasAttribute("data-md-t-1200") && (fe = this.getObjVal(i, "data-md-t-1200")), i.hasAttribute("data-md-t-1300") && (le = this.getObjVal(i, "data-md-t-1300")), i.hasAttribute("data-md-t-1400") && (se = this.getObjVal(i, "data-md-t-1400")), i.hasAttribute("data-md-t-1500") && (te = this.getObjVal(i, "data-md-t-1500")), i.hasAttribute("data-md-t-1600") && (F = this.getObjVal(i, "data-md-t-1600")), i.hasAttribute("data-md-t-1700") && (Se = this.getObjVal(i, "data-md-t-1700")), i.hasAttribute("data-md-t-1800") && (pe = this.getObjVal(i, "data-md-t-1800")), i.hasAttribute("data-md-t-1900") && (Me = this.getObjVal(i, "data-md-t-1900")), i.hasAttribute("data-md-t-2000") && (ne = this.getObjVal(i, "data-md-t-2000")), i.hasAttribute("data-md-t-2100") && (Pe = this.getObjVal(i, "data-md-t-2100")), i.hasAttribute("data-md-t-2200") && (Ce = this.getObjVal(i, "data-md-t-2200")), i.hasAttribute("data-md-t-2300") && (De = this.getObjVal(i, "data-md-t-2300")), i.hasAttribute("data-md-t-2400") && (Ue = this.getObjVal(i, "data-md-t-2400")), i.hasAttribute("data-md-t-2500") && (Fe = this.getObjVal(i, "data-md-t-2500")), i.hasAttribute("data-md-t-2600") && (O = this.getObjVal(i, "data-md-t-2600")), i.hasAttribute("data-md-t-2700") && (j = this.getObjVal(i, "data-md-t-2700")), i.hasAttribute("data-md-t-2800") && (z = this.getObjVal(i, "data-md-t-2800"))), t <= 970 && i.hasAttribute("m-data-out") && (E = this.getObjVal(i, "m-data-out")), (t > 760 && t <= 970 && H || t <= 760 && !$ && H) && (i.hasAttribute("data-sm-t") && (ee = this.getObjVal(i, "data-sm-t")), i.hasAttribute("data-sm-t-100") && (Q = this.getObjVal(i, "data-sm-t-100")), i.hasAttribute("data-sm-t-200") && (he = this.getObjVal(i, "data-sm-t-200")), i.hasAttribute("data-sm-t-300") && (Ee = this.getObjVal(i, "data-sm-t-300")), i.hasAttribute("data-sm-t-400") && (me = this.getObjVal(i, "data-sm-t-400")), i.hasAttribute("data-sm-t-500") && (Te = this.getObjVal(i, "data-sm-t-500")), i.hasAttribute("data-sm-t-600") && (ye = this.getObjVal(i, "data-sm-t-600")), i.hasAttribute("data-sm-t-700") && (re = this.getObjVal(i, "data-sm-t-700")), i.hasAttribute("data-sm-t-800") && (N = this.getObjVal(i, "data-sm-t-800")), i.hasAttribute("data-sm-t-900") && (G = this.getObjVal(i, "data-sm-t-900")), i.hasAttribute("data-sm-t-1000") && (ie = this.getObjVal(i, "data-sm-t-1000")), i.hasAttribute("data-sm-t-1100") && (ce = this.getObjVal(i, "data-sm-t-1100")), i.hasAttribute("data-sm-t-1200") && (fe = this.getObjVal(i, "data-sm-t-1200")), i.hasAttribute("data-sm-t-1300") && (le = this.getObjVal(i, "data-sm-t-1300")), i.hasAttribute("data-sm-t-1400") && (se = this.getObjVal(i, "data-sm-t-1400")), i.hasAttribute("data-sm-t-1500") && (te = this.getObjVal(i, "data-sm-t-1500")), i.hasAttribute("data-sm-t-1600") && (F = this.getObjVal(i, "data-sm-t-1600")), i.hasAttribute("data-sm-t-1700") && (Se = this.getObjVal(i, "data-sm-t-1700")), i.hasAttribute("data-sm-t-1800") && (pe = this.getObjVal(i, "data-sm-t-1800")), i.hasAttribute("data-sm-t-1900") && (Me = this.getObjVal(i, "data-sm-t-1900")), i.hasAttribute("data-sm-t-2000") && (ne = this.getObjVal(i, "data-sm-t-2000")), i.hasAttribute("data-sm-t-2100") && (Pe = this.getObjVal(i, "data-sm-t-2100")), i.hasAttribute("data-sm-t-2200") && (Ce = this.getObjVal(i, "data-sm-t-2200")), i.hasAttribute("data-sm-t-2300") && (De = this.getObjVal(i, "data-sm-t-2300")), i.hasAttribute("data-sm-t-2400") && (Ue = this.getObjVal(i, "data-sm-t-2400")), i.hasAttribute("data-sm-t-2500") && (Fe = this.getObjVal(i, "data-sm-t-2500")), i.hasAttribute("data-sm-t-2600") && (O = this.getObjVal(i, "data-sm-t-2600")), i.hasAttribute("data-sm-t-2700") && (j = this.getObjVal(i, "data-sm-t-2700")), i.hasAttribute("data-sm-t-2800") && (z = this.getObjVal(i, "data-sm-t-2800"))), t <= 414 && $ && (i.hasAttribute("data-xs-t") && (ee = this.getObjVal(i, "data-xs-t")), i.hasAttribute("data-xs-t-100") && (Q = this.getObjVal(i, "data-xs-t-100")), i.hasAttribute("data-xs-t-200") && (he = this.getObjVal(i, "data-xs-t-200")), i.hasAttribute("data-xs-t-300") && (Ee = this.getObjVal(i, "data-xs-t-300")), i.hasAttribute("data-xs-t-400") && (me = this.getObjVal(i, "data-xs-t-400")), i.hasAttribute("data-xs-t-500") && (Te = this.getObjVal(i, "data-xs-t-500")), i.hasAttribute("data-xs-t-600") && (ye = this.getObjVal(i, "data-xs-t-600")), i.hasAttribute("data-xs-t-700") && (re = this.getObjVal(i, "data-xs-t-700")), i.hasAttribute("data-xs-t-800") && (N = this.getObjVal(i, "data-xs-t-800")), i.hasAttribute("data-xs-t-900") && (G = this.getObjVal(i, "data-xs-t-900")), i.hasAttribute("data-xs-t-1000") && (ie = this.getObjVal(i, "data-xs-t-1000")), i.hasAttribute("data-xs-t-1100") && (ce = this.getObjVal(i, "data-xs-t-1100")), i.hasAttribute("data-xs-t-1200") && (fe = this.getObjVal(i, "data-xs-t-1200")), i.hasAttribute("data-xs-t-1300") && (le = this.getObjVal(i, "data-xs-t-1300")), i.hasAttribute("data-xs-t-1400") && (se = this.getObjVal(i, "data-xs-t-1400")), i.hasAttribute("data-xs-t-1500") && (te = this.getObjVal(i, "data-xs-t-1500")), i.hasAttribute("data-xs-t-1600") && (F = this.getObjVal(i, "data-xs-t-1600")), i.hasAttribute("data-xs-t-1700") && (Se = this.getObjVal(i, "data-xs-t-1700")), i.hasAttribute("data-xs-t-1800") && (pe = this.getObjVal(i, "data-xs-t-1800")), i.hasAttribute("data-xs-t-1900") && (Me = this.getObjVal(i, "data-xs-t-1900")), i.hasAttribute("data-xs-t-2000") && (ne = this.getObjVal(i, "data-xs-t-2000")), i.hasAttribute("data-xs-t-2100") && (Pe = this.getObjVal(i, "data-xs-t-2100")), i.hasAttribute("data-xs-t-2200") && (Ce = this.getObjVal(i, "data-xs-t-2200")), i.hasAttribute("data-xs-t-2300") && (De = this.getObjVal(i, "data-xs-t-2300")), i.hasAttribute("data-xs-t-2400") && (Ue = this.getObjVal(i, "data-xs-t-2400")), i.hasAttribute("data-xs-t-2500") && (Fe = this.getObjVal(i, "data-xs-t-2500")), i.hasAttribute("data-xs-t-2600") && (O = this.getObjVal(i, "data-xs-t-2600")), i.hasAttribute("data-xs-t-2700") && (j = this.getObjVal(i, "data-xs-t-2700")), i.hasAttribute("data-xs-t-2800") && (z = this.getObjVal(i, "data-xs-t-2800")));
|
|
600
|
+
let ve = ee, be = Q, X = he, we = Ee, ue = me, qe = Te, xe = ye, Le = re, Re = N, Ye = G, He = ie, Ge = ce, Oe = fe, Z = le, _e = se, Ie = te, vt = F, wt = Se, xt = pe, _t = Me, kt = ne, St = Pe, Et = Ce, Tt = De, Lt = Ue, Ct = Fe, Ot = O, At = j, Mt = z, nt = window.innerHeight;
|
|
601
|
+
nt < 730 ? (J = ve, Y = be, ee = X, Q = we, he = ue, Ee = qe, me = xe, Te = Le, ye = Re, re = Ye, N = He, G = Ge, ie = Oe, ce = Z, fe = _e, le = Ie, se = vt, te = wt, F = xt, Se = _t, pe = kt, Me = St, ne = Et, Pe = Tt, Ce = Lt, De = Ct, Ue = Ot, Fe = At, O = Mt, j = {}, z = {}) : nt >= 730 && nt < 790 ? (Y = ve, ee = be, Q = X, he = we, Ee = ue, me = qe, Te = xe, ye = Le, re = Re, N = Ye, G = He, ie = Ge, ce = Oe, fe = Z, le = _e, se = Ie, te = vt, F = wt, Se = xt, pe = _t, Me = kt, ne = St, Pe = Et, Ce = Tt, De = Lt, Ue = Ct, Fe = Ot, O = At, j = Mt, z = {}) : nt >= 790 && nt < 840 || (nt >= 840 && nt < 1125 ? (ee = {}, Q = ve, he = be, Ee = X, me = we, Te = ue, ye = qe, re = xe, N = Le, G = Re, ie = Ye, ce = He, fe = Ge, le = Oe, se = Z, te = _e, F = Ie, Se = vt, pe = wt, Me = xt, ne = _t, Pe = kt, Ce = St, De = Et, Ue = Tt, Fe = Lt, O = Ct, j = Ot, z = At, V = Mt) : (ee = {}, Q = {}, he = ve, Ee = be, me = X, Te = we, ye = ue, re = qe, N = xe, G = Le, ie = Re, ce = Ye, fe = He, le = Ge, se = Oe, te = Z, F = _e, Se = Ie, pe = vt, Me = wt, ne = xt, Pe = _t, Ce = kt, De = St, Ue = Et, Fe = Tt, O = Lt, j = Ct, z = Ot, V = At, K = Mt));
|
|
602
602
|
let L = {};
|
|
603
|
-
Object.keys(T).length !== 0 && (L = this.parseObj(T, "elInY", L)), Object.keys(C).length !== 0 && (L = this.parseObj(C, "elInY+50", L)), Object.keys(k).length !== 0 && (L = this.parseObj(k, "elInY+100", L)), Object.keys(y).length !== 0 && (L = this.parseObj(y, "elInY+150", L)), Object.keys(f).length !== 0 && (L = this.parseObj(f, "elInY+200", L)), Object.keys(_).length !== 0 && (L = this.parseObj(_, "elInY+250", L)), Object.keys(v).length !== 0 && (L = this.parseObj(v, "elInY+300", L)), Object.keys(m).length !== 0 && (L = this.parseObj(m, "elInY+350", L)), Object.keys(x).length !== 0 && (L = this.parseObj(x, "elInY+400", L)), Object.keys(b).length !== 0 && (L = this.parseObj(b, "elInY+450", L)), Object.keys(S).length !== 0 && (L = this.parseObj(S, "elInY+500", L)), Object.keys(w).length !== 0 && (L = this.parseObj(w, "elInY+550", L)), Object.keys(g).length !== 0 && (L = this.parseObj(g, "elInY+600", L)), Object.keys(p).length !== 0 && (L = this.parseObj(p, "elInY+650", L)), Object.keys(h).length !== 0 && (L = this.parseObj(h, "elCenterY-300", L)), Object.keys(o).length !== 0 && (L = this.parseObj(o, "elCenterY", L)), Object.keys(d).length !== 0 && (L = this.parseObj(d, "elCenterY+100", L)), Object.keys(c).length !== 0 && (L = this.parseObj(c, "elCenterY+200", L)), Object.keys(l).length !== 0 && (L = this.parseObj(l, "elCenterY+300", L)), Object.keys(a).length !== 0 && (L = this.parseObj(a, "elOutY-300", L)), Object.keys(r).length !== 0 && (L = this.parseObj(r, "elOutY", L)), Object.keys(A).length !== 0 && (L = this.parseObj(A, "elInY", L)), Object.keys(
|
|
603
|
+
Object.keys(T).length !== 0 && (L = this.parseObj(T, "elInY", L)), Object.keys(C).length !== 0 && (L = this.parseObj(C, "elInY+50", L)), Object.keys(k).length !== 0 && (L = this.parseObj(k, "elInY+100", L)), Object.keys(y).length !== 0 && (L = this.parseObj(y, "elInY+150", L)), Object.keys(f).length !== 0 && (L = this.parseObj(f, "elInY+200", L)), Object.keys(_).length !== 0 && (L = this.parseObj(_, "elInY+250", L)), Object.keys(v).length !== 0 && (L = this.parseObj(v, "elInY+300", L)), Object.keys(m).length !== 0 && (L = this.parseObj(m, "elInY+350", L)), Object.keys(x).length !== 0 && (L = this.parseObj(x, "elInY+400", L)), Object.keys(b).length !== 0 && (L = this.parseObj(b, "elInY+450", L)), Object.keys(S).length !== 0 && (L = this.parseObj(S, "elInY+500", L)), Object.keys(w).length !== 0 && (L = this.parseObj(w, "elInY+550", L)), Object.keys(g).length !== 0 && (L = this.parseObj(g, "elInY+600", L)), Object.keys(p).length !== 0 && (L = this.parseObj(p, "elInY+650", L)), Object.keys(h).length !== 0 && (L = this.parseObj(h, "elCenterY-300", L)), Object.keys(o).length !== 0 && (L = this.parseObj(o, "elCenterY", L)), Object.keys(d).length !== 0 && (L = this.parseObj(d, "elCenterY+100", L)), Object.keys(c).length !== 0 && (L = this.parseObj(c, "elCenterY+200", L)), Object.keys(l).length !== 0 && (L = this.parseObj(l, "elCenterY+300", L)), Object.keys(a).length !== 0 && (L = this.parseObj(a, "elOutY-300", L)), Object.keys(r).length !== 0 && (L = this.parseObj(r, "elOutY", L)), Object.keys(A).length !== 0 && (L = this.parseObj(A, "elInY", L)), Object.keys(R).length !== 0 && (L = this.parseObj(R, "elInY+150", L)), Object.keys(B).length !== 0 && (L = this.parseObj(B, "elInY+300 ", L)), Object.keys(P).length !== 0 && (L = this.parseObj(P, "elCenterY-150", L)), Object.keys(D).length !== 0 && (L = this.parseObj(D, "elCenterY", L)), Object.keys(M).length !== 0 && (L = this.parseObj(M, "elCenterY+150", L)), Object.keys(q).length !== 0 && (L = this.parseObj(q, "elOutY-300 ", L)), Object.keys(I).length !== 0 && (L = this.parseObj(I, "elOutY-150 ", L)), Object.keys(E).length !== 0 && (L = this.parseObj(E, "elOutY", L)), Object.keys(J).length !== 0 && (L = this.parseObj(J, "elInY-200", L)), Object.keys(Y).length !== 0 && (L = this.parseObj(Y, "elInY-100", L)), Object.keys(ee).length !== 0 && (L = this.parseObj(ee, "elInY", L)), Object.keys(Q).length !== 0 && (L = this.parseObj(Q, "elInY+100", L)), Object.keys(he).length !== 0 && (L = this.parseObj(he, "elInY+200", L)), Object.keys(Ee).length !== 0 && (L = this.parseObj(Ee, "elInY+300 ", L)), Object.keys(me).length !== 0 && (L = this.parseObj(me, "elInY+400 ", L)), Object.keys(Te).length !== 0 && (L = this.parseObj(Te, "elInY+500 ", L)), Object.keys(ye).length !== 0 && (L = this.parseObj(ye, "elInY+600 ", L)), Object.keys(re).length !== 0 && (L = this.parseObj(re, "elInY+700 ", L)), Object.keys(N).length !== 0 && (L = this.parseObj(N, "elInY+800 ", L)), Object.keys(G).length !== 0 && (L = this.parseObj(G, "elInY+900 ", L)), Object.keys(ie).length !== 0 && (L = this.parseObj(ie, "elInY+1000 ", L)), Object.keys(ce).length !== 0 && (L = this.parseObj(ce, "elInY+1100 ", L)), Object.keys(fe).length !== 0 && (L = this.parseObj(fe, "elInY+1200 ", L)), Object.keys(le).length !== 0 && (L = this.parseObj(le, "elInY+1300 ", L)), Object.keys(se).length !== 0 && (L = this.parseObj(se, "elInY+1400 ", L)), Object.keys(te).length !== 0 && (L = this.parseObj(te, "elInY+1500 ", L)), Object.keys(F).length !== 0 && (L = this.parseObj(F, "elInY+1600 ", L)), Object.keys(Se).length !== 0 && (L = this.parseObj(Se, "elInY+1700 ", L)), Object.keys(pe).length !== 0 && (L = this.parseObj(pe, "elInY+1800 ", L)), Object.keys(Me).length !== 0 && (L = this.parseObj(Me, "elInY+1900 ", L)), Object.keys(ne).length !== 0 && (L = this.parseObj(ne, "elInY+2000 ", L)), Object.keys(Pe).length !== 0 && (L = this.parseObj(Pe, "elInY+2100 ", L)), Object.keys(Ce).length !== 0 && (L = this.parseObj(Ce, "elInY+2200 ", L)), Object.keys(De).length !== 0 && (L = this.parseObj(De, "elInY+2300 ", L)), Object.keys(Ue).length !== 0 && (L = this.parseObj(Ue, "elInY+2400 ", L)), Object.keys(Fe).length !== 0 && (L = this.parseObj(Fe, "elInY+2500 ", L)), Object.keys(O).length !== 0 && (L = this.parseObj(O, "elInY+2600 ", L)), Object.keys(j).length !== 0 && (L = this.parseObj(j, "elInY+2700 ", L)), Object.keys(z).length !== 0 && (L = this.parseObj(z, "elInY+2800 ", L)), Object.keys(V).length !== 0 && (L = this.parseObj(V, "elInY+2900 ", L)), Object.keys(K).length !== 0 && (L = this.parseObj(K, "elInY+3000 ", L)), i.style.transition = "", i.setAttribute("data-dummy-selector", "1"), lt.addElements("[data-dummy-selector]", {
|
|
604
604
|
scrollY: L
|
|
605
605
|
}), this.elements.push(document.querySelector("[data-dummy-selector]")), i.removeAttribute("data-dummy-selector"), setTimeout(() => {
|
|
606
606
|
i.style.opacity = 1, i.getAttribute("data-smooth-scrolling") === "off" || this.settings.transition && (i.style.transition = this.settings.transition);
|
|
@@ -694,16 +694,16 @@ function mi() {
|
|
|
694
694
|
*
|
|
695
695
|
* Date: 2013-04-10
|
|
696
696
|
*/
|
|
697
|
-
var si,
|
|
697
|
+
var si, qi;
|
|
698
698
|
function Ls() {
|
|
699
|
-
return
|
|
699
|
+
return qi || (qi = 1, si = function u(e, t) {
|
|
700
700
|
return e == null || t == null || Object.keys(t).forEach(function(s) {
|
|
701
701
|
Object.prototype.toString.call(t[s]) == "[object Object]" ? Object.prototype.toString.call(e[s]) != "[object Object]" ? e[s] = t[s] : e[s] = u(e[s], t[s]) : e[s] = t[s];
|
|
702
702
|
}), e;
|
|
703
703
|
}), si;
|
|
704
704
|
}
|
|
705
705
|
var Cs = Ls();
|
|
706
|
-
const
|
|
706
|
+
const Ft = /* @__PURE__ */ gi(Cs);
|
|
707
707
|
Array.prototype.each = function(u) {
|
|
708
708
|
const e = this.length;
|
|
709
709
|
for (let t = 0; t < e; t++) {
|
|
@@ -712,10 +712,10 @@ Array.prototype.each = function(u) {
|
|
|
712
712
|
}
|
|
713
713
|
};
|
|
714
714
|
typeof window < "u" && typeof NodeList < "u" && (NodeList.prototype.each = Array.prototype.each, NodeList.prototype.filter = Array.prototype.filter);
|
|
715
|
-
function
|
|
715
|
+
function qt(u) {
|
|
716
716
|
return Number(u) === u && u % 1 === 0;
|
|
717
717
|
}
|
|
718
|
-
function
|
|
718
|
+
function Rt(u) {
|
|
719
719
|
return Number(u) === u && u % 1 !== 0;
|
|
720
720
|
}
|
|
721
721
|
let $t = class {
|
|
@@ -726,7 +726,7 @@ let $t = class {
|
|
|
726
726
|
* @param {DefaultOptions.trigger} [options=DefaultOptions.trigger] options
|
|
727
727
|
*/
|
|
728
728
|
constructor(e, t) {
|
|
729
|
-
this.element = e, t =
|
|
729
|
+
this.element = e, t = Ft(new mi().trigger, t), this.offset = t.offset, this.toggle = t.toggle, this.once = t.once, this.visible = null, this.active = !0;
|
|
730
730
|
}
|
|
731
731
|
/**
|
|
732
732
|
* Checks if the Trigger is in the viewport, calls the callbacks and toggles the classes
|
|
@@ -764,7 +764,7 @@ let $t = class {
|
|
|
764
764
|
*/
|
|
765
765
|
_getElementOffset(e, t) {
|
|
766
766
|
let s = { x: 0, y: 0 };
|
|
767
|
-
return typeof this.offset.element.x == "function" ? s.x = e.width * this.offset.element.x(this, e, t) :
|
|
767
|
+
return typeof this.offset.element.x == "function" ? s.x = e.width * this.offset.element.x(this, e, t) : Rt(this.offset.element.x) ? s.x = e.width * this.offset.element.x : qt(this.offset.element.x) && (s.x = this.offset.element.x), typeof this.offset.element.y == "function" ? s.y = e.height * this.offset.element.y(this, e, t) : Rt(this.offset.element.y) ? s.y = e.height * this.offset.element.y : qt(this.offset.element.y) && (s.y = this.offset.element.y), s;
|
|
768
768
|
}
|
|
769
769
|
/**
|
|
770
770
|
* Get the calculated offset to place on the viewport
|
|
@@ -775,7 +775,7 @@ let $t = class {
|
|
|
775
775
|
*/
|
|
776
776
|
_getViewportOffset(e, t) {
|
|
777
777
|
let s = { x: 0, y: 0 };
|
|
778
|
-
return typeof this.offset.viewport.x == "function" ? s.x = e.w * this.offset.viewport.x(this, e, t) :
|
|
778
|
+
return typeof this.offset.viewport.x == "function" ? s.x = e.w * this.offset.viewport.x(this, e, t) : Rt(this.offset.viewport.x) ? s.x = e.w * this.offset.viewport.x : qt(this.offset.viewport.x) && (s.x = this.offset.viewport.x), typeof this.offset.viewport.y == "function" ? s.y = e.h * this.offset.viewport.y(this, e, t) : Rt(this.offset.viewport.y) ? s.y = e.h * this.offset.viewport.y : qt(this.offset.viewport.y) && (s.y = this.offset.viewport.y), s;
|
|
779
779
|
}
|
|
780
780
|
/**
|
|
781
781
|
* Check the visibility of the trigger in the viewport, with offsets applied
|
|
@@ -907,7 +907,7 @@ let $t = class {
|
|
|
907
907
|
_parseOptions(e) {
|
|
908
908
|
let t = new mi().scroll;
|
|
909
909
|
typeof e != "function" ? (t.callback = () => {
|
|
910
|
-
}, t =
|
|
910
|
+
}, t = Ft(t, e)) : t.callback = e, this.element = t.element, this.sustain = t.sustain, this.callback = t.callback, this.startCallback = t.start, this.stopCallback = t.stop, this.directionChange = t.directionChange;
|
|
911
911
|
}
|
|
912
912
|
/**
|
|
913
913
|
* Callback when the user scrolled the element
|
|
@@ -986,8 +986,8 @@ let $t = class {
|
|
|
986
986
|
*
|
|
987
987
|
* Date: 2017-07-09
|
|
988
988
|
*/
|
|
989
|
-
const ct = $t,
|
|
990
|
-
class
|
|
989
|
+
const ct = $t, Ms = Os, qs = As;
|
|
990
|
+
class Rs {
|
|
991
991
|
/**
|
|
992
992
|
* Constructor for the scroll trigger
|
|
993
993
|
* @param {DefaultOptions} [options=DefaultOptions] options
|
|
@@ -1001,7 +1001,7 @@ class Ms {
|
|
|
1001
1001
|
* @private
|
|
1002
1002
|
*/
|
|
1003
1003
|
_parseOptions(e) {
|
|
1004
|
-
e =
|
|
1004
|
+
e = Ft(new mi(), e), this.defaultTrigger = e.trigger, this.scrollOptions = e.scroll;
|
|
1005
1005
|
}
|
|
1006
1006
|
/**
|
|
1007
1007
|
* Initializes the collection, picks all [data-scroll] elements as initial elements
|
|
@@ -1010,14 +1010,14 @@ class Ms {
|
|
|
1010
1010
|
_initCollection() {
|
|
1011
1011
|
const e = document.querySelectorAll("[data-scroll]");
|
|
1012
1012
|
let t = [];
|
|
1013
|
-
e.length > 0 && (t = this.createTriggers(e)), this.collection = new
|
|
1013
|
+
e.length > 0 && (t = this.createTriggers(e)), this.collection = new Ms(t);
|
|
1014
1014
|
}
|
|
1015
1015
|
/**
|
|
1016
1016
|
* Initializes the scroll loop
|
|
1017
1017
|
* @private
|
|
1018
1018
|
*/
|
|
1019
1019
|
_initLoop() {
|
|
1020
|
-
this.loop = new
|
|
1020
|
+
this.loop = new qs({
|
|
1021
1021
|
sustain: this.scrollOptions.sustain,
|
|
1022
1022
|
element: this.scrollOptions.element,
|
|
1023
1023
|
callback: (e, t) => {
|
|
@@ -1074,7 +1074,7 @@ class Ms {
|
|
|
1074
1074
|
* @returns Trigger
|
|
1075
1075
|
*/
|
|
1076
1076
|
createTrigger(e, t) {
|
|
1077
|
-
return new ct(e,
|
|
1077
|
+
return new ct(e, Ft(this.defaultTrigger, t));
|
|
1078
1078
|
}
|
|
1079
1079
|
/**
|
|
1080
1080
|
* Creates an array of triggers
|
|
@@ -1134,7 +1134,7 @@ class Ms {
|
|
|
1134
1134
|
this.loop.kill(), this.loop = null;
|
|
1135
1135
|
}
|
|
1136
1136
|
}
|
|
1137
|
-
const
|
|
1137
|
+
const Ri = Date.now();
|
|
1138
1138
|
function et() {
|
|
1139
1139
|
let u = {}, e = !0, t = 0, s = arguments.length;
|
|
1140
1140
|
Object.prototype.toString.call(arguments[0]) === "[object Boolean]" && (e = arguments[0], t++);
|
|
@@ -1149,8 +1149,8 @@ function et() {
|
|
|
1149
1149
|
return u;
|
|
1150
1150
|
}
|
|
1151
1151
|
function Ae(u, e) {
|
|
1152
|
-
if ((tt(u) || u === window || u === document) && (u = [u]), !
|
|
1153
|
-
if (
|
|
1152
|
+
if ((tt(u) || u === window || u === document) && (u = [u]), !Pi(u) && !dt(u) && (u = [u]), rs(u) != 0) {
|
|
1153
|
+
if (Pi(u) && !dt(u)) {
|
|
1154
1154
|
let t = u.length, s = 0;
|
|
1155
1155
|
for (; s < t && e.call(u[s], u[s], s, u) !== !1; s++)
|
|
1156
1156
|
;
|
|
@@ -1162,7 +1162,7 @@ function Ae(u, e) {
|
|
|
1162
1162
|
}
|
|
1163
1163
|
}
|
|
1164
1164
|
function Ii(u, e = null, t = null) {
|
|
1165
|
-
const s = u[
|
|
1165
|
+
const s = u[Ri] = u[Ri] || [], i = { all: s, evt: null, found: null };
|
|
1166
1166
|
return e && t && rs(s) > 0 && Ae(s, (n, r) => {
|
|
1167
1167
|
if (n.eventName == e && n.fn.toString() == t.toString())
|
|
1168
1168
|
return i.found = !0, i.evt = r, !1;
|
|
@@ -1331,7 +1331,7 @@ function Ni(u, e, t) {
|
|
|
1331
1331
|
function bi() {
|
|
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
|
-
function
|
|
1334
|
+
function Ps() {
|
|
1335
1335
|
return typeof document > "u" ? !1 : bi() !== null || document.createTouch !== void 0 || "ontouchstart" in window || "onmsgesturechange" in window || navigator.msMaxTouchPoints;
|
|
1336
1336
|
}
|
|
1337
1337
|
function ge(u) {
|
|
@@ -1346,7 +1346,7 @@ function tt(u) {
|
|
|
1346
1346
|
function ns(u) {
|
|
1347
1347
|
return Array.isArray(u);
|
|
1348
1348
|
}
|
|
1349
|
-
function
|
|
1349
|
+
function Pi(u) {
|
|
1350
1350
|
return u && u.length && isFinite(u.length);
|
|
1351
1351
|
}
|
|
1352
1352
|
function dt(u) {
|
|
@@ -1372,7 +1372,7 @@ function rs(u) {
|
|
|
1372
1372
|
function zt(u) {
|
|
1373
1373
|
return !isNaN(parseFloat(u)) && isFinite(u);
|
|
1374
1374
|
}
|
|
1375
|
-
function
|
|
1375
|
+
function Di(u = -1) {
|
|
1376
1376
|
const e = document.querySelectorAll(".gbtn[data-taborder]:not(.disabled)");
|
|
1377
1377
|
if (!e.length)
|
|
1378
1378
|
return !1;
|
|
@@ -1389,7 +1389,7 @@ function Pi(u = -1) {
|
|
|
1389
1389
|
const r = t.filter((a) => a >= parseInt(i)).sort()[0];
|
|
1390
1390
|
return document.querySelector(`.gbtn[data-taborder="${r}"]`);
|
|
1391
1391
|
}
|
|
1392
|
-
function
|
|
1392
|
+
function Ds(u) {
|
|
1393
1393
|
if (u.events.hasOwnProperty("keyboard"))
|
|
1394
1394
|
return !1;
|
|
1395
1395
|
u.events.keyboard = Xe("keydown", {
|
|
@@ -1409,25 +1409,25 @@ function Ps(u) {
|
|
|
1409
1409
|
if (!n || n.length <= 0)
|
|
1410
1410
|
return;
|
|
1411
1411
|
if (!i) {
|
|
1412
|
-
const l =
|
|
1412
|
+
const l = Di();
|
|
1413
1413
|
l && (l.focus(), ae(l, "focused"));
|
|
1414
1414
|
return;
|
|
1415
1415
|
}
|
|
1416
|
-
let r = i.getAttribute("data-taborder"), a =
|
|
1416
|
+
let r = i.getAttribute("data-taborder"), a = Di(r);
|
|
1417
1417
|
je(i, "focused"), a && (a.focus(), ae(a, "focused"));
|
|
1418
1418
|
}
|
|
1419
1419
|
s == 39 && u.nextSlide(), s == 37 && u.prevSlide(), s == 27 && u.close();
|
|
1420
1420
|
}
|
|
1421
1421
|
});
|
|
1422
1422
|
}
|
|
1423
|
-
function
|
|
1423
|
+
function Yt(u) {
|
|
1424
1424
|
return Math.sqrt(u.x * u.x + u.y * u.y);
|
|
1425
1425
|
}
|
|
1426
1426
|
function $s(u, e) {
|
|
1427
1427
|
return u.x * e.x + u.y * e.y;
|
|
1428
1428
|
}
|
|
1429
1429
|
function Hs(u, e) {
|
|
1430
|
-
var t =
|
|
1430
|
+
var t = Yt(u) * Yt(e);
|
|
1431
1431
|
if (t === 0)
|
|
1432
1432
|
return 0;
|
|
1433
1433
|
var s = $s(u, e) / t;
|
|
@@ -1483,7 +1483,7 @@ class Us {
|
|
|
1483
1483
|
if (i > 1) {
|
|
1484
1484
|
this._cancelLongTap(), this._cancelSingleTap();
|
|
1485
1485
|
var n = { x: e.touches[1].pageX - this.x1, y: e.touches[1].pageY - this.y1 };
|
|
1486
|
-
s.x = n.x, s.y = n.y, this.pinchStartLen =
|
|
1486
|
+
s.x = n.x, s.y = n.y, this.pinchStartLen = Yt(s), this.multipointStart.dispatch(e, this.element);
|
|
1487
1487
|
}
|
|
1488
1488
|
this._preventTap = !1, this.longTapTimeout = setTimeout(
|
|
1489
1489
|
(function() {
|
|
@@ -1497,7 +1497,7 @@ class Us {
|
|
|
1497
1497
|
var t = this.preV, s = e.touches.length, i = e.touches[0].pageX, n = e.touches[0].pageY;
|
|
1498
1498
|
if (this.isDoubleTap = !1, s > 1) {
|
|
1499
1499
|
var r = e.touches[1].pageX, a = e.touches[1].pageY, l = { x: e.touches[1].pageX - i, y: e.touches[1].pageY - n };
|
|
1500
|
-
t.x !== null && (this.pinchStartLen > 0 && (e.zoom =
|
|
1500
|
+
t.x !== null && (this.pinchStartLen > 0 && (e.zoom = Yt(l) / this.pinchStartLen, this.pinch.dispatch(e, this.element)), e.angle = Vs(l, t), this.rotate.dispatch(e, this.element)), t.x = l.x, t.y = l.y, this.x2 !== null && this.sx2 !== null ? (e.deltaX = (i - this.x2 + r - this.sx2) / 2, e.deltaY = (n - this.y2 + a - this.sy2) / 2) : (e.deltaX = 0, e.deltaY = 0), this.twoFingerPressMove.dispatch(e, this.element), this.sx2 = r, this.sy2 = a;
|
|
1501
1501
|
} else {
|
|
1502
1502
|
if (this.x2 !== null) {
|
|
1503
1503
|
e.deltaX = i - this.x2, e.deltaY = n - this.y2;
|
|
@@ -1559,31 +1559,31 @@ function ri(u) {
|
|
|
1559
1559
|
}
|
|
1560
1560
|
}), s.style.opacity = "", n && (n.style.opacity = "");
|
|
1561
1561
|
}
|
|
1562
|
-
function
|
|
1562
|
+
function Fs(u) {
|
|
1563
1563
|
if (u.events.hasOwnProperty("touch"))
|
|
1564
1564
|
return !1;
|
|
1565
|
-
let e = ss(), t = e.width, s = e.height, i = !1, n = null, r = null, a = null, l = !1, c = 1, d = 4.5, o = 1, h = !1, p = !1, g = null, w = null, S = null, b = null, x, m, v = 0, _ = 0, f = !1, y = !1, k = {}, C = {}, T = 0, A = 0,
|
|
1566
|
-
const B = document.getElementById("glightbox-slider"),
|
|
1567
|
-
touchStart: (
|
|
1568
|
-
if (i = !0, (Ve(
|
|
1569
|
-
if (C =
|
|
1565
|
+
let e = ss(), t = e.width, s = e.height, i = !1, n = null, r = null, a = null, l = !1, c = 1, d = 4.5, o = 1, h = !1, p = !1, g = null, w = null, S = null, b = null, x, m, v = 0, _ = 0, f = !1, y = !1, k = {}, C = {}, T = 0, A = 0, R;
|
|
1566
|
+
const B = document.getElementById("glightbox-slider"), P = document.querySelector(".goverlay"), D = new Us(B, {
|
|
1567
|
+
touchStart: (M) => {
|
|
1568
|
+
if (i = !0, (Ve(M.targetTouches[0].target, "ginner-container") || Qe(M.targetTouches[0].target, ".gslide-desc") || M.targetTouches[0].target.nodeName.toLowerCase() == "a") && (i = !1), Qe(M.targetTouches[0].target, ".gslide-inline") && !Ve(M.targetTouches[0].target.parentNode, "gslide-inline") && (i = !1), i) {
|
|
1569
|
+
if (C = M.targetTouches[0], k.pageX = M.targetTouches[0].pageX, k.pageY = M.targetTouches[0].pageY, T = M.targetTouches[0].clientX, A = M.targetTouches[0].clientY, n = u.activeSlide, r = n.querySelector(".gslide-media"), R = n.querySelector(".gslide-inline"), a = null, Ve(r, "gslide-image") && (a = r.querySelector("img")), (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) > 769 && (r = n.querySelector(".ginner-container")), je(P, "greset"), M.pageX > 20 && M.pageX < window.innerWidth - 20)
|
|
1570
1570
|
return;
|
|
1571
|
-
|
|
1571
|
+
M.preventDefault();
|
|
1572
1572
|
}
|
|
1573
1573
|
},
|
|
1574
|
-
touchMove: (
|
|
1575
|
-
if (!i || (C =
|
|
1574
|
+
touchMove: (M) => {
|
|
1575
|
+
if (!i || (C = M.targetTouches[0], h || p))
|
|
1576
1576
|
return;
|
|
1577
|
-
if (
|
|
1577
|
+
if (R && R.offsetHeight > s) {
|
|
1578
1578
|
const U = k.pageX - C.pageX;
|
|
1579
1579
|
if (Math.abs(U) <= 13)
|
|
1580
1580
|
return !1;
|
|
1581
1581
|
}
|
|
1582
1582
|
l = !0;
|
|
1583
|
-
let
|
|
1583
|
+
let q = M.targetTouches[0].clientX, I = M.targetTouches[0].clientY, E = T - q, $ = A - I;
|
|
1584
1584
|
Math.abs(E) > Math.abs($) ? (f = !1, y = !0) : (y = !1, f = !0), x = C.pageX - k.pageX, v = x * 100 / t, m = C.pageY - k.pageY, _ = m * 100 / s;
|
|
1585
1585
|
let H;
|
|
1586
|
-
if (f && a && (H = 1 - Math.abs(m) / s,
|
|
1586
|
+
if (f && a && (H = 1 - Math.abs(m) / s, P.style.opacity = H, u.settings.touchFollowAxis && (v = 0)), y && (H = 1 - Math.abs(x) / t, r.style.opacity = H, u.settings.touchFollowAxis && (_ = 0)), !a)
|
|
1587
1587
|
return Ht(r, `translate3d(${v}%, 0, 0)`);
|
|
1588
1588
|
Ht(r, `translate3d(${v}%, ${_}%, 0)`);
|
|
1589
1589
|
},
|
|
@@ -1594,13 +1594,13 @@ function Ys(u) {
|
|
|
1594
1594
|
S = g, b = w;
|
|
1595
1595
|
return;
|
|
1596
1596
|
}
|
|
1597
|
-
const
|
|
1598
|
-
if (
|
|
1597
|
+
const M = Math.abs(parseInt(_)), q = Math.abs(parseInt(v));
|
|
1598
|
+
if (M > 29 && a) {
|
|
1599
1599
|
u.close();
|
|
1600
1600
|
return;
|
|
1601
1601
|
}
|
|
1602
|
-
if (
|
|
1603
|
-
return ae(
|
|
1602
|
+
if (M < 29 && q < 25)
|
|
1603
|
+
return ae(P, "greset"), P.style.opacity = 1, ri(r);
|
|
1604
1604
|
},
|
|
1605
1605
|
multipointEnd: () => {
|
|
1606
1606
|
setTimeout(() => {
|
|
@@ -1610,37 +1610,37 @@ function Ys(u) {
|
|
|
1610
1610
|
multipointStart: () => {
|
|
1611
1611
|
h = !0, c = o || 1;
|
|
1612
1612
|
},
|
|
1613
|
-
pinch: (
|
|
1613
|
+
pinch: (M) => {
|
|
1614
1614
|
if (!a || l)
|
|
1615
1615
|
return !1;
|
|
1616
|
-
h = !0, a.scaleX = a.scaleY = c *
|
|
1617
|
-
let
|
|
1618
|
-
if (p = !0,
|
|
1619
|
-
p = !1,
|
|
1616
|
+
h = !0, a.scaleX = a.scaleY = c * M.zoom;
|
|
1617
|
+
let q = c * M.zoom;
|
|
1618
|
+
if (p = !0, q <= 1) {
|
|
1619
|
+
p = !1, q = 1, b = null, S = null, g = null, w = null, a.setAttribute("style", "");
|
|
1620
1620
|
return;
|
|
1621
1621
|
}
|
|
1622
|
-
|
|
1622
|
+
q > d && (q = d), a.style.transform = `scale3d(${q}, ${q}, 1)`, o = q;
|
|
1623
1623
|
},
|
|
1624
|
-
pressMove: (
|
|
1624
|
+
pressMove: (M) => {
|
|
1625
1625
|
if (p && !h) {
|
|
1626
|
-
var
|
|
1627
|
-
S && (
|
|
1628
|
-
let E = `translate3d(${
|
|
1626
|
+
var q = C.pageX - k.pageX, I = C.pageY - k.pageY;
|
|
1627
|
+
S && (q = q + S), b && (I = I + b), g = q, w = I;
|
|
1628
|
+
let E = `translate3d(${q}px, ${I}px, 0)`;
|
|
1629
1629
|
o && (E += ` scale3d(${o}, ${o}, 1)`), Ht(a, E);
|
|
1630
1630
|
}
|
|
1631
1631
|
},
|
|
1632
|
-
swipe: (
|
|
1632
|
+
swipe: (M) => {
|
|
1633
1633
|
if (!p) {
|
|
1634
1634
|
if (h) {
|
|
1635
1635
|
h = !1;
|
|
1636
1636
|
return;
|
|
1637
1637
|
}
|
|
1638
|
-
if (
|
|
1638
|
+
if (M.direction == "Left") {
|
|
1639
1639
|
if (u.index == u.elements.length - 1)
|
|
1640
1640
|
return ri(r);
|
|
1641
1641
|
u.nextSlide();
|
|
1642
1642
|
}
|
|
1643
|
-
if (
|
|
1643
|
+
if (M.direction == "Right") {
|
|
1644
1644
|
if (u.index == 0)
|
|
1645
1645
|
return ri(r);
|
|
1646
1646
|
u.prevSlide();
|
|
@@ -1648,9 +1648,9 @@ function Ys(u) {
|
|
|
1648
1648
|
}
|
|
1649
1649
|
}
|
|
1650
1650
|
});
|
|
1651
|
-
u.events.touch =
|
|
1651
|
+
u.events.touch = D;
|
|
1652
1652
|
}
|
|
1653
|
-
class
|
|
1653
|
+
class Ys {
|
|
1654
1654
|
constructor(e, t, s = null) {
|
|
1655
1655
|
if (this.img = e, this.slide = t, this.onclose = s, this.img.setZoomEvents)
|
|
1656
1656
|
return !1;
|
|
@@ -2000,7 +2000,7 @@ class It {
|
|
|
2000
2000
|
toleranceY: s.dragToleranceY,
|
|
2001
2001
|
slide: e,
|
|
2002
2002
|
instance: this.instance
|
|
2003
|
-
}), i.zoomable && w.naturalWidth > w.offsetWidth && (ae(w, "zoomable"), new
|
|
2003
|
+
}), i.zoomable && w.naturalWidth > w.offsetWidth && (ae(w, "zoomable"), new Ys(w, e, () => {
|
|
2004
2004
|
this.instance.resize();
|
|
2005
2005
|
})), ge(h) && h();
|
|
2006
2006
|
});
|
|
@@ -2064,7 +2064,7 @@ class It {
|
|
|
2064
2064
|
return this.slideConfig = e.parseConfig(this.element, this.instance.settings), this.slideConfig;
|
|
2065
2065
|
}
|
|
2066
2066
|
}
|
|
2067
|
-
const Qs = "3.2.0", zi = bi(), Vi =
|
|
2067
|
+
const Qs = "3.2.0", zi = bi(), Vi = Ps();
|
|
2068
2068
|
let oi;
|
|
2069
2069
|
typeof document > "u" || (oi = document.getElementsByTagName("html")[0]);
|
|
2070
2070
|
const yi = {
|
|
@@ -2197,7 +2197,7 @@ class Bi {
|
|
|
2197
2197
|
var r = document.createElement("style");
|
|
2198
2198
|
r.type = "text/css", r.className = "gcss-styles", r.innerText = `.gscrollbar-fixer {margin-right: ${n}px}`, document.head.appendChild(r), ae(i, "gscrollbar-fixer");
|
|
2199
2199
|
}
|
|
2200
|
-
ae(i, "glightbox-open"), ae(oi, "glightbox-open"), zi && (ae(document.body, "glightbox-mobile"), this.settings.slideEffect = "slide"), this.showSlide(s, !0), this.elements.length === 1 ? (ae(this.prevButton, "glightbox-button-hidden"), ae(this.nextButton, "glightbox-button-hidden")) : (je(this.prevButton, "glightbox-button-hidden"), je(this.nextButton, "glightbox-button-hidden")), this.lightboxOpen = !0, this.trigger("open"), ge(this.settings.onOpen) && this.settings.onOpen(), Vi && this.settings.touchNavigation &&
|
|
2200
|
+
ae(i, "glightbox-open"), ae(oi, "glightbox-open"), zi && (ae(document.body, "glightbox-mobile"), this.settings.slideEffect = "slide"), this.showSlide(s, !0), this.elements.length === 1 ? (ae(this.prevButton, "glightbox-button-hidden"), ae(this.nextButton, "glightbox-button-hidden")) : (je(this.prevButton, "glightbox-button-hidden"), je(this.nextButton, "glightbox-button-hidden")), this.lightboxOpen = !0, this.trigger("open"), ge(this.settings.onOpen) && this.settings.onOpen(), Vi && this.settings.touchNavigation && Fs(this), this.settings.keyboardNavigation && Ds(this);
|
|
2201
2201
|
}
|
|
2202
2202
|
/**
|
|
2203
2203
|
* Open at specific index
|
|
@@ -2949,7 +2949,7 @@ function Ui(u, e) {
|
|
|
2949
2949
|
}
|
|
2950
2950
|
return t;
|
|
2951
2951
|
}
|
|
2952
|
-
function
|
|
2952
|
+
function Fi(u) {
|
|
2953
2953
|
for (var e = 1; e < arguments.length; e++) {
|
|
2954
2954
|
var t = arguments[e] != null ? arguments[e] : {};
|
|
2955
2955
|
e % 2 ? Ui(Object(t), !0).forEach(function(s) {
|
|
@@ -3309,7 +3309,7 @@ function di(u, e) {
|
|
|
3309
3309
|
t.classes = Object.assign({}, u.classes, e.classes);
|
|
3310
3310
|
var s = ["direction", "type", "slide", "arrow", "nav"];
|
|
3311
3311
|
s.forEach(function(i) {
|
|
3312
|
-
e.classes.hasOwnProperty(i) && (t.classes[i] =
|
|
3312
|
+
e.classes.hasOwnProperty(i) && (t.classes[i] = Fi(Fi({}, u.classes[i]), e.classes[i]));
|
|
3313
3313
|
});
|
|
3314
3314
|
}
|
|
3315
3315
|
return e.hasOwnProperty("breakpoints") && (t.breakpoints = Object.assign({}, u.breakpoints, e.breakpoints)), t;
|
|
@@ -3697,14 +3697,14 @@ function gn(u, e, t) {
|
|
|
3697
3697
|
}
|
|
3698
3698
|
}), s;
|
|
3699
3699
|
}
|
|
3700
|
-
function
|
|
3700
|
+
function Yi() {
|
|
3701
3701
|
return (/* @__PURE__ */ new Date()).getTime();
|
|
3702
3702
|
}
|
|
3703
3703
|
function Kt(u, e) {
|
|
3704
3704
|
var t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {}, s, i, n, r, a = 0, l = function() {
|
|
3705
|
-
a = t.leading === !1 ? 0 :
|
|
3705
|
+
a = t.leading === !1 ? 0 : Yi(), s = null, r = u.apply(i, n), s || (i = n = null);
|
|
3706
3706
|
}, c = function() {
|
|
3707
|
-
var o =
|
|
3707
|
+
var o = Yi();
|
|
3708
3708
|
!a && t.leading === !1 && (a = o);
|
|
3709
3709
|
var h = e - (o - a);
|
|
3710
3710
|
return i = this, n = arguments, h <= 0 || h > e ? (s && (clearTimeout(s), s = null), a = o, r = u.apply(i, n), s || (i = n = null)) : !s && t.trailing !== !1 && (s = setTimeout(l, h)), r;
|
|
@@ -4349,7 +4349,7 @@ function An(u, e) {
|
|
|
4349
4349
|
}
|
|
4350
4350
|
};
|
|
4351
4351
|
}
|
|
4352
|
-
function
|
|
4352
|
+
function Mn(u, e) {
|
|
4353
4353
|
return {
|
|
4354
4354
|
/**
|
|
4355
4355
|
* Modifies passed translate value with a `peek` setting.
|
|
@@ -4366,7 +4366,7 @@ function qn(u, e) {
|
|
|
4366
4366
|
}
|
|
4367
4367
|
};
|
|
4368
4368
|
}
|
|
4369
|
-
function
|
|
4369
|
+
function qn(u, e) {
|
|
4370
4370
|
return {
|
|
4371
4371
|
/**
|
|
4372
4372
|
* Modifies passed translate value with index in the `focusAt` setting.
|
|
@@ -4380,8 +4380,8 @@ function Rn(u, e) {
|
|
|
4380
4380
|
}
|
|
4381
4381
|
};
|
|
4382
4382
|
}
|
|
4383
|
-
function
|
|
4384
|
-
var s = [On, An,
|
|
4383
|
+
function Rn(u, e, t) {
|
|
4384
|
+
var s = [On, An, Mn, qn].concat(u._t, [Cn]);
|
|
4385
4385
|
return {
|
|
4386
4386
|
/**
|
|
4387
4387
|
* Piplines translate value with registered transformers.
|
|
@@ -4407,7 +4407,7 @@ function In(u, e, t) {
|
|
|
4407
4407
|
* @return {Void}
|
|
4408
4408
|
*/
|
|
4409
4409
|
set: function(n) {
|
|
4410
|
-
var r =
|
|
4410
|
+
var r = Rn(u, e).mutate(n), a = "translate3d(".concat(-1 * r, "px, 0px, 0px)");
|
|
4411
4411
|
e.Html.wrapper.style.mozTransform = a, e.Html.wrapper.style.webkitTransform = a, e.Html.wrapper.style.transform = a;
|
|
4412
4412
|
},
|
|
4413
4413
|
/**
|
|
@@ -4685,7 +4685,7 @@ function Nn(u, e, t) {
|
|
|
4685
4685
|
c.unbindSwipeStart(), c.unbindSwipeMove(), c.unbindSwipeEnd(), s.destroy();
|
|
4686
4686
|
}), c;
|
|
4687
4687
|
}
|
|
4688
|
-
function
|
|
4688
|
+
function Pn(u, e, t) {
|
|
4689
4689
|
var s = new st(), i = {
|
|
4690
4690
|
/**
|
|
4691
4691
|
* Binds listener to glide wrapper.
|
|
@@ -4724,7 +4724,7 @@ function Dn(u, e, t) {
|
|
|
4724
4724
|
i.unbind(), s.destroy();
|
|
4725
4725
|
}), i;
|
|
4726
4726
|
}
|
|
4727
|
-
function
|
|
4727
|
+
function Dn(u, e, t) {
|
|
4728
4728
|
var s = new st(), i = !1, n = !1, r = {
|
|
4729
4729
|
/**
|
|
4730
4730
|
* Setups a initial state of anchors component.
|
|
@@ -5114,7 +5114,7 @@ function Un(u, e, t) {
|
|
|
5114
5114
|
function Zi(u) {
|
|
5115
5115
|
return pt(u) ? hn(u) : (it("Breakpoints option must be an object"), {});
|
|
5116
5116
|
}
|
|
5117
|
-
function
|
|
5117
|
+
function Fn(u, e, t) {
|
|
5118
5118
|
var s = new st(), i = u.settings, n = Zi(i.breakpoints), r = Object.assign({}, i), a = {
|
|
5119
5119
|
/**
|
|
5120
5120
|
* Matches settings for currectly matching media breakpoint.
|
|
@@ -5139,7 +5139,7 @@ function Yn(u, e, t) {
|
|
|
5139
5139
|
s.off("resize", window);
|
|
5140
5140
|
}), a;
|
|
5141
5141
|
}
|
|
5142
|
-
var
|
|
5142
|
+
var Yn = {
|
|
5143
5143
|
// Required
|
|
5144
5144
|
Html: yn,
|
|
5145
5145
|
Translate: In,
|
|
@@ -5155,12 +5155,12 @@ var Fn = {
|
|
|
5155
5155
|
Run: gn,
|
|
5156
5156
|
// Optional
|
|
5157
5157
|
Swipe: Nn,
|
|
5158
|
-
Images:
|
|
5159
|
-
Anchors:
|
|
5158
|
+
Images: Pn,
|
|
5159
|
+
Anchors: Dn,
|
|
5160
5160
|
Controls: Vn,
|
|
5161
5161
|
Keyboard: Bn,
|
|
5162
5162
|
Autoplay: Un,
|
|
5163
|
-
Breakpoints:
|
|
5163
|
+
Breakpoints: Fn
|
|
5164
5164
|
}, Wn = /* @__PURE__ */ (function(u) {
|
|
5165
5165
|
sn(t, u);
|
|
5166
5166
|
var e = on(t);
|
|
@@ -5171,7 +5171,7 @@ var Fn = {
|
|
|
5171
5171
|
key: "mount",
|
|
5172
5172
|
value: function() {
|
|
5173
5173
|
var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
5174
|
-
return Bt(ht(t.prototype), "mount", this).call(this, Object.assign({},
|
|
5174
|
+
return Bt(ht(t.prototype), "mount", this).call(this, Object.assign({}, Yn, i));
|
|
5175
5175
|
}
|
|
5176
5176
|
}]), t;
|
|
5177
5177
|
})(fn);
|
|
@@ -5328,7 +5328,7 @@ const Be = {
|
|
|
5328
5328
|
...fi,
|
|
5329
5329
|
br: de(ps).replace("{2,}", "*").getRegex(),
|
|
5330
5330
|
text: de(fi.text).replace("\\b_", "\\b_| {2,}\\n").replace(/\{2,\}/g, "*").getRegex()
|
|
5331
|
-
},
|
|
5331
|
+
}, Pt = {
|
|
5332
5332
|
normal: Ei,
|
|
5333
5333
|
gfm: nr,
|
|
5334
5334
|
pedantic: rr
|
|
@@ -5926,17 +5926,17 @@ class Je {
|
|
|
5926
5926
|
};
|
|
5927
5927
|
const t = {
|
|
5928
5928
|
other: Be,
|
|
5929
|
-
block:
|
|
5929
|
+
block: Pt.normal,
|
|
5930
5930
|
inline: ft.normal
|
|
5931
5931
|
};
|
|
5932
|
-
this.options.pedantic ? (t.block =
|
|
5932
|
+
this.options.pedantic ? (t.block = Pt.pedantic, t.inline = ft.pedantic) : this.options.gfm && (t.block = Pt.gfm, this.options.breaks ? t.inline = ft.breaks : t.inline = ft.gfm), this.tokenizer.rules = t;
|
|
5933
5933
|
}
|
|
5934
5934
|
/**
|
|
5935
5935
|
* Expose Rules
|
|
5936
5936
|
*/
|
|
5937
5937
|
static get rules() {
|
|
5938
5938
|
return {
|
|
5939
|
-
block:
|
|
5939
|
+
block: Pt,
|
|
5940
5940
|
inline: ft
|
|
5941
5941
|
};
|
|
5942
5942
|
}
|
|
@@ -8447,7 +8447,7 @@ Check the information and return the details.
|
|
|
8447
8447
|
} = this.getDimension(x);
|
|
8448
8448
|
S = U, b = J;
|
|
8449
8449
|
}
|
|
8450
|
-
let v = e.color1_red, _ = e.color1_green, f = e.color1_blue, y = e.color2_red, k = e.color2_green, C = e.color2_blue, T = e.color3_red, A = e.color3_green,
|
|
8450
|
+
let v = e.color1_red, _ = e.color1_green, f = e.color1_blue, y = e.color2_red, k = e.color2_green, C = e.color2_blue, T = e.color3_red, A = e.color3_green, R = e.color3_blue, B = e.color4_red, P = e.color4_green, D = e.color4_blue, M = e.color5_red, q = e.color5_green, I = e.color5_blue, E = [];
|
|
8451
8451
|
v && _ && f && !(v === "0" && _ === "0" && f === "0") && E.push({
|
|
8452
8452
|
r: v,
|
|
8453
8453
|
g: _,
|
|
@@ -8456,24 +8456,24 @@ Check the information and return the details.
|
|
|
8456
8456
|
r: y,
|
|
8457
8457
|
g: k,
|
|
8458
8458
|
b: C
|
|
8459
|
-
}), T && A &&
|
|
8459
|
+
}), T && A && R && !(T === "0" && A === "0" && R === "0") && E.push({
|
|
8460
8460
|
r: T,
|
|
8461
8461
|
g: A,
|
|
8462
|
-
b:
|
|
8463
|
-
}), B &&
|
|
8462
|
+
b: R
|
|
8463
|
+
}), B && P && D && !(B === "0" && P === "0" && D === "0") && E.push({
|
|
8464
8464
|
r: B,
|
|
8465
|
-
g:
|
|
8466
|
-
b:
|
|
8467
|
-
}),
|
|
8468
|
-
r:
|
|
8469
|
-
g:
|
|
8465
|
+
g: P,
|
|
8466
|
+
b: D
|
|
8467
|
+
}), M && q && I && !(M === "0" && q === "0" && I === "0") && E.push({
|
|
8468
|
+
r: M,
|
|
8469
|
+
g: q,
|
|
8470
8470
|
b: I
|
|
8471
8471
|
});
|
|
8472
8472
|
let H = await (async () => {
|
|
8473
8473
|
let U = [], J = this.builder.getFormValues();
|
|
8474
|
-
for (const
|
|
8475
|
-
if (
|
|
8476
|
-
const ee =
|
|
8474
|
+
for (const Y of J)
|
|
8475
|
+
if (Y.value instanceof FileList && Y.type === "multifile") {
|
|
8476
|
+
const ee = Y.value;
|
|
8477
8477
|
if (ee.length > 0) {
|
|
8478
8478
|
let Q = 0;
|
|
8479
8479
|
for (const he of ee) {
|
|
@@ -8578,7 +8578,7 @@ Check the information and return the details.
|
|
|
8578
8578
|
};
|
|
8579
8579
|
let S = e.width || 1280, b = e.height || 768, x = e.num_images || 1;
|
|
8580
8580
|
x > 4 && (x = 4);
|
|
8581
|
-
let m = e.style || "any", v = e.style_id || this.builder.settings._2dIllustrationStyleId, _ = e.color1_red, f = e.color1_green, y = e.color1_blue, k = e.color2_red, C = e.color2_green, T = e.color2_blue, A = e.color3_red,
|
|
8581
|
+
let m = e.style || "any", v = e.style_id || this.builder.settings._2dIllustrationStyleId, _ = e.color1_red, f = e.color1_green, y = e.color1_blue, k = e.color2_red, C = e.color2_green, T = e.color2_blue, A = e.color3_red, R = e.color3_green, B = e.color3_blue, P = e.color4_red, D = e.color4_green, M = e.color4_blue, q = e.color5_red, I = e.color5_green, E = e.color5_blue, $ = [];
|
|
8582
8582
|
_ && f && y && !(_ === "0" && f === "0" && y === "0") && $.push({
|
|
8583
8583
|
r: _,
|
|
8584
8584
|
g: f,
|
|
@@ -8587,16 +8587,16 @@ Check the information and return the details.
|
|
|
8587
8587
|
r: k,
|
|
8588
8588
|
g: C,
|
|
8589
8589
|
b: T
|
|
8590
|
-
}), A &&
|
|
8590
|
+
}), A && R && B && !(A === "0" && R === "0" && B === "0") && $.push({
|
|
8591
8591
|
r: A,
|
|
8592
|
-
g:
|
|
8592
|
+
g: R,
|
|
8593
8593
|
b: B
|
|
8594
|
-
}),
|
|
8595
|
-
r:
|
|
8596
|
-
g:
|
|
8597
|
-
b:
|
|
8598
|
-
}),
|
|
8599
|
-
r:
|
|
8594
|
+
}), P && D && M && !(P === "0" && D === "0" && M === "0") && $.push({
|
|
8595
|
+
r: P,
|
|
8596
|
+
g: D,
|
|
8597
|
+
b: M
|
|
8598
|
+
}), q && I && E && !(q === "0" && I === "0" && E === "0") && $.push({
|
|
8599
|
+
r: q,
|
|
8600
8600
|
g: I,
|
|
8601
8601
|
b: E
|
|
8602
8602
|
}), n = {
|
|
@@ -8627,7 +8627,7 @@ Check the information and return the details.
|
|
|
8627
8627
|
};
|
|
8628
8628
|
let S = e.width || 1280, b = e.height || 768, x = e.num_images || 1;
|
|
8629
8629
|
x > 4 && (x = 4);
|
|
8630
|
-
let m = e.style || "digital_illustration", v = e.color1_red, _ = e.color1_green, f = e.color1_blue, y = e.color2_red, k = e.color2_green, C = e.color2_blue, T = e.color3_red, A = e.color3_green,
|
|
8630
|
+
let m = e.style || "digital_illustration", v = e.color1_red, _ = e.color1_green, f = e.color1_blue, y = e.color2_red, k = e.color2_green, C = e.color2_blue, T = e.color3_red, A = e.color3_green, R = e.color3_blue, B = e.color4_red, P = e.color4_green, D = e.color4_blue, M = e.color5_red, q = e.color5_green, I = e.color5_blue, E = [];
|
|
8631
8631
|
v && _ && f && !(v === "0" && _ === "0" && f === "0") && E.push({
|
|
8632
8632
|
r: v,
|
|
8633
8633
|
g: _,
|
|
@@ -8636,17 +8636,17 @@ Check the information and return the details.
|
|
|
8636
8636
|
r: y,
|
|
8637
8637
|
g: k,
|
|
8638
8638
|
b: C
|
|
8639
|
-
}), T && A &&
|
|
8639
|
+
}), T && A && R && !(T === "0" && A === "0" && R === "0") && E.push({
|
|
8640
8640
|
r: T,
|
|
8641
8641
|
g: A,
|
|
8642
|
-
b:
|
|
8643
|
-
}), B &&
|
|
8642
|
+
b: R
|
|
8643
|
+
}), B && P && D && !(B === "0" && P === "0" && D === "0") && E.push({
|
|
8644
8644
|
r: B,
|
|
8645
|
-
g:
|
|
8646
|
-
b:
|
|
8647
|
-
}),
|
|
8648
|
-
r:
|
|
8649
|
-
g:
|
|
8645
|
+
g: P,
|
|
8646
|
+
b: D
|
|
8647
|
+
}), M && q && I && !(M === "0" && q === "0" && I === "0") && E.push({
|
|
8648
|
+
r: M,
|
|
8649
|
+
g: q,
|
|
8650
8650
|
b: I
|
|
8651
8651
|
}), n = {
|
|
8652
8652
|
prompt: w,
|
|
@@ -8676,7 +8676,7 @@ Check the information and return the details.
|
|
|
8676
8676
|
};
|
|
8677
8677
|
let S = e.width || 1024, b = e.height || 1365, x = e.num_images || 1;
|
|
8678
8678
|
x > 4 && (x = 1);
|
|
8679
|
-
let m = "digital_illustration/cover", v = e.color1_red, _ = e.color1_green, f = e.color1_blue, y = e.color2_red, k = e.color2_green, C = e.color2_blue, T = e.color3_red, A = e.color3_green,
|
|
8679
|
+
let m = "digital_illustration/cover", v = e.color1_red, _ = e.color1_green, f = e.color1_blue, y = e.color2_red, k = e.color2_green, C = e.color2_blue, T = e.color3_red, A = e.color3_green, R = e.color3_blue, B = e.color4_red, P = e.color4_green, D = e.color4_blue, M = e.color5_red, q = e.color5_green, I = e.color5_blue, E = [];
|
|
8680
8680
|
v && _ && f && !(v === "0" && _ === "0" && f === "0") && E.push({
|
|
8681
8681
|
r: v,
|
|
8682
8682
|
g: _,
|
|
@@ -8685,17 +8685,17 @@ Check the information and return the details.
|
|
|
8685
8685
|
r: y,
|
|
8686
8686
|
g: k,
|
|
8687
8687
|
b: C
|
|
8688
|
-
}), T && A &&
|
|
8688
|
+
}), T && A && R && !(T === "0" && A === "0" && R === "0") && E.push({
|
|
8689
8689
|
r: T,
|
|
8690
8690
|
g: A,
|
|
8691
|
-
b:
|
|
8692
|
-
}), B &&
|
|
8691
|
+
b: R
|
|
8692
|
+
}), B && P && D && !(B === "0" && P === "0" && D === "0") && E.push({
|
|
8693
8693
|
r: B,
|
|
8694
|
-
g:
|
|
8695
|
-
b:
|
|
8696
|
-
}),
|
|
8697
|
-
r:
|
|
8698
|
-
g:
|
|
8694
|
+
g: P,
|
|
8695
|
+
b: D
|
|
8696
|
+
}), M && q && I && !(M === "0" && q === "0" && I === "0") && E.push({
|
|
8697
|
+
r: M,
|
|
8698
|
+
g: q,
|
|
8699
8699
|
b: I
|
|
8700
8700
|
}), n = {
|
|
8701
8701
|
prompt: w,
|
|
@@ -9294,7 +9294,7 @@ Check the information and return the details.
|
|
|
9294
9294
|
return e;
|
|
9295
9295
|
}
|
|
9296
9296
|
}
|
|
9297
|
-
class
|
|
9297
|
+
class Mr {
|
|
9298
9298
|
constructor(e = {}, t) {
|
|
9299
9299
|
const s = {
|
|
9300
9300
|
lang: []
|
|
@@ -9474,7 +9474,7 @@ class qr {
|
|
|
9474
9474
|
return e;
|
|
9475
9475
|
}
|
|
9476
9476
|
}
|
|
9477
|
-
class
|
|
9477
|
+
class qr {
|
|
9478
9478
|
constructor(e, t = {}) {
|
|
9479
9479
|
const s = {
|
|
9480
9480
|
lang: []
|
|
@@ -9615,17 +9615,17 @@ class Rr {
|
|
|
9615
9615
|
g.width = E * H, g.height = $ * H, w.scale(H, H), g.style.width = `${E}px`, g.style.height = `${$}px`;
|
|
9616
9616
|
const U = k.naturalWidth, J = k.naturalHeight;
|
|
9617
9617
|
if (S.width = U * H, S.height = J * H, b.scale(H, H), S.style.width = `${U}px`, S.style.height = `${J}px`, C) {
|
|
9618
|
-
const
|
|
9619
|
-
|
|
9618
|
+
const Y = document.createElement("canvas");
|
|
9619
|
+
Y.width = C.width, Y.height = C.height, Y.getContext("2d").putImageData(C, 0, 0);
|
|
9620
9620
|
const Q = document.createElement("canvas");
|
|
9621
|
-
Q.width = T.width, Q.height = T.height, Q.getContext("2d").putImageData(T, 0, 0), w.drawImage(
|
|
9621
|
+
Q.width = T.width, Q.height = T.height, Q.getContext("2d").putImageData(T, 0, 0), w.drawImage(Y, 0, 0, C.width, C.height, 0, 0, g.width, g.height), b.drawImage(Q, 0, 0, T.width, T.height, 0, 0, S.width, S.height);
|
|
9622
9622
|
}
|
|
9623
9623
|
};
|
|
9624
|
-
let
|
|
9624
|
+
let R = !1, B = parseInt(l.value, 10);
|
|
9625
9625
|
l.addEventListener("input", (E) => {
|
|
9626
9626
|
B = parseInt(E.target.value, 10);
|
|
9627
9627
|
});
|
|
9628
|
-
const
|
|
9628
|
+
const P = (E) => {
|
|
9629
9629
|
const $ = g.getBoundingClientRect();
|
|
9630
9630
|
if (E.touches) {
|
|
9631
9631
|
const H = E.touches[0];
|
|
@@ -9638,26 +9638,26 @@ class Rr {
|
|
|
9638
9638
|
x: E.clientX - $.left,
|
|
9639
9639
|
y: E.clientY - $.top
|
|
9640
9640
|
};
|
|
9641
|
-
},
|
|
9642
|
-
|
|
9643
|
-
},
|
|
9644
|
-
|
|
9645
|
-
},
|
|
9646
|
-
if (!
|
|
9641
|
+
}, D = (E) => {
|
|
9642
|
+
R = !0, q(E);
|
|
9643
|
+
}, M = () => {
|
|
9644
|
+
R = !1, w.beginPath(), this.empty = !1, m(S);
|
|
9645
|
+
}, q = (E) => {
|
|
9646
|
+
if (!R) return;
|
|
9647
9647
|
const {
|
|
9648
9648
|
x: $,
|
|
9649
9649
|
y: H
|
|
9650
|
-
} =
|
|
9651
|
-
w.fillStyle = "rgb(255, 255, 255)", w.beginPath(), w.arc($, H, B / 2, 0, Math.PI * 2), w.fill(), b.fillStyle = "rgb(255, 255, 255)", b.beginPath(), b.arc(
|
|
9650
|
+
} = P(E), U = S.width / g.width, J = S.height / g.height, Y = $ * U, ee = H * J;
|
|
9651
|
+
w.fillStyle = "rgb(255, 255, 255)", w.beginPath(), w.arc($, H, B / 2, 0, Math.PI * 2), w.fill(), b.fillStyle = "rgb(255, 255, 255)", b.beginPath(), b.arc(Y, ee, B / 2 * U, 0, Math.PI * 2), b.fill();
|
|
9652
9652
|
};
|
|
9653
|
-
g.addEventListener("mousedown",
|
|
9654
|
-
|
|
9653
|
+
g.addEventListener("mousedown", D), g.addEventListener("mouseup", M), g.addEventListener("mousemove", q), g.addEventListener("touchstart", (E) => {
|
|
9654
|
+
D(E), E.preventDefault();
|
|
9655
9655
|
}, {
|
|
9656
9656
|
passive: !1
|
|
9657
9657
|
}), g.addEventListener("touchend", (E) => {
|
|
9658
|
-
|
|
9658
|
+
M(), E.preventDefault();
|
|
9659
9659
|
}), g.addEventListener("touchmove", (E) => {
|
|
9660
|
-
|
|
9660
|
+
q(E), E.preventDefault();
|
|
9661
9661
|
}, {
|
|
9662
9662
|
passive: !1
|
|
9663
9663
|
}), o.addEventListener("click", (E) => {
|
|
@@ -9675,7 +9675,7 @@ class Rr {
|
|
|
9675
9675
|
});
|
|
9676
9676
|
}
|
|
9677
9677
|
}
|
|
9678
|
-
class
|
|
9678
|
+
class Rr {
|
|
9679
9679
|
constructor(e, t = {}) {
|
|
9680
9680
|
const s = {
|
|
9681
9681
|
lang: [],
|
|
@@ -9824,7 +9824,7 @@ class Mr {
|
|
|
9824
9824
|
throw new Error("A valid DOM element is required.");
|
|
9825
9825
|
e.classList.add("formview-container"), e.classList.add("fb-ui"), this.element = e, this.media = new Ar({
|
|
9826
9826
|
lang: this.settings.lang
|
|
9827
|
-
}, this), this.upload = new
|
|
9827
|
+
}, this), this.upload = new Mr({
|
|
9828
9828
|
lang: this.settings.lang
|
|
9829
9829
|
}, this);
|
|
9830
9830
|
}
|
|
@@ -10389,11 +10389,11 @@ class Mr {
|
|
|
10389
10389
|
const _ = document.createElement("select");
|
|
10390
10390
|
_.id = `dropdown_${b}`, _.name = w, o.isRequired && _.setAttribute("required", "required"), v.appendChild(_);
|
|
10391
10391
|
const f = document.createElement("option");
|
|
10392
|
-
if (f.setAttribute("selected", "selected"), f.setAttribute("disabled", "disabled"), f.value = "", f.innerText = o.placeholder, _.appendChild(f), o.choices && o.choices.forEach((A,
|
|
10392
|
+
if (f.setAttribute("selected", "selected"), f.setAttribute("disabled", "disabled"), f.value = "", f.innerText = o.placeholder, _.appendChild(f), o.choices && o.choices.forEach((A, R) => {
|
|
10393
10393
|
let B = A;
|
|
10394
|
-
o.choicesText && (B = o.choicesText[
|
|
10395
|
-
const
|
|
10396
|
-
|
|
10394
|
+
o.choicesText && (B = o.choicesText[R] || A);
|
|
10395
|
+
const P = document.createElement("option");
|
|
10396
|
+
P.value = A, P.innerText = B, _.appendChild(P), R === o.selected && (f.remove(), P.setAttribute("selected", "selected"));
|
|
10397
10397
|
}), o.showOtherItem) {
|
|
10398
10398
|
const A = document.createElement("option");
|
|
10399
10399
|
A.value = "other", A.innerText = o.otherText, _.appendChild(A);
|
|
@@ -10491,8 +10491,8 @@ class Mr {
|
|
|
10491
10491
|
`, y.appendChild(T));
|
|
10492
10492
|
const A = document.createElement("div");
|
|
10493
10493
|
A.className = "file-preview-container", m.appendChild(A);
|
|
10494
|
-
const
|
|
10495
|
-
|
|
10494
|
+
const R = document.createElement("div");
|
|
10495
|
+
R.className = "file-drop-info-highlight", R.id = `file_name_${b}`, m.appendChild(R), C && C.addEventListener("click", (N) => {
|
|
10496
10496
|
N.preventDefault(), _.click();
|
|
10497
10497
|
}), m.classList.add("disabledrop"), (!o.source || o.source && o.source === "local" || o.source && o.source === "local_and_camera") && (m.classList.remove("disabledrop"), m.addEventListener("dragover", (N) => {
|
|
10498
10498
|
N.preventDefault(), Array.from(N.dataTransfer.items).some((ie) => ie.kind === "file") && m.classList.add("drag-over");
|
|
@@ -10589,41 +10589,41 @@ class Mr {
|
|
|
10589
10589
|
extensions: ".rar"
|
|
10590
10590
|
}]
|
|
10591
10591
|
};
|
|
10592
|
-
let
|
|
10592
|
+
let P = [];
|
|
10593
10593
|
(o.allowedFileTypes || ["images", "videos", "audio", "documents", "others"]).forEach((N) => {
|
|
10594
10594
|
switch (N) {
|
|
10595
10595
|
case "images":
|
|
10596
|
-
|
|
10596
|
+
P = P.concat(B.images);
|
|
10597
10597
|
break;
|
|
10598
10598
|
case "videos":
|
|
10599
|
-
|
|
10599
|
+
P = P.concat(B.videos);
|
|
10600
10600
|
break;
|
|
10601
10601
|
case "audio":
|
|
10602
|
-
|
|
10602
|
+
P = P.concat(B.audio);
|
|
10603
10603
|
break;
|
|
10604
10604
|
case "documents":
|
|
10605
|
-
|
|
10605
|
+
P = P.concat(B.documents);
|
|
10606
10606
|
break;
|
|
10607
10607
|
case "others":
|
|
10608
|
-
|
|
10608
|
+
P = P.concat(B.others);
|
|
10609
10609
|
break;
|
|
10610
10610
|
}
|
|
10611
10611
|
});
|
|
10612
|
-
const
|
|
10613
|
-
_.setAttribute("accept",
|
|
10614
|
-
let
|
|
10612
|
+
const M = P.map((N) => N.type).join(",");
|
|
10613
|
+
_.setAttribute("accept", M);
|
|
10614
|
+
let q;
|
|
10615
10615
|
if (o.useImageMask) {
|
|
10616
10616
|
p.classList.add("image-mask");
|
|
10617
10617
|
const N = document.createElement("div");
|
|
10618
|
-
p.appendChild(N),
|
|
10618
|
+
p.appendChild(N), q = new qr(N, {
|
|
10619
10619
|
lang: this.settings.lang,
|
|
10620
10620
|
name: w + "_mask"
|
|
10621
|
-
}), this.objImageMask =
|
|
10621
|
+
}), this.objImageMask = q;
|
|
10622
10622
|
}
|
|
10623
10623
|
o.largePreview && p.classList.add("large-preview");
|
|
10624
10624
|
const I = () => {
|
|
10625
10625
|
const N = m.querySelector(".img-preview");
|
|
10626
|
-
N && (N.remove(), o.useImageMask &&
|
|
10626
|
+
N && (N.remove(), o.useImageMask && q.clearImage());
|
|
10627
10627
|
};
|
|
10628
10628
|
let E = `
|
|
10629
10629
|
<div class="div-livevideo">
|
|
@@ -10659,7 +10659,7 @@ class Mr {
|
|
|
10659
10659
|
</div>
|
|
10660
10660
|
`;
|
|
10661
10661
|
this.appendHtml(m, E);
|
|
10662
|
-
const $ = p.querySelector(".livevideo"), H = p.querySelector(".photo-captured"), U = p.querySelector(".btn-selectfile2"), J = p.querySelector(".btn-takephoto2"),
|
|
10662
|
+
const $ = p.querySelector(".livevideo"), H = p.querySelector(".photo-captured"), U = p.querySelector(".btn-selectfile2"), J = p.querySelector(".btn-takephoto2"), Y = p.querySelector(".btn-capturephoto"), ee = p.querySelector(".btn-clearphoto"), Q = p.querySelector(".btn-stopcamera");
|
|
10663
10663
|
this.photoBlob = {};
|
|
10664
10664
|
let he;
|
|
10665
10665
|
U && U.addEventListener("click", (N) => {
|
|
@@ -10673,10 +10673,10 @@ class Mr {
|
|
|
10673
10673
|
video: !0
|
|
10674
10674
|
}), $.srcObject = he;
|
|
10675
10675
|
} catch {
|
|
10676
|
-
alert("Unable to access the camera."), $.style.display = "none",
|
|
10676
|
+
alert("Unable to access the camera."), $.style.display = "none", Y.style.display = "none", Q.style.display = "none", y.style.display = "none", R.style.display = "none";
|
|
10677
10677
|
}
|
|
10678
10678
|
setTimeout(() => {
|
|
10679
|
-
J.style.display = "none", H.style.display = "none", $.style.display = "",
|
|
10679
|
+
J.style.display = "none", H.style.display = "none", $.style.display = "", Y.style.display = "", ee.style.display = "none", U && (U.style.display = "none"), J.style.display = "none", Q.style.display = "", y.style.display = "none", R.style.display = "none";
|
|
10680
10680
|
}, 100);
|
|
10681
10681
|
};
|
|
10682
10682
|
T && T.addEventListener("click", async (N) => {
|
|
@@ -10684,55 +10684,55 @@ class Mr {
|
|
|
10684
10684
|
}), J.addEventListener("click", async (N) => {
|
|
10685
10685
|
N.preventDefault(), Ee();
|
|
10686
10686
|
}), Q.addEventListener("click", () => {
|
|
10687
|
-
he && he.getTracks().forEach((N) => N.stop()), $.style.display = "none",
|
|
10688
|
-
}),
|
|
10689
|
-
if (N.preventDefault(), H.style.display = "", H.width = $.videoWidth, H.height = $.videoHeight, H.getContext("2d").drawImage($, 0, 0, H.width, H.height), he.getTracks().forEach((G) => G.stop()), $.style.display = "none",
|
|
10687
|
+
he && he.getTracks().forEach((N) => N.stop()), $.style.display = "none", Y.style.display = "none", Q.style.display = "none", J.style.display = "none", y.style.display = "", R.style.display = "";
|
|
10688
|
+
}), Y.addEventListener("click", (N) => {
|
|
10689
|
+
if (N.preventDefault(), H.style.display = "", H.width = $.videoWidth, H.height = $.videoHeight, H.getContext("2d").drawImage($, 0, 0, H.width, H.height), he.getTracks().forEach((G) => G.stop()), $.style.display = "none", Y.style.display = "none", ee.style.display = "", U && (U.style.display = ""), J.style.display = "", Q.style.display = "none", H.toBlob((G) => {
|
|
10690
10690
|
this.photoBlob[w] = G, _.removeAttribute("required");
|
|
10691
10691
|
}, "image/jpeg"), J.style.display = "", o.useImageMask) {
|
|
10692
10692
|
const G = H.toDataURL("image/jpeg");
|
|
10693
|
-
|
|
10693
|
+
q.setImage(G);
|
|
10694
10694
|
}
|
|
10695
10695
|
this.clearSelectedFiles();
|
|
10696
10696
|
});
|
|
10697
10697
|
const me = () => {
|
|
10698
|
-
this.photoBlob[w] = null, H.style.display = "none", H.getContext("2d").clearRect(0, 0, H.width, H.height), v.value !== "" ? o.isRequired && _.removeAttribute("required") : o.isRequired && _.setAttribute("required", "required"), ee.style.display = "none", U && (U.style.display = "none"), J.style.display = "none", y.style.display = "",
|
|
10698
|
+
this.photoBlob[w] = null, H.style.display = "none", H.getContext("2d").clearRect(0, 0, H.width, H.height), v.value !== "" ? o.isRequired && _.removeAttribute("required") : o.isRequired && _.setAttribute("required", "required"), ee.style.display = "none", U && (U.style.display = "none"), J.style.display = "none", y.style.display = "", R.style.display = "";
|
|
10699
10699
|
};
|
|
10700
10700
|
ee.addEventListener("click", () => {
|
|
10701
10701
|
me();
|
|
10702
10702
|
});
|
|
10703
10703
|
const Te = (N, G) => {
|
|
10704
10704
|
const ie = `.${N.split(".").pop().toLowerCase()}`;
|
|
10705
|
-
if (!
|
|
10705
|
+
if (!P.some((F) => F.extensions.split(", ").includes(ie)))
|
|
10706
10706
|
return;
|
|
10707
|
-
let fe = B.images.some((
|
|
10707
|
+
let fe = B.images.some((F) => F.extensions.split(", ").includes(ie));
|
|
10708
10708
|
if (o.useImageMask) {
|
|
10709
10709
|
if (!fe)
|
|
10710
10710
|
return;
|
|
10711
|
-
|
|
10711
|
+
q.loadUrl(N);
|
|
10712
10712
|
}
|
|
10713
|
-
me(),
|
|
10713
|
+
me(), R.innerHTML = "";
|
|
10714
10714
|
const le = document.createElement("div");
|
|
10715
|
-
|
|
10715
|
+
R.appendChild(le);
|
|
10716
10716
|
const se = document.createElement("button");
|
|
10717
10717
|
if (se.className = "btn-clearfile", se.innerHTML = `
|
|
10718
10718
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round">
|
|
10719
10719
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M19 20h-10.5l-4.21 -4.3a1 1 0 0 1 0 -1.41l10 -10a1 1 0 0 1 1.41 0l5 5a1 1 0 0 1 0 1.41l-9.2 9.3" /><path d="M18 13.3l-6.3 -6.3" />
|
|
10720
10720
|
</svg>
|
|
10721
|
-
`,
|
|
10721
|
+
`, R.appendChild(se), se.addEventListener("click", (F) => {
|
|
10722
10722
|
let pe = se.closest(".form-field").querySelector(".img-preview");
|
|
10723
|
-
pe && pe.remove(), v.value = "", _.value = "",
|
|
10724
|
-
const
|
|
10725
|
-
|
|
10726
|
-
this.stickyElement(
|
|
10727
|
-
}, 1e3),
|
|
10723
|
+
pe && pe.remove(), v.value = "", _.value = "", R.innerHTML = "", k.innerText = this.out(this.settings.fileUploadText), o.useImageMask && q.clearImage();
|
|
10724
|
+
const Me = document.querySelector(".formview-container .submit-container");
|
|
10725
|
+
Me && setTimeout(() => {
|
|
10726
|
+
this.stickyElement(Me);
|
|
10727
|
+
}, 1e3), F.preventDefault(), F.stopImmediatePropagation();
|
|
10728
10728
|
}), fe) {
|
|
10729
|
-
let
|
|
10730
|
-
|
|
10729
|
+
let F = m.querySelector(".formview-container .img-preview");
|
|
10730
|
+
F || (F = document.createElement("img"), F.className = "img-preview", m.appendChild(F)), F.src = N;
|
|
10731
10731
|
} else
|
|
10732
10732
|
I();
|
|
10733
10733
|
if (!G) {
|
|
10734
|
-
const
|
|
10735
|
-
this.settings.onInputChange && this.settings.onInputChange(
|
|
10734
|
+
const F = this.getFormValues();
|
|
10735
|
+
this.settings.onInputChange && this.settings.onInputChange(F);
|
|
10736
10736
|
}
|
|
10737
10737
|
const te = document.querySelector(".formview-container .submit-container");
|
|
10738
10738
|
te && setTimeout(() => {
|
|
@@ -10742,7 +10742,7 @@ class Mr {
|
|
|
10742
10742
|
o.value && Te(o.value, !0);
|
|
10743
10743
|
const ye = (N) => {
|
|
10744
10744
|
if (N) {
|
|
10745
|
-
if (!
|
|
10745
|
+
if (!P.some((se) => se.type === N.type)) {
|
|
10746
10746
|
alert(this.out("Invalid file type."));
|
|
10747
10747
|
return;
|
|
10748
10748
|
}
|
|
@@ -10751,19 +10751,19 @@ class Mr {
|
|
|
10751
10751
|
alert(this.out("Invalid file type."));
|
|
10752
10752
|
return;
|
|
10753
10753
|
}
|
|
10754
|
-
|
|
10754
|
+
q.loadImage(N);
|
|
10755
10755
|
}
|
|
10756
|
-
me(), v.value = "",
|
|
10756
|
+
me(), v.value = "", R.innerHTML = "";
|
|
10757
10757
|
const ie = document.createElement("div");
|
|
10758
|
-
ie.innerText = N.name,
|
|
10758
|
+
ie.innerText = N.name, R.appendChild(ie);
|
|
10759
10759
|
const ce = document.createElement("button");
|
|
10760
10760
|
if (ce.className = "btn-clearfile", ce.innerHTML = `
|
|
10761
10761
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
10762
10762
|
<path stroke-linecap="round" stroke-linejoin="round" d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0" />
|
|
10763
10763
|
</svg>
|
|
10764
|
-
`,
|
|
10765
|
-
let
|
|
10766
|
-
|
|
10764
|
+
`, R.appendChild(ce), ce.addEventListener("click", (se) => {
|
|
10765
|
+
let F = ce.closest(".form-field").querySelector(".img-preview");
|
|
10766
|
+
F && F.remove(), _.value = "", R.innerHTML = "", k.innerText = this.out(this.settings.fileUploadText), o.useImageMask && q.clearImage();
|
|
10767
10767
|
const Se = document.querySelector(".formview-container .submit-container");
|
|
10768
10768
|
Se && setTimeout(() => {
|
|
10769
10769
|
this.stickyElement(Se);
|
|
@@ -10771,8 +10771,8 @@ class Mr {
|
|
|
10771
10771
|
}), N.type.startsWith("image/")) {
|
|
10772
10772
|
const se = new FileReader();
|
|
10773
10773
|
se.onload = function(te) {
|
|
10774
|
-
let
|
|
10775
|
-
|
|
10774
|
+
let F = m.querySelector(".formview-container .img-preview");
|
|
10775
|
+
F || (F = document.createElement("img"), F.className = "img-preview", m.appendChild(F)), F.src = te.target.result;
|
|
10776
10776
|
}, se.readAsDataURL(N);
|
|
10777
10777
|
} else
|
|
10778
10778
|
I();
|
|
@@ -10785,7 +10785,7 @@ class Mr {
|
|
|
10785
10785
|
}
|
|
10786
10786
|
}, re = (N) => {
|
|
10787
10787
|
if (N) {
|
|
10788
|
-
if (
|
|
10788
|
+
if (P = P.concat(B.images), !P.some((F) => F.type === N.type)) {
|
|
10789
10789
|
alert(this.out("Invalid file type."));
|
|
10790
10790
|
return;
|
|
10791
10791
|
}
|
|
@@ -10800,24 +10800,24 @@ class Mr {
|
|
|
10800
10800
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
|
|
10801
10801
|
<path stroke-linecap="round" stroke-linejoin="round" d="m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0" />
|
|
10802
10802
|
</svg>
|
|
10803
|
-
`, ce.appendChild(le), le.addEventListener("click", (
|
|
10803
|
+
`, ce.appendChild(le), le.addEventListener("click", (F) => {
|
|
10804
10804
|
const Se = le.closest(".image-item");
|
|
10805
10805
|
Se && Se.remove(), ((ne) => {
|
|
10806
|
-
const
|
|
10807
|
-
Array.from(Ce).forEach((
|
|
10808
|
-
|
|
10809
|
-
}), _.files =
|
|
10806
|
+
const Pe = new DataTransfer(), Ce = _.files;
|
|
10807
|
+
Array.from(Ce).forEach((De) => {
|
|
10808
|
+
De !== ne && Pe.items.add(De);
|
|
10809
|
+
}), _.files = Pe.files;
|
|
10810
10810
|
})(N);
|
|
10811
|
-
const
|
|
10812
|
-
|
|
10813
|
-
this.stickyElement(
|
|
10814
|
-
}, 1e3),
|
|
10811
|
+
const Me = document.querySelector(".formview-container .submit-container");
|
|
10812
|
+
Me && setTimeout(() => {
|
|
10813
|
+
this.stickyElement(Me);
|
|
10814
|
+
}, 1e3), F.preventDefault(), F.stopImmediatePropagation();
|
|
10815
10815
|
}), N.type.startsWith("image/")) {
|
|
10816
|
-
const
|
|
10817
|
-
|
|
10816
|
+
const F = new FileReader();
|
|
10817
|
+
F.onload = function(Se) {
|
|
10818
10818
|
let pe = document.createElement("img");
|
|
10819
10819
|
pe.className = "img-preview", ie.appendChild(pe), pe.src = Se.target.result;
|
|
10820
|
-
},
|
|
10820
|
+
}, F.readAsDataURL(N);
|
|
10821
10821
|
}
|
|
10822
10822
|
const se = this.getFormValues();
|
|
10823
10823
|
this.settings.onInputChange && this.settings.onInputChange(se);
|
|
@@ -10918,12 +10918,12 @@ class Mr {
|
|
|
10918
10918
|
const C = t.resetText || this.settings.resetText;
|
|
10919
10919
|
k.innerText = C, x.appendChild(k), k.addEventListener("click", (A) => {
|
|
10920
10920
|
A.preventDefault();
|
|
10921
|
-
const
|
|
10922
|
-
|
|
10923
|
-
|
|
10924
|
-
}),
|
|
10925
|
-
const
|
|
10926
|
-
|
|
10921
|
+
const R = k.closest("form");
|
|
10922
|
+
R && (R.reset(), R.querySelectorAll(".btn-clearfile").forEach((D) => {
|
|
10923
|
+
D.click();
|
|
10924
|
+
}), R.querySelectorAll(".slider-container").forEach((D) => {
|
|
10925
|
+
const M = D.querySelector("input");
|
|
10926
|
+
D.querySelector(".current-value").textContent = M.value;
|
|
10927
10927
|
}));
|
|
10928
10928
|
}), (t.fullWidthButton || !1) && k.classList.add("w-full");
|
|
10929
10929
|
}
|
|
@@ -11389,12 +11389,12 @@ ${e}`);
|
|
|
11389
11389
|
if (y.value instanceof FileList && y.value.length > 0) {
|
|
11390
11390
|
const C = y.value[0];
|
|
11391
11391
|
if (!C) continue;
|
|
11392
|
-
const T = await new Promise((A,
|
|
11392
|
+
const T = await new Promise((A, R) => {
|
|
11393
11393
|
const B = new FileReader();
|
|
11394
|
-
B.onload = (
|
|
11395
|
-
const
|
|
11396
|
-
A(
|
|
11397
|
-
}, B.onerror =
|
|
11394
|
+
B.onload = (P) => {
|
|
11395
|
+
const D = P.target.result.split(",")[1];
|
|
11396
|
+
A(D);
|
|
11397
|
+
}, B.onerror = R, B.readAsDataURL(C);
|
|
11398
11398
|
});
|
|
11399
11399
|
_ = _.replaceAll(`{{${y.name}}}`, T), _ = _.replaceAll(`{{${y.name.toUpperCase()}}}`, T);
|
|
11400
11400
|
}
|
|
@@ -11420,8 +11420,8 @@ ${e}`);
|
|
|
11420
11420
|
});
|
|
11421
11421
|
}
|
|
11422
11422
|
const p = async (v, _, f, y, k, C, T, A) => {
|
|
11423
|
-
const
|
|
11424
|
-
|
|
11423
|
+
const R = document.createElement("div");
|
|
11424
|
+
R.classList.add("result-container"), t.appendChild(R), R.innerHTML = `
|
|
11425
11425
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 120 20" width="27" height="20" fill="currentColor">
|
|
11426
11426
|
<circle cx="15" cy="15" r="10">
|
|
11427
11427
|
<animate attributeName="cy" dur="0.6s" values="15;5;15" repeatCount="indefinite"></animate>
|
|
@@ -11434,12 +11434,12 @@ ${e}`);
|
|
|
11434
11434
|
</circle>
|
|
11435
11435
|
</svg>
|
|
11436
11436
|
`;
|
|
11437
|
-
let B = !1,
|
|
11437
|
+
let B = !1, P;
|
|
11438
11438
|
if (v.trim().startsWith("{"))
|
|
11439
11439
|
try {
|
|
11440
|
-
|
|
11440
|
+
P = JSON.parse(v), P && typeof P == "object" && (B = !0);
|
|
11441
11441
|
} catch {
|
|
11442
|
-
return
|
|
11442
|
+
return R.innerHTML = `<p>${this.out("Incorrect JSON format.")}</p>`, !1;
|
|
11443
11443
|
}
|
|
11444
11444
|
(T && (T.image || T.video || T.audio) || B) && (c || (a.innerHTML = `
|
|
11445
11445
|
<span class="loading-icon" style="width:60px;display:flex;align-items:center;justify-content:center">
|
|
@@ -11450,43 +11450,43 @@ ${e}`);
|
|
|
11450
11450
|
</span>
|
|
11451
11451
|
|
|
11452
11452
|
`, a.setAttribute("disabled", "")));
|
|
11453
|
-
let
|
|
11454
|
-
if (T && T.search && (
|
|
11453
|
+
let D = "", M = "", q;
|
|
11454
|
+
if (T && T.search && (q = await this.getRelevantInfo(v, _, R), q.data !== "" && (_ += `
|
|
11455
11455
|
Use the following information to answer the request:
|
|
11456
11456
|
|
|
11457
|
-
${
|
|
11457
|
+
${q.data}
|
|
11458
11458
|
`)), T && (T.image || T.video || T.audio) || B) {
|
|
11459
|
-
const I = await this.media.generate(v, _, f, y, T,
|
|
11459
|
+
const I = await this.media.generate(v, _, f, y, T, R, A);
|
|
11460
11460
|
return this.needCleanup = !0, this.settings.consoleLog && console.log(I), I.mediaGenerated ? {
|
|
11461
11461
|
media: I.output,
|
|
11462
11462
|
media2: I.output2,
|
|
11463
11463
|
markdown: I.markdown
|
|
11464
|
-
} : (
|
|
11464
|
+
} : (R.innerHTML = `<p>${I.message}</p>`, !1);
|
|
11465
11465
|
}
|
|
11466
11466
|
if (this.settings.assistantId) {
|
|
11467
11467
|
if (this.settings.assistantStreamUrl)
|
|
11468
11468
|
await this.assistantStream(v, _, k, C, async (I) => {
|
|
11469
11469
|
if (!(I && typeof I == "object")) {
|
|
11470
|
-
if (
|
|
11471
|
-
const E = oe.parse(
|
|
11472
|
-
|
|
11470
|
+
if (D += I, !A) {
|
|
11471
|
+
const E = oe.parse(D);
|
|
11472
|
+
R.innerHTML = E, M += E;
|
|
11473
11473
|
}
|
|
11474
11474
|
await new Promise((E) => setTimeout(E, 50));
|
|
11475
11475
|
}
|
|
11476
11476
|
}), await new Promise((I) => {
|
|
11477
11477
|
const E = setInterval(() => {
|
|
11478
|
-
|
|
11478
|
+
R.innerHTML === oe.parse(D) && (clearInterval(E), I());
|
|
11479
11479
|
}, 10);
|
|
11480
|
-
}), A && (
|
|
11480
|
+
}), A && (R.innerHTML = "", R.remove()), this.outputHtml += `<div class="result-container">${M}</div>`;
|
|
11481
11481
|
else if (this.settings.assistantUrl) {
|
|
11482
11482
|
let I = await this.assistant(v, _, k, C);
|
|
11483
11483
|
if (!I)
|
|
11484
11484
|
return !1;
|
|
11485
|
-
if (
|
|
11486
|
-
|
|
11485
|
+
if (D = I, A)
|
|
11486
|
+
R.innerHTML = "", R.remove();
|
|
11487
11487
|
else {
|
|
11488
11488
|
const E = oe.parse(I);
|
|
11489
|
-
|
|
11489
|
+
R.innerHTML = E, this.outputHtml += `<div class="result-container">${E}</div>`;
|
|
11490
11490
|
}
|
|
11491
11491
|
}
|
|
11492
11492
|
} else if (this.settings.sendCommandStreamUrl) {
|
|
@@ -11495,36 +11495,36 @@ ${R.data}
|
|
|
11495
11495
|
let J = 0;
|
|
11496
11496
|
for (; J < U.length; ) {
|
|
11497
11497
|
if ($ = I.slice(0, $.length + 1), J++, !A) {
|
|
11498
|
-
const
|
|
11499
|
-
|
|
11498
|
+
const Y = oe.parse($);
|
|
11499
|
+
R.innerHTML = Y, E = Y;
|
|
11500
11500
|
}
|
|
11501
|
-
await new Promise((
|
|
11501
|
+
await new Promise((Y) => setTimeout(Y, 50));
|
|
11502
11502
|
}
|
|
11503
11503
|
};
|
|
11504
11504
|
await this.sendStream(v, _, k, y, C, async (U) => {
|
|
11505
|
-
|
|
11505
|
+
D += U, I += U, await H(U);
|
|
11506
11506
|
}), await new Promise((U) => {
|
|
11507
11507
|
const J = setInterval(() => {
|
|
11508
11508
|
$.length === I.length && (clearInterval(J), U());
|
|
11509
11509
|
}, 10);
|
|
11510
|
-
}), A && (
|
|
11510
|
+
}), A && (R.innerHTML = "", R.remove()), this.outputHtml += `<div class="result-container">${E}</div>`;
|
|
11511
11511
|
} else {
|
|
11512
11512
|
let I = await this.send(v, _, k, y, C);
|
|
11513
11513
|
if (!I)
|
|
11514
11514
|
return !1;
|
|
11515
|
-
if (
|
|
11516
|
-
|
|
11515
|
+
if (D = I, A)
|
|
11516
|
+
R.innerHTML = "", R.remove();
|
|
11517
11517
|
else {
|
|
11518
11518
|
const E = oe.parse(I);
|
|
11519
|
-
|
|
11519
|
+
R.innerHTML = E, this.outputHtml += `<div class="result-container">${E}</div>`;
|
|
11520
11520
|
}
|
|
11521
11521
|
}
|
|
11522
11522
|
if (!A) {
|
|
11523
11523
|
let I = "";
|
|
11524
|
-
if (
|
|
11524
|
+
if (q && q.urls.forEach(($) => {
|
|
11525
11525
|
let H = $;
|
|
11526
11526
|
H.length > 75 && (H = H.slice(0, 75) + "..."), I += `<div><a class="source_url" href="${$}">${H}</url></div>`;
|
|
11527
|
-
}),
|
|
11527
|
+
}), q && q.failed.forEach(($) => {
|
|
11528
11528
|
let H = $;
|
|
11529
11529
|
H.length > 75 && (H = H.slice(0, 75) + "..."), I += `<div><a class="source_url" style="opacity:0.5" href="${$}">${H}</url></div>`;
|
|
11530
11530
|
}), I !== "") {
|
|
@@ -11535,9 +11535,9 @@ ${R.data}
|
|
|
11535
11535
|
return this.payloads.push({
|
|
11536
11536
|
prompt: v,
|
|
11537
11537
|
context: _
|
|
11538
|
-
}), this.output.push(
|
|
11538
|
+
}), this.output.push(D), {
|
|
11539
11539
|
media: [],
|
|
11540
|
-
markdown:
|
|
11540
|
+
markdown: D
|
|
11541
11541
|
};
|
|
11542
11542
|
};
|
|
11543
11543
|
c || await (async (v) => {
|
|
@@ -11552,26 +11552,26 @@ ${R.data}
|
|
|
11552
11552
|
model: C,
|
|
11553
11553
|
system: T,
|
|
11554
11554
|
functs: A,
|
|
11555
|
-
tools:
|
|
11555
|
+
tools: R,
|
|
11556
11556
|
hideOutput: B
|
|
11557
11557
|
} = v[_];
|
|
11558
11558
|
k = k || "", y = y || "", T = T || "You are an assistant", A = A || [];
|
|
11559
|
-
let
|
|
11560
|
-
this.previousResults.forEach((
|
|
11561
|
-
const I = `{{output_step_${
|
|
11562
|
-
|
|
11563
|
-
}), f =
|
|
11564
|
-
const I = `{{output_step_${
|
|
11565
|
-
|
|
11566
|
-
}), y =
|
|
11567
|
-
let
|
|
11568
|
-
if (!
|
|
11559
|
+
let P = f;
|
|
11560
|
+
this.previousResults.forEach((M, q) => {
|
|
11561
|
+
const I = `{{output_step_${q + 1}}}`;
|
|
11562
|
+
P = P.replace(new RegExp(I, "g"), d(M, f)), P = P.replace(new RegExp(I.toUpperCase(), "g"), d(M, f));
|
|
11563
|
+
}), f = P, f = f.replace(/[\u00A0\u2000-\u200B\u202F\u205F\u3000\uFEFF]/g, " ").trim(), this.settings.consoleLog && console.log(f), P = y, this.previousResults.forEach((M, q) => {
|
|
11564
|
+
const I = `{{output_step_${q + 1}}}`;
|
|
11565
|
+
P = P.replace(new RegExp(I, "g"), d(M, f)), P = P.replace(new RegExp(I.toUpperCase(), "g"), d(M, f));
|
|
11566
|
+
}), y = P, y = y.replace(/[\u00A0\u2000-\u200B\u202F\u205F\u3000\uFEFF]/g, " ").trim();
|
|
11567
|
+
let D = await p(f, y, k, C, T, A, R, B);
|
|
11568
|
+
if (!D)
|
|
11569
11569
|
break;
|
|
11570
|
-
if (this.mediaGenerated.push(...
|
|
11571
|
-
let
|
|
11572
|
-
this.previousResults.push(
|
|
11570
|
+
if (this.mediaGenerated.push(...D.media), D.media && D.media.length === 1) {
|
|
11571
|
+
let M = D.media[0], q = D.media2 && D.media2.length === 1 && D.media2[0];
|
|
11572
|
+
this.previousResults.push(q || M), B && (this.filesUploaded[`output_step_${_}`] = M);
|
|
11573
11573
|
} else
|
|
11574
|
-
this.previousResults.push(
|
|
11574
|
+
this.previousResults.push(D.markdown);
|
|
11575
11575
|
}
|
|
11576
11576
|
})(o), c && (e === 0 && (this.previousResults = []), await (async (_, f) => {
|
|
11577
11577
|
if (!this.isGenerating)
|
|
@@ -11582,26 +11582,26 @@ ${R.data}
|
|
|
11582
11582
|
provider: C,
|
|
11583
11583
|
model: T,
|
|
11584
11584
|
system: A,
|
|
11585
|
-
functs:
|
|
11585
|
+
functs: R,
|
|
11586
11586
|
tools: B,
|
|
11587
|
-
hideOutput:
|
|
11587
|
+
hideOutput: P
|
|
11588
11588
|
} = _[f];
|
|
11589
|
-
k = k || "", A = A || "You are an assistant",
|
|
11590
|
-
let
|
|
11591
|
-
this.previousResults && this.previousResults.forEach((
|
|
11589
|
+
k = k || "", A = A || "You are an assistant", R = R || [];
|
|
11590
|
+
let D = y;
|
|
11591
|
+
this.previousResults && this.previousResults.forEach((q, I) => {
|
|
11592
11592
|
const E = `{{output_step_${I + 1}}}`;
|
|
11593
|
-
|
|
11594
|
-
}), y =
|
|
11593
|
+
D = D.replace(new RegExp(E, "g"), q), D = D.replace(new RegExp(E.toUpperCase(), "g"), q);
|
|
11594
|
+
}), y = D, y = y.replace(/[\u00A0\u2000-\u200B\u202F\u205F\u3000\uFEFF]/g, " ").trim(), this.settings.consoleLog && console.log(y), D = k, this.previousResults && this.previousResults.forEach((q, I) => {
|
|
11595
11595
|
const E = `{{output_step_${I + 1}}}`;
|
|
11596
|
-
|
|
11597
|
-
}), k =
|
|
11598
|
-
let
|
|
11599
|
-
if (
|
|
11600
|
-
if (
|
|
11601
|
-
let
|
|
11602
|
-
this.previousResults[f] = I ||
|
|
11596
|
+
D = D.replace(new RegExp(E, "g"), q), D = D.replace(new RegExp(E.toUpperCase(), "g"), q);
|
|
11597
|
+
}), k = D, k = k.replace(/[\u00A0\u2000-\u200B\u202F\u205F\u3000\uFEFF]/g, " ").trim(), this.settings.consoleLog && console.log(k);
|
|
11598
|
+
let M = await p(y, k, C, T, A, R, B, P);
|
|
11599
|
+
if (M && (this.mediaGenerated.push(...M.media), !!this.previousResults))
|
|
11600
|
+
if (M.media && M.media.length === 1) {
|
|
11601
|
+
let q = M.media[0], I = M.media2 && M.media2.length === 1 && M.media2[0];
|
|
11602
|
+
this.previousResults[f] = I || q, P && (this.filesUploaded[`output_step_${f}`] = q);
|
|
11603
11603
|
} else
|
|
11604
|
-
this.previousResults[f] =
|
|
11604
|
+
this.previousResults[f] = M.markdown;
|
|
11605
11605
|
})(o, e)), a.innerHTML = l, a.removeAttribute("disabled"), this.isGenerating = !1;
|
|
11606
11606
|
const w = this.calculateCost();
|
|
11607
11607
|
this.settings.onUsage && this.settings.onUsage(w), this.trigger("usage", w), this.isNormal = !1, this.isSingle = !1;
|
|
@@ -12311,17 +12311,551 @@ class jr {
|
|
|
12311
12311
|
return window.pageYOffset || document.documentElement.scrollTop;
|
|
12312
12312
|
}
|
|
12313
12313
|
}
|
|
12314
|
-
class
|
|
12314
|
+
class Nr {
|
|
12315
|
+
constructor(e = {}) {
|
|
12316
|
+
this.config = {
|
|
12317
|
+
plugins: {},
|
|
12318
|
+
// Plugin registry
|
|
12319
|
+
autoLoad: !0,
|
|
12320
|
+
pluginBaseUrl: "",
|
|
12321
|
+
allowExternalPlugins: !0,
|
|
12322
|
+
// Simple on/off for external plugins
|
|
12323
|
+
trustedDomains: [],
|
|
12324
|
+
// Optional: whitelist specific domains
|
|
12325
|
+
...e
|
|
12326
|
+
}, this.plugins = /* @__PURE__ */ new Map(), this.loadedStyles = /* @__PURE__ */ new Set(), this.components = /* @__PURE__ */ new Map(), this.externalPlugins = /* @__PURE__ */ new Map();
|
|
12327
|
+
}
|
|
12328
|
+
/**
|
|
12329
|
+
* Auto-detect and load plugins based on DOM elements
|
|
12330
|
+
*/
|
|
12331
|
+
async autoLoadPlugins() {
|
|
12332
|
+
const t = this.detectComponentTypes().filter(
|
|
12333
|
+
(s) => this.config.plugins[s] && !this.plugins.has(s)
|
|
12334
|
+
);
|
|
12335
|
+
return t.length > 0 && await Promise.all(
|
|
12336
|
+
t.map((s) => this.loadPlugin(s))
|
|
12337
|
+
), t;
|
|
12338
|
+
}
|
|
12339
|
+
/**
|
|
12340
|
+
* Detect all component types used in the page
|
|
12341
|
+
*/
|
|
12342
|
+
detectComponentTypes() {
|
|
12343
|
+
const e = /* @__PURE__ */ new Set();
|
|
12344
|
+
return document.querySelectorAll("[data-cb-type]").forEach((t) => {
|
|
12345
|
+
e.add(t.dataset.cbType);
|
|
12346
|
+
}), document.querySelectorAll('[class*="cb-"]').forEach((t) => {
|
|
12347
|
+
t.classList.forEach((s) => {
|
|
12348
|
+
if (s.startsWith("cb-")) {
|
|
12349
|
+
const i = s.replace("cb-", "");
|
|
12350
|
+
e.add(i);
|
|
12351
|
+
}
|
|
12352
|
+
});
|
|
12353
|
+
}), Array.from(e);
|
|
12354
|
+
}
|
|
12355
|
+
/**
|
|
12356
|
+
* Load a plugin dynamically
|
|
12357
|
+
*/
|
|
12358
|
+
async loadPlugin(e) {
|
|
12359
|
+
if (this.plugins.has(e))
|
|
12360
|
+
return this.plugins.get(e);
|
|
12361
|
+
const t = this.config.plugins[e];
|
|
12362
|
+
if (!t)
|
|
12363
|
+
return console.warn(`[PluginManager] Plugin "${e}" not found in registry`), null;
|
|
12364
|
+
try {
|
|
12365
|
+
t.css && this.loadCSS(this.resolveUrl(t.css));
|
|
12366
|
+
const s = this.resolveUrl(t.url), i = await this.importModule(s), n = i.default || i;
|
|
12367
|
+
return this.plugins.set(e, n), typeof n.init == "function" && await n.init(this), this.emit("plugin-loaded", { name: e, plugin: n }), n;
|
|
12368
|
+
} catch (s) {
|
|
12369
|
+
return console.error(`[PluginManager] Failed to load plugin "${e}":`, s), null;
|
|
12370
|
+
}
|
|
12371
|
+
}
|
|
12372
|
+
/**
|
|
12373
|
+
* Dynamically import ES module
|
|
12374
|
+
*/
|
|
12375
|
+
async importModule(e) {
|
|
12376
|
+
return import(
|
|
12377
|
+
/* @vite-ignore */
|
|
12378
|
+
e
|
|
12379
|
+
);
|
|
12380
|
+
}
|
|
12381
|
+
/**
|
|
12382
|
+
* Load CSS file
|
|
12383
|
+
*/
|
|
12384
|
+
loadCSS(e) {
|
|
12385
|
+
if (this.loadedStyles.has(e)) return;
|
|
12386
|
+
const t = document.createElement("link");
|
|
12387
|
+
t.rel = "stylesheet", t.href = e, t.onload = () => {
|
|
12388
|
+
this.emit("css-loaded", { url: e });
|
|
12389
|
+
}, t.onerror = () => {
|
|
12390
|
+
console.error(`[PluginManager] Failed to load CSS: ${e}`);
|
|
12391
|
+
}, document.head.appendChild(t), this.loadedStyles.add(e);
|
|
12392
|
+
}
|
|
12393
|
+
/**
|
|
12394
|
+
* Resolve URL (handle relative paths)
|
|
12395
|
+
*/
|
|
12396
|
+
resolveUrl(e) {
|
|
12397
|
+
return e.startsWith("http://") || e.startsWith("https://") || e.startsWith("//") ? e : this.config.pluginBaseUrl + e;
|
|
12398
|
+
}
|
|
12399
|
+
/**
|
|
12400
|
+
* Initialize all components in the page
|
|
12401
|
+
*/
|
|
12402
|
+
initializeComponents() {
|
|
12403
|
+
return document.querySelectorAll("[data-cb-type]").forEach((t) => {
|
|
12404
|
+
const s = t.dataset.cbType, i = this.plugins.get(s);
|
|
12405
|
+
if (i && typeof i.mount == "function")
|
|
12406
|
+
try {
|
|
12407
|
+
const n = this.parseOptions(t);
|
|
12408
|
+
t.hasAttribute("data-cb-original-content") || t.setAttribute("data-cb-original-content", t.innerHTML);
|
|
12409
|
+
const r = i.mount(t, n);
|
|
12410
|
+
this.components.set(t, r), t.setAttribute("data-cb-loaded", "true");
|
|
12411
|
+
} catch (n) {
|
|
12412
|
+
console.error(`[PluginManager] Failed to mount component "${s}":`, n);
|
|
12413
|
+
}
|
|
12414
|
+
}), this.components.size;
|
|
12415
|
+
}
|
|
12416
|
+
/**
|
|
12417
|
+
* Parse component options from data attributes
|
|
12418
|
+
*/
|
|
12419
|
+
parseOptions(e) {
|
|
12420
|
+
const t = {};
|
|
12421
|
+
return Array.from(e.attributes).forEach((s) => {
|
|
12422
|
+
if (s.name.startsWith("data-cb-")) {
|
|
12423
|
+
const i = s.name.replace("data-cb-", "").replace(/-([a-z])/g, (n, r) => r.toUpperCase());
|
|
12424
|
+
t[i] = this.parseValue(s.value);
|
|
12425
|
+
}
|
|
12426
|
+
}), t;
|
|
12427
|
+
}
|
|
12428
|
+
/**
|
|
12429
|
+
* Parse string value to appropriate type
|
|
12430
|
+
*/
|
|
12431
|
+
parseValue(e) {
|
|
12432
|
+
if (e === "true") return !0;
|
|
12433
|
+
if (e === "false") return !1;
|
|
12434
|
+
if (!isNaN(e) && e !== "") return Number(e);
|
|
12435
|
+
try {
|
|
12436
|
+
return JSON.parse(e);
|
|
12437
|
+
} catch {
|
|
12438
|
+
return e;
|
|
12439
|
+
}
|
|
12440
|
+
}
|
|
12441
|
+
/**
|
|
12442
|
+
* Manually load a plugin (if not auto-loaded)
|
|
12443
|
+
*/
|
|
12444
|
+
async use(e) {
|
|
12445
|
+
return await this.loadPlugin(e);
|
|
12446
|
+
}
|
|
12447
|
+
/**
|
|
12448
|
+
* Get a loaded plugin by name
|
|
12449
|
+
*/
|
|
12450
|
+
getPlugin(e) {
|
|
12451
|
+
return this.plugins.get(e);
|
|
12452
|
+
}
|
|
12453
|
+
/**
|
|
12454
|
+
* Get all loaded plugins
|
|
12455
|
+
*/
|
|
12456
|
+
getAllPlugins() {
|
|
12457
|
+
return Array.from(this.plugins.entries());
|
|
12458
|
+
}
|
|
12459
|
+
/**
|
|
12460
|
+
* Check if a plugin is loaded
|
|
12461
|
+
*/
|
|
12462
|
+
hasPlugin(e) {
|
|
12463
|
+
return this.plugins.has(e);
|
|
12464
|
+
}
|
|
12465
|
+
/**
|
|
12466
|
+
* Get component instance for an element
|
|
12467
|
+
*/
|
|
12468
|
+
getComponent(e) {
|
|
12469
|
+
return this.components.get(e);
|
|
12470
|
+
}
|
|
12471
|
+
/**
|
|
12472
|
+
* Reinitialize components in a specific container
|
|
12473
|
+
* Useful when content is dynamically updated
|
|
12474
|
+
* @param {HTMLElement} container - Container element (defaults to document)
|
|
12475
|
+
*/
|
|
12476
|
+
/*
|
|
12477
|
+
async reinitialize(container = document) {
|
|
12478
|
+
console.log('[PluginManager] Reinitializing components in container');
|
|
12479
|
+
|
|
12480
|
+
// Step 1: Destroy existing components in this container
|
|
12481
|
+
const elementsToDestroy = [];
|
|
12482
|
+
this.components.forEach((instance, element) => {
|
|
12483
|
+
if (container === document || container.contains(element)) {
|
|
12484
|
+
elementsToDestroy.push({ element, instance });
|
|
12485
|
+
}
|
|
12486
|
+
});
|
|
12487
|
+
|
|
12488
|
+
elementsToDestroy.forEach(({ element, instance }) => {
|
|
12489
|
+
const type = element.dataset.cbType;
|
|
12490
|
+
const plugin = this.plugins.get(type);
|
|
12491
|
+
|
|
12492
|
+
if (plugin && typeof plugin.unmount === 'function') {
|
|
12493
|
+
plugin.unmount(element, instance);
|
|
12494
|
+
}
|
|
12495
|
+
|
|
12496
|
+
this.components.delete(element);
|
|
12497
|
+
});
|
|
12498
|
+
|
|
12499
|
+
console.log(`[PluginManager] Destroyed ${elementsToDestroy.length} components`);
|
|
12500
|
+
|
|
12501
|
+
// Step 2: Detect new component types in container
|
|
12502
|
+
const componentTypes = this.detectComponentTypesInContainer(container);
|
|
12503
|
+
|
|
12504
|
+
// Step 3: Load any new plugins that aren't loaded yet
|
|
12505
|
+
const pluginsToLoad = componentTypes.filter(type =>
|
|
12506
|
+
this.config.plugins[type] && !this.plugins.has(type)
|
|
12507
|
+
);
|
|
12508
|
+
|
|
12509
|
+
if (pluginsToLoad.length > 0) {
|
|
12510
|
+
await Promise.all(
|
|
12511
|
+
pluginsToLoad.map(type => this.loadPlugin(type))
|
|
12512
|
+
);
|
|
12513
|
+
}
|
|
12514
|
+
|
|
12515
|
+
// Step 4: Initialize all components in container
|
|
12516
|
+
const newElements = container.querySelectorAll('[data-cb-type]');
|
|
12517
|
+
let mountedCount = 0;
|
|
12518
|
+
|
|
12519
|
+
newElements.forEach(el => {
|
|
12520
|
+
const type = el.dataset.cbType;
|
|
12521
|
+
const plugin = this.plugins.get(type);
|
|
12522
|
+
|
|
12523
|
+
if (plugin && typeof plugin.mount === 'function') {
|
|
12524
|
+
try {
|
|
12525
|
+
const options = this.parseOptions(el);
|
|
12526
|
+
const instance = plugin.mount(el, options);
|
|
12527
|
+
this.components.set(el, instance);
|
|
12528
|
+
mountedCount++;
|
|
12529
|
+
} catch (error) {
|
|
12530
|
+
console.error(`[PluginManager] Failed to mount component "${type}":`, error);
|
|
12531
|
+
}
|
|
12532
|
+
}
|
|
12533
|
+
});
|
|
12534
|
+
|
|
12535
|
+
console.log(`[PluginManager] Mounted ${mountedCount} new components`);
|
|
12536
|
+
this.emit('reinitialized', { container, count: mountedCount });
|
|
12537
|
+
|
|
12538
|
+
return mountedCount;
|
|
12539
|
+
}
|
|
12540
|
+
*/
|
|
12541
|
+
async reinitialize(e = document) {
|
|
12542
|
+
if (this.reinitializeInProgress)
|
|
12543
|
+
return clearTimeout(this.pendingReinitialize), new Promise((t) => {
|
|
12544
|
+
this.pendingReinitialize = setTimeout(async () => {
|
|
12545
|
+
this.pendingReinitialize = null;
|
|
12546
|
+
const s = await this.reinitialize(e);
|
|
12547
|
+
t(s);
|
|
12548
|
+
}, 100);
|
|
12549
|
+
});
|
|
12550
|
+
this.reinitializeInProgress = !0;
|
|
12551
|
+
try {
|
|
12552
|
+
const t = [];
|
|
12553
|
+
this.components.forEach((a, l) => {
|
|
12554
|
+
(e === document || e.contains(l)) && t.push({ element: l, instance: a });
|
|
12555
|
+
}), t.forEach(({ element: a, instance: l }) => {
|
|
12556
|
+
const c = a.dataset.cbType, d = this.plugins.get(c);
|
|
12557
|
+
d && typeof d.unmount == "function" && d.unmount(a, l), this.components.delete(a);
|
|
12558
|
+
});
|
|
12559
|
+
const i = this.detectComponentTypesInContainer(e).filter(
|
|
12560
|
+
(a) => this.config.plugins[a] && !this.plugins.has(a)
|
|
12561
|
+
);
|
|
12562
|
+
i.length > 0 && await Promise.all(
|
|
12563
|
+
i.map((a) => this.loadPlugin(a))
|
|
12564
|
+
);
|
|
12565
|
+
const n = e.querySelectorAll("[data-cb-type]");
|
|
12566
|
+
let r = 0;
|
|
12567
|
+
for (const a of n) {
|
|
12568
|
+
const l = a.dataset.cbType, c = this.plugins.get(l);
|
|
12569
|
+
if (c && typeof c.mount == "function")
|
|
12570
|
+
try {
|
|
12571
|
+
const d = this.parseOptions(a);
|
|
12572
|
+
a.hasAttribute("data-cb-original-content") ? a.innerHTML = a.getAttribute("data-cb-original-content") : a.setAttribute("data-cb-original-content", a.innerHTML);
|
|
12573
|
+
const o = await c.mount(a, d);
|
|
12574
|
+
this.components.set(a, o), a.setAttribute("data-cb-loaded", "true"), r++;
|
|
12575
|
+
} catch (d) {
|
|
12576
|
+
console.error(`[PluginManager] Failed to mount component "${l}":`, d);
|
|
12577
|
+
}
|
|
12578
|
+
}
|
|
12579
|
+
return this.emit("reinitialized", { container: e, count: r }), r;
|
|
12580
|
+
} finally {
|
|
12581
|
+
this.reinitializeInProgress = !1;
|
|
12582
|
+
}
|
|
12583
|
+
}
|
|
12584
|
+
/**
|
|
12585
|
+
* Detect component types within a specific container
|
|
12586
|
+
* @param {HTMLElement} container
|
|
12587
|
+
*/
|
|
12588
|
+
detectComponentTypesInContainer(e) {
|
|
12589
|
+
const t = /* @__PURE__ */ new Set();
|
|
12590
|
+
return e.querySelectorAll("[data-cb-type]").forEach((i) => {
|
|
12591
|
+
t.add(i.dataset.cbType);
|
|
12592
|
+
}), Array.from(t);
|
|
12593
|
+
}
|
|
12594
|
+
/**
|
|
12595
|
+
* Register and load plugin from external URL
|
|
12596
|
+
* @param {string} pluginId - Unique identifier for the plugin
|
|
12597
|
+
* @param {object} config - Plugin configuration
|
|
12598
|
+
* @param {string} config.url - JavaScript module URL
|
|
12599
|
+
* @param {string} config.css - CSS file URL (optional)
|
|
12600
|
+
*/
|
|
12601
|
+
async loadExternalPlugin(e, t) {
|
|
12602
|
+
if (!e || typeof e != "string")
|
|
12603
|
+
throw new Error("Plugin ID is required and must be a string");
|
|
12604
|
+
if (!t.url)
|
|
12605
|
+
throw new Error("Plugin URL is required");
|
|
12606
|
+
if (this.plugins.has(e))
|
|
12607
|
+
return console.warn(`[PluginManager] Plugin "${e}" is already loaded`), this.plugins.get(e);
|
|
12608
|
+
const s = this.validatePluginSource(t.url);
|
|
12609
|
+
if (!s.allowed)
|
|
12610
|
+
throw new Error(`Security: ${s.reason}`);
|
|
12611
|
+
s.warning && (console.warn(`[PluginManager] ${s.warning}`), this.emit("plugin-security-warning", {
|
|
12612
|
+
pluginId: e,
|
|
12613
|
+
url: t.url,
|
|
12614
|
+
warning: s.warning
|
|
12615
|
+
}));
|
|
12616
|
+
try {
|
|
12617
|
+
this.config.plugins[e] = {
|
|
12618
|
+
url: t.url,
|
|
12619
|
+
css: t.css || null,
|
|
12620
|
+
source: "external",
|
|
12621
|
+
loadedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
12622
|
+
}, this.externalPlugins.set(e, this.config.plugins[e]);
|
|
12623
|
+
const i = await this.loadPlugin(e);
|
|
12624
|
+
return this.emit("external-plugin-loaded", {
|
|
12625
|
+
pluginId: e,
|
|
12626
|
+
url: t.url
|
|
12627
|
+
}), i;
|
|
12628
|
+
} catch (i) {
|
|
12629
|
+
throw delete this.config.plugins[e], this.externalPlugins.delete(e), console.error(`[PluginManager] Failed to load external plugin "${e}":`, i), i;
|
|
12630
|
+
}
|
|
12631
|
+
}
|
|
12632
|
+
/**
|
|
12633
|
+
* Validate plugin source URL
|
|
12634
|
+
* @param {string} url - Plugin URL to validate
|
|
12635
|
+
* @returns {object} Validation result
|
|
12636
|
+
*/
|
|
12637
|
+
validatePluginSource(e) {
|
|
12638
|
+
const t = e.includes("localhost") || e.includes("127.0.0.1");
|
|
12639
|
+
if (!e.startsWith("https://") && !t)
|
|
12640
|
+
return {
|
|
12641
|
+
allowed: !1,
|
|
12642
|
+
reason: "Only HTTPS URLs are allowed (except localhost for development)"
|
|
12643
|
+
};
|
|
12644
|
+
if (!this.config.allowExternalPlugins)
|
|
12645
|
+
return {
|
|
12646
|
+
allowed: !1,
|
|
12647
|
+
reason: "External plugins are disabled. Enable allowExternalPlugins in configuration."
|
|
12648
|
+
};
|
|
12649
|
+
if (this.config.trustedDomains.length > 0) {
|
|
12650
|
+
const i = new URL(e).hostname;
|
|
12651
|
+
if (!this.config.trustedDomains.some((r) => {
|
|
12652
|
+
if (r.startsWith("*.")) {
|
|
12653
|
+
const a = r.slice(2);
|
|
12654
|
+
return i === a || i.endsWith("." + a);
|
|
12655
|
+
}
|
|
12656
|
+
return i === r;
|
|
12657
|
+
}))
|
|
12658
|
+
return {
|
|
12659
|
+
allowed: !0,
|
|
12660
|
+
warning: `Loading plugin from external domain: ${i}. Only add plugins from sources you trust.`
|
|
12661
|
+
};
|
|
12662
|
+
} else
|
|
12663
|
+
return {
|
|
12664
|
+
allowed: !0,
|
|
12665
|
+
warning: `Loading external plugin from: ${new URL(e).hostname}. This plugin will have full access to your page.`
|
|
12666
|
+
};
|
|
12667
|
+
return { allowed: !0 };
|
|
12668
|
+
}
|
|
12669
|
+
/**
|
|
12670
|
+
* Batch load external plugins
|
|
12671
|
+
* Useful for loading user's saved plugins on page init
|
|
12672
|
+
* @param {object} pluginsConfig - Object with pluginId as key and config as value
|
|
12673
|
+
*/
|
|
12674
|
+
async loadExternalPlugins(e) {
|
|
12675
|
+
const t = [];
|
|
12676
|
+
for (const [s, i] of Object.entries(e))
|
|
12677
|
+
try {
|
|
12678
|
+
const n = await this.loadExternalPlugin(s, i);
|
|
12679
|
+
t.push({ pluginId: s, success: !0, plugin: n });
|
|
12680
|
+
} catch (n) {
|
|
12681
|
+
t.push({ pluginId: s, success: !1, error: n.message }), console.error(`[PluginManager] Failed to load external plugin "${s}":`, n);
|
|
12682
|
+
}
|
|
12683
|
+
return t;
|
|
12684
|
+
}
|
|
12685
|
+
/**
|
|
12686
|
+
* Remove/unregister an external plugin
|
|
12687
|
+
* @param {string} pluginId - Plugin to remove
|
|
12688
|
+
*/
|
|
12689
|
+
unregisterPlugin(e) {
|
|
12690
|
+
if (!this.externalPlugins.has(e))
|
|
12691
|
+
return console.warn(`[PluginManager] Plugin "${e}" is not an external plugin`), !1;
|
|
12692
|
+
const t = this.plugins.get(e), s = [];
|
|
12693
|
+
return this.components.forEach((i, n) => {
|
|
12694
|
+
n.dataset.cbType === e && s.push({ element: n, instance: i });
|
|
12695
|
+
}), s.forEach(({ element: i, instance: n }) => {
|
|
12696
|
+
t && typeof t.unmount == "function" && t.unmount(i, n), this.components.delete(i);
|
|
12697
|
+
}), t && typeof t.destroy == "function" && t.destroy(this), this.plugins.delete(e), this.externalPlugins.delete(e), delete this.config.plugins[e], this.emit("plugin-unregistered", { pluginId: e }), !0;
|
|
12698
|
+
}
|
|
12699
|
+
/**
|
|
12700
|
+
* Get list of all external (user-added) plugins
|
|
12701
|
+
*/
|
|
12702
|
+
getExternalPlugins() {
|
|
12703
|
+
return Array.from(this.externalPlugins.entries()).map(([e, t]) => ({
|
|
12704
|
+
id: e,
|
|
12705
|
+
...t
|
|
12706
|
+
}));
|
|
12707
|
+
}
|
|
12708
|
+
/**
|
|
12709
|
+
* Check if a plugin is external (user-added)
|
|
12710
|
+
*/
|
|
12711
|
+
isExternalPlugin(e) {
|
|
12712
|
+
return this.externalPlugins.has(e);
|
|
12713
|
+
}
|
|
12714
|
+
/**
|
|
12715
|
+
* Destroy all components and plugins
|
|
12716
|
+
*/
|
|
12717
|
+
destroy() {
|
|
12718
|
+
this.components.forEach((e, t) => {
|
|
12719
|
+
const s = t.dataset.cbType, i = this.plugins.get(s);
|
|
12720
|
+
i && typeof i.unmount == "function" && i.unmount(t, e);
|
|
12721
|
+
}), this.plugins.forEach((e, t) => {
|
|
12722
|
+
typeof e.destroy == "function" && e.destroy(this);
|
|
12723
|
+
}), this.components.clear(), this.plugins.clear();
|
|
12724
|
+
}
|
|
12725
|
+
/**
|
|
12726
|
+
* Event emitter (delegate to runtime if available)
|
|
12727
|
+
*/
|
|
12728
|
+
emit(e, t) {
|
|
12729
|
+
if (this.runtime && typeof this.runtime.emit == "function")
|
|
12730
|
+
this.runtime.emit(e, t);
|
|
12731
|
+
else {
|
|
12732
|
+
const s = new CustomEvent(`contentbox:${e}`, { detail: t });
|
|
12733
|
+
document.dispatchEvent(s);
|
|
12734
|
+
}
|
|
12735
|
+
}
|
|
12736
|
+
/**
|
|
12737
|
+
* Set runtime reference (for event delegation)
|
|
12738
|
+
*/
|
|
12739
|
+
setRuntime(e) {
|
|
12740
|
+
this.runtime = e;
|
|
12741
|
+
}
|
|
12742
|
+
}
|
|
12743
|
+
class Hr {
|
|
12315
12744
|
constructor(e = {}) {
|
|
12316
12745
|
const t = {
|
|
12317
12746
|
skin: "light",
|
|
12318
|
-
smoothScroll: !0
|
|
12747
|
+
smoothScroll: !0,
|
|
12748
|
+
plugins: {},
|
|
12749
|
+
// Plugin registry: { 'plugin-name': { url: '...', css: '...' } }
|
|
12750
|
+
autoLoadPlugins: !0,
|
|
12751
|
+
// Auto-load plugins based on detected components
|
|
12752
|
+
pluginBaseUrl: "",
|
|
12753
|
+
// Base URL for plugins if using relative paths
|
|
12754
|
+
allowExternalPlugins: !0,
|
|
12755
|
+
// Simple on/off for external plugins
|
|
12756
|
+
trustedDomains: []
|
|
12757
|
+
// Optional: whitelist specific domains
|
|
12319
12758
|
};
|
|
12320
|
-
this.settings =
|
|
12759
|
+
this.settings = { ...t, ...e }, this.initialized = !1, this.pluginManager = new Nr({
|
|
12760
|
+
plugins: this.settings.plugins,
|
|
12761
|
+
autoLoad: this.settings.autoLoadPlugins,
|
|
12762
|
+
pluginBaseUrl: this.settings.pluginBaseUrl,
|
|
12763
|
+
allowExternalPlugins: this.settings.allowExternalPlugins,
|
|
12764
|
+
trustedDomains: this.settings.trustedDomains
|
|
12765
|
+
}), this.pluginManager.setRuntime(this), window.Glide = Wn, window.FormViewer = Rr, window.NavBar = jr, window.pageReRender = () => {
|
|
12321
12766
|
this.pageReRender();
|
|
12322
12767
|
};
|
|
12323
12768
|
}
|
|
12324
|
-
|
|
12769
|
+
/**
|
|
12770
|
+
* Plugin management delegation methods
|
|
12771
|
+
*/
|
|
12772
|
+
/**
|
|
12773
|
+
* Manually load a plugin
|
|
12774
|
+
*/
|
|
12775
|
+
async use(e) {
|
|
12776
|
+
return await this.pluginManager.use(e);
|
|
12777
|
+
}
|
|
12778
|
+
/**
|
|
12779
|
+
* Get a loaded plugin
|
|
12780
|
+
*/
|
|
12781
|
+
getPlugin(e) {
|
|
12782
|
+
return this.pluginManager.getPlugin(e);
|
|
12783
|
+
}
|
|
12784
|
+
/**
|
|
12785
|
+
* Get all loaded plugins
|
|
12786
|
+
*/
|
|
12787
|
+
getPlugins() {
|
|
12788
|
+
return this.pluginManager.getAllPlugins();
|
|
12789
|
+
}
|
|
12790
|
+
/**
|
|
12791
|
+
* Check if plugin is loaded
|
|
12792
|
+
*/
|
|
12793
|
+
hasPlugin(e) {
|
|
12794
|
+
return this.pluginManager.hasPlugin(e);
|
|
12795
|
+
}
|
|
12796
|
+
/**
|
|
12797
|
+
* Get component instance for an element
|
|
12798
|
+
*/
|
|
12799
|
+
getComponent(e) {
|
|
12800
|
+
return this.pluginManager.getComponent(e);
|
|
12801
|
+
}
|
|
12802
|
+
/**
|
|
12803
|
+
* Get all component instances
|
|
12804
|
+
*/
|
|
12805
|
+
getComponents() {
|
|
12806
|
+
return this.pluginManager.components;
|
|
12807
|
+
}
|
|
12808
|
+
/**
|
|
12809
|
+
* Reinitialize components (after content update)
|
|
12810
|
+
* @param {HTMLElement} container - Container to reinitialize (optional, defaults to document)
|
|
12811
|
+
*/
|
|
12812
|
+
async reinitialize(e) {
|
|
12813
|
+
return await this.pluginManager.reinitialize(e);
|
|
12814
|
+
}
|
|
12815
|
+
/**
|
|
12816
|
+
* Register and load plugin from external URL
|
|
12817
|
+
*/
|
|
12818
|
+
async loadExternalPlugin(e, t) {
|
|
12819
|
+
return await this.pluginManager.loadExternalPlugin(e, t);
|
|
12820
|
+
}
|
|
12821
|
+
/**
|
|
12822
|
+
* Batch load external plugins
|
|
12823
|
+
*/
|
|
12824
|
+
async loadExternalPlugins(e) {
|
|
12825
|
+
return await this.pluginManager.loadExternalPlugins(e);
|
|
12826
|
+
}
|
|
12827
|
+
/**
|
|
12828
|
+
* Remove/unregister an external plugin
|
|
12829
|
+
*/
|
|
12830
|
+
unregisterPlugin(e) {
|
|
12831
|
+
return this.pluginManager.unregisterPlugin(e);
|
|
12832
|
+
}
|
|
12833
|
+
/**
|
|
12834
|
+
* Simple event emitter
|
|
12835
|
+
*/
|
|
12836
|
+
emit(e, t) {
|
|
12837
|
+
const s = new CustomEvent(`contentbox:${e}`, { detail: t });
|
|
12838
|
+
document.dispatchEvent(s);
|
|
12839
|
+
}
|
|
12840
|
+
/**
|
|
12841
|
+
* Listen to events
|
|
12842
|
+
*/
|
|
12843
|
+
on(e, t) {
|
|
12844
|
+
document.addEventListener(`contentbox:${e}`, t);
|
|
12845
|
+
}
|
|
12846
|
+
/**
|
|
12847
|
+
* Remove event listener
|
|
12848
|
+
*/
|
|
12849
|
+
off(e, t) {
|
|
12850
|
+
document.removeEventListener(`contentbox:${e}`, t);
|
|
12851
|
+
}
|
|
12852
|
+
async init() {
|
|
12853
|
+
this.initialized || (this.initCore(), this.initPlugins(), this.initialized = !0, this.emit("init"));
|
|
12854
|
+
}
|
|
12855
|
+
async initPlugins() {
|
|
12856
|
+
this.settings.autoLoadPlugins && await this.pluginManager.autoLoadPlugins(), this.pluginManager.initializeComponents();
|
|
12857
|
+
}
|
|
12858
|
+
initCore() {
|
|
12325
12859
|
this.prepareContent(), this.updateOnResize(), this.blockInit(), this.initeSkrollrr(), this.contentBoxOnRenderUpdate(), this.functionLightboxInit(), this.inViewSetup(), setTimeout(() => {
|
|
12326
12860
|
ks.init({
|
|
12327
12861
|
duration: 1200
|
|
@@ -12471,7 +13005,7 @@ class $r {
|
|
|
12471
13005
|
}), document.querySelectorAll(".is-container video").forEach((i) => {
|
|
12472
13006
|
i.parentNode.setAttribute("data-scroll", "");
|
|
12473
13007
|
});
|
|
12474
|
-
const s = new
|
|
13008
|
+
const s = new Rs({
|
|
12475
13009
|
trigger: {
|
|
12476
13010
|
once: !0,
|
|
12477
13011
|
offset: {
|
|
@@ -12752,9 +13286,9 @@ class $r {
|
|
|
12752
13286
|
destroy() {
|
|
12753
13287
|
this.glightbox && (this.glightbox.destroy(), this.glightbox = null), document.querySelectorAll(".is-lightbox,.block-click").forEach((t) => {
|
|
12754
13288
|
t._lightboxHandler && (t.removeEventListener("click", t._lightboxHandler), delete t._lightboxHandler);
|
|
12755
|
-
});
|
|
13289
|
+
}), this.pluginManager.destroy(), this.initialized = !1, this.emit("destroy");
|
|
12756
13290
|
}
|
|
12757
13291
|
}
|
|
12758
13292
|
export {
|
|
12759
|
-
|
|
13293
|
+
Hr as default
|
|
12760
13294
|
};
|