deep-chat-dev 9.0.98 → 9.0.100

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/deepChat.js CHANGED
@@ -69,11 +69,11 @@ var Dt = /*#__PURE__*/function () {
69
69
  }]);
70
70
  return Dt;
71
71
  }();
72
- var M = /*#__PURE__*/function () {
73
- function M() {
74
- _classCallCheck(this, M);
72
+ var T = /*#__PURE__*/function () {
73
+ function T() {
74
+ _classCallCheck(this, T);
75
75
  }
76
- _createClass(M, null, [{
76
+ _createClass(T, null, [{
77
77
  key: "unsetStyle",
78
78
  value: function unsetStyle(e, t) {
79
79
  var i = Object.keys(t).reduce(function (n, r) {
@@ -84,12 +84,12 @@ var M = /*#__PURE__*/function () {
84
84
  }, {
85
85
  key: "unsetActivityCSSMouseStates",
86
86
  value: function unsetActivityCSSMouseStates(e, t) {
87
- t.click && M.unsetStyle(e, t.click), t.hover && M.unsetStyle(e, t.hover);
87
+ t.click && T.unsetStyle(e, t.click), t.hover && T.unsetStyle(e, t.hover);
88
88
  }
89
89
  }, {
90
90
  key: "unsetAllCSSMouseStates",
91
91
  value: function unsetAllCSSMouseStates(e, t) {
92
- M.unsetActivityCSSMouseStates(e, t), t["default"] && M.unsetStyle(e, t["default"]);
92
+ T.unsetActivityCSSMouseStates(e, t), t["default"] && T.unsetStyle(e, t["default"]);
93
93
  }
94
94
  }, {
95
95
  key: "processStateful",
@@ -133,7 +133,7 @@ var M = /*#__PURE__*/function () {
133
133
  }
134
134
  }
135
135
  }]);
136
- return M;
136
+ return T;
137
137
  }();
138
138
  var jn = /*#__PURE__*/function () {
139
139
  function Ot() {
@@ -163,7 +163,7 @@ var jn = /*#__PURE__*/function () {
163
163
  }, {
164
164
  key: "applyDefaultStyleToComponent",
165
165
  value: function applyDefaultStyleToComponent(e, t) {
166
- t && M.applyToStyleIfNotDefined(e, t), M.applyToStyleIfNotDefined(e, Ot.DEFAULT_COMPONENT_STYLE);
166
+ t && T.applyToStyleIfNotDefined(e, t), T.applyToStyleIfNotDefined(e, Ot.DEFAULT_COMPONENT_STYLE);
167
167
  }
168
168
  }]);
169
169
  return Ot;
@@ -192,13 +192,13 @@ var ge = /*#__PURE__*/_createClass(function ge() {
192
192
  ge.IS_SAFARI = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);
193
193
  ge.IS_CHROMIUM = window.chrome;
194
194
  var Bn = /*#__PURE__*/function () {
195
- function st() {
196
- _classCallCheck(this, st);
195
+ function nt() {
196
+ _classCallCheck(this, nt);
197
197
  }
198
- _createClass(st, null, [{
198
+ _createClass(nt, null, [{
199
199
  key: "add",
200
200
  value: function add(e, t, i) {
201
- t !== void 0 && e.addEventListener("keydown", st.onKeyDown.bind(this, t)), e.oninput = st.onInput.bind(this, t, i);
201
+ t !== void 0 && e.addEventListener("keydown", nt.onKeyDown.bind(this, t)), e.oninput = nt.onInput.bind(this, t, i);
202
202
  }
203
203
  // preventing insertion early for a nicer UX
204
204
  // prettier-ignore
@@ -206,7 +206,7 @@ var Bn = /*#__PURE__*/function () {
206
206
  key: "onKeyDown",
207
207
  value: function onKeyDown(e, t) {
208
208
  var n = t.target.textContent;
209
- n && n.length >= e && !st.PERMITTED_KEYS.has(t.key) && !st.isKeyCombinationPermitted(t) && t.preventDefault();
209
+ n && n.length >= e && !nt.PERMITTED_KEYS.has(t.key) && !nt.isKeyCombinationPermitted(t) && t.preventDefault();
210
210
  }
211
211
  }, {
212
212
  key: "isKeyCombinationPermitted",
@@ -221,7 +221,7 @@ var Bn = /*#__PURE__*/function () {
221
221
  e !== void 0 && r.length > e && (n.textContent = r.substring(0, e), Qt.focusEndOfInput(n)), t == null || t();
222
222
  }
223
223
  }]);
224
- return st;
224
+ return nt;
225
225
  }();
226
226
  Bn.PERMITTED_KEYS = /* @__PURE__ */new Set([R.BACKSPACE, R.DELETE, R.ARROW_RIGHT, R.ARROW_LEFT, R.ARROW_DOWN, R.ARROW_UP, R.META, R.CONTROL, R.ENTER]);
227
227
  var bs = Bn;
@@ -262,7 +262,7 @@ var Fn = /*#__PURE__*/function () {
262
262
  key: "removeTextIfPlaceholder",
263
263
  value: function removeTextIfPlaceholder() {
264
264
  var e, t, i, n;
265
- this.inputElementRef.classList.contains("text-input-placeholder") && !this.inputElementRef.classList.contains("text-input-disabled") && ((e = this._config.placeholder) != null && e.style && (M.unsetStyle(this.inputElementRef, (t = this._config.placeholder) == null ? void 0 : t.style), Object.assign(this.inputElementRef.style, (n = (i = this._config) == null ? void 0 : i.styles) == null ? void 0 : n.text)), qe.clear(this.inputElementRef), this.inputElementRef.classList.remove("text-input-placeholder"));
265
+ this.inputElementRef.classList.contains("text-input-placeholder") && !this.inputElementRef.classList.contains("text-input-disabled") && ((e = this._config.placeholder) != null && e.style && (T.unsetStyle(this.inputElementRef, (t = this._config.placeholder) == null ? void 0 : t.style), Object.assign(this.inputElementRef.style, (n = (i = this._config) == null ? void 0 : i.styles) == null ? void 0 : n.text)), qe.clear(this.inputElementRef), this.inputElementRef.classList.remove("text-input-placeholder"));
266
266
  }
267
267
  }, {
268
268
  key: "addEventListeners",
@@ -281,7 +281,7 @@ var Fn = /*#__PURE__*/function () {
281
281
  }, {
282
282
  key: "onBlur",
283
283
  value: function onBlur(e, t) {
284
- M.unsetStyle(this.elementRef, e), t && Object.assign(this.elementRef.style, t);
284
+ T.unsetStyle(this.elementRef, e), t && Object.assign(this.elementRef.style, t);
285
285
  }
286
286
  }, {
287
287
  key: "onKeydown",
@@ -591,7 +591,7 @@ var Te = /*#__PURE__*/function () {
591
591
  _createClass(Te, null, [{
592
592
  key: "mouseUp",
593
593
  value: function mouseUp(e, t) {
594
- M.unsetAllCSSMouseStates(e, t), Object.assign(e.style, t["default"]), Object.assign(e.style, t.hover);
594
+ T.unsetAllCSSMouseStates(e, t), Object.assign(e.style, t["default"]), Object.assign(e.style, t.hover);
595
595
  }
596
596
  }, {
597
597
  key: "mouseDown",
@@ -601,7 +601,7 @@ var Te = /*#__PURE__*/function () {
601
601
  }, {
602
602
  key: "mouseLeave",
603
603
  value: function mouseLeave(e, t) {
604
- M.unsetAllCSSMouseStates(e, t), Object.assign(e.style, t["default"]);
604
+ T.unsetAllCSSMouseStates(e, t), Object.assign(e.style, t["default"]);
605
605
  }
606
606
  }, {
607
607
  key: "mouseEnter",
@@ -688,10 +688,10 @@ var be = /*#__PURE__*/function () {
688
688
  r = Ri[i].styles;
689
689
  if (r) {
690
690
  var a = JSON.parse(JSON.stringify(r));
691
- a["default"] && M.overwriteDefaultWithAlreadyApplied(a, t), n.unshift(a);
691
+ a["default"] && T.overwriteDefaultWithAlreadyApplied(a, t), n.unshift(a);
692
692
  }
693
- var o = M.mergeStatefulStyles(n);
694
- return M.processStateful(o, {}, {});
693
+ var o = T.mergeStatefulStyles(n);
694
+ return T.processStateful(o, {}, {});
695
695
  }
696
696
  }, {
697
697
  key: "applyDeepChatUtilities",
@@ -700,7 +700,7 @@ var be = /*#__PURE__*/function () {
700
700
  var o = i.getElementsByClassName(r);
701
701
  Array.from(o || []).forEach(function (a) {
702
702
  var l = be.getProcessedStyles(t, a, r);
703
- re.applyStylesToElement(a, l), be.applyEvents(a, r);
703
+ se.applyStylesToElement(a, l), be.applyEvents(a, r);
704
704
  });
705
705
  });
706
706
  var n = i.getElementsByClassName(Ss);
@@ -711,14 +711,14 @@ var be = /*#__PURE__*/function () {
711
711
  }]);
712
712
  return be;
713
713
  }();
714
- var re = /*#__PURE__*/function () {
715
- function re() {
716
- _classCallCheck(this, re);
714
+ var se = /*#__PURE__*/function () {
715
+ function se() {
716
+ _classCallCheck(this, se);
717
717
  }
718
- _createClass(re, null, [{
718
+ _createClass(se, null, [{
719
719
  key: "applyStylesToElement",
720
720
  value: function applyStylesToElement(e, t) {
721
- var i = M.processStateful(t, {}, {});
721
+ var i = T.processStateful(t, {}, {});
722
722
  Te.add(e, i), Object.assign(e.style, i["default"]);
723
723
  }
724
724
  }, {
@@ -734,7 +734,7 @@ var re = /*#__PURE__*/function () {
734
734
  value: function applyClassUtilitiesToElement(e, t) {
735
735
  var i = t.events,
736
736
  n = t.styles;
737
- i && re.applyEventsToElement(e, i), n && !be.doesElementContainDeepChatClass(e) && re.applyStylesToElement(e, n);
737
+ i && se.applyEventsToElement(e, i), n && !be.doesElementContainDeepChatClass(e) && se.applyStylesToElement(e, n);
738
738
  }
739
739
  }, {
740
740
  key: "applyCustomClassUtilities",
@@ -742,17 +742,17 @@ var re = /*#__PURE__*/function () {
742
742
  Object.keys(e).forEach(function (i) {
743
743
  var n = t.getElementsByClassName(i);
744
744
  Array.from(n).forEach(function (r) {
745
- e[i] && re.applyClassUtilitiesToElement(r, e[i]);
745
+ e[i] && se.applyClassUtilitiesToElement(r, e[i]);
746
746
  });
747
747
  });
748
748
  }
749
749
  }, {
750
750
  key: "apply",
751
751
  value: function apply(e, t) {
752
- be.applyDeepChatUtilities(e, e.htmlClassUtilities, t), re.applyCustomClassUtilities(e.htmlClassUtilities, t);
752
+ be.applyDeepChatUtilities(e, e.htmlClassUtilities, t), se.applyCustomClassUtilities(e.htmlClassUtilities, t);
753
753
  }
754
754
  }]);
755
- return re;
755
+ return se;
756
756
  }();
757
757
  var Ye = /*#__PURE__*/function () {
758
758
  function Ye() {
@@ -774,7 +774,7 @@ var Ye = /*#__PURE__*/function () {
774
774
  value: function overwrite(e, t, i, n) {
775
775
  var r = e.messages,
776
776
  o = v.overwriteMessage(r, n, t, i, "html", "html-message");
777
- return o && (o.bubbleElement.innerHTML = t, re.apply(e, o.outerContainer), ke.flagHTMLUpdateClass(o.bubbleElement)), o;
777
+ return o && (o.bubbleElement.innerHTML = t, se.apply(e, o.outerContainer), ke.flagHTMLUpdateClass(o.bubbleElement)), o;
778
778
  }
779
779
  // prettier-ignore
780
780
  }, {
@@ -787,7 +787,7 @@ var Ye = /*#__PURE__*/function () {
787
787
  r.status = !1;
788
788
  }
789
789
  var o = Ye.createElements(e, t, i);
790
- return v.fillEmptyMessageElement(o.bubbleElement, t), re.apply(e, o.outerContainer), ke.flagHTMLUpdateClass(o.bubbleElement), e.applyCustomStyles(o, i, !1, (a = e.messageStyles) == null ? void 0 : a.html), Ye.addElement(e, o.outerContainer), o;
790
+ return v.fillEmptyMessageElement(o.bubbleElement, t), se.apply(e, o.outerContainer), ke.flagHTMLUpdateClass(o.bubbleElement), e.applyCustomStyles(o, i, !1, (a = e.messageStyles) == null ? void 0 : a.html), Ye.addElement(e, o.outerContainer), o;
791
791
  }
792
792
  }]);
793
793
  return Ye;
@@ -812,7 +812,7 @@ function Gn(s) {
812
812
  }), s;
813
813
  }
814
814
  var Ms = /\\([\\!"#$%&'()*+,.\/:;<=>?@[\]^_`{|}~-])/g;
815
- function mt(s) {
815
+ function ft(s) {
816
816
  return s.indexOf("\\") < 0 ? s : s.replace(Ms, "$1");
817
817
  }
818
818
  function Wn(s) {
@@ -871,7 +871,7 @@ f.fence = function (s, e, t, i, n) {
871
871
  u;
872
872
  if (r.params) {
873
873
  if (c = r.params.split(/\s+/g), d = c.join(" "), ws(n.rules.fence_custom, c[0])) return n.rules.fence_custom[c[0]](s, e, t, i, n);
874
- l = z(Ie(mt(d))), o = ' class="' + a + l + '"';
874
+ l = z(Ie(ft(d))), o = ' class="' + a + l + '"';
875
875
  }
876
876
  return t.highlight ? u = t.highlight.apply(t.highlight, [r.content].concat(c)) || z(r.content) : u = z(r.content), "<pre><code" + o + ">" + u + "</code></pre>" + Re(s, e);
877
877
  };
@@ -923,7 +923,7 @@ f.link_close = function () {
923
923
  f.image = function (s, e, t) {
924
924
  var i = ' src="' + z(s[e].src) + '"',
925
925
  n = s[e].title ? ' title="' + z(Ie(s[e].title)) + '"' : "",
926
- r = ' alt="' + (s[e].alt ? z(Ie(mt(s[e].alt))) : "") + '"',
926
+ r = ' alt="' + (s[e].alt ? z(Ie(ft(s[e].alt))) : "") + '"',
927
927
  o = t.xhtmlOut ? " /" : "";
928
928
  return "<img" + i + r + n + o + ">";
929
929
  };
@@ -1186,7 +1186,7 @@ Oe.prototype.cacheSet = function (s, e) {
1186
1186
  Oe.prototype.cacheGet = function (s) {
1187
1187
  return s < this.cache.length ? this.cache[s] : 0;
1188
1188
  };
1189
- function gt(s, e) {
1189
+ function mt(s, e) {
1190
1190
  var t,
1191
1191
  i,
1192
1192
  n,
@@ -1207,7 +1207,7 @@ function gt(s, e) {
1207
1207
  }
1208
1208
  function Ns(s, e, t, i) {
1209
1209
  var n, r, o, a, l, c;
1210
- if (s.charCodeAt(0) !== 42 || s.charCodeAt(1) !== 91 || s.indexOf("]:") === -1 || (n = new Oe(s, e, t, i, []), r = gt(n, 1), r < 0 || s.charCodeAt(r + 1) !== 58)) return -1;
1210
+ if (s.charCodeAt(0) !== 42 || s.charCodeAt(1) !== 91 || s.indexOf("]:") === -1 || (n = new Oe(s, e, t, i, []), r = mt(n, 1), r < 0 || s.charCodeAt(r + 1) !== 58)) return -1;
1211
1211
  for (a = n.posMax, o = r + 2; o < a && n.src.charCodeAt(o) !== 10; o++);
1212
1212
  return l = s.slice(2, r), c = s.slice(r + 2, o).trim(), c.length === 0 ? -1 : (i.abbreviations || (i.abbreviations = {}), _typeof(i.abbreviations[":" + l]) > "u" && (i.abbreviations[":" + l] = c), o);
1213
1213
  }
@@ -1240,7 +1240,7 @@ function Jn(s, e) {
1240
1240
  if (s.src.charCodeAt(e) === 60) {
1241
1241
  for (e++; e < o;) {
1242
1242
  if (t = s.src.charCodeAt(e), t === 10) return !1;
1243
- if (t === 62) return n = Ni(mt(s.src.slice(r + 1, e))), s.parser.validateLink(n) ? (s.pos = e + 1, s.linkContent = n, !0) : !1;
1243
+ if (t === 62) return n = Ni(ft(s.src.slice(r + 1, e))), s.parser.validateLink(n) ? (s.pos = e + 1, s.linkContent = n, !0) : !1;
1244
1244
  if (t === 92 && e + 1 < o) {
1245
1245
  e += 2;
1246
1246
  continue;
@@ -1257,7 +1257,7 @@ function Jn(s, e) {
1257
1257
  if (t === 40 && (i++, i > 1) || t === 41 && (i--, i < 0)) break;
1258
1258
  e++;
1259
1259
  }
1260
- return r === e || (n = mt(s.src.slice(r, e)), !s.parser.validateLink(n)) ? !1 : (s.linkContent = n, s.pos = e, !0);
1260
+ return r === e || (n = ft(s.src.slice(r, e)), !s.parser.validateLink(n)) ? !1 : (s.linkContent = n, s.pos = e, !0);
1261
1261
  }
1262
1262
  function $n(s, e) {
1263
1263
  var t,
@@ -1266,7 +1266,7 @@ function $n(s, e) {
1266
1266
  r = s.src.charCodeAt(e);
1267
1267
  if (r !== 34 && r !== 39 && r !== 40) return !1;
1268
1268
  for (e++, r === 40 && (r = 41); e < n;) {
1269
- if (t = s.src.charCodeAt(e), t === r) return s.pos = e + 1, s.linkContent = mt(s.src.slice(i + 1, e)), !0;
1269
+ if (t = s.src.charCodeAt(e), t === r) return s.pos = e + 1, s.linkContent = ft(s.src.slice(i + 1, e)), !0;
1270
1270
  if (t === 92 && e + 1 < n) {
1271
1271
  e += 2;
1272
1272
  continue;
@@ -1280,7 +1280,7 @@ function Yn(s) {
1280
1280
  }
1281
1281
  function Ds(s, e, t, i) {
1282
1282
  var n, r, o, a, l, c, d, u, h;
1283
- if (s.charCodeAt(0) !== 91 || s.indexOf("]:") === -1 || (n = new Oe(s, e, t, i, []), r = gt(n, 0), r < 0 || s.charCodeAt(r + 1) !== 58)) return -1;
1283
+ if (s.charCodeAt(0) !== 91 || s.indexOf("]:") === -1 || (n = new Oe(s, e, t, i, []), r = mt(n, 0), r < 0 || s.charCodeAt(r + 1) !== 58)) return -1;
1284
1284
  for (a = n.posMax, o = r + 2; o < a && (l = n.src.charCodeAt(o), !(l !== 32 && l !== 10)); o++);
1285
1285
  if (!Jn(n, o)) return -1;
1286
1286
  for (d = n.linkContent, o = n.pos, c = o, o = o + 1; o < a && (l = n.src.charCodeAt(o), !(l !== 32 && l !== 10)); o++);
@@ -1668,7 +1668,7 @@ function er(s, e, t, i) {
1668
1668
  k,
1669
1669
  G,
1670
1670
  X,
1671
- ae = !0,
1671
+ oe = !0,
1672
1672
  Q,
1673
1673
  N,
1674
1674
  Fe,
@@ -1689,7 +1689,7 @@ function er(s, e, t, i) {
1689
1689
  type: "list_item_open",
1690
1690
  lines: X = [e, 0],
1691
1691
  level: s.level++
1692
- }), a = s.blkIndent, l = s.tight, o = s.tShift[e], c = s.parentType, s.tShift[e] = S - s.bMarks[e], s.blkIndent = r, s.tight = !0, s.parentType = "list", s.parser.tokenize(s, e, t, !0), (!s.tight || k) && (ae = !1), k = s.line - e > 1 && s.isEmpty(s.line - 1), s.blkIndent = a, s.tShift[e] = o, s.tight = l, s.parentType = c, s.tokens.push({
1692
+ }), a = s.blkIndent, l = s.tight, o = s.tShift[e], c = s.parentType, s.tShift[e] = S - s.bMarks[e], s.blkIndent = r, s.tight = !0, s.parentType = "list", s.parser.tokenize(s, e, t, !0), (!s.tight || k) && (oe = !1), k = s.line - e > 1 && s.isEmpty(s.line - 1), s.blkIndent = a, s.tShift[e] = o, s.tight = l, s.parentType = c, s.tokens.push({
1693
1693
  type: "list_item_close",
1694
1694
  level: --s.level
1695
1695
  }), n = e = s.line, X[1] = n, S = s.bMarks[e], !(n >= t || s.isEmpty(n) || s.tShift[n] < s.blkIndent));) {
@@ -1706,7 +1706,7 @@ function er(s, e, t, i) {
1706
1706
  return s.tokens.push({
1707
1707
  type: E ? "ordered_list_close" : "bullet_list_close",
1708
1708
  level: --s.level
1709
- }), G[1] = n, s.line = n, ae && Qs(s, V), !0;
1709
+ }), G[1] = n, s.line = n, oe && Qs(s, V), !0;
1710
1710
  }
1711
1711
  function tr(s, e, t, i) {
1712
1712
  var n,
@@ -2318,7 +2318,7 @@ function Ar(s, e) {
2318
2318
  h = s.posMax,
2319
2319
  p = s.pos,
2320
2320
  g = s.src.charCodeAt(p);
2321
- if (g === 33 && (d = !0, g = s.src.charCodeAt(++p)), g !== 91 || s.level >= s.options.maxNesting || (t = p + 1, i = gt(s, p), i < 0)) return !1;
2321
+ if (g === 33 && (d = !0, g = s.src.charCodeAt(++p)), g !== 91 || s.level >= s.options.maxNesting || (t = p + 1, i = mt(s, p), i < 0)) return !1;
2322
2322
  if (a = i + 1, a < h && s.src.charCodeAt(a) === 40) {
2323
2323
  for (a++; a < h && (c = s.src.charCodeAt(a), !(c !== 32 && c !== 10)); a++);
2324
2324
  if (a >= h) return !1;
@@ -2329,7 +2329,7 @@ function Ar(s, e) {
2329
2329
  } else {
2330
2330
  if (s.linkLevel > 0) return !1;
2331
2331
  for (; a < h && (c = s.src.charCodeAt(a), !(c !== 32 && c !== 10)); a++);
2332
- if (a < h && s.src.charCodeAt(a) === 91 && (p = a + 1, a = gt(s, a), a >= 0 ? n = s.src.slice(p, a++) : a = p - 1), n || (_typeof(n) > "u" && (a = i + 1), n = s.src.slice(t, i)), l = s.env.references[Yn(n)], !l) return s.pos = u, !1;
2332
+ if (a < h && s.src.charCodeAt(a) === 91 && (p = a + 1, a = mt(s, a), a >= 0 ? n = s.src.slice(p, a++) : a = p - 1), n || (_typeof(n) > "u" && (a = i + 1), n = s.src.slice(t, i)), l = s.env.references[Yn(n)], !l) return s.pos = u, !1;
2333
2333
  r = l.href, o = l.title;
2334
2334
  }
2335
2335
  return e || (s.pos = t, s.posMax = i, d ? s.push({
@@ -2355,7 +2355,7 @@ function kr(s, e) {
2355
2355
  r,
2356
2356
  o = s.posMax,
2357
2357
  a = s.pos;
2358
- return a + 2 >= o || s.src.charCodeAt(a) !== 94 || s.src.charCodeAt(a + 1) !== 91 || s.level >= s.options.maxNesting || (t = a + 2, i = gt(s, a + 1), i < 0) ? !1 : (e || (s.env.footnotes || (s.env.footnotes = {}), s.env.footnotes.list || (s.env.footnotes.list = []), n = s.env.footnotes.list.length, s.pos = t, s.posMax = i, s.push({
2358
+ return a + 2 >= o || s.src.charCodeAt(a) !== 94 || s.src.charCodeAt(a + 1) !== 91 || s.level >= s.options.maxNesting || (t = a + 2, i = mt(s, a + 1), i < 0) ? !1 : (e || (s.env.footnotes || (s.env.footnotes = {}), s.env.footnotes.list || (s.env.footnotes.list = []), n = s.env.footnotes.list.length, s.pos = t, s.posMax = i, s.push({
2359
2359
  type: "footnote_ref",
2360
2360
  id: n,
2361
2361
  level: s.level
@@ -2630,34 +2630,34 @@ var eo = {
2630
2630
  function Qn(s, e, t) {
2631
2631
  this.src = e, this.env = t, this.options = s.options, this.tokens = [], this.inlineMode = !1, this.inline = s.inline, this.block = s.block, this.renderer = s.renderer, this.typographer = s.typographer;
2632
2632
  }
2633
- function pe(s, e) {
2633
+ function he(s, e) {
2634
2634
  typeof s != "string" && (e = s, s = "default"), e && e.linkify != null && console.warn("linkify option is removed. Use linkify plugin instead:\n\nimport Remarkable from 'remarkable';\nimport linkify from 'remarkable/linkify';\nnew Remarkable().use(linkify)\n"), this.inline = new ii(), this.block = new Vi(), this.core = new Zn(), this.renderer = new Hi(), this.ruler = new H(), this.options = {}, this.configure(no[s]), this.set(e || {});
2635
2635
  }
2636
- pe.prototype.set = function (s) {
2636
+ he.prototype.set = function (s) {
2637
2637
  Gn(this.options, s);
2638
2638
  };
2639
- pe.prototype.configure = function (s) {
2639
+ he.prototype.configure = function (s) {
2640
2640
  var e = this;
2641
2641
  if (!s) throw new Error("Wrong `remarkable` preset, check name/content");
2642
2642
  s.options && e.set(s.options), s.components && Object.keys(s.components).forEach(function (t) {
2643
2643
  s.components[t].rules && e[t].ruler.enable(s.components[t].rules, !0);
2644
2644
  });
2645
2645
  };
2646
- pe.prototype.use = function (s, e) {
2646
+ he.prototype.use = function (s, e) {
2647
2647
  return s(this, e), this;
2648
2648
  };
2649
- pe.prototype.parse = function (s, e) {
2649
+ he.prototype.parse = function (s, e) {
2650
2650
  var t = new Qn(this, s, e);
2651
2651
  return this.core.process(t), t.tokens;
2652
2652
  };
2653
- pe.prototype.render = function (s, e) {
2653
+ he.prototype.render = function (s, e) {
2654
2654
  return e = e || {}, this.renderer.render(this.parse(s, e), this.options, e);
2655
2655
  };
2656
- pe.prototype.parseInline = function (s, e) {
2656
+ he.prototype.parseInline = function (s, e) {
2657
2657
  var t = new Qn(this, s, e);
2658
2658
  return t.inlineMode = !0, this.core.process(t), t.tokens;
2659
2659
  };
2660
- pe.prototype.renderInline = function (s, e) {
2660
+ he.prototype.renderInline = function (s, e) {
2661
2661
  return e = e || {}, this.renderer.render(this.parseInline(s, e), this.options, e);
2662
2662
  };
2663
2663
  var Pi = /*#__PURE__*/function () {
@@ -2668,7 +2668,7 @@ var Pi = /*#__PURE__*/function () {
2668
2668
  key: "createNew",
2669
2669
  value: function createNew() {
2670
2670
  var e = window.hljs;
2671
- return e ? new pe({
2671
+ return e ? new he({
2672
2672
  highlight: function highlight(t, i) {
2673
2673
  if (i && e.getLanguage(i)) try {
2674
2674
  return e.highlight(i, t).value;
@@ -2694,7 +2694,7 @@ var Pi = /*#__PURE__*/function () {
2694
2694
  // set target to open in a new tab
2695
2695
  typographer: !0
2696
2696
  // Enable smartypants and other sweet transforms
2697
- }) : new pe({
2697
+ }) : new he({
2698
2698
  highlight: function highlight(t) {
2699
2699
  return t;
2700
2700
  },
@@ -2769,7 +2769,7 @@ var es = /*#__PURE__*/function () {
2769
2769
  return Pt;
2770
2770
  }();
2771
2771
  es.DEFAULT_FILE_NAME = "file";
2772
- var se = es;
2772
+ var ne = es;
2773
2773
  var jt = /*#__PURE__*/function () {
2774
2774
  function jt() {
2775
2775
  _classCallCheck(this, jt);
@@ -2781,7 +2781,7 @@ var jt = /*#__PURE__*/function () {
2781
2781
  message: t,
2782
2782
  isInitial: i
2783
2783
  }));
2784
- se.reAddFileRefToObject(t, n), e.onNewMessage(n), e.dispatchEvent(new CustomEvent("new-message", {
2784
+ ne.reAddFileRefToObject(t, n), e.onNewMessage(n), e.dispatchEvent(new CustomEvent("new-message", {
2785
2785
  detail: n
2786
2786
  }));
2787
2787
  }
@@ -2857,11 +2857,11 @@ var D = /*#__PURE__*/function () {
2857
2857
  }();
2858
2858
  var so = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8c3ZnIGZpbGw9IiMwMDAwMDAiIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIAoJCXZpZXdCb3g9IjAgMCAzMiAzMiIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+Cgk8cGF0aCBkPSJNMjMsMzAuMzZIOWMtMi40MDQsMC00LjM2LTEuOTU2LTQuMzYtNC4zNlYxNWMwLTIuNDA0LDEuOTU2LTQuMzYsNC4zNi00LjM2aDMuNjU5CgkJYzAuMTY3LTEuNTY2LDEuNDE1LTIuODEzLDIuOTgxLTIuOTgxVjUuMzMzYy0xLjEzMS0wLjE3NC0yLTEuMTU0LTItMi4zMzNjMC0xLjMwMSwxLjA1OS0yLjM2LDIuMzYtMi4zNgoJCWMxLjMwMiwwLDIuMzYsMS4wNTksMi4zNiwyLjM2YzAsMS4xNzktMC44NjksMi4xNTktMiwyLjMzM1Y3LjY2YzEuNTY2LDAuMTY3LDIuODE0LDEuNDE1LDIuOTgxLDIuOTgxSDIzCgkJYzIuNDA0LDAsNC4zNiwxLjk1Niw0LjM2LDQuMzZ2MTFDMjcuMzYsMjguNDA0LDI1LjQwNCwzMC4zNiwyMywzMC4zNnogTTksMTEuMzZjLTIuMDA3LDAtMy42NCwxLjYzMy0zLjY0LDMuNjR2MTEKCQljMCwyLjAwNywxLjYzMywzLjY0LDMuNjQsMy42NGgxNGMyLjAwNywwLDMuNjQtMS42MzMsMy42NC0zLjY0VjE1YzAtMi4wMDctMS42MzMtMy42NC0zLjY0LTMuNjRIOXogTTEzLjM4NCwxMC42NGg1LjIzMQoJCUMxOC40MzksOS4zNTQsMTcuMzM0LDguMzYsMTYsOC4zNkMxNC42NjcsOC4zNiwxMy41NjEsOS4zNTQsMTMuMzg0LDEwLjY0eiBNMTYsMS4zNmMtMC45MDQsMC0xLjY0LDAuNzM2LTEuNjQsMS42NAoJCVMxNS4wOTYsNC42NCwxNiw0LjY0YzAuOTA0LDAsMS42NC0wLjczNiwxLjY0LTEuNjRTMTYuOTA0LDEuMzYsMTYsMS4zNnogTTIwLDI3LjM2aC04Yy0xLjMwMSwwLTIuMzYtMS4wNTktMi4zNi0yLjM2CgkJczEuMDU5LTIuMzYsMi4zNi0yLjM2aDhjMS4zMDIsMCwyLjM2LDEuMDU5LDIuMzYsMi4zNlMyMS4zMDIsMjcuMzYsMjAsMjcuMzZ6IE0xMiwyMy4zNmMtMC45MDQsMC0xLjY0LDAuNzM1LTEuNjQsMS42NAoJCXMwLjczNiwxLjY0LDEuNjQsMS42NGg4YzAuOTA0LDAsMS42NC0wLjczNSwxLjY0LTEuNjRzLTAuNzM1LTEuNjQtMS42NC0xLjY0SDEyeiBNMzEsMjMuODZoLTJjLTAuMTk5LDAtMC4zNi0wLjE2MS0wLjM2LTAuMzZWMTUKCQljMC0wLjE5OSwwLjE2MS0wLjM2LDAuMzYtMC4zNmgyYzAuMTk5LDAsMC4zNiwwLjE2MSwwLjM2LDAuMzZ2OC41QzMxLjM2LDIzLjY5OSwzMS4xOTksMjMuODYsMzEsMjMuODZ6IE0yOS4zNiwyMy4xNGgxLjI3OXYtNy43OAoJCUgyOS4zNlYyMy4xNHogTTMsMjMuODZIMWMtMC4xOTksMC0wLjM2LTAuMTYxLTAuMzYtMC4zNlYxNWMwLTAuMTk5LDAuMTYxLTAuMzYsMC4zNi0wLjM2aDJjMC4xOTksMCwwLjM2LDAuMTYxLDAuMzYsMC4zNnY4LjUKCQlDMy4zNiwyMy42OTksMy4xOTksMjMuODYsMywyMy44NnogTTEuMzYsMjMuMTRoMS4yOHYtNy43OEgxLjM2VjIzLjE0eiBNMjAsMjAuMzZjLTEuMzAyLDAtMi4zNi0xLjA1OS0yLjM2LTIuMzYKCQlzMS4wNTktMi4zNiwyLjM2LTIuMzZzMi4zNiwxLjA1OSwyLjM2LDIuMzZDMjIuMzYsMTkuMzAyLDIxLjMwMiwyMC4zNiwyMCwyMC4zNnogTTIwLDE2LjM2Yy0wLjkwNCwwLTEuNjQsMC43MzYtMS42NCwxLjY0CgkJczAuNzM1LDEuNjQsMS42NCwxLjY0czEuNjQtMC43MzUsMS42NC0xLjY0UzIwLjkwNCwxNi4zNiwyMCwxNi4zNnogTTEyLDIwLjM2Yy0xLjMwMSwwLTIuMzYtMS4wNTktMi4zNi0yLjM2czEuMDU5LTIuMzYsMi4zNi0yLjM2CgkJczIuMzYsMS4wNTksMi4zNiwyLjM2QzE0LjM2LDE5LjMwMiwxMy4zMDEsMjAuMzYsMTIsMjAuMzZ6IE0xMiwxNi4zNmMtMC45MDQsMC0xLjY0LDAuNzM2LTEuNjQsMS42NHMwLjczNiwxLjY0LDEuNjQsMS42NAoJCXMxLjY0LTAuNzM1LDEuNjQtMS42NFMxMi45MDQsMTYuMzYsMTIsMTYuMzZ6Ii8+Cgk8cmVjdCBzdHlsZT0iZmlsbDpub25lOyIgd2lkdGg9IjMyIiBoZWlnaHQ9IjMyIi8+Cjwvc3ZnPg==",
2859
2859
  ro = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAAD6CAMAAAC/MqoPAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAADNQTFRF////9vX18vLy/Pz86enp4+Li2tnZ1tbWzczM+fn57Ozs4N/f09LS0M/P5uXl7+/v3dzcwtncCAAAAAFiS0dEAIgFHUgAAAAJcEhZcwAAAEgAAABIAEbJaz4AAAZNSURBVHja7d3bdtsqEABQYABZSLH9/3+ZpnUsIcF5iOM6PfElNoMHMfPQdq3GmL0GkLhEUqLaUExnOtOZznSmM53pTGc605nOdKYznelMZzrTmV4LXSqllKyJDkob26xWq8Zae/iH0QoWTm9d1xur4WuypQJtTd+5dqn0VjcxzNO5/57mEBvdLo8Oron6aseWOjYOFkVvjQs3DmgyONMuht52EfztP+4hdu0i6LCO808/M8c1lE/fuPGej41uUzgdtoO/75N+2ELJ9I3b3//hPXbiMenm3pR/Jt4USgcLBIp4Bh10gqKVhvLo0klCxeSky96nKcj3siw6pJIL4XsoiQ7apyvMY/V3HHrSRioLopvEhSpTCn2TPEuwKYMOIX0tAxRBf/Hpa+lfSqBv9gi1FPsNfTrMAiVmIE/vJhz61FGnQxRIEYE4vfNYdN8Rp6MlHaHotHTn8ejekaZPAjEmyvQWdZFTtYTpXqCGJ0zvcek9Yfoel76nS0ffv1NMp1ca+pkgyfRCGind4L7OWWc605l+cxjsyhqy9AGbPpClc1/nvl5VX0c/3Alk6RU3+Am7shNZ+h6bvidLr7jBB+zKBrL0irOOudmIUDzTmf5gIP+iEuXtRuTVaEmY/oZLfyNMrzjryPc0gerMTdpVg0tvjJUU6bLPcGOoUv46SLL6Wi8yhLf06C7TUyekI0efRaaYqdFltkeNpPumRPSMDxgBYvSM035FrKAmH72hRW99PrpvSdEHkTEGUvSsK3yKVDkuJ92RohcZaehzzirPpOg+J92Tolfc4Cumx5xVXpGiZ34+ICX6W84qv5GiR5NPbiIpOv6BCoSvSkTX+eiaGP092zINvBOj4x8mSf9FqejvNo/cvpOji19ZbmviL0GPLsYMFzgzCor0+Bv/ePDvSJKOb9dJ5UlnbnEHiHgzv6cdTpJOWuc/u3FEucLDOL75xGtBiefrcwgoC9NDSH/jkH6pAuXmBqPQ9HSUPVdZBH1GGOrMXAQdYxcKZfxAoK+KKBKFLosoEoX+u4giUehz8jlcnAuhp78I46yDYNAd+QLR6K+pr+yvxdBTHyVDubQh0UfSxaHSd0lbvNkVRE87JGOtc+PQd2QLQ6fHhJkKsSh6yg13tO08JPprsgrrXWH0dJd2vH1MLPprot4eXoujpzrdhngiD40ek2y92lggPcnWa8qN1Yz0BFuvZhRl0uOfR0v4Ewuli/Bg4Qr3lArqGdndQ3UPO1EunXYwnelMZzrTmc50pjOd6UxnOtOZznSmM53pTGf6kuj6oedFKV0s3fX6sX1S3bsi6a4PD7+/YAqYeBw6pIB/4qEgOqxdSPbGiim4NRRCbzs3Jj0L4UfXtQXQVRfn5IdA/Bw7RZzurEV6EtdsLeGXkIPuA+K1UoVeA0l62zmN/LqfSSft9KkepmoRuvi3nd5uKNFB9zbbXEANqdr941XO0NJx2v2jdJenpf+/3bvn0ts16ph+sd6hX7dPo2+2cZzE02Ia43bzDHqr+2Evnhz74ZHU30ffbKOeng1/NPV30Ns1gYQnSP2P6e65Pfxc6h02XZqXQCjhJ6kPL6bFo4NrGvAU4UII4SE2P1vQuZkuOxckVfehisF1MjUddN/MZBN+kvq5uf0O/xa66gyNS9ktMWlz44rO1Z8C19i5FPdHzPamXn+F3hryPfxMr78+4F+kq22kO6Rf6fUQt+puuustyWv4rbG3l/duztFB96GYoe1cTBdXMr+nw9qVM6ZfxOvzezff0nXi/ZOndvrR6Zvpm0c3h6nhdb+5iS7tsIim/qXZD9+97/Jf+rpZ5BET1ayv0GUzLhEuhBBjIy/RdVPgndutIRt9nt7p5cKFEEJ3Z+jQFDZL+XnMDXxHB73gxn5s9Kc3d3/pFciFkN/QTSXHJpX5l66gDrkQoP6hL3xsPw39la4qOiV8tH78XeSbue6N9mvWa6J/ybpc1CT1Wnh5Qq9meP8IOKH3ddH7E/ri1iYux/SXDrXR4UiPdck/wUpU+FtPf6/orja6O9KL3l56LOvVxe5Ib2qjN0d6Vbex4ghWlU3bPqI90If66MNng680FNpbJijH6kCvaF3uMzQ3+IrpFerV4Y9dffQdN3im10ivbuImhD3Qq5u4HdZkua8znelMZ/pS4z9CPVKkxowNxgAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxNy0wMy0yN1QxNTo0NToxNSswMDowMN1xSg4AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTctMDMtMjdUMTU6NDU6MTUrMDA6MDCsLPKyAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAABJRU5ErkJggg==";
2860
- var de = /*#__PURE__*/function () {
2861
- function de() {
2862
- _classCallCheck(this, de);
2860
+ var ce = /*#__PURE__*/function () {
2861
+ function ce() {
2862
+ _classCallCheck(this, ce);
2863
2863
  }
2864
- _createClass(de, null, [{
2864
+ _createClass(ce, null, [{
2865
2865
  key: "applyCustomStylesToElements",
2866
2866
  value: function applyCustomStylesToElements(e, t, i) {
2867
2867
  Object.assign(e.style, i.container), Object.assign(t.style, i.avatar);
@@ -2870,10 +2870,10 @@ var de = /*#__PURE__*/function () {
2870
2870
  key: "applyCustomStyles",
2871
2871
  value: function applyCustomStyles(e, t, i, n) {
2872
2872
  var r, o, a, l;
2873
- if ((r = i["default"]) != null && r.styles && de.applyCustomStylesToElements(e, t, i["default"].styles), n === v.USER_ROLE) (o = i.user) != null && o.styles && de.applyCustomStylesToElements(e, t, i.user.styles);else {
2874
- (a = i.ai) != null && a.styles && de.applyCustomStylesToElements(e, t, i.ai.styles);
2873
+ if ((r = i["default"]) != null && r.styles && ce.applyCustomStylesToElements(e, t, i["default"].styles), n === v.USER_ROLE) (o = i.user) != null && o.styles && ce.applyCustomStylesToElements(e, t, i.user.styles);else {
2874
+ (a = i.ai) != null && a.styles && ce.applyCustomStylesToElements(e, t, i.ai.styles);
2875
2875
  var c = (l = i[n]) == null ? void 0 : l.styles;
2876
- c && de.applyCustomStylesToElements(e, t, c);
2876
+ c && ce.applyCustomStylesToElements(e, t, c);
2877
2877
  }
2878
2878
  }
2879
2879
  }, {
@@ -2883,7 +2883,7 @@ var de = /*#__PURE__*/function () {
2883
2883
  var i = document.createElement("img");
2884
2884
  e === v.USER_ROLE ? i.src = ((r = t == null ? void 0 : t.user) == null ? void 0 : r.src) || ((o = t == null ? void 0 : t["default"]) == null ? void 0 : o.src) || ro : i.src = ((a = t == null ? void 0 : t[e]) == null ? void 0 : a.src) || ((l = t == null ? void 0 : t.ai) == null ? void 0 : l.src) || ((c = t == null ? void 0 : t["default"]) == null ? void 0 : c.src) || so, i.classList.add("avatar");
2885
2885
  var n = document.createElement("div");
2886
- return n.classList.add("avatar-container"), n.appendChild(i), t && de.applyCustomStyles(n, i, t, e), n;
2886
+ return n.classList.add("avatar-container"), n.appendChild(i), t && ce.applyCustomStyles(n, i, t, e), n;
2887
2887
  }
2888
2888
  }, {
2889
2889
  key: "getPosition",
@@ -2897,12 +2897,12 @@ var de = /*#__PURE__*/function () {
2897
2897
  key: "add",
2898
2898
  value: function add(e, t, i) {
2899
2899
  var n = typeof i == "boolean" ? void 0 : i,
2900
- r = de.createAvatar(t, n),
2901
- o = de.getPosition(t, n);
2900
+ r = ce.createAvatar(t, n),
2901
+ o = ce.getPosition(t, n);
2902
2902
  r.classList.add(o === "left" ? "left-item-position" : "right-item-position"), e.insertAdjacentElement(o === "left" ? "beforebegin" : "afterend", r);
2903
2903
  }
2904
2904
  }]);
2905
- return de;
2905
+ return ce;
2906
2906
  }();
2907
2907
  var Ge = /*#__PURE__*/function () {
2908
2908
  function Ge() {
@@ -3006,7 +3006,7 @@ var Ke = /*#__PURE__*/function () {
3006
3006
  value:
3007
3007
  // prettier-ignore
3008
3008
  function addInnerContainerElements(e, t, i) {
3009
- return e.classList.add("message-bubble", v.getRoleClass(i), i === v.USER_ROLE ? "user-message-text" : "ai-message-text"), this.renderText(e, t), this._avatars && de.add(e, i, this._avatars), this._names && Ge.add(e, i, this._names), {
3009
+ return e.classList.add("message-bubble", v.getRoleClass(i), i === v.USER_ROLE ? "user-message-text" : "ai-message-text"), this.renderText(e, t), this._avatars && ce.add(e, i, this._avatars), this._names && Ge.add(e, i, this._names), {
3010
3010
  bubbleElement: e
3011
3011
  };
3012
3012
  }
@@ -3084,11 +3084,11 @@ var Ke = /*#__PURE__*/function () {
3084
3084
  }();
3085
3085
  var Wi = /*#__PURE__*/function () {
3086
3086
  // used for extracting at end and for isStreaming
3087
- function rt(e) {
3088
- _classCallCheck(this, rt);
3087
+ function st(e) {
3088
+ _classCallCheck(this, st);
3089
3089
  this._streamedContent = "", this._streamType = "", this._hasStreamEnded = !1, this._messages = e;
3090
3090
  }
3091
- _createClass(rt, [{
3091
+ _createClass(st, [{
3092
3092
  key: "upsertStreamedMessage",
3093
3093
  value: function upsertStreamedMessage(e) {
3094
3094
  var r;
@@ -3107,7 +3107,7 @@ var Wi = /*#__PURE__*/function () {
3107
3107
  key: "setInitialState",
3108
3108
  value: function setInitialState(e, t, i) {
3109
3109
  var _i8;
3110
- this._streamType = e, (_i8 = i) !== null && _i8 !== void 0 ? _i8 : i = v.AI_ROLE, this._elements = e === "text" ? this._messages.addNewTextMessage(t, i) : Ye.add(this._messages, t, i, this._messages.messageElementRefs), this._elements.bubbleElement.classList.add(rt.MESSAGE_CLASS), this._streamedContent = t, this._activeMessageRole = i;
3110
+ this._streamType = e, (_i8 = i) !== null && _i8 !== void 0 ? _i8 : i = v.AI_ROLE, this._elements = e === "text" ? this._messages.addNewTextMessage(t, i) : Ye.add(this._messages, t, i, this._messages.messageElementRefs), this._elements.bubbleElement.classList.add(st.MESSAGE_CLASS), this._streamedContent = t, this._activeMessageRole = i;
3111
3111
  }
3112
3112
  }, {
3113
3113
  key: "updateBasedOnType",
@@ -3125,7 +3125,7 @@ var Wi = /*#__PURE__*/function () {
3125
3125
  value: function updateHTML(e, t, i) {
3126
3126
  if (i) this._streamedContent = e, t.innerHTML = e;else {
3127
3127
  var n = document.createElement("span");
3128
- n.innerHTML = e, t.appendChild(n), this._streamedContent = rt.HTML_CONTENT_PLACEHOLDER;
3128
+ n.innerHTML = e, t.appendChild(n), this._streamedContent = st.HTML_CONTENT_PLACEHOLDER;
3129
3129
  }
3130
3130
  }
3131
3131
  }, {
@@ -3137,23 +3137,23 @@ var Wi = /*#__PURE__*/function () {
3137
3137
  t = _this$_messages.elementRef,
3138
3138
  i = (r = v.getLastMessageBubbleElement(t)) == null ? void 0 : r.classList;
3139
3139
  if (i != null && i.contains("loading-message-text")) throw Error(A.NO_VALID_STREAM_EVENTS_SENT);
3140
- if (!(i != null && i.contains(rt.MESSAGE_CLASS))) return;
3140
+ if (!(i != null && i.contains(st.MESSAGE_CLASS))) return;
3141
3141
  var n = {
3142
3142
  role: this._activeMessageRole || v.AI_ROLE
3143
3143
  };
3144
- this._streamType === "text" ? (e[e.length - 1][1] = this._streamedContent, n.text = this._streamedContent, this._messages.textToSpeech && Nt.speak(this._streamedContent, this._messages.textToSpeech)) : this._streamType === "html" && (this._streamedContent === rt.HTML_CONTENT_PLACEHOLDER && (this._streamedContent = ((o = v.getLastMessageBubbleElement(t)) == null ? void 0 : o.innerHTML) || ""), this._elements && re.apply(this._messages, this._elements.outerContainer), n.html = this._streamedContent), n && (this._messages.messages.push(n), this._messages.sendClientUpdate(Ke.createMessageContent(n), !1)), this._hasStreamEnded = !0;
3144
+ this._streamType === "text" ? (e[e.length - 1][1] = this._streamedContent, n.text = this._streamedContent, this._messages.textToSpeech && Nt.speak(this._streamedContent, this._messages.textToSpeech)) : this._streamType === "html" && (this._streamedContent === st.HTML_CONTENT_PLACEHOLDER && (this._streamedContent = ((o = v.getLastMessageBubbleElement(t)) == null ? void 0 : o.innerHTML) || ""), this._elements && se.apply(this._messages, this._elements.outerContainer), n.html = this._streamedContent), n && (this._messages.messages.push(n), this._messages.sendClientUpdate(Ke.createMessageContent(n), !1)), this._hasStreamEnded = !0;
3145
3145
  }
3146
3146
  }]);
3147
- return rt;
3147
+ return st;
3148
3148
  }();
3149
3149
  Wi.MESSAGE_CLASS = "streamed-message";
3150
3150
  Wi.HTML_CONTENT_PLACEHOLDER = "htmlplaceholder";
3151
3151
  var Ze = Wi;
3152
3152
  var ts = /*#__PURE__*/function () {
3153
- function ot() {
3154
- _classCallCheck(this, ot);
3153
+ function rt() {
3154
+ _classCallCheck(this, rt);
3155
3155
  }
3156
- _createClass(ot, null, [{
3156
+ _createClass(rt, null, [{
3157
3157
  key: "tempRemoveContentHeader",
3158
3158
  value: // need to pass stringifyBody boolean separately as binding is throwing an error for some reason
3159
3159
  // prettier-ignore
@@ -3169,8 +3169,8 @@ var ts = /*#__PURE__*/function () {
3169
3169
  }
3170
3170
  throw new Error("Request settings have not been set up");
3171
3171
  case 2:
3172
- n = e.headers[ot.CONTENT_TYPE];
3173
- delete e.headers[ot.CONTENT_TYPE];
3172
+ n = e.headers[rt.CONTENT_TYPE];
3173
+ delete e.headers[rt.CONTENT_TYPE];
3174
3174
  _context.prev = 4;
3175
3175
  _context.next = 7;
3176
3176
  return t(i);
@@ -3181,9 +3181,9 @@ var ts = /*#__PURE__*/function () {
3181
3181
  case 10:
3182
3182
  _context.prev = 10;
3183
3183
  _context.t0 = _context["catch"](4);
3184
- throw e.headers[ot.CONTENT_TYPE] = n, _context.t0;
3184
+ throw e.headers[rt.CONTENT_TYPE] = n, _context.t0;
3185
3185
  case 13:
3186
- return _context.abrupt("return", (e.headers[ot.CONTENT_TYPE] = n, r));
3186
+ return _context.abrupt("return", (e.headers[rt.CONTENT_TYPE] = n, r));
3187
3187
  case 14:
3188
3188
  case "end":
3189
3189
  return _context.stop();
@@ -3270,7 +3270,7 @@ var ts = /*#__PURE__*/function () {
3270
3270
  return e && _typeof(e) == "object" && (typeof e.error == "string" || typeof e.text == "string" || typeof e.html == "string" || Array.isArray(e.files));
3271
3271
  }
3272
3272
  }]);
3273
- return ot;
3273
+ return rt;
3274
3274
  }();
3275
3275
  ts.CONTENT_TYPE = "Content-Type";
3276
3276
  var _ = ts;
@@ -3412,7 +3412,7 @@ function po(s, e) {
3412
3412
  }
3413
3413
  function _X() {
3414
3414
  _X = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
3415
- var ae, Q, N;
3415
+ var oe, Q, N;
3416
3416
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
3417
3417
  while (1) switch (_context3.prev = _context3.next) {
3418
3418
  case 0:
@@ -3444,7 +3444,7 @@ function po(s, e) {
3444
3444
  _context3.prev = 14;
3445
3445
  _context3.t0 = _context3["catch"](1);
3446
3446
  if (!g.signal.aborted) try {
3447
- N = (ae = a == null ? void 0 : a(_context3.t0)) !== null && ae !== void 0 ? ae : E;
3447
+ N = (oe = a == null ? void 0 : a(_context3.t0)) !== null && oe !== void 0 ? oe : E;
3448
3448
  window.clearTimeout(S), S = window.setTimeout(X, N);
3449
3449
  } catch (N) {
3450
3450
  V(), h(N);
@@ -3465,10 +3465,10 @@ function fo(s) {
3465
3465
  if (!(e != null && e.startsWith(Di))) throw new Error("Expected content-type to be ".concat(Di, ", Actual: ").concat(e));
3466
3466
  }
3467
3467
  var is = /*#__PURE__*/function () {
3468
- function at() {
3469
- _classCallCheck(this, at);
3468
+ function ot() {
3469
+ _classCallCheck(this, ot);
3470
3470
  }
3471
- _createClass(at, null, [{
3471
+ _createClass(ot, null, [{
3472
3472
  key: "generateResponse",
3473
3473
  value: function generateResponse(e) {
3474
3474
  var t = e.messages[e.messages.length - 1];
@@ -3491,15 +3491,15 @@ var is = /*#__PURE__*/function () {
3491
3491
  }, {
3492
3492
  key: "getResponse",
3493
3493
  value: function getResponse(e) {
3494
- return e.customDemoResponse ? at.getCustomResponse(e.customDemoResponse, e.messages[e.messages.length - 1]) : {
3495
- text: at.generateResponse(e)
3494
+ return e.customDemoResponse ? ot.getCustomResponse(e.customDemoResponse, e.messages[e.messages.length - 1]) : {
3495
+ text: ot.generateResponse(e)
3496
3496
  };
3497
3497
  }
3498
3498
  // timeout is used to simulate a timeout for a response to come back
3499
3499
  }, {
3500
3500
  key: "request",
3501
3501
  value: function request(e, t) {
3502
- var i = at.getResponse(t);
3502
+ var i = ot.getResponse(t);
3503
3503
  setTimeout( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
3504
3504
  var r, o, n;
3505
3505
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
@@ -3529,12 +3529,12 @@ var is = /*#__PURE__*/function () {
3529
3529
  key: "requestStream",
3530
3530
  value: function requestStream(e, t) {
3531
3531
  setTimeout(function () {
3532
- var i = at.getResponse(e);
3532
+ var i = ot.getResponse(e);
3533
3533
  C.simulate(e, t, i);
3534
3534
  }, 400);
3535
3535
  }
3536
3536
  }]);
3537
- return at;
3537
+ return ot;
3538
3538
  }();
3539
3539
  is.URL = "deep-chat-demo";
3540
3540
  var ve = is;
@@ -3634,7 +3634,7 @@ var C = /*#__PURE__*/function () {
3634
3634
  },
3635
3635
  onmessage: function onmessage(k) {
3636
3636
  return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
3637
- var G, X, ae, Q, N;
3637
+ var G, X, oe, Q, N;
3638
3638
  return _regeneratorRuntime().wrap(function _callee6$(_context6) {
3639
3639
  while (1) switch (_context6.prev = _context6.next) {
3640
3640
  case 0:
@@ -3654,7 +3654,7 @@ var C = /*#__PURE__*/function () {
3654
3654
  _context6.t0 = Q;
3655
3655
  case 7:
3656
3656
  N = _context6.t0;
3657
- (ae = e.extractResultData) == null || ae.call(e, N).then(function (Fe) {
3657
+ (oe = e.extractResultData) == null || oe.call(e, N).then(function (Fe) {
3658
3658
  h.upsertStreamedMessage(Fe);
3659
3659
  })["catch"](function (Fe) {
3660
3660
  return _.displayError(i, Fe);
@@ -5079,17 +5079,17 @@ var ss = /*#__PURE__*/function (_U) {
5079
5079
  }(U);
5080
5080
  ss.URL_PREFIX = "https://api-inference.huggingface.co/models/";
5081
5081
  var Pe = ss;
5082
- var xt = /*#__PURE__*/function (_Pe) {
5083
- _inherits(xt, _Pe);
5084
- var _super4 = _createSuper(xt);
5082
+ var yt = /*#__PURE__*/function (_Pe) {
5083
+ _inherits(yt, _Pe);
5084
+ var _super4 = _createSuper(yt);
5085
5085
  // prettier-ignore
5086
- function xt(e, t, i, n, r, o) {
5086
+ function yt(e, t, i, n, r, o) {
5087
5087
  var _this9;
5088
- _classCallCheck(this, xt);
5089
- _this9 = _super4.call(this, e, t, i, n, r, o), _this9.isTextInputDisabled = !0, _this9.canSendMessage = xt.canSendFile;
5088
+ _classCallCheck(this, yt);
5089
+ _this9 = _super4.call(this, e, t, i, n, r, o), _this9.isTextInputDisabled = !0, _this9.canSendMessage = yt.canSendFile;
5090
5090
  return _this9;
5091
5091
  }
5092
- _createClass(xt, [{
5092
+ _createClass(yt, [{
5093
5093
  key: "preprocessBody",
5094
5094
  value: function preprocessBody(e, t, i) {
5095
5095
  return i[0];
@@ -5132,10 +5132,10 @@ var xt = /*#__PURE__*/function (_Pe) {
5132
5132
  return !!(t != null && t[0]);
5133
5133
  }
5134
5134
  }]);
5135
- return xt;
5135
+ return yt;
5136
5136
  }(Pe);
5137
- var yo = /*#__PURE__*/function (_xt) {
5138
- _inherits(yo, _xt);
5137
+ var yo = /*#__PURE__*/function (_yt) {
5138
+ _inherits(yo, _yt);
5139
5139
  var _super5 = _createSuper(yo);
5140
5140
  // prettier-ignore
5141
5141
  function yo(e) {
@@ -5185,9 +5185,9 @@ var yo = /*#__PURE__*/function (_xt) {
5185
5185
  }()
5186
5186
  }]);
5187
5187
  return yo;
5188
- }(xt);
5189
- var xo = /*#__PURE__*/function (_xt2) {
5190
- _inherits(xo, _xt2);
5188
+ }(yt);
5189
+ var xo = /*#__PURE__*/function (_yt2) {
5190
+ _inherits(xo, _yt2);
5191
5191
  var _super6 = _createSuper(xo);
5192
5192
  function xo(e) {
5193
5193
  _classCallCheck(this, xo);
@@ -5236,13 +5236,13 @@ var xo = /*#__PURE__*/function (_xt2) {
5236
5236
  }()
5237
5237
  }]);
5238
5238
  return xo;
5239
- }(xt);
5240
- var Et = "data:image/png;base64,";
5241
- var oe = /*#__PURE__*/function () {
5242
- function oe() {
5243
- _classCallCheck(this, oe);
5239
+ }(yt);
5240
+ var xt = "data:image/png;base64,";
5241
+ var re = /*#__PURE__*/function () {
5242
+ function re() {
5243
+ _classCallCheck(this, re);
5244
5244
  }
5245
- _createClass(oe, null, [{
5245
+ _createClass(re, null, [{
5246
5246
  key: "buildHeaders",
5247
5247
  value: function buildHeaders(e) {
5248
5248
  return {
@@ -5262,11 +5262,11 @@ var oe = /*#__PURE__*/function () {
5262
5262
  return {
5263
5263
  url: "https://api.stability.ai/v1/engines/list",
5264
5264
  method: "GET",
5265
- handleVerificationResult: oe.handleVerificationResult
5265
+ handleVerificationResult: re.handleVerificationResult
5266
5266
  };
5267
5267
  }
5268
5268
  }]);
5269
- return oe;
5269
+ return re;
5270
5270
  }();
5271
5271
  var ni = /*#__PURE__*/function (_U2) {
5272
5272
  _inherits(ni, _U2);
@@ -5297,7 +5297,7 @@ var zt = /*#__PURE__*/function (_ni) {
5297
5297
  }
5298
5298
  }
5299
5299
  };
5300
- _this11 = _super8.call(this, e, oe.buildKeyVerificationDetails(), oe.buildHeaders, i, n), _this11.url = "https://api.stability.ai/v1/generation/esrgan-v1-x2plus/image-to-image/upscale", _this11.textInputPlaceholderText = "Describe image changes", _this11.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Stability AI</b></div>\n <div style=\"width: 100%; text-align: center; margin-left: -10px; margin-top: 5px\"><b>Image to Image Upscale</b></div>\n <p>Upload an image to generate a new one with higher resolution.</p>\n <p>Click <a href=\"https://platform.stability.ai/\">here</a> for more info.</p>";
5300
+ _this11 = _super8.call(this, e, re.buildKeyVerificationDetails(), re.buildHeaders, i, n), _this11.url = "https://api.stability.ai/v1/generation/esrgan-v1-x2plus/image-to-image/upscale", _this11.textInputPlaceholderText = "Describe image changes", _this11.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Stability AI</b></div>\n <div style=\"width: 100%; text-align: center; margin-left: -10px; margin-top: 5px\"><b>Image to Image Upscale</b></div>\n <p>Upload an image to generate a new one with higher resolution.</p>\n <p>Click <a href=\"https://platform.stability.ai/\">here</a> for more info.</p>";
5301
5301
  var r = (o = t == null ? void 0 : t.stabilityAI) == null ? void 0 : o.imageToImageUpscale;
5302
5302
  _typeof(r) == "object" && (r.engine_id && (_this11.url = "https://api.stability.ai/v1/generation/".concat(r.engine_id, "/image-to-image/upscale")), zt.cleanConfig(r), Object.assign(_this11.rawBody, r)), _this11.canSendMessage = zt.canSendFileMessage;
5303
5303
  return _this11;
@@ -5360,7 +5360,7 @@ var zt = /*#__PURE__*/function (_ni) {
5360
5360
  return _context28.abrupt("return", {
5361
5361
  files: e.artifacts.map(function (i) {
5362
5362
  return {
5363
- src: "".concat(Et).concat(i.base64),
5363
+ src: "".concat(xt).concat(i.base64),
5364
5364
  type: "image"
5365
5365
  };
5366
5366
  })
@@ -5406,7 +5406,7 @@ var Ut = /*#__PURE__*/function (_ni2) {
5406
5406
  }
5407
5407
  }
5408
5408
  };
5409
- _this12 = _super9.call(this, e, oe.buildKeyVerificationDetails(), oe.buildHeaders, i, n), _this12.url = "https://api.stability.ai/v1/generation/stable-diffusion-xl-1024-v1-0/image-to-image/masking", _this12._maskSource = "MASK_IMAGE_WHITE", _this12.textInputPlaceholderText = "Describe image changes", _this12.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Stability AI</b></div>\n <div style=\"width: 100%; text-align: center; margin-left: -10px; margin-top: 5px\"><b>Image to Image Masking</b></div>\n <p>Upload an image, its mask image to create a new one based on the changes you have described for the mask area.</p>\n <p>Click <a href=\"https://platform.stability.ai/\">here</a> for more info.</p>";
5409
+ _this12 = _super9.call(this, e, re.buildKeyVerificationDetails(), re.buildHeaders, i, n), _this12.url = "https://api.stability.ai/v1/generation/stable-diffusion-xl-1024-v1-0/image-to-image/masking", _this12._maskSource = "MASK_IMAGE_WHITE", _this12.textInputPlaceholderText = "Describe image changes", _this12.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Stability AI</b></div>\n <div style=\"width: 100%; text-align: center; margin-left: -10px; margin-top: 5px\"><b>Image to Image Masking</b></div>\n <p>Upload an image, its mask image to create a new one based on the changes you have described for the mask area.</p>\n <p>Click <a href=\"https://platform.stability.ai/\">here</a> for more info.</p>";
5410
5410
  var r = (o = t == null ? void 0 : t.stabilityAI) == null ? void 0 : o.imageToImageMasking;
5411
5411
  _typeof(r) == "object" && (r.engine_id && (_this12.url = "https://api.stability.ai/v1/generation/".concat(r.engine_id, "/image-to-image/masking")), r.weight !== void 0 && r.weight !== null && (_this12._imageWeight = r.weight), r.mask_source !== void 0 && r.mask_source !== null && (_this12._maskSource = r.mask_source), Ut.cleanConfig(r), Object.assign(_this12.rawBody, r)), _this12.canSendMessage = Ut.canSendFileTextMessage;
5412
5412
  return _this12;
@@ -5469,7 +5469,7 @@ var Ut = /*#__PURE__*/function (_ni2) {
5469
5469
  return _context30.abrupt("return", {
5470
5470
  files: e.artifacts.map(function (i) {
5471
5471
  return {
5472
- src: "".concat(Et).concat(i.base64),
5472
+ src: "".concat(xt).concat(i.base64),
5473
5473
  type: "image"
5474
5474
  };
5475
5475
  })
@@ -5498,8 +5498,8 @@ var Ut = /*#__PURE__*/function (_ni2) {
5498
5498
  }]);
5499
5499
  return Ut;
5500
5500
  }(ni);
5501
- var Eo = /*#__PURE__*/function (_xt3) {
5502
- _inherits(Eo, _xt3);
5501
+ var Eo = /*#__PURE__*/function (_yt3) {
5502
+ _inherits(Eo, _yt3);
5503
5503
  var _super10 = _createSuper(Eo);
5504
5504
  function Eo(e) {
5505
5505
  _classCallCheck(this, Eo);
@@ -5547,7 +5547,7 @@ var Eo = /*#__PURE__*/function (_xt3) {
5547
5547
  }()
5548
5548
  }]);
5549
5549
  return Eo;
5550
- }(xt);
5550
+ }(yt);
5551
5551
  var So = /*#__PURE__*/function (_Pe2) {
5552
5552
  _inherits(So, _Pe2);
5553
5553
  var _super11 = _createSuper(So);
@@ -5785,7 +5785,7 @@ var qt = /*#__PURE__*/function (_ni3) {
5785
5785
  }
5786
5786
  }
5787
5787
  };
5788
- _this15 = _super15.call(this, e, oe.buildKeyVerificationDetails(), oe.buildHeaders, i, n), _this15.url = "https://api.stability.ai/v1/generation/stable-diffusion-v1-6/image-to-image", _this15.textInputPlaceholderText = "Describe image changes", _this15.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Stability AI: Image to Image</b></div>\n <p>Upload an image to create a new one with the changes you have described.</p>\n <p>Click <a href=\"https://platform.stability.ai/\">here</a> for more info.</p>";
5788
+ _this15 = _super15.call(this, e, re.buildKeyVerificationDetails(), re.buildHeaders, i, n), _this15.url = "https://api.stability.ai/v1/generation/stable-diffusion-v1-6/image-to-image", _this15.textInputPlaceholderText = "Describe image changes", _this15.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Stability AI: Image to Image</b></div>\n <p>Upload an image to create a new one with the changes you have described.</p>\n <p>Click <a href=\"https://platform.stability.ai/\">here</a> for more info.</p>";
5789
5789
  var r = (o = t.stabilityAI) == null ? void 0 : o.imageToImage;
5790
5790
  _typeof(r) == "object" && (r.engine_id && (_this15.url = "https://api.stability.ai/v1/generation/".concat(r.engine_id, "/text-to-image")), r.weight !== void 0 && r.weight !== null && (_this15._imageWeight = r.weight), qt.cleanConfig(r), Object.assign(_this15.rawBody, r)), _this15.canSendMessage = qt.canSendFileTextMessage;
5791
5791
  return _this15;
@@ -5848,7 +5848,7 @@ var qt = /*#__PURE__*/function (_ni3) {
5848
5848
  return _context37.abrupt("return", {
5849
5849
  files: e.artifacts.map(function (i) {
5850
5850
  return {
5851
- src: "".concat(Et).concat(i.base64),
5851
+ src: "".concat(xt).concat(i.base64),
5852
5852
  type: "image"
5853
5853
  };
5854
5854
  })
@@ -5926,7 +5926,7 @@ var Ht = /*#__PURE__*/function (_ni4) {
5926
5926
  var r;
5927
5927
  var t = JSON.parse(JSON.stringify(e.directConnection)),
5928
5928
  i = t.stabilityAI;
5929
- _this16 = _super17.call(this, e, oe.buildKeyVerificationDetails(), oe.buildHeaders, i), _this16.url = "https://api.stability.ai/v1/generation/stable-diffusion-v1-6/text-to-image", _this16.textInputPlaceholderText = "Describe an image", _this16.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Stability AI: Text to Image</b></div>\n <p>Insert text to generate an image.</p>\n <p>Click <a href=\"https://platform.stability.ai/\">here</a> for more info.</p>";
5929
+ _this16 = _super17.call(this, e, re.buildKeyVerificationDetails(), re.buildHeaders, i), _this16.url = "https://api.stability.ai/v1/generation/stable-diffusion-v1-6/text-to-image", _this16.textInputPlaceholderText = "Describe an image", _this16.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Stability AI: Text to Image</b></div>\n <p>Insert text to generate an image.</p>\n <p>Click <a href=\"https://platform.stability.ai/\">here</a> for more info.</p>";
5930
5930
  var n = (r = t.stabilityAI) == null ? void 0 : r.textToImage;
5931
5931
  _typeof(n) == "object" && (n.engine_id && (_this16.url = "https://api.stability.ai/v1/generation/".concat(n.engine_id, "/text-to-image")), n.weight !== void 0 && n.weight !== null && (_this16._imageWeight = n.weight), Ht.cleanConfig(n), Object.assign(_this16.rawBody, n)), _this16.canSendMessage = Ht.canSendTextMessage;
5932
5932
  return _this16;
@@ -5983,7 +5983,7 @@ var Ht = /*#__PURE__*/function (_ni4) {
5983
5983
  return _context40.abrupt("return", {
5984
5984
  files: e.artifacts.map(function (i) {
5985
5985
  return {
5986
- src: "".concat(Et).concat(i.base64),
5986
+ src: "".concat(xt).concat(i.base64),
5987
5987
  type: "image"
5988
5988
  };
5989
5989
  })
@@ -6869,11 +6869,11 @@ var Oo = /*#__PURE__*/function (_Ro) {
6869
6869
  }]);
6870
6870
  return Oo;
6871
6871
  }(Ro);
6872
- var dt = /*#__PURE__*/function () {
6873
- function dt() {
6874
- _classCallCheck(this, dt);
6872
+ var ct = /*#__PURE__*/function () {
6873
+ function ct() {
6874
+ _classCallCheck(this, ct);
6875
6875
  }
6876
- _createClass(dt, null, [{
6876
+ _createClass(ct, null, [{
6877
6877
  key: "poll",
6878
6878
  value: function () {
6879
6879
  var _poll2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee56(e, t) {
@@ -6969,11 +6969,11 @@ var dt = /*#__PURE__*/function () {
6969
6969
  return {
6970
6970
  url: "https://api.assemblyai.com/v2/upload",
6971
6971
  method: "POST",
6972
- handleVerificationResult: dt.handleVerificationResult
6972
+ handleVerificationResult: ct.handleVerificationResult
6973
6973
  };
6974
6974
  }
6975
6975
  }]);
6976
- return dt;
6976
+ return ct;
6977
6977
  }();
6978
6978
  var Yi = /*#__PURE__*/function (_U7) {
6979
6979
  _inherits(Yi, _U7);
@@ -6983,7 +6983,7 @@ var Yi = /*#__PURE__*/function (_U7) {
6983
6983
  _classCallCheck(this, Yi);
6984
6984
  var i;
6985
6985
  var t = (i = e.directConnection) == null ? void 0 : i.assemblyAI;
6986
- _this23 = _super26.call(this, e, dt.buildKeyVerificationDetails(), dt.buildHeaders, t, {
6986
+ _this23 = _super26.call(this, e, ct.buildKeyVerificationDetails(), ct.buildHeaders, t, {
6987
6987
  audio: {}
6988
6988
  }), _this23.insertKeyPlaceholderText = "AssemblyAI API Key", _this23.getKeyLink = "https://www.assemblyai.com/app/account", _this23.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>AssemblyAI Audio</b></div>\n <p><b>Upload an audio file</b> to transcribe it into text.\n <p>\n Click <a href=\"https://www.assemblyai.com/docs/Guides/transcribing_an_audio_file#get-started\">here</a> for more info.\n </p>", _this23.url = "https://api.assemblyai.com/v2/upload", _this23.isTextInputDisabled = !0, _this23.textInputPlaceholderText = "Upload an audio file", _this23.permittedErrorPrefixes = ["Authentication", "Invalid"], _this23.canSendMessage = Yi.canFileSendMessage;
6989
6989
  return _this23;
@@ -7036,7 +7036,7 @@ var Yi = /*#__PURE__*/function (_U7) {
7036
7036
  case 2:
7037
7037
  t = (r = (n = this.requestSettings) == null ? void 0 : n.headers) == null ? void 0 : r.Authorization;
7038
7038
  _context58.next = 5;
7039
- return dt.poll(t, e.upload_url);
7039
+ return ct.poll(t, e.upload_url);
7040
7040
  case 5:
7041
7041
  _context58.t0 = _context58.sent.text;
7042
7042
  return _context58.abrupt("return", {
@@ -7332,12 +7332,12 @@ var Do = /*#__PURE__*/function (_U9) {
7332
7332
  return Do;
7333
7333
  }(U);
7334
7334
  var Zi = /*#__PURE__*/function (_U10) {
7335
- _inherits(le, _U10);
7336
- var _super31 = _createSuper(le);
7337
- function le(e) {
7335
+ _inherits(ae, _U10);
7336
+ var _super31 = _createSuper(ae);
7337
+ function ae(e) {
7338
7338
  var _l$headers, _c$OpenAIBeta;
7339
7339
  var _this28;
7340
- _classCallCheck(this, le);
7340
+ _classCallCheck(this, ae);
7341
7341
  var r, o, a, l, c;
7342
7342
  var t = JSON.parse(JSON.stringify(e.directConnection)),
7343
7343
  i = t.openAI;
@@ -7352,7 +7352,7 @@ var Zi = /*#__PURE__*/function (_U10) {
7352
7352
  (_l$headers = (l = _this28.requestSettings).headers) !== null && _l$headers !== void 0 ? _l$headers : l.headers = {}, (_c$OpenAIBeta = (c = _this28.requestSettings.headers)["OpenAI-Beta"]) !== null && _c$OpenAIBeta !== void 0 ? _c$OpenAIBeta : c["OpenAI-Beta"] = "assistants=v1", _this28.maxMessages = 1;
7353
7353
  return _this28;
7354
7354
  }
7355
- _createClass(le, [{
7355
+ _createClass(ae, [{
7356
7356
  key: "processMessage",
7357
7357
  value: function processMessage(e, t) {
7358
7358
  var i = this.totalMessagesMaxCharLength || -1;
@@ -7375,11 +7375,11 @@ var Zi = /*#__PURE__*/function (_U10) {
7375
7375
  key: "callService",
7376
7376
  value: function callService(e, t, i) {
7377
7377
  if (this.sessionId) {
7378
- this.url = "".concat(le.THREAD_PREFIX, "/").concat(this.sessionId, "/messages");
7378
+ this.url = "".concat(ae.THREAD_PREFIX, "/").concat(this.sessionId, "/messages");
7379
7379
  var n = this.processMessage(t, i);
7380
7380
  w.request(this, n, e);
7381
7381
  } else {
7382
- this.url = "".concat(le.THREAD_PREFIX, "/runs");
7382
+ this.url = "".concat(ae.THREAD_PREFIX, "/runs");
7383
7383
  var _n2 = this.createNewThreadMessages(this.rawBody, t, i);
7384
7384
  w.request(this, _n2, e);
7385
7385
  }
@@ -7451,7 +7451,7 @@ var Zi = /*#__PURE__*/function (_U10) {
7451
7451
  _context66.next = 4;
7452
7452
  return this.assignThreadAndRun(e);
7453
7453
  case 4:
7454
- t = "".concat(le.THREAD_PREFIX, "/").concat(this.sessionId, "/runs/").concat(this.run_id), i = {
7454
+ t = "".concat(ae.THREAD_PREFIX, "/").concat(this.sessionId, "/runs/").concat(this.run_id), i = {
7455
7455
  method: "GET",
7456
7456
  headers: (n = this.requestSettings) == null ? void 0 : n.headers
7457
7457
  };
@@ -7481,7 +7481,7 @@ var Zi = /*#__PURE__*/function (_U10) {
7481
7481
  _context67.next = 8;
7482
7482
  break;
7483
7483
  }
7484
- this.url = "".concat(le.THREAD_PREFIX, "/").concat(this.sessionId, "/runs");
7484
+ this.url = "".concat(ae.THREAD_PREFIX, "/").concat(this.sessionId, "/runs");
7485
7485
  _context67.next = 4;
7486
7486
  return O.directFetch(this, JSON.parse(JSON.stringify(this.rawBody)), "POST");
7487
7487
  case 4:
@@ -7516,14 +7516,14 @@ var Zi = /*#__PURE__*/function (_U10) {
7516
7516
  break;
7517
7517
  }
7518
7518
  return _context68.abrupt("return", {
7519
- timeoutMS: le.POLLING_TIMEOUT_MS
7519
+ timeoutMS: ae.POLLING_TIMEOUT_MS
7520
7520
  });
7521
7521
  case 3:
7522
7522
  if (!(t === "completed" && this.messages)) {
7523
7523
  _context68.next = 10;
7524
7524
  break;
7525
7525
  }
7526
- this.url = "".concat(le.THREAD_PREFIX, "/").concat(e.thread_id, "/messages");
7526
+ this.url = "".concat(ae.THREAD_PREFIX, "/").concat(e.thread_id, "/messages");
7527
7527
  _context68.next = 7;
7528
7528
  return O.directFetch(this, {}, "GET");
7529
7529
  case 7:
@@ -7594,14 +7594,14 @@ var Zi = /*#__PURE__*/function (_U10) {
7594
7594
  output: r
7595
7595
  };
7596
7596
  });
7597
- this.url = "".concat(le.THREAD_PREFIX, "/").concat(this.sessionId, "/runs/").concat(this.run_id, "/submit_tool_outputs");
7597
+ this.url = "".concat(ae.THREAD_PREFIX, "/").concat(this.sessionId, "/runs/").concat(this.run_id, "/submit_tool_outputs");
7598
7598
  _context69.next = 12;
7599
7599
  return O.directFetch(this, {
7600
7600
  tool_outputs: n
7601
7601
  }, "POST");
7602
7602
  case 12:
7603
7603
  return _context69.abrupt("return", {
7604
- timeoutMS: le.POLLING_TIMEOUT_MS
7604
+ timeoutMS: ae.POLLING_TIMEOUT_MS
7605
7605
  });
7606
7606
  case 13:
7607
7607
  case "end":
@@ -7615,7 +7615,7 @@ var Zi = /*#__PURE__*/function (_U10) {
7615
7615
  return handleTools;
7616
7616
  }()
7617
7617
  }]);
7618
- return le;
7618
+ return ae;
7619
7619
  }(U);
7620
7620
  Zi.THREAD_PREFIX = "https://api.openai.com/v1/threads";
7621
7621
  Zi.POLLING_TIMEOUT_MS = 800;
@@ -7732,7 +7732,7 @@ var ri = /*#__PURE__*/function (_U11) {
7732
7732
  src: i.url,
7733
7733
  type: "image"
7734
7734
  } : {
7735
- src: "".concat(Et).concat(i.b64_json),
7735
+ src: "".concat(xt).concat(i.b64_json),
7736
7736
  type: "image"
7737
7737
  };
7738
7738
  })
@@ -7776,20 +7776,20 @@ ri.IMAGE_GENERATION_URL = "https://api.openai.com/v1/images/generations";
7776
7776
  ri.IMAGE_VARIATIONS_URL = "https://api.openai.com/v1/images/variations";
7777
7777
  ri.IMAGE_EDIT_URL = "https://api.openai.com/v1/images/edits";
7778
7778
  var Bo = ri;
7779
- var ut = /*#__PURE__*/function (_U12) {
7780
- _inherits(ut, _U12);
7781
- var _super33 = _createSuper(ut);
7782
- function ut(e) {
7779
+ var dt = /*#__PURE__*/function (_U12) {
7780
+ _inherits(dt, _U12);
7781
+ var _super33 = _createSuper(dt);
7782
+ function dt(e) {
7783
7783
  var _this30$maxMessages, _l$model;
7784
7784
  var _this30;
7785
- _classCallCheck(this, ut);
7785
+ _classCallCheck(this, dt);
7786
7786
  var r, o, a, l;
7787
7787
  var t = JSON.parse(JSON.stringify(e.directConnection)),
7788
7788
  i = t.openAI;
7789
- _this30 = _super33.call(this, e, O.buildKeyVerificationDetails(), O.buildHeaders, i), _this30.insertKeyPlaceholderText = "OpenAI API Key", _this30.getKeyLink = "https://platform.openai.com/account/api-keys", _this30.url = "https://api.openai.com/v1/chat/completions", _this30.permittedErrorPrefixes = ["Incorrect"], _this30._systemMessage = ut.generateSystemMessage("You are a helpful assistant.");
7789
+ _this30 = _super33.call(this, e, O.buildKeyVerificationDetails(), O.buildHeaders, i), _this30.insertKeyPlaceholderText = "OpenAI API Key", _this30.getKeyLink = "https://platform.openai.com/account/api-keys", _this30.url = "https://api.openai.com/v1/chat/completions", _this30.permittedErrorPrefixes = ["Incorrect"], _this30._systemMessage = dt.generateSystemMessage("You are a helpful assistant.");
7790
7790
  var n = (r = t.openAI) == null ? void 0 : r.chat;
7791
7791
  if (_typeof(n) == "object") {
7792
- n.system_prompt && (_this30._systemMessage = ut.generateSystemMessage(n.system_prompt));
7792
+ n.system_prompt && (_this30._systemMessage = dt.generateSystemMessage(n.system_prompt));
7793
7793
  var _ref9 = (a = (o = e.directConnection) == null ? void 0 : o.openAI) == null ? void 0 : a.chat,
7794
7794
  c = _ref9.function_handler;
7795
7795
  c && (_this30._functionHandler = c), _this30.cleanConfig(n), Object.assign(_this30.rawBody, n);
@@ -7797,7 +7797,7 @@ var ut = /*#__PURE__*/function (_U12) {
7797
7797
  (_this30$maxMessages = _this30.maxMessages) !== null && _this30$maxMessages !== void 0 ? _this30$maxMessages : _this30.maxMessages = -1, (_l$model = (l = _this30.rawBody).model) !== null && _l$model !== void 0 ? _l$model : l.model = "gpt-3.5-turbo";
7798
7798
  return _this30;
7799
7799
  }
7800
- _createClass(ut, [{
7800
+ _createClass(dt, [{
7801
7801
  key: "cleanConfig",
7802
7802
  value: function cleanConfig(e) {
7803
7803
  delete e.system_prompt, delete e.function_handler;
@@ -7811,7 +7811,7 @@ var ut = /*#__PURE__*/function (_U12) {
7811
7811
  var i = JSON.parse(JSON.stringify(e)),
7812
7812
  n = Xe.getCharacterLimitMessages(t, this.totalMessagesMaxCharLength ? this.totalMessagesMaxCharLength - this._systemMessage.content.length : -1).map(function (r) {
7813
7813
  return {
7814
- content: ut.getContent(r),
7814
+ content: dt.getContent(r),
7815
7815
  role: r.role === v.USER_ROLE ? "user" : "assistant"
7816
7816
  };
7817
7817
  });
@@ -7982,7 +7982,7 @@ var ut = /*#__PURE__*/function (_U12) {
7982
7982
  return e.text;
7983
7983
  }
7984
7984
  }]);
7985
- return ut;
7985
+ return dt;
7986
7986
  }(U);
7987
7987
  var Fo = /*#__PURE__*/function (_Ji3) {
7988
7988
  _inherits(Fo, _Ji3);
@@ -8069,40 +8069,36 @@ var Fo = /*#__PURE__*/function (_Ji3) {
8069
8069
  }]);
8070
8070
  return Fo;
8071
8071
  }(Ji);
8072
- var et = /*#__PURE__*/function () {
8073
- function ne() {
8074
- _classCallCheck(this, ne);
8072
+ var Et = /*#__PURE__*/function () {
8073
+ function pe() {
8074
+ _classCallCheck(this, pe);
8075
8075
  }
8076
- _createClass(ne, null, [{
8076
+ _createClass(pe, null, [{
8077
8077
  key: "enableButtons",
8078
- value: function enableButtons(e, t, i) {
8079
- var n = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0;
8080
- window.webLLM ? (e && (e.disabled = !1), t && (t.disabled = !1), i && (i.disabled = !1)) : n < cs.MODULE_SEARCH_LIMIT_S * 4 && setTimeout(function () {
8081
- return ne.enableButtons(e, t, i, n + 1);
8078
+ value: function enableButtons(e, t) {
8079
+ var i = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
8080
+ window.webLLM ? (e && (e.disabled = !1), t && (t.disabled = !1)) : i < cs.MODULE_SEARCH_LIMIT_S * 4 && setTimeout(function () {
8081
+ return pe.enableButtons(e, t, i + 1);
8082
8082
  }, 250);
8083
8083
  }
8084
8084
  }, {
8085
8085
  key: "setUpInitial",
8086
8086
  value: function setUpInitial(e, t, i) {
8087
- var n = (t == null ? void 0 : t.downloadClass) || ne.DOWNLOAD_BUTTON_CLASS,
8088
- r = (t == null ? void 0 : t.uploadClass) || ne.UPLOAD_BUTTON_CLASS,
8089
- o = (t == null ? void 0 : t.fileInputClass) || ne.FILE_INPUT_CLASS,
8090
- a = (t == null ? void 0 : t.clearCacheClass) || ne.CLEAR_CACHE_CLASS;
8087
+ var n = (t == null ? void 0 : t.downloadClass) || pe.DOWNLOAD_BUTTON_CLASS,
8088
+ r = (t == null ? void 0 : t.uploadClass) || pe.UPLOAD_BUTTON_CLASS,
8089
+ o = (t == null ? void 0 : t.fileInputClass) || pe.FILE_INPUT_CLASS;
8091
8090
  return setTimeout(function () {
8092
- var l = i == null ? void 0 : i.getElementsByClassName(o)[0],
8093
- c = i == null ? void 0 : i.getElementsByClassName(n)[0],
8094
- d = i == null ? void 0 : i.getElementsByClassName(r)[0],
8095
- u = i == null ? void 0 : i.getElementsByClassName(a)[0];
8096
- c && (c.onclick = function () {
8091
+ var a = i == null ? void 0 : i.getElementsByClassName(n)[0],
8092
+ l = i == null ? void 0 : i.getElementsByClassName(o)[0],
8093
+ c = i == null ? void 0 : i.getElementsByClassName(r)[0];
8094
+ a && (a.onclick = function () {
8097
8095
  return e();
8098
8096
  }), l && (l.onchange = function () {
8099
8097
  l.files && l.files.length > 0 && e(l.files);
8100
- }), d && (d.onclick = function () {
8098
+ }), c && (c.onclick = function () {
8101
8099
  return l.click();
8102
- }), u && (d.onclick = function () {
8103
- return ne.clearCache;
8104
- }), (c || d || u) && ne.enableButtons(c, d, u);
8105
- }), (t == null ? void 0 : t.initialHtml) || "<div>\n Download or upload a web model that will run entirely on your browser. <br/> \n <button disabled class=\"".concat(n, " deep-chat-button deep-chat-web-model-button\">Download</button>\n <input type=\"file\" class=\"").concat(o, "\" hidden multiple />\n <button disabled class=\"").concat(r, " deep-chat-button deep-chat-web-model-button\">Upload</button>\n <button disabled class=\"").concat(a, " deep-chat-button deep-chat-web-model-button\">Clear cache</button>\n </div>");
8100
+ }), (a || c) && pe.enableButtons(a, c);
8101
+ }), (t == null ? void 0 : t.initialHtml) || "<div>\n Download or upload a web model that will run entirely on your browser: <br/> \n <button disabled class=\"".concat(n, " deep-chat-button deep-chat-web-model-button\">Download</button>\n <input type=\"file\" class=\"").concat(o, "\" hidden multiple />\n <button disabled class=\"").concat(r, " deep-chat-button deep-chat-web-model-button\">Upload</button>\n </div>");
8106
8102
  }
8107
8103
  }, {
8108
8104
  key: "exportFile",
@@ -8125,34 +8121,22 @@ var et = /*#__PURE__*/function () {
8125
8121
  }, {
8126
8122
  key: "setUpAfterLoad",
8127
8123
  value: function setUpAfterLoad(e, t, i) {
8128
- var n = (t == null ? void 0 : t.exportFilesClass) || ne.EXPORT_BUTTON_CLASS;
8124
+ var n = (t == null ? void 0 : t.exportFilesClass) || pe.EXPORT_BUTTON_CLASS;
8129
8125
  return setTimeout(function () {
8130
8126
  var r = i == null ? void 0 : i.getElementsByClassName(n)[0];
8131
8127
  r && (r.onclick = function () {
8132
- return ne.exportFile(e);
8133
- });
8134
- }), (t == null ? void 0 : t.afterLoadHtml) || "<div>\n Model loaded successfully and has been cached for future requests. <br/>\n <button class=\"".concat(n, " deep-chat-button deep-chat-web-model-button\">Export Files</button>\n </div>");
8135
- }
8136
- }, {
8137
- key: "clearCache",
8138
- value: function clearCache() {
8139
- caches.open("webllm/model").then(function (e) {
8140
- e.keys().then(function (t) {
8141
- t.forEach(function (i) {
8142
- e["delete"](i);
8143
- });
8128
+ return pe.exportFile(e);
8144
8129
  });
8145
- });
8130
+ }), (t == null ? void 0 : t.afterLoadHtml) || "<div>\n Model loaded successfully and has been cached for future requests. <br/>\n <button style=\"margin-top: 5px\" class=\"".concat(n, " deep-chat-button\">Export</button>\n </div>");
8146
8131
  }
8147
8132
  }]);
8148
- return ne;
8133
+ return pe;
8149
8134
  }();
8150
- et.DOWNLOAD_BUTTON_CLASS = "deep-chat-download-button";
8151
- et.UPLOAD_BUTTON_CLASS = "deep-chat-upload-button";
8152
- et.FILE_INPUT_CLASS = "deep-chat-file-input";
8153
- et.CLEAR_CACHE_CLASS = "deep-chat-clear-cache-button";
8154
- et.EXPORT_BUTTON_CLASS = "deep-chat-export-button";
8155
- var vn = et;
8135
+ Et.DOWNLOAD_BUTTON_CLASS = "deep-chat-download-button";
8136
+ Et.UPLOAD_BUTTON_CLASS = "deep-chat-upload-button";
8137
+ Et.FILE_INPUT_CLASS = "deep-chat-file-input";
8138
+ Et.EXPORT_BUTTON_CLASS = "deep-chat-export-button";
8139
+ var vn = Et;
8156
8140
  var yn = {
8157
8141
  model_list: [{
8158
8142
  model_url: "https://huggingface.co/mlc-ai/mlc-chat-Llama-2-7b-chat-hf-q4f32_1/resolve/main/",
@@ -8245,18 +8229,18 @@ var yn = {
8245
8229
  },
8246
8230
  use_web_worker: !0
8247
8231
  },
8248
- tt = /*#__PURE__*/function (_Le2) {
8249
- _inherits(T, _Le2);
8250
- var _super35 = _createSuper(T);
8251
- function T(e) {
8232
+ et = /*#__PURE__*/function (_Le2) {
8233
+ _inherits(M, _Le2);
8234
+ var _super35 = _createSuper(M);
8235
+ function M(e) {
8252
8236
  var _this32;
8253
- _classCallCheck(this, T);
8254
- var t;
8255
- _this32 = _super35.call(this, e), _this32._isModelLoaded = !1, _this32._isModelLoading = !1, _this32._loadOnFirstMessage = !1, _this32._webModel = {}, _this32.permittedErrorPrefixes = [T.MULTIPLE_MODELS_ERROR, T.WEB_LLM_NOT_FOUND_ERROR, T.GENERIC_ERROR], _this32._conversationHistory = [], _typeof(e.webModel) == "object" && (_this32._webModel = e.webModel), _this32.findModelInWindow(e), _this32.canSendMessage = _this32.canSubmit.bind(_assertThisInitialized(_this32)), _this32._chatEl = (t = e.shadowRoot) == null ? void 0 : t.children[0], e.initialMessages && T.setUpHistory(_this32._conversationHistory, e.initialMessages);
8237
+ _classCallCheck(this, M);
8238
+ var t, i;
8239
+ _this32 = _super35.call(this, e), _this32._isModelLoaded = !1, _this32._isModelLoading = !1, _this32._loadOnFirstMessage = !1, _this32._webModel = {}, _this32.permittedErrorPrefixes = [M.MULTIPLE_MODELS_ERROR, M.WEB_LLM_NOT_FOUND_ERROR, M.GENERIC_ERROR], _this32._conversationHistory = [], _typeof(e.webModel) == "object" && (_this32._webModel = e.webModel), (t = _this32._webModel.load) != null && t.clearCache && M.clearAllCache(), _this32.findModelInWindow(e), _this32.canSendMessage = _this32.canSubmit.bind(_assertThisInitialized(_this32)), _this32._chatEl = (i = e.shadowRoot) == null ? void 0 : i.children[0], e.initialMessages && M.setUpHistory(_this32._conversationHistory, e.initialMessages);
8256
8240
  return _this32;
8257
8241
  }
8258
8242
  // need ref of messages object as web model exhibits unique behaviour to manipulate chat
8259
- _createClass(T, [{
8243
+ _createClass(M, [{
8260
8244
  key: "setUpMessages",
8261
8245
  value: function setUpMessages(e) {
8262
8246
  var _this33 = this;
@@ -8270,7 +8254,7 @@ var yn = {
8270
8254
  var _this34 = this;
8271
8255
  var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
8272
8256
  var i;
8273
- window.webLLM ? this.configureInit(this.shouldAddInitialMessage(e.introMessage)) : t > T.MODULE_SEARCH_LIMIT_S ? ((i = this._messages) == null || i.addNewErrorMessage("service", T.WEB_LLM_NOT_FOUND_ERROR), console.error("The WebLLM module is either not in the project or not been attached to the window object. Please see the following guide:"), console.error("Hello World")) : setTimeout(function () {
8257
+ window.webLLM ? this.configureInit(this.shouldAddInitialMessage(e.introMessage)) : t > M.MODULE_SEARCH_LIMIT_S ? ((i = this._messages) == null || i.addNewErrorMessage("service", M.WEB_LLM_NOT_FOUND_ERROR), console.error("The WebLLM module is either not in the project or not been attached to the window object. Please see the following guide:"), console.error("Hello World")) : setTimeout(function () {
8274
8258
  return _this34.findModelInWindow(e, t + 1);
8275
8259
  }, 1e3);
8276
8260
  }
@@ -8371,8 +8355,8 @@ var yn = {
8371
8355
  key: "attemptToCreateChat",
8372
8356
  value: function attemptToCreateChat() {
8373
8357
  var t;
8374
- if (T.chat) {
8375
- (t = this._messages) == null || t.addNewErrorMessage("service", T.MULTIPLE_MODELS_ERROR), console.error(T.MULTIPLE_MODELS_ERROR);
8358
+ if (M.chat) {
8359
+ (t = this._messages) == null || t.addNewErrorMessage("service", M.MULTIPLE_MODELS_ERROR), console.error(M.MULTIPLE_MODELS_ERROR);
8376
8360
  return;
8377
8361
  }
8378
8362
  if (this._isModelLoaded || this._isModelLoading) return;
@@ -8382,21 +8366,21 @@ var yn = {
8382
8366
  }, {
8383
8367
  key: "getConfig",
8384
8368
  value: function getConfig() {
8385
- var i, n;
8386
- var e = T.DEFAULT_MODEL;
8369
+ var i, n, r;
8370
+ var e = M.DEFAULT_MODEL;
8387
8371
  this._webModel.model && (e = this._webModel.model);
8388
8372
  var t = JSON.parse(JSON.stringify(yn));
8389
8373
  if ((i = this._webModel.urls) != null && i.model) {
8390
- var r = t.model_list.find(function (o) {
8391
- return o.local_id = e;
8374
+ var o = t.model_list.find(function (a) {
8375
+ return a.local_id = e;
8392
8376
  });
8393
- r && (r.model_url = this._webModel.urls.model);
8377
+ o && (o.model_url = this._webModel.urls.model);
8394
8378
  }
8395
8379
  if ((n = this._webModel.urls) != null && n.wasm) {
8396
- var _r2 = e;
8397
- t.model_lib_map[_r2] && (t.model_lib_map[_r2] = this._webModel.urls.wasm);
8380
+ var _o3 = e;
8381
+ t.model_lib_map[_o3] && (t.model_lib_map[_o3] = this._webModel.urls.wasm);
8398
8382
  }
8399
- return {
8383
+ return (r = this._webModel.load) != null && r.skipCache && (t.use_cache = !1), {
8400
8384
  model: e,
8401
8385
  appConfig: t
8402
8386
  };
@@ -8410,7 +8394,7 @@ var yn = {
8410
8394
  return _regeneratorRuntime().wrap(function _callee79$(_context79) {
8411
8395
  while (1) switch (_context79.prev = _context79.next) {
8412
8396
  case 0:
8413
- this.scrollToTop(), T.chat = e, this._isModelLoading = !0;
8397
+ this.scrollToTop(), M.chat = e, this._isModelLoading = !0;
8414
8398
  i = ((o = this._webModel.introMessage) == null ? void 0 : o.displayed) === !1;
8415
8399
  n = function n(u) {
8416
8400
  var h;
@@ -8423,7 +8407,7 @@ var yn = {
8423
8407
  return Y.scrollToBottom((p = _this36._messages) == null ? void 0 : p.elementRef);
8424
8408
  }), i = !1);
8425
8409
  };
8426
- T.chat.setInitProgressCallback(n);
8410
+ M.chat.setInitProgressCallback(n);
8427
8411
  _context79.prev = 4;
8428
8412
  _this$getConfig = this.getConfig(), u = _this$getConfig.model, h = _this$getConfig.appConfig, p = {
8429
8413
  conv_config: {
@@ -8432,7 +8416,7 @@ var yn = {
8432
8416
  };
8433
8417
  this._conversationHistory.length > 0 && (p.conversation_history = this._conversationHistory);
8434
8418
  _context79.next = 9;
8435
- return T.chat.reload(u, p, h, t);
8419
+ return M.chat.reload(u, p, h, t);
8436
8420
  case 9:
8437
8421
  r = _context79.sent;
8438
8422
  _context79.next = 15;
@@ -8575,7 +8559,7 @@ var yn = {
8575
8559
  case 6:
8576
8560
  return _context83.abrupt("return");
8577
8561
  case 7:
8578
- !T.chat || this._isModelLoading || ((i = this._webModel.introMessage) != null && i.removeAfterMessage && ((n = this._removeIntro) == null || n.call(this)), e.addLoadingMessage(), this.generateResp(e, t, T.chat));
8562
+ !M.chat || this._isModelLoading || ((i = this._webModel.introMessage) != null && i.removeAfterMessage && ((n = this._removeIntro) == null || n.call(this)), e.addLoadingMessage(), this.generateResp(e, t, M.chat));
8579
8563
  case 8:
8580
8564
  case "end":
8581
8565
  return _context83.stop();
@@ -8595,19 +8579,19 @@ var yn = {
8595
8579
  return _regeneratorRuntime().wrap(function _callee84$(_context84) {
8596
8580
  while (1) switch (_context84.prev = _context84.next) {
8597
8581
  case 0:
8598
- (t = this._messages) == null || t.addNewErrorMessage("service", T.GENERIC_ERROR);
8582
+ (t = this._messages) == null || t.addNewErrorMessage("service", M.GENERIC_ERROR);
8599
8583
  console.error(e);
8600
8584
  this._isModelLoaded = !1;
8601
8585
  this._isModelLoading = !1;
8602
- _context84.t0 = T.chat;
8586
+ _context84.t0 = M.chat;
8603
8587
  if (!_context84.t0) {
8604
8588
  _context84.next = 9;
8605
8589
  break;
8606
8590
  }
8607
8591
  _context84.next = 8;
8608
- return T.chat.unload();
8592
+ return M.chat.unload();
8609
8593
  case 8:
8610
- T.chat = void 0;
8594
+ M.chat = void 0;
8611
8595
  case 9:
8612
8596
  case "end":
8613
8597
  return _context84.stop();
@@ -8634,15 +8618,31 @@ var yn = {
8634
8618
  }
8635
8619
  });
8636
8620
  }
8621
+ }, {
8622
+ key: "clearAllCache",
8623
+ value: function clearAllCache() {
8624
+ M.clearCache("webllm/model"), M.clearCache("webllm/wasm");
8625
+ }
8626
+ }, {
8627
+ key: "clearCache",
8628
+ value: function clearCache(e) {
8629
+ caches.open(e).then(function (t) {
8630
+ t.keys().then(function (i) {
8631
+ i.forEach(function (n) {
8632
+ t["delete"](n);
8633
+ });
8634
+ });
8635
+ });
8636
+ }
8637
8637
  }]);
8638
- return T;
8638
+ return M;
8639
8639
  }(Le);
8640
- tt.GENERIC_ERROR = "Error, please check the following list of [instructions](https://deepchat.dev/docs/webModel#error) to fix this.";
8641
- tt.MULTIPLE_MODELS_ERROR = "Cannot run multiple web models";
8642
- tt.WEB_LLM_NOT_FOUND_ERROR = "WebLLM module not found";
8643
- tt.DEFAULT_MODEL = "Llama-2-7b-chat-hf-q4f32_1";
8644
- tt.MODULE_SEARCH_LIMIT_S = 5;
8645
- var cs = tt;
8640
+ et.GENERIC_ERROR = "Error, please check the following list of [instructions](https://deepchat.dev/docs/webModel#error) to fix this.";
8641
+ et.MULTIPLE_MODELS_ERROR = "Cannot run multiple web models";
8642
+ et.WEB_LLM_NOT_FOUND_ERROR = "WebLLM module not found";
8643
+ et.DEFAULT_MODEL = "Llama-2-7b-chat-hf-q4f32_1";
8644
+ et.MODULE_SEARCH_LIMIT_S = 5;
8645
+ var cs = et;
8646
8646
  var zo = /*#__PURE__*/function () {
8647
8647
  function zo() {
8648
8648
  _classCallCheck(this, zo);
@@ -8656,7 +8656,7 @@ var zo = /*#__PURE__*/function () {
8656
8656
  r = e.webModel;
8657
8657
  if (r) return new cs(e);
8658
8658
  if (t) {
8659
- if (t.openAI) return t.openAI.images ? new Bo(e) : t.openAI.speechToText ? new Lo(e) : t.openAI.textToSpeech ? new Io(e) : t.openAI.assistant ? new jo(e) : new ut(e);
8659
+ if (t.openAI) return t.openAI.images ? new Bo(e) : t.openAI.speechToText ? new Lo(e) : t.openAI.textToSpeech ? new Io(e) : t.openAI.assistant ? new jo(e) : new dt(e);
8660
8660
  if (t.assemblyAI) return new Yi(e);
8661
8661
  if (t.cohere) return t.cohere.textGeneration ? new Ao(e) : t.cohere.summarization ? new ko(e) : new Fo(e);
8662
8662
  if (t.huggingFace) return t.huggingFace.textGeneration ? new So(e) : t.huggingFace.summarization ? new wo(e) : t.huggingFace.translation ? new To(e) : t.huggingFace.fillMask ? new Co(e) : t.huggingFace.questionAnswer ? new _o(e) : t.huggingFace.audioSpeechRecognition ? new Eo(e) : t.huggingFace.audioClassification ? new yo(e) : t.huggingFace.imageClassification ? new xo(e) : new Mo(e);
@@ -8814,7 +8814,7 @@ var fe = /*#__PURE__*/function () {
8814
8814
  key: "createImage",
8815
8815
  value: function createImage(e, t) {
8816
8816
  var i = new Image();
8817
- return i.src = e.src, se.scrollDownOnImageLoad(i.src, t), se.processContent(i, i.src);
8817
+ return i.src = e.src, ne.scrollDownOnImageLoad(i.src, t), ne.processContent(i, i.src);
8818
8818
  }
8819
8819
  // WORK - should base64 images be clickable?
8820
8820
  // WORK - image still does not scroll down when loaded
@@ -8827,7 +8827,7 @@ var fe = /*#__PURE__*/function () {
8827
8827
  while (1) switch (_context85.prev = _context85.next) {
8828
8828
  case 0:
8829
8829
  n = fe.createImage(t, e.elementRef), r = e.createNewMessageElement("", i);
8830
- r.bubbleElement.appendChild(n), r.bubbleElement.classList.add("image-message"), se.addMessage(e, r, "image", i);
8830
+ r.bubbleElement.appendChild(n), r.bubbleElement.classList.add("image-message"), ne.addMessage(e, r, "image", i);
8831
8831
  case 2:
8832
8832
  case "end":
8833
8833
  return _context85.stop();
@@ -8850,7 +8850,7 @@ var fe = /*#__PURE__*/function () {
8850
8850
  value: function addNewAudioMessage(e, t, i) {
8851
8851
  var n = fe.createAudioElement(t, i),
8852
8852
  r = e.createNewMessageElement("", i);
8853
- r.bubbleElement.appendChild(n), r.bubbleElement.classList.add("audio-message"), se.addMessage(e, r, "audio", i);
8853
+ r.bubbleElement.appendChild(n), r.bubbleElement.classList.add("audio-message"), ne.addMessage(e, r, "audio", i);
8854
8854
  }
8855
8855
  }, {
8856
8856
  key: "createAnyFile",
@@ -8862,14 +8862,14 @@ var fe = /*#__PURE__*/function () {
8862
8862
  var n = q.createSVGElement(Ho);
8863
8863
  n.classList.add("any-file-message-icon"), i.appendChild(n);
8864
8864
  var r = document.createElement("div");
8865
- return r.classList.add("any-file-message-text"), r.textContent = e.name || se.DEFAULT_FILE_NAME, t.appendChild(i), t.appendChild(r), se.processContent(t, e.src);
8865
+ return r.classList.add("any-file-message-text"), r.textContent = e.name || ne.DEFAULT_FILE_NAME, t.appendChild(i), t.appendChild(r), ne.processContent(t, e.src);
8866
8866
  }
8867
8867
  }, {
8868
8868
  key: "addNewAnyFileMessage",
8869
8869
  value: function addNewAnyFileMessage(e, t, i) {
8870
8870
  var n = e.createNewMessageElement("", i),
8871
8871
  r = fe.createAnyFile(t);
8872
- n.bubbleElement.classList.add("any-file-message-bubble"), n.bubbleElement.appendChild(r), se.addMessage(e, n, "file", i);
8872
+ n.bubbleElement.classList.add("any-file-message-bubble"), n.bubbleElement.appendChild(r), ne.addMessage(e, n, "file", i);
8873
8873
  }
8874
8874
  // no overwrite previous message logic as it is complex to track which files are to be overwritten
8875
8875
  }, {
@@ -8877,7 +8877,7 @@ var fe = /*#__PURE__*/function () {
8877
8877
  value: function addMessages(e, t, i) {
8878
8878
  t.forEach(function (n) {
8879
8879
  var r, o;
8880
- n.ref && (n = se.removeFileRef(n)), n.type === "audio" || (r = n.src) != null && r.startsWith("data:audio") ? fe.addNewAudioMessage(e, n, i) : n.type === "image" || (o = n.src) != null && o.startsWith("data:image") ? fe.addNewImageMessage(e, n, i) : fe.addNewAnyFileMessage(e, n, i);
8880
+ n.ref && (n = ne.removeFileRef(n)), n.type === "audio" || (r = n.src) != null && r.startsWith("data:audio") ? fe.addNewAudioMessage(e, n, i) : n.type === "image" || (o = n.src) != null && o.startsWith("data:image") ? fe.addNewImageMessage(e, n, i) : fe.addNewAnyFileMessage(e, n, i);
8881
8881
  });
8882
8882
  }
8883
8883
  }]);
@@ -9034,7 +9034,7 @@ var me = /*#__PURE__*/function (_Ke) {
9034
9034
  }, {
9035
9035
  key: "populateIntroPanel",
9036
9036
  value: function populateIntroPanel(e, t, i) {
9037
- (e || t) && (this._introPanel = new Gt(e, t, i), this._introPanel._elementRef && (re.apply(this, this._introPanel._elementRef), this.elementRef.appendChild(this._introPanel._elementRef)));
9037
+ (e || t) && (this._introPanel = new Gt(e, t, i), this._introPanel._elementRef && (se.apply(this, this._introPanel._elementRef), this.elementRef.appendChild(this._introPanel._elementRef)));
9038
9038
  }
9039
9039
  }, {
9040
9040
  key: "addMultipleFiles",
@@ -9046,7 +9046,7 @@ var me = /*#__PURE__*/function (_Ke) {
9046
9046
  return _context86.abrupt("return", Promise.all((e || []).map(function (t) {
9047
9047
  return new Promise(function (i) {
9048
9048
  if (!t.type || t.type === "any") {
9049
- var n = t.file.name || se.DEFAULT_FILE_NAME;
9049
+ var n = t.file.name || ne.DEFAULT_FILE_NAME;
9050
9050
  i({
9051
9051
  name: n,
9052
9052
  type: "any",
@@ -9241,13 +9241,13 @@ var te = /*#__PURE__*/function () {
9241
9241
  key: "unsetAllCSS",
9242
9242
  value: function unsetAllCSS(e, t) {
9243
9243
  var i, n;
9244
- t.container && M.unsetAllCSSMouseStates(e, t.container), (i = t.svg) != null && i.styles && M.unsetAllCSSMouseStates(e.children[0], t.svg.styles), (n = t.text) != null && n.styles && M.unsetAllCSSMouseStates(e.children[0], t.text.styles);
9244
+ t.container && T.unsetAllCSSMouseStates(e, t.container), (i = t.svg) != null && i.styles && T.unsetAllCSSMouseStates(e.children[0], t.svg.styles), (n = t.text) != null && n.styles && T.unsetAllCSSMouseStates(e.children[0], t.text.styles);
9245
9245
  }
9246
9246
  }, {
9247
9247
  key: "unsetActionCSS",
9248
9248
  value: function unsetActionCSS(e, t) {
9249
9249
  var i, n;
9250
- t.container && M.unsetActivityCSSMouseStates(e, t.container), (i = t.svg) != null && i.styles && M.unsetActivityCSSMouseStates(e.children[0], t.svg.styles), (n = t.text) != null && n.styles && M.unsetActivityCSSMouseStates(e.children[0], t.text.styles);
9250
+ t.container && T.unsetActivityCSSMouseStates(e, t.container), (i = t.svg) != null && i.styles && T.unsetActivityCSSMouseStates(e.children[0], t.svg.styles), (n = t.text) != null && n.styles && T.unsetActivityCSSMouseStates(e.children[0], t.text.styles);
9251
9251
  }
9252
9252
  }, {
9253
9253
  key: "setElementsCSS",
@@ -9316,15 +9316,15 @@ var _t = /*#__PURE__*/function () {
9316
9316
  }]);
9317
9317
  return _t;
9318
9318
  }();
9319
- var bt = /*#__PURE__*/function () {
9320
- function bt() {
9321
- _classCallCheck(this, bt);
9319
+ var gt = /*#__PURE__*/function () {
9320
+ function gt() {
9321
+ _classCallCheck(this, gt);
9322
9322
  }
9323
- _createClass(bt, null, [{
9323
+ _createClass(gt, null, [{
9324
9324
  key: "focusItemWhenOnEdge",
9325
9325
  value: function focusItemWhenOnEdge(e, t) {
9326
9326
  var i = t ? e.children[0] : e.children[e.children.length - 1];
9327
- bt.focusSiblingItem(i, e, t, !0);
9327
+ gt.focusSiblingItem(i, e, t, !0);
9328
9328
  }
9329
9329
  // isEdgeItem means is it a start or end item
9330
9330
  // prettier-ignore
@@ -9333,10 +9333,10 @@ var bt = /*#__PURE__*/function () {
9333
9333
  value: function focusSiblingItem(e, t, i) {
9334
9334
  var n = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
9335
9335
  var r = n ? e : e[i ? "nextSibling" : "previousSibling"];
9336
- r ? (e.dispatchEvent(new MouseEvent("mouseleave")), r.dispatchEvent(new MouseEvent("mouseenter"))) : (e.dispatchEvent(new MouseEvent("mouseleave")), bt.focusItemWhenOnEdge(t, i));
9336
+ r ? (e.dispatchEvent(new MouseEvent("mouseleave")), r.dispatchEvent(new MouseEvent("mouseenter"))) : (e.dispatchEvent(new MouseEvent("mouseleave")), gt.focusItemWhenOnEdge(t, i));
9337
9337
  }
9338
9338
  }]);
9339
- return bt;
9339
+ return gt;
9340
9340
  }();
9341
9341
  var we = /*#__PURE__*/function () {
9342
9342
  function we() {
@@ -9380,7 +9380,7 @@ var we = /*#__PURE__*/function () {
9380
9380
  r = t.dropupText,
9381
9381
  o = document.createElement("div");
9382
9382
  Object.assign(o.style, (l = i == null ? void 0 : i.item) == null ? void 0 : l["default"]), we.populateItem(n, o, r, i), o.classList.add("dropup-menu-item");
9383
- var a = M.processStateful((i == null ? void 0 : i.item) || {}, {
9383
+ var a = T.processStateful((i == null ? void 0 : i.item) || {}, {
9384
9384
  backgroundColor: "#f3f3f3"
9385
9385
  }, {
9386
9386
  backgroundColor: "#ebebeb"
@@ -9430,7 +9430,7 @@ var Qi = /*#__PURE__*/function () {
9430
9430
  e.parentElement !== ((i = t.target.shadowRoot) == null ? void 0 : i.children[0]) && _this40.close();
9431
9431
  }), window.addEventListener("keydown", function (t) {
9432
9432
  var i, n, r;
9433
- _this40._isOpen && (t.key === R.ESCAPE ? (_this40.close(), (i = _this40.highlightedItem) == null || i.dispatchEvent(new MouseEvent("mouseleave"))) : t.key === R.ENTER ? ((n = _this40.highlightedItem) == null || n.click(), (r = _this40.highlightedItem) == null || r.dispatchEvent(new MouseEvent("mouseleave"))) : t.key === R.ARROW_DOWN ? bt.focusSiblingItem(_this40.highlightedItem || _this40.elementRef.children[_this40.elementRef.children.length - 1], _this40.elementRef, !0) : t.key === R.ARROW_UP && bt.focusSiblingItem(_this40.highlightedItem || _this40.elementRef.children[0], _this40.elementRef, !1));
9433
+ _this40._isOpen && (t.key === R.ESCAPE ? (_this40.close(), (i = _this40.highlightedItem) == null || i.dispatchEvent(new MouseEvent("mouseleave"))) : t.key === R.ENTER ? ((n = _this40.highlightedItem) == null || n.click(), (r = _this40.highlightedItem) == null || r.dispatchEvent(new MouseEvent("mouseleave"))) : t.key === R.ARROW_DOWN ? gt.focusSiblingItem(_this40.highlightedItem || _this40.elementRef.children[_this40.elementRef.children.length - 1], _this40.elementRef, !0) : t.key === R.ARROW_UP && gt.focusSiblingItem(_this40.highlightedItem || _this40.elementRef.children[0], _this40.elementRef, !1));
9434
9434
  });
9435
9435
  }
9436
9436
  }], [{
@@ -9615,40 +9615,40 @@ var Wo = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 24 24\"
9615
9615
  dropupText: "File"
9616
9616
  }
9617
9617
  };
9618
- var he = /*#__PURE__*/function () {
9618
+ var ue = /*#__PURE__*/function () {
9619
9619
  // prettier-ignore
9620
- function he(e, t, i, n) {
9620
+ function ue(e, t, i, n) {
9621
9621
  var _this43 = this;
9622
- _classCallCheck(this, he);
9622
+ _classCallCheck(this, ue);
9623
9623
  this._attachments = [], this._fileCountLimit = 99, this._acceptedFormat = "", t.maxNumberOfFiles && (this._fileCountLimit = t.maxNumberOfFiles), this._toggleContainerDisplay = i, this._fileAttachmentsContainerRef = n, t.acceptedFormats && (this._acceptedFormat = t.acceptedFormats), setTimeout(function () {
9624
9624
  _this43._validationHandler = e._validationHandler;
9625
9625
  });
9626
9626
  }
9627
- _createClass(he, [{
9627
+ _createClass(ue, [{
9628
9628
  key: "attemptAddFile",
9629
9629
  value: function attemptAddFile(e, t) {
9630
- return he.isFileTypeValid(e, this._acceptedFormat) ? (this.addAttachmentBasedOnType(e, t, !0), !0) : !1;
9630
+ return ue.isFileTypeValid(e, this._acceptedFormat) ? (this.addAttachmentBasedOnType(e, t, !0), !0) : !1;
9631
9631
  }
9632
9632
  }, {
9633
9633
  key: "addAttachmentBasedOnType",
9634
9634
  value: function addAttachmentBasedOnType(e, t, i) {
9635
- var n = he.getTypeFromBlob(e);
9635
+ var n = ue.getTypeFromBlob(e);
9636
9636
  if (n === "image") {
9637
- var r = he.createImageAttachment(t);
9637
+ var r = ue.createImageAttachment(t);
9638
9638
  this.addFileAttachment(e, "image", r, i);
9639
9639
  } else if (n === "audio") {
9640
- var _r3 = Ui.createAudioAttachment(t);
9641
- this.addFileAttachment(e, "audio", _r3, i);
9640
+ var _r2 = Ui.createAudioAttachment(t);
9641
+ this.addFileAttachment(e, "audio", _r2, i);
9642
9642
  } else {
9643
- var _r4 = he.createAnyFileAttachment(e.name);
9644
- this.addFileAttachment(e, "any", _r4, i);
9643
+ var _r3 = ue.createAnyFileAttachment(e.name);
9644
+ this.addFileAttachment(e, "any", _r3, i);
9645
9645
  }
9646
9646
  }
9647
9647
  }, {
9648
9648
  key: "addFileAttachment",
9649
9649
  value: function addFileAttachment(e, t, i, n) {
9650
9650
  var a;
9651
- var r = he.createContainer(i);
9651
+ var r = ue.createContainer(i);
9652
9652
  if (this._attachments.length >= this._fileCountLimit) {
9653
9653
  var l = this._attachments[this._attachments.length - 1].removeButton;
9654
9654
  l == null || l.click();
@@ -9747,12 +9747,12 @@ var he = /*#__PURE__*/function () {
9747
9747
  return t.classList.add("file-attachment"), t.appendChild(e), t;
9748
9748
  }
9749
9749
  }]);
9750
- return he;
9750
+ return ue;
9751
9751
  }();
9752
9752
  var Zo = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n <title>play</title>\n <path d=\"M5.92 24.096q0 1.088 0.928 1.728 0.512 0.288 1.088 0.288 0.448 0 0.896-0.224l16.16-8.064q0.48-0.256 0.8-0.736t0.288-1.088-0.288-1.056-0.8-0.736l-16.16-8.064q-0.448-0.224-0.896-0.224-0.544 0-1.088 0.288-0.928 0.608-0.928 1.728v16.16z\"></path>\n</svg>",
9753
9753
  En = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n<title>stop</title>\n<path d=\"M5.92 24.096q0 0.832 0.576 1.408t1.44 0.608h16.128q0.832 0 1.44-0.608t0.576-1.408v-16.16q0-0.832-0.576-1.44t-1.44-0.576h-16.128q-0.832 0-1.44 0.576t-0.576 1.44v16.16z\"></path>\n</svg>",
9754
- hs = /*#__PURE__*/function (_he) {
9755
- _inherits(_e, _he);
9754
+ hs = /*#__PURE__*/function (_ue) {
9755
+ _inherits(_e, _ue);
9756
9756
  var _super38 = _createSuper(_e);
9757
9757
  // prettier-ignore
9758
9758
  function _e(e, t, i, n) {
@@ -9864,7 +9864,7 @@ var Zo = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
9864
9864
  }
9865
9865
  }]);
9866
9866
  return _e;
9867
- }(he);
9867
+ }(ue);
9868
9868
  hs.TIMER_LIMIT_S = 5999;
9869
9869
  var Ui = hs;
9870
9870
  var Xo = /*#__PURE__*/function () {
@@ -9876,7 +9876,7 @@ var Xo = /*#__PURE__*/function () {
9876
9876
  value:
9877
9877
  // prettier-ignore
9878
9878
  function create(e, t, i, n, r) {
9879
- return r === "audio" ? new Ui(e, t, i, n) : new he(e, t, i, n);
9879
+ return r === "audio" ? new Ui(e, t, i, n) : new ue(e, t, i, n);
9880
9880
  }
9881
9881
  }]);
9882
9882
  return Xo;
@@ -9981,11 +9981,11 @@ var wt = /*#__PURE__*/function () {
9981
9981
  return wt;
9982
9982
  }();
9983
9983
  var ps = /*#__PURE__*/function () {
9984
- function ce(e, t, i) {
9985
- _classCallCheck(this, ce);
9986
- this._isOpen = !1, this._contentRef = ce.createModalContent(t, i == null ? void 0 : i.backgroundColor), this._buttonPanel = ce.createButtonPanel(i == null ? void 0 : i.backgroundColor), this._elementRef = ce.createContainer(this._contentRef, i), this._elementRef.appendChild(this._buttonPanel), e.appendChild(this._elementRef), this._backgroundPanelRef = ce.createDarkBackgroundPanel(), e.appendChild(this._backgroundPanelRef), this.addWindowEvents();
9984
+ function le(e, t, i) {
9985
+ _classCallCheck(this, le);
9986
+ this._isOpen = !1, this._contentRef = le.createModalContent(t, i == null ? void 0 : i.backgroundColor), this._buttonPanel = le.createButtonPanel(i == null ? void 0 : i.backgroundColor), this._elementRef = le.createContainer(this._contentRef, i), this._elementRef.appendChild(this._buttonPanel), e.appendChild(this._elementRef), this._backgroundPanelRef = le.createDarkBackgroundPanel(), e.appendChild(this._backgroundPanelRef), this.addWindowEvents();
9987
9987
  }
9988
- _createClass(ce, [{
9988
+ _createClass(le, [{
9989
9989
  key: "isOpen",
9990
9990
  value: function isOpen() {
9991
9991
  return this._isOpen;
@@ -10007,7 +10007,7 @@ var ps = /*#__PURE__*/function () {
10007
10007
  var _this47 = this;
10008
10008
  this._elementRef.classList.remove("show-modal"), this._elementRef.classList.add("hide-modal"), this._backgroundPanelRef.classList.remove("show-modal-background"), this._backgroundPanelRef.classList.add("hide-modal-background"), this._isOpen = !1, setTimeout(function () {
10009
10009
  _this47._elementRef.style.display = "none", _this47._backgroundPanelRef.style.display = "none";
10010
- }, ce.MODAL_CLOSE_TIMEOUT_MS);
10010
+ }, le.MODAL_CLOSE_TIMEOUT_MS);
10011
10011
  }
10012
10012
  }, {
10013
10013
  key: "displayModalElements",
@@ -10023,7 +10023,7 @@ var ps = /*#__PURE__*/function () {
10023
10023
  key: "addCloseButton",
10024
10024
  value: function addCloseButton(e, t, i) {
10025
10025
  var _this48 = this;
10026
- var n = t ? ce.createSVGButton(e) : ce.createTextButton(e);
10026
+ var n = t ? le.createSVGButton(e) : le.createTextButton(e);
10027
10027
  return this.addButtons(n), n.onclick = function () {
10028
10028
  _this48.close(), setTimeout(function () {
10029
10029
  i == null || i();
@@ -10083,32 +10083,32 @@ var ps = /*#__PURE__*/function () {
10083
10083
  value: function createTextModalFunc(e, t, i) {
10084
10084
  var n;
10085
10085
  if (_typeof(t) == "object" && (n = t.files) != null && n.infoModal) {
10086
- var r = new ce(e, ["modal-content"], t.files.infoModal.containerStyle);
10086
+ var r = new le(e, ["modal-content"], t.files.infoModal.containerStyle);
10087
10087
  return r.addCloseButton("OK", !1, i), r.openTextModal.bind(r, t.infoModalTextMarkUp || "");
10088
10088
  }
10089
10089
  }
10090
10090
  }]);
10091
- return ce;
10091
+ return le;
10092
10092
  }();
10093
10093
  ps.MODAL_CLOSE_TIMEOUT_MS = 190;
10094
- var lt = ps;
10095
- var ht = /*#__PURE__*/function (_t5) {
10096
- _inherits(ht, _t5);
10097
- var _super39 = _createSuper(ht);
10094
+ var at = ps;
10095
+ var ut = /*#__PURE__*/function (_t5) {
10096
+ _inherits(ut, _t5);
10097
+ var _super39 = _createSuper(ut);
10098
10098
  // prettier-ignore
10099
- function ht(e, t, i, n, r, o) {
10099
+ function ut(e, t, i, n, r, o) {
10100
10100
  var _this50;
10101
- _classCallCheck(this, ht);
10101
+ _classCallCheck(this, ut);
10102
10102
  var l, c, d, u, h, p;
10103
- _this50 = _super39.call(this, ht.createButtonElement(), (l = i.button) == null ? void 0 : l.position, i.button, o);
10103
+ _this50 = _super39.call(this, ut.createButtonElement(), (l = i.button) == null ? void 0 : l.position, i.button, o);
10104
10104
  var a = _this50.createInnerElements(n, r, _this50._customStyles);
10105
- _this50._inputElement = ht.createInputElement((c = i == null ? void 0 : i.files) == null ? void 0 : c.acceptedFormats), _this50.addClickEvent(e, i), _this50.elementRef.replaceChildren(a.styles), _this50.reapplyStateStyle("styles"), _this50._fileAttachmentsType = t, _this50._openModalOnce = ((u = (d = i.files) == null ? void 0 : d.infoModal) == null ? void 0 : u.openModalOnce) === !1 || (p = (h = i.files) == null ? void 0 : h.infoModal) == null ? void 0 : p.openModalOnce;
10105
+ _this50._inputElement = ut.createInputElement((c = i == null ? void 0 : i.files) == null ? void 0 : c.acceptedFormats), _this50.addClickEvent(e, i), _this50.elementRef.replaceChildren(a.styles), _this50.reapplyStateStyle("styles"), _this50._fileAttachmentsType = t, _this50._openModalOnce = ((u = (d = i.files) == null ? void 0 : d.infoModal) == null ? void 0 : u.openModalOnce) === !1 || (p = (h = i.files) == null ? void 0 : h.infoModal) == null ? void 0 : p.openModalOnce;
10106
10106
  return _this50;
10107
10107
  }
10108
- _createClass(ht, [{
10108
+ _createClass(ut, [{
10109
10109
  key: "createInnerElements",
10110
10110
  value: function createInnerElements(e, t, i) {
10111
- var n = ht.createSVGIconElement(e, t);
10111
+ var n = ut.createSVGIconElement(e, t);
10112
10112
  return {
10113
10113
  styles: this.createInnerElement(n, "styles", i)
10114
10114
  };
@@ -10132,7 +10132,7 @@ var ht = /*#__PURE__*/function (_t5) {
10132
10132
  key: "addClickEvent",
10133
10133
  value: function addClickEvent(e, t) {
10134
10134
  var i = this.triggerImportPrompt.bind(this, this._inputElement),
10135
- n = lt.createTextModalFunc(e, t, i);
10135
+ n = at.createTextModalFunc(e, t, i);
10136
10136
  this.elementRef.onclick = this.click.bind(this, n);
10137
10137
  }
10138
10138
  }, {
@@ -10159,17 +10159,17 @@ var ht = /*#__PURE__*/function (_t5) {
10159
10159
  return i.id = e, i;
10160
10160
  }
10161
10161
  }]);
10162
- return ht;
10162
+ return ut;
10163
10163
  }(_t);
10164
- var ue = /*#__PURE__*/function () {
10165
- function ue() {
10166
- _classCallCheck(this, ue);
10164
+ var de = /*#__PURE__*/function () {
10165
+ function de() {
10166
+ _classCallCheck(this, de);
10167
10167
  }
10168
- _createClass(ue, null, [{
10168
+ _createClass(de, null, [{
10169
10169
  key: "create",
10170
10170
  value: function create(e, t, i) {
10171
- var n = ue.createElement(i);
10172
- ue.addEvents(n, e, t), e.appendChild(n);
10171
+ var n = de.createElement(i);
10172
+ de.addEvents(n, e, t), e.appendChild(n);
10173
10173
  }
10174
10174
  }, {
10175
10175
  key: "createElement",
@@ -10181,13 +10181,13 @@ var ue = /*#__PURE__*/function () {
10181
10181
  key: "addEvents",
10182
10182
  value: function addEvents(e, t, i) {
10183
10183
  t.ondragenter = function (n) {
10184
- n.preventDefault(), ue.display(e);
10184
+ n.preventDefault(), de.display(e);
10185
10185
  }, e.ondragleave = function (n) {
10186
- n.preventDefault(), ue.hide(e);
10186
+ n.preventDefault(), de.hide(e);
10187
10187
  }, e.ondragover = function (n) {
10188
10188
  n.preventDefault();
10189
10189
  }, e.ondrop = function (n) {
10190
- n.preventDefault(), ue.uploadFile(i, n), ue.hide(e);
10190
+ n.preventDefault(), de.uploadFile(i, n), de.hide(e);
10191
10191
  };
10192
10192
  }
10193
10193
  }, {
@@ -10213,7 +10213,7 @@ var ue = /*#__PURE__*/function () {
10213
10213
  return t !== void 0 && t === !1 ? !1 : !!t || e.getNumberOfTypes() > 0;
10214
10214
  }
10215
10215
  }]);
10216
- return ue;
10216
+ return de;
10217
10217
  }();
10218
10218
  var Me = /*#__PURE__*/function () {
10219
10219
  function Me() {
@@ -10317,19 +10317,19 @@ var Me = /*#__PURE__*/function () {
10317
10317
  return Me;
10318
10318
  }();
10319
10319
  var Qo = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n<svg height=\"1.4em\" width=\"1.4em\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n\t viewBox=\"0 0 490.9 490.9\" xml:space=\"preserve\">\n\t<g>\n\t\t<g>\n\t\t\t<path d=\"M245.5,322.9c53,0,96.2-43.2,96.2-96.2V96.2c0-53-43.2-96.2-96.2-96.2s-96.2,43.2-96.2,96.2v130.5\n\t\t\t\tC149.3,279.8,192.5,322.9,245.5,322.9z M173.8,96.2c0-39.5,32.2-71.7,71.7-71.7s71.7,32.2,71.7,71.7v130.5\n\t\t\t\tc0,39.5-32.2,71.7-71.7,71.7s-71.7-32.2-71.7-71.7V96.2z\"/>\n\t\t\t<path d=\"M94.4,214.5c-6.8,0-12.3,5.5-12.3,12.3c0,85.9,66.7,156.6,151.1,162.8v76.7h-63.9c-6.8,0-12.3,5.5-12.3,12.3\n\t\t\t\ts5.5,12.3,12.3,12.3h152.3c6.8,0,12.3-5.5,12.3-12.3s-5.5-12.3-12.3-12.3h-63.9v-76.7c84.4-6.3,151.1-76.9,151.1-162.8\n\t\t\t\tc0-6.8-5.5-12.3-12.3-12.3s-12.3,5.5-12.3,12.3c0,76.6-62.3,138.9-138.9,138.9s-138.9-62.3-138.9-138.9\n\t\t\t\tC106.6,220,101.2,214.5,94.4,214.5z\"/>\n\t\t</g>\n\t</g>\n</svg>\n";
10320
- var vt = /*#__PURE__*/function (_t6) {
10321
- _inherits(vt, _t6);
10322
- var _super40 = _createSuper(vt);
10323
- function vt(e) {
10320
+ var bt = /*#__PURE__*/function (_t6) {
10321
+ _inherits(bt, _t6);
10322
+ var _super40 = _createSuper(bt);
10323
+ function bt(e) {
10324
10324
  var _this51;
10325
- _classCallCheck(this, vt);
10326
- (e == null ? void 0 : e.position) === "dropup-menu" && (e.position = "outside-right"), _this51 = _super40.call(this, vt.createMicrophoneElement(), e == null ? void 0 : e.position, e), _this51.isActive = !1, _this51._innerElements = _this51.createInnerElements(_this51._customStyles), _this51.changeToDefault();
10325
+ _classCallCheck(this, bt);
10326
+ (e == null ? void 0 : e.position) === "dropup-menu" && (e.position = "outside-right"), _this51 = _super40.call(this, bt.createMicrophoneElement(), e == null ? void 0 : e.position, e), _this51.isActive = !1, _this51._innerElements = _this51.createInnerElements(_this51._customStyles), _this51.changeToDefault();
10327
10327
  return _this51;
10328
10328
  }
10329
- _createClass(vt, [{
10329
+ _createClass(bt, [{
10330
10330
  key: "createInnerElements",
10331
10331
  value: function createInnerElements(e) {
10332
- var t = vt.createSVGIconElement();
10332
+ var t = bt.createSVGIconElement();
10333
10333
  return {
10334
10334
  "default": this.createInnerElement(t, "default", e),
10335
10335
  active: this.createInnerElement(t, "active", e),
@@ -10392,7 +10392,7 @@ var vt = /*#__PURE__*/function (_t6) {
10392
10392
  return e.id = "microphone-icon", e;
10393
10393
  }
10394
10394
  }]);
10395
- return vt;
10395
+ return bt;
10396
10396
  }(_t);
10397
10397
  var fs = {},
10398
10398
  oi = {},
@@ -10499,17 +10499,17 @@ var ia = /*#__PURE__*/function () {
10499
10499
  return ia;
10500
10500
  }();
10501
10501
  ai.WebSpeechTranscript = ia;
10502
- var it = {};
10503
- Object.defineProperty(it, "__esModule", {
10502
+ var tt = {};
10503
+ Object.defineProperty(tt, "__esModule", {
10504
10504
  value: !0
10505
10505
  });
10506
- it.Browser = void 0;
10507
- var ct = /*#__PURE__*/_createClass(function ct() {
10508
- _classCallCheck(this, ct);
10506
+ tt.Browser = void 0;
10507
+ var lt = /*#__PURE__*/_createClass(function lt() {
10508
+ _classCallCheck(this, lt);
10509
10509
  });
10510
- it.Browser = ct;
10511
- ct.IS_SAFARI = function () {
10512
- return ct._IS_SAFARI === void 0 && (ct._IS_SAFARI = /^((?!chrome|android).)*safari/i.test(navigator.userAgent)), ct._IS_SAFARI;
10510
+ tt.Browser = lt;
10511
+ lt.IS_SAFARI = function () {
10512
+ return lt._IS_SAFARI === void 0 && (lt._IS_SAFARI = /^((?!chrome|android).)*safari/i.test(navigator.userAgent)), lt._IS_SAFARI;
10513
10513
  };
10514
10514
  var Tt = {},
10515
10515
  li = {};
@@ -10684,11 +10684,11 @@ Object.defineProperty(Be, "__esModule", {
10684
10684
  value: !0
10685
10685
  });
10686
10686
  Be.Cursor = void 0;
10687
- var pt = /*#__PURE__*/function () {
10688
- function pt() {
10689
- _classCallCheck(this, pt);
10687
+ var ht = /*#__PURE__*/function () {
10688
+ function ht() {
10689
+ _classCallCheck(this, ht);
10690
10690
  }
10691
- _createClass(pt, null, [{
10691
+ _createClass(ht, null, [{
10692
10692
  key: "setOffsetForGeneric",
10693
10693
  value: function setOffsetForGeneric(e, t) {
10694
10694
  var i = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
@@ -10696,7 +10696,7 @@ var pt = /*#__PURE__*/function () {
10696
10696
  for (var r = 0; r < e.childNodes.length; r += 1) {
10697
10697
  var o = e.childNodes[r];
10698
10698
  if (o.childNodes.length > 0) {
10699
- var a = pt.setOffsetForGeneric(o, t, i);
10699
+ var a = ht.setOffsetForGeneric(o, t, i);
10700
10700
  if (a === -1) return -1;
10701
10701
  i += a;
10702
10702
  } else if (o.textContent !== null) {
@@ -10724,8 +10724,8 @@ var pt = /*#__PURE__*/function () {
10724
10724
  value: function setOffsetForSafariGeneric(e, t) {
10725
10725
  var i = window.getSelection();
10726
10726
  if (i) {
10727
- var n = pt.getGenericElementCursorOffset(e, i, !0);
10728
- console.log(n), setTimeout(function () {}, 100), pt.setOffsetForGeneric(e, n + t);
10727
+ var n = ht.getGenericElementCursorOffset(e, i, !0);
10728
+ console.log(n), setTimeout(function () {}, 100), ht.setOffsetForGeneric(e, n + t);
10729
10729
  }
10730
10730
  }
10731
10731
  // set to automatically scroll to cursor (scroll does not work in Safari)
@@ -10763,16 +10763,16 @@ var pt = /*#__PURE__*/function () {
10763
10763
  return n;
10764
10764
  }
10765
10765
  }]);
10766
- return pt;
10766
+ return ht;
10767
10767
  }();
10768
- Be.Cursor = pt;
10768
+ Be.Cursor = ht;
10769
10769
  Object.defineProperty(Ct, "__esModule", {
10770
10770
  value: !0
10771
10771
  });
10772
10772
  Ct.CommandUtils = void 0;
10773
10773
  var _n = At,
10774
10774
  ra = je,
10775
- oa = it,
10775
+ oa = tt,
10776
10776
  wn = Be,
10777
10777
  Mn = De;
10778
10778
  var K = /*#__PURE__*/function () {
@@ -10877,7 +10877,7 @@ Object.defineProperty(di, "__esModule", {
10877
10877
  });
10878
10878
  di.Highlight = void 0;
10879
10879
  var aa = je,
10880
- nt = Be;
10880
+ it = Be;
10881
10881
  var Wt = /*#__PURE__*/function () {
10882
10882
  function Wt() {
10883
10883
  _classCallCheck(this, Wt);
@@ -10893,8 +10893,8 @@ var Wt = /*#__PURE__*/function () {
10893
10893
  value: function setStateForGeneric(e, t) {
10894
10894
  var i = window.getSelection();
10895
10895
  if (i != null && i.focusNode) {
10896
- var n = nt.Cursor.getGenericElementCursorOffset(t, i, !0),
10897
- r = nt.Cursor.getGenericElementCursorOffset(t, i, !1);
10896
+ var n = it.Cursor.getGenericElementCursorOffset(t, i, !0),
10897
+ r = it.Cursor.getGenericElementCursorOffset(t, i, !1);
10898
10898
  e.isHighlighted = n !== r;
10899
10899
  }
10900
10900
  }
@@ -10908,8 +10908,8 @@ var Wt = /*#__PURE__*/function () {
10908
10908
  value: function removeForGeneric(e, t) {
10909
10909
  var i = window.getSelection();
10910
10910
  if (i) {
10911
- var n = nt.Cursor.getGenericElementCursorOffset(t, i, !0);
10912
- i.deleteFromDocument(), nt.Cursor.setOffsetForGeneric(t, n), e.isHighlighted = !1;
10911
+ var n = it.Cursor.getGenericElementCursorOffset(t, i, !0);
10912
+ i.deleteFromDocument(), it.Cursor.setOffsetForGeneric(t, n), e.isHighlighted = !1;
10913
10913
  }
10914
10914
  }
10915
10915
  }, {
@@ -10920,7 +10920,7 @@ var Wt = /*#__PURE__*/function () {
10920
10920
  r = t.value;
10921
10921
  if (i && n) {
10922
10922
  var o = r.substring(0, i) + r.substring(n);
10923
- t.value = o, nt.Cursor.setOffsetForPrimitive(t, i, e.autoScroll);
10923
+ t.value = o, it.Cursor.setOffsetForPrimitive(t, i, e.autoScroll);
10924
10924
  }
10925
10925
  e.isHighlighted = !1;
10926
10926
  }
@@ -11006,7 +11006,7 @@ var Cn = li,
11006
11006
  Ti = di,
11007
11007
  ie = je,
11008
11008
  Ci = ui,
11009
- kn = it,
11009
+ kn = tt,
11010
11010
  In = Be,
11011
11011
  Ai = De;
11012
11012
  var da = /*#__PURE__*/function () {
@@ -11124,7 +11124,7 @@ Object.defineProperty(oi, "__esModule", {
11124
11124
  });
11125
11125
  oi.WebSpeech = void 0;
11126
11126
  var Ln = ai,
11127
- Rn = it,
11127
+ Rn = tt,
11128
11128
  ua = Tt;
11129
11129
  var Jt = /*#__PURE__*/function (_ua$Speech) {
11130
11130
  _inherits(Jt, _ua$Speech);
@@ -11326,11 +11326,11 @@ Object.defineProperty(bi, "__esModule", {
11326
11326
  value: !0
11327
11327
  });
11328
11328
  bi.StopTimeout = void 0;
11329
- var yt = /*#__PURE__*/function () {
11330
- function yt() {
11331
- _classCallCheck(this, yt);
11329
+ var vt = /*#__PURE__*/function () {
11330
+ function vt() {
11331
+ _classCallCheck(this, vt);
11332
11332
  }
11333
- _createClass(yt, null, [{
11333
+ _createClass(vt, null, [{
11334
11334
  key: "set",
11335
11335
  value: function set(e) {
11336
11336
  e.stopTimeout = setTimeout(function () {
@@ -11340,13 +11340,13 @@ var yt = /*#__PURE__*/function () {
11340
11340
  }, {
11341
11341
  key: "reset",
11342
11342
  value: function reset(e, t) {
11343
- e.stopTimeoutMS = t || yt.DEFAULT_MS, e.stopTimeout && clearTimeout(e.stopTimeout), yt.set(e);
11343
+ e.stopTimeoutMS = t || vt.DEFAULT_MS, e.stopTimeout && clearTimeout(e.stopTimeout), vt.set(e);
11344
11344
  }
11345
11345
  }]);
11346
- return yt;
11346
+ return vt;
11347
11347
  }();
11348
- bi.StopTimeout = yt;
11349
- yt.DEFAULT_MS = 2e4;
11348
+ bi.StopTimeout = vt;
11349
+ vt.DEFAULT_MS = 2e4;
11350
11350
  var vi = {};
11351
11351
  Object.defineProperty(vi, "__esModule", {
11352
11352
  value: !0
@@ -11603,8 +11603,8 @@ var We = /*#__PURE__*/function () {
11603
11603
  return We;
11604
11604
  }();
11605
11605
  var Li = fs["default"] = We;
11606
- var Zt = /*#__PURE__*/function (_vt) {
11607
- _inherits(Zt, _vt);
11606
+ var Zt = /*#__PURE__*/function (_bt) {
11607
+ _inherits(Zt, _bt);
11608
11608
  var _super43 = _createSuper(Zt);
11609
11609
  function Zt(e, t, i) {
11610
11610
  var _this56;
@@ -11678,7 +11678,7 @@ var Zt = /*#__PURE__*/function (_vt) {
11678
11678
  }
11679
11679
  }]);
11680
11680
  return Zt;
11681
- }(vt);
11681
+ }(bt);
11682
11682
  var ms = /*#__PURE__*/function () {
11683
11683
  function ms() {
11684
11684
  _classCallCheck(this, ms);
@@ -11695,8 +11695,8 @@ var ms = /*#__PURE__*/function () {
11695
11695
  }]);
11696
11696
  return ms;
11697
11697
  }();
11698
- var va = /*#__PURE__*/function (_vt2) {
11699
- _inherits(va, _vt2);
11698
+ var va = /*#__PURE__*/function (_bt2) {
11699
+ _inherits(va, _bt2);
11700
11700
  var _super44 = _createSuper(va);
11701
11701
  function va(e, t) {
11702
11702
  var _this57;
@@ -11757,7 +11757,7 @@ var va = /*#__PURE__*/function (_vt2) {
11757
11757
  }
11758
11758
  }]);
11759
11759
  return va;
11760
- }(vt);
11760
+ }(bt);
11761
11761
  var ya = "<?xml version=\"1.0\" standalone=\"no\"?>\n<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.0//EN\" \"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd\">\n<svg xmlns=\"http://www.w3.org/2000/svg\" stroke=\"currentColor\" fill=\"none\" stroke-width=\"1\" viewBox=\"0 0 24 24\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <line x1=\"22\" y1=\"2\" x2=\"11\" y2=\"14\"></line>\n <polygon points=\"22 2 15 22 11 14 2 10 22 2\"></polygon>\n</svg>\n";
11762
11762
  var F = /*#__PURE__*/function () {
11763
11763
  function F() {
@@ -11945,7 +11945,7 @@ var yi = /*#__PURE__*/function (_t7) {
11945
11945
  e.files && (t.files = Array.from(e.files).map(function (i) {
11946
11946
  return {
11947
11947
  file: i,
11948
- type: he.getTypeFromBlob(i)
11948
+ type: ue.getTypeFromBlob(i)
11949
11949
  };
11950
11950
  })), setTimeout(function () {
11951
11951
  return _this62.attemptSubmit(t, !0);
@@ -12121,8 +12121,8 @@ var Ea = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
12121
12121
  Sa = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n <title>capture</title>\n <path d=\"M0 16q0 3.264 1.28 6.208t3.392 5.12 5.12 3.424 6.208 1.248 6.208-1.248 5.12-3.424 3.392-5.12 1.28-6.208-1.28-6.208-3.392-5.12-5.088-3.392-6.24-1.28q-3.264 0-6.208 1.28t-5.12 3.392-3.392 5.12-1.28 6.208zM4 16q0-3.264 1.6-6.016t4.384-4.352 6.016-1.632 6.016 1.632 4.384 4.352 1.6 6.016-1.6 6.048-4.384 4.352-6.016 1.6-6.016-1.6-4.384-4.352-1.6-6.048z\"></path>\n</svg>\n",
12122
12122
  _a = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 1024 1024\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M195.2 195.2a64 64 0 0 1 90.496 0L512 421.504 738.304 195.2a64 64 0 0 1 90.496 90.496L602.496 512 828.8 738.304a64 64 0 0 1-90.496 90.496L512 602.496 285.696 828.8a64 64 0 0 1-90.496-90.496L421.504 512 195.2 285.696a64 64 0 0 1 0-90.496z\"/>\n</svg>",
12123
12123
  wa = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M4.89163 13.2687L9.16582 17.5427L18.7085 8\" stroke=\"#000000\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n</svg>";
12124
- var tn = /*#__PURE__*/function (_lt) {
12125
- _inherits(tn, _lt);
12124
+ var tn = /*#__PURE__*/function (_at) {
12125
+ _inherits(tn, _at);
12126
12126
  var _super46 = _createSuper(tn);
12127
12127
  // prettier-ignore
12128
12128
  function tn(e, t, i, n) {
@@ -12138,11 +12138,11 @@ var tn = /*#__PURE__*/function (_lt) {
12138
12138
  _createClass(tn, [{
12139
12139
  key: "addButtonsAndTheirEvents",
12140
12140
  value: function addButtonsAndTheirEvents(e) {
12141
- var t = lt.createSVGButton(Sa);
12141
+ var t = at.createSVGButton(Sa);
12142
12142
  t.classList.add("modal-svg-camera-button"), t.children[0].classList.add("modal-svg-camera-icon");
12143
12143
  var i = this.addCloseButton(_a, !0);
12144
12144
  i.classList.add("modal-svg-close-button"), i.children[0].classList.add("modal-svg-close-icon");
12145
- var n = lt.createSVGButton(wa);
12145
+ var n = at.createSVGButton(wa);
12146
12146
  return n.classList.add("modal-svg-submit-button"), this.addButtons(t, n), this.addButtonEvents(t, i, n, e), {
12147
12147
  captureButton: t,
12148
12148
  submitButton: n
@@ -12170,7 +12170,7 @@ var tn = /*#__PURE__*/function (_lt) {
12170
12170
  _this65._captureButton.replaceChildren(_this65._captureIcon), _this65._captureButton.classList.replace("modal-svg-refresh-button", "modal-svg-camera-button");
12171
12171
  var e = _this65._canvas.getContext("2d");
12172
12172
  e == null || e.clearRect(0, 0, _this65._canvas.width, _this65._canvas.height);
12173
- }, lt.MODAL_CLOSE_TIMEOUT_MS);
12173
+ }, at.MODAL_CLOSE_TIMEOUT_MS);
12174
12174
  }
12175
12175
  }, {
12176
12176
  key: "start",
@@ -12235,7 +12235,7 @@ var tn = /*#__PURE__*/function (_lt) {
12235
12235
  }
12236
12236
  }]);
12237
12237
  return tn;
12238
- }(lt);
12238
+ }(at);
12239
12239
  var Ma = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M29 7h-4.599l-2.401-4h-12l-2.4 4h-4.6c-1 0-3 1-3 2.969v16.031c0 1.657 1.5 3 2.792 3h26.271c1.313 0 2.938-1.406 2.938-2.968v-16.032c0-1-1-3-3-3zM30 26.032c0 0.395-0.639 0.947-0.937 0.969h-26.265c-0.232-0.019-0.797-0.47-0.797-1v-16.031c0-0.634 0.851-0.953 1-0.969h5.732l2.4-4h9.802l1.785 3.030 0.55 0.97h5.731c0.705 0 0.99 0.921 1 1v16.032zM16 10c-3.866 0-7 3.134-7 7s3.134 7 7 7 7-3.134 7-7-3.134-7-7-7zM16 22c-2.757 0-5-2.243-5-5s2.243-5 5-5 5 2.243 5 5-2.243 5-5 5z\"></path>\n</svg>";
12240
12240
  var Xt = /*#__PURE__*/function (_t8) {
12241
12241
  _inherits(Xt, _t8);
@@ -12284,11 +12284,11 @@ var Xt = /*#__PURE__*/function (_t8) {
12284
12284
  }]);
12285
12285
  return Xt;
12286
12286
  }(_t);
12287
- var ft = /*#__PURE__*/function () {
12287
+ var pt = /*#__PURE__*/function () {
12288
12288
  // prettier-ignore
12289
- function ft(e, t, i, n) {
12290
- _classCallCheck(this, ft);
12291
- this.elementRef = ft.createPanelElement(e.inputAreaStyle);
12289
+ function pt(e, t, i, n) {
12290
+ _classCallCheck(this, pt);
12291
+ this.elementRef = pt.createPanelElement(e.inputAreaStyle);
12292
12292
  var r = new qi(e, i),
12293
12293
  o = {},
12294
12294
  a = this.createFileUploadComponents(e, i, n, o);
@@ -12298,16 +12298,16 @@ var ft = /*#__PURE__*/function () {
12298
12298
  var l = new xa(e, r.inputElementRef, t, i, a);
12299
12299
  r.submit = l.submitFromInput.bind(l), Me.attach(e, i, r, a, l), e.submitUserMessage = l.programmaticSubmit.bind(l), o.submit = {
12300
12300
  button: l
12301
- }, ft.addElements(this.elementRef, r, o, n, a, e.dropupStyles);
12301
+ }, pt.addElements(this.elementRef, r, o, n, a, e.dropupStyles);
12302
12302
  }
12303
- _createClass(ft, [{
12303
+ _createClass(pt, [{
12304
12304
  key: "createFileUploadComponents",
12305
12305
  value:
12306
12306
  // prettier-ignore
12307
12307
  function createFileUploadComponents(e, t, i, n) {
12308
12308
  var o, a, l, c;
12309
12309
  var r = new wt(this.elementRef, e.attachmentContainerStyle, t.demo);
12310
- if (ft.createUploadButtons(e, t.fileTypes || {}, r, i, n), (o = t.camera) != null && o.files) {
12310
+ if (pt.createUploadButtons(e, t.fileTypes || {}, r, i, n), (o = t.camera) != null && o.files) {
12311
12311
  var d = ((a = n.images) == null ? void 0 : a.fileType) || r.addType(e, t.camera.files, "images");
12312
12312
  n.camera = {
12313
12313
  button: new Xt(i, d, t.camera)
@@ -12319,7 +12319,7 @@ var ft = /*#__PURE__*/function () {
12319
12319
  button: new va(_d, t.recordAudio)
12320
12320
  };
12321
12321
  }
12322
- return ue.isEnabled(r, e.dragAndDrop) && ue.create(i, r, e.dragAndDrop), r;
12322
+ return de.isEnabled(r, e.dragAndDrop) && de.create(i, r, e.dragAndDrop), r;
12323
12323
  }
12324
12324
  // prettier-ignore
12325
12325
  }], [{
@@ -12340,7 +12340,7 @@ var ft = /*#__PURE__*/function () {
12340
12340
  d = _Yo$a.id,
12341
12341
  u = _Yo$a.svgString,
12342
12342
  h = _Yo$a.dropupText,
12343
- p = new ht(n, c, l, d, u, h);
12343
+ p = new ut(n, c, l, d, u, h);
12344
12344
  r[a] = {
12345
12345
  button: p,
12346
12346
  fileType: c
@@ -12358,7 +12358,7 @@ var ft = /*#__PURE__*/function () {
12358
12358
  Vo.set(t.inputElementRef, a, r.elementRef, l), Qe.add(e, a);
12359
12359
  }
12360
12360
  }]);
12361
- return ft;
12361
+ return pt;
12362
12362
  }();
12363
12363
  var nn = /*#__PURE__*/function () {
12364
12364
  function nn() {
@@ -12371,7 +12371,7 @@ var nn = /*#__PURE__*/function () {
12371
12371
  n.id = "chat-view";
12372
12372
  var r = new me(e, t, i);
12373
12373
  t.websocket && $.createConnection(t, r);
12374
- var o = new ft(e, r, t, n);
12374
+ var o = new pt(e, r, t, n);
12375
12375
  return Y.addElements(n, r.elementRef, o.elementRef), n;
12376
12376
  }
12377
12377
  }, {