@enegelai/bot-widget 1.12.4 → 1.12.6
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 +195 -151
- package/dist/index.es.js +249 -191
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -2,7 +2,7 @@ var ja = Object.defineProperty;
|
|
|
2
2
|
var Ha = (c, e, a) => e in c ? ja(c, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : c[e] = a;
|
|
3
3
|
var ge = (c, e, a) => Ha(c, typeof e != "symbol" ? e + "" : e, a);
|
|
4
4
|
import { css as X, LitElement as ut, html as g, svg as le } from "lit";
|
|
5
|
-
import { property as v, customElement as J, queryAll as Qt, query as
|
|
5
|
+
import { property as v, customElement as J, queryAll as Qt, query as Ce, eventOptions as Et } from "lit/decorators.js";
|
|
6
6
|
import { unsafeHTML as W } from "lit-html/directives/unsafe-html.js";
|
|
7
7
|
import { when as ie } from "lit/directives/when.js";
|
|
8
8
|
import { registerIconLibrary as Ba } from "@shoelace-style/shoelace";
|
|
@@ -25,7 +25,7 @@ import "@shoelace-style/shoelace/dist/components/alert/alert.js";
|
|
|
25
25
|
import "@shoelace-style/shoelace/dist/components/progress-bar/progress-bar.js";
|
|
26
26
|
import "@shoelace-style/shoelace/dist/components/badge/badge.js";
|
|
27
27
|
import { repeat as ze } from "lit/directives/repeat.js";
|
|
28
|
-
import { until as
|
|
28
|
+
import { until as kt } from "lit-html/directives/until.js";
|
|
29
29
|
import Ra from "markdown-it";
|
|
30
30
|
import Va from "markdown-it-link-attributes";
|
|
31
31
|
import vt from "highlight.js";
|
|
@@ -47,7 +47,7 @@ const ht = class ht extends Event {
|
|
|
47
47
|
};
|
|
48
48
|
ht.eventName = "lit-state-changed";
|
|
49
49
|
let He = ht;
|
|
50
|
-
const
|
|
50
|
+
const Fa = (c, e) => e !== c && (e === e || c === c), Ot = class Ot extends EventTarget {
|
|
51
51
|
static initPropertyMap() {
|
|
52
52
|
this.propertyMap || (this.propertyMap = /* @__PURE__ */ new Map());
|
|
53
53
|
}
|
|
@@ -80,7 +80,7 @@ const Da = (c, e) => e !== c && (e === e || c === c), Lt = class Lt extends Even
|
|
|
80
80
|
Object.defineProperty(this.prototype, e, s);
|
|
81
81
|
}
|
|
82
82
|
static getPropertyDescriptor(e, a, n) {
|
|
83
|
-
const s = (n == null ? void 0 : n.hasChanged) ||
|
|
83
|
+
const s = (n == null ? void 0 : n.hasChanged) || Fa;
|
|
84
84
|
return {
|
|
85
85
|
get() {
|
|
86
86
|
return this[a];
|
|
@@ -121,8 +121,8 @@ const Da = (c, e) => e !== c && (e === e || c === c), Lt = class Lt extends Even
|
|
|
121
121
|
this.dispatchEvent(new He(e, a, n));
|
|
122
122
|
}
|
|
123
123
|
};
|
|
124
|
-
|
|
125
|
-
let
|
|
124
|
+
Ot.finalized = !1;
|
|
125
|
+
let Ct = Ot;
|
|
126
126
|
class pt {
|
|
127
127
|
constructor(e, a, n) {
|
|
128
128
|
this.host = e, this.state = a, this.callback = n || (() => this.host.requestUpdate()), this.host.addController(this);
|
|
@@ -148,7 +148,7 @@ function q(c) {
|
|
|
148
148
|
}), n.createProperty(a, c), s ? Object.getOwnPropertyDescriptor(e, a) : void 0;
|
|
149
149
|
};
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function Da(c, e) {
|
|
152
152
|
if (c !== null && (e === Boolean || e === Number || e === Array || e === Object))
|
|
153
153
|
try {
|
|
154
154
|
c = JSON.parse(c);
|
|
@@ -168,13 +168,13 @@ function oe(c) {
|
|
|
168
168
|
throw new Error("@local-storage decorator need to be called after @property");
|
|
169
169
|
const s = `${(c == null ? void 0 : c.prefix) || ""}_${(c == null ? void 0 : c.key) || String(a)}`, r = e.constructor, f = r.propertyMap.get(a), w = f == null ? void 0 : f.type;
|
|
170
170
|
if (f) {
|
|
171
|
-
const
|
|
172
|
-
f.initialValue = () =>
|
|
171
|
+
const D = f.initialValue;
|
|
172
|
+
f.initialValue = () => Da(localStorage.getItem(s), w) ?? ea(D), r.propertyMap.set(a, { ...f, ...c });
|
|
173
173
|
}
|
|
174
174
|
const S = n == null ? void 0 : n.set, K = {
|
|
175
175
|
...n,
|
|
176
|
-
set: function(
|
|
177
|
-
|
|
176
|
+
set: function(D) {
|
|
177
|
+
D !== void 0 && localStorage.setItem(s, w === Object || w === Array ? JSON.stringify(D) : D), S && S.call(this, D);
|
|
178
178
|
}
|
|
179
179
|
};
|
|
180
180
|
Object.defineProperty(r.prototype, a, K);
|
|
@@ -223,13 +223,13 @@ var ca = { exports: {} };
|
|
|
223
223
|
if (this.log = this.debug, typeof console === a && $ < this.levels.SILENT)
|
|
224
224
|
return "No console available for logging";
|
|
225
225
|
}
|
|
226
|
-
function
|
|
226
|
+
function D($) {
|
|
227
227
|
return function() {
|
|
228
228
|
typeof console !== a && (K.call(this), this[$].apply(this, arguments));
|
|
229
229
|
};
|
|
230
230
|
}
|
|
231
231
|
function T($, V, C) {
|
|
232
|
-
return _($) ||
|
|
232
|
+
return _($) || D.apply(this, arguments);
|
|
233
233
|
}
|
|
234
234
|
function N($, V) {
|
|
235
235
|
var C = this, Ie, Le, ne, se = "loglevel";
|
|
@@ -248,7 +248,7 @@ var ca = { exports: {} };
|
|
|
248
248
|
}
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
|
-
function
|
|
251
|
+
function Re() {
|
|
252
252
|
var z;
|
|
253
253
|
if (!(typeof window === a || !se)) {
|
|
254
254
|
try {
|
|
@@ -296,7 +296,7 @@ var ca = { exports: {} };
|
|
|
296
296
|
}, C.setLevel = function(z, R) {
|
|
297
297
|
return ne = ve(z), R !== !1 && mt(ne), K.call(C);
|
|
298
298
|
}, C.setDefaultLevel = function(z) {
|
|
299
|
-
Le = ve(z),
|
|
299
|
+
Le = ve(z), Re() || C.setLevel(z, !1);
|
|
300
300
|
}, C.resetLevel = function() {
|
|
301
301
|
ne = null, Qe(), K.call(C);
|
|
302
302
|
}, C.enableAll = function(z) {
|
|
@@ -310,7 +310,7 @@ var ca = { exports: {} };
|
|
|
310
310
|
}, Ie = ve(
|
|
311
311
|
f ? f.getLevel() : "WARN"
|
|
312
312
|
);
|
|
313
|
-
var P =
|
|
313
|
+
var P = Re();
|
|
314
314
|
P != null && (ne = ve(P)), K.call(C);
|
|
315
315
|
}
|
|
316
316
|
f = new N(), f.getLogger = function(V) {
|
|
@@ -497,7 +497,7 @@ const Ke = /* @__PURE__ */ aa(Ua), Wa = X`
|
|
|
497
497
|
color: white;
|
|
498
498
|
}
|
|
499
499
|
`;
|
|
500
|
-
var Ya = Object.defineProperty, Xa = Object.getOwnPropertyDescriptor,
|
|
500
|
+
var Ya = Object.defineProperty, Xa = Object.getOwnPropertyDescriptor, At = (c, e, a, n) => {
|
|
501
501
|
for (var s = n > 1 ? void 0 : n ? Xa(e, a) : e, r = c.length - 1, f; r >= 0; r--)
|
|
502
502
|
(f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
|
|
503
503
|
return n && s && Ya(e, a, s), s;
|
|
@@ -511,13 +511,13 @@ let Ge = class extends ut {
|
|
|
511
511
|
}
|
|
512
512
|
};
|
|
513
513
|
Ge.styles = ia;
|
|
514
|
-
|
|
514
|
+
At([
|
|
515
515
|
v({ type: String })
|
|
516
516
|
], Ge.prototype, "color", 2);
|
|
517
|
-
|
|
517
|
+
At([
|
|
518
518
|
v({ type: String })
|
|
519
519
|
], Ge.prototype, "svg", 2);
|
|
520
|
-
Ge =
|
|
520
|
+
Ge = At([
|
|
521
521
|
J("cb-icon")
|
|
522
522
|
], Ge);
|
|
523
523
|
let Ga = (c) => crypto.getRandomValues(new Uint8Array(c)), Za = (c, e, a) => {
|
|
@@ -557,7 +557,7 @@ function ec(c = !0) {
|
|
|
557
557
|
}
|
|
558
558
|
const Z = Ke.noConflict();
|
|
559
559
|
Z.setLevel("info");
|
|
560
|
-
const
|
|
560
|
+
const Nt = 3e4;
|
|
561
561
|
class tc {
|
|
562
562
|
constructor(e = {}) {
|
|
563
563
|
this.id = 0, this.url = (e == null ? void 0 : e.url) || null, this.orgId = (e == null ? void 0 : e.orgId) || null, this.botId = (e == null ? void 0 : e.botId) || null, this.convId = (e == null ? void 0 : e.convId) || null, this._options = e || {}, this._ws = null, this.started = !1, this.connected = !1, this.connecting = !1, this.suspendDetected = !1, this.onMessage = (e == null ? void 0 : e.onMessage) || null, this.onConnecting = (e == null ? void 0 : e.onConnecting) || null, this.queue = [], this.pause = (a) => new Promise((n) => setTimeout(n, a)), this.lastTickTs = 0, this.lastAckTs = 0, this.tickInterval = null, Z.info(`WSC: Created, url: ${this.url}`);
|
|
@@ -623,7 +623,7 @@ class tc {
|
|
|
623
623
|
async start() {
|
|
624
624
|
this.started = !0, this.connect(), this.lastTickTs = Date.now(), this.tickInterval = setInterval(() => {
|
|
625
625
|
this.tick();
|
|
626
|
-
},
|
|
626
|
+
}, Nt);
|
|
627
627
|
}
|
|
628
628
|
async stop() {
|
|
629
629
|
this.started = !1, this.disconnect(), this.tickInterval && (clearInterval(this.tickInterval), this.tickInterval = null);
|
|
@@ -660,7 +660,7 @@ class tc {
|
|
|
660
660
|
const e = Date.now();
|
|
661
661
|
let a = !1;
|
|
662
662
|
const n = e - this.lastAckTs;
|
|
663
|
-
n >
|
|
663
|
+
n > Nt + 5e3 && (a = !0, Z.info(`WSC: checkConnection: connection loss detected - last ack delay ${n} msec, reconnecting`)), a && this.disconnect();
|
|
664
664
|
}
|
|
665
665
|
sendMessage(e) {
|
|
666
666
|
if (this.checkConnection(), !this.connected) {
|
|
@@ -710,12 +710,12 @@ class tc {
|
|
|
710
710
|
});
|
|
711
711
|
}*/
|
|
712
712
|
}
|
|
713
|
-
function
|
|
713
|
+
function F(c) {
|
|
714
714
|
return c != null && typeof c == "object" && c["@@functional/placeholder"] === !0;
|
|
715
715
|
}
|
|
716
716
|
function je(c) {
|
|
717
717
|
return function e(a) {
|
|
718
|
-
return arguments.length === 0 ||
|
|
718
|
+
return arguments.length === 0 || F(a) ? e : c.apply(this, arguments);
|
|
719
719
|
};
|
|
720
720
|
}
|
|
721
721
|
function Pe(c) {
|
|
@@ -724,13 +724,13 @@ function Pe(c) {
|
|
|
724
724
|
case 0:
|
|
725
725
|
return e;
|
|
726
726
|
case 1:
|
|
727
|
-
return
|
|
727
|
+
return F(a) ? e : je(function(s) {
|
|
728
728
|
return c(a, s);
|
|
729
729
|
});
|
|
730
730
|
default:
|
|
731
|
-
return
|
|
731
|
+
return F(a) && F(n) ? e : F(a) ? je(function(s) {
|
|
732
732
|
return c(s, n);
|
|
733
|
-
}) :
|
|
733
|
+
}) : F(n) ? je(function(s) {
|
|
734
734
|
return c(a, s);
|
|
735
735
|
}) : c(a, n);
|
|
736
736
|
}
|
|
@@ -742,29 +742,29 @@ function ac(c) {
|
|
|
742
742
|
case 0:
|
|
743
743
|
return e;
|
|
744
744
|
case 1:
|
|
745
|
-
return
|
|
745
|
+
return F(a) ? e : Pe(function(r, f) {
|
|
746
746
|
return c(a, r, f);
|
|
747
747
|
});
|
|
748
748
|
case 2:
|
|
749
|
-
return
|
|
749
|
+
return F(a) && F(n) ? e : F(a) ? Pe(function(r, f) {
|
|
750
750
|
return c(r, n, f);
|
|
751
|
-
}) :
|
|
751
|
+
}) : F(n) ? Pe(function(r, f) {
|
|
752
752
|
return c(a, r, f);
|
|
753
753
|
}) : je(function(r) {
|
|
754
754
|
return c(a, n, r);
|
|
755
755
|
});
|
|
756
756
|
default:
|
|
757
|
-
return
|
|
757
|
+
return F(a) && F(n) && F(s) ? e : F(a) && F(n) ? Pe(function(r, f) {
|
|
758
758
|
return c(r, f, s);
|
|
759
|
-
}) :
|
|
759
|
+
}) : F(a) && F(s) ? Pe(function(r, f) {
|
|
760
760
|
return c(r, n, f);
|
|
761
|
-
}) :
|
|
761
|
+
}) : F(n) && F(s) ? Pe(function(r, f) {
|
|
762
762
|
return c(a, r, f);
|
|
763
|
-
}) :
|
|
763
|
+
}) : F(a) ? je(function(r) {
|
|
764
764
|
return c(r, n, s);
|
|
765
|
-
}) :
|
|
765
|
+
}) : F(n) ? je(function(r) {
|
|
766
766
|
return c(a, r, s);
|
|
767
|
-
}) :
|
|
767
|
+
}) : F(s) ? je(function(r) {
|
|
768
768
|
return c(a, n, r);
|
|
769
769
|
}) : c(a, n, s);
|
|
770
770
|
}
|
|
@@ -804,7 +804,7 @@ var dc = Object.defineProperty, O = (c, e, a, n) => {
|
|
|
804
804
|
const A = Ke.noConflict();
|
|
805
805
|
A.setLevel("info");
|
|
806
806
|
const ee = "cb_";
|
|
807
|
-
class L extends
|
|
807
|
+
class L extends Ct {
|
|
808
808
|
constructor() {
|
|
809
809
|
super(...arguments), this.actionIdCounter = 0, this.currentLoadContext = {}, this.prefilledFormValues = {}, this.wsClient = null, this.replyMessage = null, this.streamingResponseInProgress = !1, this.streamingResponseLastText = null, this.streamingResponseBuffer = null, this.streamingResponseTagStartPos = 0, this.streamingResponseCurrentTag = null;
|
|
810
810
|
}
|
|
@@ -848,7 +848,7 @@ class L extends kt {
|
|
|
848
848
|
}, this.botSettingsRetryTimeout * 1e3), this.botSettingsRetryTimeout = this.botSettingsRetryTimeout * 2;
|
|
849
849
|
return;
|
|
850
850
|
}
|
|
851
|
-
A.info("Got bot settings - bot is enabled", r), this.disabled = !1, this.setting.welcomeMessage = (r == null ? void 0 : r.welcomeMessage) || "How can I help ?", this.setting.engageMessage = (r == null ? void 0 : r.engageMessage) || "How can I help ?", this.setting.engageTimeout = (r == null ? void 0 : r.engageTimeout) || 5, this.setting.splitMessagesAtBreak = "splitMessagesAtBreak" in r ? r.splitMessagesAtBreak : !1, this.setting.feedbackEnabled = "feedbackEnabled" in r ? r.feedbackEnabled : !1, this.setting.uploadImages = "uploadImages" in r ? r.uploadImages : !1, this.setting.newConversationTimeoutInSec = (r == null ? void 0 : r.newConversationTimeoutInSec) || 86400, this.initConversation(), this.shouldEngage === "true" && setTimeout(() => {
|
|
851
|
+
A.info("Got bot settings - bot is enabled", r), this.disabled = !1, this.setting.welcomeMessage = (r == null ? void 0 : r.welcomeMessage) || "How can I help ?", this.setting.disclaimerMessage = r != null && r.disclaimerMessage && r.disclaimerMessage !== "" ? r.disclaimerMessage : null, this.setting.engageMessage = (r == null ? void 0 : r.engageMessage) || "How can I help ?", this.setting.engageTimeout = (r == null ? void 0 : r.engageTimeout) || 5, this.setting.splitMessagesAtBreak = "splitMessagesAtBreak" in r ? r.splitMessagesAtBreak : !1, this.setting.feedbackEnabled = "feedbackEnabled" in r ? r.feedbackEnabled : !1, this.setting.uploadImages = "uploadImages" in r ? r.uploadImages : !1, this.setting.newConversationTimeoutInSec = (r == null ? void 0 : r.newConversationTimeoutInSec) || 86400, this.setting.enableNotificationSound = "enableNotificationSound" in r ? r.enableNotificationSound : !0, this.setting.botAdvancedSettings = (r == null ? void 0 : r.botAdvancedSettings) ?? {}, this.setting.startFeedbackFromMessage = "startFeedbackFromMessage" in this.setting.botAdvancedSettings ? this.setting.botAdvancedSettings.startFeedbackFromMessage : 1, this.initConversation(), this.shouldEngage === "true" && setTimeout(() => {
|
|
852
852
|
this.showEngagePopup();
|
|
853
853
|
}, this.setting.engageTimeout * 1e3);
|
|
854
854
|
}
|
|
@@ -966,6 +966,8 @@ class L extends kt {
|
|
|
966
966
|
this.open || (A.info("Engaging User !"), this.engage = !0, this.playAudioNotification());
|
|
967
967
|
}
|
|
968
968
|
playAudioNotification() {
|
|
969
|
+
if (!this.setting.enableNotificationSound)
|
|
970
|
+
return;
|
|
969
971
|
const e = (r) => {
|
|
970
972
|
const f = new Uint8Array(r.length / 2);
|
|
971
973
|
for (let w = 0; w < f.length; w++)
|
|
@@ -1469,10 +1471,14 @@ O([
|
|
|
1469
1471
|
botId: null,
|
|
1470
1472
|
url: null,
|
|
1471
1473
|
welcomeMessage: null,
|
|
1474
|
+
disclaimerMessage: null,
|
|
1472
1475
|
splitMessagesAtBreak: !1,
|
|
1473
1476
|
feedbackEnabled: !1,
|
|
1477
|
+
startFeedbackFromMessage: 1,
|
|
1474
1478
|
uploadImages: !1,
|
|
1475
|
-
newConversationTimeoutInSec: 86400
|
|
1479
|
+
newConversationTimeoutInSec: 86400,
|
|
1480
|
+
enableNotificationSound: !0,
|
|
1481
|
+
botAdvancedOptions: null
|
|
1476
1482
|
}
|
|
1477
1483
|
})
|
|
1478
1484
|
], L.prototype, "setting");
|
|
@@ -1714,7 +1720,7 @@ var mc = Object.defineProperty, yc = Object.getOwnPropertyDescriptor, vc = (c, e
|
|
|
1714
1720
|
(f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
|
|
1715
1721
|
return n && s && mc(e, a, s), s;
|
|
1716
1722
|
};
|
|
1717
|
-
let
|
|
1723
|
+
let St = class extends te {
|
|
1718
1724
|
constructor() {
|
|
1719
1725
|
super(...arguments), this.year = (/* @__PURE__ */ new Date()).getFullYear();
|
|
1720
1726
|
}
|
|
@@ -1749,10 +1755,10 @@ let Ct = class extends te {
|
|
|
1749
1755
|
`;
|
|
1750
1756
|
}
|
|
1751
1757
|
};
|
|
1752
|
-
|
|
1753
|
-
|
|
1758
|
+
St.styles = gc;
|
|
1759
|
+
St = vc([
|
|
1754
1760
|
J("cb-footer")
|
|
1755
|
-
],
|
|
1761
|
+
], St);
|
|
1756
1762
|
const wc = X`
|
|
1757
1763
|
${me}
|
|
1758
1764
|
|
|
@@ -1797,6 +1803,43 @@ const wc = X`
|
|
|
1797
1803
|
display: none;
|
|
1798
1804
|
}*/
|
|
1799
1805
|
|
|
1806
|
+
.cb-disclaimer-wrapper {
|
|
1807
|
+
max-width: 100%;
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1810
|
+
.cb-disclaimer-message {
|
|
1811
|
+
color: var(--enegelai-disclaimer-message-color, rgba(34, 34, 34, 0.6));
|
|
1812
|
+
border-radius: 6px;
|
|
1813
|
+
background-color: var(--enegelai-disclaimer-message-background, rgba(234, 234, 234, 0.2));
|
|
1814
|
+
text-align: left;
|
|
1815
|
+
padding: 2px 12px;
|
|
1816
|
+
font-size: 0.85em;
|
|
1817
|
+
cursor: pointer;
|
|
1818
|
+
|
|
1819
|
+
/* clamp to 2 lines by default */
|
|
1820
|
+
display: -webkit-box;
|
|
1821
|
+
-webkit-box-orient: vertical;
|
|
1822
|
+
-webkit-line-clamp: var(--enegelai-disclaimer-line-clamp, 2);
|
|
1823
|
+
overflow: hidden;
|
|
1824
|
+
/* optional: smooth-ish open/close height change in some UAs */
|
|
1825
|
+
transition: all 2s ease;
|
|
1826
|
+
}
|
|
1827
|
+
|
|
1828
|
+
.cb-disclaimer-message p {
|
|
1829
|
+
margin-block-start: 0.5em;
|
|
1830
|
+
margin-block-end: 0.5em;
|
|
1831
|
+
}
|
|
1832
|
+
|
|
1833
|
+
/* remove default disclosure marker */
|
|
1834
|
+
.cb-disclaimer-message::-webkit-details-marker { display: none; }
|
|
1835
|
+
.cb-disclaimer-message::marker { content: ""; }
|
|
1836
|
+
|
|
1837
|
+
/* when open, show full text */
|
|
1838
|
+
.cb-disclaimer-wrapper[open] .cb-disclaimer-message {
|
|
1839
|
+
-webkit-line-clamp: unset;
|
|
1840
|
+
overflow: visible;
|
|
1841
|
+
}
|
|
1842
|
+
|
|
1800
1843
|
.cb-input-form {
|
|
1801
1844
|
margin: 10px 5px;
|
|
1802
1845
|
padding: 20px 20px;
|
|
@@ -1968,20 +2011,20 @@ var sa = { exports: {} };
|
|
|
1968
2011
|
return t;
|
|
1969
2012
|
}
|
|
1970
2013
|
function _(t, i) {
|
|
1971
|
-
if ((R(t) || t === window || t === document) && (t = [t]), Ye(t) ||
|
|
1972
|
-
if (Ye(t) && !
|
|
1973
|
-
else if (
|
|
2014
|
+
if ((R(t) || t === window || t === document) && (t = [t]), Ye(t) || _e(t) || (t = [t]), Pt(t) != 0) {
|
|
2015
|
+
if (Ye(t) && !_e(t)) for (var o = t.length, d = 0; d < o && i.call(t[d], t[d], d, t) !== !1; d++) ;
|
|
2016
|
+
else if (_e(t)) {
|
|
1974
2017
|
for (var l in t) if (Y(t, l) && i.call(t[l], t[l], l, t) === !1) break;
|
|
1975
2018
|
}
|
|
1976
2019
|
}
|
|
1977
2020
|
}
|
|
1978
2021
|
function K(t) {
|
|
1979
2022
|
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, o = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, d = t[w] = t[w] || [], l = { all: d, evt: null, found: null };
|
|
1980
|
-
return i && o &&
|
|
2023
|
+
return i && o && Pt(d) > 0 && _(d, function(h, b) {
|
|
1981
2024
|
if (h.eventName == i && h.fn.toString() == o.toString()) return l.found = !0, l.evt = b, !1;
|
|
1982
2025
|
}), l;
|
|
1983
2026
|
}
|
|
1984
|
-
function
|
|
2027
|
+
function D(t) {
|
|
1985
2028
|
var i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, o = i.onElement, d = i.withCallback, l = i.avoidDuplicate, h = l === void 0 || l, b = i.once, u = b !== void 0 && b, y = i.useCapture, m = y !== void 0 && y, x = arguments.length > 2 ? arguments[2] : void 0, k = o || [];
|
|
1986
2029
|
function M(E) {
|
|
1987
2030
|
P(d) && d.call(x, E, this), u && M.destroy();
|
|
@@ -2022,7 +2065,7 @@ var sa = { exports: {} };
|
|
|
2022
2065
|
var d = mt(), l = i.split(" ");
|
|
2023
2066
|
_(l, function(h) {
|
|
2024
2067
|
T(t, "g" + h);
|
|
2025
|
-
}),
|
|
2068
|
+
}), D(d, { onElement: t, avoidDuplicate: !1, once: !0, withCallback: function(h, b) {
|
|
2026
2069
|
_(l, function(u) {
|
|
2027
2070
|
N(b, "g" + u);
|
|
2028
2071
|
}), P(o) && o();
|
|
@@ -2051,7 +2094,7 @@ var sa = { exports: {} };
|
|
|
2051
2094
|
var t, i = document.createElement("fakeelement"), o = { animation: "animationend", OAnimation: "oAnimationEnd", MozAnimation: "animationend", WebkitAnimation: "webkitAnimationEnd" };
|
|
2052
2095
|
for (t in o) if (i.style[t] !== void 0) return o[t];
|
|
2053
2096
|
}
|
|
2054
|
-
function
|
|
2097
|
+
function Re(t, i, o, d) {
|
|
2055
2098
|
if (t()) i();
|
|
2056
2099
|
else {
|
|
2057
2100
|
var l;
|
|
@@ -2073,7 +2116,7 @@ var sa = { exports: {} };
|
|
|
2073
2116
|
}
|
|
2074
2117
|
if ((d = document.querySelectorAll('script[src="' + t + '"]')) && d.length > 0) {
|
|
2075
2118
|
if (P(o)) {
|
|
2076
|
-
if (z(i)) return
|
|
2119
|
+
if (z(i)) return Re(function() {
|
|
2077
2120
|
return window[i] !== void 0;
|
|
2078
2121
|
}, function() {
|
|
2079
2122
|
o();
|
|
@@ -2084,7 +2127,7 @@ var sa = { exports: {} };
|
|
|
2084
2127
|
var u = document.createElement("script");
|
|
2085
2128
|
u.type = "text/javascript", u.src = t, u.onload = function() {
|
|
2086
2129
|
if (P(o)) {
|
|
2087
|
-
if (z(i)) return
|
|
2130
|
+
if (z(i)) return Re(function() {
|
|
2088
2131
|
return window[i] !== void 0;
|
|
2089
2132
|
}, function() {
|
|
2090
2133
|
o();
|
|
@@ -2113,7 +2156,7 @@ var sa = { exports: {} };
|
|
|
2113
2156
|
function Ye(t) {
|
|
2114
2157
|
return t && t.length && isFinite(t.length);
|
|
2115
2158
|
}
|
|
2116
|
-
function
|
|
2159
|
+
function _e(t) {
|
|
2117
2160
|
return n(t) === "object" && t != null && !P(t) && !qe(t);
|
|
2118
2161
|
}
|
|
2119
2162
|
function re(t) {
|
|
@@ -2122,8 +2165,8 @@ var sa = { exports: {} };
|
|
|
2122
2165
|
function Y(t, i) {
|
|
2123
2166
|
return t !== null && hasOwnProperty.call(t, i);
|
|
2124
2167
|
}
|
|
2125
|
-
function
|
|
2126
|
-
if (
|
|
2168
|
+
function Pt(t) {
|
|
2169
|
+
if (_e(t)) {
|
|
2127
2170
|
if (t.keys) return t.keys().length;
|
|
2128
2171
|
var i = 0;
|
|
2129
2172
|
for (var o in t) Y(t, o) && i++;
|
|
@@ -2134,7 +2177,7 @@ var sa = { exports: {} };
|
|
|
2134
2177
|
function et(t) {
|
|
2135
2178
|
return !isNaN(parseFloat(t)) && isFinite(t);
|
|
2136
2179
|
}
|
|
2137
|
-
function
|
|
2180
|
+
function zt() {
|
|
2138
2181
|
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : -1, i = document.querySelectorAll(".gbtn[data-taborder]:not(.disabled)");
|
|
2139
2182
|
if (!i.length) return !1;
|
|
2140
2183
|
if (i.length == 1) return i[0];
|
|
@@ -2154,7 +2197,7 @@ var sa = { exports: {} };
|
|
|
2154
2197
|
}
|
|
2155
2198
|
function va(t) {
|
|
2156
2199
|
if (t.events.hasOwnProperty("keyboard")) return !1;
|
|
2157
|
-
t.events.keyboard =
|
|
2200
|
+
t.events.keyboard = D("keydown", { onElement: window, withCallback: function(i, o) {
|
|
2158
2201
|
var d = (i = i || window.event).keyCode;
|
|
2159
2202
|
if (d == 9) {
|
|
2160
2203
|
var l = document.querySelector(".gbtn.focused");
|
|
@@ -2166,10 +2209,10 @@ var sa = { exports: {} };
|
|
|
2166
2209
|
var b = document.querySelectorAll(".gbtn[data-taborder]");
|
|
2167
2210
|
if (!b || b.length <= 0) return;
|
|
2168
2211
|
if (!l) {
|
|
2169
|
-
var u =
|
|
2212
|
+
var u = zt();
|
|
2170
2213
|
return void (u && (u.focus(), T(u, "focused")));
|
|
2171
2214
|
}
|
|
2172
|
-
var y =
|
|
2215
|
+
var y = zt(l.getAttribute("data-taborder"));
|
|
2173
2216
|
N(l, "focused"), y && (y.focus(), T(y, "focused"));
|
|
2174
2217
|
}
|
|
2175
2218
|
d == 39 && t.nextSlide(), d == 37 && t.prevSlide(), d == 27 && t.close();
|
|
@@ -2217,7 +2260,7 @@ var sa = { exports: {} };
|
|
|
2217
2260
|
t.style.transform = "translate3d(" + i + "px, " + o + "px, 0)";
|
|
2218
2261
|
} }, { key: "widowWidth", value: function() {
|
|
2219
2262
|
return window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
|
|
2220
|
-
} }]),
|
|
2263
|
+
} }]), jt = f(function t() {
|
|
2221
2264
|
var i = this, o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2222
2265
|
s(this, t);
|
|
2223
2266
|
var d = o.dragEl, l = o.toleranceX, h = l === void 0 ? 40 : l, b = o.toleranceY, u = b === void 0 ? 65 : b, y = o.slide, m = y === void 0 ? null : y, x = o.instance, k = x === void 0 ? null : x;
|
|
@@ -2292,14 +2335,14 @@ var sa = { exports: {} };
|
|
|
2292
2335
|
var U = Y(l.settings.plyr, "config") ? l.settings.plyr.config : {}, fe = new Plyr("#" + b, U);
|
|
2293
2336
|
fe.on("ready", function(de) {
|
|
2294
2337
|
y[b] = de.detail.plyr, P(d) && d();
|
|
2295
|
-
}),
|
|
2338
|
+
}), Re(function() {
|
|
2296
2339
|
return t.querySelector("iframe") && t.querySelector("iframe").dataset.ready == "true";
|
|
2297
2340
|
}, function() {
|
|
2298
2341
|
l.resize(t);
|
|
2299
|
-
}), fe.on("enterfullscreen",
|
|
2342
|
+
}), fe.on("enterfullscreen", Ht), fe.on("exitfullscreen", Ht);
|
|
2300
2343
|
});
|
|
2301
2344
|
}
|
|
2302
|
-
function
|
|
2345
|
+
function Ht(t) {
|
|
2303
2346
|
var i = $(t.target, ".gslide-media");
|
|
2304
2347
|
t.type === "enterfullscreen" && T(i, "fullscreen"), t.type === "exitfullscreen" && N(i, "fullscreen");
|
|
2305
2348
|
}
|
|
@@ -2317,7 +2360,7 @@ var sa = { exports: {} };
|
|
|
2317
2360
|
k.style.height = i.height, k.style.maxWidth = i.width, T(k, "ginlined-content"), l = k;
|
|
2318
2361
|
}
|
|
2319
2362
|
if (!l) return console.error("Unable to append inline slide content", i), !1;
|
|
2320
|
-
b.style.height = i.height, b.style.width = i.width, b.appendChild(l), this.events["inlineclose" + u] =
|
|
2363
|
+
b.style.height = i.height, b.style.width = i.width, b.appendChild(l), this.events["inlineclose" + u] = D("click", { onElement: b.querySelectorAll(".gtrigger-close"), withCallback: function(M) {
|
|
2321
2364
|
M.preventDefault(), h.close();
|
|
2322
2365
|
} }), P(d) && d();
|
|
2323
2366
|
}
|
|
@@ -2332,13 +2375,13 @@ var sa = { exports: {} };
|
|
|
2332
2375
|
}
|
|
2333
2376
|
var _a = f(function t() {
|
|
2334
2377
|
var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2335
|
-
s(this, t), this.defaults = { href: "", sizes: "", srcset: "", title: "", type: "", videoProvider: "", description: "", alt: "", descPosition: "bottom", effect: "", width: "", height: "", content: !1, zoomable: !0, draggable: !0 },
|
|
2378
|
+
s(this, t), this.defaults = { href: "", sizes: "", srcset: "", title: "", type: "", videoProvider: "", description: "", alt: "", descPosition: "bottom", effect: "", width: "", height: "", content: !1, zoomable: !0, draggable: !0 }, _e(i) && (this.defaults = S(this.defaults, i));
|
|
2336
2379
|
}, [{ key: "sourceType", value: function(t) {
|
|
2337
2380
|
var i = t;
|
|
2338
2381
|
return (t = t.toLowerCase()).match(/\.(jpeg|jpg|jpe|gif|png|apn|webp|avif|svg)/) !== null ? "image" : t.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/) || t.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/) || t.match(/(youtube\.com|youtube-nocookie\.com)\/embed\/([a-zA-Z0-9\-_]+)/) || t.match(/(youtube\.com|youtube-nocookie\.com)\/shorts\/([a-zA-Z0-9\-_]+)/) || t.match(/vimeo\.com\/([0-9]*)/) || t.match(/\.(mp4|ogg|webm|mov)/) !== null ? "video" : t.match(/\.(mp3|wav|wma|aac|ogg)/) !== null ? "audio" : t.indexOf("#") > -1 && i.split("#").pop().trim() !== "" ? "inline" : t.indexOf("goajax=true") > -1 ? "ajax" : "external";
|
|
2339
2382
|
} }, { key: "parseConfig", value: function(t, i) {
|
|
2340
2383
|
var o = this, d = S({ descPosition: i.descPosition }, this.defaults);
|
|
2341
|
-
if (
|
|
2384
|
+
if (_e(t) && !R(t)) {
|
|
2342
2385
|
Y(t, "type") || (Y(t, "content") && t.content ? t.type = "inline" : Y(t, "href") && (t.type = this.sourceType(t.href)));
|
|
2343
2386
|
var l = S(d, t);
|
|
2344
2387
|
return this.setSize(l, i), l;
|
|
@@ -2401,9 +2444,9 @@ var sa = { exports: {} };
|
|
|
2401
2444
|
if (P(d.afterSlideLoad) && (M = function() {
|
|
2402
2445
|
P(o) && o(), d.afterSlideLoad({ index: t.index, slide: i, player: t.instance.getSlidePlayerInstance(t.index) });
|
|
2403
2446
|
}), l.title == "" && l.description == "" ? k && k.parentNode.parentNode.removeChild(k.parentNode) : (m && l.title !== "" ? (m.id = E, m.innerHTML = l.title) : m.parentNode.removeChild(m), x && l.description !== "" ? (x.id = I, h && d.moreLength > 0 ? (l.smallDescription = this.slideShortDesc(l.description, d.moreLength, d.moreText), x.innerHTML = l.smallDescription, this.descriptionEvents(x, l)) : x.innerHTML = l.description) : x.parentNode.removeChild(x), T(y.parentNode, "desc-".concat(u)), T(k.parentNode, "description-".concat(u))), T(y, "gslide-".concat(b)), T(i, "loaded"), b !== "video") {
|
|
2404
|
-
if (b !== "external") return b === "inline" ? (Ca.apply(this.instance, [i, l, this.index, M]), void (l.draggable && new
|
|
2447
|
+
if (b !== "external") return b === "inline" ? (Ca.apply(this.instance, [i, l, this.index, M]), void (l.draggable && new jt({ dragEl: i.querySelector(".gslide-inline"), toleranceX: d.dragToleranceX, toleranceY: d.dragToleranceY, slide: i, instance: this.instance }))) : void (b !== "image" ? P(M) && M() : xa(i, l, this.index, function() {
|
|
2405
2448
|
var U = i.querySelector("img");
|
|
2406
|
-
l.draggable && new
|
|
2449
|
+
l.draggable && new jt({ dragEl: U, toleranceX: d.dragToleranceX, toleranceY: d.dragToleranceY, slide: i, instance: t.instance }), l.zoomable && U.naturalWidth > U.offsetWidth && (T(U, "zoomable"), new wa(U, i, function() {
|
|
2407
2450
|
t.instance.resize();
|
|
2408
2451
|
})), P(M) && M();
|
|
2409
2452
|
}));
|
|
@@ -2419,12 +2462,12 @@ var sa = { exports: {} };
|
|
|
2419
2462
|
} }, { key: "descriptionEvents", value: function(t, i) {
|
|
2420
2463
|
var o = this, d = t.querySelector(".desc-more");
|
|
2421
2464
|
if (!d) return !1;
|
|
2422
|
-
|
|
2465
|
+
D("click", { onElement: d, withCallback: function(l, h) {
|
|
2423
2466
|
l.preventDefault();
|
|
2424
2467
|
var b = document.body, u = $(h, ".gslide-desc");
|
|
2425
2468
|
if (!u) return !1;
|
|
2426
2469
|
u.innerHTML = i.description, T(b, "gdesc-open");
|
|
2427
|
-
var y =
|
|
2470
|
+
var y = D("click", { onElement: [b, $(u, ".gslide-description")], withCallback: function(m, x) {
|
|
2428
2471
|
m.target.nodeName.toLowerCase() !== "a" && (N(b, "gdesc-open"), T(b, "gdesc-closed"), u.innerHTML = i.smallDescription, o.descriptionEvents(u, i), setTimeout(function() {
|
|
2429
2472
|
N(b, "gdesc-closed");
|
|
2430
2473
|
}, 400), y.destroy());
|
|
@@ -2539,15 +2582,15 @@ var sa = { exports: {} };
|
|
|
2539
2582
|
var b, u = document.createElement("fakeelement"), y = { transition: "transitionend", OTransition: "oTransitionEnd", MozTransition: "transitionend", WebkitTransition: "webkitTransitionEnd" };
|
|
2540
2583
|
for (b in y) if (u.style[b] !== void 0) return y[b];
|
|
2541
2584
|
}(), o = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth, d = Q(t, "gslide-media") ? t : t.querySelector(".gslide-media"), l = $(d, ".ginner-container"), h = t.querySelector(".gslide-description");
|
|
2542
|
-
o > 769 && (d = l), T(d, "greset"), C(d, "translate3d(0, 0, 0)"),
|
|
2585
|
+
o > 769 && (d = l), T(d, "greset"), C(d, "translate3d(0, 0, 0)"), D(i, { onElement: d, once: !0, withCallback: function(b, u) {
|
|
2543
2586
|
N(d, "greset");
|
|
2544
2587
|
} }), d.style.opacity = "", h && (h.style.opacity = "");
|
|
2545
2588
|
}
|
|
2546
2589
|
function Ea(t) {
|
|
2547
2590
|
if (t.events.hasOwnProperty("touch")) return !1;
|
|
2548
|
-
var i, o, d, l = se(), h = l.width, b = l.height, u = !1, y = null, m = null, x = null, k = !1, M = 1, E = 1, I = !1, U = !1, fe = null, de = null, G = null,
|
|
2591
|
+
var i, o, d, l = se(), h = l.width, b = l.height, u = !1, y = null, m = null, x = null, k = !1, M = 1, E = 1, I = !1, U = !1, fe = null, de = null, G = null, $e = null, ue = 0, Ve = 0, Fe = !1, De = !1, pe = {}, Oe = {}, Ft = 0, Dt = 0, La = document.getElementById("glightbox-slider"), ct = document.querySelector(".goverlay"), qa = new Ta(La, { touchStart: function(B) {
|
|
2549
2592
|
if (u = !0, (Q(B.targetTouches[0].target, "ginner-container") || $(B.targetTouches[0].target, ".gslide-desc") || B.targetTouches[0].target.nodeName.toLowerCase() == "a") && (u = !1), $(B.targetTouches[0].target, ".gslide-inline") && !Q(B.targetTouches[0].target.parentNode, "gslide-inline") && (u = !1), u) {
|
|
2550
|
-
if (Oe = B.targetTouches[0], pe.pageX = B.targetTouches[0].pageX, pe.pageY = B.targetTouches[0].pageY,
|
|
2593
|
+
if (Oe = B.targetTouches[0], pe.pageX = B.targetTouches[0].pageX, pe.pageY = B.targetTouches[0].pageY, Ft = B.targetTouches[0].clientX, Dt = B.targetTouches[0].clientY, y = t.activeSlide, m = y.querySelector(".gslide-media"), d = y.querySelector(".gslide-inline"), x = null, Q(m, "gslide-image") && (x = m.querySelector("img")), (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) > 769 && (m = y.querySelector(".ginner-container")), N(ct, "greset"), B.pageX > 20 && B.pageX < window.innerWidth - 20) return;
|
|
2551
2594
|
B.preventDefault();
|
|
2552
2595
|
}
|
|
2553
2596
|
}, touchMove: function(B) {
|
|
@@ -2557,14 +2600,14 @@ var sa = { exports: {} };
|
|
|
2557
2600
|
if (Math.abs(ce) <= 13) return !1;
|
|
2558
2601
|
}
|
|
2559
2602
|
k = !0;
|
|
2560
|
-
var
|
|
2561
|
-
if (Math.abs(Pa) > Math.abs(za) ? (
|
|
2562
|
-
C(m, "translate3d(".concat(ue, "%, ").concat(
|
|
2603
|
+
var Me, it = B.targetTouches[0].clientX, Oa = B.targetTouches[0].clientY, Pa = Ft - it, za = Dt - Oa;
|
|
2604
|
+
if (Math.abs(Pa) > Math.abs(za) ? (Fe = !1, De = !0) : (De = !1, Fe = !0), i = Oe.pageX - pe.pageX, ue = 100 * i / h, o = Oe.pageY - pe.pageY, Ve = 100 * o / b, Fe && x && (Me = 1 - Math.abs(o) / b, ct.style.opacity = Me, t.settings.touchFollowAxis && (ue = 0)), De && (Me = 1 - Math.abs(i) / h, m.style.opacity = Me, t.settings.touchFollowAxis && (Ve = 0)), !x) return C(m, "translate3d(".concat(ue, "%, 0, 0)"));
|
|
2605
|
+
C(m, "translate3d(".concat(ue, "%, ").concat(Ve, "%, 0)"));
|
|
2563
2606
|
}
|
|
2564
2607
|
}, touchEnd: function() {
|
|
2565
2608
|
if (u) {
|
|
2566
|
-
if (k = !1, U || I) return G = fe, void (
|
|
2567
|
-
var B = Math.abs(parseInt(
|
|
2609
|
+
if (k = !1, U || I) return G = fe, void ($e = de);
|
|
2610
|
+
var B = Math.abs(parseInt(Ve)), ce = Math.abs(parseInt(ue));
|
|
2568
2611
|
if (!(B > 29 && x)) return B < 29 && ce < 25 ? (T(ct, "greset"), ct.style.opacity = 1, yt(m)) : void 0;
|
|
2569
2612
|
t.close();
|
|
2570
2613
|
}
|
|
@@ -2578,13 +2621,13 @@ var sa = { exports: {} };
|
|
|
2578
2621
|
if (!x || k) return !1;
|
|
2579
2622
|
I = !0, x.scaleX = x.scaleY = M * B.zoom;
|
|
2580
2623
|
var ce = M * B.zoom;
|
|
2581
|
-
if (U = !0, ce <= 1) return U = !1, ce = 1,
|
|
2624
|
+
if (U = !0, ce <= 1) return U = !1, ce = 1, $e = null, G = null, fe = null, de = null, void x.setAttribute("style", "");
|
|
2582
2625
|
ce > 4.5 && (ce = 4.5), x.style.transform = "scale3d(".concat(ce, ", ").concat(ce, ", 1)"), E = ce;
|
|
2583
2626
|
}, pressMove: function(B) {
|
|
2584
2627
|
if (U && !I) {
|
|
2585
|
-
var ce = Oe.pageX - pe.pageX,
|
|
2586
|
-
G && (ce += G),
|
|
2587
|
-
var it = "translate3d(".concat(ce, "px, ").concat(
|
|
2628
|
+
var ce = Oe.pageX - pe.pageX, Me = Oe.pageY - pe.pageY;
|
|
2629
|
+
G && (ce += G), $e && (Me += $e), fe = ce, de = Me;
|
|
2630
|
+
var it = "translate3d(".concat(ce, "px, ").concat(Me, "px, 0)");
|
|
2588
2631
|
E && (it += " scale3d(".concat(E, ", ").concat(E, ", 1)")), C(x, it);
|
|
2589
2632
|
}
|
|
2590
2633
|
}, swipe: function(B) {
|
|
@@ -2602,7 +2645,7 @@ var sa = { exports: {} };
|
|
|
2602
2645
|
} });
|
|
2603
2646
|
t.events.touch = qa;
|
|
2604
2647
|
}
|
|
2605
|
-
var
|
|
2648
|
+
var Bt = ve(), Rt = ve() !== null || document.createTouch !== void 0 || "ontouchstart" in window || "onmsgesturechange" in window || navigator.msMaxTouchPoints, Vt = document.getElementsByTagName("html")[0], Aa = { selector: ".glightbox", elements: null, skin: "clean", theme: "clean", closeButton: !0, startAt: null, autoplayVideos: !0, autofocusVideos: !0, descPosition: "bottom", width: "900px", height: "506px", videosWidth: "960px", beforeSlideChange: null, afterSlideChange: null, beforeSlideLoad: null, afterSlideLoad: null, slideInserted: null, slideRemoved: null, slideExtraAttributes: null, onOpen: null, onClose: null, loop: !1, zoomable: !0, draggable: !0, dragAutoSnap: !1, dragToleranceX: 40, dragToleranceY: 65, preload: !0, oneSlidePerOpen: !1, touchNavigation: !0, touchFollowAxis: !0, keyboardNavigation: !0, closeOnOutsideClick: !0, plugins: !1, plyr: { css: "https://cdn.plyr.io/3.6.12/plyr.css", js: "https://cdn.plyr.io/3.6.12/plyr.js", config: { ratio: "16:9", fullscreen: { enabled: !0, iosNative: !0 }, youtube: { noCookie: !0, rel: 0, showinfo: 0, iv_load_policy: 3 }, vimeo: { byline: !1, portrait: !1, title: !1, transparent: !1 } } }, openEffect: "zoom", closeEffect: "zoom", slideEffect: "slide", moreText: "See more", moreLength: 60, cssEfects: { fade: { in: "fadeIn", out: "fadeOut" }, zoom: { in: "zoomIn", out: "zoomOut" }, slide: { in: "slideInRight", out: "slideOutLeft" }, slideBack: { in: "slideInLeft", out: "slideOutRight" }, none: { in: "none", out: "none" } }, svg: { close: '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 512 512" xml:space="preserve"><g><g><path d="M505.943,6.058c-8.077-8.077-21.172-8.077-29.249,0L6.058,476.693c-8.077,8.077-8.077,21.172,0,29.249C10.096,509.982,15.39,512,20.683,512c5.293,0,10.586-2.019,14.625-6.059L505.943,35.306C514.019,27.23,514.019,14.135,505.943,6.058z"/></g></g><g><g><path d="M505.942,476.694L35.306,6.059c-8.076-8.077-21.172-8.077-29.248,0c-8.077,8.076-8.077,21.171,0,29.248l470.636,470.636c4.038,4.039,9.332,6.058,14.625,6.058c5.293,0,10.587-2.019,14.624-6.057C514.018,497.866,514.018,484.771,505.942,476.694z"/></g></g></svg>', next: '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 477.175 477.175" xml:space="preserve"> <g><path d="M360.731,229.075l-225.1-225.1c-5.3-5.3-13.8-5.3-19.1,0s-5.3,13.8,0,19.1l215.5,215.5l-215.5,215.5c-5.3,5.3-5.3,13.8,0,19.1c2.6,2.6,6.1,4,9.5,4c3.4,0,6.9-1.3,9.5-4l225.1-225.1C365.931,242.875,365.931,234.275,360.731,229.075z"/></g></svg>', prev: '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 477.175 477.175" xml:space="preserve"><g><path d="M145.188,238.575l215.5-215.5c5.3-5.3,5.3-13.8,0-19.1s-13.8-5.3-19.1,0l-225.1,225.1c-5.3,5.3-5.3,13.8,0,19.1l225.1,225c2.6,2.6,6.1,4,9.5,4s6.9-1.3,9.5-4c5.3-5.3,5.3-13.8,0-19.1L145.188,238.575z"/></g></svg>' }, slideHTML: `<div class="gslide">
|
|
2606
2649
|
<div class="gslide-inner-content">
|
|
2607
2650
|
<div class="ginner-container">
|
|
2608
2651
|
<div class="gslide-media">
|
|
@@ -2629,7 +2672,7 @@ var sa = { exports: {} };
|
|
|
2629
2672
|
s(this, t), this.customOptions = i, this.settings = S(Aa, i), this.effectsClasses = this.getAnimationClasses(), this.videoPlayers = {}, this.apiEvents = [], this.fullElementsList = !1;
|
|
2630
2673
|
}, [{ key: "init", value: function() {
|
|
2631
2674
|
var t = this, i = this.getSelector();
|
|
2632
|
-
i && (this.baseEvents =
|
|
2675
|
+
i && (this.baseEvents = D("click", { onElement: i, withCallback: function(o, d) {
|
|
2633
2676
|
o.preventDefault(), t.open(d);
|
|
2634
2677
|
} })), this.elements = this.getElements();
|
|
2635
2678
|
} }, { key: "open", value: function() {
|
|
@@ -2647,7 +2690,7 @@ var sa = { exports: {} };
|
|
|
2647
2690
|
var b = document.createElement("style");
|
|
2648
2691
|
b.type = "text/css", b.className = "gcss-styles", b.innerText = ".gscrollbar-fixer {margin-right: ".concat(h, "px}"), document.head.appendChild(b), T(l, "gscrollbar-fixer");
|
|
2649
2692
|
}
|
|
2650
|
-
T(l, "glightbox-open"), T(
|
|
2693
|
+
T(l, "glightbox-open"), T(Vt, "glightbox-open"), Bt && (T(document.body, "glightbox-mobile"), this.settings.slideEffect = "slide"), this.showSlide(o, !0), this.elements.length === 1 ? (T(this.prevButton, "glightbox-button-hidden"), T(this.nextButton, "glightbox-button-hidden")) : (N(this.prevButton, "glightbox-button-hidden"), N(this.nextButton, "glightbox-button-hidden")), this.lightboxOpen = !0, this.trigger("open"), P(this.settings.onOpen) && this.settings.onOpen(), Rt && this.settings.touchNavigation && Ea(this), this.settings.keyboardNavigation && va(this);
|
|
2651
2694
|
} }, { key: "openAt", value: function() {
|
|
2652
2695
|
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
|
|
2653
2696
|
this.open(null, t);
|
|
@@ -2760,7 +2803,7 @@ var sa = { exports: {} };
|
|
|
2760
2803
|
o && !o.playing && o.play();
|
|
2761
2804
|
} }, { key: "slidePlayerPlay", value: function(t) {
|
|
2762
2805
|
var i;
|
|
2763
|
-
if (!
|
|
2806
|
+
if (!Bt || (i = this.settings.plyr.config) !== null && i !== void 0 && i.muted) {
|
|
2764
2807
|
if (R(t)) {
|
|
2765
2808
|
var o = t.querySelector(".gvideo-wrapper");
|
|
2766
2809
|
o && (t = o.getAttribute("data-index"));
|
|
@@ -2824,17 +2867,17 @@ var sa = { exports: {} };
|
|
|
2824
2867
|
var u = document.getElementById("glightbox-body");
|
|
2825
2868
|
this.modal = u;
|
|
2826
2869
|
var y = u.querySelector(".gclose");
|
|
2827
|
-
this.prevButton = u.querySelector(".gprev"), this.nextButton = u.querySelector(".gnext"), this.overlay = u.querySelector(".goverlay"), this.loader = u.querySelector(".gloader"), this.slidesContainer = document.getElementById("glightbox-slider"), this.bodyHiddenChildElms = o, this.events = {}, T(this.modal, "glightbox-" + this.settings.skin), this.settings.closeButton && y && (this.events.close =
|
|
2870
|
+
this.prevButton = u.querySelector(".gprev"), this.nextButton = u.querySelector(".gnext"), this.overlay = u.querySelector(".goverlay"), this.loader = u.querySelector(".gloader"), this.slidesContainer = document.getElementById("glightbox-slider"), this.bodyHiddenChildElms = o, this.events = {}, T(this.modal, "glightbox-" + this.settings.skin), this.settings.closeButton && y && (this.events.close = D("click", { onElement: y, withCallback: function(m, x) {
|
|
2828
2871
|
m.preventDefault(), t.close();
|
|
2829
|
-
} })), y && !this.settings.closeButton && y.parentNode.removeChild(y), this.nextButton && (this.events.next =
|
|
2872
|
+
} })), y && !this.settings.closeButton && y.parentNode.removeChild(y), this.nextButton && (this.events.next = D("click", { onElement: this.nextButton, withCallback: function(m, x) {
|
|
2830
2873
|
m.preventDefault(), t.nextSlide();
|
|
2831
|
-
} })), this.prevButton && (this.events.prev =
|
|
2874
|
+
} })), this.prevButton && (this.events.prev = D("click", { onElement: this.prevButton, withCallback: function(m, x) {
|
|
2832
2875
|
m.preventDefault(), t.prevSlide();
|
|
2833
|
-
} })), this.settings.closeOnOutsideClick && (this.events.outClose =
|
|
2876
|
+
} })), this.settings.closeOnOutsideClick && (this.events.outClose = D("click", { onElement: u, withCallback: function(m, x) {
|
|
2834
2877
|
t.preventOutsideClick || Q(document.body, "glightbox-mobile") || $(m.target, ".ginner-container") || $(m.target, ".gbtn") || Q(m.target, "gnext") || Q(m.target, "gprev") || t.close();
|
|
2835
2878
|
} })), _(this.elements, function(m, x) {
|
|
2836
2879
|
t.slidesContainer.appendChild(m.instance.create()), m.slideNode = t.slidesContainer.querySelectorAll(".gslide")[x];
|
|
2837
|
-
}),
|
|
2880
|
+
}), Rt && T(document.body, "glightbox-touch"), this.events.resize = D("resize", { onElement: window, withCallback: function() {
|
|
2838
2881
|
t.resize();
|
|
2839
2882
|
} }), this.built = !0;
|
|
2840
2883
|
} }, { key: "resize", value: function() {
|
|
@@ -2856,9 +2899,9 @@ var sa = { exports: {} };
|
|
|
2856
2899
|
var I = o.clientWidth, U = o.clientHeight, fe = I / U;
|
|
2857
2900
|
E = "".concat(I / fe, ":").concat(U / fe);
|
|
2858
2901
|
}
|
|
2859
|
-
var de = E.split(":"), G = this.settings.videosWidth,
|
|
2860
|
-
if (ue = Math.floor(ue), u && (b -= l.offsetHeight),
|
|
2861
|
-
var
|
|
2902
|
+
var de = E.split(":"), G = this.settings.videosWidth, $e = this.settings.videosWidth, ue = ($e = et(G) || G.indexOf("px") !== -1 ? parseInt(G) : G.indexOf("vw") !== -1 ? h * parseInt(G) / 100 : G.indexOf("vh") !== -1 ? b * parseInt(G) / 100 : G.indexOf("%") !== -1 ? h * parseInt(G) / 100 : parseInt(o.clientWidth)) / (parseInt(de[0]) / parseInt(de[1]));
|
|
2903
|
+
if (ue = Math.floor(ue), u && (b -= l.offsetHeight), $e > h || ue > b || b < ue && h > $e) {
|
|
2904
|
+
var Ve = o.offsetWidth, Fe = o.offsetHeight, De = b / Fe, pe = { width: Ve * De, height: Fe * De };
|
|
2862
2905
|
o.parentNode.setAttribute("style", "max-width: ".concat(pe.width, "px")), u && l.setAttribute("style", "max-width: ".concat(pe.width, "px;"));
|
|
2863
2906
|
} else o.parentNode.style.maxWidth = "".concat(G), u && l.setAttribute("style", "max-width: ".concat(G, ";"));
|
|
2864
2907
|
}
|
|
@@ -2890,7 +2933,7 @@ var sa = { exports: {} };
|
|
|
2890
2933
|
t.events = null;
|
|
2891
2934
|
}
|
|
2892
2935
|
var d = document.body;
|
|
2893
|
-
N(
|
|
2936
|
+
N(Vt, "glightbox-open"), N(d, "glightbox-open touching gdesc-open glightbox-touch glightbox-mobile gscrollbar-fixer"), t.modal.parentNode.removeChild(t.modal), t.trigger("close"), P(t.settings.onClose) && t.settings.onClose();
|
|
2894
2937
|
var l = document.querySelector(".gcss-styles");
|
|
2895
2938
|
l && l.parentNode.removeChild(l), t.lightboxOpen = !1, t.closing = null;
|
|
2896
2939
|
});
|
|
@@ -2928,12 +2971,12 @@ var Cc = Object.defineProperty, Sc = Object.getOwnPropertyDescriptor, _c = (c, e
|
|
|
2928
2971
|
(f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
|
|
2929
2972
|
return n && s && Cc(e, a, s), s;
|
|
2930
2973
|
};
|
|
2931
|
-
let
|
|
2974
|
+
let _t = class extends ut {
|
|
2932
2975
|
render() {
|
|
2933
2976
|
return g` <div class="cb-thinking"><span></span><span></span><span></span></div>`;
|
|
2934
2977
|
}
|
|
2935
2978
|
};
|
|
2936
|
-
|
|
2979
|
+
_t.styles = X`
|
|
2937
2980
|
.cb-thinking {
|
|
2938
2981
|
text-align: center;
|
|
2939
2982
|
}
|
|
@@ -2971,9 +3014,9 @@ St.styles = X`
|
|
|
2971
3014
|
}
|
|
2972
3015
|
}
|
|
2973
3016
|
`;
|
|
2974
|
-
|
|
3017
|
+
_t = _c([
|
|
2975
3018
|
J("cb-thinking")
|
|
2976
|
-
],
|
|
3019
|
+
], _t);
|
|
2977
3020
|
var $c = Object.defineProperty, Mc = Object.getOwnPropertyDescriptor, oa = (c, e, a, n) => {
|
|
2978
3021
|
for (var s = n > 1 ? void 0 : n ? Mc(e, a) : e, r = c.length - 1, f; r >= 0; r--)
|
|
2979
3022
|
(f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
|
|
@@ -3040,7 +3083,7 @@ const Tc = X`
|
|
|
3040
3083
|
margin-right: 0.2em;
|
|
3041
3084
|
}
|
|
3042
3085
|
`;
|
|
3043
|
-
var Ec = Object.defineProperty, Ac = Object.getOwnPropertyDescriptor,
|
|
3086
|
+
var Ec = Object.defineProperty, Ac = Object.getOwnPropertyDescriptor, It = (c, e, a, n) => {
|
|
3044
3087
|
for (var s = n > 1 ? void 0 : n ? Ac(e, a) : e, r = c.length - 1, f; r >= 0; r--)
|
|
3045
3088
|
(f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
|
|
3046
3089
|
return n && s && Ec(e, a, s), s;
|
|
@@ -3090,22 +3133,22 @@ Ze.styles = X`
|
|
|
3090
3133
|
text-decoration: underline;
|
|
3091
3134
|
}
|
|
3092
3135
|
`;
|
|
3093
|
-
|
|
3136
|
+
It([
|
|
3094
3137
|
v({ type: String })
|
|
3095
3138
|
], Ze.prototype, "url", 2);
|
|
3096
|
-
|
|
3139
|
+
It([
|
|
3097
3140
|
v({ type: Boolean })
|
|
3098
3141
|
], Ze.prototype, "inverse", 2);
|
|
3099
|
-
Ze =
|
|
3142
|
+
Ze = It([
|
|
3100
3143
|
J("cb-external-link")
|
|
3101
3144
|
], Ze);
|
|
3102
3145
|
const Ic = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2h-2v-1h2a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zM1.928 15.849v-3.337h1.136v-.662H0v.662h1.134v3.337zm4.689-3.999h-.894L4.9 13.289h-.035l-.832-1.439h-.932l1.228 1.983l-1.24 2.016h.862l.853-1.415h.035l.85 1.415h.907l-1.253-1.992zm1.93.662v3.337h-.794v-3.337H6.619v-.662h3.064v.662H8.546Z"/></svg>', Lc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2h-1v-1h1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zM1.6 11.85H0v3.999h.791v-1.342h.803q.43 0 .732-.173q.305-.175.463-.474a1.4 1.4 0 0 0 .161-.677q0-.375-.158-.677a1.2 1.2 0 0 0-.46-.477q-.3-.18-.732-.179m.545 1.333a.8.8 0 0 1-.085.38a.57.57 0 0 1-.238.241a.8.8 0 0 1-.375.082H.788V12.48h.66q.327 0 .512.181q.185.183.185.522m1.217-1.333v3.999h1.46q.602 0 .998-.237a1.45 1.45 0 0 0 .595-.689q.196-.45.196-1.084q0-.63-.196-1.075a1.43 1.43 0 0 0-.589-.68q-.396-.234-1.005-.234zm.791.645h.563q.371 0 .609.152a.9.9 0 0 1 .354.454q.118.302.118.753a2.3 2.3 0 0 1-.068.592a1.1 1.1 0 0 1-.196.422a.8.8 0 0 1-.334.252a1.3 1.3 0 0 1-.483.082h-.563zm3.743 1.763v1.591h-.79V11.85h2.548v.653H7.896v1.117h1.606v.638z"/></svg>', qc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2H9v-1h3a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zM.706 13.189v2.66H0V11.85h.806l1.14 2.596h.026l1.14-2.596h.8v3.999h-.716v-2.66h-.038l-.946 2.159h-.516l-.952-2.16H.706Zm3.919 2.66V11.85h1.459q.609 0 1.005.234t.589.68q.195.445.196 1.075q0 .634-.196 1.084q-.197.451-.595.689q-.396.237-1 .237H4.626Zm1.353-3.354h-.562v2.707h.562q.279 0 .484-.082a.8.8 0 0 0 .334-.252a1.1 1.1 0 0 0 .196-.422q.067-.252.067-.592a2.1 2.1 0 0 0-.117-.753a.9.9 0 0 0-.354-.454q-.238-.152-.61-.152"/></svg>', Oc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2h-1v-1h1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zM3.517 14.841a1.13 1.13 0 0 0 .401.823q.195.162.478.252q.284.091.665.091q.507 0 .859-.158q.354-.158.539-.44q.187-.284.187-.656q0-.336-.134-.56a1 1 0 0 0-.375-.357a2 2 0 0 0-.566-.21l-.621-.144a1 1 0 0 1-.404-.176a.37.37 0 0 1-.144-.299q0-.234.185-.384q.188-.152.512-.152q.214 0 .37.068a.6.6 0 0 1 .246.181a.56.56 0 0 1 .12.258h.75a1.1 1.1 0 0 0-.2-.566a1.2 1.2 0 0 0-.5-.41a1.8 1.8 0 0 0-.78-.152q-.439 0-.776.15q-.337.149-.527.421q-.19.273-.19.639q0 .302.122.524q.124.223.352.367q.228.143.539.213l.618.144q.31.073.463.193a.39.39 0 0 1 .152.326a.5.5 0 0 1-.085.29a.56.56 0 0 1-.255.193q-.167.07-.413.07q-.175 0-.32-.04a.8.8 0 0 1-.248-.115a.58.58 0 0 1-.255-.384zM.806 13.693q0-.373.102-.633a.87.87 0 0 1 .302-.399a.8.8 0 0 1 .475-.137q.225 0 .398.097a.7.7 0 0 1 .272.26a.85.85 0 0 1 .12.381h.765v-.072a1.33 1.33 0 0 0-.466-.964a1.4 1.4 0 0 0-.489-.272a1.8 1.8 0 0 0-.606-.097q-.534 0-.911.223q-.375.222-.572.632q-.195.41-.196.979v.498q0 .568.193.976q.197.407.572.626q.375.217.914.217q.439 0 .785-.164t.55-.454a1.27 1.27 0 0 0 .226-.674v-.076h-.764a.8.8 0 0 1-.118.363a.7.7 0 0 1-.272.25a.9.9 0 0 1-.401.087a.85.85 0 0 1-.478-.132a.83.83 0 0 1-.299-.392a1.7 1.7 0 0 1-.102-.627zm8.239 2.238h-.953l-1.338-3.999h.917l.896 3.138h.038l.888-3.138h.879z"/></svg>', Pc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2h-1v-1h1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zM1.6 11.85H0v3.999h.791v-1.342h.803q.43 0 .732-.173q.305-.175.463-.474a1.4 1.4 0 0 0 .161-.677q0-.375-.158-.677a1.2 1.2 0 0 0-.46-.477q-.3-.18-.732-.179m.545 1.333a.8.8 0 0 1-.085.38a.57.57 0 0 1-.238.241a.8.8 0 0 1-.375.082H.788V12.48h.66q.327 0 .512.181q.185.183.185.522m2.817-1.333h-1.6v3.999h.791v-1.342h.803q.43 0 .732-.173q.305-.175.463-.474q.162-.302.161-.677q0-.375-.158-.677a1.2 1.2 0 0 0-.46-.477q-.3-.18-.732-.179m.545 1.333a.8.8 0 0 1-.085.38a.57.57 0 0 1-.238.241a.8.8 0 0 1-.375.082H4.15V12.48h.66q.327 0 .512.181q.185.183.185.522m2.767-.67v3.336H7.48v-3.337H6.346v-.662h3.065v.662z"/></svg>', zc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2v-1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zm-7.839 9.166v.522q0 .384-.117.641a.86.86 0 0 1-.322.387a.9.9 0 0 1-.469.126a.9.9 0 0 1-.471-.126a.87.87 0 0 1-.32-.386a1.55 1.55 0 0 1-.117-.642v-.522q0-.386.117-.641a.87.87 0 0 1 .32-.387a.87.87 0 0 1 .471-.129q.264 0 .469.13a.86.86 0 0 1 .322.386q.117.255.117.641m.803.519v-.513q0-.565-.205-.972a1.46 1.46 0 0 0-.589-.63q-.381-.22-.917-.22q-.533 0-.92.22a1.44 1.44 0 0 0-.589.627q-.204.406-.205.975v.513q0 .563.205.973q.205.406.59.627q.386.216.92.216q.535 0 .916-.216q.383-.22.59-.627q.204-.41.204-.973M0 11.926v4h1.459q.603 0 .999-.238a1.45 1.45 0 0 0 .595-.689q.196-.45.196-1.084q0-.63-.196-1.075a1.43 1.43 0 0 0-.59-.68q-.395-.234-1.004-.234zm.791.645h.563q.371 0 .609.152a.9.9 0 0 1 .354.454q.118.302.118.753a2.3 2.3 0 0 1-.068.592a1.1 1.1 0 0 1-.196.422a.8.8 0 0 1-.334.252a1.3 1.3 0 0 1-.483.082H.79V12.57Zm7.422.483a1.7 1.7 0 0 0-.103.633v.495q0 .369.103.627a.83.83 0 0 0 .298.393a.85.85 0 0 0 .478.131a.9.9 0 0 0 .401-.088a.7.7 0 0 0 .273-.248a.8.8 0 0 0 .117-.364h.765v.076a1.27 1.27 0 0 1-.226.674q-.205.29-.55.454a1.8 1.8 0 0 1-.786.164q-.54 0-.914-.216a1.4 1.4 0 0 1-.571-.627q-.194-.408-.194-.976v-.498q0-.568.197-.978q.195-.411.571-.633q.378-.223.911-.223q.328 0 .607.097q.28.093.489.272a1.33 1.33 0 0 1 .466.964v.073H9.78a.85.85 0 0 0-.12-.38a.7.7 0 0 0-.273-.261a.8.8 0 0 0-.398-.097a.8.8 0 0 0-.475.138a.87.87 0 0 0-.301.398"/></svg>', jc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" fill-rule="evenodd" d="M14 4.5V11h-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zm-6.839 9.688v-.522a1.5 1.5 0 0 0-.117-.641a.86.86 0 0 0-.322-.387a.86.86 0 0 0-.469-.129a.87.87 0 0 0-.471.13a.87.87 0 0 0-.32.386a1.5 1.5 0 0 0-.117.641v.522q0 .384.117.641a.87.87 0 0 0 .32.387a.9.9 0 0 0 .471.126a.9.9 0 0 0 .469-.126a.86.86 0 0 0 .322-.386a1.55 1.55 0 0 0 .117-.642m.803-.516v.513q0 .563-.205.973a1.47 1.47 0 0 1-.589.627q-.381.216-.917.216a1.86 1.86 0 0 1-.92-.216a1.46 1.46 0 0 1-.589-.627a2.15 2.15 0 0 1-.205-.973v-.513q0-.569.205-.975q.205-.411.59-.627q.386-.22.92-.22q.535 0 .916.22q.383.219.59.63q.204.406.204.972M1 15.925v-3.999h1.459q.609 0 1.005.235q.396.233.589.68q.196.445.196 1.074q0 .634-.196 1.084q-.197.451-.595.689q-.396.237-.999.237zm1.354-3.354H1.79v2.707h.563q.277 0 .483-.082a.8.8 0 0 0 .334-.252q.132-.17.196-.422a2.3 2.3 0 0 0 .068-.592q0-.45-.118-.753a.9.9 0 0 0-.354-.454q-.237-.152-.61-.152Zm6.756 1.116q0-.373.103-.633a.87.87 0 0 1 .301-.398a.8.8 0 0 1 .475-.138q.225 0 .398.097a.7.7 0 0 1 .273.26a.85.85 0 0 1 .12.381h.765v-.073a1.33 1.33 0 0 0-.466-.964a1.4 1.4 0 0 0-.49-.272a1.8 1.8 0 0 0-.606-.097q-.534 0-.911.223q-.375.222-.571.633q-.197.41-.197.978v.498q0 .568.194.976q.195.406.571.627q.375.216.914.216q.44 0 .785-.164t.551-.454a1.27 1.27 0 0 0 .226-.674v-.076h-.765a.8.8 0 0 1-.117.364a.7.7 0 0 1-.273.248a.9.9 0 0 1-.401.088a.85.85 0 0 1-.478-.131a.83.83 0 0 1-.298-.393a1.7 1.7 0 0 1-.103-.627zm5.092-1.76h.894l-1.275 2.006l1.254 1.992h-.908l-.85-1.415h-.035l-.852 1.415h-.862l1.24-2.015l-1.228-1.984h.932l.832 1.439h.035z"/></svg>';
|
|
3103
|
-
var Hc = Object.defineProperty, Bc = Object.getOwnPropertyDescriptor,
|
|
3146
|
+
var Hc = Object.defineProperty, Bc = Object.getOwnPropertyDescriptor, Lt = (c, e, a, n) => {
|
|
3104
3147
|
for (var s = n > 1 ? void 0 : n ? Bc(e, a) : e, r = c.length - 1, f; r >= 0; r--)
|
|
3105
3148
|
(f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
|
|
3106
3149
|
return n && s && Hc(e, a, s), s;
|
|
3107
3150
|
};
|
|
3108
|
-
const
|
|
3151
|
+
const Ut = {
|
|
3109
3152
|
pdf: Lc,
|
|
3110
3153
|
txt: Ic,
|
|
3111
3154
|
md: qc,
|
|
@@ -3139,22 +3182,22 @@ let Je = class extends te {
|
|
|
3139
3182
|
return g`
|
|
3140
3183
|
<cb-icon
|
|
3141
3184
|
class="cb-file-icon"
|
|
3142
|
-
svg="${
|
|
3185
|
+
svg="${Ut[this.type] || Ut.txt}"
|
|
3143
3186
|
></cb-icon>
|
|
3144
3187
|
`;
|
|
3145
3188
|
}
|
|
3146
3189
|
};
|
|
3147
3190
|
Je.styles = Tc;
|
|
3148
|
-
|
|
3191
|
+
Lt([
|
|
3149
3192
|
v({ type: String })
|
|
3150
3193
|
], Je.prototype, "filename", 2);
|
|
3151
|
-
|
|
3194
|
+
Lt([
|
|
3152
3195
|
v({ type: String })
|
|
3153
3196
|
], Je.prototype, "url", 2);
|
|
3154
|
-
Je =
|
|
3197
|
+
Je = Lt([
|
|
3155
3198
|
J("cb-file")
|
|
3156
3199
|
], Je);
|
|
3157
|
-
const Rc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0z"/><path d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1zM4.118 4L4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4zM2.5 3h11V2h-11z"/></g></svg>',
|
|
3200
|
+
const Rc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0z"/><path d="M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1zM4.118 4L4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4zM2.5 3h11V2h-11z"/></g></svg>', Wt = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M8 8a3 3 0 1 0 0-6a3 3 0 0 0 0 6m2-3a2 2 0 1 1-4 0a2 2 0 0 1 4 0m4 8c0 1-1 1-1 1H3s-1 0-1-1s1-4 6-4s6 3 6 4m-1-.004c-.001-.246-.154-.986-.832-1.664C11.516 10.68 10.289 10 8 10s-3.516.68-4.168 1.332c-.678.678-.83 1.418-.832 1.664z"/></svg>', ra = '<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M5 9v12H1V9zm4 12a2 2 0 0 1-2-2V9c0-.55.22-1.05.59-1.41L14.17 1l1.06 1.06c.27.27.44.64.44 1.05l-.03.32L14.69 8H21a2 2 0 0 1 2 2v2c0 .26-.05.5-.14.73l-3.02 7.05C19.54 20.5 18.83 21 18 21zm0-2h9.03L21 12v-2h-8.79l1.13-5.32L9 9.03z"/></svg>', da = '<svg viewBox="0 0 24 24" width="1.2em" height="1.2em" ><path fill="currentColor" d="M19 15V3h4v12zM15 3a2 2 0 0 1 2 2v10c0 .55-.22 1.05-.59 1.41L9.83 23l-1.06-1.06c-.27-.27-.44-.64-.44-1.06l.03-.31l.95-4.57H3a2 2 0 0 1-2-2v-2c0-.26.05-.5.14-.73l3.02-7.05C4.46 3.5 5.17 3 6 3zm0 2H5.97L3 12v2h8.78l-1.13 5.32L15 14.97z"/></svg>', Vc = X`
|
|
3158
3201
|
pre code.hljs {
|
|
3159
3202
|
display: block;
|
|
3160
3203
|
overflow-x: auto;
|
|
@@ -4369,7 +4412,7 @@ const Rc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="curr
|
|
|
4369
4412
|
white-space: pre-wrap;
|
|
4370
4413
|
color: var(--n-text-color);
|
|
4371
4414
|
}
|
|
4372
|
-
`,
|
|
4415
|
+
`, Fc = X`
|
|
4373
4416
|
${me}
|
|
4374
4417
|
${Vc}
|
|
4375
4418
|
|
|
@@ -4602,10 +4645,10 @@ const Rc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="curr
|
|
|
4602
4645
|
filter: alpha(opacity=80);
|
|
4603
4646
|
}
|
|
4604
4647
|
`;
|
|
4605
|
-
function
|
|
4648
|
+
function Yt(c, e) {
|
|
4606
4649
|
return `<pre class="code-block-wrapper"><div class="code-block-header"><span class="code-block-header__lang">${e}</span><span class="code-block-header__copy">Copy</span></div><code class="hljs code-block-body ${e}">${c}</code></pre>`;
|
|
4607
4650
|
}
|
|
4608
|
-
function
|
|
4651
|
+
function Dc() {
|
|
4609
4652
|
const c = new Ra({
|
|
4610
4653
|
html: !0,
|
|
4611
4654
|
breaks: !0,
|
|
@@ -4613,23 +4656,23 @@ function Fc() {
|
|
|
4613
4656
|
highlight(e, a) {
|
|
4614
4657
|
if (!!(a && vt.getLanguage(a))) {
|
|
4615
4658
|
const s = a ?? "";
|
|
4616
|
-
return
|
|
4659
|
+
return Yt(vt.highlight(e, { language: s }).value, s);
|
|
4617
4660
|
}
|
|
4618
|
-
return
|
|
4661
|
+
return Yt(vt.highlightAuto(e).value, "");
|
|
4619
4662
|
}
|
|
4620
4663
|
});
|
|
4621
4664
|
return c.use(Va, { attrs: { target: "_blank", rel: "noopener" } }), c;
|
|
4622
4665
|
}
|
|
4623
|
-
async function
|
|
4624
|
-
const a =
|
|
4666
|
+
async function $t(c) {
|
|
4667
|
+
const a = Dc().render(c);
|
|
4625
4668
|
return g`${W(a)}`;
|
|
4626
4669
|
}
|
|
4627
|
-
var Nc = Object.defineProperty, Uc = Object.getOwnPropertyDescriptor,
|
|
4670
|
+
var Nc = Object.defineProperty, Uc = Object.getOwnPropertyDescriptor, Be = (c, e, a, n) => {
|
|
4628
4671
|
for (var s = n > 1 ? void 0 : n ? Uc(e, a) : e, r = c.length - 1, f; r >= 0; r--)
|
|
4629
4672
|
(f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
|
|
4630
4673
|
return n && s && Nc(e, a, s), s;
|
|
4631
4674
|
};
|
|
4632
|
-
let
|
|
4675
|
+
let ke = class extends te {
|
|
4633
4676
|
constructor() {
|
|
4634
4677
|
super(...arguments), this.store = new pt(this, p), this.type = "assistant", this.suppressFeedback = !1, this.lightbox = kc({
|
|
4635
4678
|
touchNavigation: !0,
|
|
@@ -4750,7 +4793,7 @@ let Te = class extends te {
|
|
|
4750
4793
|
`;
|
|
4751
4794
|
}
|
|
4752
4795
|
async _getMessageText(c) {
|
|
4753
|
-
return
|
|
4796
|
+
return $t(c.data.text);
|
|
4754
4797
|
}
|
|
4755
4798
|
renderMessageContent(c) {
|
|
4756
4799
|
var e;
|
|
@@ -4760,7 +4803,7 @@ let Te = class extends te {
|
|
|
4760
4803
|
() => g`<div class="assistant-message-user-name">${c.data.userName}</div>`,
|
|
4761
4804
|
() => null
|
|
4762
4805
|
)}
|
|
4763
|
-
${
|
|
4806
|
+
${kt(
|
|
4764
4807
|
this._getMessageText(c).then((a) => g`${a}`)
|
|
4765
4808
|
)}
|
|
4766
4809
|
</div>` : c.type === "file" ? g`${ze(
|
|
@@ -4772,8 +4815,8 @@ let Te = class extends te {
|
|
|
4772
4815
|
(a) => a.name,
|
|
4773
4816
|
(a) => g`<div>${a.name}</div>`
|
|
4774
4817
|
)}` : g`<div class="cb-message-text">
|
|
4775
|
-
${
|
|
4776
|
-
|
|
4818
|
+
${kt(
|
|
4819
|
+
$t(((e = c.data.text) == null ? void 0 : e.toString()) || "").then((a) => g`${a}`)
|
|
4777
4820
|
)}
|
|
4778
4821
|
</div>`;
|
|
4779
4822
|
}
|
|
@@ -4805,7 +4848,7 @@ let Te = class extends te {
|
|
|
4805
4848
|
`;
|
|
4806
4849
|
}
|
|
4807
4850
|
renderBotMessageFeedback(c) {
|
|
4808
|
-
return this.suppressFeedback || !p.setting.feedbackEnabled ? null : g`
|
|
4851
|
+
return this.suppressFeedback || !p.setting.feedbackEnabled || this.index < p.setting.startFeedbackFromMessage * 2 ? null : g`
|
|
4809
4852
|
<div class="cb-message-feedback-tools">
|
|
4810
4853
|
<div class="cb-message-feedback-icon cb-feedback-up" @click="${() => this.startFeedback(!0, c)}">${le`${W(ra)}`}</div>
|
|
4811
4854
|
<div class="cb-message-feedback-icon cb-feedback-down" @click="${() => this.startFeedback(!1, c)}">${le`${W(da)}`}</div>
|
|
@@ -4819,7 +4862,7 @@ let Te = class extends te {
|
|
|
4819
4862
|
return g`
|
|
4820
4863
|
<div class="cb-message" part="cb-message" style="display: flex; justify-content: end;align-items: start;">
|
|
4821
4864
|
<!--<sl-avatar class="avatar user-avatar small" label="User">
|
|
4822
|
-
<cb-icon slot="icon" svg="${
|
|
4865
|
+
<cb-icon slot="icon" svg="${Wt}" color="white"></cb-icon>
|
|
4823
4866
|
//appState.appearanceUserMessageAvatarPosition
|
|
4824
4867
|
</sl-avatar>-->
|
|
4825
4868
|
${ie(
|
|
@@ -4842,7 +4885,7 @@ let Te = class extends te {
|
|
|
4842
4885
|
return g`
|
|
4843
4886
|
<div class="cb-message" part="cb-message" style="display: flex; justify-content: end;align-items: start;">
|
|
4844
4887
|
<!--<sl-avatar class="avatar user-avatar small" label="User">
|
|
4845
|
-
<cb-icon slot="icon" svg="${
|
|
4888
|
+
<cb-icon slot="icon" svg="${Wt}" color="white"></cb-icon>
|
|
4846
4889
|
//appState.appearanceUserMessageAvatarPosition
|
|
4847
4890
|
</sl-avatar>-->
|
|
4848
4891
|
${ie(
|
|
@@ -4860,25 +4903,28 @@ let Te = class extends te {
|
|
|
4860
4903
|
`;
|
|
4861
4904
|
}
|
|
4862
4905
|
};
|
|
4863
|
-
|
|
4864
|
-
|
|
4906
|
+
ke.styles = Fc;
|
|
4907
|
+
Be([
|
|
4865
4908
|
v({ type: Object })
|
|
4866
|
-
],
|
|
4867
|
-
|
|
4909
|
+
], ke.prototype, "message", 2);
|
|
4910
|
+
Be([
|
|
4911
|
+
v({ type: Number })
|
|
4912
|
+
], ke.prototype, "index", 2);
|
|
4913
|
+
Be([
|
|
4868
4914
|
v({ type: String })
|
|
4869
|
-
],
|
|
4870
|
-
|
|
4915
|
+
], ke.prototype, "type", 2);
|
|
4916
|
+
Be([
|
|
4871
4917
|
v({ type: Boolean })
|
|
4872
|
-
],
|
|
4873
|
-
|
|
4918
|
+
], ke.prototype, "suppressFeedback", 2);
|
|
4919
|
+
Be([
|
|
4874
4920
|
Qt(".code-block-header__copy")
|
|
4875
|
-
],
|
|
4876
|
-
|
|
4921
|
+
], ke.prototype, "copyBtns", 2);
|
|
4922
|
+
Be([
|
|
4877
4923
|
Qt("img")
|
|
4878
|
-
],
|
|
4879
|
-
|
|
4924
|
+
], ke.prototype, "glightboxImages", 2);
|
|
4925
|
+
ke = Be([
|
|
4880
4926
|
J("cb-message")
|
|
4881
|
-
],
|
|
4927
|
+
], ke);
|
|
4882
4928
|
var Wc = Object.defineProperty, Yc = Object.getOwnPropertyDescriptor, ye = (c, e, a, n) => {
|
|
4883
4929
|
for (var s = n > 1 ? void 0 : n ? Yc(e, a) : e, r = c.length - 1, f; r >= 0; r--)
|
|
4884
4930
|
(f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
|
|
@@ -4900,16 +4946,28 @@ let be = class extends te {
|
|
|
4900
4946
|
render() {
|
|
4901
4947
|
return g`
|
|
4902
4948
|
<div class="cb-message-list" part="bot-message-list">
|
|
4949
|
+
${this.renderDisclaimerMessage()}
|
|
4903
4950
|
${ze(
|
|
4904
4951
|
this.messages,
|
|
4905
4952
|
(c) => c.id + JSON.stringify(c.data),
|
|
4906
|
-
(c) => g`<cb-message .message="${c}" exportparts="bot-message, cb-message, bot-message-content, user-message-content" ?suppressFeedback=${this.suppressFeedback}></cb-message>`
|
|
4953
|
+
(c, e) => g`<cb-message .message="${c}" .index="${e}" exportparts="bot-message, cb-message, bot-message-content, user-message-content" ?suppressFeedback=${this.suppressFeedback}></cb-message>`
|
|
4907
4954
|
)}
|
|
4908
4955
|
${this.renderActions()} ${this.renderForm()}
|
|
4909
4956
|
<div id="cb-message-list-bottom-anchor"></div>
|
|
4910
4957
|
</div>
|
|
4911
4958
|
`;
|
|
4912
4959
|
}
|
|
4960
|
+
renderDisclaimerMessage() {
|
|
4961
|
+
return !p.setting.disclaimerMessage || !p.isConversationStart() ? null : g`
|
|
4962
|
+
<details class="cb-disclaimer-wrapper" part="disclaimer-wrapper">
|
|
4963
|
+
<summary class="cb-disclaimer-message" part="disclaimer-message">
|
|
4964
|
+
${kt(
|
|
4965
|
+
$t(p.setting.disclaimerMessage).then((c) => g`${c}`)
|
|
4966
|
+
)}
|
|
4967
|
+
</summary>
|
|
4968
|
+
</details>
|
|
4969
|
+
`;
|
|
4970
|
+
}
|
|
4913
4971
|
renderForm() {
|
|
4914
4972
|
return this.form ? g` <form class="cb-input-form" part="form" @submit="${this.handleFormSubmit.bind(this)}">
|
|
4915
4973
|
<div class="cb-input-form-title" part="form-title">${this.form.title}</div>
|
|
@@ -5178,19 +5236,19 @@ ye([
|
|
|
5178
5236
|
v({ type: Boolean })
|
|
5179
5237
|
], be.prototype, "suppressFeedback", 2);
|
|
5180
5238
|
ye([
|
|
5181
|
-
|
|
5239
|
+
Ce("#cb-message-list-bottom-anchor")
|
|
5182
5240
|
], be.prototype, "_messageListBottomAnchor", 2);
|
|
5183
5241
|
ye([
|
|
5184
|
-
|
|
5242
|
+
Ce(".cb-input-form")
|
|
5185
5243
|
], be.prototype, "_inputForm", 2);
|
|
5186
5244
|
ye([
|
|
5187
|
-
|
|
5245
|
+
Et({ capture: !1, passive: !0 })
|
|
5188
5246
|
], be.prototype, "invokeLinkAction", 1);
|
|
5189
5247
|
ye([
|
|
5190
|
-
|
|
5248
|
+
Et({ capture: !1, passive: !0 })
|
|
5191
5249
|
], be.prototype, "invokeCalendlyAction", 1);
|
|
5192
5250
|
ye([
|
|
5193
|
-
|
|
5251
|
+
Et({ capture: !1, passive: !0 })
|
|
5194
5252
|
], be.prototype, "invokeHubspotMeetingAction", 1);
|
|
5195
5253
|
be = ye([
|
|
5196
5254
|
J("cb-message-list")
|
|
@@ -5238,7 +5296,7 @@ const Xc = X`
|
|
|
5238
5296
|
margin: 6px 2px;
|
|
5239
5297
|
}
|
|
5240
5298
|
`, Gc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576zm6.787-8.201L1.591 6.602l4.339 2.76z"/></svg>', Zc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M4.5 3a2.5 2.5 0 0 1 5 0v9a1.5 1.5 0 0 1-3 0V5a.5.5 0 0 1 1 0v7a.5.5 0 0 0 1 0V3a1.5 1.5 0 1 0-3 0v9a2.5 2.5 0 0 0 5 0V5a.5.5 0 0 1 1 0v7a3.5 3.5 0 1 1-7 0z"/></svg>';
|
|
5241
|
-
var Jc = Object.defineProperty, Kc = Object.getOwnPropertyDescriptor,
|
|
5299
|
+
var Jc = Object.defineProperty, Kc = Object.getOwnPropertyDescriptor, Se = (c, e, a, n) => {
|
|
5242
5300
|
for (var s = n > 1 ? void 0 : n ? Kc(e, a) : e, r = c.length - 1, f; r >= 0; r--)
|
|
5243
5301
|
(f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
|
|
5244
5302
|
return n && s && Jc(e, a, s), s;
|
|
@@ -5334,31 +5392,31 @@ let he = class extends te {
|
|
|
5334
5392
|
}
|
|
5335
5393
|
};
|
|
5336
5394
|
he.styles = Xc;
|
|
5337
|
-
|
|
5395
|
+
Se([
|
|
5338
5396
|
v({ type: String, attribute: "placeholder" })
|
|
5339
5397
|
], he.prototype, "placeholder", 2);
|
|
5340
|
-
|
|
5398
|
+
Se([
|
|
5341
5399
|
v({ type: String, attribute: "send-button-label" })
|
|
5342
5400
|
], he.prototype, "sendButtonLabel", 2);
|
|
5343
|
-
|
|
5401
|
+
Se([
|
|
5344
5402
|
v({ type: Boolean, attribute: "enable-file-upload" })
|
|
5345
5403
|
], he.prototype, "enableFileUpload", 2);
|
|
5346
|
-
|
|
5404
|
+
Se([
|
|
5347
5405
|
v({ type: String })
|
|
5348
5406
|
], he.prototype, "value", 2);
|
|
5349
|
-
|
|
5407
|
+
Se([
|
|
5350
5408
|
v({ type: Boolean })
|
|
5351
5409
|
], he.prototype, "loading", 2);
|
|
5352
|
-
|
|
5410
|
+
Se([
|
|
5353
5411
|
v({ type: Boolean })
|
|
5354
5412
|
], he.prototype, "disabled", 2);
|
|
5355
|
-
|
|
5413
|
+
Se([
|
|
5356
5414
|
v({ type: String })
|
|
5357
5415
|
], he.prototype, "currentKey", 2);
|
|
5358
|
-
|
|
5359
|
-
|
|
5416
|
+
Se([
|
|
5417
|
+
Ce("sl-textarea")
|
|
5360
5418
|
], he.prototype, "inputElement", 2);
|
|
5361
|
-
he =
|
|
5419
|
+
he = Se([
|
|
5362
5420
|
J("cb-user-input")
|
|
5363
5421
|
], he);
|
|
5364
5422
|
const fa = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><path fill="currentColor" d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8z"/></svg>', Qc = X`
|
|
@@ -5401,7 +5459,7 @@ var ei = Object.defineProperty, ti = Object.getOwnPropertyDescriptor, gt = (c, e
|
|
|
5401
5459
|
(f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
|
|
5402
5460
|
return n && s && ei(e, a, s), s;
|
|
5403
5461
|
};
|
|
5404
|
-
let
|
|
5462
|
+
let Ne = class extends te {
|
|
5405
5463
|
constructor() {
|
|
5406
5464
|
super(...arguments), this.open = !1, this.label = "Dialog", this.zindex = 100;
|
|
5407
5465
|
}
|
|
@@ -5445,19 +5503,19 @@ let Fe = class extends te {
|
|
|
5445
5503
|
</sl-dialog>`;
|
|
5446
5504
|
}
|
|
5447
5505
|
};
|
|
5448
|
-
|
|
5506
|
+
Ne.styles = Qc;
|
|
5449
5507
|
gt([
|
|
5450
5508
|
v({ type: Boolean })
|
|
5451
|
-
],
|
|
5509
|
+
], Ne.prototype, "open", 2);
|
|
5452
5510
|
gt([
|
|
5453
5511
|
v({ type: String, attribute: "label" })
|
|
5454
|
-
],
|
|
5512
|
+
], Ne.prototype, "label", 2);
|
|
5455
5513
|
gt([
|
|
5456
5514
|
v({ type: Number })
|
|
5457
|
-
],
|
|
5458
|
-
|
|
5515
|
+
], Ne.prototype, "zindex", 2);
|
|
5516
|
+
Ne = gt([
|
|
5459
5517
|
J("cb-dialog")
|
|
5460
|
-
],
|
|
5518
|
+
], Ne);
|
|
5461
5519
|
var ai = Object.defineProperty, ci = Object.getOwnPropertyDescriptor, la = (c, e, a, n) => {
|
|
5462
5520
|
for (var s = n > 1 ? void 0 : n ? ci(e, a) : e, r = c.length - 1, f; r >= 0; r--)
|
|
5463
5521
|
(f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
|
|
@@ -5707,7 +5765,7 @@ Ue([
|
|
|
5707
5765
|
v({ type: Boolean })
|
|
5708
5766
|
], Ee.prototype, "clearMessageDialogOpen", 2);
|
|
5709
5767
|
Ue([
|
|
5710
|
-
|
|
5768
|
+
Ce("sl-dialog")
|
|
5711
5769
|
], Ee.prototype, "dialog", 2);
|
|
5712
5770
|
Ue([
|
|
5713
5771
|
v({ type: Boolean })
|
|
@@ -5954,7 +6012,7 @@ var gi = Object.defineProperty, mi = Object.getOwnPropertyDescriptor, yi = (c, e
|
|
|
5954
6012
|
(f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
|
|
5955
6013
|
return n && s && gi(e, a, s), s;
|
|
5956
6014
|
};
|
|
5957
|
-
let
|
|
6015
|
+
let Mt = class extends te {
|
|
5958
6016
|
render() {
|
|
5959
6017
|
return g` <sl-alert variant="danger" open>
|
|
5960
6018
|
<cb-status-icon status="error" slot="icon"></cb-status-icon>
|
|
@@ -5970,10 +6028,10 @@ let _t = class extends te {
|
|
|
5970
6028
|
this.emit("setting:show");
|
|
5971
6029
|
}
|
|
5972
6030
|
};
|
|
5973
|
-
|
|
5974
|
-
|
|
6031
|
+
Mt.styles = fi;
|
|
6032
|
+
Mt = yi([
|
|
5975
6033
|
J("cb-auth-alert")
|
|
5976
|
-
],
|
|
6034
|
+
], Mt);
|
|
5977
6035
|
const vi = X`
|
|
5978
6036
|
sl-dialog::part(base) {
|
|
5979
6037
|
z-index: 1000;
|
|
@@ -6123,16 +6181,16 @@ We([
|
|
|
6123
6181
|
v({ type: Number })
|
|
6124
6182
|
], Ae.prototype, "zindex", 2);
|
|
6125
6183
|
We([
|
|
6126
|
-
|
|
6184
|
+
Ce("#cb-feedback-rating-el")
|
|
6127
6185
|
], Ae.prototype, "_rating", 2);
|
|
6128
6186
|
We([
|
|
6129
|
-
|
|
6187
|
+
Ce("#cb-feedback-comments-el")
|
|
6130
6188
|
], Ae.prototype, "_comments", 2);
|
|
6131
6189
|
We([
|
|
6132
|
-
|
|
6190
|
+
Ce("#cb-feedback-name-el")
|
|
6133
6191
|
], Ae.prototype, "_name", 2);
|
|
6134
6192
|
We([
|
|
6135
|
-
|
|
6193
|
+
Ce("#cb-feedback-email-el")
|
|
6136
6194
|
], Ae.prototype, "_email", 2);
|
|
6137
6195
|
Ae = We([
|
|
6138
6196
|
J("cb-dialog-feedback")
|
|
@@ -6158,7 +6216,7 @@ const Xe = (c) => c !== null && typeof c == "object", nt = (...c) => {
|
|
|
6158
6216
|
for (const e of c)
|
|
6159
6217
|
if ((!Xe(e) || Array.isArray(e)) && e !== void 0)
|
|
6160
6218
|
throw new TypeError("The `options` argument must be an object");
|
|
6161
|
-
return
|
|
6219
|
+
return qt({}, ...c);
|
|
6162
6220
|
}, pa = (c = {}, e = {}) => {
|
|
6163
6221
|
const a = new globalThis.Headers(c), n = e instanceof globalThis.Headers, s = new globalThis.Headers(e);
|
|
6164
6222
|
for (const [r, f] of s.entries())
|
|
@@ -6166,21 +6224,21 @@ const Xe = (c) => c !== null && typeof c == "object", nt = (...c) => {
|
|
|
6166
6224
|
return a;
|
|
6167
6225
|
};
|
|
6168
6226
|
function st(c, e, a) {
|
|
6169
|
-
return Object.hasOwn(e, a) && e[a] === void 0 ? [] :
|
|
6227
|
+
return Object.hasOwn(e, a) && e[a] === void 0 ? [] : qt(c[a] ?? [], e[a] ?? []);
|
|
6170
6228
|
}
|
|
6171
6229
|
const ga = (c = {}, e = {}) => ({
|
|
6172
6230
|
beforeRequest: st(c, e, "beforeRequest"),
|
|
6173
6231
|
beforeRetry: st(c, e, "beforeRetry"),
|
|
6174
6232
|
afterResponse: st(c, e, "afterResponse"),
|
|
6175
6233
|
beforeError: st(c, e, "beforeError")
|
|
6176
|
-
}),
|
|
6234
|
+
}), qt = (...c) => {
|
|
6177
6235
|
let e = {}, a = {}, n = {};
|
|
6178
6236
|
for (const s of c)
|
|
6179
6237
|
if (Array.isArray(s))
|
|
6180
6238
|
Array.isArray(e) || (e = []), e = [...e, ...s];
|
|
6181
6239
|
else if (Xe(s)) {
|
|
6182
6240
|
for (let [r, f] of Object.entries(s))
|
|
6183
|
-
Xe(f) && r in e && (f =
|
|
6241
|
+
Xe(f) && r in e && (f = qt(e[r], f)), e = { ...e, [r]: f };
|
|
6184
6242
|
Xe(s.hooks) && (n = ga(n, s.hooks), e.hooks = n), Xe(s.headers) && (a = pa(a, s.headers), e.headers = a);
|
|
6185
6243
|
}
|
|
6186
6244
|
return e;
|
|
@@ -6460,12 +6518,12 @@ class bt {
|
|
|
6460
6518
|
}
|
|
6461
6519
|
}
|
|
6462
6520
|
/*! MIT License © Sindre Sorhus */
|
|
6463
|
-
const
|
|
6521
|
+
const Tt = (c) => {
|
|
6464
6522
|
const e = (a, n) => bt.create(a, nt(c, n));
|
|
6465
6523
|
for (const a of ma)
|
|
6466
6524
|
e[a] = (n, s) => bt.create(n, nt(c, s, { method: a }));
|
|
6467
|
-
return e.create = (a) =>
|
|
6468
|
-
}, Hi =
|
|
6525
|
+
return e.create = (a) => Tt(nt(a)), e.extend = (a) => (typeof a == "function" && (a = a(c ?? {})), Tt(nt(c, a))), e.stop = ya, e;
|
|
6526
|
+
}, Hi = Tt();
|
|
6469
6527
|
Hi.extend({
|
|
6470
6528
|
hooks: {
|
|
6471
6529
|
beforeRequest: [
|
|
@@ -6500,8 +6558,8 @@ var Ri = Object.defineProperty, Vi = Object.getOwnPropertyDescriptor, H = (c, e,
|
|
|
6500
6558
|
(f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
|
|
6501
6559
|
return n && s && Ri(e, a, s), s;
|
|
6502
6560
|
};
|
|
6503
|
-
const
|
|
6504
|
-
|
|
6561
|
+
const Te = Ke.noConflict();
|
|
6562
|
+
Te.setLevel("info");
|
|
6505
6563
|
let j = class extends te {
|
|
6506
6564
|
constructor() {
|
|
6507
6565
|
super(...arguments), this.store = new pt(this, p), this.displayLicense = !1, this.name = "ChatBot", this.orgId = "", this.botId = "", this.url = "ws://localhost:3070", this.logoUrl = "", this.logoSvg = `<svg width="34" height="34" viewBox="0 0 400 400" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -6570,14 +6628,14 @@ let j = class extends te {
|
|
|
6570
6628
|
p.addActions(c);
|
|
6571
6629
|
}
|
|
6572
6630
|
render() {
|
|
6573
|
-
return p.disabled && !this.alwaysOpen ? (
|
|
6631
|
+
return p.disabled && !this.alwaysOpen ? (Te.info("Bot is disabled until settings are loaded"), null) : g`
|
|
6574
6632
|
<div class="cb-wrapper${p.open ? " cb-open" : ""}" part="wrapper${p.open ? " open" : ""}" exportparts="wrapper${p.open ? " open" : ""}">
|
|
6575
6633
|
<cb-header title="${this.name}" exportparts="header, header-logo, header-title, header-close"></cb-header>
|
|
6576
6634
|
<cb-message-list
|
|
6577
6635
|
.messages=${p.messages}
|
|
6578
6636
|
.actions=${p.actions}
|
|
6579
6637
|
.form=${p.form}
|
|
6580
|
-
exportparts="bot-message-list, bot-message, cb-message, bot-message-content, user-message-content, form, form-title, form-input, form-submit"
|
|
6638
|
+
exportparts="bot-message-list, disclaimer-message, bot-message, cb-message, bot-message-content, user-message-content, form, form-title, form-input, form-submit"
|
|
6581
6639
|
></cb-message-list>
|
|
6582
6640
|
${this.renderUserInput()} ${this.renderFeedbackDialog()}
|
|
6583
6641
|
</div>
|
|
@@ -6600,7 +6658,7 @@ let j = class extends te {
|
|
|
6600
6658
|
></cb-user-input>`;
|
|
6601
6659
|
}
|
|
6602
6660
|
connectedCallback() {
|
|
6603
|
-
super.connectedCallback(),
|
|
6661
|
+
super.connectedCallback(), Te.info("connectedCallback"), this.initCssVariables(), addEventListener("c7o:bot:stateEvent", this.handleStateEvent), addEventListener("message:send", this.handleAddMessage), addEventListener("chatbot:toggle", this.handleToggleEvent), addEventListener("form:submit", this.handleFormSubmitEvent), addEventListener("message:send:file", this._uploadFileHandler);
|
|
6604
6662
|
}
|
|
6605
6663
|
extractCssVariable(c, e, a) {
|
|
6606
6664
|
let n = c.getPropertyValue(e).trim();
|
|
@@ -6629,26 +6687,26 @@ let j = class extends te {
|
|
|
6629
6687
|
|
|
6630
6688
|
*/
|
|
6631
6689
|
disconnectedCallback() {
|
|
6632
|
-
|
|
6690
|
+
Te.info("disconnectedCallback"), super.disconnectedCallback(), window.removeEventListener("c7o:bot:stateEvent", this.handleStateEvent), window.removeEventListener("message:send", this.handleAddMessage), window.removeEventListener("chatbot:toggle", this.handleToggleEvent), window.removeEventListener("form:submit", this.handleFormSubmitEvent), window.removeEventListener("message:send:file", this._uploadFileHandler);
|
|
6633
6691
|
}
|
|
6634
6692
|
// This is called when component is loaded, with all the settings (props) values
|
|
6635
6693
|
// Use to initialize
|
|
6636
6694
|
// This is also called when state changes - ??? - i.e. when message added to the array
|
|
6637
6695
|
updated(c) {
|
|
6638
|
-
super.updated(c), c.size > 0 && (
|
|
6696
|
+
super.updated(c), c.size > 0 && (Te.info("updated,_changedProperties:", c), this._initSetting()), setTimeout(() => {
|
|
6639
6697
|
this._scrollToBottom();
|
|
6640
6698
|
}, 0);
|
|
6641
6699
|
}
|
|
6642
6700
|
// initialize setting
|
|
6643
6701
|
_initSetting() {
|
|
6644
|
-
|
|
6702
|
+
Te.info("_initSetting");
|
|
6645
6703
|
const c = p.setting;
|
|
6646
6704
|
c.orgId = this.orgId, c.botId = this.botId, c.url = this.url, c.logoUrl = this.logoUrl, c.logoSvg = this.logoSvg, c.closeSvg = this.closeSvg, c.popupLogoSvg = this.popupLogoSvg, c.popupLogoUrl = this.popupLogoUrl, c.botIconSvg = this.botIconSvg, c.userIconSvg = this.userIconSvg, c.systemIconSvg = this.systemIconSvg, c.agentIconSvg = this.agentIconSvg, c.anchorOpenSvg = this.anchorOpenSvg, c.anchorCloseSvg = this.anchorCloseSvg, p.setSetting(c);
|
|
6647
6705
|
let e = {};
|
|
6648
6706
|
try {
|
|
6649
6707
|
e = JSON.parse(this.prefilledFormFields);
|
|
6650
6708
|
} catch (a) {
|
|
6651
|
-
|
|
6709
|
+
Te.error(`Failed to parse prefilled-form-fields attribute value, error: ${(a == null ? void 0 : a.message) || ""}`), e = {};
|
|
6652
6710
|
}
|
|
6653
6711
|
p.setPrefilledFormFields(e), this.open && (p.open = !0), this.alwaysOpen && (p.open = !0, p.alwaysOpen = !0);
|
|
6654
6712
|
}
|
|
@@ -6682,7 +6740,7 @@ let j = class extends te {
|
|
|
6682
6740
|
// for example, user profile, current product user is viewing on the web page, etc.
|
|
6683
6741
|
setContext(c = {}) {
|
|
6684
6742
|
p.setContext(c).catch((e) => {
|
|
6685
|
-
|
|
6743
|
+
Te.error(`Failed to set context, error: ${(e == null ? void 0 : e.message) || ""}`);
|
|
6686
6744
|
});
|
|
6687
6745
|
}
|
|
6688
6746
|
getContext() {
|
|
@@ -6850,7 +6908,7 @@ H([
|
|
|
6850
6908
|
v({ type: Boolean })
|
|
6851
6909
|
], j.prototype, "showAuthAlert", 2);
|
|
6852
6910
|
H([
|
|
6853
|
-
|
|
6911
|
+
Ce("cb-message-list")
|
|
6854
6912
|
], j.prototype, "_messageList", 2);
|
|
6855
6913
|
j = H([
|
|
6856
6914
|
J("enegelai-bot")
|