@enegelai/bot-widget 1.4.11 → 1.5.0

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/index.es.js CHANGED
@@ -1,10 +1,10 @@
1
- var Ea = Object.defineProperty;
2
- var Ma = (a, t, c) => t in a ? Ea(a, t, { enumerable: !0, configurable: !0, writable: !0, value: c }) : a[t] = c;
3
- var se = (a, t, c) => (Ma(a, typeof t != "symbol" ? t + "" : t, c), c);
1
+ var Ma = Object.defineProperty;
2
+ var Ea = (a, t, c) => t in a ? Ma(a, t, { enumerable: !0, configurable: !0, writable: !0, value: c }) : a[t] = c;
3
+ var se = (a, t, c) => (Ea(a, typeof t != "symbol" ? t + "" : t, c), c);
4
4
  import { css as U, LitElement as rt, html as w, svg as He } from "lit";
5
5
  import { property as C, customElement as Y, queryAll as Nt, query as De, eventOptions as xt } from "lit/decorators.js";
6
6
  import { unsafeHTML as ke } from "lit-html/directives/unsafe-html.js";
7
- import { when as ue } from "lit/directives/when.js";
7
+ import { when as ge } from "lit/directives/when.js";
8
8
  import "@shoelace-style/shoelace/dist/themes/light.css";
9
9
  import "@shoelace-style/shoelace/dist/themes/dark.css";
10
10
  import "@shoelace-style/shoelace/dist/components/button/button.js";
@@ -90,8 +90,8 @@ class Ke extends EventTarget {
90
90
  return this[i];
91
91
  },
92
92
  set(b) {
93
- const x = this[c];
94
- this[i] = b, f(b, x) === !0 && this.dispatchStateEvent(c, b, this);
93
+ const k = this[c];
94
+ this[i] = b, f(b, k) === !0 && this.dispatchStateEvent(c, b, this);
95
95
  },
96
96
  configurable: !0,
97
97
  enumerable: !0
@@ -150,8 +150,8 @@ const Yt = ({ finisher: a, descriptor: t }) => (c, i) => {
150
150
  var n;
151
151
  if (i === void 0) {
152
152
  const f = (n = c.originalKey) !== null && n !== void 0 ? n : c.key, b = t != null ? { kind: "method", placement: "prototype", key: f, descriptor: t(c.key) } : { ...c, key: f };
153
- return a != null && (b.finisher = function(x) {
154
- a(x, f);
153
+ return a != null && (b.finisher = function(k) {
154
+ a(k, f);
155
155
  }), b;
156
156
  }
157
157
  {
@@ -182,7 +182,7 @@ new URL(window.location.href);
182
182
  const ja = {
183
183
  prefix: "_ls"
184
184
  };
185
- function pe(a) {
185
+ function he(a) {
186
186
  return a = { ...ja, ...a }, Yt({
187
187
  // @ts-ignore ctor is typof State and not typeof ReactiveElement
188
188
  finisher: (t, c) => {
@@ -194,10 +194,10 @@ function pe(a) {
194
194
  const L = f.initialValue;
195
195
  f.initialValue = () => La(localStorage.getItem(n), b) ?? Ut(L), t.propertyMap.set(c, { ...f, ...a });
196
196
  }
197
- const x = i == null ? void 0 : i.set, V = {
197
+ const k = i == null ? void 0 : i.set, V = {
198
198
  ...i,
199
199
  set: function(L) {
200
- L !== void 0 && localStorage.setItem(n, b === Object || b === Array ? JSON.stringify(L) : L), x && x.call(this, L);
200
+ L !== void 0 && localStorage.setItem(n, b === Object || b === Array ? JSON.stringify(L) : L), k && k.call(this, L);
201
201
  }
202
202
  };
203
203
  Object.defineProperty(t.prototype, c, V);
@@ -221,44 +221,44 @@ var Gt = { exports: {} };
221
221
  "warn",
222
222
  "error"
223
223
  ];
224
- function f(M, P) {
225
- var D = M[P];
224
+ function f(E, P) {
225
+ var D = E[P];
226
226
  if (typeof D.bind == "function")
227
- return D.bind(M);
227
+ return D.bind(E);
228
228
  try {
229
- return Function.prototype.bind.call(D, M);
229
+ return Function.prototype.bind.call(D, E);
230
230
  } catch {
231
231
  return function() {
232
- return Function.prototype.apply.apply(D, [M, arguments]);
232
+ return Function.prototype.apply.apply(D, [E, arguments]);
233
233
  };
234
234
  }
235
235
  }
236
236
  function b() {
237
237
  console.log && (console.log.apply ? console.log.apply(console, arguments) : Function.prototype.apply.apply(console.log, [console, arguments])), console.trace && console.trace();
238
238
  }
239
- function x(M) {
240
- return M === "debug" && (M = "log"), typeof console === c ? !1 : M === "trace" && i ? b : console[M] !== void 0 ? f(console, M) : console.log !== void 0 ? f(console, "log") : t;
239
+ function k(E) {
240
+ return E === "debug" && (E = "log"), typeof console === c ? !1 : E === "trace" && i ? b : console[E] !== void 0 ? f(console, E) : console.log !== void 0 ? f(console, "log") : t;
241
241
  }
242
- function S(M, P) {
242
+ function S(E, P) {
243
243
  for (var D = 0; D < n.length; D++) {
244
244
  var $ = n[D];
245
- this[$] = D < M ? t : this.methodFactory($, M, P);
245
+ this[$] = D < E ? t : this.methodFactory($, E, P);
246
246
  }
247
247
  this.log = this.debug;
248
248
  }
249
- function V(M, P, D) {
249
+ function V(E, P, D) {
250
250
  return function() {
251
- typeof console !== c && (S.call(this, P, D), this[M].apply(this, arguments));
251
+ typeof console !== c && (S.call(this, P, D), this[E].apply(this, arguments));
252
252
  };
253
253
  }
254
- function L(M, P, D) {
255
- return x(M) || V.apply(this, arguments);
254
+ function L(E, P, D) {
255
+ return k(E) || V.apply(this, arguments);
256
256
  }
257
- function T(M, P, D) {
257
+ function T(E, P, D) {
258
258
  var $ = this, le;
259
259
  P = P ?? "WARN";
260
260
  var ee = "loglevel";
261
- typeof M == "string" ? ee += ":" + M : typeof M == "symbol" && (ee = void 0);
261
+ typeof E == "string" ? ee += ":" + E : typeof E == "symbol" && (ee = void 0);
262
262
  function lt(y) {
263
263
  var ie = (n[y] || "silent").toUpperCase();
264
264
  if (!(typeof window === c || !ee)) {
@@ -304,7 +304,7 @@ var Gt = { exports: {} };
304
304
  }
305
305
  }
306
306
  }
307
- $.name = M, $.levels = {
307
+ $.name = E, $.levels = {
308
308
  TRACE: 0,
309
309
  DEBUG: 1,
310
310
  INFO: 2,
@@ -315,7 +315,7 @@ var Gt = { exports: {} };
315
315
  return le;
316
316
  }, $.setLevel = function(y, ie) {
317
317
  if (typeof y == "string" && $.levels[y.toUpperCase()] !== void 0 && (y = $.levels[y.toUpperCase()]), typeof y == "number" && y >= 0 && y <= $.levels.SILENT) {
318
- if (le = y, ie !== !1 && lt(y), S.call($, y, M), typeof console === c && y < $.levels.SILENT)
318
+ if (le = y, ie !== !1 && lt(y), S.call($, y, E), typeof console === c && y < $.levels.SILENT)
319
319
  return "No console available for logging";
320
320
  } else
321
321
  throw "log.setLevel() called with invalid level: " + y;
@@ -418,7 +418,7 @@ const ft = /* @__PURE__ */ Zt(Oa), Pa = U`
418
418
  border-radius: 0;
419
419
  }
420
420
  }
421
- `, he = U`
421
+ `, ue = U`
422
422
  :host {
423
423
  --primary-color: var(--sl-color-primary-600);
424
424
  }
@@ -486,7 +486,7 @@ const ft = /* @__PURE__ */ Zt(Oa), Pa = U`
486
486
  text-decoration: underline;
487
487
  }
488
488
  `, Jt = U`
489
- ${he}
489
+ ${ue}
490
490
 
491
491
  :host {
492
492
  display: inline-flex;
@@ -536,9 +536,9 @@ let Ba = (a) => crypto.getRandomValues(new Uint8Array(a)), qa = (a, t, c) => {
536
536
  return (f = t) => {
537
537
  let b = "";
538
538
  for (; ; ) {
539
- let x = c(n), S = n;
539
+ let k = c(n), S = n;
540
540
  for (; S--; )
541
- if (b += a[x[S] & i] || "", b.length === f)
541
+ if (b += a[k[S] & i] || "", b.length === f)
542
542
  return b;
543
543
  }
544
544
  };
@@ -680,7 +680,7 @@ class Na {
680
680
  function q(a) {
681
681
  return a != null && typeof a == "object" && a["@@functional/placeholder"] === !0;
682
682
  }
683
- function Me(a) {
683
+ function Ee(a) {
684
684
  return function t(c) {
685
685
  return arguments.length === 0 || q(c) ? t : a.apply(this, arguments);
686
686
  };
@@ -691,13 +691,13 @@ function be(a) {
691
691
  case 0:
692
692
  return t;
693
693
  case 1:
694
- return q(c) ? t : Me(function(n) {
694
+ return q(c) ? t : Ee(function(n) {
695
695
  return a(c, n);
696
696
  });
697
697
  default:
698
- return q(c) && q(i) ? t : q(c) ? Me(function(n) {
698
+ return q(c) && q(i) ? t : q(c) ? Ee(function(n) {
699
699
  return a(n, i);
700
- }) : q(i) ? Me(function(n) {
700
+ }) : q(i) ? Ee(function(n) {
701
701
  return a(c, n);
702
702
  }) : a(c, i);
703
703
  }
@@ -717,7 +717,7 @@ function Ua(a) {
717
717
  return a(f, i, b);
718
718
  }) : q(i) ? be(function(f, b) {
719
719
  return a(c, f, b);
720
- }) : Me(function(f) {
720
+ }) : Ee(function(f) {
721
721
  return a(c, i, f);
722
722
  });
723
723
  default:
@@ -727,11 +727,11 @@ function Ua(a) {
727
727
  return a(f, i, b);
728
728
  }) : q(i) && q(n) ? be(function(f, b) {
729
729
  return a(c, f, b);
730
- }) : q(c) ? Me(function(f) {
730
+ }) : q(c) ? Ee(function(f) {
731
731
  return a(f, i, n);
732
- }) : q(i) ? Me(function(f) {
732
+ }) : q(i) ? Ee(function(f) {
733
733
  return a(c, f, n);
734
- }) : q(n) ? Me(function(f) {
734
+ }) : q(n) ? Ee(function(f) {
735
735
  return a(c, i, f);
736
736
  }) : a(c, i, n);
737
737
  }
@@ -778,7 +778,7 @@ var ic = Object.defineProperty, nc = Object.getOwnPropertyDescriptor, Z = (a, t,
778
778
  };
779
779
  const B = ft.noConflict();
780
780
  B.setLevel("info");
781
- const re = "cb_";
781
+ const oe = "cb_";
782
782
  class W extends Ke {
783
783
  constructor() {
784
784
  super(...arguments), this.actionIdCounter = 0, this.prefilledFormValues = {}, this.wsClient = null, this.replyMessage = null, this.streamingResponseInProgress = !1, this.streamingResponseBuffer = null, this.streamingResponseTagStartPos = 0;
@@ -870,16 +870,16 @@ class W extends Ke {
870
870
  B.info("form has no fields", t);
871
871
  return;
872
872
  }
873
- const f = `${re}${this.setting.botId}.${this.conversationId}.form.${i}`, b = localStorage.getItem(f);
873
+ const f = `${oe}${this.setting.botId}.${this.conversationId}.form.${i}`, b = localStorage.getItem(f);
874
874
  if (b) {
875
- let x = null;
875
+ let k = null;
876
876
  try {
877
- x = JSON.parse(b);
877
+ k = JSON.parse(b);
878
878
  } catch (S) {
879
- B.error(`Failed to parse stored form data: ${S.message}`), x = null;
879
+ B.error(`Failed to parse stored form data: ${S.message}`), k = null;
880
880
  }
881
- if (x) {
882
- this.sendFormData(i, x).catch((S) => {
881
+ if (k) {
882
+ this.sendFormData(i, k).catch((S) => {
883
883
  B.error(`Error when submitting form: ${S.message}`);
884
884
  });
885
885
  return;
@@ -896,8 +896,8 @@ class W extends Ke {
896
896
  B.info("Engaging User !"), this.engage = !0;
897
897
  const t = (f) => {
898
898
  const b = new Uint8Array(f.length / 2);
899
- for (let x = 0; x < b.length; x++)
900
- b[x] = parseInt(f.substr(x * 2, 2), 16);
899
+ for (let k = 0; k < b.length; k++)
900
+ b[k] = parseInt(f.substr(k * 2, 2), 16);
901
901
  return b;
902
902
  };
903
903
  let c = new Blob([t(cc)], { type: "application/octet-stream" });
@@ -1019,6 +1019,15 @@ class W extends Ke {
1019
1019
  this.actions = i.concat(this.actions);
1020
1020
  }
1021
1021
  }
1022
+ updateAction(t, c) {
1023
+ const i = this.actions.findIndex((n) => n.internalId === t.internalId);
1024
+ if (i !== -1) {
1025
+ const n = Object.assign({}, this.actions[i], c);
1026
+ this.actions.splice(i, 1, n);
1027
+ const f = [];
1028
+ this.actions = f.concat(this.actions);
1029
+ }
1030
+ }
1022
1031
  async sendMessage(t) {
1023
1032
  t = this.formatMessage(t), B.info("Send Message:", t), this.messages = this.messages.concat([t]), this.lastConversationUpdate = Date.now();
1024
1033
  const c = await this.getWsClient();
@@ -1069,7 +1078,7 @@ class W extends Ke {
1069
1078
  B.info("submitForm: No form is active - ignored");
1070
1079
  return;
1071
1080
  }
1072
- const c = `${re}${this.setting.botId}.${this.conversationId}.form.${this.form.name}`;
1081
+ const c = `${oe}${this.setting.botId}.${this.conversationId}.form.${this.form.name}`;
1073
1082
  await this.sendFormData(this.form.name, t), localStorage.setItem(c, JSON.stringify(t)), this.form = null;
1074
1083
  }
1075
1084
  async sendFormData(t, c) {
@@ -1086,37 +1095,38 @@ class W extends Ke {
1086
1095
  }
1087
1096
  }
1088
1097
  Z([
1089
- pe({ prefix: re }),
1098
+ he({ prefix: oe }),
1090
1099
  X({ value: "en" })
1091
1100
  ], W.prototype, "language", 2);
1092
1101
  Z([
1093
- pe({ prefix: re }),
1102
+ he({ prefix: oe }),
1094
1103
  X({ value: "light" })
1095
1104
  ], W.prototype, "theme", 2);
1096
1105
  Z([
1097
- pe({ prefix: re }),
1106
+ he({ prefix: oe }),
1098
1107
  X({ type: Boolean, value: !1 })
1099
1108
  ], W.prototype, "open", 2);
1100
1109
  Z([
1101
1110
  X({ type: Boolean, value: !1 })
1102
1111
  ], W.prototype, "alwaysOpen", 2);
1103
1112
  Z([
1104
- pe({ prefix: re }),
1113
+ he({ prefix: oe }),
1105
1114
  X({ value: "false" })
1106
1115
  ], W.prototype, "connectWs", 2);
1107
1116
  Z([
1108
- pe({ prefix: re }),
1117
+ he({ prefix: oe }),
1109
1118
  X({ value: gt() })
1110
1119
  ], W.prototype, "conversationId", 2);
1111
1120
  Z([
1112
- pe({ prefix: re }),
1121
+ he({ prefix: oe }),
1113
1122
  X({ value: 0 })
1114
1123
  ], W.prototype, "lastConversationUpdate", 2);
1115
1124
  Z([
1116
- pe({ prefix: re }),
1125
+ he({ prefix: oe }),
1117
1126
  X({ type: Array, value: [] })
1118
1127
  ], W.prototype, "messages", 2);
1119
1128
  Z([
1129
+ he({ prefix: oe }),
1120
1130
  X({
1121
1131
  type: Array,
1122
1132
  value: []
@@ -1176,14 +1186,14 @@ Z([
1176
1186
  X({ type: Boolean, value: !0 })
1177
1187
  ], W.prototype, "disabled", 2);
1178
1188
  Z([
1179
- pe({ prefix: re }),
1189
+ he({ prefix: oe }),
1180
1190
  X({ value: "true" })
1181
1191
  ], W.prototype, "shouldEngage", 2);
1182
1192
  Z([
1183
1193
  X({ type: Boolean, value: !1 })
1184
1194
  ], W.prototype, "engage", 2);
1185
1195
  Z([
1186
- pe({ prefix: re }),
1196
+ he({ prefix: oe }),
1187
1197
  X({
1188
1198
  type: Object,
1189
1199
  value: {
@@ -1195,8 +1205,8 @@ Z([
1195
1205
  }
1196
1206
  })
1197
1207
  ], W.prototype, "setting", 2);
1198
- const k = new W(), sc = U`
1199
- ${he}
1208
+ const x = new W(), sc = U`
1209
+ ${ue}
1200
1210
  :host {
1201
1211
  position: relative;
1202
1212
  font-weight: bold;
@@ -1293,16 +1303,16 @@ let tt = class extends Q {
1293
1303
  */
1294
1304
  render() {
1295
1305
  return w` <header class="cb-header" part="header">
1296
- ${ue(
1297
- k.setting.logoUrl !== "",
1298
- () => w`<img class="cb-header-img" src="${k.setting.logoUrl}" />`,
1306
+ ${ge(
1307
+ x.setting.logoUrl !== "",
1308
+ () => w`<img class="cb-header-img" src="${x.setting.logoUrl}" />`,
1299
1309
  () => w`<sl-button class="cb-setting-button" variant="text" circle>
1300
- <cb-icon class="cb-header-logo" svg="${k.setting.logoSvg}"></cb-icon>
1310
+ <cb-icon class="cb-header-logo" svg="${x.setting.logoSvg}"></cb-icon>
1301
1311
  </sl-button>`
1302
1312
  )}
1303
1313
  <span class="center title">${this.title}</span>
1304
- ${ue(
1305
- k.alwaysOpen,
1314
+ ${ge(
1315
+ x.alwaysOpen,
1306
1316
  () => w``,
1307
1317
  () => w`<span class="right">
1308
1318
  <sl-button @click=${this._clickCloseHandler} class="cb-setting-button" variant="text" circle>
@@ -1331,7 +1341,7 @@ tt = Kt([
1331
1341
  Y("cb-header")
1332
1342
  ], tt);
1333
1343
  const bc = U`
1334
- ${he}
1344
+ ${ue}
1335
1345
  .cb-footer {
1336
1346
  line-height: 60px;
1337
1347
  font-size: 16px;
@@ -1390,7 +1400,7 @@ mt = pc([
1390
1400
  Y("cb-footer")
1391
1401
  ], mt);
1392
1402
  const gc = U`
1393
- ${he}
1403
+ ${ue}
1394
1404
 
1395
1405
  :host {
1396
1406
  width: 100%;
@@ -1478,7 +1488,7 @@ const gc = U`
1478
1488
  border-radius: 6px;
1479
1489
  cursor: pointer;
1480
1490
  color: rgba(255, 255, 255, 1);
1481
- background-color: #ff9119;
1491
+ background-color: #f97316; //#ff9119;
1482
1492
  display: flex;
1483
1493
  align-items: center;
1484
1494
  font-size: 14px;
@@ -1508,7 +1518,8 @@ const gc = U`
1508
1518
  transition: background 0.8s;
1509
1519
  }
1510
1520
  .ripple:hover {
1511
- background: #ff9119 radial-gradient(circle, transparent 1%, #ff9119 1%) center/15000%;
1521
+ //background: #ff9119 radial-gradient(circle, transparent 1%, #ff9119 1%) center/15000%;
1522
+ background: #ea580c radial-gradient(circle, transparent 1%, #ea580c 1%) center/15000%;
1512
1523
  }
1513
1524
  .ripple:active {
1514
1525
  background-color: #fdba74;
@@ -1542,12 +1553,12 @@ var Qt = { exports: {} };
1542
1553
  return e && n(r.prototype, e), s && n(r, s), r;
1543
1554
  }
1544
1555
  var b = Date.now();
1545
- function x() {
1556
+ function k() {
1546
1557
  var r = {}, e = !0, s = 0, o = arguments.length;
1547
1558
  Object.prototype.toString.call(arguments[0]) === "[object Boolean]" && (e = arguments[0], s++);
1548
1559
  for (var d = function(h) {
1549
1560
  for (var u in h)
1550
- Object.prototype.hasOwnProperty.call(h, u) && (e && Object.prototype.toString.call(h[u]) === "[object Object]" ? r[u] = x(!0, r[u], h[u]) : r[u] = h[u]);
1561
+ Object.prototype.hasOwnProperty.call(h, u) && (e && Object.prototype.toString.call(h[u]) === "[object Object]" ? r[u] = k(!0, r[u], h[u]) : r[u] = h[u]);
1551
1562
  }; s < o; s++) {
1552
1563
  var l = arguments[s];
1553
1564
  d(l);
@@ -1555,7 +1566,7 @@ var Qt = { exports: {} };
1555
1566
  return r;
1556
1567
  }
1557
1568
  function S(r, e) {
1558
- if ((te(r) || r === window || r === document) && (r = [r]), Tt(r) || Le(r) || (r = [r]), Et(r) != 0) {
1569
+ if ((te(r) || r === window || r === document) && (r = [r]), Tt(r) || Le(r) || (r = [r]), Mt(r) != 0) {
1559
1570
  if (Tt(r) && !Le(r))
1560
1571
  for (var s = r.length, o = 0; o < s && e.call(r[o], r[o], o, r) !== !1; o++)
1561
1572
  ;
@@ -1568,25 +1579,25 @@ var Qt = { exports: {} };
1568
1579
  }
1569
1580
  function V(r) {
1570
1581
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : null, s = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null, o = r[b] = r[b] || [], d = { all: o, evt: null, found: null };
1571
- return e && s && Et(o) > 0 && S(o, function(l, h) {
1582
+ return e && s && Mt(o) > 0 && S(o, function(l, h) {
1572
1583
  if (l.eventName == e && l.fn.toString() == s.toString())
1573
1584
  return d.found = !0, d.evt = h, !1;
1574
1585
  }), d;
1575
1586
  }
1576
1587
  function L(r) {
1577
1588
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, s = e.onElement, o = e.withCallback, d = e.avoidDuplicate, l = d === void 0 || d, h = e.once, u = h !== void 0 && h, p = e.useCapture, v = p !== void 0 && p, g = arguments.length > 2 ? arguments[2] : void 0, m = s || [];
1578
- function E(_) {
1579
- y(o) && o.call(g, _, this), u && E.destroy();
1589
+ function M(_) {
1590
+ y(o) && o.call(g, _, this), u && M.destroy();
1580
1591
  }
1581
- return ie(m) && (m = document.querySelectorAll(m)), E.destroy = function() {
1592
+ return ie(m) && (m = document.querySelectorAll(m)), M.destroy = function() {
1582
1593
  S(m, function(_) {
1583
- var j = V(_, r, E);
1584
- j.found && j.all.splice(j.evt, 1), _.removeEventListener && _.removeEventListener(r, E, v);
1594
+ var j = V(_, r, M);
1595
+ j.found && j.all.splice(j.evt, 1), _.removeEventListener && _.removeEventListener(r, M, v);
1585
1596
  });
1586
1597
  }, S(m, function(_) {
1587
- var j = V(_, r, E);
1588
- (_.addEventListener && l && !j.found || !l) && (_.addEventListener(r, E, v), j.all.push({ eventName: r, fn: E }));
1589
- }), E;
1598
+ var j = V(_, r, M);
1599
+ (_.addEventListener && l && !j.found || !l) && (_.addEventListener(r, M, v), j.all.push({ eventName: r, fn: M }));
1600
+ }), M;
1590
1601
  }
1591
1602
  function T(r, e) {
1592
1603
  S(e.split(" "), function(s) {
@@ -1609,7 +1620,7 @@ var Qt = { exports: {} };
1609
1620
  return r;
1610
1621
  }
1611
1622
  }
1612
- function M(r) {
1623
+ function E(r) {
1613
1624
  var e = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", s = arguments.length > 2 && arguments[2] !== void 0 && arguments[2];
1614
1625
  if (!r || e === "")
1615
1626
  return !1;
@@ -1731,7 +1742,7 @@ var Qt = { exports: {} };
1731
1742
  function N(r, e) {
1732
1743
  return r !== null && hasOwnProperty.call(r, e);
1733
1744
  }
1734
- function Et(r) {
1745
+ function Mt(r) {
1735
1746
  if (Le(r)) {
1736
1747
  if (r.keys)
1737
1748
  return r.keys().length;
@@ -1745,7 +1756,7 @@ var Qt = { exports: {} };
1745
1756
  function Ue(r) {
1746
1757
  return !isNaN(parseFloat(r)) && isFinite(r);
1747
1758
  }
1748
- function Mt() {
1759
+ function Et() {
1749
1760
  var r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : -1, e = document.querySelectorAll(".gbtn[data-taborder]:not(.disabled)");
1750
1761
  if (!e.length)
1751
1762
  return !1;
@@ -1782,10 +1793,10 @@ var Qt = { exports: {} };
1782
1793
  if (!h || h.length <= 0)
1783
1794
  return;
1784
1795
  if (!d) {
1785
- var u = Mt();
1796
+ var u = Et();
1786
1797
  return void (u && (u.focus(), T(u, "focused")));
1787
1798
  }
1788
- var p = Mt(d.getAttribute("data-taborder"));
1799
+ var p = Et(d.getAttribute("data-taborder"));
1789
1800
  A(d, "focused"), p && (p.focus(), T(p, "focused"));
1790
1801
  }
1791
1802
  o == 39 && r.nextSlide(), o == 37 && r.prevSlide(), o == 27 && r.close();
@@ -1913,30 +1924,30 @@ var Qt = { exports: {} };
1913
1924
  function ha(r) {
1914
1925
  if (r.events.hasOwnProperty("touch"))
1915
1926
  return !1;
1916
- var e, s, o, d = ee(), l = d.width, h = d.height, u = !1, p = null, v = null, g = null, m = !1, E = 1, _ = 1, j = !1, z = !1, I = null, oe = null, ae = null, ye = null, ve = 0, _e = 0, je = !1, ht = !1, Te = {}, Ee = {}, Ot = 0, Pt = 0, ka = document.getElementById("glightbox-slider"), Xe = document.querySelector(".goverlay"), Ca = new ba(ka, { touchStart: function(O) {
1927
+ var e, s, o, d = ee(), l = d.width, h = d.height, u = !1, p = null, v = null, g = null, m = !1, M = 1, _ = 1, j = !1, z = !1, I = null, re = null, ae = null, ve = null, we = 0, _e = 0, je = !1, ht = !1, Te = {}, Me = {}, Ot = 0, Pt = 0, ka = document.getElementById("glightbox-slider"), Xe = document.querySelector(".goverlay"), Ca = new ba(ka, { touchStart: function(O) {
1917
1928
  if (u = !0, (F(O.targetTouches[0].target, "ginner-container") || ce(O.targetTouches[0].target, ".gslide-desc") || O.targetTouches[0].target.nodeName.toLowerCase() == "a") && (u = !1), ce(O.targetTouches[0].target, ".gslide-inline") && !F(O.targetTouches[0].target.parentNode, "gslide-inline") && (u = !1), u) {
1918
- if (Ee = O.targetTouches[0], Te.pageX = O.targetTouches[0].pageX, Te.pageY = O.targetTouches[0].pageY, Ot = O.targetTouches[0].clientX, Pt = O.targetTouches[0].clientY, p = r.activeSlide, v = p.querySelector(".gslide-media"), o = p.querySelector(".gslide-inline"), g = null, F(v, "gslide-image") && (g = v.querySelector("img")), (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) > 769 && (v = p.querySelector(".ginner-container")), A(Xe, "greset"), O.pageX > 20 && O.pageX < window.innerWidth - 20)
1929
+ if (Me = O.targetTouches[0], Te.pageX = O.targetTouches[0].pageX, Te.pageY = O.targetTouches[0].pageY, Ot = O.targetTouches[0].clientX, Pt = O.targetTouches[0].clientY, p = r.activeSlide, v = p.querySelector(".gslide-media"), o = p.querySelector(".gslide-inline"), g = null, F(v, "gslide-image") && (g = v.querySelector("img")), (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) > 769 && (v = p.querySelector(".ginner-container")), A(Xe, "greset"), O.pageX > 20 && O.pageX < window.innerWidth - 20)
1919
1930
  return;
1920
1931
  O.preventDefault();
1921
1932
  }
1922
1933
  }, touchMove: function(O) {
1923
- if (u && (Ee = O.targetTouches[0], !j && !z)) {
1934
+ if (u && (Me = O.targetTouches[0], !j && !z)) {
1924
1935
  if (o && o.offsetHeight > h) {
1925
- var K = Te.pageX - Ee.pageX;
1936
+ var K = Te.pageX - Me.pageX;
1926
1937
  if (Math.abs(K) <= 13)
1927
1938
  return !1;
1928
1939
  }
1929
1940
  m = !0;
1930
- var we, Ze = O.targetTouches[0].clientX, Sa = O.targetTouches[0].clientY, _a = Ot - Ze, Ta = Pt - Sa;
1931
- if (Math.abs(_a) > Math.abs(Ta) ? (je = !1, ht = !0) : (ht = !1, je = !0), e = Ee.pageX - Te.pageX, ve = 100 * e / l, s = Ee.pageY - Te.pageY, _e = 100 * s / h, je && g && (we = 1 - Math.abs(s) / h, Xe.style.opacity = we, r.settings.touchFollowAxis && (ve = 0)), ht && (we = 1 - Math.abs(e) / l, v.style.opacity = we, r.settings.touchFollowAxis && (_e = 0)), !g)
1932
- return P(v, "translate3d(".concat(ve, "%, 0, 0)"));
1933
- P(v, "translate3d(".concat(ve, "%, ").concat(_e, "%, 0)"));
1941
+ var xe, Ze = O.targetTouches[0].clientX, Sa = O.targetTouches[0].clientY, _a = Ot - Ze, Ta = Pt - Sa;
1942
+ if (Math.abs(_a) > Math.abs(Ta) ? (je = !1, ht = !0) : (ht = !1, je = !0), e = Me.pageX - Te.pageX, we = 100 * e / l, s = Me.pageY - Te.pageY, _e = 100 * s / h, je && g && (xe = 1 - Math.abs(s) / h, Xe.style.opacity = xe, r.settings.touchFollowAxis && (we = 0)), ht && (xe = 1 - Math.abs(e) / l, v.style.opacity = xe, r.settings.touchFollowAxis && (_e = 0)), !g)
1943
+ return P(v, "translate3d(".concat(we, "%, 0, 0)"));
1944
+ P(v, "translate3d(".concat(we, "%, ").concat(_e, "%, 0)"));
1934
1945
  }
1935
1946
  }, touchEnd: function() {
1936
1947
  if (u) {
1937
1948
  if (m = !1, z || j)
1938
- return ae = I, void (ye = oe);
1939
- var O = Math.abs(parseInt(_e)), K = Math.abs(parseInt(ve));
1949
+ return ae = I, void (ve = re);
1950
+ var O = Math.abs(parseInt(_e)), K = Math.abs(parseInt(we));
1940
1951
  if (!(O > 29 && g))
1941
1952
  return O < 29 && K < 25 ? (T(Xe, "greset"), Xe.style.opacity = 1, bt(v)) : void 0;
1942
1953
  r.close();
@@ -1946,20 +1957,20 @@ var Qt = { exports: {} };
1946
1957
  j = !1;
1947
1958
  }, 50);
1948
1959
  }, multipointStart: function() {
1949
- j = !0, E = _ || 1;
1960
+ j = !0, M = _ || 1;
1950
1961
  }, pinch: function(O) {
1951
1962
  if (!g || m)
1952
1963
  return !1;
1953
- j = !0, g.scaleX = g.scaleY = E * O.zoom;
1954
- var K = E * O.zoom;
1964
+ j = !0, g.scaleX = g.scaleY = M * O.zoom;
1965
+ var K = M * O.zoom;
1955
1966
  if (z = !0, K <= 1)
1956
- return z = !1, K = 1, ye = null, ae = null, I = null, oe = null, void g.setAttribute("style", "");
1967
+ return z = !1, K = 1, ve = null, ae = null, I = null, re = null, void g.setAttribute("style", "");
1957
1968
  K > 4.5 && (K = 4.5), g.style.transform = "scale3d(".concat(K, ", ").concat(K, ", 1)"), _ = K;
1958
1969
  }, pressMove: function(O) {
1959
1970
  if (z && !j) {
1960
- var K = Ee.pageX - Te.pageX, we = Ee.pageY - Te.pageY;
1961
- ae && (K += ae), ye && (we += ye), I = K, oe = we;
1962
- var Ze = "translate3d(".concat(K, "px, ").concat(we, "px, 0)");
1971
+ var K = Me.pageX - Te.pageX, xe = Me.pageY - Te.pageY;
1972
+ ae && (K += ae), ve && (xe += ve), I = K, re = xe;
1973
+ var Ze = "translate3d(".concat(K, "px, ").concat(xe, "px, 0)");
1963
1974
  _ && (Ze += " scale3d(".concat(_, ", ").concat(_, ", 1)")), P(g, Ze);
1964
1975
  }
1965
1976
  }, swipe: function(O) {
@@ -2032,12 +2043,12 @@ var Qt = { exports: {} };
2032
2043
  var e = this, s = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2033
2044
  i(this, r);
2034
2045
  var o = s.dragEl, d = s.toleranceX, l = d === void 0 ? 40 : d, h = s.toleranceY, u = h === void 0 ? 65 : h, p = s.slide, v = p === void 0 ? null : p, g = s.instance, m = g === void 0 ? null : g;
2035
- this.el = o, this.active = !1, this.dragging = !1, this.currentX = null, this.currentY = null, this.initialX = null, this.initialY = null, this.xOffset = 0, this.yOffset = 0, this.direction = null, this.lastDirection = null, this.toleranceX = l, this.toleranceY = u, this.toleranceReached = !1, this.dragContainer = this.el, this.slide = v, this.instance = m, this.el.addEventListener("mousedown", function(E) {
2036
- return e.dragStart(E);
2037
- }, !1), this.el.addEventListener("mouseup", function(E) {
2038
- return e.dragEnd(E);
2039
- }, !1), this.el.addEventListener("mousemove", function(E) {
2040
- return e.drag(E);
2046
+ this.el = o, this.active = !1, this.dragging = !1, this.currentX = null, this.currentY = null, this.initialX = null, this.initialY = null, this.xOffset = 0, this.yOffset = 0, this.direction = null, this.lastDirection = null, this.toleranceX = l, this.toleranceY = u, this.toleranceReached = !1, this.dragContainer = this.el, this.slide = v, this.instance = m, this.el.addEventListener("mousedown", function(M) {
2047
+ return e.dragStart(M);
2048
+ }, !1), this.el.addEventListener("mouseup", function(M) {
2049
+ return e.dragEnd(M);
2050
+ }, !1), this.el.addEventListener("mousemove", function(M) {
2051
+ return e.drag(M);
2041
2052
  }, !1);
2042
2053
  }
2043
2054
  return f(r, [{ key: "dragStart", value: function(e) {
@@ -2095,18 +2106,18 @@ var Qt = { exports: {} };
2095
2106
  T(l, "gvideo-container"), u.insertBefore(le('<div class="gvideo-wrapper"></div>'), u.firstChild);
2096
2107
  var v = r.querySelector(".gvideo-wrapper");
2097
2108
  Fe(this.settings.plyr.css, "Plyr");
2098
- var g = e.href, m = e == null ? void 0 : e.videoProvider, E = !1;
2109
+ var g = e.href, m = e == null ? void 0 : e.videoProvider, M = !1;
2099
2110
  u.style.maxWidth = e.width, Fe(this.settings.plyr.js, "Plyr", function() {
2100
2111
  if (!m && g.match(/vimeo\.com\/([0-9]*)/) && (m = "vimeo"), !m && (g.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/) || g.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/) || g.match(/(youtube\.com|youtube-nocookie\.com)\/embed\/([a-zA-Z0-9\-_]+)/)) && (m = "youtube"), m === "local" || !m) {
2101
2112
  m = "local";
2102
2113
  var _ = '<video id="' + h + '" ';
2103
- _ += 'style="background:#000; max-width: '.concat(e.width, ';" '), _ += 'preload="metadata" ', _ += 'x-webkit-airplay="allow" ', _ += "playsinline ", _ += "controls ", _ += 'class="gvideo-local">', _ += '<source src="'.concat(g, '">'), E = le(_ += "</video>");
2114
+ _ += 'style="background:#000; max-width: '.concat(e.width, ';" '), _ += 'preload="metadata" ', _ += 'x-webkit-airplay="allow" ', _ += "playsinline ", _ += "controls ", _ += 'class="gvideo-local">', _ += '<source src="'.concat(g, '">'), M = le(_ += "</video>");
2104
2115
  }
2105
- var j = E || le('<div id="'.concat(h, '" data-plyr-provider="').concat(m, '" data-plyr-embed-id="').concat(g, '"></div>'));
2116
+ var j = M || le('<div id="'.concat(h, '" data-plyr-provider="').concat(m, '" data-plyr-embed-id="').concat(g, '"></div>'));
2106
2117
  T(v, "".concat(m, "-video gvideo")), v.appendChild(j), v.setAttribute("data-id", h), v.setAttribute("data-index", s);
2107
2118
  var z = N(d.settings.plyr, "config") ? d.settings.plyr.config : {}, I = new Plyr("#" + h, z);
2108
- I.on("ready", function(oe) {
2109
- p[h] = oe.detail.plyr, y(o) && o();
2119
+ I.on("ready", function(re) {
2120
+ p[h] = re.detail.plyr, y(o) && o();
2110
2121
  }), Ie(function() {
2111
2122
  return r.querySelector("iframe") && r.querySelector("iframe").dataset.ready == "true";
2112
2123
  }, function() {
@@ -2134,8 +2145,8 @@ var Qt = { exports: {} };
2134
2145
  }
2135
2146
  if (!d)
2136
2147
  return console.error("Unable to append inline slide content", e), !1;
2137
- h.style.height = e.height, h.style.width = e.width, h.appendChild(d), this.events["inlineclose" + u] = L("click", { onElement: h.querySelectorAll(".gtrigger-close"), withCallback: function(E) {
2138
- E.preventDefault(), l.close();
2148
+ h.style.height = e.height, h.style.width = e.width, h.appendChild(d), this.events["inlineclose" + u] = L("click", { onElement: h.querySelectorAll(".gtrigger-close"), withCallback: function(M) {
2149
+ M.preventDefault(), l.close();
2139
2150
  } }), y(o) && o();
2140
2151
  }
2141
2152
  function ya(r, e, s, o) {
@@ -2150,16 +2161,16 @@ var Qt = { exports: {} };
2150
2161
  var va = function() {
2151
2162
  function r() {
2152
2163
  var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2153
- i(this, r), this.defaults = { href: "", sizes: "", srcset: "", title: "", type: "", videoProvider: "", description: "", alt: "", descPosition: "bottom", effect: "", width: "", height: "", content: !1, zoomable: !0, draggable: !0 }, Le(e) && (this.defaults = x(this.defaults, e));
2164
+ i(this, r), this.defaults = { href: "", sizes: "", srcset: "", title: "", type: "", videoProvider: "", description: "", alt: "", descPosition: "bottom", effect: "", width: "", height: "", content: !1, zoomable: !0, draggable: !0 }, Le(e) && (this.defaults = k(this.defaults, e));
2154
2165
  }
2155
2166
  return f(r, [{ key: "sourceType", value: function(e) {
2156
2167
  var s = e;
2157
2168
  return (e = e.toLowerCase()).match(/\.(jpeg|jpg|jpe|gif|png|apn|webp|avif|svg)/) !== null ? "image" : e.match(/(youtube\.com|youtube-nocookie\.com)\/watch\?v=([a-zA-Z0-9\-_]+)/) || e.match(/youtu\.be\/([a-zA-Z0-9\-_]+)/) || e.match(/(youtube\.com|youtube-nocookie\.com)\/embed\/([a-zA-Z0-9\-_]+)/) || e.match(/vimeo\.com\/([0-9]*)/) || e.match(/\.(mp4|ogg|webm|mov)/) !== null ? "video" : e.match(/\.(mp3|wav|wma|aac|ogg)/) !== null ? "audio" : e.indexOf("#") > -1 && s.split("#").pop().trim() !== "" ? "inline" : e.indexOf("goajax=true") > -1 ? "ajax" : "external";
2158
2169
  } }, { key: "parseConfig", value: function(e, s) {
2159
- var o = this, d = x({ descPosition: s.descPosition }, this.defaults);
2170
+ var o = this, d = k({ descPosition: s.descPosition }, this.defaults);
2160
2171
  if (Le(e) && !te(e)) {
2161
2172
  N(e, "type") || (N(e, "content") && e.content ? e.type = "inline" : N(e, "href") && (e.type = this.sourceType(e.href)));
2162
- var l = x(d, e);
2173
+ var l = k(d, e);
2163
2174
  return this.setSize(l, s), l;
2164
2175
  }
2165
2176
  var h = "", u = e.getAttribute("data-glightbox"), p = e.nodeName.toLowerCase();
@@ -2181,22 +2192,22 @@ var Qt = { exports: {} };
2181
2192
  S(d, function(j, z) {
2182
2193
  m.push(";\\s?" + z);
2183
2194
  }), m = m.join("\\s?:|"), u.trim() !== "" && S(d, function(j, z) {
2184
- var I = u, oe = new RegExp("s?" + z + "s?:s?(.*?)(" + m + "s?:|$)"), ae = I.match(oe);
2195
+ var I = u, re = new RegExp("s?" + z + "s?:s?(.*?)(" + m + "s?:|$)"), ae = I.match(re);
2185
2196
  if (ae && ae.length && ae[1]) {
2186
- var ye = ae[1].trim().replace(/;\s*$/, "");
2187
- d[z] = o.sanitizeValue(ye);
2197
+ var ve = ae[1].trim().replace(/;\s*$/, "");
2198
+ d[z] = o.sanitizeValue(ve);
2188
2199
  }
2189
2200
  });
2190
2201
  }
2191
2202
  if (d.description && d.description.substring(0, 1) === ".") {
2192
- var E;
2203
+ var M;
2193
2204
  try {
2194
- E = document.querySelector(d.description).innerHTML;
2205
+ M = document.querySelector(d.description).innerHTML;
2195
2206
  } catch (j) {
2196
2207
  if (!(j instanceof DOMException))
2197
2208
  throw j;
2198
2209
  }
2199
- E && (d.description = E);
2210
+ M && (d.description = M);
2200
2211
  }
2201
2212
  if (!d.description) {
2202
2213
  var _ = e.querySelector(".glightbox-desc");
@@ -2221,10 +2232,10 @@ var Qt = { exports: {} };
2221
2232
  return !1;
2222
2233
  var d = this.instance.settings, l = this.slideConfig, h = Se();
2223
2234
  y(d.beforeSlideLoad) && d.beforeSlideLoad({ index: this.index, slide: s, player: !1 });
2224
- var u = l.type, p = l.descPosition, v = s.querySelector(".gslide-media"), g = s.querySelector(".gslide-title"), m = s.querySelector(".gslide-desc"), E = s.querySelector(".gdesc-inner"), _ = o, j = "gSlideTitle_" + this.index, z = "gSlideDesc_" + this.index;
2235
+ var u = l.type, p = l.descPosition, v = s.querySelector(".gslide-media"), g = s.querySelector(".gslide-title"), m = s.querySelector(".gslide-desc"), M = s.querySelector(".gdesc-inner"), _ = o, j = "gSlideTitle_" + this.index, z = "gSlideDesc_" + this.index;
2225
2236
  if (y(d.afterSlideLoad) && (_ = function() {
2226
2237
  y(o) && o(), d.afterSlideLoad({ index: e.index, slide: s, player: e.instance.getSlidePlayerInstance(e.index) });
2227
- }), l.title == "" && l.description == "" ? E && E.parentNode.parentNode.removeChild(E.parentNode) : (g && l.title !== "" ? (g.id = j, g.innerHTML = l.title) : g.parentNode.removeChild(g), m && l.description !== "" ? (m.id = z, h && d.moreLength > 0 ? (l.smallDescription = this.slideShortDesc(l.description, d.moreLength, d.moreText), m.innerHTML = l.smallDescription, this.descriptionEvents(m, l)) : m.innerHTML = l.description) : m.parentNode.removeChild(m), T(v.parentNode, "desc-".concat(p)), T(E.parentNode, "description-".concat(p))), T(v, "gslide-".concat(u)), T(s, "loaded"), u !== "video") {
2238
+ }), l.title == "" && l.description == "" ? M && M.parentNode.parentNode.removeChild(M.parentNode) : (g && l.title !== "" ? (g.id = j, g.innerHTML = l.title) : g.parentNode.removeChild(g), m && l.description !== "" ? (m.id = z, h && d.moreLength > 0 ? (l.smallDescription = this.slideShortDesc(l.description, d.moreLength, d.moreText), m.innerHTML = l.smallDescription, this.descriptionEvents(m, l)) : m.innerHTML = l.description) : m.parentNode.removeChild(m), T(v.parentNode, "desc-".concat(p)), T(M.parentNode, "description-".concat(p))), T(v, "gslide-".concat(u)), T(s, "loaded"), u !== "video") {
2228
2239
  if (u !== "external")
2229
2240
  return u === "inline" ? (ma.apply(this.instance, [s, l, this.index, _]), void (l.draggable && new At({ dragEl: s.querySelector(".gslide-inline"), toleranceX: d.dragToleranceX, toleranceY: d.dragToleranceY, slide: s, instance: this.instance }))) : void (u !== "image" ? y(_) && _() : pa(s, l, this.index, function() {
2230
2241
  var I = s.querySelector("img");
@@ -2291,7 +2302,7 @@ var Qt = { exports: {} };
2291
2302
  </div>` }, xa = function() {
2292
2303
  function r() {
2293
2304
  var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2294
- i(this, r), this.customOptions = e, this.settings = x(wa, e), this.effectsClasses = this.getAnimationClasses(), this.videoPlayers = {}, this.apiEvents = [], this.fullElementsList = !1;
2305
+ i(this, r), this.customOptions = e, this.settings = k(wa, e), this.effectsClasses = this.getAnimationClasses(), this.videoPlayers = {}, this.apiEvents = [], this.fullElementsList = !1;
2295
2306
  }
2296
2307
  return f(r, [{ key: "init", value: function() {
2297
2308
  var e = this, s = this.getSelector();
@@ -2308,7 +2319,7 @@ var Qt = { exports: {} };
2308
2319
  var d = e.getAttribute("data-gallery");
2309
2320
  d && (this.fullElementsList = this.elements, this.elements = this.getGalleryElements(this.elements, d)), ne(o) && (o = this.getElementIndex(e)) < 0 && (o = 0);
2310
2321
  }
2311
- Ue(o) || (o = 0), this.build(), M(this.overlay, this.settings.openEffect === "none" ? "none" : this.settings.cssEfects.fade.in);
2322
+ Ue(o) || (o = 0), this.build(), E(this.overlay, this.settings.openEffect === "none" ? "none" : this.settings.cssEfects.fade.in);
2312
2323
  var l = document.body, h = window.innerWidth - document.documentElement.clientWidth;
2313
2324
  if (h > 0) {
2314
2325
  var u = document.createElement("style");
@@ -2361,7 +2372,7 @@ var Qt = { exports: {} };
2361
2372
  } }, { key: "insertSlide", value: function() {
2362
2373
  var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : -1;
2363
2374
  s < 0 && (s = this.elements.length);
2364
- var o = new Ye(e, this, s), d = o.getConfig(), l = x({}, d), h = o.create(), u = this.elements.length - 1;
2375
+ var o = new Ye(e, this, s), d = o.getConfig(), l = k({}, d), h = o.create(), u = this.elements.length - 1;
2365
2376
  l.index = s, l.node = !1, l.instance = o, l.slideConfig = d, this.elements.splice(s, 0, l);
2366
2377
  var p = null, v = null;
2367
2378
  if (this.slidesContainer) {
@@ -2383,12 +2394,12 @@ var Qt = { exports: {} };
2383
2394
  } }, { key: "slideAnimateIn", value: function(e, s) {
2384
2395
  var o = this, d = e.querySelector(".gslide-media"), l = e.querySelector(".gslide-description"), h = { index: this.prevActiveSlideIndex, slide: this.prevActiveSlide, slideNode: this.prevActiveSlide, slideIndex: this.prevActiveSlide, slideConfig: ne(this.prevActiveSlideIndex) ? null : this.elements[this.prevActiveSlideIndex].slideConfig, trigger: ne(this.prevActiveSlideIndex) ? null : this.elements[this.prevActiveSlideIndex].node, player: this.getSlidePlayerInstance(this.prevActiveSlideIndex) }, u = { index: this.index, slide: this.activeSlide, slideNode: this.activeSlide, slideConfig: this.elements[this.index].slideConfig, slideIndex: this.index, trigger: this.elements[this.index].node, player: this.getSlidePlayerInstance(this.index) };
2385
2396
  if (d.offsetWidth > 0 && l && ($(l), l.style.display = ""), A(e, this.effectsClasses), s)
2386
- M(e, this.settings.cssEfects[this.settings.openEffect].in, function() {
2397
+ E(e, this.settings.cssEfects[this.settings.openEffect].in, function() {
2387
2398
  o.settings.autoplayVideos && o.slidePlayerPlay(e), o.trigger("slide_changed", { prev: h, current: u }), y(o.settings.afterSlideChange) && o.settings.afterSlideChange.apply(o, [h, u]);
2388
2399
  });
2389
2400
  else {
2390
2401
  var p = this.settings.slideEffect, v = p !== "none" ? this.settings.cssEfects[p].in : p;
2391
- this.prevActiveSlideIndex > this.index && this.settings.slideEffect == "slide" && (v = this.settings.cssEfects.slideBack.in), M(e, v, function() {
2402
+ this.prevActiveSlideIndex > this.index && this.settings.slideEffect == "slide" && (v = this.settings.cssEfects.slideBack.in), E(e, v, function() {
2392
2403
  o.settings.autoplayVideos && o.slidePlayerPlay(e), o.trigger("slide_changed", { prev: h, current: u }), y(o.settings.afterSlideChange) && o.settings.afterSlideChange.apply(o, [h, u]);
2393
2404
  });
2394
2405
  }
@@ -2401,7 +2412,7 @@ var Qt = { exports: {} };
2401
2412
  var e = this.prevActiveSlide;
2402
2413
  A(e, this.effectsClasses), T(e, "prev");
2403
2414
  var s = this.settings.slideEffect, o = s !== "none" ? this.settings.cssEfects[s].out : s;
2404
- this.slidePlayerPause(e), this.trigger("slide_before_change", { prev: { index: this.prevActiveSlideIndex, slide: this.prevActiveSlide, slideNode: this.prevActiveSlide, slideIndex: this.prevActiveSlideIndex, slideConfig: ne(this.prevActiveSlideIndex) ? null : this.elements[this.prevActiveSlideIndex].slideConfig, trigger: ne(this.prevActiveSlideIndex) ? null : this.elements[this.prevActiveSlideIndex].node, player: this.getSlidePlayerInstance(this.prevActiveSlideIndex) }, current: { index: this.index, slide: this.activeSlide, slideNode: this.activeSlide, slideIndex: this.index, slideConfig: this.elements[this.index].slideConfig, trigger: this.elements[this.index].node, player: this.getSlidePlayerInstance(this.index) } }), y(this.settings.beforeSlideChange) && this.settings.beforeSlideChange.apply(this, [{ index: this.prevActiveSlideIndex, slide: this.prevActiveSlide, player: this.getSlidePlayerInstance(this.prevActiveSlideIndex) }, { index: this.index, slide: this.activeSlide, player: this.getSlidePlayerInstance(this.index) }]), this.prevActiveSlideIndex > this.index && this.settings.slideEffect == "slide" && (o = this.settings.cssEfects.slideBack.out), M(e, o, function() {
2415
+ this.slidePlayerPause(e), this.trigger("slide_before_change", { prev: { index: this.prevActiveSlideIndex, slide: this.prevActiveSlide, slideNode: this.prevActiveSlide, slideIndex: this.prevActiveSlideIndex, slideConfig: ne(this.prevActiveSlideIndex) ? null : this.elements[this.prevActiveSlideIndex].slideConfig, trigger: ne(this.prevActiveSlideIndex) ? null : this.elements[this.prevActiveSlideIndex].node, player: this.getSlidePlayerInstance(this.prevActiveSlideIndex) }, current: { index: this.index, slide: this.activeSlide, slideNode: this.activeSlide, slideIndex: this.index, slideConfig: this.elements[this.index].slideConfig, trigger: this.elements[this.index].node, player: this.getSlidePlayerInstance(this.index) } }), y(this.settings.beforeSlideChange) && this.settings.beforeSlideChange.apply(this, [{ index: this.prevActiveSlideIndex, slide: this.prevActiveSlide, player: this.getSlidePlayerInstance(this.prevActiveSlideIndex) }, { index: this.index, slide: this.activeSlide, player: this.getSlidePlayerInstance(this.index) }]), this.prevActiveSlideIndex > this.index && this.settings.slideEffect == "slide" && (o = this.settings.cssEfects.slideBack.out), E(e, o, function() {
2405
2416
  var d = e.querySelector(".ginner-container"), l = e.querySelector(".gslide-media"), h = e.querySelector(".gslide-description");
2406
2417
  d.style.transform = "", l.style.transform = "", A(l, "greset"), l.style.opacity = "", h && (h.style.opacity = ""), A(e, "prev");
2407
2418
  });
@@ -2448,7 +2459,7 @@ var Qt = { exports: {} };
2448
2459
  this.settings.elements = !1;
2449
2460
  var o = [];
2450
2461
  e && e.length && S(e, function(d, l) {
2451
- var h = new Ye(d, s, l), u = h.getConfig(), p = x({}, u);
2462
+ var h = new Ye(d, s, l), u = h.getConfig(), p = k({}, u);
2452
2463
  p.slideConfig = u, p.instance = h, p.index = l, o.push(p);
2453
2464
  }), this.elements = o, this.lightboxOpen && (this.slidesContainer.innerHTML = "", this.elements.length && (S(this.elements, function() {
2454
2465
  var d = le(s.settings.slideHTML);
@@ -2463,12 +2474,12 @@ var Qt = { exports: {} };
2463
2474
  } }, { key: "getElements", value: function() {
2464
2475
  var e = this, s = [];
2465
2476
  this.elements = this.elements ? this.elements : [], !ne(this.settings.elements) && Ne(this.settings.elements) && this.settings.elements.length && S(this.settings.elements, function(d, l) {
2466
- var h = new Ye(d, e, l), u = h.getConfig(), p = x({}, u);
2477
+ var h = new Ye(d, e, l), u = h.getConfig(), p = k({}, u);
2467
2478
  p.node = !1, p.index = l, p.instance = h, p.slideConfig = u, s.push(p);
2468
2479
  });
2469
2480
  var o = !1;
2470
2481
  return this.getSelector() && (o = document.querySelectorAll(this.getSelector())), o && S(o, function(d, l) {
2471
- var h = new Ye(d, e, l), u = h.getConfig(), p = x({}, u);
2482
+ var h = new Ye(d, e, l), u = h.getConfig(), p = k({}, u);
2472
2483
  p.node = d, p.index = l, p.instance = h, p.slideConfig = u, p.gallery = d.getAttribute("data-gallery"), s.push(p);
2473
2484
  }), s;
2474
2485
  } }, { key: "getGalleryElements", value: function(e, s) {
@@ -2532,12 +2543,12 @@ var Qt = { exports: {} };
2532
2543
  if (o) {
2533
2544
  var m = N(this.settings.plyr.config, "ratio") ? this.settings.plyr.config.ratio : "";
2534
2545
  if (!m) {
2535
- var E = o.clientWidth, _ = o.clientHeight, j = E / _;
2536
- m = "".concat(E / j, ":").concat(_ / j);
2546
+ var M = o.clientWidth, _ = o.clientHeight, j = M / _;
2547
+ m = "".concat(M / j, ":").concat(_ / j);
2537
2548
  }
2538
- var z = m.split(":"), I = this.settings.videosWidth, oe = this.settings.videosWidth, ae = (oe = Ue(I) || I.indexOf("px") !== -1 ? parseInt(I) : I.indexOf("vw") !== -1 ? h * parseInt(I) / 100 : I.indexOf("vh") !== -1 ? u * parseInt(I) / 100 : I.indexOf("%") !== -1 ? h * parseInt(I) / 100 : parseInt(o.clientWidth)) / (parseInt(z[0]) / parseInt(z[1]));
2539
- if (ae = Math.floor(ae), p && (u -= l.offsetHeight), oe > h || ae > u || u < ae && h > oe) {
2540
- var ye = o.offsetWidth, ve = o.offsetHeight, _e = u / ve, je = { width: ye * _e, height: ve * _e };
2549
+ var z = m.split(":"), I = this.settings.videosWidth, re = this.settings.videosWidth, ae = (re = Ue(I) || I.indexOf("px") !== -1 ? parseInt(I) : I.indexOf("vw") !== -1 ? h * parseInt(I) / 100 : I.indexOf("vh") !== -1 ? u * parseInt(I) / 100 : I.indexOf("%") !== -1 ? h * parseInt(I) / 100 : parseInt(o.clientWidth)) / (parseInt(z[0]) / parseInt(z[1]));
2550
+ if (ae = Math.floor(ae), p && (u -= l.offsetHeight), re > h || ae > u || u < ae && h > re) {
2551
+ var ve = o.offsetWidth, we = o.offsetHeight, _e = u / we, je = { width: ve * _e, height: we * _e };
2541
2552
  o.parentNode.setAttribute("style", "max-width: ".concat(je.width, "px")), p && l.setAttribute("style", "max-width: ".concat(je.width, "px;"));
2542
2553
  } else
2543
2554
  o.parentNode.style.maxWidth = "".concat(I), p && l.setAttribute("style", "max-width: ".concat(I, ";"));
@@ -2566,7 +2577,7 @@ var Qt = { exports: {} };
2566
2577
  return !1;
2567
2578
  this.closing = !0, this.slidePlayerPause(this.activeSlide), this.fullElementsList && (this.elements = this.fullElementsList), this.bodyHiddenChildElms.length && S(this.bodyHiddenChildElms, function(o) {
2568
2579
  o.removeAttribute("aria-hidden");
2569
- }), T(this.modal, "glightbox-closing"), M(this.overlay, this.settings.openEffect == "none" ? "none" : this.settings.cssEfects.fade.out), M(this.activeSlide, this.settings.cssEfects[this.settings.closeEffect].out, function() {
2580
+ }), T(this.modal, "glightbox-closing"), E(this.overlay, this.settings.openEffect == "none" ? "none" : this.settings.cssEfects.fade.out), E(this.activeSlide, this.settings.cssEfects[this.settings.closeEffect].out, function() {
2570
2581
  if (e.activeSlide = null, e.prevActiveSlideIndex = null, e.prevActiveSlide = null, e.built = !1, e.events) {
2571
2582
  for (var o in e.events)
2572
2583
  e.events.hasOwnProperty(o) && e.events[o].destroy();
@@ -2705,7 +2716,7 @@ at = ea([
2705
2716
  Y("cb-uploading")
2706
2717
  ], at);
2707
2718
  const Sc = U`
2708
- ${he}
2719
+ ${ue}
2709
2720
  :host {
2710
2721
  }
2711
2722
 
@@ -2784,15 +2795,15 @@ Ct([
2784
2795
  qe = Ct([
2785
2796
  Y("cb-external-link")
2786
2797
  ], qe);
2787
- const Ec = '<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>', Mc = '<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.803c.287 0 .531-.057.732-.173c.203-.117.358-.275.463-.474a1.42 1.42 0 0 0 .161-.677c0-.25-.053-.476-.158-.677a1.176 1.176 0 0 0-.46-.477c-.2-.12-.443-.179-.732-.179Zm.545 1.333a.795.795 0 0 1-.085.38a.574.574 0 0 1-.238.241a.794.794 0 0 1-.375.082H.788V12.48h.66c.218 0 .389.06.512.181c.123.122.185.296.185.522Zm1.217-1.333v3.999h1.46c.401 0 .734-.08.998-.237a1.45 1.45 0 0 0 .595-.689c.13-.3.196-.662.196-1.084c0-.42-.065-.778-.196-1.075a1.426 1.426 0 0 0-.589-.68c-.264-.156-.599-.234-1.005-.234H3.362Zm.791.645h.563c.248 0 .45.05.609.152a.89.89 0 0 1 .354.454c.079.201.118.452.118.753a2.3 2.3 0 0 1-.068.592a1.14 1.14 0 0 1-.196.422a.8.8 0 0 1-.334.252a1.298 1.298 0 0 1-.483.082h-.563v-2.707Zm3.743 1.763v1.591h-.79V11.85h2.548v.653H7.896v1.117h1.606v.638H7.896Z"/></svg>', Ac = '<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.459c.406 0 .741.078 1.005.234c.263.157.46.383.589.68c.13.297.196.655.196 1.075c0 .422-.066.784-.196 1.084c-.131.301-.33.53-.595.689c-.264.158-.597.237-1 .237H4.626Zm1.353-3.354h-.562v2.707h.562c.186 0 .347-.028.484-.082a.8.8 0 0 0 .334-.252a1.14 1.14 0 0 0 .196-.422c.045-.168.067-.365.067-.592a2.1 2.1 0 0 0-.117-.753a.89.89 0 0 0-.354-.454c-.159-.102-.362-.152-.61-.152Z"/></svg>', $c = '<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.823c.13.108.289.192.478.252c.19.061.411.091.665.091c.338 0 .624-.053.859-.158c.236-.105.416-.252.539-.44c.125-.189.187-.408.187-.656c0-.224-.045-.41-.134-.56a1.001 1.001 0 0 0-.375-.357a2.027 2.027 0 0 0-.566-.21l-.621-.144a.97.97 0 0 1-.404-.176a.37.37 0 0 1-.144-.299c0-.156.062-.284.185-.384c.125-.101.296-.152.512-.152c.143 0 .266.023.37.068a.624.624 0 0 1 .246.181a.56.56 0 0 1 .12.258h.75a1.092 1.092 0 0 0-.2-.566a1.21 1.21 0 0 0-.5-.41a1.813 1.813 0 0 0-.78-.152c-.293 0-.551.05-.776.15c-.225.099-.4.24-.527.421c-.127.182-.19.395-.19.639c0 .201.04.376.122.524c.082.149.2.27.352.367c.152.095.332.167.539.213l.618.144c.207.049.361.113.463.193a.387.387 0 0 1 .152.326a.505.505 0 0 1-.085.29a.559.559 0 0 1-.255.193c-.111.047-.249.07-.413.07c-.117 0-.223-.013-.32-.04a.838.838 0 0 1-.248-.115a.578.578 0 0 1-.255-.384h-.765ZM.806 13.693c0-.248.034-.46.102-.633a.868.868 0 0 1 .302-.399a.814.814 0 0 1 .475-.137c.15 0 .283.032.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.441 1.441 0 0 0-.489-.272a1.838 1.838 0 0 0-.606-.097c-.356 0-.66.074-.911.223c-.25.148-.44.359-.572.632c-.13.274-.196.6-.196.979v.498c0 .379.064.704.193.976c.131.271.322.48.572.626c.25.145.554.217.914.217c.293 0 .554-.055.785-.164c.23-.11.414-.26.55-.454a1.27 1.27 0 0 0 .226-.674v-.076h-.764a.799.799 0 0 1-.118.363a.7.7 0 0 1-.272.25a.874.874 0 0 1-.401.087a.845.845 0 0 1-.478-.132a.833.833 0 0 1-.299-.392a1.699 1.699 0 0 1-.102-.627v-.495Zm8.239 2.238h-.953l-1.338-3.999h.917l.896 3.138h.038l.888-3.138h.879l-1.327 4Z"/></svg>', 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-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.803c.287 0 .531-.057.732-.173c.203-.117.358-.275.463-.474a1.42 1.42 0 0 0 .161-.677c0-.25-.053-.476-.158-.677a1.176 1.176 0 0 0-.46-.477c-.2-.12-.443-.179-.732-.179Zm.545 1.333a.795.795 0 0 1-.085.38a.574.574 0 0 1-.238.241a.794.794 0 0 1-.375.082H.788V12.48h.66c.218 0 .389.06.512.181c.123.122.185.296.185.522Zm2.817-1.333h-1.6v3.999h.791v-1.342h.803c.287 0 .531-.057.732-.173c.203-.117.358-.275.463-.474c.108-.201.161-.427.161-.677c0-.25-.052-.476-.158-.677a1.176 1.176 0 0 0-.46-.477c-.2-.12-.443-.179-.732-.179Zm.545 1.333a.795.795 0 0 1-.085.38a.574.574 0 0 1-.238.241a.793.793 0 0 1-.375.082H4.15V12.48h.66c.218 0 .389.06.512.181c.123.122.185.296.185.522Zm2.767-.67v3.336H7.48v-3.337H6.346v-.662h3.065v.662H8.274Z"/></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 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.522c0 .256-.039.47-.117.641a.861.861 0 0 1-.322.387a.877.877 0 0 1-.469.126a.883.883 0 0 1-.471-.126a.868.868 0 0 1-.32-.386a1.55 1.55 0 0 1-.117-.642v-.522c0-.257.04-.471.117-.641a.868.868 0 0 1 .32-.387a.868.868 0 0 1 .471-.129c.176 0 .332.043.469.13a.861.861 0 0 1 .322.386c.078.17.117.384.117.641Zm.803.519v-.513c0-.377-.068-.7-.205-.972a1.46 1.46 0 0 0-.589-.63c-.254-.147-.56-.22-.917-.22c-.355 0-.662.073-.92.22a1.441 1.441 0 0 0-.589.627c-.136.271-.205.596-.205.975v.513c0 .375.069.7.205.973c.137.271.333.48.59.627c.257.144.564.216.92.216c.357 0 .662-.072.916-.216c.256-.147.452-.356.59-.627c.136-.274.204-.598.204-.973ZM0 11.926v4h1.459c.402 0 .735-.08.999-.238a1.45 1.45 0 0 0 .595-.689c.13-.3.196-.662.196-1.084c0-.42-.065-.778-.196-1.075a1.426 1.426 0 0 0-.59-.68c-.263-.156-.598-.234-1.004-.234H0Zm.791.645h.563c.248 0 .45.05.609.152a.89.89 0 0 1 .354.454c.079.201.118.452.118.753a2.3 2.3 0 0 1-.068.592a1.141 1.141 0 0 1-.196.422a.8.8 0 0 1-.334.252a1.298 1.298 0 0 1-.483.082H.79V12.57Zm7.422.483a1.732 1.732 0 0 0-.103.633v.495c0 .246.034.455.103.627a.834.834 0 0 0 .298.393a.845.845 0 0 0 .478.131a.868.868 0 0 0 .401-.088a.699.699 0 0 0 .273-.248a.8.8 0 0 0 .117-.364h.765v.076a1.268 1.268 0 0 1-.226.674c-.137.194-.32.345-.55.454a1.81 1.81 0 0 1-.786.164c-.36 0-.664-.072-.914-.216a1.424 1.424 0 0 1-.571-.627c-.13-.272-.194-.597-.194-.976v-.498c0-.379.066-.705.197-.978c.13-.274.321-.485.571-.633c.252-.149.556-.223.911-.223c.219 0 .421.032.607.097c.187.062.35.153.489.272a1.326 1.326 0 0 1 .466.964v.073H9.78a.85.85 0 0 0-.12-.38a.7.7 0 0 0-.273-.261a.802.802 0 0 0-.398-.097a.814.814 0 0 0-.475.138a.868.868 0 0 0-.301.398Z"/></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.54 1.54 0 0 0-.117-.641a.861.861 0 0 0-.322-.387a.862.862 0 0 0-.469-.129a.868.868 0 0 0-.471.13a.868.868 0 0 0-.32.386a1.54 1.54 0 0 0-.117.641v.522c0 .256.04.47.117.641a.868.868 0 0 0 .32.387a.883.883 0 0 0 .471.126a.877.877 0 0 0 .469-.126a.861.861 0 0 0 .322-.386a1.55 1.55 0 0 0 .117-.642Zm.803-.516v.513c0 .375-.068.7-.205.973a1.47 1.47 0 0 1-.589.627c-.254.144-.56.216-.917.216a1.86 1.86 0 0 1-.92-.216a1.463 1.463 0 0 1-.589-.627a2.151 2.151 0 0 1-.205-.973v-.513c0-.379.069-.704.205-.975c.137-.274.333-.483.59-.627c.257-.147.564-.22.92-.22c.357 0 .662.073.916.22c.256.146.452.356.59.63c.136.271.204.595.204.972M1 15.925v-3.999h1.459c.406 0 .741.078 1.005.235c.264.156.46.382.589.68c.13.296.196.655.196 1.074c0 .422-.065.784-.196 1.084c-.131.301-.33.53-.595.689c-.264.158-.597.237-.999.237H1Zm1.354-3.354H1.79v2.707h.563c.185 0 .346-.028.483-.082a.8.8 0 0 0 .334-.252c.088-.114.153-.254.196-.422a2.3 2.3 0 0 0 .068-.592c0-.3-.04-.552-.118-.753a.89.89 0 0 0-.354-.454c-.158-.102-.361-.152-.61-.152Zm6.756 1.116c0-.248.034-.46.103-.633a.868.868 0 0 1 .301-.398a.814.814 0 0 1 .475-.138c.15 0 .283.032.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.44 1.44 0 0 0-.49-.272a1.836 1.836 0 0 0-.606-.097c-.355 0-.66.074-.911.223c-.25.148-.44.359-.571.633c-.131.273-.197.6-.197.978v.498c0 .379.065.704.194.976c.13.271.321.48.571.627c.25.144.555.216.914.216c.293 0 .555-.054.785-.164c.23-.11.414-.26.551-.454a1.27 1.27 0 0 0 .226-.674v-.076h-.765a.8.8 0 0 1-.117.364a.699.699 0 0 1-.273.248a.874.874 0 0 1-.401.088a.845.845 0 0 1-.478-.131a.834.834 0 0 1-.298-.393a1.7 1.7 0 0 1-.103-.627v-.495Zm5.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.035l.823-1.439Z"/></svg>';
2798
+ const Mc = '<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>', Ec = '<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.803c.287 0 .531-.057.732-.173c.203-.117.358-.275.463-.474a1.42 1.42 0 0 0 .161-.677c0-.25-.053-.476-.158-.677a1.176 1.176 0 0 0-.46-.477c-.2-.12-.443-.179-.732-.179Zm.545 1.333a.795.795 0 0 1-.085.38a.574.574 0 0 1-.238.241a.794.794 0 0 1-.375.082H.788V12.48h.66c.218 0 .389.06.512.181c.123.122.185.296.185.522Zm1.217-1.333v3.999h1.46c.401 0 .734-.08.998-.237a1.45 1.45 0 0 0 .595-.689c.13-.3.196-.662.196-1.084c0-.42-.065-.778-.196-1.075a1.426 1.426 0 0 0-.589-.68c-.264-.156-.599-.234-1.005-.234H3.362Zm.791.645h.563c.248 0 .45.05.609.152a.89.89 0 0 1 .354.454c.079.201.118.452.118.753a2.3 2.3 0 0 1-.068.592a1.14 1.14 0 0 1-.196.422a.8.8 0 0 1-.334.252a1.298 1.298 0 0 1-.483.082h-.563v-2.707Zm3.743 1.763v1.591h-.79V11.85h2.548v.653H7.896v1.117h1.606v.638H7.896Z"/></svg>', Ac = '<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.459c.406 0 .741.078 1.005.234c.263.157.46.383.589.68c.13.297.196.655.196 1.075c0 .422-.066.784-.196 1.084c-.131.301-.33.53-.595.689c-.264.158-.597.237-1 .237H4.626Zm1.353-3.354h-.562v2.707h.562c.186 0 .347-.028.484-.082a.8.8 0 0 0 .334-.252a1.14 1.14 0 0 0 .196-.422c.045-.168.067-.365.067-.592a2.1 2.1 0 0 0-.117-.753a.89.89 0 0 0-.354-.454c-.159-.102-.362-.152-.61-.152Z"/></svg>', $c = '<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.823c.13.108.289.192.478.252c.19.061.411.091.665.091c.338 0 .624-.053.859-.158c.236-.105.416-.252.539-.44c.125-.189.187-.408.187-.656c0-.224-.045-.41-.134-.56a1.001 1.001 0 0 0-.375-.357a2.027 2.027 0 0 0-.566-.21l-.621-.144a.97.97 0 0 1-.404-.176a.37.37 0 0 1-.144-.299c0-.156.062-.284.185-.384c.125-.101.296-.152.512-.152c.143 0 .266.023.37.068a.624.624 0 0 1 .246.181a.56.56 0 0 1 .12.258h.75a1.092 1.092 0 0 0-.2-.566a1.21 1.21 0 0 0-.5-.41a1.813 1.813 0 0 0-.78-.152c-.293 0-.551.05-.776.15c-.225.099-.4.24-.527.421c-.127.182-.19.395-.19.639c0 .201.04.376.122.524c.082.149.2.27.352.367c.152.095.332.167.539.213l.618.144c.207.049.361.113.463.193a.387.387 0 0 1 .152.326a.505.505 0 0 1-.085.29a.559.559 0 0 1-.255.193c-.111.047-.249.07-.413.07c-.117 0-.223-.013-.32-.04a.838.838 0 0 1-.248-.115a.578.578 0 0 1-.255-.384h-.765ZM.806 13.693c0-.248.034-.46.102-.633a.868.868 0 0 1 .302-.399a.814.814 0 0 1 .475-.137c.15 0 .283.032.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.441 1.441 0 0 0-.489-.272a1.838 1.838 0 0 0-.606-.097c-.356 0-.66.074-.911.223c-.25.148-.44.359-.572.632c-.13.274-.196.6-.196.979v.498c0 .379.064.704.193.976c.131.271.322.48.572.626c.25.145.554.217.914.217c.293 0 .554-.055.785-.164c.23-.11.414-.26.55-.454a1.27 1.27 0 0 0 .226-.674v-.076h-.764a.799.799 0 0 1-.118.363a.7.7 0 0 1-.272.25a.874.874 0 0 1-.401.087a.845.845 0 0 1-.478-.132a.833.833 0 0 1-.299-.392a1.699 1.699 0 0 1-.102-.627v-.495Zm8.239 2.238h-.953l-1.338-3.999h.917l.896 3.138h.038l.888-3.138h.879l-1.327 4Z"/></svg>', 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-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.803c.287 0 .531-.057.732-.173c.203-.117.358-.275.463-.474a1.42 1.42 0 0 0 .161-.677c0-.25-.053-.476-.158-.677a1.176 1.176 0 0 0-.46-.477c-.2-.12-.443-.179-.732-.179Zm.545 1.333a.795.795 0 0 1-.085.38a.574.574 0 0 1-.238.241a.794.794 0 0 1-.375.082H.788V12.48h.66c.218 0 .389.06.512.181c.123.122.185.296.185.522Zm2.817-1.333h-1.6v3.999h.791v-1.342h.803c.287 0 .531-.057.732-.173c.203-.117.358-.275.463-.474c.108-.201.161-.427.161-.677c0-.25-.052-.476-.158-.677a1.176 1.176 0 0 0-.46-.477c-.2-.12-.443-.179-.732-.179Zm.545 1.333a.795.795 0 0 1-.085.38a.574.574 0 0 1-.238.241a.793.793 0 0 1-.375.082H4.15V12.48h.66c.218 0 .389.06.512.181c.123.122.185.296.185.522Zm2.767-.67v3.336H7.48v-3.337H6.346v-.662h3.065v.662H8.274Z"/></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 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.522c0 .256-.039.47-.117.641a.861.861 0 0 1-.322.387a.877.877 0 0 1-.469.126a.883.883 0 0 1-.471-.126a.868.868 0 0 1-.32-.386a1.55 1.55 0 0 1-.117-.642v-.522c0-.257.04-.471.117-.641a.868.868 0 0 1 .32-.387a.868.868 0 0 1 .471-.129c.176 0 .332.043.469.13a.861.861 0 0 1 .322.386c.078.17.117.384.117.641Zm.803.519v-.513c0-.377-.068-.7-.205-.972a1.46 1.46 0 0 0-.589-.63c-.254-.147-.56-.22-.917-.22c-.355 0-.662.073-.92.22a1.441 1.441 0 0 0-.589.627c-.136.271-.205.596-.205.975v.513c0 .375.069.7.205.973c.137.271.333.48.59.627c.257.144.564.216.92.216c.357 0 .662-.072.916-.216c.256-.147.452-.356.59-.627c.136-.274.204-.598.204-.973ZM0 11.926v4h1.459c.402 0 .735-.08.999-.238a1.45 1.45 0 0 0 .595-.689c.13-.3.196-.662.196-1.084c0-.42-.065-.778-.196-1.075a1.426 1.426 0 0 0-.59-.68c-.263-.156-.598-.234-1.004-.234H0Zm.791.645h.563c.248 0 .45.05.609.152a.89.89 0 0 1 .354.454c.079.201.118.452.118.753a2.3 2.3 0 0 1-.068.592a1.141 1.141 0 0 1-.196.422a.8.8 0 0 1-.334.252a1.298 1.298 0 0 1-.483.082H.79V12.57Zm7.422.483a1.732 1.732 0 0 0-.103.633v.495c0 .246.034.455.103.627a.834.834 0 0 0 .298.393a.845.845 0 0 0 .478.131a.868.868 0 0 0 .401-.088a.699.699 0 0 0 .273-.248a.8.8 0 0 0 .117-.364h.765v.076a1.268 1.268 0 0 1-.226.674c-.137.194-.32.345-.55.454a1.81 1.81 0 0 1-.786.164c-.36 0-.664-.072-.914-.216a1.424 1.424 0 0 1-.571-.627c-.13-.272-.194-.597-.194-.976v-.498c0-.379.066-.705.197-.978c.13-.274.321-.485.571-.633c.252-.149.556-.223.911-.223c.219 0 .421.032.607.097c.187.062.35.153.489.272a1.326 1.326 0 0 1 .466.964v.073H9.78a.85.85 0 0 0-.12-.38a.7.7 0 0 0-.273-.261a.802.802 0 0 0-.398-.097a.814.814 0 0 0-.475.138a.868.868 0 0 0-.301.398Z"/></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.54 1.54 0 0 0-.117-.641a.861.861 0 0 0-.322-.387a.862.862 0 0 0-.469-.129a.868.868 0 0 0-.471.13a.868.868 0 0 0-.32.386a1.54 1.54 0 0 0-.117.641v.522c0 .256.04.47.117.641a.868.868 0 0 0 .32.387a.883.883 0 0 0 .471.126a.877.877 0 0 0 .469-.126a.861.861 0 0 0 .322-.386a1.55 1.55 0 0 0 .117-.642Zm.803-.516v.513c0 .375-.068.7-.205.973a1.47 1.47 0 0 1-.589.627c-.254.144-.56.216-.917.216a1.86 1.86 0 0 1-.92-.216a1.463 1.463 0 0 1-.589-.627a2.151 2.151 0 0 1-.205-.973v-.513c0-.379.069-.704.205-.975c.137-.274.333-.483.59-.627c.257-.147.564-.22.92-.22c.357 0 .662.073.916.22c.256.146.452.356.59.63c.136.271.204.595.204.972M1 15.925v-3.999h1.459c.406 0 .741.078 1.005.235c.264.156.46.382.589.68c.13.296.196.655.196 1.074c0 .422-.065.784-.196 1.084c-.131.301-.33.53-.595.689c-.264.158-.597.237-.999.237H1Zm1.354-3.354H1.79v2.707h.563c.185 0 .346-.028.483-.082a.8.8 0 0 0 .334-.252c.088-.114.153-.254.196-.422a2.3 2.3 0 0 0 .068-.592c0-.3-.04-.552-.118-.753a.89.89 0 0 0-.354-.454c-.158-.102-.361-.152-.61-.152Zm6.756 1.116c0-.248.034-.46.103-.633a.868.868 0 0 1 .301-.398a.814.814 0 0 1 .475-.138c.15 0 .283.032.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.44 1.44 0 0 0-.49-.272a1.836 1.836 0 0 0-.606-.097c-.355 0-.66.074-.911.223c-.25.148-.44.359-.571.633c-.131.273-.197.6-.197.978v.498c0 .379.065.704.194.976c.13.271.321.48.571.627c.25.144.555.216.914.216c.293 0 .555-.054.785-.164c.23-.11.414-.26.551-.454a1.27 1.27 0 0 0 .226-.674v-.076h-.765a.8.8 0 0 1-.117.364a.699.699 0 0 1-.273.248a.874.874 0 0 1-.401.088a.845.845 0 0 1-.478-.131a.834.834 0 0 1-.298-.393a1.7 1.7 0 0 1-.103-.627v-.495Zm5.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.035l.823-1.439Z"/></svg>';
2788
2799
  var Oc = Object.defineProperty, Pc = Object.getOwnPropertyDescriptor, St = (a, t, c, i) => {
2789
2800
  for (var n = i > 1 ? void 0 : i ? Pc(t, c) : t, f = a.length - 1, b; f >= 0; f--)
2790
2801
  (b = a[f]) && (n = (i ? b(t, c, n) : b(n)) || n);
2791
2802
  return i && n && Oc(t, c, n), n;
2792
2803
  };
2793
2804
  const Ht = {
2794
- pdf: Mc,
2795
- txt: Ec,
2805
+ pdf: Ec,
2806
+ txt: Mc,
2796
2807
  md: Ac,
2797
2808
  csv: $c,
2798
2809
  ppd: Ic,
@@ -4005,7 +4016,7 @@ const zc = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="curr
4005
4016
  background-color: #282c34;
4006
4017
  }
4007
4018
  `, qc = U`
4008
- ${he}
4019
+ ${ue}
4009
4020
  ${Bc}
4010
4021
 
4011
4022
  .cb-message-row {
@@ -4273,12 +4284,12 @@ let $e = class extends Q {
4273
4284
  });
4274
4285
  }
4275
4286
  render() {
4276
- return ue(
4287
+ return ge(
4277
4288
  this.message.data || this.message.isThinking,
4278
4289
  () => w`
4279
4290
  <div class="cb-message-row" part="cb-message-row">
4280
4291
  <!-- message -->
4281
- ${ue(
4292
+ ${ge(
4282
4293
  this._isBot,
4283
4294
  () => this.renderBotMessage(this.message),
4284
4295
  () => this.renderUserMessage(this.message)
@@ -4315,7 +4326,7 @@ let $e = class extends Q {
4315
4326
  renderMessageContent(a) {
4316
4327
  var t;
4317
4328
  return a.isThinking ? w`<cb-thinking></cb-thinking>` : a.isUploading ? w`<cb-uploading .files="${a.data.files || []}"></cb-uploading>` : a.type === "text" ? w`<div class="cb-message-text">
4318
- ${ue(
4329
+ ${ge(
4319
4330
  a.data.userName,
4320
4331
  () => w`<div style="font-size: 12px; color:#9ca3af">${a.data.userName}</div>`,
4321
4332
  () => null
@@ -4337,9 +4348,9 @@ let $e = class extends Q {
4337
4348
  var t;
4338
4349
  if (a.data.userName && a.data.userName !== "") {
4339
4350
  const c = ((t = a.data) == null ? void 0 : t.userAvatar) || "";
4340
- return c !== "" ? w` <img src="${c}" style="width: 24px;height: 24px;" /> ` : He`${ke(k.setting.agentIconSvg)}`;
4351
+ return c !== "" ? w` <img src="${c}" style="width: 24px;height: 24px;" /> ` : He`${ke(x.setting.agentIconSvg)}`;
4341
4352
  }
4342
- return a.author === "system" ? He`${ke(k.setting.systemIconSvg)}` : He`${ke(k.setting.botIconSvg)}`;
4353
+ return a.author === "system" ? He`${ke(x.setting.systemIconSvg)}` : He`${ke(x.setting.botIconSvg)}`;
4343
4354
  }
4344
4355
  renderBotMessage(a) {
4345
4356
  return w`
@@ -4355,7 +4366,7 @@ let $e = class extends Q {
4355
4366
  <!--<sl-avatar class="avatar user-avatar small" label="User">
4356
4367
  <cb-icon slot="icon" svg="${Hc}" color="white"></cb-icon>
4357
4368
  </sl-avatar>-->
4358
- <div class="avatar user-avatar">${ke(k.setting.userIconSvg)}</div>
4369
+ <div class="avatar user-avatar">${ke(x.setting.userIconSvg)}</div>
4359
4370
  ${this.renderMessage(a)}
4360
4371
  </div>
4361
4372
  `;
@@ -4377,13 +4388,13 @@ Ve([
4377
4388
  $e = Ve([
4378
4389
  Y("cb-message")
4379
4390
  ], $e);
4380
- var Fc = Object.defineProperty, Nc = Object.getOwnPropertyDescriptor, ge = (a, t, c, i) => {
4391
+ var Fc = Object.defineProperty, Nc = Object.getOwnPropertyDescriptor, me = (a, t, c, i) => {
4381
4392
  for (var n = i > 1 ? void 0 : i ? Nc(t, c) : t, f = a.length - 1, b; f >= 0; f--)
4382
4393
  (b = a[f]) && (n = (i ? b(t, c, n) : b(n)) || n);
4383
4394
  return i && n && Fc(t, c, n), n;
4384
4395
  };
4385
- const xe = ft.noConflict();
4386
- xe.setLevel("info");
4396
+ const pe = ft.noConflict();
4397
+ pe.setLevel("info");
4387
4398
  let fe = class extends Q {
4388
4399
  constructor() {
4389
4400
  super(...arguments), this.messages = [], this.actions = [], this.form = null, this.calendlyInjected = !1, this.activeCalendlyAction = -1, this.hubspotMeetingInjected = !1, this.activeHubspotMeetingAction = -1;
@@ -4415,7 +4426,7 @@ let fe = class extends Q {
4415
4426
  this.form.fields,
4416
4427
  (a, t) => t,
4417
4428
  (a) => {
4418
- const t = (a == null ? void 0 : a.required) || !1, c = k.getPrefilledFormFieldValue(a.name);
4429
+ const t = (a == null ? void 0 : a.required) || !1, c = x.getPrefilledFormFieldValue(a.name);
4419
4430
  switch (a.type) {
4420
4431
  case "string":
4421
4432
  return w`<sl-input value="${c}" class="cb-input-form-input" id="${"cb-form-field" + a.name}" name="${a.name}" label="${a.title}" ?required="${t}"></sl-input>`;
@@ -4449,14 +4460,14 @@ let fe = class extends Q {
4449
4460
  return;
4450
4461
  }
4451
4462
  }
4452
- k.submitForm(t).then(() => {
4453
- xe.info("Form submitted", t), this.emit("form:submit", {
4463
+ x.submitForm(t).then(() => {
4464
+ pe.info("Form submitted", t), this.emit("form:submit", {
4454
4465
  detail: {
4455
4466
  formData: t
4456
4467
  }
4457
4468
  });
4458
4469
  }).catch((c) => {
4459
- xe.error(`Error when submitting form: ${c.message}`);
4470
+ pe.error(`Error when submitting form: ${c.message}`);
4460
4471
  });
4461
4472
  }
4462
4473
  /* Form sample
@@ -4496,18 +4507,18 @@ let fe = class extends Q {
4496
4507
  return null;
4497
4508
  }
4498
4509
  handleCalendlyEvent(a) {
4499
- switch (xe.info("Got Calendly Event:", a.data), a.data.event) {
4510
+ switch (pe.info("Got Calendly Event:", a.data), a.data.event) {
4500
4511
  case "calendly.event_scheduled": {
4501
4512
  const t = this.activeCalendlyAction;
4502
- t >= 0 && (k.removeAction(t), k.addSystemMessage("Your meeting has been scheduled!"), this.activeCalendlyAction = -1);
4513
+ t >= 0 && (x.removeAction(t), x.addSystemMessage("Your meeting has been scheduled!"), this.activeCalendlyAction = -1);
4503
4514
  }
4504
4515
  }
4505
4516
  }
4506
4517
  invokeLinkAction(a = {}) {
4507
- xe.info("invokeLinkAction:", a), window.open(a.url, "_blank");
4518
+ pe.info("invokeLinkAction:", a), window.open(a.url, "_blank");
4508
4519
  }
4509
4520
  invokeCalendlyAction(a = {}) {
4510
- return xe.info("invokeCalendlyAction:", a), "Calendly" in window && (this.activeCalendlyAction = a.internalId, window.Calendly.initPopupWidget({ url: a.url })), !1;
4521
+ return pe.info("invokeCalendlyAction:", a), "Calendly" in window && (this.activeCalendlyAction = a.internalId, window.Calendly.initPopupWidget({ url: a.url })), !1;
4511
4522
  }
4512
4523
  renderCalendlyAction(a) {
4513
4524
  if (!("Calendly" in window) && !this.calendlyInjected) {
@@ -4551,23 +4562,30 @@ let fe = class extends Q {
4551
4562
  `;
4552
4563
  }
4553
4564
  invokeHubspotMeetingAction(a = {}) {
4554
- var t, c;
4555
- if (xe.info("invokeHubspotMeetingAction:", a), "hbspt" in window && typeof ((c = (t = window.hbspt) == null ? void 0 : t.meetings) == null ? void 0 : c.create) == "function") {
4556
- const i = document.getElementById("enegelai-bot-hubspot-meeting-container"), n = document.querySelector(".enegelai-bot-hubspot-meeting-widget");
4557
- if (i && n) {
4558
- const f = a.url + "?embed=true";
4559
- n.setAttribute("data-src", f), this.activeHubspotMeetingAction = a.internalId, i.style.display = "block", window.hbspt.meetings.create(".enegelai-bot-hubspot-meeting-widget");
4565
+ var c, i;
4566
+ const t = Date.now();
4567
+ if (this.activeHubspotMeetingAction !== -1) {
4568
+ pe.info(`invokeHubspotMeetingAction: action ${this.activeHubspotMeetingAction} is already active - ignored`);
4569
+ return;
4570
+ }
4571
+ if (pe.info("invokeHubspotMeetingAction:", a), "hbspt" in window && typeof ((i = (c = window.hbspt) == null ? void 0 : c.meetings) == null ? void 0 : i.create) == "function") {
4572
+ const n = document.getElementById("enegelai-bot-hubspot-meeting-container"), f = document.querySelector(".enegelai-bot-hubspot-meeting-widget");
4573
+ if (n && f) {
4574
+ const b = a.url + "?embed=true";
4575
+ f.setAttribute("data-src", b), this.activeHubspotMeetingAction = a.internalId, n.style.display = "block", window.hbspt.meetings.create(".enegelai-bot-hubspot-meeting-widget"), x.updateAction(a, {
4576
+ triggered: t
4577
+ });
4560
4578
  }
4561
4579
  }
4562
4580
  return !1;
4563
4581
  }
4564
4582
  handleHubspotEvent(a) {
4565
4583
  var i;
4566
- if (xe.info("Got Hubspot Event:", a.data), !(((i = a == null ? void 0 : a.data) == null ? void 0 : i.meetingBookSucceeded) || !1))
4584
+ if (pe.info("Got Hubspot Event:", a.data), !(((i = a == null ? void 0 : a.data) == null ? void 0 : i.meetingBookSucceeded) || !1))
4567
4585
  return;
4568
4586
  const c = this.activeHubspotMeetingAction;
4569
4587
  if (c >= 0) {
4570
- k.removeAction(c), k.addSystemMessage("Your meeting has been scheduled!"), this.activeHubspotMeetingAction = -1;
4588
+ x.removeAction(c), x.addSystemMessage("Your meeting has been scheduled!"), this.activeHubspotMeetingAction = -1;
4571
4589
  const n = document.getElementById("enegelai-bot-hubspot-meeting-container");
4572
4590
  n && (n.style.display = "none");
4573
4591
  }
@@ -4582,8 +4600,8 @@ let fe = class extends Q {
4582
4600
  const t = document.createElement("script");
4583
4601
  t.src = "https://static.hsappstatic.net/MeetingsEmbed/ex/MeetingsEmbedCode.js", document.getElementsByTagName("head")[0].appendChild(t);
4584
4602
  let c = document.createElement("div");
4585
- c.innerHTML = `<div id="enegelai-bot-hubspot-meeting-container" style="display:none;position:fixed;top:0;left:0;z-index:10100;width: 100%;height: 100vh;background-color: rgba(0,0,0,0.5)">
4586
- <div style="max-width: 850px; margin: 10px auto 0 auto; text-align: right;">
4603
+ c.innerHTML = `<div id="enegelai-bot-hubspot-meeting-container" style="display:none;position:fixed;top:0;left:0;z-index:10100;width: 100%;height: 100vh;background-color: rgba(0,0,0,0.6)">
4604
+ <div style="display:flex;align-items: center;justify-content:end;max-width: 850px; margin: 10px auto 0 auto;">
4587
4605
  <svg id="enegelai-bot-hubspot-meeting-cancel" style="cursor:pointer;color: black;padding: 4px 4px;border-radius: 9999px;background-color: white;" xmlns="http://www.w3.org/2000/svg" width="32px" height="32px" viewBox="0 0 24 24"><path fill="currentColor" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" /></svg>
4588
4606
  </div>
4589
4607
  <div class="enegelai-bot-hubspot-meeting-widget"></div>
@@ -4596,7 +4614,9 @@ let fe = class extends Q {
4596
4614
  this.handleHubspotMeetingCancel();
4597
4615
  }), this.hubspotMeetingInjected = !0;
4598
4616
  }
4599
- return w`
4617
+ return a != null && a.hubspotMeetingAuto && !("triggered" in a) && setTimeout(() => {
4618
+ this.invokeHubspotMeetingAction(a);
4619
+ }, 500), w`
4600
4620
  <div class="cb-actions-list">
4601
4621
  <div class="cb-action ripple" @click="${this.invokeHubspotMeetingAction.bind(this, a)}">
4602
4622
  <div class="cb-action-icon">
@@ -4614,35 +4634,35 @@ let fe = class extends Q {
4614
4634
  }
4615
4635
  };
4616
4636
  fe.styles = gc;
4617
- ge([
4637
+ me([
4618
4638
  C({ type: Array })
4619
4639
  ], fe.prototype, "messages", 2);
4620
- ge([
4640
+ me([
4621
4641
  C({ type: Array })
4622
4642
  ], fe.prototype, "actions", 2);
4623
- ge([
4643
+ me([
4624
4644
  C({ type: Object })
4625
4645
  ], fe.prototype, "form", 2);
4626
- ge([
4646
+ me([
4627
4647
  De("#cb-message-list-bottom-anchor")
4628
4648
  ], fe.prototype, "_messageListBottomAnchor", 2);
4629
- ge([
4649
+ me([
4630
4650
  De(".cb-input-form")
4631
4651
  ], fe.prototype, "_inputForm", 2);
4632
- ge([
4652
+ me([
4633
4653
  xt({ capture: !1, passive: !0 })
4634
4654
  ], fe.prototype, "invokeLinkAction", 1);
4635
- ge([
4655
+ me([
4636
4656
  xt({ capture: !1, passive: !0 })
4637
4657
  ], fe.prototype, "invokeCalendlyAction", 1);
4638
- ge([
4658
+ me([
4639
4659
  xt({ capture: !1, passive: !0 })
4640
4660
  ], fe.prototype, "invokeHubspotMeetingAction", 1);
4641
- fe = ge([
4661
+ fe = me([
4642
4662
  Y("cb-message-list")
4643
4663
  ], fe);
4644
4664
  const Uc = U`
4645
- ${he}
4665
+ ${ue}
4646
4666
 
4647
4667
  :host {
4648
4668
  width: 100%;
@@ -4685,7 +4705,7 @@ const Uc = U`
4685
4705
  padding: 0 5px;
4686
4706
  }
4687
4707
  `, Wc = '<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.76l7.494-7.493Z"/></svg>', Yc = '<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>';
4688
- var Xc = Object.defineProperty, Zc = Object.getOwnPropertyDescriptor, me = (a, t, c, i) => {
4708
+ var Xc = Object.defineProperty, Zc = Object.getOwnPropertyDescriptor, ye = (a, t, c, i) => {
4689
4709
  for (var n = i > 1 ? void 0 : i ? Zc(t, c) : t, f = a.length - 1, b; f >= 0; f--)
4690
4710
  (b = a[f]) && (n = (i ? b(t, c, n) : b(n)) || n);
4691
4711
  return i && n && Xc(t, c, n), n;
@@ -4746,7 +4766,7 @@ let de = class extends Q {
4746
4766
  ></sl-textarea>
4747
4767
 
4748
4768
  <span class="cb-input-buttons">
4749
- ${ue(
4769
+ ${ge(
4750
4770
  this.enableFileUpload,
4751
4771
  () => w`
4752
4772
  <sl-button @click=${this._sendFileHandler} name="paperclip" label="Attachment" size="large" class="paperclip-button" variant="text" circle>
@@ -4769,35 +4789,35 @@ let de = class extends Q {
4769
4789
  }
4770
4790
  };
4771
4791
  de.styles = Uc;
4772
- me([
4792
+ ye([
4773
4793
  C({ type: String, attribute: "placeholder" })
4774
4794
  ], de.prototype, "placeholder", 2);
4775
- me([
4795
+ ye([
4776
4796
  C({ type: String, attribute: "send-button-label" })
4777
4797
  ], de.prototype, "sendButtonLabel", 2);
4778
- me([
4798
+ ye([
4779
4799
  C({ type: Boolean, attribute: "enable-file-upload" })
4780
4800
  ], de.prototype, "enableFileUpload", 2);
4781
- me([
4801
+ ye([
4782
4802
  C({ type: String })
4783
4803
  ], de.prototype, "value", 2);
4784
- me([
4804
+ ye([
4785
4805
  C({ type: Boolean })
4786
4806
  ], de.prototype, "loading", 2);
4787
- me([
4807
+ ye([
4788
4808
  C({ type: Boolean })
4789
4809
  ], de.prototype, "disabled", 2);
4790
- me([
4810
+ ye([
4791
4811
  C({ type: String })
4792
4812
  ], de.prototype, "currentKey", 2);
4793
- me([
4813
+ ye([
4794
4814
  De("sl-textarea")
4795
4815
  ], de.prototype, "inputElement", 2);
4796
- de = me([
4816
+ de = ye([
4797
4817
  Y("cb-user-input")
4798
4818
  ], de);
4799
4819
  const Gc = U`
4800
- ${he}
4820
+ ${ue}
4801
4821
 
4802
4822
  sl-dialog::part(base) {
4803
4823
  z-index: 1000;
@@ -5050,7 +5070,7 @@ let Ce = class extends Q {
5050
5070
  Enable it for your own backend.
5051
5071
  </sl-switch>
5052
5072
  </div> -->
5053
- ${ue(
5073
+ ${ge(
5054
5074
  this.customRequest,
5055
5075
  () => null,
5056
5076
  () => this.renderInternalServices()
@@ -5194,7 +5214,7 @@ Ce = Pe([
5194
5214
  Y("cb-setting")
5195
5215
  ], Ce);
5196
5216
  const ii = U`
5197
- ${he}
5217
+ ${ue}
5198
5218
  :host {
5199
5219
  --primary-color: var(--sl-color-primary-600);
5200
5220
 
@@ -5296,7 +5316,7 @@ var si = Object.defineProperty, oi = Object.getOwnPropertyDescriptor, aa = (a, t
5296
5316
  };
5297
5317
  let it = class extends Q {
5298
5318
  constructor() {
5299
- super(...arguments), this.store = new Wt(this, k), this.open = !1;
5319
+ super(...arguments), this.store = new Wt(this, x), this.open = !1;
5300
5320
  }
5301
5321
  // handler click
5302
5322
  _clickHandler() {
@@ -5308,14 +5328,14 @@ let it = class extends Q {
5308
5328
  }), this.open = a;
5309
5329
  }
5310
5330
  _engageClickHandler(a) {
5311
- console.log("engage close clicked!"), k.suppressEngagePopup(), a.stopPropagation();
5331
+ console.log("engage close clicked!"), x.suppressEngagePopup(), a.stopPropagation();
5312
5332
  }
5313
5333
  render() {
5314
5334
  return w`
5315
5335
  <div class="cb-anchor ${this.open ? "open" : ""}" part="cb-anchor" @click=${this._clickHandler.bind(this)}>
5316
- <sl-popup placement="top-end" distance="16" ?active="${k.engage && !k.open}">
5336
+ <sl-popup placement="top-end" distance="16" ?active="${x.engage && !x.open}">
5317
5337
  <sl-button slot="anchor" label="Start" size="large" variant="primary" class="icon anchor-button" circle>
5318
- ${ue(
5338
+ ${ge(
5319
5339
  this.open,
5320
5340
  () => w`<cb-icon color="white" svg="${et}"></cb-icon>`,
5321
5341
  () => w`<cb-icon color="white" svg="${ni}"></cb-icon>`
@@ -5324,13 +5344,13 @@ let it = class extends Q {
5324
5344
  <div class="cb-engage-popup">
5325
5345
  <div class="cb-engage-popup-close" @click=${this._engageClickHandler.bind(this)}>${He`${ke(et)}`}</div>
5326
5346
  <div class="cb-engage-popup-content">
5327
- ${ue(
5328
- k.setting.logoUrl !== "",
5329
- () => w`<img class="cb-engage-popup-img" src="${k.setting.logoUrl}" />`,
5330
- () => w`<div class="cb-engage-popup-logo">${He`${ke(k.setting.logoSvg)}`}</div>`
5347
+ ${ge(
5348
+ x.setting.logoUrl !== "",
5349
+ () => w`<img class="cb-engage-popup-img" src="${x.setting.logoUrl}" />`,
5350
+ () => w`<div class="cb-engage-popup-logo">${He`${ke(x.setting.logoSvg)}`}</div>`
5331
5351
  )}
5332
- <!--<cb-icon class="cb-engage-popup-logo" svg="${k.setting.logoSvg}"></cb-icon>-->
5333
- <div>${k.setting.engageMessage}</div>
5352
+ <!--<cb-icon class="cb-engage-popup-logo" svg="${x.setting.logoSvg}"></cb-icon>-->
5353
+ <div>${x.setting.engageMessage}</div>
5334
5354
  </div>
5335
5355
  </div>
5336
5356
  </sl-popup>
@@ -5346,7 +5366,7 @@ it = aa([
5346
5366
  Y("cb-anchor")
5347
5367
  ], it);
5348
5368
  const ri = U`
5349
- ${he}
5369
+ ${ue}
5350
5370
  `, qt = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M4.54.146A.5.5 0 0 1 4.893 0h6.214a.5.5 0 0 1 .353.146l4.394 4.394a.5.5 0 0 1 .146.353v6.214a.5.5 0 0 1-.146.353l-4.394 4.394a.5.5 0 0 1-.353.146H4.893a.5.5 0 0 1-.353-.146L.146 11.46A.5.5 0 0 1 0 11.107V4.893a.5.5 0 0 1 .146-.353L4.54.146zM5.1 1L1 5.1v5.8L5.1 15h5.8l4.1-4.1V5.1L10.9 1z"/><path d="M7.002 11a1 1 0 1 1 2 0a1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0z"/></g></svg>', fi = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M7.938 2.016A.13.13 0 0 1 8.002 2a.13.13 0 0 1 .063.016a.146.146 0 0 1 .054.057l6.857 11.667c.036.06.035.124.002.183a.163.163 0 0 1-.054.06a.116.116 0 0 1-.066.017H1.146a.115.115 0 0 1-.066-.017a.163.163 0 0 1-.054-.06a.176.176 0 0 1 .002-.183L7.884 2.073a.147.147 0 0 1 .054-.057zm1.044-.45a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566z"/><path d="M7.002 12a1 1 0 1 1 2 0a1 1 0 0 1-2 0zM7.1 5.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0z"/></g></svg>', di = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M2.5 8a5.5 5.5 0 0 1 8.25-4.764a.5.5 0 0 0 .5-.866A6.5 6.5 0 1 0 14.5 8a.5.5 0 0 0-1 0a5.5 5.5 0 1 1-11 0"/><path d="M15.354 3.354a.5.5 0 0 0-.708-.708L8 9.293L5.354 6.646a.5.5 0 1 0-.708.708l3 3a.5.5 0 0 0 .708 0l7-7z"/></g></svg>', li = '<svg viewBox="0 0 16 16" width="1.2em" height="1.2em" ><g fill="currentColor"><path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14m0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16"/><path d="m8.93 6.588l-2.29.287l-.082.38l.45.083c.294.07.352.176.288.469l-.738 3.468c-.194.897.105 1.319.808 1.319c.545 0 1.178-.252 1.465-.598l.088-.416c-.2.176-.492.246-.686.246c-.275 0-.375-.193-.304-.533zM9 4.5a1 1 0 1 1-2 0a1 1 0 0 1 2 0"/></g></svg>';
5351
5371
  var bi = Object.defineProperty, hi = Object.getOwnPropertyDescriptor, ca = (a, t, c, i) => {
5352
5372
  for (var n = i > 1 ? void 0 : i ? hi(t, c) : t, f = a.length - 1, b; f >= 0; f--)
@@ -5418,8 +5438,8 @@ vt = gi([
5418
5438
  ], vt);
5419
5439
  class Dt extends Error {
5420
5440
  constructor(t, c, i) {
5421
- const n = t.status || t.status === 0 ? t.status : "", f = t.statusText || "", b = `${n} ${f}`.trim(), x = b ? `status code ${b}` : "an unknown error";
5422
- super(`Request failed with ${x}`), Object.defineProperty(this, "response", {
5441
+ const n = t.status || t.status === 0 ? t.status : "", f = t.statusText || "", b = `${n} ${f}`.trim(), k = b ? `status code ${b}` : "an unknown error";
5442
+ super(`Request failed with ${k}`), Object.defineProperty(this, "response", {
5423
5443
  enumerable: !0,
5424
5444
  configurable: !0,
5425
5445
  writable: !0,
@@ -5518,14 +5538,14 @@ async function Ti(a, t, c) {
5518
5538
  });
5519
5539
  });
5520
5540
  }
5521
- const Ei = !!globalThis.DOMException;
5541
+ const Mi = !!globalThis.DOMException;
5522
5542
  function Ft(a) {
5523
- if (Ei)
5543
+ if (Mi)
5524
5544
  return new DOMException((a == null ? void 0 : a.reason) ?? "The operation was aborted.", "AbortError");
5525
5545
  const t = new Error((a == null ? void 0 : a.reason) ?? "The operation was aborted.");
5526
5546
  return t.name = "AbortError", t;
5527
5547
  }
5528
- async function Mi(a, { signal: t }) {
5548
+ async function Ei(a, { signal: t }) {
5529
5549
  return new Promise((c, i) => {
5530
5550
  if (t) {
5531
5551
  if (t.aborted) {
@@ -5549,13 +5569,13 @@ class st {
5549
5569
  if (i._options.timeout > pt)
5550
5570
  throw new RangeError(`The \`timeout\` option cannot be greater than ${pt}`);
5551
5571
  await Promise.resolve();
5552
- let x = await i._fetch();
5572
+ let k = await i._fetch();
5553
5573
  for (const S of i._options.hooks.afterResponse) {
5554
- const V = await S(i.request, i._options, i._decorateResponse(x.clone()));
5555
- V instanceof globalThis.Response && (x = V);
5574
+ const V = await S(i.request, i._options, i._decorateResponse(k.clone()));
5575
+ V instanceof globalThis.Response && (k = V);
5556
5576
  }
5557
- if (i._decorateResponse(x), !x.ok && i._options.throwHttpErrors) {
5558
- let S = new Dt(x, i.request, i._options);
5577
+ if (i._decorateResponse(k), !k.ok && i._options.throwHttpErrors) {
5578
+ let S = new Dt(k, i.request, i._options);
5559
5579
  for (const V of i._options.hooks.beforeError)
5560
5580
  S = await V(S);
5561
5581
  throw S;
@@ -5565,21 +5585,21 @@ class st {
5565
5585
  throw new TypeError("The `onDownloadProgress` option must be a function");
5566
5586
  if (!vi)
5567
5587
  throw new Error("Streams are not supported in your environment. `ReadableStream` is missing.");
5568
- return i._stream(x.clone(), i._options.onDownloadProgress);
5588
+ return i._stream(k.clone(), i._options.onDownloadProgress);
5569
5589
  }
5570
- return x;
5590
+ return k;
5571
5591
  }, b = i._options.retry.methods.includes(i.request.method.toLowerCase()) ? i._retry(n) : n();
5572
- for (const [x, S] of Object.entries(xi))
5573
- b[x] = async () => {
5592
+ for (const [k, S] of Object.entries(xi))
5593
+ b[k] = async () => {
5574
5594
  i.request.headers.set("accept", i.request.headers.get("accept") || S);
5575
5595
  const L = (await b).clone();
5576
- if (x === "json") {
5596
+ if (k === "json") {
5577
5597
  if (L.status === 204 || (await L.clone().arrayBuffer()).byteLength === 0)
5578
5598
  return "";
5579
5599
  if (c.parseJson)
5580
5600
  return c.parseJson(await L.text());
5581
5601
  }
5582
- return L[x]();
5602
+ return L[k]();
5583
5603
  };
5584
5604
  return b;
5585
5605
  }
@@ -5677,7 +5697,7 @@ class st {
5677
5697
  } catch (c) {
5678
5698
  const i = Math.min(this._calculateRetryDelay(c), pt);
5679
5699
  if (i !== 0 && this._retryCount > 0) {
5680
- await Mi(i, { signal: this._options.signal });
5700
+ await Ei(i, { signal: this._options.signal });
5681
5701
  for (const n of this._options.hooks.beforeRetry)
5682
5702
  if (await n({
5683
5703
  request: this.request,
@@ -5715,7 +5735,7 @@ class st {
5715
5735
  async start(f) {
5716
5736
  const b = t.body.getReader();
5717
5737
  c && c({ percent: 0, transferredBytes: 0, totalBytes: i }, new Uint8Array());
5718
- async function x() {
5738
+ async function k() {
5719
5739
  const { done: S, value: V } = await b.read();
5720
5740
  if (S) {
5721
5741
  f.close();
@@ -5726,9 +5746,9 @@ class st {
5726
5746
  const L = i === 0 ? 0 : n / i;
5727
5747
  c({ percent: L, transferredBytes: n, totalBytes: i }, V);
5728
5748
  }
5729
- f.enqueue(V), await x();
5749
+ f.enqueue(V), await k();
5730
5750
  }
5731
- await x();
5751
+ await k();
5732
5752
  }
5733
5753
  }), {
5734
5754
  status: t.status,
@@ -5752,17 +5772,17 @@ const wt = (a) => {
5752
5772
  }
5753
5773
  });
5754
5774
  async function Li(a, t) {
5755
- const { onmessage: c, onclose: i, ...n } = t, f = async (b, x) => {
5756
- const { value: S, done: V } = await x.read();
5757
- V ? (b.close(), i == null || i()) : (c == null || c(S), b.enqueue(S), f(b, x));
5775
+ const { onmessage: c, onclose: i, ...n } = t, f = async (b, k) => {
5776
+ const { value: S, done: V } = await k.read();
5777
+ V ? (b.close(), i == null || i()) : (c == null || c(S), b.enqueue(S), f(b, k));
5758
5778
  };
5759
5779
  return n.body && typeof n.body == "object" && (n.body = JSON.stringify(n.body)), console.log("Fetching:", n), fetch(a, n).then((b) => {
5760
- const x = b.body.getReader();
5780
+ const k = b.body.getReader();
5761
5781
  return new ReadableStream({
5762
5782
  start(V) {
5763
5783
  f(
5764
5784
  V,
5765
- x
5785
+ k
5766
5786
  );
5767
5787
  }
5768
5788
  });
@@ -5798,7 +5818,7 @@ const ze = ft.noConflict();
5798
5818
  ze.setLevel("info");
5799
5819
  let H = class extends Q {
5800
5820
  constructor() {
5801
- super(...arguments), this.store = new Wt(this, k), this.displayLicense = !1, this.name = "ChatBot", this.orgId = "", this.botId = "", this.url = "ws://localhost:3070", this.logoUrl = "", this.logoSvg = ` <svg width="24" height="24" viewBox="0 0 40 40">
5821
+ super(...arguments), this.store = new Wt(this, x), this.displayLicense = !1, this.name = "ChatBot", this.orgId = "", this.botId = "", this.url = "ws://localhost:3070", this.logoUrl = "", this.logoSvg = ` <svg width="24" height="24" viewBox="0 0 40 40">
5802
5822
  <path
5803
5823
  d="M34.728 0.275L2.245 15.267c-3.748 1.749 -2.498 7.246 1.499 7.246h13.743v13.743c0 3.998 5.497 5.248 7.246 1.499l14.992 -32.483c1.249 -2.999 -1.999 -6.248 -4.998 -4.998z"
5804
5824
  fill="#E24D42"
@@ -5820,7 +5840,7 @@ let H = class extends Q {
5820
5840
  isThinking: !0,
5821
5841
  data: {}
5822
5842
  };
5823
- return k.addMessage(a), a;
5843
+ return x.addMessage(a), a;
5824
5844
  }
5825
5845
  addTestMessage(a = "") {
5826
5846
  const c = {
@@ -5831,23 +5851,23 @@ let H = class extends Q {
5831
5851
  text: a !== "" ? a : "Long text.The element may not be scrolled completely to the top or bottom depending on the layout of other elements.The element may not be scrolled completely to the top or bottom depending on the layout of other elements."
5832
5852
  }
5833
5853
  };
5834
- return k.addMessage(c), c;
5854
+ return x.addMessage(c), c;
5835
5855
  }
5836
5856
  addActions(a = []) {
5837
- k.addActions(a);
5857
+ x.addActions(a);
5838
5858
  }
5839
5859
  render() {
5840
- return k.disabled && !this.alwaysOpen ? (ze.error("Bot is disabled"), null) : w`
5841
- <div class="cb-wrapper" style="${k.open ? "display:flex" : "display:none"}">
5860
+ return x.disabled && !this.alwaysOpen ? (ze.error("Bot is disabled"), null) : w`
5861
+ <div class="cb-wrapper" style="${x.open ? "display:flex" : "display:none"}">
5842
5862
  <cb-header title="${this.name}" exportparts="header"></cb-header>
5843
- <cb-message-list .messages=${k.messages} .actions=${k.actions} .form=${k.form} exportparts="form"></cb-message-list>
5863
+ <cb-message-list .messages=${x.messages} .actions=${x.actions} .form=${x.form} exportparts="form"></cb-message-list>
5844
5864
  ${this.renderUserInput()}
5845
5865
  </div>
5846
- <cb-anchor ?open=${k.open}></cb-anchor>
5866
+ <cb-anchor ?open=${x.open}></cb-anchor>
5847
5867
  `;
5848
5868
  }
5849
5869
  renderUserInput() {
5850
- return k.form || k.disabled && this.alwaysOpen ? null : w`<cb-user-input ?loading=${this.loading} ?disabled=${this.loading || k.form} ?enable-file-upload=${this.enableFileUpload}></cb-user-input>`;
5870
+ return x.form || x.disabled && this.alwaysOpen ? null : w`<cb-user-input ?loading=${this.loading} ?disabled=${this.loading || x.form} ?enable-file-upload=${this.enableFileUpload}></cb-user-input>`;
5851
5871
  }
5852
5872
  connectedCallback() {
5853
5873
  super.connectedCallback(), ze.info("connectedCallback"), addEventListener("setting:show", () => {
@@ -5856,9 +5876,9 @@ let H = class extends Q {
5856
5876
  this.showSetting = !1;
5857
5877
  }), addEventListener("chatbot:toggle", (a) => {
5858
5878
  const t = a.detail;
5859
- k.open = t.open, k.suppressEngagePopup();
5879
+ x.open = t.open, x.suppressEngagePopup();
5860
5880
  }), addEventListener("message:clear", () => {
5861
- k.clearMessages();
5881
+ x.clearMessages();
5862
5882
  }), addEventListener("message:send:file", this._sendFileHandler.bind(this)), addEventListener("setting:show", () => {
5863
5883
  this.showSetting = !0;
5864
5884
  }), addEventListener("form:submit", this._formSubmitHandler.bind(this));
@@ -5874,38 +5894,38 @@ let H = class extends Q {
5874
5894
  // initialize setting
5875
5895
  _initSetting() {
5876
5896
  ze.info("_initSetting");
5877
- const a = k.setting;
5878
- a.orgId = this.orgId, a.botId = this.botId, a.url = this.url, a.logoUrl = this.logoUrl, a.logoSvg = this.logoSvg, a.botIconSvg = this.botIconSvg, a.userIconSvg = this.userIconSvg, a.systemIconSvg = this.systemIconSvg, a.agentIconSvg = this.agentIconSvg, k.setSetting(a);
5897
+ const a = x.setting;
5898
+ a.orgId = this.orgId, a.botId = this.botId, a.url = this.url, a.logoUrl = this.logoUrl, a.logoSvg = this.logoSvg, a.botIconSvg = this.botIconSvg, a.userIconSvg = this.userIconSvg, a.systemIconSvg = this.systemIconSvg, a.agentIconSvg = this.agentIconSvg, x.setSetting(a);
5879
5899
  let t = {};
5880
5900
  try {
5881
5901
  t = JSON.parse(this.prefilledFormFields);
5882
5902
  } catch (c) {
5883
5903
  console.log(`Failed to parse prefilled-form-fields attribute value, error: ${(c == null ? void 0 : c.message) || ""}`), t = {};
5884
5904
  }
5885
- k.setPrefilledFormFields(t), this.open && (k.open = !0), this.alwaysOpen && (k.open = !0, k.alwaysOpen = !0);
5905
+ x.setPrefilledFormFields(t), this.open && (x.open = !0), this.alwaysOpen && (x.open = !0, x.alwaysOpen = !0);
5886
5906
  }
5887
5907
  setLoading(a) {
5888
5908
  this.loading = a;
5889
5909
  }
5890
5910
  clearConversation() {
5891
- k.clearConversation();
5911
+ x.clearConversation();
5892
5912
  }
5893
5913
  setPrefilledFormFields(a) {
5894
- k.setPrefilledFormFields(a);
5914
+ x.setPrefilledFormFields(a);
5895
5915
  }
5896
5916
  setOpen(a = !1) {
5897
- k.open = a;
5917
+ x.open = a;
5898
5918
  }
5899
5919
  // check auth
5900
5920
  _checkAuth() {
5901
5921
  }
5902
5922
  _addMessageHandler(a) {
5903
5923
  const t = a.detail;
5904
- k.sendMessage(t);
5924
+ x.sendMessage(t);
5905
5925
  }
5906
5926
  _deleteMessageHandler(a) {
5907
5927
  const t = a.detail;
5908
- k.removeMessage(t.id);
5928
+ x.removeMessage(t.id);
5909
5929
  }
5910
5930
  async _sendFileHandler(a) {
5911
5931
  const t = a.detail, i = {
@@ -5922,11 +5942,11 @@ let H = class extends Q {
5922
5942
  }))
5923
5943
  }
5924
5944
  };
5925
- if (k.addMessage(i), this.uploadFileUrl) {
5945
+ if (x.addMessage(i), this.uploadFileUrl) {
5926
5946
  const n = await ji(this.uploadFileUrl, t.files);
5927
5947
  n.code === 0 && n.data && (i.isUploading = !1, i.data = {
5928
5948
  files: n.data
5929
- }, k.updateMessage(i));
5949
+ }, x.updateMessage(i));
5930
5950
  }
5931
5951
  this.emit("chatbot:file:send", {
5932
5952
  detail: {
@@ -5938,7 +5958,7 @@ let H = class extends Q {
5938
5958
  // setting confirm handler
5939
5959
  _settingConfirmHandler(a) {
5940
5960
  const t = a.detail;
5941
- k.setSetting(t.setting), this.showSetting = !1, this._checkAuth();
5961
+ x.setSetting(t.setting), this.showSetting = !1, this._checkAuth();
5942
5962
  }
5943
5963
  async _formSubmitHandler(a) {
5944
5964
  }