@enegelai/bot-widget 1.12.5 → 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 +246 -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.setting.enableNotificationSound = "enableNotificationSound" in r ? r.enableNotificationSound : !0, 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
|
}
|
|
@@ -1471,11 +1471,14 @@ O([
|
|
|
1471
1471
|
botId: null,
|
|
1472
1472
|
url: null,
|
|
1473
1473
|
welcomeMessage: null,
|
|
1474
|
+
disclaimerMessage: null,
|
|
1474
1475
|
splitMessagesAtBreak: !1,
|
|
1475
1476
|
feedbackEnabled: !1,
|
|
1477
|
+
startFeedbackFromMessage: 1,
|
|
1476
1478
|
uploadImages: !1,
|
|
1477
1479
|
newConversationTimeoutInSec: 86400,
|
|
1478
|
-
enableNotificationSound: !0
|
|
1480
|
+
enableNotificationSound: !0,
|
|
1481
|
+
botAdvancedOptions: null
|
|
1479
1482
|
}
|
|
1480
1483
|
})
|
|
1481
1484
|
], L.prototype, "setting");
|
|
@@ -1717,7 +1720,7 @@ var mc = Object.defineProperty, yc = Object.getOwnPropertyDescriptor, vc = (c, e
|
|
|
1717
1720
|
(f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
|
|
1718
1721
|
return n && s && mc(e, a, s), s;
|
|
1719
1722
|
};
|
|
1720
|
-
let
|
|
1723
|
+
let St = class extends te {
|
|
1721
1724
|
constructor() {
|
|
1722
1725
|
super(...arguments), this.year = (/* @__PURE__ */ new Date()).getFullYear();
|
|
1723
1726
|
}
|
|
@@ -1752,10 +1755,10 @@ let Ct = class extends te {
|
|
|
1752
1755
|
`;
|
|
1753
1756
|
}
|
|
1754
1757
|
};
|
|
1755
|
-
|
|
1756
|
-
|
|
1758
|
+
St.styles = gc;
|
|
1759
|
+
St = vc([
|
|
1757
1760
|
J("cb-footer")
|
|
1758
|
-
],
|
|
1761
|
+
], St);
|
|
1759
1762
|
const wc = X`
|
|
1760
1763
|
${me}
|
|
1761
1764
|
|
|
@@ -1800,6 +1803,43 @@ const wc = X`
|
|
|
1800
1803
|
display: none;
|
|
1801
1804
|
}*/
|
|
1802
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
|
+
|
|
1803
1843
|
.cb-input-form {
|
|
1804
1844
|
margin: 10px 5px;
|
|
1805
1845
|
padding: 20px 20px;
|
|
@@ -1971,20 +2011,20 @@ var sa = { exports: {} };
|
|
|
1971
2011
|
return t;
|
|
1972
2012
|
}
|
|
1973
2013
|
function _(t, i) {
|
|
1974
|
-
if ((R(t) || t === window || t === document) && (t = [t]), Ye(t) ||
|
|
1975
|
-
if (Ye(t) && !
|
|
1976
|
-
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)) {
|
|
1977
2017
|
for (var l in t) if (Y(t, l) && i.call(t[l], t[l], l, t) === !1) break;
|
|
1978
2018
|
}
|
|
1979
2019
|
}
|
|
1980
2020
|
}
|
|
1981
2021
|
function K(t) {
|
|
1982
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 };
|
|
1983
|
-
return i && o &&
|
|
2023
|
+
return i && o && Pt(d) > 0 && _(d, function(h, b) {
|
|
1984
2024
|
if (h.eventName == i && h.fn.toString() == o.toString()) return l.found = !0, l.evt = b, !1;
|
|
1985
2025
|
}), l;
|
|
1986
2026
|
}
|
|
1987
|
-
function
|
|
2027
|
+
function D(t) {
|
|
1988
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 || [];
|
|
1989
2029
|
function M(E) {
|
|
1990
2030
|
P(d) && d.call(x, E, this), u && M.destroy();
|
|
@@ -2025,7 +2065,7 @@ var sa = { exports: {} };
|
|
|
2025
2065
|
var d = mt(), l = i.split(" ");
|
|
2026
2066
|
_(l, function(h) {
|
|
2027
2067
|
T(t, "g" + h);
|
|
2028
|
-
}),
|
|
2068
|
+
}), D(d, { onElement: t, avoidDuplicate: !1, once: !0, withCallback: function(h, b) {
|
|
2029
2069
|
_(l, function(u) {
|
|
2030
2070
|
N(b, "g" + u);
|
|
2031
2071
|
}), P(o) && o();
|
|
@@ -2054,7 +2094,7 @@ var sa = { exports: {} };
|
|
|
2054
2094
|
var t, i = document.createElement("fakeelement"), o = { animation: "animationend", OAnimation: "oAnimationEnd", MozAnimation: "animationend", WebkitAnimation: "webkitAnimationEnd" };
|
|
2055
2095
|
for (t in o) if (i.style[t] !== void 0) return o[t];
|
|
2056
2096
|
}
|
|
2057
|
-
function
|
|
2097
|
+
function Re(t, i, o, d) {
|
|
2058
2098
|
if (t()) i();
|
|
2059
2099
|
else {
|
|
2060
2100
|
var l;
|
|
@@ -2076,7 +2116,7 @@ var sa = { exports: {} };
|
|
|
2076
2116
|
}
|
|
2077
2117
|
if ((d = document.querySelectorAll('script[src="' + t + '"]')) && d.length > 0) {
|
|
2078
2118
|
if (P(o)) {
|
|
2079
|
-
if (z(i)) return
|
|
2119
|
+
if (z(i)) return Re(function() {
|
|
2080
2120
|
return window[i] !== void 0;
|
|
2081
2121
|
}, function() {
|
|
2082
2122
|
o();
|
|
@@ -2087,7 +2127,7 @@ var sa = { exports: {} };
|
|
|
2087
2127
|
var u = document.createElement("script");
|
|
2088
2128
|
u.type = "text/javascript", u.src = t, u.onload = function() {
|
|
2089
2129
|
if (P(o)) {
|
|
2090
|
-
if (z(i)) return
|
|
2130
|
+
if (z(i)) return Re(function() {
|
|
2091
2131
|
return window[i] !== void 0;
|
|
2092
2132
|
}, function() {
|
|
2093
2133
|
o();
|
|
@@ -2116,7 +2156,7 @@ var sa = { exports: {} };
|
|
|
2116
2156
|
function Ye(t) {
|
|
2117
2157
|
return t && t.length && isFinite(t.length);
|
|
2118
2158
|
}
|
|
2119
|
-
function
|
|
2159
|
+
function _e(t) {
|
|
2120
2160
|
return n(t) === "object" && t != null && !P(t) && !qe(t);
|
|
2121
2161
|
}
|
|
2122
2162
|
function re(t) {
|
|
@@ -2125,8 +2165,8 @@ var sa = { exports: {} };
|
|
|
2125
2165
|
function Y(t, i) {
|
|
2126
2166
|
return t !== null && hasOwnProperty.call(t, i);
|
|
2127
2167
|
}
|
|
2128
|
-
function
|
|
2129
|
-
if (
|
|
2168
|
+
function Pt(t) {
|
|
2169
|
+
if (_e(t)) {
|
|
2130
2170
|
if (t.keys) return t.keys().length;
|
|
2131
2171
|
var i = 0;
|
|
2132
2172
|
for (var o in t) Y(t, o) && i++;
|
|
@@ -2137,7 +2177,7 @@ var sa = { exports: {} };
|
|
|
2137
2177
|
function et(t) {
|
|
2138
2178
|
return !isNaN(parseFloat(t)) && isFinite(t);
|
|
2139
2179
|
}
|
|
2140
|
-
function
|
|
2180
|
+
function zt() {
|
|
2141
2181
|
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : -1, i = document.querySelectorAll(".gbtn[data-taborder]:not(.disabled)");
|
|
2142
2182
|
if (!i.length) return !1;
|
|
2143
2183
|
if (i.length == 1) return i[0];
|
|
@@ -2157,7 +2197,7 @@ var sa = { exports: {} };
|
|
|
2157
2197
|
}
|
|
2158
2198
|
function va(t) {
|
|
2159
2199
|
if (t.events.hasOwnProperty("keyboard")) return !1;
|
|
2160
|
-
t.events.keyboard =
|
|
2200
|
+
t.events.keyboard = D("keydown", { onElement: window, withCallback: function(i, o) {
|
|
2161
2201
|
var d = (i = i || window.event).keyCode;
|
|
2162
2202
|
if (d == 9) {
|
|
2163
2203
|
var l = document.querySelector(".gbtn.focused");
|
|
@@ -2169,10 +2209,10 @@ var sa = { exports: {} };
|
|
|
2169
2209
|
var b = document.querySelectorAll(".gbtn[data-taborder]");
|
|
2170
2210
|
if (!b || b.length <= 0) return;
|
|
2171
2211
|
if (!l) {
|
|
2172
|
-
var u =
|
|
2212
|
+
var u = zt();
|
|
2173
2213
|
return void (u && (u.focus(), T(u, "focused")));
|
|
2174
2214
|
}
|
|
2175
|
-
var y =
|
|
2215
|
+
var y = zt(l.getAttribute("data-taborder"));
|
|
2176
2216
|
N(l, "focused"), y && (y.focus(), T(y, "focused"));
|
|
2177
2217
|
}
|
|
2178
2218
|
d == 39 && t.nextSlide(), d == 37 && t.prevSlide(), d == 27 && t.close();
|
|
@@ -2220,7 +2260,7 @@ var sa = { exports: {} };
|
|
|
2220
2260
|
t.style.transform = "translate3d(" + i + "px, " + o + "px, 0)";
|
|
2221
2261
|
} }, { key: "widowWidth", value: function() {
|
|
2222
2262
|
return window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
|
|
2223
|
-
} }]),
|
|
2263
|
+
} }]), jt = f(function t() {
|
|
2224
2264
|
var i = this, o = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2225
2265
|
s(this, t);
|
|
2226
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;
|
|
@@ -2295,14 +2335,14 @@ var sa = { exports: {} };
|
|
|
2295
2335
|
var U = Y(l.settings.plyr, "config") ? l.settings.plyr.config : {}, fe = new Plyr("#" + b, U);
|
|
2296
2336
|
fe.on("ready", function(de) {
|
|
2297
2337
|
y[b] = de.detail.plyr, P(d) && d();
|
|
2298
|
-
}),
|
|
2338
|
+
}), Re(function() {
|
|
2299
2339
|
return t.querySelector("iframe") && t.querySelector("iframe").dataset.ready == "true";
|
|
2300
2340
|
}, function() {
|
|
2301
2341
|
l.resize(t);
|
|
2302
|
-
}), fe.on("enterfullscreen",
|
|
2342
|
+
}), fe.on("enterfullscreen", Ht), fe.on("exitfullscreen", Ht);
|
|
2303
2343
|
});
|
|
2304
2344
|
}
|
|
2305
|
-
function
|
|
2345
|
+
function Ht(t) {
|
|
2306
2346
|
var i = $(t.target, ".gslide-media");
|
|
2307
2347
|
t.type === "enterfullscreen" && T(i, "fullscreen"), t.type === "exitfullscreen" && N(i, "fullscreen");
|
|
2308
2348
|
}
|
|
@@ -2320,7 +2360,7 @@ var sa = { exports: {} };
|
|
|
2320
2360
|
k.style.height = i.height, k.style.maxWidth = i.width, T(k, "ginlined-content"), l = k;
|
|
2321
2361
|
}
|
|
2322
2362
|
if (!l) return console.error("Unable to append inline slide content", i), !1;
|
|
2323
|
-
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) {
|
|
2324
2364
|
M.preventDefault(), h.close();
|
|
2325
2365
|
} }), P(d) && d();
|
|
2326
2366
|
}
|
|
@@ -2335,13 +2375,13 @@ var sa = { exports: {} };
|
|
|
2335
2375
|
}
|
|
2336
2376
|
var _a = f(function t() {
|
|
2337
2377
|
var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2338
|
-
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));
|
|
2339
2379
|
}, [{ key: "sourceType", value: function(t) {
|
|
2340
2380
|
var i = t;
|
|
2341
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";
|
|
2342
2382
|
} }, { key: "parseConfig", value: function(t, i) {
|
|
2343
2383
|
var o = this, d = S({ descPosition: i.descPosition }, this.defaults);
|
|
2344
|
-
if (
|
|
2384
|
+
if (_e(t) && !R(t)) {
|
|
2345
2385
|
Y(t, "type") || (Y(t, "content") && t.content ? t.type = "inline" : Y(t, "href") && (t.type = this.sourceType(t.href)));
|
|
2346
2386
|
var l = S(d, t);
|
|
2347
2387
|
return this.setSize(l, i), l;
|
|
@@ -2404,9 +2444,9 @@ var sa = { exports: {} };
|
|
|
2404
2444
|
if (P(d.afterSlideLoad) && (M = function() {
|
|
2405
2445
|
P(o) && o(), d.afterSlideLoad({ index: t.index, slide: i, player: t.instance.getSlidePlayerInstance(t.index) });
|
|
2406
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") {
|
|
2407
|
-
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() {
|
|
2408
2448
|
var U = i.querySelector("img");
|
|
2409
|
-
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() {
|
|
2410
2450
|
t.instance.resize();
|
|
2411
2451
|
})), P(M) && M();
|
|
2412
2452
|
}));
|
|
@@ -2422,12 +2462,12 @@ var sa = { exports: {} };
|
|
|
2422
2462
|
} }, { key: "descriptionEvents", value: function(t, i) {
|
|
2423
2463
|
var o = this, d = t.querySelector(".desc-more");
|
|
2424
2464
|
if (!d) return !1;
|
|
2425
|
-
|
|
2465
|
+
D("click", { onElement: d, withCallback: function(l, h) {
|
|
2426
2466
|
l.preventDefault();
|
|
2427
2467
|
var b = document.body, u = $(h, ".gslide-desc");
|
|
2428
2468
|
if (!u) return !1;
|
|
2429
2469
|
u.innerHTML = i.description, T(b, "gdesc-open");
|
|
2430
|
-
var y =
|
|
2470
|
+
var y = D("click", { onElement: [b, $(u, ".gslide-description")], withCallback: function(m, x) {
|
|
2431
2471
|
m.target.nodeName.toLowerCase() !== "a" && (N(b, "gdesc-open"), T(b, "gdesc-closed"), u.innerHTML = i.smallDescription, o.descriptionEvents(u, i), setTimeout(function() {
|
|
2432
2472
|
N(b, "gdesc-closed");
|
|
2433
2473
|
}, 400), y.destroy());
|
|
@@ -2542,15 +2582,15 @@ var sa = { exports: {} };
|
|
|
2542
2582
|
var b, u = document.createElement("fakeelement"), y = { transition: "transitionend", OTransition: "oTransitionEnd", MozTransition: "transitionend", WebkitTransition: "webkitTransitionEnd" };
|
|
2543
2583
|
for (b in y) if (u.style[b] !== void 0) return y[b];
|
|
2544
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");
|
|
2545
|
-
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) {
|
|
2546
2586
|
N(d, "greset");
|
|
2547
2587
|
} }), d.style.opacity = "", h && (h.style.opacity = "");
|
|
2548
2588
|
}
|
|
2549
2589
|
function Ea(t) {
|
|
2550
2590
|
if (t.events.hasOwnProperty("touch")) return !1;
|
|
2551
|
-
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) {
|
|
2552
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) {
|
|
2553
|
-
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;
|
|
2554
2594
|
B.preventDefault();
|
|
2555
2595
|
}
|
|
2556
2596
|
}, touchMove: function(B) {
|
|
@@ -2560,14 +2600,14 @@ var sa = { exports: {} };
|
|
|
2560
2600
|
if (Math.abs(ce) <= 13) return !1;
|
|
2561
2601
|
}
|
|
2562
2602
|
k = !0;
|
|
2563
|
-
var
|
|
2564
|
-
if (Math.abs(Pa) > Math.abs(za) ? (
|
|
2565
|
-
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)"));
|
|
2566
2606
|
}
|
|
2567
2607
|
}, touchEnd: function() {
|
|
2568
2608
|
if (u) {
|
|
2569
|
-
if (k = !1, U || I) return G = fe, void (
|
|
2570
|
-
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));
|
|
2571
2611
|
if (!(B > 29 && x)) return B < 29 && ce < 25 ? (T(ct, "greset"), ct.style.opacity = 1, yt(m)) : void 0;
|
|
2572
2612
|
t.close();
|
|
2573
2613
|
}
|
|
@@ -2581,13 +2621,13 @@ var sa = { exports: {} };
|
|
|
2581
2621
|
if (!x || k) return !1;
|
|
2582
2622
|
I = !0, x.scaleX = x.scaleY = M * B.zoom;
|
|
2583
2623
|
var ce = M * B.zoom;
|
|
2584
|
-
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", "");
|
|
2585
2625
|
ce > 4.5 && (ce = 4.5), x.style.transform = "scale3d(".concat(ce, ", ").concat(ce, ", 1)"), E = ce;
|
|
2586
2626
|
}, pressMove: function(B) {
|
|
2587
2627
|
if (U && !I) {
|
|
2588
|
-
var ce = Oe.pageX - pe.pageX,
|
|
2589
|
-
G && (ce += G),
|
|
2590
|
-
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)");
|
|
2591
2631
|
E && (it += " scale3d(".concat(E, ", ").concat(E, ", 1)")), C(x, it);
|
|
2592
2632
|
}
|
|
2593
2633
|
}, swipe: function(B) {
|
|
@@ -2605,7 +2645,7 @@ var sa = { exports: {} };
|
|
|
2605
2645
|
} });
|
|
2606
2646
|
t.events.touch = qa;
|
|
2607
2647
|
}
|
|
2608
|
-
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">
|
|
2609
2649
|
<div class="gslide-inner-content">
|
|
2610
2650
|
<div class="ginner-container">
|
|
2611
2651
|
<div class="gslide-media">
|
|
@@ -2632,7 +2672,7 @@ var sa = { exports: {} };
|
|
|
2632
2672
|
s(this, t), this.customOptions = i, this.settings = S(Aa, i), this.effectsClasses = this.getAnimationClasses(), this.videoPlayers = {}, this.apiEvents = [], this.fullElementsList = !1;
|
|
2633
2673
|
}, [{ key: "init", value: function() {
|
|
2634
2674
|
var t = this, i = this.getSelector();
|
|
2635
|
-
i && (this.baseEvents =
|
|
2675
|
+
i && (this.baseEvents = D("click", { onElement: i, withCallback: function(o, d) {
|
|
2636
2676
|
o.preventDefault(), t.open(d);
|
|
2637
2677
|
} })), this.elements = this.getElements();
|
|
2638
2678
|
} }, { key: "open", value: function() {
|
|
@@ -2650,7 +2690,7 @@ var sa = { exports: {} };
|
|
|
2650
2690
|
var b = document.createElement("style");
|
|
2651
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");
|
|
2652
2692
|
}
|
|
2653
|
-
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);
|
|
2654
2694
|
} }, { key: "openAt", value: function() {
|
|
2655
2695
|
var t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 0;
|
|
2656
2696
|
this.open(null, t);
|
|
@@ -2763,7 +2803,7 @@ var sa = { exports: {} };
|
|
|
2763
2803
|
o && !o.playing && o.play();
|
|
2764
2804
|
} }, { key: "slidePlayerPlay", value: function(t) {
|
|
2765
2805
|
var i;
|
|
2766
|
-
if (!
|
|
2806
|
+
if (!Bt || (i = this.settings.plyr.config) !== null && i !== void 0 && i.muted) {
|
|
2767
2807
|
if (R(t)) {
|
|
2768
2808
|
var o = t.querySelector(".gvideo-wrapper");
|
|
2769
2809
|
o && (t = o.getAttribute("data-index"));
|
|
@@ -2827,17 +2867,17 @@ var sa = { exports: {} };
|
|
|
2827
2867
|
var u = document.getElementById("glightbox-body");
|
|
2828
2868
|
this.modal = u;
|
|
2829
2869
|
var y = u.querySelector(".gclose");
|
|
2830
|
-
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) {
|
|
2831
2871
|
m.preventDefault(), t.close();
|
|
2832
|
-
} })), 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) {
|
|
2833
2873
|
m.preventDefault(), t.nextSlide();
|
|
2834
|
-
} })), this.prevButton && (this.events.prev =
|
|
2874
|
+
} })), this.prevButton && (this.events.prev = D("click", { onElement: this.prevButton, withCallback: function(m, x) {
|
|
2835
2875
|
m.preventDefault(), t.prevSlide();
|
|
2836
|
-
} })), this.settings.closeOnOutsideClick && (this.events.outClose =
|
|
2876
|
+
} })), this.settings.closeOnOutsideClick && (this.events.outClose = D("click", { onElement: u, withCallback: function(m, x) {
|
|
2837
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();
|
|
2838
2878
|
} })), _(this.elements, function(m, x) {
|
|
2839
2879
|
t.slidesContainer.appendChild(m.instance.create()), m.slideNode = t.slidesContainer.querySelectorAll(".gslide")[x];
|
|
2840
|
-
}),
|
|
2880
|
+
}), Rt && T(document.body, "glightbox-touch"), this.events.resize = D("resize", { onElement: window, withCallback: function() {
|
|
2841
2881
|
t.resize();
|
|
2842
2882
|
} }), this.built = !0;
|
|
2843
2883
|
} }, { key: "resize", value: function() {
|
|
@@ -2859,9 +2899,9 @@ var sa = { exports: {} };
|
|
|
2859
2899
|
var I = o.clientWidth, U = o.clientHeight, fe = I / U;
|
|
2860
2900
|
E = "".concat(I / fe, ":").concat(U / fe);
|
|
2861
2901
|
}
|
|
2862
|
-
var de = E.split(":"), G = this.settings.videosWidth,
|
|
2863
|
-
if (ue = Math.floor(ue), u && (b -= l.offsetHeight),
|
|
2864
|
-
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 };
|
|
2865
2905
|
o.parentNode.setAttribute("style", "max-width: ".concat(pe.width, "px")), u && l.setAttribute("style", "max-width: ".concat(pe.width, "px;"));
|
|
2866
2906
|
} else o.parentNode.style.maxWidth = "".concat(G), u && l.setAttribute("style", "max-width: ".concat(G, ";"));
|
|
2867
2907
|
}
|
|
@@ -2893,7 +2933,7 @@ var sa = { exports: {} };
|
|
|
2893
2933
|
t.events = null;
|
|
2894
2934
|
}
|
|
2895
2935
|
var d = document.body;
|
|
2896
|
-
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();
|
|
2897
2937
|
var l = document.querySelector(".gcss-styles");
|
|
2898
2938
|
l && l.parentNode.removeChild(l), t.lightboxOpen = !1, t.closing = null;
|
|
2899
2939
|
});
|
|
@@ -2931,12 +2971,12 @@ var Cc = Object.defineProperty, Sc = Object.getOwnPropertyDescriptor, _c = (c, e
|
|
|
2931
2971
|
(f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
|
|
2932
2972
|
return n && s && Cc(e, a, s), s;
|
|
2933
2973
|
};
|
|
2934
|
-
let
|
|
2974
|
+
let _t = class extends ut {
|
|
2935
2975
|
render() {
|
|
2936
2976
|
return g` <div class="cb-thinking"><span></span><span></span><span></span></div>`;
|
|
2937
2977
|
}
|
|
2938
2978
|
};
|
|
2939
|
-
|
|
2979
|
+
_t.styles = X`
|
|
2940
2980
|
.cb-thinking {
|
|
2941
2981
|
text-align: center;
|
|
2942
2982
|
}
|
|
@@ -2974,9 +3014,9 @@ St.styles = X`
|
|
|
2974
3014
|
}
|
|
2975
3015
|
}
|
|
2976
3016
|
`;
|
|
2977
|
-
|
|
3017
|
+
_t = _c([
|
|
2978
3018
|
J("cb-thinking")
|
|
2979
|
-
],
|
|
3019
|
+
], _t);
|
|
2980
3020
|
var $c = Object.defineProperty, Mc = Object.getOwnPropertyDescriptor, oa = (c, e, a, n) => {
|
|
2981
3021
|
for (var s = n > 1 ? void 0 : n ? Mc(e, a) : e, r = c.length - 1, f; r >= 0; r--)
|
|
2982
3022
|
(f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
|
|
@@ -3043,7 +3083,7 @@ const Tc = X`
|
|
|
3043
3083
|
margin-right: 0.2em;
|
|
3044
3084
|
}
|
|
3045
3085
|
`;
|
|
3046
|
-
var Ec = Object.defineProperty, Ac = Object.getOwnPropertyDescriptor,
|
|
3086
|
+
var Ec = Object.defineProperty, Ac = Object.getOwnPropertyDescriptor, It = (c, e, a, n) => {
|
|
3047
3087
|
for (var s = n > 1 ? void 0 : n ? Ac(e, a) : e, r = c.length - 1, f; r >= 0; r--)
|
|
3048
3088
|
(f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
|
|
3049
3089
|
return n && s && Ec(e, a, s), s;
|
|
@@ -3093,22 +3133,22 @@ Ze.styles = X`
|
|
|
3093
3133
|
text-decoration: underline;
|
|
3094
3134
|
}
|
|
3095
3135
|
`;
|
|
3096
|
-
|
|
3136
|
+
It([
|
|
3097
3137
|
v({ type: String })
|
|
3098
3138
|
], Ze.prototype, "url", 2);
|
|
3099
|
-
|
|
3139
|
+
It([
|
|
3100
3140
|
v({ type: Boolean })
|
|
3101
3141
|
], Ze.prototype, "inverse", 2);
|
|
3102
|
-
Ze =
|
|
3142
|
+
Ze = It([
|
|
3103
3143
|
J("cb-external-link")
|
|
3104
3144
|
], Ze);
|
|
3105
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>';
|
|
3106
|
-
var Hc = Object.defineProperty, Bc = Object.getOwnPropertyDescriptor,
|
|
3146
|
+
var Hc = Object.defineProperty, Bc = Object.getOwnPropertyDescriptor, Lt = (c, e, a, n) => {
|
|
3107
3147
|
for (var s = n > 1 ? void 0 : n ? Bc(e, a) : e, r = c.length - 1, f; r >= 0; r--)
|
|
3108
3148
|
(f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
|
|
3109
3149
|
return n && s && Hc(e, a, s), s;
|
|
3110
3150
|
};
|
|
3111
|
-
const
|
|
3151
|
+
const Ut = {
|
|
3112
3152
|
pdf: Lc,
|
|
3113
3153
|
txt: Ic,
|
|
3114
3154
|
md: qc,
|
|
@@ -3142,22 +3182,22 @@ let Je = class extends te {
|
|
|
3142
3182
|
return g`
|
|
3143
3183
|
<cb-icon
|
|
3144
3184
|
class="cb-file-icon"
|
|
3145
|
-
svg="${
|
|
3185
|
+
svg="${Ut[this.type] || Ut.txt}"
|
|
3146
3186
|
></cb-icon>
|
|
3147
3187
|
`;
|
|
3148
3188
|
}
|
|
3149
3189
|
};
|
|
3150
3190
|
Je.styles = Tc;
|
|
3151
|
-
|
|
3191
|
+
Lt([
|
|
3152
3192
|
v({ type: String })
|
|
3153
3193
|
], Je.prototype, "filename", 2);
|
|
3154
|
-
|
|
3194
|
+
Lt([
|
|
3155
3195
|
v({ type: String })
|
|
3156
3196
|
], Je.prototype, "url", 2);
|
|
3157
|
-
Je =
|
|
3197
|
+
Je = Lt([
|
|
3158
3198
|
J("cb-file")
|
|
3159
3199
|
], Je);
|
|
3160
|
-
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`
|
|
3161
3201
|
pre code.hljs {
|
|
3162
3202
|
display: block;
|
|
3163
3203
|
overflow-x: auto;
|
|
@@ -4372,7 +4412,7 @@ const Rc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="curr
|
|
|
4372
4412
|
white-space: pre-wrap;
|
|
4373
4413
|
color: var(--n-text-color);
|
|
4374
4414
|
}
|
|
4375
|
-
`,
|
|
4415
|
+
`, Fc = X`
|
|
4376
4416
|
${me}
|
|
4377
4417
|
${Vc}
|
|
4378
4418
|
|
|
@@ -4605,10 +4645,10 @@ const Rc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="curr
|
|
|
4605
4645
|
filter: alpha(opacity=80);
|
|
4606
4646
|
}
|
|
4607
4647
|
`;
|
|
4608
|
-
function
|
|
4648
|
+
function Yt(c, e) {
|
|
4609
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>`;
|
|
4610
4650
|
}
|
|
4611
|
-
function
|
|
4651
|
+
function Dc() {
|
|
4612
4652
|
const c = new Ra({
|
|
4613
4653
|
html: !0,
|
|
4614
4654
|
breaks: !0,
|
|
@@ -4616,23 +4656,23 @@ function Fc() {
|
|
|
4616
4656
|
highlight(e, a) {
|
|
4617
4657
|
if (!!(a && vt.getLanguage(a))) {
|
|
4618
4658
|
const s = a ?? "";
|
|
4619
|
-
return
|
|
4659
|
+
return Yt(vt.highlight(e, { language: s }).value, s);
|
|
4620
4660
|
}
|
|
4621
|
-
return
|
|
4661
|
+
return Yt(vt.highlightAuto(e).value, "");
|
|
4622
4662
|
}
|
|
4623
4663
|
});
|
|
4624
4664
|
return c.use(Va, { attrs: { target: "_blank", rel: "noopener" } }), c;
|
|
4625
4665
|
}
|
|
4626
|
-
async function
|
|
4627
|
-
const a =
|
|
4666
|
+
async function $t(c) {
|
|
4667
|
+
const a = Dc().render(c);
|
|
4628
4668
|
return g`${W(a)}`;
|
|
4629
4669
|
}
|
|
4630
|
-
var Nc = Object.defineProperty, Uc = Object.getOwnPropertyDescriptor,
|
|
4670
|
+
var Nc = Object.defineProperty, Uc = Object.getOwnPropertyDescriptor, Be = (c, e, a, n) => {
|
|
4631
4671
|
for (var s = n > 1 ? void 0 : n ? Uc(e, a) : e, r = c.length - 1, f; r >= 0; r--)
|
|
4632
4672
|
(f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
|
|
4633
4673
|
return n && s && Nc(e, a, s), s;
|
|
4634
4674
|
};
|
|
4635
|
-
let
|
|
4675
|
+
let ke = class extends te {
|
|
4636
4676
|
constructor() {
|
|
4637
4677
|
super(...arguments), this.store = new pt(this, p), this.type = "assistant", this.suppressFeedback = !1, this.lightbox = kc({
|
|
4638
4678
|
touchNavigation: !0,
|
|
@@ -4753,7 +4793,7 @@ let Te = class extends te {
|
|
|
4753
4793
|
`;
|
|
4754
4794
|
}
|
|
4755
4795
|
async _getMessageText(c) {
|
|
4756
|
-
return
|
|
4796
|
+
return $t(c.data.text);
|
|
4757
4797
|
}
|
|
4758
4798
|
renderMessageContent(c) {
|
|
4759
4799
|
var e;
|
|
@@ -4763,7 +4803,7 @@ let Te = class extends te {
|
|
|
4763
4803
|
() => g`<div class="assistant-message-user-name">${c.data.userName}</div>`,
|
|
4764
4804
|
() => null
|
|
4765
4805
|
)}
|
|
4766
|
-
${
|
|
4806
|
+
${kt(
|
|
4767
4807
|
this._getMessageText(c).then((a) => g`${a}`)
|
|
4768
4808
|
)}
|
|
4769
4809
|
</div>` : c.type === "file" ? g`${ze(
|
|
@@ -4775,8 +4815,8 @@ let Te = class extends te {
|
|
|
4775
4815
|
(a) => a.name,
|
|
4776
4816
|
(a) => g`<div>${a.name}</div>`
|
|
4777
4817
|
)}` : g`<div class="cb-message-text">
|
|
4778
|
-
${
|
|
4779
|
-
|
|
4818
|
+
${kt(
|
|
4819
|
+
$t(((e = c.data.text) == null ? void 0 : e.toString()) || "").then((a) => g`${a}`)
|
|
4780
4820
|
)}
|
|
4781
4821
|
</div>`;
|
|
4782
4822
|
}
|
|
@@ -4808,7 +4848,7 @@ let Te = class extends te {
|
|
|
4808
4848
|
`;
|
|
4809
4849
|
}
|
|
4810
4850
|
renderBotMessageFeedback(c) {
|
|
4811
|
-
return this.suppressFeedback || !p.setting.feedbackEnabled ? null : g`
|
|
4851
|
+
return this.suppressFeedback || !p.setting.feedbackEnabled || this.index < p.setting.startFeedbackFromMessage * 2 ? null : g`
|
|
4812
4852
|
<div class="cb-message-feedback-tools">
|
|
4813
4853
|
<div class="cb-message-feedback-icon cb-feedback-up" @click="${() => this.startFeedback(!0, c)}">${le`${W(ra)}`}</div>
|
|
4814
4854
|
<div class="cb-message-feedback-icon cb-feedback-down" @click="${() => this.startFeedback(!1, c)}">${le`${W(da)}`}</div>
|
|
@@ -4822,7 +4862,7 @@ let Te = class extends te {
|
|
|
4822
4862
|
return g`
|
|
4823
4863
|
<div class="cb-message" part="cb-message" style="display: flex; justify-content: end;align-items: start;">
|
|
4824
4864
|
<!--<sl-avatar class="avatar user-avatar small" label="User">
|
|
4825
|
-
<cb-icon slot="icon" svg="${
|
|
4865
|
+
<cb-icon slot="icon" svg="${Wt}" color="white"></cb-icon>
|
|
4826
4866
|
//appState.appearanceUserMessageAvatarPosition
|
|
4827
4867
|
</sl-avatar>-->
|
|
4828
4868
|
${ie(
|
|
@@ -4845,7 +4885,7 @@ let Te = class extends te {
|
|
|
4845
4885
|
return g`
|
|
4846
4886
|
<div class="cb-message" part="cb-message" style="display: flex; justify-content: end;align-items: start;">
|
|
4847
4887
|
<!--<sl-avatar class="avatar user-avatar small" label="User">
|
|
4848
|
-
<cb-icon slot="icon" svg="${
|
|
4888
|
+
<cb-icon slot="icon" svg="${Wt}" color="white"></cb-icon>
|
|
4849
4889
|
//appState.appearanceUserMessageAvatarPosition
|
|
4850
4890
|
</sl-avatar>-->
|
|
4851
4891
|
${ie(
|
|
@@ -4863,25 +4903,28 @@ let Te = class extends te {
|
|
|
4863
4903
|
`;
|
|
4864
4904
|
}
|
|
4865
4905
|
};
|
|
4866
|
-
|
|
4867
|
-
|
|
4906
|
+
ke.styles = Fc;
|
|
4907
|
+
Be([
|
|
4868
4908
|
v({ type: Object })
|
|
4869
|
-
],
|
|
4870
|
-
|
|
4909
|
+
], ke.prototype, "message", 2);
|
|
4910
|
+
Be([
|
|
4911
|
+
v({ type: Number })
|
|
4912
|
+
], ke.prototype, "index", 2);
|
|
4913
|
+
Be([
|
|
4871
4914
|
v({ type: String })
|
|
4872
|
-
],
|
|
4873
|
-
|
|
4915
|
+
], ke.prototype, "type", 2);
|
|
4916
|
+
Be([
|
|
4874
4917
|
v({ type: Boolean })
|
|
4875
|
-
],
|
|
4876
|
-
|
|
4918
|
+
], ke.prototype, "suppressFeedback", 2);
|
|
4919
|
+
Be([
|
|
4877
4920
|
Qt(".code-block-header__copy")
|
|
4878
|
-
],
|
|
4879
|
-
|
|
4921
|
+
], ke.prototype, "copyBtns", 2);
|
|
4922
|
+
Be([
|
|
4880
4923
|
Qt("img")
|
|
4881
|
-
],
|
|
4882
|
-
|
|
4924
|
+
], ke.prototype, "glightboxImages", 2);
|
|
4925
|
+
ke = Be([
|
|
4883
4926
|
J("cb-message")
|
|
4884
|
-
],
|
|
4927
|
+
], ke);
|
|
4885
4928
|
var Wc = Object.defineProperty, Yc = Object.getOwnPropertyDescriptor, ye = (c, e, a, n) => {
|
|
4886
4929
|
for (var s = n > 1 ? void 0 : n ? Yc(e, a) : e, r = c.length - 1, f; r >= 0; r--)
|
|
4887
4930
|
(f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
|
|
@@ -4903,16 +4946,28 @@ let be = class extends te {
|
|
|
4903
4946
|
render() {
|
|
4904
4947
|
return g`
|
|
4905
4948
|
<div class="cb-message-list" part="bot-message-list">
|
|
4949
|
+
${this.renderDisclaimerMessage()}
|
|
4906
4950
|
${ze(
|
|
4907
4951
|
this.messages,
|
|
4908
4952
|
(c) => c.id + JSON.stringify(c.data),
|
|
4909
|
-
(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>`
|
|
4910
4954
|
)}
|
|
4911
4955
|
${this.renderActions()} ${this.renderForm()}
|
|
4912
4956
|
<div id="cb-message-list-bottom-anchor"></div>
|
|
4913
4957
|
</div>
|
|
4914
4958
|
`;
|
|
4915
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
|
+
}
|
|
4916
4971
|
renderForm() {
|
|
4917
4972
|
return this.form ? g` <form class="cb-input-form" part="form" @submit="${this.handleFormSubmit.bind(this)}">
|
|
4918
4973
|
<div class="cb-input-form-title" part="form-title">${this.form.title}</div>
|
|
@@ -5181,19 +5236,19 @@ ye([
|
|
|
5181
5236
|
v({ type: Boolean })
|
|
5182
5237
|
], be.prototype, "suppressFeedback", 2);
|
|
5183
5238
|
ye([
|
|
5184
|
-
|
|
5239
|
+
Ce("#cb-message-list-bottom-anchor")
|
|
5185
5240
|
], be.prototype, "_messageListBottomAnchor", 2);
|
|
5186
5241
|
ye([
|
|
5187
|
-
|
|
5242
|
+
Ce(".cb-input-form")
|
|
5188
5243
|
], be.prototype, "_inputForm", 2);
|
|
5189
5244
|
ye([
|
|
5190
|
-
|
|
5245
|
+
Et({ capture: !1, passive: !0 })
|
|
5191
5246
|
], be.prototype, "invokeLinkAction", 1);
|
|
5192
5247
|
ye([
|
|
5193
|
-
|
|
5248
|
+
Et({ capture: !1, passive: !0 })
|
|
5194
5249
|
], be.prototype, "invokeCalendlyAction", 1);
|
|
5195
5250
|
ye([
|
|
5196
|
-
|
|
5251
|
+
Et({ capture: !1, passive: !0 })
|
|
5197
5252
|
], be.prototype, "invokeHubspotMeetingAction", 1);
|
|
5198
5253
|
be = ye([
|
|
5199
5254
|
J("cb-message-list")
|
|
@@ -5241,7 +5296,7 @@ const Xc = X`
|
|
|
5241
5296
|
margin: 6px 2px;
|
|
5242
5297
|
}
|
|
5243
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>';
|
|
5244
|
-
var Jc = Object.defineProperty, Kc = Object.getOwnPropertyDescriptor,
|
|
5299
|
+
var Jc = Object.defineProperty, Kc = Object.getOwnPropertyDescriptor, Se = (c, e, a, n) => {
|
|
5245
5300
|
for (var s = n > 1 ? void 0 : n ? Kc(e, a) : e, r = c.length - 1, f; r >= 0; r--)
|
|
5246
5301
|
(f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
|
|
5247
5302
|
return n && s && Jc(e, a, s), s;
|
|
@@ -5337,31 +5392,31 @@ let he = class extends te {
|
|
|
5337
5392
|
}
|
|
5338
5393
|
};
|
|
5339
5394
|
he.styles = Xc;
|
|
5340
|
-
|
|
5395
|
+
Se([
|
|
5341
5396
|
v({ type: String, attribute: "placeholder" })
|
|
5342
5397
|
], he.prototype, "placeholder", 2);
|
|
5343
|
-
|
|
5398
|
+
Se([
|
|
5344
5399
|
v({ type: String, attribute: "send-button-label" })
|
|
5345
5400
|
], he.prototype, "sendButtonLabel", 2);
|
|
5346
|
-
|
|
5401
|
+
Se([
|
|
5347
5402
|
v({ type: Boolean, attribute: "enable-file-upload" })
|
|
5348
5403
|
], he.prototype, "enableFileUpload", 2);
|
|
5349
|
-
|
|
5404
|
+
Se([
|
|
5350
5405
|
v({ type: String })
|
|
5351
5406
|
], he.prototype, "value", 2);
|
|
5352
|
-
|
|
5407
|
+
Se([
|
|
5353
5408
|
v({ type: Boolean })
|
|
5354
5409
|
], he.prototype, "loading", 2);
|
|
5355
|
-
|
|
5410
|
+
Se([
|
|
5356
5411
|
v({ type: Boolean })
|
|
5357
5412
|
], he.prototype, "disabled", 2);
|
|
5358
|
-
|
|
5413
|
+
Se([
|
|
5359
5414
|
v({ type: String })
|
|
5360
5415
|
], he.prototype, "currentKey", 2);
|
|
5361
|
-
|
|
5362
|
-
|
|
5416
|
+
Se([
|
|
5417
|
+
Ce("sl-textarea")
|
|
5363
5418
|
], he.prototype, "inputElement", 2);
|
|
5364
|
-
he =
|
|
5419
|
+
he = Se([
|
|
5365
5420
|
J("cb-user-input")
|
|
5366
5421
|
], he);
|
|
5367
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`
|
|
@@ -5404,7 +5459,7 @@ var ei = Object.defineProperty, ti = Object.getOwnPropertyDescriptor, gt = (c, e
|
|
|
5404
5459
|
(f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
|
|
5405
5460
|
return n && s && ei(e, a, s), s;
|
|
5406
5461
|
};
|
|
5407
|
-
let
|
|
5462
|
+
let Ne = class extends te {
|
|
5408
5463
|
constructor() {
|
|
5409
5464
|
super(...arguments), this.open = !1, this.label = "Dialog", this.zindex = 100;
|
|
5410
5465
|
}
|
|
@@ -5448,19 +5503,19 @@ let Fe = class extends te {
|
|
|
5448
5503
|
</sl-dialog>`;
|
|
5449
5504
|
}
|
|
5450
5505
|
};
|
|
5451
|
-
|
|
5506
|
+
Ne.styles = Qc;
|
|
5452
5507
|
gt([
|
|
5453
5508
|
v({ type: Boolean })
|
|
5454
|
-
],
|
|
5509
|
+
], Ne.prototype, "open", 2);
|
|
5455
5510
|
gt([
|
|
5456
5511
|
v({ type: String, attribute: "label" })
|
|
5457
|
-
],
|
|
5512
|
+
], Ne.prototype, "label", 2);
|
|
5458
5513
|
gt([
|
|
5459
5514
|
v({ type: Number })
|
|
5460
|
-
],
|
|
5461
|
-
|
|
5515
|
+
], Ne.prototype, "zindex", 2);
|
|
5516
|
+
Ne = gt([
|
|
5462
5517
|
J("cb-dialog")
|
|
5463
|
-
],
|
|
5518
|
+
], Ne);
|
|
5464
5519
|
var ai = Object.defineProperty, ci = Object.getOwnPropertyDescriptor, la = (c, e, a, n) => {
|
|
5465
5520
|
for (var s = n > 1 ? void 0 : n ? ci(e, a) : e, r = c.length - 1, f; r >= 0; r--)
|
|
5466
5521
|
(f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
|
|
@@ -5710,7 +5765,7 @@ Ue([
|
|
|
5710
5765
|
v({ type: Boolean })
|
|
5711
5766
|
], Ee.prototype, "clearMessageDialogOpen", 2);
|
|
5712
5767
|
Ue([
|
|
5713
|
-
|
|
5768
|
+
Ce("sl-dialog")
|
|
5714
5769
|
], Ee.prototype, "dialog", 2);
|
|
5715
5770
|
Ue([
|
|
5716
5771
|
v({ type: Boolean })
|
|
@@ -5957,7 +6012,7 @@ var gi = Object.defineProperty, mi = Object.getOwnPropertyDescriptor, yi = (c, e
|
|
|
5957
6012
|
(f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
|
|
5958
6013
|
return n && s && gi(e, a, s), s;
|
|
5959
6014
|
};
|
|
5960
|
-
let
|
|
6015
|
+
let Mt = class extends te {
|
|
5961
6016
|
render() {
|
|
5962
6017
|
return g` <sl-alert variant="danger" open>
|
|
5963
6018
|
<cb-status-icon status="error" slot="icon"></cb-status-icon>
|
|
@@ -5973,10 +6028,10 @@ let _t = class extends te {
|
|
|
5973
6028
|
this.emit("setting:show");
|
|
5974
6029
|
}
|
|
5975
6030
|
};
|
|
5976
|
-
|
|
5977
|
-
|
|
6031
|
+
Mt.styles = fi;
|
|
6032
|
+
Mt = yi([
|
|
5978
6033
|
J("cb-auth-alert")
|
|
5979
|
-
],
|
|
6034
|
+
], Mt);
|
|
5980
6035
|
const vi = X`
|
|
5981
6036
|
sl-dialog::part(base) {
|
|
5982
6037
|
z-index: 1000;
|
|
@@ -6126,16 +6181,16 @@ We([
|
|
|
6126
6181
|
v({ type: Number })
|
|
6127
6182
|
], Ae.prototype, "zindex", 2);
|
|
6128
6183
|
We([
|
|
6129
|
-
|
|
6184
|
+
Ce("#cb-feedback-rating-el")
|
|
6130
6185
|
], Ae.prototype, "_rating", 2);
|
|
6131
6186
|
We([
|
|
6132
|
-
|
|
6187
|
+
Ce("#cb-feedback-comments-el")
|
|
6133
6188
|
], Ae.prototype, "_comments", 2);
|
|
6134
6189
|
We([
|
|
6135
|
-
|
|
6190
|
+
Ce("#cb-feedback-name-el")
|
|
6136
6191
|
], Ae.prototype, "_name", 2);
|
|
6137
6192
|
We([
|
|
6138
|
-
|
|
6193
|
+
Ce("#cb-feedback-email-el")
|
|
6139
6194
|
], Ae.prototype, "_email", 2);
|
|
6140
6195
|
Ae = We([
|
|
6141
6196
|
J("cb-dialog-feedback")
|
|
@@ -6161,7 +6216,7 @@ const Xe = (c) => c !== null && typeof c == "object", nt = (...c) => {
|
|
|
6161
6216
|
for (const e of c)
|
|
6162
6217
|
if ((!Xe(e) || Array.isArray(e)) && e !== void 0)
|
|
6163
6218
|
throw new TypeError("The `options` argument must be an object");
|
|
6164
|
-
return
|
|
6219
|
+
return qt({}, ...c);
|
|
6165
6220
|
}, pa = (c = {}, e = {}) => {
|
|
6166
6221
|
const a = new globalThis.Headers(c), n = e instanceof globalThis.Headers, s = new globalThis.Headers(e);
|
|
6167
6222
|
for (const [r, f] of s.entries())
|
|
@@ -6169,21 +6224,21 @@ const Xe = (c) => c !== null && typeof c == "object", nt = (...c) => {
|
|
|
6169
6224
|
return a;
|
|
6170
6225
|
};
|
|
6171
6226
|
function st(c, e, a) {
|
|
6172
|
-
return Object.hasOwn(e, a) && e[a] === void 0 ? [] :
|
|
6227
|
+
return Object.hasOwn(e, a) && e[a] === void 0 ? [] : qt(c[a] ?? [], e[a] ?? []);
|
|
6173
6228
|
}
|
|
6174
6229
|
const ga = (c = {}, e = {}) => ({
|
|
6175
6230
|
beforeRequest: st(c, e, "beforeRequest"),
|
|
6176
6231
|
beforeRetry: st(c, e, "beforeRetry"),
|
|
6177
6232
|
afterResponse: st(c, e, "afterResponse"),
|
|
6178
6233
|
beforeError: st(c, e, "beforeError")
|
|
6179
|
-
}),
|
|
6234
|
+
}), qt = (...c) => {
|
|
6180
6235
|
let e = {}, a = {}, n = {};
|
|
6181
6236
|
for (const s of c)
|
|
6182
6237
|
if (Array.isArray(s))
|
|
6183
6238
|
Array.isArray(e) || (e = []), e = [...e, ...s];
|
|
6184
6239
|
else if (Xe(s)) {
|
|
6185
6240
|
for (let [r, f] of Object.entries(s))
|
|
6186
|
-
Xe(f) && r in e && (f =
|
|
6241
|
+
Xe(f) && r in e && (f = qt(e[r], f)), e = { ...e, [r]: f };
|
|
6187
6242
|
Xe(s.hooks) && (n = ga(n, s.hooks), e.hooks = n), Xe(s.headers) && (a = pa(a, s.headers), e.headers = a);
|
|
6188
6243
|
}
|
|
6189
6244
|
return e;
|
|
@@ -6463,12 +6518,12 @@ class bt {
|
|
|
6463
6518
|
}
|
|
6464
6519
|
}
|
|
6465
6520
|
/*! MIT License © Sindre Sorhus */
|
|
6466
|
-
const
|
|
6521
|
+
const Tt = (c) => {
|
|
6467
6522
|
const e = (a, n) => bt.create(a, nt(c, n));
|
|
6468
6523
|
for (const a of ma)
|
|
6469
6524
|
e[a] = (n, s) => bt.create(n, nt(c, s, { method: a }));
|
|
6470
|
-
return e.create = (a) =>
|
|
6471
|
-
}, 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();
|
|
6472
6527
|
Hi.extend({
|
|
6473
6528
|
hooks: {
|
|
6474
6529
|
beforeRequest: [
|
|
@@ -6503,8 +6558,8 @@ var Ri = Object.defineProperty, Vi = Object.getOwnPropertyDescriptor, H = (c, e,
|
|
|
6503
6558
|
(f = c[r]) && (s = (n ? f(e, a, s) : f(s)) || s);
|
|
6504
6559
|
return n && s && Ri(e, a, s), s;
|
|
6505
6560
|
};
|
|
6506
|
-
const
|
|
6507
|
-
|
|
6561
|
+
const Te = Ke.noConflict();
|
|
6562
|
+
Te.setLevel("info");
|
|
6508
6563
|
let j = class extends te {
|
|
6509
6564
|
constructor() {
|
|
6510
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">
|
|
@@ -6573,14 +6628,14 @@ let j = class extends te {
|
|
|
6573
6628
|
p.addActions(c);
|
|
6574
6629
|
}
|
|
6575
6630
|
render() {
|
|
6576
|
-
return p.disabled && !this.alwaysOpen ? (
|
|
6631
|
+
return p.disabled && !this.alwaysOpen ? (Te.info("Bot is disabled until settings are loaded"), null) : g`
|
|
6577
6632
|
<div class="cb-wrapper${p.open ? " cb-open" : ""}" part="wrapper${p.open ? " open" : ""}" exportparts="wrapper${p.open ? " open" : ""}">
|
|
6578
6633
|
<cb-header title="${this.name}" exportparts="header, header-logo, header-title, header-close"></cb-header>
|
|
6579
6634
|
<cb-message-list
|
|
6580
6635
|
.messages=${p.messages}
|
|
6581
6636
|
.actions=${p.actions}
|
|
6582
6637
|
.form=${p.form}
|
|
6583
|
-
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"
|
|
6584
6639
|
></cb-message-list>
|
|
6585
6640
|
${this.renderUserInput()} ${this.renderFeedbackDialog()}
|
|
6586
6641
|
</div>
|
|
@@ -6603,7 +6658,7 @@ let j = class extends te {
|
|
|
6603
6658
|
></cb-user-input>`;
|
|
6604
6659
|
}
|
|
6605
6660
|
connectedCallback() {
|
|
6606
|
-
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);
|
|
6607
6662
|
}
|
|
6608
6663
|
extractCssVariable(c, e, a) {
|
|
6609
6664
|
let n = c.getPropertyValue(e).trim();
|
|
@@ -6632,26 +6687,26 @@ let j = class extends te {
|
|
|
6632
6687
|
|
|
6633
6688
|
*/
|
|
6634
6689
|
disconnectedCallback() {
|
|
6635
|
-
|
|
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);
|
|
6636
6691
|
}
|
|
6637
6692
|
// This is called when component is loaded, with all the settings (props) values
|
|
6638
6693
|
// Use to initialize
|
|
6639
6694
|
// This is also called when state changes - ??? - i.e. when message added to the array
|
|
6640
6695
|
updated(c) {
|
|
6641
|
-
super.updated(c), c.size > 0 && (
|
|
6696
|
+
super.updated(c), c.size > 0 && (Te.info("updated,_changedProperties:", c), this._initSetting()), setTimeout(() => {
|
|
6642
6697
|
this._scrollToBottom();
|
|
6643
6698
|
}, 0);
|
|
6644
6699
|
}
|
|
6645
6700
|
// initialize setting
|
|
6646
6701
|
_initSetting() {
|
|
6647
|
-
|
|
6702
|
+
Te.info("_initSetting");
|
|
6648
6703
|
const c = p.setting;
|
|
6649
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);
|
|
6650
6705
|
let e = {};
|
|
6651
6706
|
try {
|
|
6652
6707
|
e = JSON.parse(this.prefilledFormFields);
|
|
6653
6708
|
} catch (a) {
|
|
6654
|
-
|
|
6709
|
+
Te.error(`Failed to parse prefilled-form-fields attribute value, error: ${(a == null ? void 0 : a.message) || ""}`), e = {};
|
|
6655
6710
|
}
|
|
6656
6711
|
p.setPrefilledFormFields(e), this.open && (p.open = !0), this.alwaysOpen && (p.open = !0, p.alwaysOpen = !0);
|
|
6657
6712
|
}
|
|
@@ -6685,7 +6740,7 @@ let j = class extends te {
|
|
|
6685
6740
|
// for example, user profile, current product user is viewing on the web page, etc.
|
|
6686
6741
|
setContext(c = {}) {
|
|
6687
6742
|
p.setContext(c).catch((e) => {
|
|
6688
|
-
|
|
6743
|
+
Te.error(`Failed to set context, error: ${(e == null ? void 0 : e.message) || ""}`);
|
|
6689
6744
|
});
|
|
6690
6745
|
}
|
|
6691
6746
|
getContext() {
|
|
@@ -6853,7 +6908,7 @@ H([
|
|
|
6853
6908
|
v({ type: Boolean })
|
|
6854
6909
|
], j.prototype, "showAuthAlert", 2);
|
|
6855
6910
|
H([
|
|
6856
|
-
|
|
6911
|
+
Ce("cb-message-list")
|
|
6857
6912
|
], j.prototype, "_messageList", 2);
|
|
6858
6913
|
j = H([
|
|
6859
6914
|
J("enegelai-bot")
|