@enegelai/bot-widget 1.6.1 → 1.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/enegelaibot.umd.js +3 -3
- package/dist/index.es.js +87 -85
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var
|
|
2
|
-
var $a = (a, t, c) => t in a ?
|
|
1
|
+
var Aa = Object.defineProperty;
|
|
2
|
+
var $a = (a, t, c) => t in a ? Aa(a, t, { enumerable: !0, configurable: !0, writable: !0, value: c }) : a[t] = c;
|
|
3
3
|
var oe = (a, t, c) => ($a(a, typeof t != "symbol" ? t + "" : t, c), c);
|
|
4
4
|
import { css as U, LitElement as dt, html as y, svg as He } from "lit";
|
|
5
5
|
import { property as C, customElement as Y, queryAll as Wt, query as Re, eventOptions as kt } from "lit/decorators.js";
|
|
@@ -50,7 +50,7 @@ const rt = class rt extends Event {
|
|
|
50
50
|
}
|
|
51
51
|
};
|
|
52
52
|
oe(rt, "eventName", "lit-state-changed");
|
|
53
|
-
let
|
|
53
|
+
let Ae = rt;
|
|
54
54
|
const ja = (a, t) => t !== a && (t === t || a === a);
|
|
55
55
|
class Ke extends EventTarget {
|
|
56
56
|
constructor() {
|
|
@@ -120,10 +120,10 @@ class Ke extends EventTarget {
|
|
|
120
120
|
const d = (l) => {
|
|
121
121
|
(!i || i.includes(l.key)) && c(l.key, l.value, this);
|
|
122
122
|
};
|
|
123
|
-
return this.addEventListener(
|
|
123
|
+
return this.addEventListener(Ae.eventName, d, n), () => this.removeEventListener(Ae.eventName, d);
|
|
124
124
|
}
|
|
125
125
|
dispatchStateEvent(c, i, n) {
|
|
126
|
-
this.dispatchEvent(new
|
|
126
|
+
this.dispatchEvent(new Ae(c, i, n));
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
129
|
// a map holding decorators definition.
|
|
@@ -136,10 +136,10 @@ class Xt {
|
|
|
136
136
|
this.host = t, this.state = c, this.host.addController(this), this.callback = i || (() => this.host.requestUpdate());
|
|
137
137
|
}
|
|
138
138
|
hostConnected() {
|
|
139
|
-
this.state.addEventListener(
|
|
139
|
+
this.state.addEventListener(Ae.eventName, this.callback), this.callback();
|
|
140
140
|
}
|
|
141
141
|
hostDisconnected() {
|
|
142
|
-
this.state.removeEventListener(
|
|
142
|
+
this.state.removeEventListener(Ae.eventName, this.callback);
|
|
143
143
|
}
|
|
144
144
|
}
|
|
145
145
|
/**
|
|
@@ -222,44 +222,44 @@ var Kt = { exports: {} };
|
|
|
222
222
|
"warn",
|
|
223
223
|
"error"
|
|
224
224
|
];
|
|
225
|
-
function d(
|
|
226
|
-
var R =
|
|
225
|
+
function d(T, z) {
|
|
226
|
+
var R = T[z];
|
|
227
227
|
if (typeof R.bind == "function")
|
|
228
|
-
return R.bind(
|
|
228
|
+
return R.bind(T);
|
|
229
229
|
try {
|
|
230
|
-
return Function.prototype.bind.call(R,
|
|
230
|
+
return Function.prototype.bind.call(R, T);
|
|
231
231
|
} catch {
|
|
232
232
|
return function() {
|
|
233
|
-
return Function.prototype.apply.apply(R, [
|
|
233
|
+
return Function.prototype.apply.apply(R, [T, arguments]);
|
|
234
234
|
};
|
|
235
235
|
}
|
|
236
236
|
}
|
|
237
237
|
function l() {
|
|
238
238
|
console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
|
|
239
239
|
}
|
|
240
|
-
function v(
|
|
241
|
-
return
|
|
240
|
+
function v(T) {
|
|
241
|
+
return T === "debug" && (T = "log"), typeof console === c ? !1 : T === "trace" && i ? l : console[T] !== void 0 ? d(console, T) : console.log !== void 0 ? d(console, "log") : t;
|
|
242
242
|
}
|
|
243
|
-
function S(
|
|
243
|
+
function S(T, z) {
|
|
244
244
|
for (var R = 0; R < n.length; R++) {
|
|
245
245
|
var $ = n[R];
|
|
246
|
-
this[$] = R <
|
|
246
|
+
this[$] = R < T ? t : this.methodFactory($, T, z);
|
|
247
247
|
}
|
|
248
248
|
this.log = this.debug;
|
|
249
249
|
}
|
|
250
|
-
function D(
|
|
250
|
+
function D(T, z, R) {
|
|
251
251
|
return function() {
|
|
252
|
-
typeof console !== c && (S.call(this, z, R), this[
|
|
252
|
+
typeof console !== c && (S.call(this, z, R), this[T].apply(this, arguments));
|
|
253
253
|
};
|
|
254
254
|
}
|
|
255
|
-
function L(
|
|
256
|
-
return v(
|
|
255
|
+
function L(T, z, R) {
|
|
256
|
+
return v(T) || D.apply(this, arguments);
|
|
257
257
|
}
|
|
258
|
-
function E(
|
|
258
|
+
function E(T, z, R) {
|
|
259
259
|
var $ = this, he;
|
|
260
260
|
z = z ?? "WARN";
|
|
261
261
|
var ee = "loglevel";
|
|
262
|
-
typeof
|
|
262
|
+
typeof T == "string" ? ee += ":" + T : typeof T == "symbol" && (ee = void 0);
|
|
263
263
|
function bt(w) {
|
|
264
264
|
var ie = (n[w] || "silent").toUpperCase();
|
|
265
265
|
if (!(typeof window === c || !ee)) {
|
|
@@ -305,7 +305,7 @@ var Kt = { exports: {} };
|
|
|
305
305
|
}
|
|
306
306
|
}
|
|
307
307
|
}
|
|
308
|
-
$.name =
|
|
308
|
+
$.name = T, $.levels = {
|
|
309
309
|
TRACE: 0,
|
|
310
310
|
DEBUG: 1,
|
|
311
311
|
INFO: 2,
|
|
@@ -316,7 +316,7 @@ var Kt = { exports: {} };
|
|
|
316
316
|
return he;
|
|
317
317
|
}, $.setLevel = function(w, ie) {
|
|
318
318
|
if (typeof w == "string" && $.levels[w.toUpperCase()] !== void 0 && (w = $.levels[w.toUpperCase()]), typeof w == "number" && w >= 0 && w <= $.levels.SILENT) {
|
|
319
|
-
if (he = w, ie !== !1 && bt(w), S.call($, w,
|
|
319
|
+
if (he = w, ie !== !1 && bt(w), S.call($, w, T), typeof console === c && w < $.levels.SILENT)
|
|
320
320
|
return "No console available for logging";
|
|
321
321
|
} else
|
|
322
322
|
throw "log.setLevel() called with invalid level: " + w;
|
|
@@ -332,23 +332,23 @@ var Kt = { exports: {} };
|
|
|
332
332
|
var Se = Ie();
|
|
333
333
|
Se == null && (Se = z), $.setLevel(Se, !1);
|
|
334
334
|
}
|
|
335
|
-
var
|
|
336
|
-
|
|
335
|
+
var A = new E(), F = {};
|
|
336
|
+
A.getLogger = function(z) {
|
|
337
337
|
if (typeof z != "symbol" && typeof z != "string" || z === "")
|
|
338
338
|
throw new TypeError("You must supply a name when creating a logger.");
|
|
339
339
|
var R = F[z];
|
|
340
340
|
return R || (R = F[z] = new E(
|
|
341
341
|
z,
|
|
342
|
-
|
|
343
|
-
|
|
342
|
+
A.getLevel(),
|
|
343
|
+
A.methodFactory
|
|
344
344
|
)), R;
|
|
345
345
|
};
|
|
346
346
|
var ce = typeof window !== c ? window.log : void 0;
|
|
347
|
-
return
|
|
348
|
-
return typeof window !== c && window.log ===
|
|
349
|
-
},
|
|
347
|
+
return A.noConflict = function() {
|
|
348
|
+
return typeof window !== c && window.log === A && (window.log = ce), A;
|
|
349
|
+
}, A.getLoggers = function() {
|
|
350
350
|
return F;
|
|
351
|
-
},
|
|
351
|
+
}, A.default = A, A;
|
|
352
352
|
});
|
|
353
353
|
})(Kt);
|
|
354
354
|
var za = Kt.exports;
|
|
@@ -695,7 +695,7 @@ class Wa {
|
|
|
695
695
|
function V(a) {
|
|
696
696
|
return a != null && typeof a == "object" && a["@@functional/placeholder"] === !0;
|
|
697
697
|
}
|
|
698
|
-
function
|
|
698
|
+
function Te(a) {
|
|
699
699
|
return function t(c) {
|
|
700
700
|
return arguments.length === 0 || V(c) ? t : a.apply(this, arguments);
|
|
701
701
|
};
|
|
@@ -706,13 +706,13 @@ function ue(a) {
|
|
|
706
706
|
case 0:
|
|
707
707
|
return t;
|
|
708
708
|
case 1:
|
|
709
|
-
return V(c) ? t :
|
|
709
|
+
return V(c) ? t : Te(function(n) {
|
|
710
710
|
return a(c, n);
|
|
711
711
|
});
|
|
712
712
|
default:
|
|
713
|
-
return V(c) && V(i) ? t : V(c) ?
|
|
713
|
+
return V(c) && V(i) ? t : V(c) ? Te(function(n) {
|
|
714
714
|
return a(n, i);
|
|
715
|
-
}) : V(i) ?
|
|
715
|
+
}) : V(i) ? Te(function(n) {
|
|
716
716
|
return a(c, n);
|
|
717
717
|
}) : a(c, i);
|
|
718
718
|
}
|
|
@@ -732,7 +732,7 @@ function Ya(a) {
|
|
|
732
732
|
return a(d, i, l);
|
|
733
733
|
}) : V(i) ? ue(function(d, l) {
|
|
734
734
|
return a(c, d, l);
|
|
735
|
-
}) :
|
|
735
|
+
}) : Te(function(d) {
|
|
736
736
|
return a(c, i, d);
|
|
737
737
|
});
|
|
738
738
|
default:
|
|
@@ -742,11 +742,11 @@ function Ya(a) {
|
|
|
742
742
|
return a(d, i, l);
|
|
743
743
|
}) : V(i) && V(n) ? ue(function(d, l) {
|
|
744
744
|
return a(c, d, l);
|
|
745
|
-
}) : V(c) ?
|
|
745
|
+
}) : V(c) ? Te(function(d) {
|
|
746
746
|
return a(d, i, n);
|
|
747
|
-
}) : V(i) ?
|
|
747
|
+
}) : V(i) ? Te(function(d) {
|
|
748
748
|
return a(c, d, n);
|
|
749
|
-
}) : V(n) ?
|
|
749
|
+
}) : V(n) ? Te(function(d) {
|
|
750
750
|
return a(c, i, d);
|
|
751
751
|
}) : a(c, i, n);
|
|
752
752
|
}
|
|
@@ -843,14 +843,16 @@ class W extends Ke {
|
|
|
843
843
|
}
|
|
844
844
|
this.connectWs === "true" && (B.info("appState: connectWs is true"), this.getWsClient().catch((t) => {
|
|
845
845
|
B.error(`Exception during ws client startup: ${t.message}`);
|
|
846
|
-
})),
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
846
|
+
})), setTimeout(() => {
|
|
847
|
+
window.dispatchEvent(
|
|
848
|
+
new CustomEvent("c7o:bot:stateEvent", {
|
|
849
|
+
detail: {
|
|
850
|
+
type: "botInitialized",
|
|
851
|
+
botSettings: JSON.parse(JSON.stringify(this.botSettings))
|
|
852
|
+
}
|
|
853
|
+
})
|
|
854
|
+
);
|
|
855
|
+
}, 1e3);
|
|
854
856
|
}
|
|
855
857
|
initConversation() {
|
|
856
858
|
if (Date.now() - this.lastConversationUpdate > 24 * 60 * 60 * 1e3) {
|
|
@@ -1643,7 +1645,7 @@ var ta = { exports: {} };
|
|
|
1643
1645
|
return r;
|
|
1644
1646
|
}
|
|
1645
1647
|
function S(r, e) {
|
|
1646
|
-
if ((te(r) || r === window || r === document) && (r = [r]), Mt(r) || Le(r) || (r = [r]),
|
|
1648
|
+
if ((te(r) || r === window || r === document) && (r = [r]), Mt(r) || Le(r) || (r = [r]), Tt(r) != 0) {
|
|
1647
1649
|
if (Mt(r) && !Le(r))
|
|
1648
1650
|
for (var o = r.length, s = 0; s < o && e.call(r[s], r[s], s, r) !== !1; s++)
|
|
1649
1651
|
;
|
|
@@ -1656,7 +1658,7 @@ var ta = { exports: {} };
|
|
|
1656
1658
|
}
|
|
1657
1659
|
function D(r) {
|
|
1658
1660
|
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, s = r[l] = r[l] || [], f = { all: s, evt: null, found: null };
|
|
1659
|
-
return e && o &&
|
|
1661
|
+
return e && o && Tt(s) > 0 && S(s, function(b, h) {
|
|
1660
1662
|
if (b.eventName == e && b.fn.toString() == o.toString())
|
|
1661
1663
|
return f.found = !0, f.evt = h, !1;
|
|
1662
1664
|
}), f;
|
|
@@ -1681,7 +1683,7 @@ var ta = { exports: {} };
|
|
|
1681
1683
|
return r.classList.add(o);
|
|
1682
1684
|
});
|
|
1683
1685
|
}
|
|
1684
|
-
function
|
|
1686
|
+
function A(r, e) {
|
|
1685
1687
|
S(e.split(" "), function(o) {
|
|
1686
1688
|
return r.classList.remove(o);
|
|
1687
1689
|
});
|
|
@@ -1697,7 +1699,7 @@ var ta = { exports: {} };
|
|
|
1697
1699
|
return r;
|
|
1698
1700
|
}
|
|
1699
1701
|
}
|
|
1700
|
-
function
|
|
1702
|
+
function T(r) {
|
|
1701
1703
|
var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", o = arguments.length > 2 && arguments[2] !== void 0 && arguments[2];
|
|
1702
1704
|
if (!r || e === "")
|
|
1703
1705
|
return !1;
|
|
@@ -1708,7 +1710,7 @@ var ta = { exports: {} };
|
|
|
1708
1710
|
E(r, "g" + b);
|
|
1709
1711
|
}), L(s, { onElement: r, avoidDuplicate: !1, once: !0, withCallback: function(b, h) {
|
|
1710
1712
|
S(f, function(u) {
|
|
1711
|
-
|
|
1713
|
+
A(h, "g" + u);
|
|
1712
1714
|
}), w(o) && o();
|
|
1713
1715
|
} });
|
|
1714
1716
|
}
|
|
@@ -1819,7 +1821,7 @@ var ta = { exports: {} };
|
|
|
1819
1821
|
function N(r, e) {
|
|
1820
1822
|
return r !== null && hasOwnProperty.call(r, e);
|
|
1821
1823
|
}
|
|
1822
|
-
function
|
|
1824
|
+
function Tt(r) {
|
|
1823
1825
|
if (Le(r)) {
|
|
1824
1826
|
if (r.keys)
|
|
1825
1827
|
return r.keys().length;
|
|
@@ -1833,7 +1835,7 @@ var ta = { exports: {} };
|
|
|
1833
1835
|
function Ue(r) {
|
|
1834
1836
|
return !isNaN(parseFloat(r)) && isFinite(r);
|
|
1835
1837
|
}
|
|
1836
|
-
function
|
|
1838
|
+
function At() {
|
|
1837
1839
|
var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : -1, e = document.querySelectorAll(".gbtn[data-taborder]:not(.disabled)");
|
|
1838
1840
|
if (!e.length)
|
|
1839
1841
|
return !1;
|
|
@@ -1870,11 +1872,11 @@ var ta = { exports: {} };
|
|
|
1870
1872
|
if (!h || h.length <= 0)
|
|
1871
1873
|
return;
|
|
1872
1874
|
if (!f) {
|
|
1873
|
-
var u =
|
|
1875
|
+
var u = At();
|
|
1874
1876
|
return void (u && (u.focus(), E(u, "focused")));
|
|
1875
1877
|
}
|
|
1876
|
-
var p =
|
|
1877
|
-
|
|
1878
|
+
var p = At(f.getAttribute("data-taborder"));
|
|
1879
|
+
A(f, "focused"), p && (p.focus(), E(p, "focused"));
|
|
1878
1880
|
}
|
|
1879
1881
|
s == 39 && r.nextSlide(), s == 37 && r.prevSlide(), s == 27 && r.close();
|
|
1880
1882
|
} });
|
|
@@ -1995,7 +1997,7 @@ var ta = { exports: {} };
|
|
|
1995
1997
|
return p[h];
|
|
1996
1998
|
}(), o = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, s = F(r, "gslide-media") ? r : r.querySelector(".gslide-media"), f = ce(s, ".ginner-container"), b = r.querySelector(".gslide-description");
|
|
1997
1999
|
o > 769 && (s = f), E(s, "greset"), z(s, "translate3d(0, 0, 0)"), L(e, { onElement: s, once: !0, withCallback: function(h, u) {
|
|
1998
|
-
|
|
2000
|
+
A(s, "greset");
|
|
1999
2001
|
} }), s.style.opacity = "", b && (b.style.opacity = "");
|
|
2000
2002
|
}
|
|
2001
2003
|
function pa(r) {
|
|
@@ -2003,7 +2005,7 @@ var ta = { exports: {} };
|
|
|
2003
2005
|
return !1;
|
|
2004
2006
|
var e, o, s, f = ee(), b = f.width, h = f.height, u = !1, p = null, k = null, g = null, m = !1, M = 1, _ = 1, j = !1, H = !1, I = null, re = null, ae = null, we = null, xe = 0, _e = 0, je = !1, ut = !1, Ee = {}, Me = {}, Pt = 0, zt = 0, Sa = document.getElementById("glightbox-slider"), Xe = document.querySelector(".goverlay"), _a = new ua(Sa, { touchStart: function(O) {
|
|
2005
2007
|
if (u = !0, (F(O.targetTouches[0].target, "ginner-container") || ce(O.targetTouches[0].target, ".gslide-desc") || O.targetTouches[0].target.nodeName.toLowerCase() == "a") && (u = !1), ce(O.targetTouches[0].target, ".gslide-inline") && !F(O.targetTouches[0].target.parentNode, "gslide-inline") && (u = !1), u) {
|
|
2006
|
-
if (Me = O.targetTouches[0], Ee.pageX = O.targetTouches[0].pageX, Ee.pageY = O.targetTouches[0].pageY, Pt = O.targetTouches[0].clientX, zt = O.targetTouches[0].clientY, p = r.activeSlide, k = p.querySelector(".gslide-media"), s = p.querySelector(".gslide-inline"), g = null, F(k, "gslide-image") && (g = k.querySelector("img")), (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) > 769 && (k = p.querySelector(".ginner-container")),
|
|
2008
|
+
if (Me = O.targetTouches[0], Ee.pageX = O.targetTouches[0].pageX, Ee.pageY = O.targetTouches[0].pageY, Pt = O.targetTouches[0].clientX, zt = O.targetTouches[0].clientY, p = r.activeSlide, k = p.querySelector(".gslide-media"), s = p.querySelector(".gslide-inline"), g = null, F(k, "gslide-image") && (g = k.querySelector("img")), (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) > 769 && (k = p.querySelector(".ginner-container")), A(Xe, "greset"), O.pageX > 20 && O.pageX < window.innerWidth - 20)
|
|
2007
2009
|
return;
|
|
2008
2010
|
O.preventDefault();
|
|
2009
2011
|
}
|
|
@@ -2015,8 +2017,8 @@ var ta = { exports: {} };
|
|
|
2015
2017
|
return !1;
|
|
2016
2018
|
}
|
|
2017
2019
|
m = !0;
|
|
2018
|
-
var ke, Ze = O.targetTouches[0].clientX, Ea = O.targetTouches[0].clientY, Ma = Pt - Ze,
|
|
2019
|
-
if (Math.abs(Ma) > Math.abs(
|
|
2020
|
+
var ke, Ze = O.targetTouches[0].clientX, Ea = O.targetTouches[0].clientY, Ma = Pt - Ze, Ta = zt - Ea;
|
|
2021
|
+
if (Math.abs(Ma) > Math.abs(Ta) ? (je = !1, ut = !0) : (ut = !1, je = !0), e = Me.pageX - Ee.pageX, xe = 100 * e / b, o = Me.pageY - Ee.pageY, _e = 100 * o / h, je && g && (ke = 1 - Math.abs(o) / h, Xe.style.opacity = ke, r.settings.touchFollowAxis && (xe = 0)), ut && (ke = 1 - Math.abs(e) / b, k.style.opacity = ke, r.settings.touchFollowAxis && (_e = 0)), !g)
|
|
2020
2022
|
return z(k, "translate3d(".concat(xe, "%, 0, 0)"));
|
|
2021
2023
|
z(k, "translate3d(".concat(xe, "%, ").concat(_e, "%, 0)"));
|
|
2022
2024
|
}
|
|
@@ -2204,7 +2206,7 @@ var ta = { exports: {} };
|
|
|
2204
2206
|
}
|
|
2205
2207
|
function It(r) {
|
|
2206
2208
|
var e = ce(r.target, ".gslide-media");
|
|
2207
|
-
r.type === "enterfullscreen" && E(e, "fullscreen"), r.type === "exitfullscreen" &&
|
|
2209
|
+
r.type === "enterfullscreen" && E(e, "fullscreen"), r.type === "exitfullscreen" && A(e, "fullscreen");
|
|
2208
2210
|
}
|
|
2209
2211
|
function va(r, e, o, s) {
|
|
2210
2212
|
var f, b = this, h = r.querySelector(".gslide-media"), u = !(!N(e, "href") || !e.href) && e.href.split("#").pop().trim(), p = !(!N(e, "content") || !e.content) && e.content;
|
|
@@ -2342,8 +2344,8 @@ var ta = { exports: {} };
|
|
|
2342
2344
|
return !1;
|
|
2343
2345
|
p.innerHTML = o.description, E(u, "gdesc-open");
|
|
2344
2346
|
var k = L("click", { onElement: [u, ce(p, ".gslide-description")], withCallback: function(g, m) {
|
|
2345
|
-
g.target.nodeName.toLowerCase() !== "a" && (
|
|
2346
|
-
|
|
2347
|
+
g.target.nodeName.toLowerCase() !== "a" && (A(u, "gdesc-open"), E(u, "gdesc-closed"), p.innerHTML = o.smallDescription, s.descriptionEvents(p, o), setTimeout(function() {
|
|
2348
|
+
A(u, "gdesc-closed");
|
|
2347
2349
|
}, 400), k.destroy());
|
|
2348
2350
|
} });
|
|
2349
2351
|
} });
|
|
@@ -2396,13 +2398,13 @@ var ta = { exports: {} };
|
|
|
2396
2398
|
var f = e.getAttribute("data-gallery");
|
|
2397
2399
|
f && (this.fullElementsList = this.elements, this.elements = this.getGalleryElements(this.elements, f)), ne(s) && (s = this.getElementIndex(e)) < 0 && (s = 0);
|
|
2398
2400
|
}
|
|
2399
|
-
Ue(s) || (s = 0), this.build(),
|
|
2401
|
+
Ue(s) || (s = 0), this.build(), T(this.overlay, this.settings.openEffect === "none" ? "none" : this.settings.cssEfects.fade.in);
|
|
2400
2402
|
var b = document.body, h = window.innerWidth - document.documentElement.clientWidth;
|
|
2401
2403
|
if (h > 0) {
|
|
2402
2404
|
var u = document.createElement("style");
|
|
2403
2405
|
u.type = "text/css", u.className = "gcss-styles", u.innerText = ".gscrollbar-fixer {margin-right: ".concat(h, "px}"), document.head.appendChild(u), E(b, "gscrollbar-fixer");
|
|
2404
2406
|
}
|
|
2405
|
-
E(b, "glightbox-open"), E(Ot, "glightbox-open"), Lt && (E(document.body, "glightbox-mobile"), this.settings.slideEffect = "slide"), this.showSlide(s, !0), this.elements.length === 1 ? (E(this.prevButton, "glightbox-button-hidden"), E(this.nextButton, "glightbox-button-hidden")) : (
|
|
2407
|
+
E(b, "glightbox-open"), E(Ot, "glightbox-open"), Lt && (E(document.body, "glightbox-mobile"), this.settings.slideEffect = "slide"), this.showSlide(s, !0), this.elements.length === 1 ? (E(this.prevButton, "glightbox-button-hidden"), E(this.nextButton, "glightbox-button-hidden")) : (A(this.prevButton, "glightbox-button-hidden"), A(this.nextButton, "glightbox-button-hidden")), this.lightboxOpen = !0, this.trigger("open"), w(this.settings.onOpen) && this.settings.onOpen(), jt && this.settings.touchNavigation && pa(this), this.settings.keyboardNavigation && la(this);
|
|
2406
2408
|
} }, { key: "openAt", value: function() {
|
|
2407
2409
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
|
|
2408
2410
|
this.open(null, e);
|
|
@@ -2410,7 +2412,7 @@ var ta = { exports: {} };
|
|
|
2410
2412
|
var e = this, o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0, s = arguments.length > 1 && arguments[1] !== void 0 && arguments[1];
|
|
2411
2413
|
R(this.loader), this.index = parseInt(o);
|
|
2412
2414
|
var f = this.slidesContainer.querySelector(".current");
|
|
2413
|
-
f &&
|
|
2415
|
+
f && A(f, "current"), this.slideAnimateOut();
|
|
2414
2416
|
var b = this.slidesContainer.querySelectorAll(".gslide")[o];
|
|
2415
2417
|
if (F(b, "loaded"))
|
|
2416
2418
|
this.slideAnimateIn(b, s), $(this.loader);
|
|
@@ -2470,13 +2472,13 @@ var ta = { exports: {} };
|
|
|
2470
2472
|
o && (this.getActiveSlideIndex() == e && (e == this.elements.length - 1 ? this.prevSlide() : this.nextSlide()), o.parentNode.removeChild(o)), this.elements.splice(e, 1), this.trigger("slide_removed", e), w(this.settings.slideRemoved) && this.settings.slideRemoved(e);
|
|
2471
2473
|
} }, { key: "slideAnimateIn", value: function(e, o) {
|
|
2472
2474
|
var s = this, f = e.querySelector(".gslide-media"), b = e.querySelector(".gslide-description"), h = { index: this.prevActiveSlideIndex, slide: this.prevActiveSlide, slideNode: this.prevActiveSlide, slideIndex: this.prevActiveSlide, slideConfig: ne(this.prevActiveSlideIndex) ? null : this.elements[this.prevActiveSlideIndex].slideConfig, trigger: ne(this.prevActiveSlideIndex) ? null : this.elements[this.prevActiveSlideIndex].node, player: this.getSlidePlayerInstance(this.prevActiveSlideIndex) }, u = { index: this.index, slide: this.activeSlide, slideNode: this.activeSlide, slideConfig: this.elements[this.index].slideConfig, slideIndex: this.index, trigger: this.elements[this.index].node, player: this.getSlidePlayerInstance(this.index) };
|
|
2473
|
-
if (f.offsetWidth > 0 && b && ($(b), b.style.display = ""),
|
|
2474
|
-
|
|
2475
|
+
if (f.offsetWidth > 0 && b && ($(b), b.style.display = ""), A(e, this.effectsClasses), o)
|
|
2476
|
+
T(e, this.settings.cssEfects[this.settings.openEffect].in, function() {
|
|
2475
2477
|
s.settings.autoplayVideos && s.slidePlayerPlay(e), s.trigger("slide_changed", { prev: h, current: u }), w(s.settings.afterSlideChange) && s.settings.afterSlideChange.apply(s, [h, u]);
|
|
2476
2478
|
});
|
|
2477
2479
|
else {
|
|
2478
2480
|
var p = this.settings.slideEffect, k = p !== "none" ? this.settings.cssEfects[p].in : p;
|
|
2479
|
-
this.prevActiveSlideIndex > this.index && this.settings.slideEffect == "slide" && (k = this.settings.cssEfects.slideBack.in),
|
|
2481
|
+
this.prevActiveSlideIndex > this.index && this.settings.slideEffect == "slide" && (k = this.settings.cssEfects.slideBack.in), T(e, k, function() {
|
|
2480
2482
|
s.settings.autoplayVideos && s.slidePlayerPlay(e), s.trigger("slide_changed", { prev: h, current: u }), w(s.settings.afterSlideChange) && s.settings.afterSlideChange.apply(s, [h, u]);
|
|
2481
2483
|
});
|
|
2482
2484
|
}
|
|
@@ -2487,11 +2489,11 @@ var ta = { exports: {} };
|
|
|
2487
2489
|
if (!this.prevActiveSlide)
|
|
2488
2490
|
return !1;
|
|
2489
2491
|
var e = this.prevActiveSlide;
|
|
2490
|
-
|
|
2492
|
+
A(e, this.effectsClasses), E(e, "prev");
|
|
2491
2493
|
var o = this.settings.slideEffect, s = o !== "none" ? this.settings.cssEfects[o].out : o;
|
|
2492
|
-
this.slidePlayerPause(e), this.trigger("slide_before_change", { prev: { index: this.prevActiveSlideIndex, slide: this.prevActiveSlide, slideNode: this.prevActiveSlide, slideIndex: this.prevActiveSlideIndex, slideConfig: ne(this.prevActiveSlideIndex) ? null : this.elements[this.prevActiveSlideIndex].slideConfig, trigger: ne(this.prevActiveSlideIndex) ? null : this.elements[this.prevActiveSlideIndex].node, player: this.getSlidePlayerInstance(this.prevActiveSlideIndex) }, current: { index: this.index, slide: this.activeSlide, slideNode: this.activeSlide, slideIndex: this.index, slideConfig: this.elements[this.index].slideConfig, trigger: this.elements[this.index].node, player: this.getSlidePlayerInstance(this.index) } }), w(this.settings.beforeSlideChange) && this.settings.beforeSlideChange.apply(this, [{ index: this.prevActiveSlideIndex, slide: this.prevActiveSlide, player: this.getSlidePlayerInstance(this.prevActiveSlideIndex) }, { index: this.index, slide: this.activeSlide, player: this.getSlidePlayerInstance(this.index) }]), this.prevActiveSlideIndex > this.index && this.settings.slideEffect == "slide" && (s = this.settings.cssEfects.slideBack.out),
|
|
2494
|
+
this.slidePlayerPause(e), this.trigger("slide_before_change", { prev: { index: this.prevActiveSlideIndex, slide: this.prevActiveSlide, slideNode: this.prevActiveSlide, slideIndex: this.prevActiveSlideIndex, slideConfig: ne(this.prevActiveSlideIndex) ? null : this.elements[this.prevActiveSlideIndex].slideConfig, trigger: ne(this.prevActiveSlideIndex) ? null : this.elements[this.prevActiveSlideIndex].node, player: this.getSlidePlayerInstance(this.prevActiveSlideIndex) }, current: { index: this.index, slide: this.activeSlide, slideNode: this.activeSlide, slideIndex: this.index, slideConfig: this.elements[this.index].slideConfig, trigger: this.elements[this.index].node, player: this.getSlidePlayerInstance(this.index) } }), w(this.settings.beforeSlideChange) && this.settings.beforeSlideChange.apply(this, [{ index: this.prevActiveSlideIndex, slide: this.prevActiveSlide, player: this.getSlidePlayerInstance(this.prevActiveSlideIndex) }, { index: this.index, slide: this.activeSlide, player: this.getSlidePlayerInstance(this.index) }]), this.prevActiveSlideIndex > this.index && this.settings.slideEffect == "slide" && (s = this.settings.cssEfects.slideBack.out), T(e, s, function() {
|
|
2493
2495
|
var f = e.querySelector(".ginner-container"), b = e.querySelector(".gslide-media"), h = e.querySelector(".gslide-description");
|
|
2494
|
-
f.style.transform = "", b.style.transform = "",
|
|
2496
|
+
f.style.transform = "", b.style.transform = "", A(b, "greset"), b.style.opacity = "", h && (h.style.opacity = ""), A(e, "prev");
|
|
2495
2497
|
});
|
|
2496
2498
|
} }, { key: "getAllPlayers", value: function() {
|
|
2497
2499
|
return this.videoPlayers;
|
|
@@ -2607,7 +2609,7 @@ var ta = { exports: {} };
|
|
|
2607
2609
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
|
|
2608
2610
|
if ((e = e || this.activeSlide) && !F(e, "zoomed")) {
|
|
2609
2611
|
var o = ee(), s = e.querySelector(".gvideo-wrapper"), f = e.querySelector(".gslide-image"), b = this.slideDescription, h = o.width, u = o.height;
|
|
2610
|
-
if (h <= 768 ? E(document.body, "glightbox-mobile") :
|
|
2612
|
+
if (h <= 768 ? E(document.body, "glightbox-mobile") : A(document.body, "glightbox-mobile"), s || f) {
|
|
2611
2613
|
var p = !1;
|
|
2612
2614
|
if (b && (F(b, "description-bottom") || F(b, "description-top")) && !F(b, "gabsolute") && (p = !0), f) {
|
|
2613
2615
|
if (h <= 768)
|
|
@@ -2636,7 +2638,7 @@ var ta = { exports: {} };
|
|
|
2636
2638
|
this.init();
|
|
2637
2639
|
} }, { key: "updateNavigationClasses", value: function() {
|
|
2638
2640
|
var e = this.loop();
|
|
2639
|
-
|
|
2641
|
+
A(this.nextButton, "disabled"), A(this.prevButton, "disabled"), this.index == 0 && this.elements.length - 1 == 0 ? (E(this.prevButton, "disabled"), E(this.nextButton, "disabled")) : this.index !== 0 || e ? this.index !== this.elements.length - 1 || e || E(this.nextButton, "disabled") : E(this.prevButton, "disabled");
|
|
2640
2642
|
} }, { key: "loop", value: function() {
|
|
2641
2643
|
var e = N(this.settings, "loopAtEnd") ? this.settings.loopAtEnd : null;
|
|
2642
2644
|
return e = N(this.settings, "loop") ? this.settings.loop : e, e;
|
|
@@ -2654,14 +2656,14 @@ var ta = { exports: {} };
|
|
|
2654
2656
|
return !1;
|
|
2655
2657
|
this.closing = !0, this.slidePlayerPause(this.activeSlide), this.fullElementsList && (this.elements = this.fullElementsList), this.bodyHiddenChildElms.length && S(this.bodyHiddenChildElms, function(s) {
|
|
2656
2658
|
s.removeAttribute("aria-hidden");
|
|
2657
|
-
}), E(this.modal, "glightbox-closing"),
|
|
2659
|
+
}), E(this.modal, "glightbox-closing"), T(this.overlay, this.settings.openEffect == "none" ? "none" : this.settings.cssEfects.fade.out), T(this.activeSlide, this.settings.cssEfects[this.settings.closeEffect].out, function() {
|
|
2658
2660
|
if (e.activeSlide = null, e.prevActiveSlideIndex = null, e.prevActiveSlide = null, e.built = !1, e.events) {
|
|
2659
2661
|
for (var s in e.events)
|
|
2660
2662
|
e.events.hasOwnProperty(s) && e.events[s].destroy();
|
|
2661
2663
|
e.events = null;
|
|
2662
2664
|
}
|
|
2663
2665
|
var f = document.body;
|
|
2664
|
-
|
|
2666
|
+
A(Ot, "glightbox-open"), A(f, "glightbox-open touching gdesc-open glightbox-touch glightbox-mobile gscrollbar-fixer"), e.modal.parentNode.removeChild(e.modal), e.trigger("close"), w(e.settings.onClose) && e.settings.onClose();
|
|
2665
2667
|
var b = document.querySelector(".gcss-styles");
|
|
2666
2668
|
b && b.parentNode.removeChild(b), e.lightboxOpen = !1, e.closing = null;
|
|
2667
2669
|
});
|
|
@@ -2813,10 +2815,10 @@ const Mc = U`
|
|
|
2813
2815
|
margin-right: 0.2em;
|
|
2814
2816
|
}
|
|
2815
2817
|
`;
|
|
2816
|
-
var
|
|
2817
|
-
for (var n = i > 1 ? void 0 : i ?
|
|
2818
|
+
var Tc = Object.defineProperty, Ac = Object.getOwnPropertyDescriptor, St = (a, t, c, i) => {
|
|
2819
|
+
for (var n = i > 1 ? void 0 : i ? Ac(t, c) : t, d = a.length - 1, l; d >= 0; d--)
|
|
2818
2820
|
(l = a[d]) && (n = (i ? l(t, c, n) : l(n)) || n);
|
|
2819
|
-
return i && n &&
|
|
2821
|
+
return i && n && Tc(t, c, n), n;
|
|
2820
2822
|
};
|
|
2821
2823
|
let qe = class extends dt {
|
|
2822
2824
|
constructor() {
|
|
@@ -5629,7 +5631,7 @@ const Qe = (a) => a !== null && typeof a == "object", Ge = (...a) => {
|
|
|
5629
5631
|
afterStatusCodes: fa,
|
|
5630
5632
|
maxRetryAfter: Number.POSITIVE_INFINITY,
|
|
5631
5633
|
backoffLimit: Number.POSITIVE_INFINITY
|
|
5632
|
-
},
|
|
5634
|
+
}, Ti = (a = {}) => {
|
|
5633
5635
|
if (typeof a == "number")
|
|
5634
5636
|
return {
|
|
5635
5637
|
...Nt,
|
|
@@ -5645,7 +5647,7 @@ const Qe = (a) => a !== null && typeof a == "object", Ge = (...a) => {
|
|
|
5645
5647
|
afterStatusCodes: fa
|
|
5646
5648
|
};
|
|
5647
5649
|
};
|
|
5648
|
-
async function
|
|
5650
|
+
async function Ai(a, t, c) {
|
|
5649
5651
|
return new Promise((i, n) => {
|
|
5650
5652
|
const d = setTimeout(() => {
|
|
5651
5653
|
t && t.abort(), n(new oa(a));
|
|
@@ -5761,7 +5763,7 @@ class st {
|
|
|
5761
5763
|
method: _i(c.method ?? this._input.method),
|
|
5762
5764
|
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
|
|
5763
5765
|
prefixUrl: String(c.prefixUrl || ""),
|
|
5764
|
-
retry:
|
|
5766
|
+
retry: Ti(c.retry),
|
|
5765
5767
|
throwHttpErrors: c.throwHttpErrors !== !1,
|
|
5766
5768
|
timeout: typeof c.timeout > "u" ? 1e4 : c.timeout,
|
|
5767
5769
|
fetch: c.fetch ?? globalThis.fetch.bind(globalThis)
|
|
@@ -5838,7 +5840,7 @@ class st {
|
|
|
5838
5840
|
if (c instanceof Response)
|
|
5839
5841
|
return c;
|
|
5840
5842
|
}
|
|
5841
|
-
return this._options.timeout === !1 ? this._options.fetch(this.request.clone()) :
|
|
5843
|
+
return this._options.timeout === !1 ? this._options.fetch(this.request.clone()) : Ai(this.request.clone(), this.abortController, this._options);
|
|
5842
5844
|
}
|
|
5843
5845
|
/* istanbul ignore next */
|
|
5844
5846
|
_stream(t, c) {
|