deep-chat-dev 9.0.170 → 9.0.171

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
@@ -450,7 +450,7 @@ var En = "Make sure the events are using {text: string} or {html: string} format
450
450
  }]);
451
451
  }();
452
452
  gi.CODE_SNIPPET_GENERATION_JUMP = 0.5;
453
- var U = gi;
453
+ var H = gi;
454
454
  var bi = /*#__PURE__*/function () {
455
455
  function bi() {
456
456
  _classCallCheck(this, bi);
@@ -554,15 +554,15 @@ var ue = /*#__PURE__*/function () {
554
554
  }();
555
555
  var bs = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e%3csvg%20fill='%23000000'%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20viewBox='0%200%2032%2032'%20xml:space='preserve'%3e%3cpath%20d='M23,30.36H9c-2.404,0-4.36-1.956-4.36-4.36V15c0-2.404,1.956-4.36,4.36-4.36h3.659%20c0.167-1.566,1.415-2.813,2.981-2.981V5.333c-1.131-0.174-2-1.154-2-2.333c0-1.301,1.059-2.36,2.36-2.36%20c1.302,0,2.36,1.059,2.36,2.36c0,1.179-0.869,2.159-2,2.333V7.66c1.566,0.167,2.814,1.415,2.981,2.981H23%20c2.404,0,4.36,1.956,4.36,4.36v11C27.36,28.404,25.404,30.36,23,30.36z%20M9,11.36c-2.007,0-3.64,1.633-3.64,3.64v11%20c0,2.007,1.633,3.64,3.64,3.64h14c2.007,0,3.64-1.633,3.64-3.64V15c0-2.007-1.633-3.64-3.64-3.64H9z%20M13.384,10.64h5.231%20C18.439,9.354,17.334,8.36,16,8.36C14.667,8.36,13.561,9.354,13.384,10.64z%20M16,1.36c-0.904,0-1.64,0.736-1.64,1.64%20S15.096,4.64,16,4.64c0.904,0,1.64-0.736,1.64-1.64S16.904,1.36,16,1.36z%20M20,27.36h-8c-1.301,0-2.36-1.059-2.36-2.36%20s1.059-2.36,2.36-2.36h8c1.302,0,2.36,1.059,2.36,2.36S21.302,27.36,20,27.36z%20M12,23.36c-0.904,0-1.64,0.735-1.64,1.64%20s0.736,1.64,1.64,1.64h8c0.904,0,1.64-0.735,1.64-1.64s-0.735-1.64-1.64-1.64H12z%20M31,23.86h-2c-0.199,0-0.36-0.161-0.36-0.36V15%20c0-0.199,0.161-0.36,0.36-0.36h2c0.199,0,0.36,0.161,0.36,0.36v8.5C31.36,23.699,31.199,23.86,31,23.86z%20M29.36,23.14h1.279v-7.78%20H29.36V23.14z%20M3,23.86H1c-0.199,0-0.36-0.161-0.36-0.36V15c0-0.199,0.161-0.36,0.36-0.36h2c0.199,0,0.36,0.161,0.36,0.36v8.5%20C3.36,23.699,3.199,23.86,3,23.86z%20M1.36,23.14h1.28v-7.78H1.36V23.14z%20M20,20.36c-1.302,0-2.36-1.059-2.36-2.36%20s1.059-2.36,2.36-2.36s2.36,1.059,2.36,2.36C22.36,19.302,21.302,20.36,20,20.36z%20M20,16.36c-0.904,0-1.64,0.736-1.64,1.64%20s0.735,1.64,1.64,1.64s1.64-0.735,1.64-1.64S20.904,16.36,20,16.36z%20M12,20.36c-1.301,0-2.36-1.059-2.36-2.36s1.059-2.36,2.36-2.36%20s2.36,1.059,2.36,2.36C14.36,19.302,13.301,20.36,12,20.36z%20M12,16.36c-0.904,0-1.64,0.736-1.64,1.64s0.736,1.64,1.64,1.64%20s1.64-0.735,1.64-1.64S12.904,16.36,12,16.36z'/%3e%3crect%20style='fill:none;'%20width='32'%20height='32'/%3e%3c/svg%3e",
556
556
  vs = "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==",
557
- ie = /*#__PURE__*/function () {
558
- function ie() {
559
- _classCallCheck(this, ie);
557
+ ne = /*#__PURE__*/function () {
558
+ function ne() {
559
+ _classCallCheck(this, ne);
560
560
  }
561
- return _createClass(ie, null, [{
561
+ return _createClass(ne, null, [{
562
562
  key: "hide",
563
563
  value: function hide(e) {
564
564
  var t;
565
- (t = e.getElementsByClassName(ie.CONTAINER_CLASS)[0].style).visibility || (t.visibility = "hidden");
565
+ (t = e.getElementsByClassName(ne.CONTAINER_CLASS)[0].style).visibility || (t.visibility = "hidden");
566
566
  }
567
567
  }, {
568
568
  key: "applyCustomStylesToElements",
@@ -573,10 +573,10 @@ var bs = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e
573
573
  key: "applyCustomStyles",
574
574
  value: function applyCustomStyles(e, t, i, n) {
575
575
  var r, o, a, l;
576
- if ((r = i["default"]) != null && r.styles && ie.applyCustomStylesToElements(e, t, i["default"].styles), n === b.USER_ROLE) (o = i.user) != null && o.styles && ie.applyCustomStylesToElements(e, t, i.user.styles);else {
577
- (a = i.ai) != null && a.styles && ie.applyCustomStylesToElements(e, t, i.ai.styles);
576
+ if ((r = i["default"]) != null && r.styles && ne.applyCustomStylesToElements(e, t, i["default"].styles), n === b.USER_ROLE) (o = i.user) != null && o.styles && ne.applyCustomStylesToElements(e, t, i.user.styles);else {
577
+ (a = i.ai) != null && a.styles && ne.applyCustomStylesToElements(e, t, i.ai.styles);
578
578
  var c = (l = i[n]) == null ? void 0 : l.styles;
579
- c && ie.applyCustomStylesToElements(e, t, c);
579
+ c && ne.applyCustomStylesToElements(e, t, c);
580
580
  }
581
581
  }
582
582
  }, {
@@ -586,7 +586,7 @@ var bs = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e
586
586
  var i = document.createElement("img");
587
587
  e === b.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) || vs : 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) || bs, i.classList.add("avatar");
588
588
  var n = document.createElement("div");
589
- return n.classList.add(ie.CONTAINER_CLASS), n.appendChild(i), t && ie.applyCustomStyles(n, i, t, e), n;
589
+ return n.classList.add(ne.CONTAINER_CLASS), n.appendChild(i), t && ne.applyCustomStyles(n, i, t, e), n;
590
590
  }
591
591
  }, {
592
592
  key: "getPosition",
@@ -600,14 +600,14 @@ var bs = "data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='iso-8859-1'?%3e
600
600
  key: "add",
601
601
  value: function add(e, t, i) {
602
602
  var n = typeof i == "boolean" ? void 0 : i,
603
- r = ie.createAvatar(t, n),
604
- o = ie.getPosition(t, n);
603
+ r = ne.createAvatar(t, n),
604
+ o = ne.getPosition(t, n);
605
605
  r.classList.add(o === "left" ? "left-item-position" : "right-item-position"), e.insertAdjacentElement(o === "left" ? "beforebegin" : "afterend", r);
606
606
  }
607
607
  }]);
608
608
  }();
609
- ie.CONTAINER_CLASS = "avatar-container";
610
- var Zt = ie;
609
+ ne.CONTAINER_CLASS = "avatar-container";
610
+ var Zt = ne;
611
611
  var be = /*#__PURE__*/function () {
612
612
  function be() {
613
613
  _classCallCheck(this, be);
@@ -864,7 +864,7 @@ var Le = /*#__PURE__*/function () {
864
864
  var o = i.getElementsByClassName(r);
865
865
  Array.from(o || []).forEach(function (a) {
866
866
  var l = Le.getProcessedStyles(t, a, r);
867
- X.applyStylesToElement(a, l), Le.applyEvents(a, r);
867
+ Q.applyStylesToElement(a, l), Le.applyEvents(a, r);
868
868
  });
869
869
  });
870
870
  var n = i.getElementsByClassName(xs);
@@ -874,11 +874,11 @@ var Le = /*#__PURE__*/function () {
874
874
  }
875
875
  }]);
876
876
  }();
877
- var X = /*#__PURE__*/function () {
878
- function X() {
879
- _classCallCheck(this, X);
877
+ var Q = /*#__PURE__*/function () {
878
+ function Q() {
879
+ _classCallCheck(this, Q);
880
880
  }
881
- return _createClass(X, null, [{
881
+ return _createClass(Q, null, [{
882
882
  key: "applyStylesToElement",
883
883
  value: function applyStylesToElement(e, t) {
884
884
  var i = M.processStateful(t, {}, {});
@@ -897,7 +897,7 @@ var X = /*#__PURE__*/function () {
897
897
  value: function applyClassUtilitiesToElement(e, t) {
898
898
  var i = t.events,
899
899
  n = t.styles;
900
- i && X.applyEventsToElement(e, i), n && !Le.doesElementContainDeepChatClass(e) && X.applyStylesToElement(e, n);
900
+ i && Q.applyEventsToElement(e, i), n && !Le.doesElementContainDeepChatClass(e) && Q.applyStylesToElement(e, n);
901
901
  }
902
902
  }, {
903
903
  key: "applyCustomClassUtilities",
@@ -905,20 +905,20 @@ var X = /*#__PURE__*/function () {
905
905
  Object.keys(e).forEach(function (i) {
906
906
  var n = t.getElementsByClassName(i);
907
907
  Array.from(n).forEach(function (r) {
908
- e[i] && X.applyClassUtilitiesToElement(r, e[i]);
908
+ e[i] && Q.applyClassUtilitiesToElement(r, e[i]);
909
909
  });
910
910
  });
911
911
  }
912
912
  }, {
913
913
  key: "apply",
914
914
  value: function apply(e, t) {
915
- Le.applyDeepChatUtilities(e, e.htmlClassUtilities, t), X.applyCustomClassUtilities(e.htmlClassUtilities, t);
915
+ Le.applyDeepChatUtilities(e, e.htmlClassUtilities, t), Q.applyCustomClassUtilities(e.htmlClassUtilities, t);
916
916
  }
917
917
  }, {
918
918
  key: "traverseNodes",
919
919
  value: function traverseNodes(e, t) {
920
920
  e.nodeType === Node.ELEMENT_NODE && t.push(e.outerHTML), e.childNodes.forEach(function (i) {
921
- X.traverseNodes(i, t);
921
+ Q.traverseNodes(i, t);
922
922
  });
923
923
  }
924
924
  }, {
@@ -927,7 +927,7 @@ var X = /*#__PURE__*/function () {
927
927
  var i = new DOMParser().parseFromString(e, "text/html"),
928
928
  n = [];
929
929
  return i.body.childNodes.forEach(function (r) {
930
- X.traverseNodes(r, n);
930
+ Q.traverseNodes(r, n);
931
931
  }), n;
932
932
  }
933
933
  }]);
@@ -952,7 +952,7 @@ var ct = /*#__PURE__*/function () {
952
952
  value: function overwrite(e, t, i, n) {
953
953
  var r = e.messages,
954
954
  o = b.overwriteMessage(r, n, t, i, "html", "html-message");
955
- return o && (o.bubbleElement.innerHTML = t, X.apply(e, o.outerContainer), ue.flagHTMLUpdateClass(o.bubbleElement)), o;
955
+ return o && (o.bubbleElement.innerHTML = t, Q.apply(e, o.outerContainer), ue.flagHTMLUpdateClass(o.bubbleElement)), o;
956
956
  }
957
957
  // prettier-ignore
958
958
  }, {
@@ -965,7 +965,7 @@ var ct = /*#__PURE__*/function () {
965
965
  r.status = !1;
966
966
  }
967
967
  var o = ct.createElements(e, t, i);
968
- return b.fillEmptyMessageElement(o.bubbleElement, t), X.apply(e, o.outerContainer), ue.flagHTMLUpdateClass(o.bubbleElement), e.applyCustomStyles(o, i, !1, (a = e.messageStyles) == null ? void 0 : a.html), ct.addElement(e, o.outerContainer), o;
968
+ return b.fillEmptyMessageElement(o.bubbleElement, t), Q.apply(e, o.outerContainer), ue.flagHTMLUpdateClass(o.bubbleElement), e.applyCustomStyles(o, i, !1, (a = e.messageStyles) == null ? void 0 : a.html), ct.addElement(e, o.outerContainer), o;
969
969
  }
970
970
  }]);
971
971
  }();
@@ -1025,7 +1025,7 @@ var ks = /[&<>"]/,
1025
1025
  function Rs(s) {
1026
1026
  return Ms[s];
1027
1027
  }
1028
- function W(s) {
1028
+ function J(s) {
1029
1029
  return ks.test(s) ? s.replace(As, Rs) : s;
1030
1030
  }
1031
1031
  var g = {};
@@ -1036,7 +1036,7 @@ g.blockquote_close = function (s, e) {
1036
1036
  return "</blockquote>" + $e(s, e);
1037
1037
  };
1038
1038
  g.code = function (s, e) {
1039
- return s[e].block ? "<pre><code>" + W(s[e].content) + "</code></pre>" + $e(s, e) : "<code>" + W(s[e].content) + "</code>";
1039
+ return s[e].block ? "<pre><code>" + J(s[e].content) + "</code></pre>" + $e(s, e) : "<code>" + J(s[e].content) + "</code>";
1040
1040
  };
1041
1041
  g.fence = function (s, e, t, i, n) {
1042
1042
  var r = s[e],
@@ -1048,9 +1048,9 @@ g.fence = function (s, e, t, i, n) {
1048
1048
  h;
1049
1049
  if (r.params) {
1050
1050
  if (c = r.params.split(/\s+/g), d = c.join(" "), _s(n.rules.fence_custom, c[0])) return n.rules.fence_custom[c[0]](s, e, t, i, n);
1051
- l = W(Ge(kt(d))), o = ' class="' + a + l + '"';
1051
+ l = J(Ge(kt(d))), o = ' class="' + a + l + '"';
1052
1052
  }
1053
- return t.highlight ? h = t.highlight.apply(t.highlight, [r.content].concat(c)) || W(r.content) : h = W(r.content), "<pre><code" + o + ">" + h + "</code></pre>" + $e(s, e);
1053
+ return t.highlight ? h = t.highlight.apply(t.highlight, [r.content].concat(c)) || J(r.content) : h = J(r.content), "<pre><code" + o + ">" + h + "</code></pre>" + $e(s, e);
1054
1054
  };
1055
1055
  g.fence_custom = {};
1056
1056
  g.heading_open = function (s, e) {
@@ -1090,17 +1090,17 @@ g.paragraph_close = function (s, e) {
1090
1090
  return (s[e].tight ? "" : "</p>") + (t ? $e(s, e) : "");
1091
1091
  };
1092
1092
  g.link_open = function (s, e, t) {
1093
- var i = s[e].title ? ' title="' + W(Ge(s[e].title)) + '"' : "",
1093
+ var i = s[e].title ? ' title="' + J(Ge(s[e].title)) + '"' : "",
1094
1094
  n = t.linkTarget ? ' target="' + t.linkTarget + '"' : "";
1095
- return '<a href="' + W(s[e].href) + '"' + i + n + ">";
1095
+ return '<a href="' + J(s[e].href) + '"' + i + n + ">";
1096
1096
  };
1097
1097
  g.link_close = function () {
1098
1098
  return "</a>";
1099
1099
  };
1100
1100
  g.image = function (s, e, t) {
1101
- var i = ' src="' + W(s[e].src) + '"',
1102
- n = s[e].title ? ' title="' + W(Ge(s[e].title)) + '"' : "",
1103
- r = ' alt="' + (s[e].alt ? W(Ge(kt(s[e].alt))) : "") + '"',
1101
+ var i = ' src="' + J(s[e].src) + '"',
1102
+ n = s[e].title ? ' title="' + J(Ge(s[e].title)) + '"' : "",
1103
+ r = ' alt="' + (s[e].alt ? J(Ge(kt(s[e].alt))) : "") + '"',
1104
1104
  o = t.xhtmlOut ? " /" : "";
1105
1105
  return "<img" + i + r + n + o + ">";
1106
1106
  };
@@ -1173,10 +1173,10 @@ g.mark_close = function () {
1173
1173
  return "</mark>";
1174
1174
  };
1175
1175
  g.sub = function (s, e) {
1176
- return "<sub>" + W(s[e].content) + "</sub>";
1176
+ return "<sub>" + J(s[e].content) + "</sub>";
1177
1177
  };
1178
1178
  g.sup = function (s, e) {
1179
- return "<sup>" + W(s[e].content) + "</sup>";
1179
+ return "<sup>" + J(s[e].content) + "</sup>";
1180
1180
  };
1181
1181
  g.hardbreak = function (s, e, t) {
1182
1182
  return t.xhtmlOut ? "<br />\n" : "<br>\n";
@@ -1185,7 +1185,7 @@ g.softbreak = function (s, e, t) {
1185
1185
  return t.breaks ? t.xhtmlOut ? "<br />\n" : "<br>\n" : "\n";
1186
1186
  };
1187
1187
  g.text = function (s, e) {
1188
- return W(s[e].content);
1188
+ return J(s[e].content);
1189
1189
  };
1190
1190
  g.htmlblock = function (s, e) {
1191
1191
  return s[e].content;
@@ -1194,7 +1194,7 @@ g.htmltag = function (s, e) {
1194
1194
  return s[e].content;
1195
1195
  };
1196
1196
  g.abbr_open = function (s, e) {
1197
- return '<abbr title="' + W(Ge(s[e].title)) + '">';
1197
+ return '<abbr title="' + J(Ge(s[e].title)) + '">';
1198
1198
  };
1199
1199
  g.abbr_close = function () {
1200
1200
  return "</abbr>";
@@ -1258,14 +1258,14 @@ cn.prototype.render = function (s, e, t) {
1258
1258
  for (var i = this.rules, n = s.length, r = -1, o = ""; ++r < n;) s[r].type === "inline" ? o += this.renderInline(s[r].children, e, t) : o += i[s[r].type](s, r, e, t, this);
1259
1259
  return o;
1260
1260
  };
1261
- function Q() {
1261
+ function te() {
1262
1262
  this.__rules__ = [], this.__cache__ = null;
1263
1263
  }
1264
- Q.prototype.__find__ = function (s) {
1264
+ te.prototype.__find__ = function (s) {
1265
1265
  for (var e = this.__rules__.length, t = -1; e--;) if (this.__rules__[++t].name === s) return t;
1266
1266
  return -1;
1267
1267
  };
1268
- Q.prototype.__compile__ = function () {
1268
+ te.prototype.__compile__ = function () {
1269
1269
  var s = this,
1270
1270
  e = [""];
1271
1271
  s.__rules__.forEach(function (t) {
@@ -1278,13 +1278,13 @@ Q.prototype.__compile__ = function () {
1278
1278
  });
1279
1279
  });
1280
1280
  };
1281
- Q.prototype.at = function (s, e, t) {
1281
+ te.prototype.at = function (s, e, t) {
1282
1282
  var i = this.__find__(s),
1283
1283
  n = t || {};
1284
1284
  if (i === -1) throw new Error("Parser rule not found: " + s);
1285
1285
  this.__rules__[i].fn = e, this.__rules__[i].alt = n.alt || [], this.__cache__ = null;
1286
1286
  };
1287
- Q.prototype.before = function (s, e, t, i) {
1287
+ te.prototype.before = function (s, e, t, i) {
1288
1288
  var n = this.__find__(s),
1289
1289
  r = i || {};
1290
1290
  if (n === -1) throw new Error("Parser rule not found: " + s);
@@ -1295,7 +1295,7 @@ Q.prototype.before = function (s, e, t, i) {
1295
1295
  alt: r.alt || []
1296
1296
  }), this.__cache__ = null;
1297
1297
  };
1298
- Q.prototype.after = function (s, e, t, i) {
1298
+ te.prototype.after = function (s, e, t, i) {
1299
1299
  var n = this.__find__(s),
1300
1300
  r = i || {};
1301
1301
  if (n === -1) throw new Error("Parser rule not found: " + s);
@@ -1306,7 +1306,7 @@ Q.prototype.after = function (s, e, t, i) {
1306
1306
  alt: r.alt || []
1307
1307
  }), this.__cache__ = null;
1308
1308
  };
1309
- Q.prototype.push = function (s, e, t) {
1309
+ te.prototype.push = function (s, e, t) {
1310
1310
  var i = t || {};
1311
1311
  this.__rules__.push({
1312
1312
  name: s,
@@ -1315,7 +1315,7 @@ Q.prototype.push = function (s, e, t) {
1315
1315
  alt: i.alt || []
1316
1316
  }), this.__cache__ = null;
1317
1317
  };
1318
- Q.prototype.enable = function (s, e) {
1318
+ te.prototype.enable = function (s, e) {
1319
1319
  s = Array.isArray(s) ? s : [s], e && this.__rules__.forEach(function (t) {
1320
1320
  t.enabled = !1;
1321
1321
  }), s.forEach(function (t) {
@@ -1324,14 +1324,14 @@ Q.prototype.enable = function (s, e) {
1324
1324
  this.__rules__[i].enabled = !0;
1325
1325
  }, this), this.__cache__ = null;
1326
1326
  };
1327
- Q.prototype.disable = function (s) {
1327
+ te.prototype.disable = function (s) {
1328
1328
  s = Array.isArray(s) ? s : [s], s.forEach(function (e) {
1329
1329
  var t = this.__find__(e);
1330
1330
  if (t < 0) throw new Error("Rules manager: invalid rule name " + e);
1331
1331
  this.__rules__[t].enabled = !1;
1332
1332
  }, this), this.__cache__ = null;
1333
1333
  };
1334
- Q.prototype.getRules = function (s) {
1334
+ te.prototype.getRules = function (s) {
1335
1335
  return this.__cache__ === null && this.__compile__(), this.__cache__[s] || [];
1336
1336
  };
1337
1337
  function Is(s) {
@@ -1621,24 +1621,24 @@ function Qe(s, e, t) {
1621
1621
  return s.substr(0, e) + t + s.substr(e + 1);
1622
1622
  }
1623
1623
  function Ws(s) {
1624
- var e, t, i, n, r, o, a, l, c, d, h, u, f, m, p, x, S;
1624
+ var e, t, i, n, r, o, a, l, c, d, h, u, f, m, p, y, x;
1625
1625
  if (s.options.typographer) {
1626
- for (S = [], p = s.tokens.length - 1; p >= 0; p--) if (s.tokens[p].type === "inline") {
1627
- for (x = s.tokens[p].children, S.length = 0, e = 0; e < x.length; e++) if (t = x[e], !(t.type !== "text" || Vs.test(t.text))) {
1628
- for (a = x[e].level, f = S.length - 1; f >= 0 && !(S[f].level <= a); f--);
1629
- S.length = f + 1, i = t.content, r = 0, o = i.length;
1626
+ for (x = [], p = s.tokens.length - 1; p >= 0; p--) if (s.tokens[p].type === "inline") {
1627
+ for (y = s.tokens[p].children, x.length = 0, e = 0; e < y.length; e++) if (t = y[e], !(t.type !== "text" || Vs.test(t.text))) {
1628
+ for (a = y[e].level, f = x.length - 1; f >= 0 && !(x[f].level <= a); f--);
1629
+ x.length = f + 1, i = t.content, r = 0, o = i.length;
1630
1630
  e: for (; r < o && (wn.lastIndex = r, n = wn.exec(i), !!n);) {
1631
1631
  if (l = !Cn(i, n.index - 1), r = n.index + 1, m = n[0] === "'", c = !Cn(i, r), !c && !l) {
1632
1632
  m && (t.content = Qe(t.content, n.index, Tn));
1633
1633
  continue;
1634
1634
  }
1635
1635
  if (h = !c, u = !l, u) {
1636
- for (f = S.length - 1; f >= 0 && (d = S[f], !(S[f].level < a)); f--) if (d.single === m && S[f].level === a) {
1637
- d = S[f], m ? (x[d.token].content = Qe(x[d.token].content, d.pos, s.options.quotes[2]), t.content = Qe(t.content, n.index, s.options.quotes[3])) : (x[d.token].content = Qe(x[d.token].content, d.pos, s.options.quotes[0]), t.content = Qe(t.content, n.index, s.options.quotes[1])), S.length = f;
1636
+ for (f = x.length - 1; f >= 0 && (d = x[f], !(x[f].level < a)); f--) if (d.single === m && x[f].level === a) {
1637
+ d = x[f], m ? (y[d.token].content = Qe(y[d.token].content, d.pos, s.options.quotes[2]), t.content = Qe(t.content, n.index, s.options.quotes[3])) : (y[d.token].content = Qe(y[d.token].content, d.pos, s.options.quotes[0]), t.content = Qe(t.content, n.index, s.options.quotes[1])), x.length = f;
1638
1638
  continue e;
1639
1639
  }
1640
1640
  }
1641
- h ? S.push({
1641
+ h ? x.push({
1642
1642
  token: e,
1643
1643
  pos: n.index,
1644
1644
  single: m,
@@ -1651,7 +1651,7 @@ function Ws(s) {
1651
1651
  }
1652
1652
  var Fi = [["block", Is], ["abbr", Ps], ["references", Ns], ["inline", Ds], ["footnote_tail", Fs], ["abbr2", Bs], ["replacements", zs], ["smartquotes", Ws]];
1653
1653
  function rs() {
1654
- this.options = {}, this.ruler = new Q();
1654
+ this.options = {}, this.ruler = new te();
1655
1655
  for (var s = 0; s < Fi.length; s++) this.ruler.push(Fi[s][0], Fi[s][1]);
1656
1656
  }
1657
1657
  rs.prototype.process = function (s) {
@@ -1759,12 +1759,12 @@ function Js(s, e, t, i) {
1759
1759
  f,
1760
1760
  m,
1761
1761
  p = s.bMarks[e] + s.tShift[e],
1762
- x = s.eMarks[e];
1763
- if (p > x || s.src.charCodeAt(p++) !== 62 || s.level >= s.options.maxNesting) return !1;
1762
+ y = s.eMarks[e];
1763
+ if (p > y || s.src.charCodeAt(p++) !== 62 || s.level >= s.options.maxNesting) return !1;
1764
1764
  if (i) return !0;
1765
- for (s.src.charCodeAt(p) === 32 && p++, l = s.blkIndent, s.blkIndent = 0, a = [s.bMarks[e]], s.bMarks[e] = p, p = p < x ? s.skipSpaces(p) : p, r = p >= x, o = [s.tShift[e]], s.tShift[e] = p - s.bMarks[e], h = s.parser.ruler.getRules("blockquote"), n = e + 1; n < t && (p = s.bMarks[n] + s.tShift[n], x = s.eMarks[n], !(p >= x)); n++) {
1765
+ for (s.src.charCodeAt(p) === 32 && p++, l = s.blkIndent, s.blkIndent = 0, a = [s.bMarks[e]], s.bMarks[e] = p, p = p < y ? s.skipSpaces(p) : p, r = p >= y, o = [s.tShift[e]], s.tShift[e] = p - s.bMarks[e], h = s.parser.ruler.getRules("blockquote"), n = e + 1; n < t && (p = s.bMarks[n] + s.tShift[n], y = s.eMarks[n], !(p >= y)); n++) {
1766
1766
  if (s.src.charCodeAt(p++) === 62) {
1767
- s.src.charCodeAt(p) === 32 && p++, a.push(s.bMarks[n]), s.bMarks[n] = p, p = p < x ? s.skipSpaces(p) : p, r = p >= x, o.push(s.tShift[n]), s.tShift[n] = p - s.bMarks[n];
1767
+ s.src.charCodeAt(p) === 32 && p++, a.push(s.bMarks[n]), s.bMarks[n] = p, p = p < y ? s.skipSpaces(p) : p, r = p >= y, o.push(s.tShift[n]), s.tShift[n] = p - s.bMarks[n];
1768
1768
  continue;
1769
1769
  }
1770
1770
  if (r) break;
@@ -1839,21 +1839,21 @@ function Ys(s, e, t, i) {
1839
1839
  f,
1840
1840
  m,
1841
1841
  p,
1842
+ y,
1842
1843
  x,
1843
- S,
1844
- ee,
1845
- re,
1844
+ D,
1845
+ z,
1846
1846
  Te,
1847
1847
  R,
1848
- $ = !0,
1849
- K,
1848
+ X = !0,
1849
+ Z,
1850
1850
  N,
1851
1851
  Oe,
1852
1852
  pt;
1853
- if ((h = An(s, e)) >= 0) x = !0;else if ((h = kn(s, e)) >= 0) x = !1;else return !1;
1853
+ if ((h = An(s, e)) >= 0) y = !0;else if ((h = kn(s, e)) >= 0) y = !1;else return !1;
1854
1854
  if (s.level >= s.options.maxNesting) return !1;
1855
1855
  if (p = s.src.charCodeAt(h - 1), i) return !0;
1856
- for (ee = s.tokens.length, x ? (d = s.bMarks[e] + s.tShift[e], m = Number(s.src.substr(d, h - d - 1)), s.tokens.push({
1856
+ for (D = s.tokens.length, y ? (d = s.bMarks[e] + s.tShift[e], m = Number(s.src.substr(d, h - d - 1)), s.tokens.push({
1857
1857
  type: "ordered_list_open",
1858
1858
  order: m,
1859
1859
  lines: Te = [e, 0],
@@ -1862,28 +1862,28 @@ function Ys(s, e, t, i) {
1862
1862
  type: "bullet_list_open",
1863
1863
  lines: Te = [e, 0],
1864
1864
  level: s.level++
1865
- }), n = e, re = !1, K = s.parser.ruler.getRules("list"); n < t && (S = s.skipSpaces(h), u = s.eMarks[n], S >= u ? f = 1 : f = S - h, f > 4 && (f = 1), f < 1 && (f = 1), r = h - s.bMarks[n] + f, s.tokens.push({
1865
+ }), n = e, z = !1, Z = s.parser.ruler.getRules("list"); n < t && (x = s.skipSpaces(h), u = s.eMarks[n], x >= u ? f = 1 : f = x - h, f > 4 && (f = 1), f < 1 && (f = 1), r = h - s.bMarks[n] + f, s.tokens.push({
1866
1866
  type: "list_item_open",
1867
1867
  lines: R = [e, 0],
1868
1868
  level: s.level++
1869
- }), 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 || re) && ($ = !1), re = 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({
1869
+ }), a = s.blkIndent, l = s.tight, o = s.tShift[e], c = s.parentType, s.tShift[e] = x - s.bMarks[e], s.blkIndent = r, s.tight = !0, s.parentType = "list", s.parser.tokenize(s, e, t, !0), (!s.tight || z) && (X = !1), z = 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({
1870
1870
  type: "list_item_close",
1871
1871
  level: --s.level
1872
- }), n = e = s.line, R[1] = n, S = s.bMarks[e], !(n >= t || s.isEmpty(n) || s.tShift[n] < s.blkIndent));) {
1873
- for (pt = !1, N = 0, Oe = K.length; N < Oe; N++) if (K[N](s, n, t, !0)) {
1872
+ }), n = e = s.line, R[1] = n, x = s.bMarks[e], !(n >= t || s.isEmpty(n) || s.tShift[n] < s.blkIndent));) {
1873
+ for (pt = !1, N = 0, Oe = Z.length; N < Oe; N++) if (Z[N](s, n, t, !0)) {
1874
1874
  pt = !0;
1875
1875
  break;
1876
1876
  }
1877
1877
  if (pt) break;
1878
- if (x) {
1878
+ if (y) {
1879
1879
  if (h = An(s, n), h < 0) break;
1880
1880
  } else if (h = kn(s, n), h < 0) break;
1881
1881
  if (p !== s.src.charCodeAt(h - 1)) break;
1882
1882
  }
1883
1883
  return s.tokens.push({
1884
- type: x ? "ordered_list_close" : "bullet_list_close",
1884
+ type: y ? "ordered_list_close" : "bullet_list_close",
1885
1885
  level: --s.level
1886
- }), Te[1] = n, s.line = n, $ && Zs(s, ee), !0;
1886
+ }), Te[1] = n, s.line = n, X && Zs(s, D), !0;
1887
1887
  }
1888
1888
  function Qs(s, e, t, i) {
1889
1889
  var n,
@@ -2088,7 +2088,7 @@ function ar(s, e) {
2088
2088
  for (t = e + 2, i = s.tokens.length - 2; t < i; t++) s.tokens[t].level === n && s.tokens[t].type === "paragraph_open" && (s.tokens[t + 2].tight = !0, s.tokens[t].tight = !0, t += 2);
2089
2089
  }
2090
2090
  function lr(s, e, t, i) {
2091
- var n, r, o, a, l, c, d, h, u, f, m, p, x, S;
2091
+ var n, r, o, a, l, c, d, h, u, f, m, p, y, x;
2092
2092
  if (i) return s.ddIndent < 0 ? !1 : Gt(s, e) >= 0;
2093
2093
  if (d = e + 1, s.isEmpty(d) && ++d > t || s.tShift[d] < s.blkIndent || (n = Gt(s, d), n < 0) || s.level >= s.options.maxNesting) return !1;
2094
2094
  c = s.tokens.length, s.tokens.push({
@@ -2097,7 +2097,7 @@ function lr(s, e, t, i) {
2097
2097
  level: s.level++
2098
2098
  }), o = e, r = d;
2099
2099
  e: for (;;) {
2100
- for (S = !0, x = !1, s.tokens.push({
2100
+ for (x = !0, y = !1, s.tokens.push({
2101
2101
  type: "dt_open",
2102
2102
  lines: [o, o],
2103
2103
  level: s.level++
@@ -2115,7 +2115,7 @@ function lr(s, e, t, i) {
2115
2115
  type: "dd_open",
2116
2116
  lines: a = [d, 0],
2117
2117
  level: s.level++
2118
- }), p = s.tight, u = s.ddIndent, h = s.blkIndent, m = s.tShift[r], f = s.parentType, s.blkIndent = s.ddIndent = s.tShift[r] + 2, s.tShift[r] = n - s.bMarks[r], s.tight = !0, s.parentType = "deflist", s.parser.tokenize(s, r, t, !0), (!s.tight || x) && (S = !1), x = s.line - r > 1 && s.isEmpty(s.line - 1), s.tShift[r] = m, s.tight = p, s.parentType = f, s.blkIndent = h, s.ddIndent = u, s.tokens.push({
2118
+ }), p = s.tight, u = s.ddIndent, h = s.blkIndent, m = s.tShift[r], f = s.parentType, s.blkIndent = s.ddIndent = s.tShift[r] + 2, s.tShift[r] = n - s.bMarks[r], s.tight = !0, s.parentType = "deflist", s.parser.tokenize(s, r, t, !0), (!s.tight || y) && (x = !1), y = s.line - r > 1 && s.isEmpty(s.line - 1), s.tShift[r] = m, s.tight = p, s.parentType = f, s.blkIndent = h, s.ddIndent = u, s.tokens.push({
2119
2119
  type: "dd_close",
2120
2120
  level: --s.level
2121
2121
  }), a[1] = d = s.line, d >= t || s.tShift[d] < s.blkIndent) break e;
@@ -2127,7 +2127,7 @@ function lr(s, e, t, i) {
2127
2127
  return s.tokens.push({
2128
2128
  type: "dl_close",
2129
2129
  level: --s.level
2130
- }), l[1] = d, s.line = d, S && ar(s, c), !0;
2130
+ }), l[1] = d, s.line = d, x && ar(s, c), !0;
2131
2131
  }
2132
2132
  function cr(s, e) {
2133
2133
  var t,
@@ -2165,7 +2165,7 @@ function cr(s, e) {
2165
2165
  }
2166
2166
  var Wt = [["code", $s], ["fences", Ks, ["paragraph", "blockquote", "list"]], ["blockquote", Js, ["paragraph", "blockquote", "list"]], ["hr", Xs, ["paragraph", "blockquote", "list"]], ["list", Ys, ["paragraph", "blockquote"]], ["footnote", Qs, ["paragraph"]], ["heading", er, ["paragraph", "blockquote"]], ["lheading", tr], ["htmlblock", rr, ["paragraph", "blockquote"]], ["table", or, ["paragraph"]], ["deflist", lr, ["paragraph"]], ["paragraph", cr]];
2167
2167
  function dn() {
2168
- this.ruler = new Q();
2168
+ this.ruler = new te();
2169
2169
  for (var s = 0; s < Wt.length; s++) this.ruler.push(Wt[s][0], Wt[s][1], {
2170
2170
  alt: (Wt[s][2] || []).slice()
2171
2171
  });
@@ -2650,7 +2650,7 @@ function Xr(s, e) {
2650
2650
  }
2651
2651
  var ji = [["text", pr], ["newline", mr], ["escape", gr], ["backticks", br], ["del", vr], ["ins", yr], ["mark", xr], ["emphasis", Er], ["sub", Sr], ["sup", Tr], ["links", Cr], ["footnote_inline", kr], ["footnote_ref", Ar], ["autolink", Lr], ["htmltag", $r], ["entity", Xr]];
2652
2652
  function Ei() {
2653
- this.ruler = new Q();
2653
+ this.ruler = new te();
2654
2654
  for (var s = 0; s < ji.length; s++) this.ruler.push(ji[s][0], ji[s][1]);
2655
2655
  this.validateLink = Zr;
2656
2656
  }
@@ -2808,7 +2808,7 @@ function as(s, e, t) {
2808
2808
  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;
2809
2809
  }
2810
2810
  function Se(s, e) {
2811
- 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 Ei(), this.block = new dn(), this.core = new rs(), this.renderer = new cn(), this.ruler = new Q(), this.options = {}, this.configure(to[s]), this.set(e || {});
2811
+ 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 Ei(), this.block = new dn(), this.core = new rs(), this.renderer = new cn(), this.ruler = new te(), this.options = {}, this.configure(to[s]), this.set(e || {});
2812
2812
  }
2813
2813
  Se.prototype.set = function (s) {
2814
2814
  Qn(this.options, s);
@@ -2970,7 +2970,7 @@ var Me = /*#__PURE__*/function () {
2970
2970
  }]);
2971
2971
  }();
2972
2972
  Me.DEFAULT_FILE_NAME = "file";
2973
- var B = Me;
2973
+ var j = Me;
2974
2974
  var Qt = /*#__PURE__*/function () {
2975
2975
  function Qt() {
2976
2976
  _classCallCheck(this, Qt);
@@ -2984,7 +2984,7 @@ var Qt = /*#__PURE__*/function () {
2984
2984
  isHistory: i,
2985
2985
  isInitial: i
2986
2986
  }));
2987
- B.reAddFileRefToObject(t, n), (r = e.onMessage) == null || r.call(e, n), e.dispatchEvent(new CustomEvent("message", {
2987
+ j.reAddFileRefToObject(t, n), (r = e.onMessage) == null || r.call(e, n), e.dispatchEvent(new CustomEvent("message", {
2988
2988
  detail: n
2989
2989
  })), ue.fireOnNewMessage(e, n);
2990
2990
  }
@@ -3012,11 +3012,11 @@ var Qt = /*#__PURE__*/function () {
3012
3012
  }
3013
3013
  }]);
3014
3014
  }();
3015
- var j = /*#__PURE__*/function () {
3016
- function j() {
3017
- _classCallCheck(this, j);
3015
+ var U = /*#__PURE__*/function () {
3016
+ function U() {
3017
+ _classCallCheck(this, U);
3018
3018
  }
3019
- return _createClass(j, null, [{
3019
+ return _createClass(U, null, [{
3020
3020
  key: "applyCustomStylesToElements",
3021
3021
  value: function applyCustomStylesToElements(e, t, i) {
3022
3022
  if (i && (Object.assign(e.outerContainer.style, i.outerContainer), Object.assign(e.innerContainer.style, i.innerContainer), Object.assign(e.bubbleElement.style, i.bubble), t)) {
@@ -3028,7 +3028,7 @@ var j = /*#__PURE__*/function () {
3028
3028
  }, {
3029
3029
  key: "applySideStyles",
3030
3030
  value: function applySideStyles(e, t, i, n) {
3031
- n && (j.applyCustomStylesToElements(e, i, n.shared), t === b.USER_ROLE ? j.applyCustomStylesToElements(e, i, n.user) : (j.applyCustomStylesToElements(e, i, n.ai), j.applyCustomStylesToElements(e, i, n[t])));
3031
+ n && (U.applyCustomStylesToElements(e, i, n.shared), t === b.USER_ROLE ? U.applyCustomStylesToElements(e, i, n.user) : (U.applyCustomStylesToElements(e, i, n.ai), U.applyCustomStylesToElements(e, i, n[t])));
3032
3032
  }
3033
3033
  }, {
3034
3034
  key: "isElementsStyles",
@@ -3040,7 +3040,7 @@ var j = /*#__PURE__*/function () {
3040
3040
  key: "applyCustomStyles",
3041
3041
  value: function applyCustomStyles(e, t, i, n, r) {
3042
3042
  var o;
3043
- r && e["default"] !== r ? j.isElementsStyles(r) ? (j.applyCustomStylesToElements(t, n, (o = e["default"]) == null ? void 0 : o.shared), j.applyCustomStylesToElements(t, n, r)) : (j.applySideStyles(t, i, n, e["default"]), j.applySideStyles(t, i, n, r)) : j.applySideStyles(t, i, n, e["default"]);
3043
+ r && e["default"] !== r ? U.isElementsStyles(r) ? (U.applyCustomStylesToElements(t, n, (o = e["default"]) == null ? void 0 : o.shared), U.applyCustomStylesToElements(t, n, r)) : (U.applySideStyles(t, i, n, e["default"]), U.applySideStyles(t, i, n, r)) : U.applySideStyles(t, i, n, e["default"]);
3044
3044
  }
3045
3045
  // prettier-ignore
3046
3046
  }, {
@@ -3097,7 +3097,7 @@ var ot = /*#__PURE__*/function () {
3097
3097
  var _this4 = this;
3098
3098
  var i = this.createNewMessageElement(e, t);
3099
3099
  return this.elementRef.appendChild(i.outerContainer), setTimeout(function () {
3100
- return U.scrollToBottom(_this4.elementRef);
3100
+ return H.scrollToBottom(_this4.elementRef);
3101
3101
  }), i;
3102
3102
  }
3103
3103
  }, {
@@ -3131,7 +3131,7 @@ var ot = /*#__PURE__*/function () {
3131
3131
  }, {
3132
3132
  key: "applyCustomStyles",
3133
3133
  value: function applyCustomStyles(e, t, i, n) {
3134
- e && this.messageStyles && j.applyCustomStyles(this.messageStyles, e, t, i, n);
3134
+ e && this.messageStyles && U.applyCustomStyles(this.messageStyles, e, t, i, n);
3135
3135
  }
3136
3136
  }, {
3137
3137
  key: "removeLastMessage",
@@ -3217,13 +3217,13 @@ var Re = /*#__PURE__*/function () {
3217
3217
  if (this._hasStreamEnded) return;
3218
3218
  if ((e == null ? void 0 : e.text) === void 0 && (e == null ? void 0 : e.html) === void 0) return console.error(A.INVALID_STREAM_EVENT);
3219
3219
  var t = (e == null ? void 0 : e.text) || (e == null ? void 0 : e.html) || "",
3220
- i = U.isScrollbarAtBottomOfElement(this._messages.elementRef),
3220
+ i = H.isScrollbarAtBottomOfElement(this._messages.elementRef),
3221
3221
  n = (e == null ? void 0 : e.text) !== void 0 ? "text" : "html";
3222
3222
  if (!this._elements && this._streamedContent === "") this.setInitialState(n, t, e == null ? void 0 : e.role);else {
3223
3223
  if (this._streamType !== n) return console.error(A.INVALID_STREAM_EVENT_MIX);
3224
3224
  this.updateBasedOnType(t, n, (r = this._elements) == null ? void 0 : r.bubbleElement, e == null ? void 0 : e.overwrite);
3225
3225
  }
3226
- i && U.scrollToBottom(this._messages.elementRef);
3226
+ i && H.scrollToBottom(this._messages.elementRef);
3227
3227
  }
3228
3228
  }, {
3229
3229
  key: "setInitialState",
@@ -3259,7 +3259,7 @@ var Re = /*#__PURE__*/function () {
3259
3259
  var e = this._messages.textElementsToText;
3260
3260
  if (!this._endStreamAfterOperation && !(this._fileAdded && !this._elements)) {
3261
3261
  if (!this._elements) throw Error(A.NO_VALID_STREAM_EVENTS_SENT);
3262
- (t = this._elements.bubbleElement) != null && t.classList.contains(Re.MESSAGE_CLASS) && (this._streamType === "text" ? (e[e.length - 1][1] = this._streamedContent, this._message && (this._message.text = this._streamedContent), this._messages.textToSpeech && rt.speak(this._streamedContent, this._messages.textToSpeech)) : this._streamType === "html" && (this._streamedContent === Re.HTML_CONTENT_PLACEHOLDER && (this._streamedContent = ((i = this._elements.bubbleElement) == null ? void 0 : i.innerHTML) || ""), this._elements && X.apply(this._messages, this._elements.outerContainer), this._message && (this._message.html = this._streamedContent)), this._message && this._messages.sendClientUpdate(ot.createMessageContent(this._message), !1), this._hasStreamEnded = !0);
3262
+ (t = this._elements.bubbleElement) != null && t.classList.contains(Re.MESSAGE_CLASS) && (this._streamType === "text" ? (e[e.length - 1][1] = this._streamedContent, this._message && (this._message.text = this._streamedContent), this._messages.textToSpeech && rt.speak(this._streamedContent, this._messages.textToSpeech)) : this._streamType === "html" && (this._streamedContent === Re.HTML_CONTENT_PLACEHOLDER && (this._streamedContent = ((i = this._elements.bubbleElement) == null ? void 0 : i.innerHTML) || ""), this._elements && Q.apply(this._messages, this._elements.outerContainer), this._message && (this._message.html = this._streamedContent)), this._message && this._messages.sendClientUpdate(ot.createMessageContent(this._message), !1), this._hasStreamEnded = !0);
3263
3263
  }
3264
3264
  }
3265
3265
  }, {
@@ -3558,46 +3558,46 @@ function lo(s, e) {
3558
3558
  m.abort(), document.hidden || R();
3559
3559
  }
3560
3560
  l || document.addEventListener("visibilitychange", p);
3561
- var x = ao,
3562
- S = 0;
3563
- function ee() {
3564
- document.removeEventListener("visibilitychange", p), window.clearTimeout(S), m.abort();
3561
+ var y = ao,
3562
+ x = 0;
3563
+ function D() {
3564
+ document.removeEventListener("visibilitychange", p), window.clearTimeout(x), m.abort();
3565
3565
  }
3566
3566
  t == null || t.addEventListener("abort", function () {
3567
- ee(), h();
3567
+ D(), h();
3568
3568
  });
3569
- var re = c !== null && c !== void 0 ? c : window.fetch,
3569
+ var z = c !== null && c !== void 0 ? c : window.fetch,
3570
3570
  Te = n !== null && n !== void 0 ? n : co;
3571
3571
  function R() {
3572
3572
  return _R.apply(this, arguments);
3573
3573
  }
3574
3574
  function _R() {
3575
3575
  _R = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
3576
- var $, K, N;
3576
+ var X, Z, N;
3577
3577
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
3578
3578
  while (1) switch (_context4.prev = _context4.next) {
3579
3579
  case 0:
3580
3580
  m = new AbortController();
3581
3581
  _context4.prev = 1;
3582
3582
  _context4.next = 4;
3583
- return re(s, Object.assign(Object.assign({}, d), {
3583
+ return z(s, Object.assign(Object.assign({}, d), {
3584
3584
  headers: f,
3585
3585
  signal: m.signal
3586
3586
  }));
3587
3587
  case 4:
3588
- K = _context4.sent;
3588
+ Z = _context4.sent;
3589
3589
  _context4.next = 7;
3590
- return Te(K);
3590
+ return Te(Z);
3591
3591
  case 7:
3592
3592
  _context4.next = 9;
3593
- return io(K.body, no(so(function (N) {
3593
+ return io(Z.body, no(so(function (N) {
3594
3594
  N ? f[Pn] = N : delete f[Pn];
3595
3595
  }, function (N) {
3596
- x = N;
3596
+ y = N;
3597
3597
  }, r)));
3598
3598
  case 9:
3599
3599
  o == null || o();
3600
- ee();
3600
+ D();
3601
3601
  h();
3602
3602
  _context4.next = 17;
3603
3603
  break;
@@ -3605,10 +3605,10 @@ function lo(s, e) {
3605
3605
  _context4.prev = 14;
3606
3606
  _context4.t0 = _context4["catch"](1);
3607
3607
  if (!m.signal.aborted) try {
3608
- N = ($ = a == null ? void 0 : a(_context4.t0)) !== null && $ !== void 0 ? $ : x;
3609
- window.clearTimeout(S), S = window.setTimeout(R, N);
3608
+ N = (X = a == null ? void 0 : a(_context4.t0)) !== null && X !== void 0 ? X : y;
3609
+ window.clearTimeout(x), x = window.setTimeout(R, N);
3610
3610
  } catch (N) {
3611
- ee(), u(N);
3611
+ D(), u(N);
3612
3612
  }
3613
3613
  case 17:
3614
3614
  case "end":
@@ -3637,10 +3637,10 @@ var C = /*#__PURE__*/function () {
3637
3637
  var n,
3638
3638
  r,
3639
3639
  p,
3640
+ y,
3640
3641
  x,
3641
- S,
3642
- ee,
3643
- re,
3642
+ D,
3643
+ z,
3644
3644
  Te,
3645
3645
  o,
3646
3646
  _yield$v$processReque,
@@ -3680,21 +3680,21 @@ var C = /*#__PURE__*/function () {
3680
3680
  }
3681
3681
  return _context7.abrupt("return", v.onInterceptorError(i, c, h));
3682
3682
  case 15:
3683
- if (!((x = e.connectSettings) != null && x.handler)) {
3683
+ if (!((y = e.connectSettings) != null && y.handler)) {
3684
3684
  _context7.next = 17;
3685
3685
  break;
3686
3686
  }
3687
3687
  return _context7.abrupt("return", Ee.stream(e, a, i));
3688
3688
  case 17:
3689
- if (!(((S = e.connectSettings) == null ? void 0 : S.url) === me.URL)) {
3689
+ if (!(((x = e.connectSettings) == null ? void 0 : x.url) === me.URL)) {
3690
3690
  _context7.next = 19;
3691
3691
  break;
3692
3692
  }
3693
3693
  return _context7.abrupt("return", me.requestStream(i, e.streamHandlers));
3694
3694
  case 19:
3695
3695
  f = new pe(i), m = v.fetch.bind(this, e, l, n);
3696
- return _context7.abrupt("return", (lo(((ee = e.connectSettings) == null ? void 0 : ee.url) || e.url || "", {
3697
- method: ((re = e.connectSettings) == null ? void 0 : re.method) || "POST",
3696
+ return _context7.abrupt("return", (lo(((D = e.connectSettings) == null ? void 0 : D.url) || e.url || "", {
3697
+ method: ((z = e.connectSettings) == null ? void 0 : z.method) || "POST",
3698
3698
  headers: l,
3699
3699
  credentials: (Te = e.connectSettings) == null ? void 0 : Te.credentials,
3700
3700
  body: n ? JSON.stringify(a) : a,
@@ -3724,7 +3724,7 @@ var C = /*#__PURE__*/function () {
3724
3724
  },
3725
3725
  onmessage: function onmessage(R) {
3726
3726
  return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee6() {
3727
- var $, K, N, Oe, pt;
3727
+ var X, Z, N, Oe, pt;
3728
3728
  return _regeneratorRuntime().wrap(function _callee6$(_context6) {
3729
3729
  while (1) switch (_context6.prev = _context6.next) {
3730
3730
  case 0:
@@ -3738,7 +3738,7 @@ var C = /*#__PURE__*/function () {
3738
3738
  Oe = {};
3739
3739
  }
3740
3740
  _context6.next = 4;
3741
- return (K = ($ = e.deepChat).responseInterceptor) == null ? void 0 : K.call($, Oe);
3741
+ return (Z = (X = e.deepChat).responseInterceptor) == null ? void 0 : Z.call(X, Oe);
3742
3742
  case 4:
3743
3743
  _context6.t0 = _context6.sent;
3744
3744
  if (_context6.t0) {
@@ -3772,11 +3772,11 @@ var C = /*#__PURE__*/function () {
3772
3772
  },
3773
3773
  signal: u.signal
3774
3774
  })["catch"](function (R) {
3775
- var $;
3776
- i.isLastMessageError() || ($ = e.extractResultData) == null || $.call(e, R).then(function () {
3775
+ var X;
3776
+ i.isLastMessageError() || (X = e.extractResultData) == null || X.call(e, R).then(function () {
3777
3777
  v.displayError(i, R);
3778
- })["catch"](function (K) {
3779
- v.displayError(i, K);
3778
+ })["catch"](function (Z) {
3779
+ v.displayError(i, Z);
3780
3780
  });
3781
3781
  }), f));
3782
3782
  case 21:
@@ -3804,7 +3804,7 @@ var C = /*#__PURE__*/function () {
3804
3804
  }
3805
3805
  if (i.html) {
3806
3806
  t.onOpen();
3807
- var _r2 = X.splitHTML(i.html);
3807
+ var _r2 = Q.splitHTML(i.html);
3808
3808
  C.populateMessages(_r2, new pe(e), n, "html");
3809
3809
  }
3810
3810
  }
@@ -3926,11 +3926,11 @@ var He = /*#__PURE__*/function () {
3926
3926
  }();
3927
3927
  He.URL = "deep-chat-demo";
3928
3928
  var me = He;
3929
- var V = /*#__PURE__*/function () {
3930
- function V() {
3931
- _classCallCheck(this, V);
3929
+ var W = /*#__PURE__*/function () {
3930
+ function W() {
3931
+ _classCallCheck(this, W);
3932
3932
  }
3933
- return _createClass(V, null, [{
3933
+ return _createClass(W, null, [{
3934
3934
  key: "setup",
3935
3935
  value: function setup(e) {
3936
3936
  e.connectSettings.url !== me.URL && (e.permittedErrorPrefixes = ["Connection error", "Error in server message"], e.websocket = "pending");
@@ -3947,12 +3947,12 @@ var V = /*#__PURE__*/function () {
3947
3947
  r = new WebSocket(e.connectSettings.url || "", n);
3948
3948
  e.websocket = r, e.websocket.onopen = function () {
3949
3949
  var o, a;
3950
- t.removeError(), e.websocket && _typeof(e.websocket) == "object" && V.assignListeners(e, r, t), (a = (o = e.deepChat)._validationHandler) == null || a.call(o);
3950
+ t.removeError(), e.websocket && _typeof(e.websocket) == "object" && W.assignListeners(e, r, t), (a = (o = e.deepChat)._validationHandler) == null || a.call(o);
3951
3951
  }, e.websocket.onerror = function (o) {
3952
- console.error(o), V.retryConnection(e, t);
3952
+ console.error(o), W.retryConnection(e, t);
3953
3953
  };
3954
3954
  } catch (n) {
3955
- console.error(n), V.retryConnection(e, t);
3955
+ console.error(n), W.retryConnection(e, t);
3956
3956
  }
3957
3957
  }
3958
3958
  }
@@ -3961,7 +3961,7 @@ var V = /*#__PURE__*/function () {
3961
3961
  value: function retryConnection(e, t) {
3962
3962
  var i, n;
3963
3963
  (n = (i = e.deepChat)._validationHandler) == null || n.call(i), document.body.contains(e.deepChat) && (e.websocket = "pending", t.isLastMessageError() || t.addNewErrorMessage("service", "Connection error"), setTimeout(function () {
3964
- V.createConnection(e, t);
3964
+ W.createConnection(e, t);
3965
3965
  }, 5e3));
3966
3966
  }
3967
3967
  }, {
@@ -4003,7 +4003,7 @@ var V = /*#__PURE__*/function () {
4003
4003
  throw Error(A.INVALID_RESPONSE(l, "server", !!e.deepChat.responseInterceptor, c));
4004
4004
  case 14:
4005
4005
  if (C.isSimulation(e.stream)) {
4006
- h = V.stream.bind(_this6, e, i, n), u = n[l.role || b.AI_ROLE];
4006
+ h = W.stream.bind(_this6, e, i, n), u = n[l.role || b.AI_ROLE];
4007
4007
  C.upsertWFiles(i, h, u, d);
4008
4008
  } else i.addNewMessage(d);
4009
4009
  _context9.next = 20;
@@ -4022,7 +4022,7 @@ var V = /*#__PURE__*/function () {
4022
4022
  return _ref2.apply(this, arguments);
4023
4023
  };
4024
4024
  }(), t.onclose = function () {
4025
- console.error("Connection closed"), i.isLastMessageError() || i.addNewErrorMessage("service", "Connection error"), e.stream && e.streamHandlers.abortStream.abort(), V.createConnection(e, i);
4025
+ console.error("Connection closed"), i.isLastMessageError() || i.addNewErrorMessage("service", "Connection error"), e.stream && e.streamHandlers.abortStream.abort(), W.createConnection(e, i);
4026
4026
  };
4027
4027
  }
4028
4028
  }, {
@@ -4066,7 +4066,7 @@ var V = /*#__PURE__*/function () {
4066
4066
  }
4067
4067
  return _context10.abrupt("return", i.addNewErrorMessage("service", l));
4068
4068
  case 12:
4069
- if (V.isWebSocket(r)) {
4069
+ if (W.isWebSocket(r)) {
4070
4070
  _context10.next = 14;
4071
4071
  break;
4072
4072
  }
@@ -4094,7 +4094,7 @@ var V = /*#__PURE__*/function () {
4094
4094
  }, {
4095
4095
  key: "canSendMessage",
4096
4096
  value: function canSendMessage(e) {
4097
- return e ? e === "pending" ? !1 : V.isWebSocket(e) ? e.readyState !== void 0 && e.readyState === e.OPEN : e.isOpen : !0;
4097
+ return e ? e === "pending" ? !1 : W.isWebSocket(e) ? e.readyState !== void 0 && e.readyState === e.OPEN : e.isOpen : !0;
4098
4098
  }
4099
4099
  // if false then it is the internal websocket handler
4100
4100
  }, {
@@ -4203,7 +4203,7 @@ var Ee = /*#__PURE__*/function () {
4203
4203
  },
4204
4204
  c = /*#__PURE__*/function () {
4205
4205
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee13(f) {
4206
- var p, x, m;
4206
+ var p, y, m;
4207
4207
  return _regeneratorRuntime().wrap(function _callee13$(_context13) {
4208
4208
  while (1) switch (_context13.prev = _context13.next) {
4209
4209
  case 0:
@@ -4214,7 +4214,7 @@ var Ee = /*#__PURE__*/function () {
4214
4214
  return _context13.abrupt("return");
4215
4215
  case 2:
4216
4216
  _context13.next = 4;
4217
- return (x = (p = e.deepChat).responseInterceptor) == null ? void 0 : x.call(p, f);
4217
+ return (y = (p = e.deepChat).responseInterceptor) == null ? void 0 : y.call(p, f);
4218
4218
  case 4:
4219
4219
  _context13.t0 = _context13.sent;
4220
4220
  if (_context13.t0) {
@@ -4290,7 +4290,7 @@ var Ee = /*#__PURE__*/function () {
4290
4290
  case 7:
4291
4291
  h = _context14.t0;
4292
4292
  if (!v.validateResponseFormat(h)) console.error(A.INVALID_RESPONSE(d, "server", !!e.deepChat.responseInterceptor, h)), t.addNewErrorMessage("service", "Error in server message");else if (typeof h.error == "string") console.error(h.error), t.isLastMessageError() || t.addNewErrorMessage("service", h.error);else if (C.isSimulation(e.stream)) {
4293
- m = V.stream.bind(_this7, e, t, i.roleToStream), p = i.roleToStream[d.role || b.AI_ROLE];
4293
+ m = W.stream.bind(_this7, e, t, i.roleToStream), p = i.roleToStream[d.role || b.AI_ROLE];
4294
4294
  C.upsertWFiles(t, m, p, d);
4295
4295
  } else t.addNewMessage(h);
4296
4296
  case 9:
@@ -4391,7 +4391,7 @@ var T = /*#__PURE__*/function () {
4391
4391
  return v.processResponseByType(p);
4392
4392
  }).then( /*#__PURE__*/function () {
4393
4393
  var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee15(p) {
4394
- var ee, re, x, S;
4394
+ var D, z, y, x;
4395
4395
  return _regeneratorRuntime().wrap(function _callee15$(_context15) {
4396
4396
  while (1) switch (_context15.prev = _context15.next) {
4397
4397
  case 0:
@@ -4402,7 +4402,7 @@ var T = /*#__PURE__*/function () {
4402
4402
  return _context15.abrupt("return");
4403
4403
  case 2:
4404
4404
  _context15.next = 4;
4405
- return (re = (ee = e.deepChat).responseInterceptor) == null ? void 0 : re.call(ee, p);
4405
+ return (z = (D = e.deepChat).responseInterceptor) == null ? void 0 : z.call(D, p);
4406
4406
  case 4:
4407
4407
  _context15.t0 = _context15.sent;
4408
4408
  if (_context15.t0) {
@@ -4411,24 +4411,24 @@ var T = /*#__PURE__*/function () {
4411
4411
  }
4412
4412
  _context15.t0 = p;
4413
4413
  case 7:
4414
- x = _context15.t0;
4414
+ y = _context15.t0;
4415
4415
  _context15.next = 10;
4416
- return e.extractResultData(x, h, o);
4416
+ return e.extractResultData(y, h, o);
4417
4417
  case 10:
4418
- S = _context15.sent;
4418
+ x = _context15.sent;
4419
4419
  if (d) {
4420
4420
  _context15.next = 13;
4421
4421
  break;
4422
4422
  }
4423
4423
  throw p;
4424
4424
  case 13:
4425
- if (!(!S || _typeof(S) != "object")) {
4425
+ if (!(!x || _typeof(x) != "object")) {
4426
4426
  _context15.next = 15;
4427
4427
  break;
4428
4428
  }
4429
- throw Error(A.INVALID_RESPONSE(p, "response", !!e.deepChat.responseInterceptor, x));
4429
+ throw Error(A.INVALID_RESPONSE(p, "response", !!e.deepChat.responseInterceptor, y));
4430
4430
  case 15:
4431
- S.makingAnotherRequest || (C.isSimulatable(e.stream, S) ? C.simulate(i, e.streamHandlers, S) : (i.addNewMessage(S), c()));
4431
+ x.makingAnotherRequest || (C.isSimulatable(e.stream, x) ? C.simulate(i, e.streamHandlers, x) : (i.addNewMessage(x), c()));
4432
4432
  case 16:
4433
4433
  case "end":
4434
4434
  return _context15.stop();
@@ -4725,7 +4725,7 @@ var We = /*#__PURE__*/function () {
4725
4725
  var _a$url;
4726
4726
  _classCallCheck(this, We);
4727
4727
  var n, r, o, a, l;
4728
- this.rawBody = {}, this.validateKeyProperty = !1, this.canSendMessage = We.canSendMessage, this.connectSettings = {}, this.fileTypes = {}, this.completionsHandlers = {}, this.streamHandlers = {}, this.deepChat = e, this.demo = i, Object.assign(this.rawBody, (n = e.connect) == null ? void 0 : n.additionalBodyProps), this.totalMessagesMaxCharLength = (r = e == null ? void 0 : e.requestBodyLimits) == null ? void 0 : r.totalMessagesMaxCharLength, this.maxMessages = (o = e == null ? void 0 : e.requestBodyLimits) == null ? void 0 : o.maxMessages, I.set(e, this, t), e.connect && (this.connectSettings = e.connect), this.demo && ((_a$url = (a = this.connectSettings).url) !== null && _a$url !== void 0 ? _a$url : a.url = me.URL), this.connectSettings.websocket && V.setup(this), this.stream = ((l = this.deepChat.connect) == null ? void 0 : l.stream) || ue.checkForStream(this.deepChat);
4728
+ this.rawBody = {}, this.validateKeyProperty = !1, this.canSendMessage = We.canSendMessage, this.connectSettings = {}, this.fileTypes = {}, this.completionsHandlers = {}, this.streamHandlers = {}, this.deepChat = e, this.demo = i, Object.assign(this.rawBody, (n = e.connect) == null ? void 0 : n.additionalBodyProps), this.totalMessagesMaxCharLength = (r = e == null ? void 0 : e.requestBodyLimits) == null ? void 0 : r.totalMessagesMaxCharLength, this.maxMessages = (o = e == null ? void 0 : e.requestBodyLimits) == null ? void 0 : o.maxMessages, I.set(e, this, t), e.connect && (this.connectSettings = e.connect), this.demo && ((_a$url = (a = this.connectSettings).url) !== null && _a$url !== void 0 ? _a$url : a.url = me.URL), this.connectSettings.websocket && W.setup(this), this.stream = ((l = this.deepChat.connect) == null ? void 0 : l.stream) || ue.checkForStream(this.deepChat);
4729
4729
  }
4730
4730
  return _createClass(We, [{
4731
4731
  key: "verifyKey",
@@ -4855,7 +4855,7 @@ var We = /*#__PURE__*/function () {
4855
4855
  n = _objectSpread({
4856
4856
  messages: i
4857
4857
  }, this.rawBody);
4858
- V.sendWebsocket(this, n, t, !1);
4858
+ W.sendWebsocket(this, n, t, !1);
4859
4859
  } else this.callServiceAPI(t, i, e.files);
4860
4860
  case 4:
4861
4861
  case "end":
@@ -4936,17 +4936,17 @@ var We = /*#__PURE__*/function () {
4936
4936
  }
4937
4937
  }]);
4938
4938
  }();
4939
- var H = /*#__PURE__*/function (_We) {
4939
+ var q = /*#__PURE__*/function (_We) {
4940
4940
  // prettier-ignore
4941
- function H(e, t, i, n, r) {
4941
+ function q(e, t, i, n, r) {
4942
4942
  var _this8;
4943
- _classCallCheck(this, H);
4943
+ _classCallCheck(this, q);
4944
4944
  var o;
4945
- _this8 = _callSuper(this, H, [e, r]), _this8.insertKeyPlaceholderText = "API Key", _this8.keyHelpUrl = "", Object.assign(_this8.rawBody, (o = e.connect) == null ? void 0 : o.additionalBodyProps), _this8.keyVerificationDetails = t, _this8.buildHeadersFunc = i, n && _this8.setApiKeyProperties(n), _this8.connectSettings = _this8.buildConnectSettings(_this8.key || "", e.connect);
4945
+ _this8 = _callSuper(this, q, [e, r]), _this8.insertKeyPlaceholderText = "API Key", _this8.keyHelpUrl = "", Object.assign(_this8.rawBody, (o = e.connect) == null ? void 0 : o.additionalBodyProps), _this8.keyVerificationDetails = t, _this8.buildHeadersFunc = i, n && _this8.setApiKeyProperties(n), _this8.connectSettings = _this8.buildConnectSettings(_this8.key || "", e.connect);
4946
4946
  return _this8;
4947
4947
  }
4948
- _inherits(H, _We);
4949
- return _createClass(H, [{
4948
+ _inherits(q, _We);
4949
+ return _createClass(q, [{
4950
4950
  key: "setApiKeyProperties",
4951
4951
  value: function setApiKeyProperties(e) {
4952
4952
  this.key = e.key, e.validateKeyProperty && (this.validateKeyProperty = e.validateKeyProperty);
@@ -5050,11 +5050,11 @@ ve._attributes_ = {}, ve._attributeToProperty_ = {};
5050
5050
  var Xi = ve;
5051
5051
  var ho = "<?xml version=\"1.0\" standalone=\"no\"?>\n<svg version=\"1.1\"\n\txmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\"\n\txmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"0.9em\" height=\"0.9em\"\n\tviewBox=\"0 0 1200 1200\" enable-background=\"new 0 0 1200 1200\">\n\t\t<path d=\"\n\t\t\tM669.727,273.516c-22.891-2.476-46.15-3.895-69.727-4.248c-103.025,0.457-209.823,25.517-310.913,73.536\n\t\t\tc-75.058,37.122-148.173,89.529-211.67,154.174C46.232,529.978,6.431,577.76,0,628.74c0.76,44.162,48.153,98.67,77.417,131.764\n\t\t\tc59.543,62.106,130.754,113.013,211.67,154.174c2.75,1.335,5.51,2.654,8.276,3.955l-75.072,131.102l102.005,60.286l551.416-960.033\n\t\t\tl-98.186-60.008L669.727,273.516z M902.563,338.995l-74.927,129.857c34.47,44.782,54.932,100.006,54.932,159.888\n\t\t\tc0,149.257-126.522,270.264-282.642,270.264c-6.749,0-13.29-0.728-19.922-1.172l-49.585,85.84c22.868,2.449,45.99,4.233,69.58,4.541\n\t\t\tc103.123-0.463,209.861-25.812,310.84-73.535c75.058-37.122,148.246-89.529,211.743-154.174\n\t\t\tc31.186-32.999,70.985-80.782,77.417-131.764c-0.76-44.161-48.153-98.669-77.417-131.763\n\t\t\tc-59.543-62.106-130.827-113.013-211.743-154.175C908.108,341.478,905.312,340.287,902.563,338.995L902.563,338.995z\n\t\t\tM599.927,358.478c6.846,0,13.638,0.274,20.361,0.732l-58.081,100.561c-81.514,16.526-142.676,85.88-142.676,168.897\n\t\t\tc0,20.854,3.841,40.819,10.913,59.325c0.008,0.021-0.008,0.053,0,0.074l-58.228,100.854\n\t\t\tc-34.551-44.823-54.932-100.229-54.932-160.182C317.285,479.484,443.808,358.477,599.927,358.478L599.927,358.478z M768.896,570.513\n\t\t\tL638.013,797.271c81.076-16.837,141.797-85.875,141.797-168.603C779.81,608.194,775.724,588.729,768.896,570.513L768.896,570.513z\"\n\t\t\t/>\n</svg>\n",
5052
5052
  uo = "<?xml version=\"1.0\" standalone=\"no\"?>\n<svg version=\"1.1\"\n\txmlns:sodipodi=\"http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd\" xmlns:inkscape=\"http://www.inkscape.org/namespaces/inkscape\"\n\txmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" width=\"0.9em\" height=\"0.9em\"\n\tviewBox=\"0 0 1200 1200\" enable-background=\"new 0 0 1200 1200\">\n\t\t<path id=\"path6686\" inkscape:connector-curvature=\"0\" d=\"M779.843,599.925c0,95.331-80.664,172.612-180.169,172.612\n\t\t\tc-99.504,0-180.168-77.281-180.168-172.612c0-95.332,80.664-172.612,180.168-172.612\n\t\t\tC699.179,427.312,779.843,504.594,779.843,599.925z M600,240.521c-103.025,0.457-209.814,25.538-310.904,73.557\n\t\t\tc-75.058,37.122-148.206,89.496-211.702,154.141C46.208,501.218,6.431,549,0,599.981c0.76,44.161,48.13,98.669,77.394,131.763\n\t\t\tc59.543,62.106,130.786,113.018,211.702,154.179c94.271,45.751,198.616,72.092,310.904,73.557\n\t\t\tc103.123-0.464,209.888-25.834,310.866-73.557c75.058-37.122,148.243-89.534,211.74-154.179\n\t\t\tc31.185-32.999,70.962-80.782,77.394-131.763c-0.76-44.161-48.13-98.671-77.394-131.764\n\t\t\tc-59.543-62.106-130.824-112.979-211.74-154.141C816.644,268.36,712.042,242.2,600,240.521z M599.924,329.769\n\t\t\tc156.119,0,282.675,120.994,282.675,270.251c0,149.256-126.556,270.25-282.675,270.25S317.249,749.275,317.249,600.02\n\t\t\tC317.249,450.763,443.805,329.769,599.924,329.769L599.924,329.769z\"/>\n</svg>\n";
5053
- var Y = /*#__PURE__*/function () {
5054
- function Y() {
5055
- _classCallCheck(this, Y);
5053
+ var ee = /*#__PURE__*/function () {
5054
+ function ee() {
5055
+ _classCallCheck(this, ee);
5056
5056
  }
5057
- return _createClass(Y, null, [{
5057
+ return _createClass(ee, null, [{
5058
5058
  key: "createSVGElement",
5059
5059
  value: function createSVGElement(e) {
5060
5060
  return new DOMParser().parseFromString(e, "image/svg+xml").documentElement;
@@ -5075,7 +5075,7 @@ var Ie = /*#__PURE__*/function () {
5075
5075
  }, {
5076
5076
  key: "createIconElement",
5077
5077
  value: function createIconElement(e, t) {
5078
- var i = Y.createSVGElement(e);
5078
+ var i = ee.createSVGElement(e);
5079
5079
  return i.id = t, i.classList.add("visibility-icon"), i;
5080
5080
  }
5081
5081
  // prettier-ignore
@@ -5093,11 +5093,11 @@ var Ie = /*#__PURE__*/function () {
5093
5093
  }();
5094
5094
  Ie.VISIBLE_ICON_ID = "visible-icon";
5095
5095
  var Zi = Ie;
5096
- var D = /*#__PURE__*/function () {
5097
- function D() {
5098
- _classCallCheck(this, D);
5096
+ var F = /*#__PURE__*/function () {
5097
+ function F() {
5098
+ _classCallCheck(this, F);
5099
5099
  }
5100
- return _createClass(D, null, [{
5100
+ return _createClass(F, null, [{
5101
5101
  key: "createCautionText",
5102
5102
  value: function createCautionText() {
5103
5103
  var e = document.createElement("a");
@@ -5123,13 +5123,13 @@ var D = /*#__PURE__*/function () {
5123
5123
  i.id = "insert-key-help-text-container";
5124
5124
  var n = document.createElement("div");
5125
5125
  n.id = "insert-key-help-text-contents";
5126
- var r = D.createFailText();
5126
+ var r = F.createFailText();
5127
5127
  if (n.appendChild(r), e) {
5128
- var o = D.createHelpLink(e);
5128
+ var o = F.createHelpLink(e);
5129
5129
  n.appendChild(o);
5130
5130
  }
5131
5131
  if (t === !0) {
5132
- var _o2 = D.createCautionText();
5132
+ var _o2 = F.createCautionText();
5133
5133
  n.appendChild(_o2);
5134
5134
  }
5135
5135
  return i.appendChild(n), {
@@ -5160,10 +5160,10 @@ var D = /*#__PURE__*/function () {
5160
5160
  value: function addVerificationEvents(e, t, i, n, r) {
5161
5161
  var o = {
5162
5162
  onSuccess: n,
5163
- onFail: D.onFail.bind(this, e, t, i),
5164
- onLoad: D.onLoad.bind(this, e, t)
5163
+ onFail: F.onFail.bind(this, e, t, i),
5164
+ onLoad: F.onLoad.bind(this, e, t)
5165
5165
  },
5166
- a = D.verifyKey.bind(this, e, o, r);
5166
+ a = F.verifyKey.bind(this, e, o, r);
5167
5167
  t.onclick = a, e.onkeydown = function (l) {
5168
5168
  !e.classList.contains("loading") && l.key === L.ENTER && a();
5169
5169
  };
@@ -5185,7 +5185,7 @@ var D = /*#__PURE__*/function () {
5185
5185
  var t = document.createElement("div");
5186
5186
  t.id = "insert-key-input-container";
5187
5187
  var i = document.createElement("input");
5188
- return i.id = "insert-key-input", i.placeholder = e || "API Key", i.type = "password", i.classList.add("insert-key-input-valid"), i.onfocus = D.onInputFocus, t.appendChild(i), t;
5188
+ return i.id = "insert-key-input", i.placeholder = e || "API Key", i.type = "password", i.classList.add("insert-key-input-valid"), i.onfocus = F.onInputFocus, t.appendChild(i), t;
5189
5189
  }
5190
5190
  // prettier-ignore
5191
5191
  }, {
@@ -5194,51 +5194,51 @@ var D = /*#__PURE__*/function () {
5194
5194
  var d;
5195
5195
  var i = document.createElement("div");
5196
5196
  i.id = "insert-key-contents";
5197
- var n = D.createInput(t.insertKeyPlaceholderText),
5197
+ var n = F.createInput(t.insertKeyPlaceholderText),
5198
5198
  r = n.children[0],
5199
5199
  o = Zi.create(r);
5200
5200
  n.appendChild(o), i.appendChild(n);
5201
- var a = D.createStartButton(),
5202
- _D$createHelpTextCont = D.createHelpTextContainer(t.keyHelpUrl, (d = t.deepChat._insertKeyViewStyles) == null ? void 0 : d.displayCautionText),
5203
- l = _D$createHelpTextCont.helpTextContainerElement,
5204
- c = _D$createHelpTextCont.failTextElement;
5205
- return i.appendChild(a), i.appendChild(l), D.addVerificationEvents(r, a, c, e, t), i;
5201
+ var a = F.createStartButton(),
5202
+ _F$createHelpTextCont = F.createHelpTextContainer(t.keyHelpUrl, (d = t.deepChat._insertKeyViewStyles) == null ? void 0 : d.displayCautionText),
5203
+ l = _F$createHelpTextCont.helpTextContainerElement,
5204
+ c = _F$createHelpTextCont.failTextElement;
5205
+ return i.appendChild(a), i.appendChild(l), F.addVerificationEvents(r, a, c, e, t), i;
5206
5206
  }
5207
5207
  }, {
5208
5208
  key: "createElements",
5209
5209
  value: function createElements(e, t) {
5210
5210
  var i = document.createElement("div");
5211
5211
  i.id = "insert-key-view";
5212
- var n = D.createContents(e, t);
5212
+ var n = F.createContents(e, t);
5213
5213
  return i.appendChild(n), i;
5214
5214
  }
5215
5215
  }, {
5216
5216
  key: "render",
5217
5217
  value: function render(e, t, i) {
5218
- var n = D.createElements(t, i);
5218
+ var n = F.createElements(t, i);
5219
5219
  e.replaceChildren(n);
5220
5220
  }
5221
5221
  }]);
5222
5222
  }();
5223
- var J = /*#__PURE__*/function () {
5224
- function J() {
5225
- _classCallCheck(this, J);
5223
+ var Y = /*#__PURE__*/function () {
5224
+ function Y() {
5225
+ _classCallCheck(this, Y);
5226
5226
  }
5227
- return _createClass(J, null, [{
5227
+ return _createClass(Y, null, [{
5228
5228
  key: "enableButtons",
5229
5229
  value: function enableButtons(e, t) {
5230
5230
  var i = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0;
5231
5231
  window.webLLM ? (e && (e.disabled = !1), t && (t.disabled = !1)) : i < Rt.MODULE_SEARCH_LIMIT_S * 4 && setTimeout(function () {
5232
- return J.enableButtons(e, t, i + 1);
5232
+ return Y.enableButtons(e, t, i + 1);
5233
5233
  }, 250);
5234
5234
  }
5235
5235
  // prettier-ignore
5236
5236
  }, {
5237
5237
  key: "setUpInitial",
5238
5238
  value: function setUpInitial(e, t, i, n) {
5239
- var r = (t == null ? void 0 : t.downloadClass) || J.DOWNLOAD_BUTTON_CLASS,
5240
- o = (t == null ? void 0 : t.uploadClass) || J.UPLOAD_BUTTON_CLASS,
5241
- a = (t == null ? void 0 : t.fileInputClass) || J.FILE_INPUT_CLASS;
5239
+ var r = (t == null ? void 0 : t.downloadClass) || Y.DOWNLOAD_BUTTON_CLASS,
5240
+ o = (t == null ? void 0 : t.uploadClass) || Y.UPLOAD_BUTTON_CLASS,
5241
+ a = (t == null ? void 0 : t.fileInputClass) || Y.FILE_INPUT_CLASS;
5242
5242
  return setTimeout(function () {
5243
5243
  var l = i == null ? void 0 : i.getElementsByClassName(r)[0],
5244
5244
  c = i == null ? void 0 : i.getElementsByClassName(a)[0],
@@ -5249,7 +5249,7 @@ var J = /*#__PURE__*/function () {
5249
5249
  c.files && c.files.length > 0 && e(c.files);
5250
5250
  }), d && (d.onclick = function () {
5251
5251
  return c.click();
5252
- }), (l || d) && J.enableButtons(l, d);
5252
+ }), (l || d) && Y.enableButtons(l, d);
5253
5253
  }), (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(r, " deep-chat-button deep-chat-web-model-button\">Download</button>\n ").concat(n ? "" : "<input type=\"file\" class=\"".concat(a, "\" hidden multiple />\n <button disabled class=\"").concat(o, " deep-chat-button deep-chat-web-model-button\">Upload</button>"), "\n </div>");
5254
5254
  }
5255
5255
  }, {
@@ -5274,18 +5274,18 @@ var J = /*#__PURE__*/function () {
5274
5274
  }, {
5275
5275
  key: "setUpAfterLoad",
5276
5276
  value: function setUpAfterLoad(e, t, i, n) {
5277
- var r = (t == null ? void 0 : t.exportFilesClass) || J.EXPORT_BUTTON_CLASS;
5277
+ var r = (t == null ? void 0 : t.exportFilesClass) || Y.EXPORT_BUTTON_CLASS;
5278
5278
  return setTimeout(function () {
5279
5279
  var o = i == null ? void 0 : i.getElementsByClassName(r)[0];
5280
5280
  o && (o.onclick = function () {
5281
- return J.exportFile(e);
5281
+ return Y.exportFile(e);
5282
5282
  });
5283
5283
  }), (t == null ? void 0 : t.afterLoadHtml) || "<div>\n Model loaded successfully and has been cached for future requests.\n ".concat(n ? "" : "<br/> <button style=\"margin-top: 5px\" class=\"".concat(r, " deep-chat-button\">Export</button>"), "\n </div>");
5284
5284
  }
5285
5285
  }]);
5286
5286
  }();
5287
- J.DOWNLOAD_BUTTON_CLASS = "deep-chat-download-button", J.UPLOAD_BUTTON_CLASS = "deep-chat-upload-button", J.FILE_INPUT_CLASS = "deep-chat-file-input", J.EXPORT_BUTTON_CLASS = "deep-chat-export-button";
5288
- var ti = J;
5287
+ Y.DOWNLOAD_BUTTON_CLASS = "deep-chat-download-button", Y.UPLOAD_BUTTON_CLASS = "deep-chat-upload-button", Y.FILE_INPUT_CLASS = "deep-chat-file-input", Y.EXPORT_BUTTON_CLASS = "deep-chat-export-button";
5288
+ var ti = Y;
5289
5289
  var On = {
5290
5290
  model_list: [
5291
5291
  // Llama-2
@@ -5453,7 +5453,7 @@ var On = {
5453
5453
  var t;
5454
5454
  ((t = this._webModel.introMessage) == null ? void 0 : t.autoScroll) !== !1 && setTimeout(function () {
5455
5455
  var i, n;
5456
- (i = _this13._messages) != null && i.elementRef && U.scrollToTop((n = _this13._messages) == null ? void 0 : n.elementRef);
5456
+ (i = _this13._messages) != null && i.elementRef && H.scrollToTop((n = _this13._messages) == null ? void 0 : n.elementRef);
5457
5457
  }, e);
5458
5458
  }
5459
5459
  // prettier-ignore
@@ -5585,7 +5585,7 @@ var On = {
5585
5585
  sendUpdate: !1
5586
5586
  }), i && (setTimeout(function () {
5587
5587
  var p;
5588
- return U.scrollToBottom((p = _this14._messages) == null ? void 0 : p.elementRef);
5588
+ return H.scrollToBottom((p = _this14._messages) == null ? void 0 : p.elementRef);
5589
5589
  }), i = !1);
5590
5590
  };
5591
5591
  w.chat.setInitProgressCallback(n);
@@ -5978,7 +5978,7 @@ var ii = /*#__PURE__*/function () {
5978
5978
  }
5979
5979
  }]);
5980
5980
  }();
5981
- var St = /*#__PURE__*/function (_H) {
5981
+ var St = /*#__PURE__*/function (_q) {
5982
5982
  // prettier-ignore
5983
5983
  function St(e, t, i, n, r, o) {
5984
5984
  var _this16;
@@ -5987,7 +5987,7 @@ var St = /*#__PURE__*/function (_H) {
5987
5987
  return _this16;
5988
5988
  }
5989
5989
  // prettier-ignore
5990
- _inherits(St, _H);
5990
+ _inherits(St, _q);
5991
5991
  return _createClass(St, [{
5992
5992
  key: "preprocessBody",
5993
5993
  value: function preprocessBody(e, t, i) {
@@ -6026,7 +6026,7 @@ var St = /*#__PURE__*/function (_H) {
6026
6026
  return callServiceAPI;
6027
6027
  }()
6028
6028
  }]);
6029
- }(H);
6029
+ }(q);
6030
6030
  St.URL_PREFIX = "https://api-inference.huggingface.co/models/";
6031
6031
  var we = St;
6032
6032
  var Dt = /*#__PURE__*/function (_we) {
@@ -6211,7 +6211,7 @@ var ge = /*#__PURE__*/function () {
6211
6211
  }
6212
6212
  }]);
6213
6213
  }();
6214
- var _i = /*#__PURE__*/function (_H2) {
6214
+ var _i = /*#__PURE__*/function (_q2) {
6215
6215
  // prettier-ignore
6216
6216
  function _i(e, t, i, n, r) {
6217
6217
  var _this18;
@@ -6219,9 +6219,9 @@ var _i = /*#__PURE__*/function (_H2) {
6219
6219
  _this18 = _callSuper(this, _i, [e, t, i, n, r]), _this18.insertKeyPlaceholderText = "Stability AI API Key", _this18.keyHelpUrl = "https://platform.stability.ai/docs/getting-started/authentication", _this18.permittedErrorPrefixes = ["Incorrect", "invalid_"];
6220
6220
  return _this18;
6221
6221
  }
6222
- _inherits(_i, _H2);
6222
+ _inherits(_i, _q2);
6223
6223
  return _createClass(_i);
6224
- }(H);
6224
+ }(q);
6225
6225
  var ni = /*#__PURE__*/function (_i10) {
6226
6226
  function ni(e) {
6227
6227
  var _this19;
@@ -7012,16 +7012,16 @@ var ai = /*#__PURE__*/function () {
7012
7012
  }
7013
7013
  }]);
7014
7014
  }();
7015
- var un = /*#__PURE__*/function (_H3) {
7015
+ var un = /*#__PURE__*/function (_q3) {
7016
7016
  function un(e, t, i, n, r) {
7017
7017
  var _this26;
7018
7018
  _classCallCheck(this, un);
7019
7019
  _this26 = _callSuper(this, un, [e, ai.buildKeyVerificationDetails(), ai.buildHeaders, r]), _this26.insertKeyPlaceholderText = "Cohere API Key", _this26.keyHelpUrl = "https://dashboard.cohere.ai/api-keys", _this26.permittedErrorPrefixes = ["invalid"], _this26.url = t, _this26.textInputPlaceholderText = i, n && _typeof(n) == "object" && Object.assign(_this26.rawBody, n);
7020
7020
  return _this26;
7021
7021
  }
7022
- _inherits(un, _H3);
7022
+ _inherits(un, _q3);
7023
7023
  return _createClass(un);
7024
- }(H);
7024
+ }(q);
7025
7025
  var _o = /*#__PURE__*/function (_un) {
7026
7026
  function _o(e) {
7027
7027
  _classCallCheck(this, _o);
@@ -7238,7 +7238,7 @@ var P = /*#__PURE__*/function () {
7238
7238
  }()
7239
7239
  }]);
7240
7240
  }();
7241
- var nt = /*#__PURE__*/function (_H4) {
7241
+ var nt = /*#__PURE__*/function (_q4) {
7242
7242
  function nt(e) {
7243
7243
  var _o$model, _a$voice;
7244
7244
  var _this27;
@@ -7251,7 +7251,7 @@ var nt = /*#__PURE__*/function (_H4) {
7251
7251
  _typeof(n) == "object" && Object.assign(_this27.rawBody, n), (_o$model = (o = _this27.rawBody).model) !== null && _o$model !== void 0 ? _o$model : o.model = nt.DEFAULT_MODEL, (_a$voice = (a = _this27.rawBody).voice) !== null && _a$voice !== void 0 ? _a$voice : a.voice = nt.DEFAULT_VOIDE, _this27.textInputPlaceholderText = "Insert text to generate audio", _this27.rawBody.response_format = "mp3";
7252
7252
  return _this27;
7253
7253
  }
7254
- _inherits(nt, _H4);
7254
+ _inherits(nt, _q4);
7255
7255
  return _createClass(nt, [{
7256
7256
  key: "preprocessBody",
7257
7257
  value: function preprocessBody(e, t) {
@@ -7332,10 +7332,10 @@ var nt = /*#__PURE__*/function (_H4) {
7332
7332
  return extractResultData;
7333
7333
  }()
7334
7334
  }]);
7335
- }(H);
7335
+ }(q);
7336
7336
  nt.DEFAULT_MODEL = "tts-1", nt.DEFAULT_VOIDE = "alloy";
7337
7337
  var Yi = nt;
7338
- var le = /*#__PURE__*/function (_H5) {
7338
+ var le = /*#__PURE__*/function (_q5) {
7339
7339
  function le(e) {
7340
7340
  var _o$model2;
7341
7341
  var _this28;
@@ -7350,7 +7350,7 @@ var le = /*#__PURE__*/function (_H5) {
7350
7350
  _typeof(n) == "object" && (_this28.processConfig(n), le.cleanConfig(n), Object.assign(_this28.rawBody, n)), (_o$model2 = (o = _this28.rawBody).model) !== null && _o$model2 !== void 0 ? _o$model2 : o.model = le.DEFAULT_MODEL, _this28.rawBody.response_format = "json", _this28.canSendMessage = le.canSendFileMessage;
7351
7351
  return _this28;
7352
7352
  }
7353
- _inherits(le, _H5);
7353
+ _inherits(le, _q5);
7354
7354
  return _createClass(le, [{
7355
7355
  key: "processConfig",
7356
7356
  value: function processConfig(e) {
@@ -7445,14 +7445,14 @@ var le = /*#__PURE__*/function (_H5) {
7445
7445
  }), i;
7446
7446
  }
7447
7447
  }]);
7448
- }(H);
7448
+ }(q);
7449
7449
  le.AUDIO_TRANSCRIPTIONS_URL = "https://api.openai.com/v1/audio/transcriptions", le.AUDIO_TRANSLATIONS_URL = "https://api.openai.com/v1/audio/translations", le.DEFAULT_MODEL = "whisper-1";
7450
7450
  var Qi = le;
7451
- var se = /*#__PURE__*/function () {
7452
- function se() {
7453
- _classCallCheck(this, se);
7451
+ var re = /*#__PURE__*/function () {
7452
+ function re() {
7453
+ _classCallCheck(this, re);
7454
7454
  }
7455
- return _createClass(se, null, [{
7455
+ return _createClass(re, null, [{
7456
7456
  key: "buildTextToSpeechHeaders",
7457
7457
  value: function buildTextToSpeechHeaders(e, t) {
7458
7458
  return {
@@ -7486,7 +7486,7 @@ var se = /*#__PURE__*/function () {
7486
7486
  "Ocp-Apim-Subscription-Key": "".concat(t)
7487
7487
  };
7488
7488
  },
7489
- handleVerificationResult: se.handleSpeechVerificationResult
7489
+ handleVerificationResult: re.handleSpeechVerificationResult
7490
7490
  };
7491
7491
  }
7492
7492
  }, {
@@ -7515,7 +7515,7 @@ var se = /*#__PURE__*/function () {
7515
7515
  "Ocp-Apim-Subscription-Key": "".concat(t)
7516
7516
  };
7517
7517
  },
7518
- handleVerificationResult: se.handleLanguageVerificationResult
7518
+ handleVerificationResult: re.handleLanguageVerificationResult
7519
7519
  };
7520
7520
  }
7521
7521
  // prettier-ignore
@@ -7533,9 +7533,9 @@ var se = /*#__PURE__*/function () {
7533
7533
  url: "https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&to=es",
7534
7534
  method: "POST",
7535
7535
  createHeaders: function createHeaders(t) {
7536
- return se.buildTranslationHeaders(e, t);
7536
+ return re.buildTranslationHeaders(e, t);
7537
7537
  },
7538
- handleVerificationResult: se.handleTranslationVerificationResult
7538
+ handleVerificationResult: re.handleTranslationVerificationResult
7539
7539
  };
7540
7540
  }
7541
7541
  }, {
@@ -7549,19 +7549,19 @@ var se = /*#__PURE__*/function () {
7549
7549
  }
7550
7550
  }]);
7551
7551
  }();
7552
- var wo = /*#__PURE__*/function (_H6) {
7552
+ var wo = /*#__PURE__*/function (_q6) {
7553
7553
  // prettier-ignore
7554
7554
  function wo(e, t, i, n, r) {
7555
7555
  var _this29;
7556
7556
  _classCallCheck(this, wo);
7557
- _this29 = _callSuper(this, wo, [e, se.buildLanguageKeyVerificationDetails(i), t, n, r]), _this29.insertKeyPlaceholderText = "Azure Language Subscription Key", _this29.keyHelpUrl =
7557
+ _this29 = _callSuper(this, wo, [e, re.buildLanguageKeyVerificationDetails(i), t, n, r]), _this29.insertKeyPlaceholderText = "Azure Language Subscription Key", _this29.keyHelpUrl =
7558
7558
  // eslint-disable-next-line max-len
7559
7559
  "https://learn.microsoft.com/en-us/azure/api-management/api-management-subscriptions#create-and-manage-subscriptions-in-azure-portal", _this29.permittedErrorPrefixes = ["Access"];
7560
7560
  return _this29;
7561
7561
  }
7562
- _inherits(wo, _H6);
7562
+ _inherits(wo, _q6);
7563
7563
  return _createClass(wo);
7564
- }(H);
7564
+ }(q);
7565
7565
  var To = /*#__PURE__*/function (_wo) {
7566
7566
  function To(e) {
7567
7567
  var _a$language;
@@ -7570,7 +7570,7 @@ var To = /*#__PURE__*/function (_wo) {
7570
7570
  var n, r, o, a;
7571
7571
  var t = (r = (n = e.directConnection) == null ? void 0 : n.azure) == null ? void 0 : r.summarization,
7572
7572
  i = (o = e.directConnection) == null ? void 0 : o.azure;
7573
- _this30 = _callSuper(this, To, [e, se.buildSummarizationHeader, t.endpoint, i]), _this30.url = "", _this30.textInputPlaceholderText = "Insert text to summarize", (_a$language = (a = _this30.rawBody).language) !== null && _a$language !== void 0 ? _a$language : a.language = "en", Object.assign(_this30.rawBody, t), _this30.url = "".concat(t.endpoint, "/language/analyze-text/jobs?api-version=2022-10-01-preview");
7573
+ _this30 = _callSuper(this, To, [e, re.buildSummarizationHeader, t.endpoint, i]), _this30.url = "", _this30.textInputPlaceholderText = "Insert text to summarize", (_a$language = (a = _this30.rawBody).language) !== null && _a$language !== void 0 ? _a$language : a.language = "en", Object.assign(_this30.rawBody, t), _this30.url = "".concat(t.endpoint, "/language/analyze-text/jobs?api-version=2022-10-01-preview");
7574
7574
  return _this30;
7575
7575
  }
7576
7576
  _inherits(To, _wo);
@@ -7820,7 +7820,7 @@ var vt = /*#__PURE__*/function () {
7820
7820
  }
7821
7821
  }]);
7822
7822
  }();
7823
- var fn = /*#__PURE__*/function (_H7) {
7823
+ var fn = /*#__PURE__*/function (_q7) {
7824
7824
  function fn(e) {
7825
7825
  var _this31;
7826
7826
  _classCallCheck(this, fn);
@@ -7831,7 +7831,7 @@ var fn = /*#__PURE__*/function (_H7) {
7831
7831
  }]), _this31.insertKeyPlaceholderText = "AssemblyAI API Key", _this31.keyHelpUrl = "https://www.assemblyai.com/app/account", _this31.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>", _this31.url = "https://api.assemblyai.com/v2/upload", _this31.isTextInputDisabled = !0, _this31.textInputPlaceholderText = "Upload an audio file", _this31.permittedErrorPrefixes = ["Authentication", "Invalid"], _this31.canSendMessage = fn.canFileSendMessage;
7832
7832
  return _this31;
7833
7833
  }
7834
- _inherits(fn, _H7);
7834
+ _inherits(fn, _q7);
7835
7835
  return _createClass(fn, [{
7836
7836
  key: "callServiceAPI",
7837
7837
  value: function () {
@@ -7903,20 +7903,20 @@ var fn = /*#__PURE__*/function (_H7) {
7903
7903
  return !!(t != null && t[0]);
7904
7904
  }
7905
7905
  }]);
7906
- }(H);
7907
- var ls = /*#__PURE__*/function (_H8) {
7906
+ }(q);
7907
+ var ls = /*#__PURE__*/function (_q8) {
7908
7908
  // prettier-ignore
7909
7909
  function ls(e, t, i, n, r) {
7910
7910
  var _this32;
7911
7911
  _classCallCheck(this, ls);
7912
- _this32 = _callSuper(this, ls, [e, se.buildSpeechKeyVerificationDetails(i), t, n, r]), _this32.insertKeyPlaceholderText = "Azure Speech Subscription Key", _this32.keyHelpUrl =
7912
+ _this32 = _callSuper(this, ls, [e, re.buildSpeechKeyVerificationDetails(i), t, n, r]), _this32.insertKeyPlaceholderText = "Azure Speech Subscription Key", _this32.keyHelpUrl =
7913
7913
  // eslint-disable-next-line max-len
7914
7914
  "https://learn.microsoft.com/en-us/azure/api-management/api-management-subscriptions#create-and-manage-subscriptions-in-azure-portal";
7915
7915
  return _this32;
7916
7916
  }
7917
- _inherits(ls, _H8);
7917
+ _inherits(ls, _q8);
7918
7918
  return _createClass(ls);
7919
- }(H);
7919
+ }(q);
7920
7920
  var vi = /*#__PURE__*/function (_ls) {
7921
7921
  // prettier-ignore
7922
7922
  function vi(e) {
@@ -7926,7 +7926,7 @@ var vi = /*#__PURE__*/function (_ls) {
7926
7926
  var n, r, o, a, l, c;
7927
7927
  var t = (r = (n = e.directConnection) == null ? void 0 : n.azure) == null ? void 0 : r.textToSpeech,
7928
7928
  i = (o = e.directConnection) == null ? void 0 : o.azure;
7929
- _this33 = _callSuper(this, vi, [e, se.buildTextToSpeechHeaders.bind({}, (t == null ? void 0 : t.outputFormat) || "audio-16khz-128kbitrate-mono-mp3"), t.region, i]), _this33.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Azure Text To Speech</b></div>\n <p>Insert text to synthesize it to audio.\n <p>\n Click <a href=\"".concat(vi.HELP_LINK, "\">here</a> for more info.\n </p>"), _this33.url = "", Object.assign(_this33.rawBody, t), (_a$lang = (a = _this33.rawBody).lang) !== null && _a$lang !== void 0 ? _a$lang : a.lang = "en-US", (_l$name = (l = _this33.rawBody).name) !== null && _l$name !== void 0 ? _l$name : l.name = "en-US-JennyNeural", (_c$gender = (c = _this33.rawBody).gender) !== null && _c$gender !== void 0 ? _c$gender : c.gender = "Female", _this33.url = "https://".concat(t.region, ".tts.speech.microsoft.com/cognitiveservices/v1");
7929
+ _this33 = _callSuper(this, vi, [e, re.buildTextToSpeechHeaders.bind({}, (t == null ? void 0 : t.outputFormat) || "audio-16khz-128kbitrate-mono-mp3"), t.region, i]), _this33.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Azure Text To Speech</b></div>\n <p>Insert text to synthesize it to audio.\n <p>\n Click <a href=\"".concat(vi.HELP_LINK, "\">here</a> for more info.\n </p>"), _this33.url = "", Object.assign(_this33.rawBody, t), (_a$lang = (a = _this33.rawBody).lang) !== null && _a$lang !== void 0 ? _a$lang : a.lang = "en-US", (_l$name = (l = _this33.rawBody).name) !== null && _l$name !== void 0 ? _l$name : l.name = "en-US-JennyNeural", (_c$gender = (c = _this33.rawBody).gender) !== null && _c$gender !== void 0 ? _c$gender : c.gender = "Female", _this33.url = "https://".concat(t.region, ".tts.speech.microsoft.com/cognitiveservices/v1");
7930
7930
  return _this33;
7931
7931
  }
7932
7932
  _inherits(vi, _ls);
@@ -8012,7 +8012,7 @@ var wt = /*#__PURE__*/function (_ls2) {
8012
8012
  }
8013
8013
  }
8014
8014
  };
8015
- _this34 = _callSuper(this, wt, [e, se.buildSpeechToTextHeaders, t.region, i, n]), _this34.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Azure Speech To Text</b></div>\n <p><b>Upload a .wav or .ogg audio file</b> to transcribe it into text.\n <p>\n Click <a href=\"".concat(wt.HELP_LINK, "\">here</a> for more info.\n </p>"), _this34.url = "", _this34.isTextInputDisabled = !0, _this34.textInputPlaceholderText = "Upload an audio file", _this34.canSendMessage = wt.canFileSendMessage;
8015
+ _this34 = _callSuper(this, wt, [e, re.buildSpeechToTextHeaders, t.region, i, n]), _this34.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Azure Speech To Text</b></div>\n <p><b>Upload a .wav or .ogg audio file</b> to transcribe it into text.\n <p>\n Click <a href=\"".concat(wt.HELP_LINK, "\">here</a> for more info.\n </p>"), _this34.url = "", _this34.isTextInputDisabled = !0, _this34.textInputPlaceholderText = "Upload an audio file", _this34.canSendMessage = wt.canFileSendMessage;
8016
8016
  var r = t.lang || "en-US";
8017
8017
  _this34.url = "https://".concat(t.region, ".stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?language=").concat(r, "&format=detailed"), _this34.recordAudio = void 0;
8018
8018
  return _this34;
@@ -8088,7 +8088,7 @@ wt.HELP_LINK =
8088
8088
  // eslint-disable-next-line max-len
8089
8089
  "https://learn.microsoft.com/en-GB/azure/cognitive-services/speech-service/get-started-text-to-speech?tabs=windows%2Cterminal&pivots=programming-language-rest";
8090
8090
  var tn = wt;
8091
- var Co = /*#__PURE__*/function (_H9) {
8091
+ var Co = /*#__PURE__*/function (_q9) {
8092
8092
  // prettier-ignore
8093
8093
  function Co(e) {
8094
8094
  var _this35;
@@ -8096,12 +8096,12 @@ var Co = /*#__PURE__*/function (_H9) {
8096
8096
  var n, r, o;
8097
8097
  var t = (r = (n = e.directConnection) == null ? void 0 : n.azure) == null ? void 0 : r.translation,
8098
8098
  i = (o = e.directConnection) == null ? void 0 : o.azure;
8099
- _this35 = _callSuper(this, Co, [e, se.buildTranslationKeyVerificationDetails(t.region), se.buildTranslationHeaders.bind({}, t == null ? void 0 : t.region), i]), _this35.insertKeyPlaceholderText = "Azure Translate Subscription Key", _this35.keyHelpUrl =
8099
+ _this35 = _callSuper(this, Co, [e, re.buildTranslationKeyVerificationDetails(t.region), re.buildTranslationHeaders.bind({}, t == null ? void 0 : t.region), i]), _this35.insertKeyPlaceholderText = "Azure Translate Subscription Key", _this35.keyHelpUrl =
8100
8100
  // eslint-disable-next-line max-len
8101
8101
  "https://learn.microsoft.com/en-us/azure/api-management/api-management-subscriptions#create-and-manage-subscriptions-in-azure-portal", _this35.url = "", _this35.url = "https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&to=".concat(t.language || "es");
8102
8102
  return _this35;
8103
8103
  }
8104
- _inherits(Co, _H9);
8104
+ _inherits(Co, _q9);
8105
8105
  return _createClass(Co, [{
8106
8106
  key: "preprocessBody",
8107
8107
  value: function preprocessBody(e) {
@@ -8166,12 +8166,12 @@ var Co = /*#__PURE__*/function (_H9) {
8166
8166
  return extractResultData;
8167
8167
  }()
8168
8168
  }]);
8169
- }(H);
8170
- var z = /*#__PURE__*/function () {
8171
- function z() {
8172
- _classCallCheck(this, z);
8169
+ }(q);
8170
+ var G = /*#__PURE__*/function () {
8171
+ function G() {
8172
+ _classCallCheck(this, G);
8173
8173
  }
8174
- return _createClass(z, null, [{
8174
+ return _createClass(G, null, [{
8175
8175
  key: "storeFiles",
8176
8176
  value: function () {
8177
8177
  var _storeFiles = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee77(e, t, i) {
@@ -8262,7 +8262,7 @@ var z = /*#__PURE__*/function () {
8262
8262
  l({
8263
8263
  src: d.target.result,
8264
8264
  name: t[a].name,
8265
- type: z.getType(t, a)
8265
+ type: G.getType(t, a)
8266
8266
  });
8267
8267
  };
8268
8268
  });
@@ -8298,12 +8298,12 @@ var z = /*#__PURE__*/function () {
8298
8298
  var o, a;
8299
8299
  (a = (o = r.text) == null ? void 0 : o.annotations) == null || a.forEach(function (l) {
8300
8300
  var c;
8301
- l.text && l.text.startsWith("sandbox:") && !B.isImageFile({
8301
+ l.text && l.text.startsWith("sandbox:") && !j.isImageFile({
8302
8302
  src: l.text
8303
8303
  }) && (c = l.file_path) != null && c.file_id && i.push({
8304
8304
  path: l.text,
8305
8305
  fileId: l.file_path.file_id,
8306
- name: z.getFileName(l.text)
8306
+ name: G.getFileName(l.text)
8307
8307
  });
8308
8308
  });
8309
8309
  }), t != null && t.image_file && i.push({
@@ -8325,7 +8325,7 @@ var z = /*#__PURE__*/function () {
8325
8325
  break;
8326
8326
  }
8327
8327
  _context79.next = 4;
8328
- return z.getFiles(e, t);
8328
+ return G.getFiles(e, t);
8329
8329
  case 4:
8330
8330
  r = _context79.sent;
8331
8331
  (o = n == null ? void 0 : n.text) != null && o.value && r.forEach(function (l, c) {
@@ -8359,9 +8359,9 @@ var z = /*#__PURE__*/function () {
8359
8359
  return _regeneratorRuntime().wrap(function _callee80$(_context80) {
8360
8360
  while (1) switch (_context80.prev = _context80.next) {
8361
8361
  case 0:
8362
- n = z.getFileDetails(t, i);
8362
+ n = G.getFileDetails(t, i);
8363
8363
  _context80.next = 3;
8364
- return z.getFilesAndNewText(e, n, t.role, i);
8364
+ return G.getFilesAndNewText(e, n, t.role, i);
8365
8365
  case 3:
8366
8366
  return _context80.abrupt("return", _context80.sent);
8367
8367
  case 4:
@@ -8405,7 +8405,7 @@ var z = /*#__PURE__*/function () {
8405
8405
  return _regeneratorRuntime().wrap(function _callee81$(_context81) {
8406
8406
  while (1) switch (_context81.prev = _context81.next) {
8407
8407
  case 0:
8408
- i.push(z.getFilesAndText(e, n, r));
8408
+ i.push(G.getFilesAndText(e, n, r));
8409
8409
  case 1:
8410
8410
  case "end":
8411
8411
  return _context81.stop();
@@ -8434,7 +8434,7 @@ var z = /*#__PURE__*/function () {
8434
8434
  return _regeneratorRuntime().wrap(function _callee83$(_context83) {
8435
8435
  while (1) switch (_context83.prev = _context83.next) {
8436
8436
  case 0:
8437
- return _context83.abrupt("return", z.parseMessages(e, [{
8437
+ return _context83.abrupt("return", G.parseMessages(e, [{
8438
8438
  content: t,
8439
8439
  role: "assistant"
8440
8440
  }]));
@@ -8457,8 +8457,8 @@ var z = /*#__PURE__*/function () {
8457
8457
  return _regeneratorRuntime().wrap(function _callee84$(_context84) {
8458
8458
  while (1) switch (_context84.prev = _context84.next) {
8459
8459
  case 0:
8460
- n = z.parseResult(t, i);
8461
- return _context84.abrupt("return", z.parseMessages(e, n));
8460
+ n = G.parseResult(t, i);
8461
+ return _context84.abrupt("return", G.parseMessages(e, n));
8462
8462
  case 2:
8463
8463
  case "end":
8464
8464
  return _context84.stop();
@@ -8472,15 +8472,15 @@ var z = /*#__PURE__*/function () {
8472
8472
  }()
8473
8473
  }]);
8474
8474
  }();
8475
- var F = /*#__PURE__*/function (_H10) {
8476
- function F(e) {
8475
+ var B = /*#__PURE__*/function (_q10) {
8476
+ function B(e) {
8477
8477
  var _c$headers, _d$OpenAIBeta;
8478
8478
  var _this36;
8479
- _classCallCheck(this, F);
8479
+ _classCallCheck(this, B);
8480
8480
  var r, o, a, l, c, d;
8481
8481
  var t = JSON.parse(JSON.stringify(e.directConnection)),
8482
8482
  i = t.openAI;
8483
- _this36 = _callSuper(this, F, [e, P.buildKeyVerificationDetails(), P.buildHeaders, i]), _this36.insertKeyPlaceholderText = "OpenAI API Key", _this36.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this36.url = "", _this36.permittedErrorPrefixes = ["Incorrect"], _this36.searchedForThreadId = !1, _this36.config = {}, _this36.newAssistantDetails = {
8483
+ _this36 = _callSuper(this, B, [e, P.buildKeyVerificationDetails(), P.buildHeaders, i]), _this36.insertKeyPlaceholderText = "OpenAI API Key", _this36.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this36.url = "", _this36.permittedErrorPrefixes = ["Incorrect"], _this36.searchedForThreadId = !1, _this36.config = {}, _this36.newAssistantDetails = {
8484
8484
  model: "gpt-4"
8485
8485
  }, _this36.shouldFetchHistory = !1, _this36.waitingForStreamResponse = !1, _this36.isSSEStream = !1;
8486
8486
  var n = (r = t.openAI) == null ? void 0 : r.assistant;
@@ -8498,8 +8498,8 @@ var F = /*#__PURE__*/function (_H10) {
8498
8498
  (_c$headers = (c = _this36.connectSettings).headers) !== null && _c$headers !== void 0 ? _c$headers : c.headers = {}, (_d$OpenAIBeta = (d = _this36.connectSettings.headers)["OpenAI-Beta"]) !== null && _d$OpenAIBeta !== void 0 ? _d$OpenAIBeta : d["OpenAI-Beta"] = "assistants=v1", _this36.maxMessages = 1, _this36.isSSEStream = !!(_this36.stream && (_typeof(_this36.stream) != "object" || !_this36.stream.simulation)), _this36.shouldFetchHistory && _this36.sessionId && (_this36.fetchHistory = _this36.fetchHistoryFunc.bind(_this36));
8499
8499
  return _this36;
8500
8500
  }
8501
- _inherits(F, _H10);
8502
- return _createClass(F, [{
8501
+ _inherits(B, _q10);
8502
+ return _createClass(B, [{
8503
8503
  key: "fetchHistoryFunc",
8504
8504
  value: function () {
8505
8505
  var _fetchHistoryFunc = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee85() {
@@ -8557,11 +8557,11 @@ var F = /*#__PURE__*/function (_H10) {
8557
8557
  key: "callService",
8558
8558
  value: function callService(e, t, i) {
8559
8559
  if (this.messages = e, this.sessionId) {
8560
- this.url = "".concat(F.THREAD_PREFIX, "/").concat(this.sessionId, "/messages");
8560
+ this.url = "".concat(B.THREAD_PREFIX, "/").concat(this.sessionId, "/messages");
8561
8561
  var n = this.processMessage(t, i);
8562
8562
  T.request(this, n, e);
8563
8563
  } else {
8564
- this.url = "".concat(F.THREAD_PREFIX, "/runs");
8564
+ this.url = "".concat(B.THREAD_PREFIX, "/runs");
8565
8565
  var _n2 = this.createNewThreadMessages(this.rawBody, t, i);
8566
8566
  this.isSSEStream ? this.createStreamRun(_n2) : T.request(this, _n2, e);
8567
8567
  }
@@ -8608,7 +8608,7 @@ var F = /*#__PURE__*/function (_H10) {
8608
8608
  break;
8609
8609
  }
8610
8610
  _context86.next = 17;
8611
- return z.storeFiles(this, e, i);
8611
+ return G.storeFiles(this, e, i);
8612
8612
  case 17:
8613
8613
  _context86.t1 = _context86.sent;
8614
8614
  _context86.next = 21;
@@ -8638,7 +8638,7 @@ var F = /*#__PURE__*/function (_H10) {
8638
8638
  while (1) switch (_context87.prev = _context87.next) {
8639
8639
  case 0:
8640
8640
  _context87.prev = 0;
8641
- this.url = F.NEW_ASSISTANT_URL;
8641
+ this.url = B.NEW_ASSISTANT_URL;
8642
8642
  _context87.next = 4;
8643
8643
  return P.directFetch(this, JSON.parse(JSON.stringify(this.newAssistantDetails)), "POST");
8644
8644
  case 4:
@@ -8694,7 +8694,7 @@ var F = /*#__PURE__*/function (_H10) {
8694
8694
  _context88.next = 8;
8695
8695
  return this.assignThreadAndRun(e);
8696
8696
  case 8:
8697
- t = "".concat(F.THREAD_PREFIX, "/").concat(this.sessionId, "/runs/").concat(this.run_id), i = {
8697
+ t = "".concat(B.THREAD_PREFIX, "/").concat(this.sessionId, "/runs/").concat(this.run_id), i = {
8698
8698
  method: "GET",
8699
8699
  headers: (n = this.connectSettings) == null ? void 0 : n.headers
8700
8700
  };
@@ -8724,7 +8724,7 @@ var F = /*#__PURE__*/function (_H10) {
8724
8724
  _context89.next = 8;
8725
8725
  break;
8726
8726
  }
8727
- this.url = "".concat(F.THREAD_PREFIX, "/").concat(this.sessionId, "/runs");
8727
+ this.url = "".concat(B.THREAD_PREFIX, "/").concat(this.sessionId, "/runs");
8728
8728
  _context89.next = 4;
8729
8729
  return P.directFetch(this, JSON.parse(JSON.stringify(this.rawBody)), "POST");
8730
8730
  case 4:
@@ -8758,7 +8758,7 @@ var F = /*#__PURE__*/function (_H10) {
8758
8758
  while (1) switch (_context90.prev = _context90.next) {
8759
8759
  case 0:
8760
8760
  t = _args90.length > 1 && _args90[1] !== undefined ? _args90[1] : !1;
8761
- this.url = "".concat(F.THREAD_PREFIX, "/").concat(e, "/messages");
8761
+ this.url = "".concat(B.THREAD_PREFIX, "/").concat(e, "/messages");
8762
8762
  _context90.next = 4;
8763
8763
  return P.directFetch(this, {}, "GET");
8764
8764
  case 4:
@@ -8773,7 +8773,7 @@ var F = /*#__PURE__*/function (_H10) {
8773
8773
  case 9:
8774
8774
  i = _context90.sent;
8775
8775
  case 10:
8776
- return _context90.abrupt("return", z.processAPIMessages(this, i, t));
8776
+ return _context90.abrupt("return", G.processAPIMessages(this, i, t));
8777
8777
  case 11:
8778
8778
  case "end":
8779
8779
  return _context90.stop();
@@ -8800,7 +8800,7 @@ var F = /*#__PURE__*/function (_H10) {
8800
8800
  break;
8801
8801
  }
8802
8802
  return _context91.abrupt("return", {
8803
- timeoutMS: F.POLLING_TIMEOUT_MS
8803
+ timeoutMS: B.POLLING_TIMEOUT_MS
8804
8804
  });
8805
8805
  case 3:
8806
8806
  if (!(t === "completed" && this.messages)) {
@@ -8884,7 +8884,7 @@ var F = /*#__PURE__*/function (_H10) {
8884
8884
  output: r
8885
8885
  };
8886
8886
  });
8887
- this.url = "".concat(F.THREAD_PREFIX, "/").concat(this.sessionId, "/runs/").concat(this.run_id, "/submit_tool_outputs");
8887
+ this.url = "".concat(B.THREAD_PREFIX, "/").concat(this.sessionId, "/runs/").concat(this.run_id, "/submit_tool_outputs");
8888
8888
  if (!this.isSSEStream) {
8889
8889
  _context92.next = 15;
8890
8890
  break;
@@ -8903,7 +8903,7 @@ var F = /*#__PURE__*/function (_H10) {
8903
8903
  }, "POST");
8904
8904
  case 17:
8905
8905
  return _context92.abrupt("return", {
8906
- timeoutMS: F.POLLING_TIMEOUT_MS
8906
+ timeoutMS: B.POLLING_TIMEOUT_MS
8907
8907
  });
8908
8908
  case 18:
8909
8909
  case "end":
@@ -8942,7 +8942,7 @@ var F = /*#__PURE__*/function (_H10) {
8942
8942
  return _context93.abrupt("return", this.parseStreamResult(e));
8943
8943
  case 8:
8944
8944
  if (this.isSSEStream && this.sessionId) {
8945
- this.url = "".concat(F.THREAD_PREFIX, "/").concat(this.sessionId, "/runs");
8945
+ this.url = "".concat(B.THREAD_PREFIX, "/").concat(this.sessionId, "/runs");
8946
8946
  r = JSON.parse(JSON.stringify(this.rawBody));
8947
8947
  this.createStreamRun(r);
8948
8948
  }
@@ -8979,7 +8979,7 @@ var F = /*#__PURE__*/function (_H10) {
8979
8979
  _context94.next = 5;
8980
8980
  break;
8981
8981
  }
8982
- c = z.getFilesAndText.bind(this, this, {
8982
+ c = G.getFilesAndText.bind(this, this, {
8983
8983
  role: "assistant",
8984
8984
  content: e.content
8985
8985
  }, e.content[0]);
@@ -9003,7 +9003,7 @@ var F = /*#__PURE__*/function (_H10) {
9003
9003
  break;
9004
9004
  }
9005
9005
  _context94.next = 11;
9006
- return z.processStreamMessages(this, e.delta.content);
9006
+ return G.processStreamMessages(this, e.delta.content);
9007
9007
  case 11:
9008
9008
  _c = _context94.sent;
9009
9009
  return _context94.abrupt("return", {
@@ -9055,10 +9055,10 @@ var F = /*#__PURE__*/function (_H10) {
9055
9055
  return createStreamRun;
9056
9056
  }()
9057
9057
  }]);
9058
- }(H);
9059
- F.THREAD_PREFIX = "https://api.openai.com/v1/threads", F.NEW_ASSISTANT_URL = "https://api.openai.com/v1/assistants", F.POLLING_TIMEOUT_MS = 800;
9060
- var nn = F;
9061
- var ce = /*#__PURE__*/function (_H11) {
9058
+ }(q);
9059
+ B.THREAD_PREFIX = "https://api.openai.com/v1/threads", B.NEW_ASSISTANT_URL = "https://api.openai.com/v1/assistants", B.POLLING_TIMEOUT_MS = 800;
9060
+ var nn = B;
9061
+ var ce = /*#__PURE__*/function (_q11) {
9062
9062
  function ce(e) {
9063
9063
  var _this39;
9064
9064
  _classCallCheck(this, ce);
@@ -9087,7 +9087,7 @@ var ce = /*#__PURE__*/function (_H11) {
9087
9087
  _typeof(r) == "object" && Object.assign(_this39.rawBody, r), _this39.canSendMessage = ce.canFileSendMessage;
9088
9088
  return _this39;
9089
9089
  }
9090
- _inherits(ce, _H11);
9090
+ _inherits(ce, _q11);
9091
9091
  return _createClass(ce, [{
9092
9092
  key: "preprocessBody",
9093
9093
  value: function preprocessBody(e, t) {
@@ -9207,10 +9207,10 @@ var ce = /*#__PURE__*/function (_H11) {
9207
9207
  }), n;
9208
9208
  }
9209
9209
  }]);
9210
- }(H);
9210
+ }(q);
9211
9211
  ce.IMAGE_GENERATION_URL = "https://api.openai.com/v1/images/generations", ce.IMAGE_VARIATIONS_URL = "https://api.openai.com/v1/images/variations", ce.IMAGE_EDIT_URL = "https://api.openai.com/v1/images/edits";
9212
9212
  var sn = ce;
9213
- var yt = /*#__PURE__*/function (_H12) {
9213
+ var yt = /*#__PURE__*/function (_q12) {
9214
9214
  function yt(e) {
9215
9215
  var _this40$maxMessages, _l$model;
9216
9216
  var _this40;
@@ -9229,7 +9229,7 @@ var yt = /*#__PURE__*/function (_H12) {
9229
9229
  (_this40$maxMessages = _this40.maxMessages) !== null && _this40$maxMessages !== void 0 ? _this40$maxMessages : _this40.maxMessages = -1, (_l$model = (l = _this40.rawBody).model) !== null && _l$model !== void 0 ? _l$model : l.model = "gpt-3.5-turbo";
9230
9230
  return _this40;
9231
9231
  }
9232
- _inherits(yt, _H12);
9232
+ _inherits(yt, _q12);
9233
9233
  return _createClass(yt, [{
9234
9234
  key: "cleanConfig",
9235
9235
  value: function cleanConfig(e) {
@@ -9483,7 +9483,7 @@ var yt = /*#__PURE__*/function (_H12) {
9483
9483
  return e.text;
9484
9484
  }
9485
9485
  }]);
9486
- }(H);
9486
+ }(q);
9487
9487
  var ko = /*#__PURE__*/function (_un3) {
9488
9488
  function ko(e) {
9489
9489
  var _this42$maxMessages;
@@ -9598,7 +9598,7 @@ var li = /*#__PURE__*/function () {
9598
9598
  }
9599
9599
  }]);
9600
9600
  }();
9601
- var Ao = /*#__PURE__*/function (_H13) {
9601
+ var Ao = /*#__PURE__*/function (_q13) {
9602
9602
  function Ao(e) {
9603
9603
  var _this43$maxMessages, _n$model;
9604
9604
  var _this43;
@@ -9608,7 +9608,7 @@ var Ao = /*#__PURE__*/function (_H13) {
9608
9608
  _this43 = _callSuper(this, Ao, [e, li.buildKeyVerificationDetails(), li.buildHeaders, i]), _this43.insertKeyPlaceholderText = "Mistral API Key", _this43.keyHelpUrl = "https://console.mistral.ai/api-keys/", _this43.url = "https://api.mistral.ai/v1/chat/completions", _this43.permittedErrorPrefixes = ["invalid"], i && (_this43.cleanConfig(i), Object.assign(_this43.rawBody, i)), (_this43$maxMessages = _this43.maxMessages) !== null && _this43$maxMessages !== void 0 ? _this43$maxMessages : _this43.maxMessages = -1, (_n$model = (n = _this43.rawBody).model) !== null && _n$model !== void 0 ? _n$model : n.model = "open-mistral-7b";
9609
9609
  return _this43;
9610
9610
  }
9611
- _inherits(Ao, _H13);
9611
+ _inherits(Ao, _q13);
9612
9612
  return _createClass(Ao, [{
9613
9613
  key: "cleanConfig",
9614
9614
  value: function cleanConfig(e) {
@@ -9684,7 +9684,7 @@ var Ao = /*#__PURE__*/function (_H13) {
9684
9684
  return extractResultData;
9685
9685
  }()
9686
9686
  }]);
9687
- }(H);
9687
+ }(q);
9688
9688
  var Mo = /*#__PURE__*/function () {
9689
9689
  function Mo() {
9690
9690
  _classCallCheck(this, Mo);
@@ -9741,7 +9741,7 @@ yn.attibutes = {
9741
9741
  }
9742
9742
  };
9743
9743
  var rn = yn;
9744
- function E(s) {
9744
+ function _(s) {
9745
9745
  return function (e, t) {
9746
9746
  Object.defineProperty(e, t, {});
9747
9747
  var i = e.constructor,
@@ -9834,7 +9834,7 @@ var Ce = /*#__PURE__*/function () {
9834
9834
  key: "createImage",
9835
9835
  value: function createImage(e, t) {
9836
9836
  var i = new Image();
9837
- return i.src = e.src, B.scrollDownOnImageLoad(i.src, t), B.processContent("image", i, i.src, e.name);
9837
+ return i.src = e.src, j.scrollDownOnImageLoad(i.src, t), j.processContent("image", i, i.src, e.name);
9838
9838
  }
9839
9839
  // WORK - image still does not scroll down when loaded
9840
9840
  }, {
@@ -9846,7 +9846,7 @@ var Ce = /*#__PURE__*/function () {
9846
9846
  while (1) switch (_context106.prev = _context106.next) {
9847
9847
  case 0:
9848
9848
  n = Ce.createImage(t, e.elementRef), r = e.createNewMessageElement("", i);
9849
- r.bubbleElement.appendChild(n), r.bubbleElement.classList.add("image-message"), B.addMessage(e, r, "image", i);
9849
+ r.bubbleElement.appendChild(n), r.bubbleElement.classList.add("image-message"), j.addMessage(e, r, "image", i);
9850
9850
  case 2:
9851
9851
  case "end":
9852
9852
  return _context106.stop();
@@ -9869,7 +9869,7 @@ var Ce = /*#__PURE__*/function () {
9869
9869
  value: function addNewAudioMessage(e, t, i) {
9870
9870
  var n = Ce.createAudioElement(t, i),
9871
9871
  r = e.createNewMessageElement("", i);
9872
- r.bubbleElement.appendChild(n), r.bubbleElement.classList.add("audio-message"), B.addMessage(e, r, "audio", i);
9872
+ r.bubbleElement.appendChild(n), r.bubbleElement.classList.add("audio-message"), j.addMessage(e, r, "audio", i);
9873
9873
  }
9874
9874
  }, {
9875
9875
  key: "createAnyFile",
@@ -9878,24 +9878,24 @@ var Ce = /*#__PURE__*/function () {
9878
9878
  t.classList.add("any-file-message-contents");
9879
9879
  var i = document.createElement("div");
9880
9880
  i.classList.add("any-file-message-icon-container");
9881
- var n = Y.createSVGElement(Io);
9881
+ var n = ee.createSVGElement(Io);
9882
9882
  n.classList.add("any-file-message-icon"), i.appendChild(n);
9883
9883
  var r = document.createElement("div");
9884
- return r.classList.add("any-file-message-text"), r.textContent = e.name || B.DEFAULT_FILE_NAME, t.appendChild(i), t.appendChild(r), B.processContent("any", t, e.src, r.textContent);
9884
+ return r.classList.add("any-file-message-text"), r.textContent = e.name || j.DEFAULT_FILE_NAME, t.appendChild(i), t.appendChild(r), j.processContent("any", t, e.src, r.textContent);
9885
9885
  }
9886
9886
  }, {
9887
9887
  key: "addNewAnyFileMessage",
9888
9888
  value: function addNewAnyFileMessage(e, t, i) {
9889
9889
  var n = e.createNewMessageElement("", i),
9890
9890
  r = Ce.createAnyFile(t);
9891
- n.bubbleElement.classList.add("any-file-message-bubble"), n.bubbleElement.appendChild(r), B.addMessage(e, n, "file", i);
9891
+ n.bubbleElement.classList.add("any-file-message-bubble"), n.bubbleElement.appendChild(r), j.addMessage(e, n, "file", i);
9892
9892
  }
9893
9893
  // no overwrite previous message logic as it is complex to track which files are to be overwritten
9894
9894
  }, {
9895
9895
  key: "addMessages",
9896
9896
  value: function addMessages(e, t, i) {
9897
9897
  t.forEach(function (n) {
9898
- n.ref && (n = B.removeFileRef(n)), B.isAudioFile(n) ? Ce.addNewAudioMessage(e, n, i) : B.isImageFile(n) ? Ce.addNewImageMessage(e, n, i) : Ce.addNewAnyFileMessage(e, n, i);
9898
+ n.ref && (n = j.removeFileRef(n)), j.isAudioFile(n) ? Ce.addNewAudioMessage(e, n, i) : j.isImageFile(n) ? Ce.addNewImageMessage(e, n, i) : Ce.addNewAnyFileMessage(e, n, i);
9899
9899
  });
9900
9900
  }
9901
9901
  }]);
@@ -9911,7 +9911,7 @@ var ke = /*#__PURE__*/function (_ot) {
9911
9911
  o = t.demo;
9912
9912
  _this44._errorMessageOverrides = (a = e.errorMessages) == null ? void 0 : a.overrides, _this44._onClearMessages = Qt.onClearMessages.bind(_this44, e), _this44._onError = Qt.onError.bind(_this44, e), _this44._displayLoadingMessage = ke.getDisplayLoadingMessage(e, t), _this44._permittedErrorPrefixes = n, _this44.addSetupMessageIfNeeded(e, t) || _this44.populateIntroPanel(i, r, e.introPanelStyle), _this44.addIntroductoryMessage(e, t), _this44.populateHistory(e), _this44._displayServiceErrorMessages = (l = e.errorMessages) == null ? void 0 : l.displayServiceErrorMessages, e.getMessages = function () {
9913
9913
  return JSON.parse(JSON.stringify(_this44.messages));
9914
- }, e.clearMessages = _this44.clearMessages.bind(_this44, t), e.refreshMessages = _this44.refreshTextMessages.bind(_this44), e.scrollToBottom = U.scrollToBottom.bind(_this44, _this44.elementRef), e.addMessage = function (c, d) {
9914
+ }, e.clearMessages = _this44.clearMessages.bind(_this44, t), e.refreshMessages = _this44.refreshTextMessages.bind(_this44), e.scrollToBottom = H.scrollToBottom.bind(_this44, _this44.elementRef), e.addMessage = function (c, d) {
9915
9915
  _this44.addAnyMessage(_objectSpread(_objectSpread({}, c), {}, {
9916
9916
  sendUpdate: !!d
9917
9917
  }), !d);
@@ -9963,7 +9963,7 @@ var ke = /*#__PURE__*/function (_ot) {
9963
9963
  t && (t.forEach(function (i) {
9964
9964
  ue.processHistoryFile(i), _this45.addNewMessage(i, !0);
9965
9965
  }), setTimeout(function () {
9966
- return U.scrollToBottom(_this45.elementRef);
9966
+ return H.scrollToBottom(_this45.elementRef);
9967
9967
  }, 0));
9968
9968
  }
9969
9969
  }, {
@@ -9981,7 +9981,7 @@ var ke = /*#__PURE__*/function (_ot) {
9981
9981
  return _this46.addAnyMessage(i, !0);
9982
9982
  });
9983
9983
  setTimeout(function () {
9984
- return U.scrollToBottom(_this46.elementRef);
9984
+ return H.scrollToBottom(_this46.elementRef);
9985
9985
  }, 0);
9986
9986
  case 4:
9987
9987
  case "end":
@@ -10047,8 +10047,8 @@ var ke = /*#__PURE__*/function (_ot) {
10047
10047
  r.classList.add("error-message-text");
10048
10048
  var o = this.getPermittedMessage(t) || ((l = this._errorMessageOverrides) == null ? void 0 : l[e]) || ((c = this._errorMessageOverrides) == null ? void 0 : c["default"]) || "Error, please try again.";
10049
10049
  this.renderText(r, o);
10050
- var a = j.extractParticularSharedStyles(["fontSize", "fontFamily"], (d = this.messageStyles) == null ? void 0 : d["default"]);
10051
- j.applyCustomStylesToElements(i, !1, a), j.applyCustomStylesToElements(i, !1, (h = this.messageStyles) == null ? void 0 : h.error), this.elementRef.appendChild(n), U.scrollToBottom(this.elementRef), this.textToSpeech && rt.speak(o, this.textToSpeech), (u = this._onError) == null || u.call(this, o);
10050
+ var a = U.extractParticularSharedStyles(["fontSize", "fontFamily"], (d = this.messageStyles) == null ? void 0 : d["default"]);
10051
+ U.applyCustomStylesToElements(i, !1, a), U.applyCustomStylesToElements(i, !1, (h = this.messageStyles) == null ? void 0 : h.error), this.elementRef.appendChild(n), H.scrollToBottom(this.elementRef), this.textToSpeech && rt.speak(o, this.textToSpeech), (u = this._onError) == null || u.call(this, o);
10052
10052
  }
10053
10053
  }, {
10054
10054
  key: "getPermittedMessage",
@@ -10079,12 +10079,12 @@ var ke = /*#__PURE__*/function (_ot) {
10079
10079
  i = e.bubbleElement;
10080
10080
  i.classList.add("loading-message-text");
10081
10081
  var n = document.createElement("div");
10082
- n.classList.add("dots-flashing"), i.appendChild(n), this.applyCustomStyles(e, b.AI_ROLE, !1, (r = this.messageStyles) == null ? void 0 : r.loading), pn.set(i, this.messageStyles), this.elementRef.appendChild(t), U.scrollToBottom(this.elementRef);
10082
+ n.classList.add("dots-flashing"), i.appendChild(n), this.applyCustomStyles(e, b.AI_ROLE, !1, (r = this.messageStyles) == null ? void 0 : r.loading), pn.set(i, this.messageStyles), this.elementRef.appendChild(t), H.scrollToBottom(this.elementRef);
10083
10083
  }
10084
10084
  }, {
10085
10085
  key: "populateIntroPanel",
10086
10086
  value: function populateIntroPanel(e, t, i) {
10087
- (e || t) && (this._introPanel = new ci(e, t, i), this._introPanel._elementRef && (X.apply(this, this._introPanel._elementRef), this.elementRef.appendChild(this._introPanel._elementRef)));
10087
+ (e || t) && (this._introPanel = new ci(e, t, i), this._introPanel._elementRef && (Q.apply(this, this._introPanel._elementRef), this.elementRef.appendChild(this._introPanel._elementRef)));
10088
10088
  }
10089
10089
  }, {
10090
10090
  key: "addMultipleFiles",
@@ -10096,7 +10096,7 @@ var ke = /*#__PURE__*/function (_ot) {
10096
10096
  return _context108.abrupt("return", Promise.all((e || []).map(function (t) {
10097
10097
  return new Promise(function (i) {
10098
10098
  if (!t.type || t.type === "any") {
10099
- var n = t.file.name || B.DEFAULT_FILE_NAME;
10099
+ var n = t.file.name || j.DEFAULT_FILE_NAME;
10100
10100
  i({
10101
10101
  name: n,
10102
10102
  type: "any",
@@ -10223,11 +10223,11 @@ var ht = /*#__PURE__*/function () {
10223
10223
  }]);
10224
10224
  }();
10225
10225
  var Nn = ["camera", "gifs", "images", "audio", "mixedFiles", "submit", "microphone"];
10226
- var Z = /*#__PURE__*/function () {
10227
- function Z() {
10228
- _classCallCheck(this, Z);
10226
+ var K = /*#__PURE__*/function () {
10227
+ function K() {
10228
+ _classCallCheck(this, K);
10229
10229
  }
10230
- return _createClass(Z, null, [{
10230
+ return _createClass(K, null, [{
10231
10231
  key: "createTextElement",
10232
10232
  value: function createTextElement(e) {
10233
10233
  var t = document.createElement("div");
@@ -10236,15 +10236,15 @@ var Z = /*#__PURE__*/function () {
10236
10236
  }, {
10237
10237
  key: "createElement",
10238
10238
  value: function createElement(e, t) {
10239
- return t ? Z.createTextElement(e) : Y.createSVGElement(e);
10239
+ return t ? K.createTextElement(e) : ee.createSVGElement(e);
10240
10240
  }
10241
10241
  }, {
10242
10242
  key: "createCustomElement",
10243
10243
  value: function createCustomElement(e, t) {
10244
10244
  var n, r, o, a;
10245
10245
  var i = t == null ? void 0 : t[e];
10246
- if ((n = i == null ? void 0 : i.text) != null && n.content) return Z.createElement((r = i == null ? void 0 : i.text) == null ? void 0 : r.content, !0);
10247
- if ((o = i == null ? void 0 : i.svg) != null && o.content) return Z.createElement((a = i == null ? void 0 : i.svg) == null ? void 0 : a.content, !1);
10246
+ if ((n = i == null ? void 0 : i.svg) != null && n.content) return K.createElement((r = i == null ? void 0 : i.svg) == null ? void 0 : r.content, !1);
10247
+ if ((o = i == null ? void 0 : i.text) != null && o.content) return K.createElement((a = i == null ? void 0 : i.text) == null ? void 0 : a.content, !0);
10248
10248
  }
10249
10249
  }, {
10250
10250
  key: "processElement",
@@ -10257,7 +10257,16 @@ var Z = /*#__PURE__*/function () {
10257
10257
  key: "createSpecificStateElement",
10258
10258
  value: function createSpecificStateElement(e, t, i) {
10259
10259
  var n;
10260
- return i && (n = Z.createCustomElement(t, i)), Z.processElement(e, n), n;
10260
+ return i && (n = K.createCustomElement(t, i)), K.processElement(e, n), n;
10261
+ }
10262
+ // isDropup here is only determined by the user and not when moved to dropup automatically
10263
+ // prettier-ignore
10264
+ }, {
10265
+ key: "createInnerElement",
10266
+ value: function createInnerElement(e, t, i, n) {
10267
+ var r = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : !1;
10268
+ var o, a;
10269
+ return r && !((a = (o = n == null ? void 0 : n[i]) == null ? void 0 : o.svg) != null && a.content) ? t : K.createSpecificStateElement(e, i, n) || t;
10261
10270
  }
10262
10271
  }]);
10263
10272
  }();
@@ -10402,6 +10411,7 @@ var De = /*#__PURE__*/function () {
10402
10411
  key: "createItem",
10403
10412
  value: function createItem(e, t, i) {
10404
10413
  var l;
10414
+ console.log(t);
10405
10415
  var n = t.elementRef,
10406
10416
  r = t.dropupText,
10407
10417
  o = document.createElement("div");
@@ -10495,7 +10505,7 @@ var at = /*#__PURE__*/function (_Bt) {
10495
10505
  }, {
10496
10506
  key: "createInnerElement",
10497
10507
  value: function createInnerElement(e, t, i) {
10498
- return Z.createSpecificStateElement(this.elementRef, t, i) || e;
10508
+ return K.createSpecificStateElement(this.elementRef, t, i) || e;
10499
10509
  }
10500
10510
  }, {
10501
10511
  key: "addClickEvent",
@@ -10524,7 +10534,7 @@ var at = /*#__PURE__*/function (_Bt) {
10524
10534
  }, {
10525
10535
  key: "createSVGIconElement",
10526
10536
  value: function createSVGIconElement() {
10527
- return Y.createSVGElement(Lo);
10537
+ return ee.createSVGElement(Lo);
10528
10538
  }
10529
10539
  }, {
10530
10540
  key: "createButtonContainer",
@@ -10540,11 +10550,11 @@ var at = /*#__PURE__*/function (_Bt) {
10540
10550
  }
10541
10551
  }]);
10542
10552
  }(Bt);
10543
- var q = /*#__PURE__*/function () {
10544
- function q() {
10545
- _classCallCheck(this, q);
10553
+ var V = /*#__PURE__*/function () {
10554
+ function V() {
10555
+ _classCallCheck(this, V);
10546
10556
  }
10547
- return _createClass(q, null, [{
10557
+ return _createClass(V, null, [{
10548
10558
  key: "addToDropup",
10549
10559
  value:
10550
10560
  // prettier-ignore
@@ -10593,25 +10603,25 @@ var q = /*#__PURE__*/function () {
10593
10603
  }, {
10594
10604
  key: "generatePositions",
10595
10605
  value: function generatePositions(e) {
10596
- var t = q.createPositionsObj();
10606
+ var t = V.createPositionsObj();
10597
10607
  Object.keys(e).forEach(function (n) {
10598
10608
  var o;
10599
10609
  var r = (o = e[n]) == null ? void 0 : o.button.position;
10600
- r && q.setPosition(e, n, t[r]);
10601
- }), t["inside-right"].length === 0 && e.submit && q.setPosition(e, "submit", t["inside-right"]), t["outside-right"].length === 0 && (e.submit ? q.setPosition(e, "submit", t["outside-right"]) : e.microphone ? q.setPosition(e, "microphone", t["outside-right"]) : e.camera && q.setPosition(e, "camera", t["outside-right"])), e.submit && q.setPosition(e, "submit", t["outside-left"].length === 0 ? t["outside-left"] : t["inside-right"]), e.microphone && q.setPosition(e, "microphone", t["outside-left"].length === 0 ? t["outside-left"] : t["inside-right"]);
10610
+ r && V.setPosition(e, n, t[r]);
10611
+ }), t["inside-right"].length === 0 && e.submit && V.setPosition(e, "submit", t["inside-right"]), t["outside-right"].length === 0 && (e.submit ? V.setPosition(e, "submit", t["outside-right"]) : e.microphone ? V.setPosition(e, "microphone", t["outside-right"]) : e.camera && V.setPosition(e, "camera", t["outside-right"])), e.submit && V.setPosition(e, "submit", t["outside-left"].length === 0 ? t["outside-left"] : t["inside-right"]), e.microphone && V.setPosition(e, "microphone", t["outside-left"].length === 0 ? t["outside-left"] : t["inside-right"]);
10602
10612
  var i = Object.keys(e);
10603
10613
  return i.length > 1 || t["dropup-menu"].length > 0 ? Nn.forEach(function (n) {
10604
10614
  e[n] && t["dropup-menu"].push(_objectSpread(_objectSpread({}, e[n]), {}, {
10605
10615
  buttonType: n
10606
10616
  }));
10607
- }) : i.length === 1 && q.setPosition(e, i[0], t["outside-right"].length === 0 ? t["outside-right"] : t["outside-left"]), t;
10617
+ }) : i.length === 1 && V.setPosition(e, i[0], t["outside-right"].length === 0 ? t["outside-right"] : t["outside-left"]), t;
10608
10618
  }
10609
10619
  // prettier-ignore
10610
10620
  }, {
10611
10621
  key: "addButtons",
10612
10622
  value: function addButtons(e, t, i, n) {
10613
- var r = q.generatePositions(t);
10614
- return q.addToSideContainer(e, r), r["dropup-menu"].length > 0 && q.addToDropup(e, r, i, n), r;
10623
+ var r = V.generatePositions(t);
10624
+ return V.addToSideContainer(e, r), r["dropup-menu"].length > 0 && V.addToDropup(e, r, i, n), r;
10615
10625
  }
10616
10626
  }]);
10617
10627
  }();
@@ -10665,7 +10675,7 @@ var Lt = /*#__PURE__*/function (_Bt2) {
10665
10675
  }, {
10666
10676
  key: "createInnerElement",
10667
10677
  value: function createInnerElement(e, t, i) {
10668
- return Z.createSpecificStateElement(this.elementRef, t, i) || e;
10678
+ return K.createSpecificStateElement(this.elementRef, t, i) || e;
10669
10679
  }
10670
10680
  }, {
10671
10681
  key: "changeToActive",
@@ -10712,7 +10722,7 @@ var Lt = /*#__PURE__*/function (_Bt2) {
10712
10722
  }, {
10713
10723
  key: "createSVGIconElement",
10714
10724
  value: function createSVGIconElement() {
10715
- var e = Y.createSVGElement(Bo);
10725
+ var e = ee.createSVGElement(Bo);
10716
10726
  return e.id = "microphone-icon", e;
10717
10727
  }
10718
10728
  }]);
@@ -10837,11 +10847,11 @@ Object.defineProperty(Ti, "__esModule", {
10837
10847
  value: !0
10838
10848
  });
10839
10849
  Ti.EventListeners = void 0;
10840
- var ne = /*#__PURE__*/function () {
10841
- function ne() {
10842
- _classCallCheck(this, ne);
10850
+ var se = /*#__PURE__*/function () {
10851
+ function se() {
10852
+ _classCallCheck(this, se);
10843
10853
  }
10844
- return _createClass(ne, null, [{
10854
+ return _createClass(se, null, [{
10845
10855
  key: "getElementIfFocusedOnAvailable",
10846
10856
  value: function getElementIfFocusedOnAvailable(e, t) {
10847
10857
  return Array.isArray(e) ? e.find(function (i) {
@@ -10852,14 +10862,14 @@ var ne = /*#__PURE__*/function () {
10852
10862
  key: "keyDownWindow",
10853
10863
  value: function keyDownWindow(e) {
10854
10864
  var _this51 = this;
10855
- e.element && ne.getElementIfFocusedOnAvailable(e.element, document.activeElement) && (ne.KEY_DOWN_TIMEOUT !== null && clearTimeout(ne.KEY_DOWN_TIMEOUT), ne.KEY_DOWN_TIMEOUT = setTimeout(function () {
10856
- ne.KEY_DOWN_TIMEOUT = null, _this51.resetRecording(e);
10865
+ e.element && se.getElementIfFocusedOnAvailable(e.element, document.activeElement) && (se.KEY_DOWN_TIMEOUT !== null && clearTimeout(se.KEY_DOWN_TIMEOUT), se.KEY_DOWN_TIMEOUT = setTimeout(function () {
10866
+ se.KEY_DOWN_TIMEOUT = null, _this51.resetRecording(e);
10857
10867
  }, 500));
10858
10868
  }
10859
10869
  }, {
10860
10870
  key: "mouseDownWindow",
10861
10871
  value: function mouseDownWindow(e, t) {
10862
- this.mouseDownElement = ne.getElementIfFocusedOnAvailable(e, t.target);
10872
+ this.mouseDownElement = se.getElementIfFocusedOnAvailable(e, t.target);
10863
10873
  }
10864
10874
  }, {
10865
10875
  key: "mouseUpWindow",
@@ -10870,7 +10880,7 @@ var ne = /*#__PURE__*/function () {
10870
10880
  key: "add",
10871
10881
  value: function add(e, t) {
10872
10882
  var i = (t == null ? void 0 : t.insertInCursorLocation) === void 0 || (t == null ? void 0 : t.insertInCursorLocation);
10873
- t != null && t.element && i && (e.mouseDownEvent = ne.mouseDownWindow.bind(e, t.element), document.addEventListener("mousedown", e.mouseDownEvent), e.mouseUpEvent = ne.mouseUpWindow.bind(e, t), document.addEventListener("mouseup", e.mouseUpEvent), e.keyDownEvent = ne.keyDownWindow.bind(e, t), document.addEventListener("keydown", e.keyDownEvent));
10883
+ t != null && t.element && i && (e.mouseDownEvent = se.mouseDownWindow.bind(e, t.element), document.addEventListener("mousedown", e.mouseDownEvent), e.mouseUpEvent = se.mouseUpWindow.bind(e, t), document.addEventListener("mouseup", e.mouseUpEvent), e.keyDownEvent = se.keyDownWindow.bind(e, t), document.addEventListener("keydown", e.keyDownEvent));
10874
10884
  }
10875
10885
  }, {
10876
10886
  key: "remove",
@@ -10879,8 +10889,8 @@ var ne = /*#__PURE__*/function () {
10879
10889
  }
10880
10890
  }]);
10881
10891
  }();
10882
- Ti.EventListeners = ne;
10883
- ne.KEY_DOWN_TIMEOUT = null;
10892
+ Ti.EventListeners = se;
10893
+ se.KEY_DOWN_TIMEOUT = null;
10884
10894
  var Ci = {};
10885
10895
  Object.defineProperty(Ci, "__esModule", {
10886
10896
  value: !0
@@ -11090,11 +11100,11 @@ var Fn = qt,
11090
11100
  Go = ft,
11091
11101
  Bn = Ye,
11092
11102
  jn = Xe;
11093
- var te = /*#__PURE__*/function () {
11094
- function te() {
11095
- _classCallCheck(this, te);
11103
+ var ie = /*#__PURE__*/function () {
11104
+ function ie() {
11105
+ _classCallCheck(this, ie);
11096
11106
  }
11097
- return _createClass(te, null, [{
11107
+ return _createClass(ie, null, [{
11098
11108
  key: "processCommand",
11099
11109
  value: function processCommand(e, t) {
11100
11110
  return (!t || !t.caseSensitive) && (e = e.toLowerCase()), (t == null ? void 0 : t.substrings) === !1 ? jn.Text.breakupIntoWordsArr(e) : e;
@@ -11105,7 +11115,7 @@ var te = /*#__PURE__*/function () {
11105
11115
  var t;
11106
11116
  return ((t = e.settings) === null || t === void 0 ? void 0 : t.caseSensitive) === !0 ? e : Object.keys(e).reduce(function (n, r) {
11107
11117
  var o = e[r];
11108
- return n[r] = typeof o == "string" ? te.processCommand(o, e.settings) : o, n;
11118
+ return n[r] = typeof o == "string" ? ie.processCommand(o, e.settings) : o, n;
11109
11119
  }, {});
11110
11120
  }
11111
11121
  }, {
@@ -11123,7 +11133,7 @@ var te = /*#__PURE__*/function () {
11123
11133
  }, {
11124
11134
  key: "setText",
11125
11135
  value: function setText(e, t, i, n) {
11126
- te.toggleCommandModeOff(e), Vo.Elements.isPrimitiveElement(n) ? (n.value = i, e.isTargetInShadow || Bn.Cursor.setOffsetForPrimitive(n, i.length, !0), Go.Browser.IS_SAFARI() && e.autoScroll && Fn.AutoScroll.scrollSafariPrimitiveToEnd(n)) : (n.textContent = i, e.isTargetInShadow || Bn.Cursor.focusEndOfGeneric(n), setTimeout(function () {
11136
+ ie.toggleCommandModeOff(e), Vo.Elements.isPrimitiveElement(n) ? (n.value = i, e.isTargetInShadow || Bn.Cursor.setOffsetForPrimitive(n, i.length, !0), Go.Browser.IS_SAFARI() && e.autoScroll && Fn.AutoScroll.scrollSafariPrimitiveToEnd(n)) : (n.textContent = i, e.isTargetInShadow || Bn.Cursor.focusEndOfGeneric(n), setTimeout(function () {
11127
11137
  return Fn.AutoScroll.scrollGeneric(e, n);
11128
11138
  })), e.resetRecording(t);
11129
11139
  }
@@ -11153,38 +11163,38 @@ var te = /*#__PURE__*/function () {
11153
11163
  if (!c || !n || !i) return;
11154
11164
  var d = ((o = c.settings) === null || o === void 0 ? void 0 : o.caseSensitive) === !0 ? t : t.toLowerCase(),
11155
11165
  h = jn.Text.breakupIntoWordsArr(d),
11156
- u = ((a = c.settings) === null || a === void 0 ? void 0 : a.substrings) === !1 ? te.checkIfMatchesWord : te.checkIfMatchesSubstring;
11166
+ u = ((a = c.settings) === null || a === void 0 ? void 0 : a.substrings) === !1 ? ie.checkIfMatchesWord : ie.checkIfMatchesSubstring;
11157
11167
  if (c.commandMode && u(c.commandMode, d, h)) return e.setInterimColorToFinal(), setTimeout(function () {
11158
- return te.toggleCommandModeOn(e);
11168
+ return ie.toggleCommandModeOn(e);
11159
11169
  }), {
11160
11170
  doNotProcessTranscription: !1
11161
11171
  };
11162
11172
  if (!(c.commandMode && !e.isWaitingForCommand)) {
11163
- if (c.stop && u(c.stop, d, h)) return te.toggleCommandModeOff(e), setTimeout(function () {
11173
+ if (c.stop && u(c.stop, d, h)) return ie.toggleCommandModeOff(e), setTimeout(function () {
11164
11174
  return e.stop();
11165
11175
  }), {
11166
11176
  doNotProcessTranscription: !1
11167
11177
  };
11168
- if (c.pause && u(c.pause, d, h)) return te.toggleCommandModeOff(e), e.setInterimColorToFinal(), setTimeout(function () {
11178
+ if (c.pause && u(c.pause, d, h)) return ie.toggleCommandModeOff(e), e.setInterimColorToFinal(), setTimeout(function () {
11169
11179
  var f;
11170
11180
  e.isPaused = !0, (f = e.onPauseTrigger) === null || f === void 0 || f.call(e, !0);
11171
11181
  }), {
11172
11182
  doNotProcessTranscription: !1
11173
11183
  };
11174
- if (c.resume && u(c.resume, d, h)) return e.isPaused = !1, (l = e.onPauseTrigger) === null || l === void 0 || l.call(e, !1), te.toggleCommandModeOff(e), e.resetRecording(i), {
11184
+ if (c.resume && u(c.resume, d, h)) return e.isPaused = !1, (l = e.onPauseTrigger) === null || l === void 0 || l.call(e, !1), ie.toggleCommandModeOff(e), e.resetRecording(i), {
11175
11185
  doNotProcessTranscription: !0
11176
11186
  };
11177
- if (c.reset && u(c.reset, d, h)) return r !== void 0 && te.setText(e, i, r, n), {
11187
+ if (c.reset && u(c.reset, d, h)) return r !== void 0 && ie.setText(e, i, r, n), {
11178
11188
  doNotProcessTranscription: !0
11179
11189
  };
11180
- if (c.removeAllText && u(c.removeAllText, d, h)) return te.setText(e, i, "", n), {
11190
+ if (c.removeAllText && u(c.removeAllText, d, h)) return ie.setText(e, i, "", n), {
11181
11191
  doNotProcessTranscription: !0
11182
11192
  };
11183
11193
  }
11184
11194
  }
11185
11195
  }]);
11186
11196
  }();
11187
- Ht.CommandUtils = te;
11197
+ Ht.CommandUtils = ie;
11188
11198
  var ki = {};
11189
11199
  Object.defineProperty(ki, "__esModule", {
11190
11200
  value: !0
@@ -12213,7 +12223,7 @@ var sa = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
12213
12223
  i.classList.add("audio-placeholder-text-3-digits");
12214
12224
  var n = document.createElement("div");
12215
12225
  n.classList.add("file-attachment-text-container", "audio-placeholder-text-3-digits-container"), n.appendChild(i);
12216
- var r = Y.createSVGElement(Zn);
12226
+ var r = ee.createSVGElement(Zn);
12217
12227
  return r.classList.add("attachment-icon", "stop-icon", "not-removable-attachment-icon"), i.textContent = "0:00", this._activePlaceholderTimer = this.createTimer(i, e), t.appendChild(n), this.addPlaceholderAudioAttachmentEvents(t, r, n), t;
12218
12228
  }
12219
12229
  }, {
@@ -12266,12 +12276,12 @@ var sa = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
12266
12276
  }, {
12267
12277
  key: "addAudioElements",
12268
12278
  value: function addAudioElements(e, t) {
12269
- var i = e.parentElement ? U.cloneElement(e) : e,
12279
+ var i = e.parentElement ? H.cloneElement(e) : e,
12270
12280
  n = document.createElement("audio");
12271
12281
  n.src = t;
12272
- var r = Y.createSVGElement(sa);
12282
+ var r = ee.createSVGElement(sa);
12273
12283
  r.classList.add("attachment-icon", "play-icon");
12274
- var o = Y.createSVGElement(Zn);
12284
+ var o = ee.createSVGElement(Zn);
12275
12285
  o.classList.add("attachment-icon", "stop-icon"), i.replaceChildren(r), n.onplay = function () {
12276
12286
  i.replaceChildren(o);
12277
12287
  }, n.onpause = function () {
@@ -12506,7 +12516,7 @@ var de = /*#__PURE__*/function () {
12506
12516
  value: function createSVGButton(e) {
12507
12517
  var t = document.createElement("div");
12508
12518
  t.classList.add("modal-button", "modal-svg-button");
12509
- var i = Y.createSVGElement(e);
12519
+ var i = ee.createSVGElement(e);
12510
12520
  return i.classList.add("modal-svg-button-icon"), t.appendChild(i), t;
12511
12521
  }
12512
12522
  }, {
@@ -12527,19 +12537,23 @@ var Et = /*#__PURE__*/function (_Bt3) {
12527
12537
  function Et(e, t, i, n, r, o) {
12528
12538
  var _this64;
12529
12539
  _classCallCheck(this, Et);
12530
- var l, c, d, h, u, f;
12531
- _this64 = _callSuper(this, Et, [Et.createButtonElement(), (l = i.button) == null ? void 0 : l.position, i.button, o]);
12532
- var a = _this64.createInnerElements(n, r, _this64._customStyles);
12533
- _this64._inputElement = Et.createInputElement((c = i == null ? void 0 : i.files) == null ? void 0 : c.acceptedFormats), _this64.addClickEvent(e, i), _this64.elementRef.replaceChildren(a.styles), _this64.reapplyStateStyle("styles"), _this64._fileAttachmentsType = t, _this64._openModalOnce = ((h = (d = i.files) == null ? void 0 : d.infoModal) == null ? void 0 : h.openModalOnce) === !1 || (f = (u = i.files) == null ? void 0 : u.infoModal) == null ? void 0 : f.openModalOnce;
12540
+ var h, u, f, m, p, y, x, D, z;
12541
+ var a = (h = i == null ? void 0 : i.button) == null ? void 0 : h.position,
12542
+ l = ((m = (f = (u = i == null ? void 0 : i.button) == null ? void 0 : u.styles) == null ? void 0 : f.text) == null ? void 0 : m.content) || o;
12543
+ _this64 = _callSuper(this, Et, [Et.createButtonElement(), a, i.button, l]);
12544
+ var c = a === "dropup-menu",
12545
+ d = _this64.createInnerElements(n, r, _this64._customStyles, c);
12546
+ _this64._inputElement = Et.createInputElement((p = i == null ? void 0 : i.files) == null ? void 0 : p.acceptedFormats), _this64.addClickEvent(e, i), _this64.elementRef.replaceChildren(d.styles), _this64.reapplyStateStyle("styles"), _this64._fileAttachmentsType = t, _this64._openModalOnce = ((x = (y = i.files) == null ? void 0 : y.infoModal) == null ? void 0 : x.openModalOnce) === !1 || (z = (D = i.files) == null ? void 0 : D.infoModal) == null ? void 0 : z.openModalOnce;
12534
12547
  return _this64;
12535
12548
  }
12536
12549
  _inherits(Et, _Bt3);
12537
12550
  return _createClass(Et, [{
12538
12551
  key: "createInnerElements",
12539
12552
  value: function createInnerElements(e, t, i) {
12540
- var n = Et.createSVGIconElement(e, t);
12553
+ var n = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : !1;
12554
+ var r = Et.createSVGIconElement(e, t);
12541
12555
  return {
12542
- styles: this.createInnerElement(n, "styles", i)
12556
+ styles: K.createInnerElement(this.elementRef, r, "styles", i, n)
12543
12557
  };
12544
12558
  }
12545
12559
  }, {
@@ -12552,11 +12566,6 @@ var Et = /*#__PURE__*/function (_Bt3) {
12552
12566
  value: function _import(e) {
12553
12567
  zt.addFilesToType(Array.from(e.files || []), [this._fileAttachmentsType]), e.value = "";
12554
12568
  }
12555
- }, {
12556
- key: "createInnerElement",
12557
- value: function createInnerElement(e, t, i) {
12558
- return Z.createSpecificStateElement(this.elementRef, t, i) || e;
12559
- }
12560
12569
  }, {
12561
12570
  key: "addClickEvent",
12562
12571
  value: function addClickEvent(e, t) {
@@ -12584,7 +12593,7 @@ var Et = /*#__PURE__*/function (_Bt3) {
12584
12593
  }, {
12585
12594
  key: "createSVGIconElement",
12586
12595
  value: function createSVGIconElement(e, t) {
12587
- var i = Y.createSVGElement(t);
12596
+ var i = ee.createSVGElement(t);
12588
12597
  return i.id = e, i;
12589
12598
  }
12590
12599
  }]);
@@ -12708,7 +12717,7 @@ var Fe = /*#__PURE__*/function () {
12708
12717
  }, {
12709
12718
  key: "validateWebsocket",
12710
12719
  value: function validateWebsocket(e, t) {
12711
- return e.websocket && !V.canSendMessage(e.websocket) ? (t.changeToDisabledIcon(), !1) : !0;
12720
+ return e.websocket && !W.canSendMessage(e.websocket) ? (t.changeToDisabledIcon(), !1) : !0;
12712
12721
  }
12713
12722
  // prettier-ignore
12714
12723
  }, {
@@ -12819,38 +12828,38 @@ var oa = /*#__PURE__*/function (_Lt2) {
12819
12828
  }]);
12820
12829
  }(Lt);
12821
12830
  var aa = "<?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";
12822
- var G = /*#__PURE__*/function () {
12823
- function G() {
12824
- _classCallCheck(this, G);
12831
+ var $ = /*#__PURE__*/function () {
12832
+ function $() {
12833
+ _classCallCheck(this, $);
12825
12834
  }
12826
- return _createClass(G, null, [{
12835
+ return _createClass($, null, [{
12827
12836
  key: "setPropertyValueIfDoesNotExist",
12828
12837
  value: function setPropertyValueIfDoesNotExist(e, t, i) {
12829
12838
  var _e$n, _e$n2;
12830
12839
  var n = t[0];
12831
- t.length === 1 ? (_e$n = e[n]) !== null && _e$n !== void 0 ? _e$n : e[n] = i : ((_e$n2 = e[n]) !== null && _e$n2 !== void 0 ? _e$n2 : e[n] = {}, t.shift(), G.setPropertyValueIfDoesNotExist(e[n], t, i));
12840
+ t.length === 1 ? (_e$n = e[n]) !== null && _e$n !== void 0 ? _e$n : e[n] = i : ((_e$n2 = e[n]) !== null && _e$n2 !== void 0 ? _e$n2 : e[n] = {}, t.shift(), $.setPropertyValueIfDoesNotExist(e[n], t, i));
12832
12841
  }
12833
12842
  }, {
12834
12843
  key: "setPropertyValue",
12835
12844
  value: function setPropertyValue(e, t, i) {
12836
12845
  var _e$n3;
12837
12846
  var n = t[0];
12838
- t.length === 1 ? e[n] = i : ((_e$n3 = e[n]) !== null && _e$n3 !== void 0 ? _e$n3 : e[n] = {}, t.shift(), G.setPropertyValue(e[n], t, i));
12847
+ t.length === 1 ? e[n] = i : ((_e$n3 = e[n]) !== null && _e$n3 !== void 0 ? _e$n3 : e[n] = {}, t.shift(), $.setPropertyValue(e[n], t, i));
12839
12848
  }
12840
12849
  }, {
12841
12850
  key: "getObjectValue",
12842
12851
  value: function getObjectValue(e, t) {
12843
12852
  var i = t[0],
12844
12853
  n = e[i];
12845
- return n === void 0 || t.length === 1 ? n : G.getObjectValue(n, t.slice(1));
12854
+ return n === void 0 || t.length === 1 ? n : $.getObjectValue(n, t.slice(1));
12846
12855
  }
12847
12856
  }, {
12848
12857
  key: "overwritePropertyObjectFromAnother",
12849
12858
  value: function overwritePropertyObjectFromAnother(e, t, i) {
12850
- var n = G.getObjectValue(t, i);
12859
+ var n = $.getObjectValue(t, i);
12851
12860
  if (n) {
12852
- var r = _objectSpread(_objectSpread({}, n), G.getObjectValue(e, i) || {});
12853
- G.setPropertyValue(e, i, r);
12861
+ var r = _objectSpread(_objectSpread({}, n), $.getObjectValue(e, i) || {});
12862
+ $.setPropertyValue(e, i, r);
12854
12863
  }
12855
12864
  }
12856
12865
  }]);
@@ -12869,13 +12878,13 @@ var Ve = /*#__PURE__*/function () {
12869
12878
  value: function overwriteDefaultStyleWithSubmit(e, t) {
12870
12879
  if (!e.submit) return;
12871
12880
  var i = JSON.parse(JSON.stringify(e[t] || {}));
12872
- G.overwritePropertyObjectFromAnother(i, e.submit, ["container", "default"]), G.overwritePropertyObjectFromAnother(i, e.submit, ["text", "styles", "default"]), G.overwritePropertyObjectFromAnother(i, e.submit, ["svg", "styles", "default"]), e[t] = i;
12881
+ $.overwritePropertyObjectFromAnother(i, e.submit, ["container", "default"]), $.overwritePropertyObjectFromAnother(i, e.submit, ["text", "styles", "default"]), $.overwritePropertyObjectFromAnother(i, e.submit, ["svg", "styles", "default"]), e[t] = i;
12873
12882
  }
12874
12883
  // prettier-ignore
12875
12884
  }, {
12876
12885
  key: "setUpDisabledButton",
12877
12886
  value: function setUpDisabledButton(e) {
12878
- G.setPropertyValueIfDoesNotExist(e, ["submit", "container", "default", "backgroundColor"], ""), G.setPropertyValueIfDoesNotExist(e, ["disabled", "container", "default", "backgroundColor"], "unset"), G.setPropertyValueIfDoesNotExist(e.submit, ["svg", "styles", "default", "filter"], ""), G.setPropertyValueIfDoesNotExist(e.disabled, ["svg", "styles", "default", "filter"], "brightness(0) saturate(100%) invert(70%) sepia(0%) saturate(5564%) hue-rotate(207deg) brightness(100%) contrast(97%)"), Ve.overwriteDefaultStyleWithSubmit(e, "disabled");
12887
+ $.setPropertyValueIfDoesNotExist(e, ["submit", "container", "default", "backgroundColor"], ""), $.setPropertyValueIfDoesNotExist(e, ["disabled", "container", "default", "backgroundColor"], "unset"), $.setPropertyValueIfDoesNotExist(e.submit, ["svg", "styles", "default", "filter"], ""), $.setPropertyValueIfDoesNotExist(e.disabled, ["svg", "styles", "default", "filter"], "brightness(0) saturate(100%) invert(70%) sepia(0%) saturate(5564%) hue-rotate(207deg) brightness(100%) contrast(97%)"), Ve.overwriteDefaultStyleWithSubmit(e, "disabled");
12879
12888
  }
12880
12889
  }, {
12881
12890
  key: "process",
@@ -12922,21 +12931,21 @@ var k = /*#__PURE__*/function (_Bt4) {
12922
12931
  key: "createCustomElements",
12923
12932
  value: function createCustomElements() {
12924
12933
  var _this70 = this;
12925
- var e = Z.createSpecificStateElement(this.elementRef, "submit", this._customStyles),
12934
+ var e = K.createSpecificStateElement(this.elementRef, "submit", this._customStyles),
12926
12935
  t = {
12927
12936
  loading: void 0,
12928
12937
  stop: void 0
12929
12938
  };
12930
12939
  return Object.keys(t).forEach(function (i) {
12931
12940
  var n = i,
12932
- r = Z.createCustomElement(n, _this70._customStyles);
12941
+ r = K.createCustomElement(n, _this70._customStyles);
12933
12942
  r && (t[n] = r);
12934
12943
  }), t.submit = e, t;
12935
12944
  }
12936
12945
  }, {
12937
12946
  key: "createDisabledIconElement",
12938
12947
  value: function createDisabledIconElement(e) {
12939
- return Z.createCustomElement("disabled", this._customStyles) || e.cloneNode(!0);
12948
+ return K.createCustomElement("disabled", this._customStyles) || e.cloneNode(!0);
12940
12949
  }
12941
12950
  // prettier-ignore
12942
12951
  }, {
@@ -13174,7 +13183,7 @@ var k = /*#__PURE__*/function (_Bt4) {
13174
13183
  }, {
13175
13184
  key: "createSubmitIconElement",
13176
13185
  value: function createSubmitIconElement() {
13177
- var e = Y.createSVGElement(aa);
13186
+ var e = ee.createSVGElement(aa);
13178
13187
  return e.id = "submit-icon", e;
13179
13188
  }
13180
13189
  }, {
@@ -13206,7 +13215,7 @@ var bn = /*#__PURE__*/function (_ze) {
13206
13215
  var _this73$addButtonsAnd = _this73.addButtonsAndTheirEvents(t),
13207
13216
  r = _this73$addButtonsAnd.captureButton,
13208
13217
  o = _this73$addButtonsAnd.submitButton;
13209
- _this73._captureButton = r, _this73._submitButton = o, _this73._captureIcon = _this73._captureButton.children[0], _this73._refreshIcon = Y.createSVGElement(la), _this73._refreshIcon.classList.add("modal-svg-button-icon", "modal-svg-refresh-icon"), (n == null ? void 0 : n.format) === "jpeg" && (_this73._format = "image/jpeg"), n != null && n.dimensions && (_this73._dimensions = n.dimensions), _this73._contentRef.appendChild(_this73._canvas), _this73.extensionCloseCallback = _this73.stop;
13218
+ _this73._captureButton = r, _this73._submitButton = o, _this73._captureIcon = _this73._captureButton.children[0], _this73._refreshIcon = ee.createSVGElement(la), _this73._refreshIcon.classList.add("modal-svg-button-icon", "modal-svg-refresh-icon"), (n == null ? void 0 : n.format) === "jpeg" && (_this73._format = "image/jpeg"), n != null && n.dimensions && (_this73._dimensions = n.dimensions), _this73._contentRef.appendChild(_this73._canvas), _this73.extensionCloseCallback = _this73.stop;
13210
13219
  return _this73;
13211
13220
  }
13212
13221
  _inherits(bn, _ze);
@@ -13315,26 +13324,24 @@ var mi = /*#__PURE__*/function (_Bt5) {
13315
13324
  function mi(e, t, i) {
13316
13325
  var _this77;
13317
13326
  _classCallCheck(this, mi);
13318
- var r;
13319
- _this77 = _callSuper(this, mi, [mi.createButtonElement(), (r = i == null ? void 0 : i.button) == null ? void 0 : r.position, (i == null ? void 0 : i.button) || {}, "Photo"]);
13320
- var n = _this77.createInnerElements(_this77._customStyles);
13321
- i && _this77.addClickEvent(e, t, i.modalContainerStyle, i.files), _this77.elementRef.classList.add("upload-file-button"), _this77.elementRef.appendChild(n.styles), _this77.reapplyStateStyle("styles");
13327
+ var a, l, c, d;
13328
+ var n = (a = i == null ? void 0 : i.button) == null ? void 0 : a.position,
13329
+ r = ((d = (c = (l = i == null ? void 0 : i.button) == null ? void 0 : l.styles) == null ? void 0 : c.text) == null ? void 0 : d.content) || "Photo";
13330
+ _this77 = _callSuper(this, mi, [mi.createButtonElement(), n, (i == null ? void 0 : i.button) || {}, r]);
13331
+ var o = _this77.createInnerElements(_this77._customStyles, n === "dropup-menu");
13332
+ i && _this77.addClickEvent(e, t, i.modalContainerStyle, i.files), _this77.elementRef.classList.add("upload-file-button"), _this77.elementRef.appendChild(o.styles), _this77.reapplyStateStyle("styles");
13322
13333
  return _this77;
13323
13334
  }
13324
- // need to know if the button is going to be stored inside a menu
13335
+ // prettier-ignore
13325
13336
  _inherits(mi, _Bt5);
13326
13337
  return _createClass(mi, [{
13327
13338
  key: "createInnerElements",
13328
13339
  value: function createInnerElements(e) {
13340
+ var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : !1;
13329
13341
  return {
13330
- styles: this.createInnerElement(mi.createSVGIconElement(), "styles", e)
13342
+ styles: K.createInnerElement(this.elementRef, mi.createSVGIconElement(), "styles", e, t)
13331
13343
  };
13332
13344
  }
13333
- }, {
13334
- key: "createInnerElement",
13335
- value: function createInnerElement(e, t, i) {
13336
- return Z.createSpecificStateElement(this.elementRef, t, i) || e;
13337
- }
13338
13345
  }, {
13339
13346
  key: "addClickEvent",
13340
13347
  value:
@@ -13352,7 +13359,7 @@ var mi = /*#__PURE__*/function (_Bt5) {
13352
13359
  }, {
13353
13360
  key: "createSVGIconElement",
13354
13361
  value: function createSVGIconElement() {
13355
- var e = Y.createSVGElement(ua);
13362
+ var e = ee.createSVGElement(ua);
13356
13363
  return e.id = "camera-icon", e;
13357
13364
  }
13358
13365
  }]);
@@ -13424,9 +13431,9 @@ var _t = /*#__PURE__*/function () {
13424
13431
  }, {
13425
13432
  key: "addElements",
13426
13433
  value: function addElements(e, t, i, n, r, o) {
13427
- U.addElements(e, t.elementRef);
13434
+ H.addElements(e, t.elementRef);
13428
13435
  var a = ht.create(),
13429
- l = q.addButtons(a, i, n, o);
13436
+ l = V.addButtons(a, i, n, o);
13430
13437
  on.set(t.inputElementRef, a, r.elementRef, l), ht.add(e, a);
13431
13438
  }
13432
13439
  }]);
@@ -13441,9 +13448,9 @@ var vn = /*#__PURE__*/function () {
13441
13448
  var n = document.createElement("div");
13442
13449
  n.id = "chat-view";
13443
13450
  var r = new ke(e, t, i);
13444
- t.websocket && V.createConnection(t, r);
13451
+ t.websocket && W.createConnection(t, r);
13445
13452
  var o = new _t(e, r, t, n);
13446
- return U.addElements(n, r.elementRef, o.elementRef), n;
13453
+ return H.addElements(n, r.elementRef, o.elementRef), n;
13447
13454
  }
13448
13455
  }, {
13449
13456
  key: "render",
@@ -13456,15 +13463,15 @@ var vn = /*#__PURE__*/function () {
13456
13463
  var fa = "#validate-property-key-view{height:100%;position:relative;display:flex;justify-content:center;align-items:center;padding:8px}#large-loading-ring{display:inline-block;width:50px;height:50px}#large-loading-ring:after{content:\" \";display:block;width:38px;height:38px;margin:1px;border-radius:50%;border:5px solid #5fb2ff;border-color:#5fb2ff transparent #5fb2ff transparent;animation:large-loading-ring 1.4s linear infinite}@keyframes large-loading-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}#insert-key-view{height:100%;position:relative}#insert-key-contents{text-align:center;position:absolute;top:44%;left:50%;transform:translate(-50%,-50%);width:82%;display:flex;max-width:700px}#insert-key-title{margin-bottom:15px}#insert-key-input-container{margin-right:2.7em;width:calc(100% - 80px)}#insert-key-input{padding:.3em 1.7em .3em .3em;border-width:1px;border-style:solid;border-radius:3px;width:100%;font-size:inherit}.insert-key-input-valid{border-color:gray}.insert-key-input-invalid{border-color:red}#visibility-icon-container{position:relative;float:right;cursor:pointer;-webkit-user-select:none;user-select:none}.visibility-icon{filter:brightness(0) saturate(100%) invert(63%) sepia(1%) saturate(9%) hue-rotate(43deg) brightness(98%) contrast(92%);position:absolute;right:-1.7em;top:-1.43em}#visible-icon{top:-1.4em}.visibility-icon:hover{filter:unset}.visibility-icon>*{pointer-events:none}#start-button{border:1px solid grey;color:#454545;border-radius:4px;width:3em;display:flex;justify-content:center;align-items:center;cursor:pointer;padding:.28em .3em;-webkit-user-select:none;user-select:none;background-color:#fff}#start-button:hover{background-color:#f2f2f2}#start-button:active{background-color:#d2d2d2}#insert-key-help-text-container{width:100%;position:absolute;margin-top:32px;margin-bottom:20px}#insert-key-help-text-contents{width:100%;position:absolute}#insert-key-input-invalid-text{display:block;margin-top:1em;margin-bottom:.5em;color:red}.insert-key-input-help-text{display:block;margin-top:16px}#loading-ring{display:inline-block;width:16px;height:16px}#loading-ring:after{content:\" \";display:block;width:11px;height:11px;margin:1px;border-radius:50%;border:2px solid #0084ff;border-color:#0084ff transparent #0084ff transparent;animation:loading-ring 1.2s linear infinite}@keyframes loading-ring{0%{transform:rotate(0)}to{transform:rotate(360deg)}}#error-view{color:red;font-size:1.2em;line-height:1.3em;margin-top:-5px;text-align:center;height:100%;display:flex;justify-content:center;align-items:center;padding-left:8px;padding-right:8px}.intro-panel{position:absolute;display:flex;justify-content:center;right:0;bottom:0;left:0;margin:auto;height:fit-content;top:-2.5em}#internal-intro-panel{width:250px;height:min-content;display:block;border-radius:5px;overflow:auto;border:1px solid rgb(203,203,203);padding:10px;max-height:calc(100% - 6.8em)}#internal-intro-panel>p{margin-block-start:.8em;margin-block-end:.8em}pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}/*!\n Theme: a11y-dark\n Author: @ericwbailey\n Maintainer: @ericwbailey\n\n Based on the Tomorrow Night Eighties theme: https://github.com/isagalaev/highlight.js/blob/master/src/styles/tomorrow-night-eighties.css\n*/.hljs{background:#2b2b2b;color:#f8f8f2}.hljs-comment,.hljs-quote{color:#d4d0ab}.hljs-deletion,.hljs-name,.hljs-regexp,.hljs-selector-class,.hljs-selector-id,.hljs-tag,.hljs-template-variable,.hljs-variable{color:#ffa07a}.hljs-built_in,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-type{color:#f5ab35}.hljs-attribute{color:gold}.hljs-addition,.hljs-bullet,.hljs-string,.hljs-symbol{color:#abe338}.hljs-section,.hljs-title{color:#00e0e0}.hljs-keyword,.hljs-selector-tag{color:#dcc6e0}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:700}@media screen and (-ms-high-contrast: active){.hljs-addition,.hljs-attribute,.hljs-built_in,.hljs-bullet,.hljs-comment,.hljs-link,.hljs-literal,.hljs-meta,.hljs-number,.hljs-params,.hljs-quote,.hljs-string,.hljs-symbol,.hljs-type{color:highlight}.hljs-keyword,.hljs-selector-tag{font-weight:700}}#messages{overflow:auto}.outer-message-container:last-child{margin-bottom:5px}.inner-message-container{display:flex;margin-left:auto;margin-right:auto;width:calc(97.5% - 24px);max-width:100%}.message-bubble{margin-top:10px;word-wrap:break-word;width:fit-content;max-width:60%;border-radius:10px;padding:.42em .55em;height:fit-content;line-height:1.26em}.user-message-text{color:#fff;background-color:#0084ff;margin-right:0;margin-left:auto}.ai-message-text{color:#000;background-color:#e4e6eb;margin-left:0;margin-right:auto}.html-message{max-width:unset}.error-message-text{margin:14px auto 10px;background-color:#f4c0c0;color:#474747;text-align:center;max-width:95%}.loading-message-text{width:1em;padding:.6em .75em .6em 1.3em}.message-bubble>p:first-child{margin-top:0}.message-bubble>p:last-child{margin-bottom:0}pre{overflow:auto;display:block;word-break:break-all;word-wrap:break-word;border-radius:7px;background:#2b2b2b;color:#f8f8f2;margin-top:.8em;margin-bottom:.8em;padding:.6em;font-size:.9em;line-height:1.5em}.image-message{padding:0;display:flex;background-color:#ddd}.image-message>*,.image-message>*>*{width:100%;border-radius:8px;display:flex}.audio-message{width:60%;max-width:300px;height:2.2em;max-height:54px;padding:0;background-color:unset}.audio-player{width:100%;height:100%}.audio-player-safari{height:fit-content;width:40px}.audio-player-safari-left{float:left}.audio-player-safari-right{float:right}.any-file-message-bubble{padding:1px}.any-file-message-contents{display:flex}.any-file-message-icon-container{width:1.3em;min-width:1.3em;position:relative;border-radius:4px;margin-left:6px;margin-right:2px}.any-file-message-icon{background-color:#fff;border-radius:4px;position:absolute;width:1em;height:1.25em;padding:1px;margin-top:auto;margin-bottom:auto;top:0;bottom:0}.any-file-message-text{padding-top:5px;overflow-wrap:anywhere;padding-bottom:5px;padding-right:7px}.message-bubble>a{color:inherit}.left-item-position{margin-right:10px}.right-item-position{margin-left:10px}.avatar{padding-top:5px;width:1.5em;height:1.5em;border-radius:1px}.avatar-container{margin-top:9px}.name{margin-top:16px;font-size:15px}#drag-and-drop{position:absolute;display:none;z-index:10;height:calc(100% - 10px);width:calc(100% - 10px);background-color:#70c6ff4d;border:5px dashed #6dafff}#file-attachment-container{position:absolute;height:3.6em;width:calc(80% - 4px);top:-2.5em;border-radius:5px;overflow:auto;text-align:left;background-color:#d7d7d73b;padding-left:4px}.file-attachment{width:2.85em;height:2.85em;display:inline-flex;margin-right:.6em;margin-bottom:.44em;margin-top:4px;position:relative;background-color:#fff;border-radius:5px}.image-attachment{width:100%;height:100%;object-fit:cover;border-radius:5px}.border-bound-attachment{width:calc(100% - 2px);height:calc(100% - 2px);border:1px solid #c3c3c3;border-radius:5px;overflow:hidden}.border-bound-attachment-safari{width:calc(100% - 1px);height:calc(100% - 1px)}.audio-attachment-icon-container{cursor:pointer}.audio-attachment-icon-container:hover{background-color:#f8f8f8}.attachment-icon{left:0;right:0;bottom:0;top:2px;margin:auto;position:absolute;width:25px;-webkit-user-select:none;user-select:none}.not-removable-attachment-icon{top:0;right:0;bottom:0;left:0}.play-icon{filter:brightness(0) saturate(100%) invert(17%) sepia(0%) saturate(1392%) hue-rotate(67deg) brightness(98%) contrast(97%)}.stop-icon{filter:brightness(0) saturate(100%) invert(29%) sepia(90%) saturate(1228%) hue-rotate(198deg) brightness(93%) contrast(98%)}.audio-placeholder-text-3-digits{padding-left:.26rem}.audio-placeholder-text-4-digits{padding-left:.1rem}.any-file-attachment{padding:2px 0}.file-attachment-text-container{position:absolute;width:inherit;display:flex;align-items:center;height:100%;top:-1px}.audio-placeholder-text-3-digits-container{padding-top:1px;cursor:default}.any-file-attachment-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;padding-left:.13em;margin-left:auto;margin-right:auto}.remove-file-attachment-button{height:1.25em;width:1.25em;border:1px solid #cfcfcf;border-radius:25px;background-color:#fff;top:-4px;right:-5px;position:absolute;display:flex;justify-content:center;cursor:pointer;-webkit-user-select:none;user-select:none}.remove-file-attachment-button:hover{background-color:#e4e4e4}.remove-file-attachment-button:active{background-color:#d7d7d7}.x-icon{color:#4e4e4e;top:-.075em;position:relative;font-size:1.05em}.modal{display:none;flex-direction:column;align-items:center;justify-content:center;position:absolute;width:80%;max-width:420px;max-height:80%;margin:auto;top:0;right:0;bottom:0;left:0;z-index:2}.modal-content{border-top:1px solid rgb(217,217,217);border-left:1px solid rgb(217,217,217);border-right:1px solid rgb(217,217,217);border-top-left-radius:inherit;border-top-right-radius:inherit;background-color:#fff;overflow-y:auto;height:fit-content;max-height:calc(100% - 3.3em);width:100%}.modal-content>p{margin-left:1em;margin-right:1em}.modal-content>ul{margin-right:1em}.modal-button-panel{height:3.3em;border:1px solid;border-color:rgb(223,223,223) rgb(217,217,217) rgb(217,217,217);border-bottom-left-radius:inherit;border-bottom-right-radius:inherit;background-color:#fff;text-align:center;justify-content:center;display:flex;width:100%}.modal-button{min-width:2.5em;text-align:center;color:#fff;border-radius:5px;padding:.4em .4em .3em;height:1.25em;background-color:#3279b2;top:0;bottom:0;cursor:pointer;-webkit-user-select:none;user-select:none;margin:auto .31em}.modal-button:hover{background-color:#276da7}.modal-button:active{background-color:#1b5687}.modal-svg-button{padding:0 0 2px;width:2em;height:1.8em}.modal-svg-button-icon{width:100%;height:100%;filter:brightness(0) saturate(100%) invert(100%) sepia(15%) saturate(4%) hue-rotate(346deg) brightness(101%) contrast(102%)}#modal-background-panel{position:absolute;width:100%;height:100%;background-color:#00000042;z-index:1;display:none}.show-modal-background{animation:fadeInBackground .3s ease-in-out}@keyframes fadeInBackground{0%{opacity:0}to{opacity:1}}.show-modal{animation:fadeInModal .3s ease-in-out}@keyframes fadeInModal{0%{opacity:0;scale:.95}to{opacity:1;scale:1}}.hide-modal-background{animation:fadeOutBackground .2s ease-in-out}@keyframes fadeOutBackground{0%{opacity:1}to{opacity:0}}.hide-modal{animation:fadeOutModal .2s ease-in-out}@keyframes fadeOutModal{0%{opacity:1;scale:1}to{opacity:0;scale:.95}}.modal-camera-content{overflow:hidden;text-align:center;border:unset;height:100%;background-color:#2a2a2a;display:flex;justify-content:center}.camera-modal-canvas{max-width:100%;max-height:100%;margin-top:auto;margin-bottom:auto}.modal-svg-submit-button{background-color:green}.modal-svg-submit-button:hover{background-color:#007500}.modal-svg-submit-button:active{background-color:#006500}.modal-svg-submit-disabled{pointer-events:none;background-color:#747474}.modal-svg-close-button{height:1.56em;padding-top:.37em;padding-bottom:0;background-color:#c13e3e}.modal-svg-close-button:hover{background-color:#b43434}.modal-svg-close-button:active{background-color:#972929}.modal-svg-close-icon{width:80%;height:80%}.modal-svg-camera-button{height:1.6em;padding-top:.38em;padding-bottom:0}.modal-svg-camera-icon{height:76%}.modal-svg-refresh-icon{height:105%}.modal-svg-refresh-button{height:1.66em;padding-top:.11em;padding-bottom:.21em}.input-button-container{position:relative;z-index:1}.inside-right{position:absolute;right:calc(10% + .35em);bottom:.85em}.inside-left{position:absolute;left:calc(10% + .35em);bottom:.85em}.outside-left{position:absolute;right:calc(11px - .55em);bottom:.88em}.outside-right{position:absolute;left:calc(11px - .55em);bottom:.88em}#upload-images-icon{position:absolute;pointer-events:none;width:1.45em;height:1.45em;left:.11em;bottom:.08em;filter:brightness(0) saturate(100%) invert(43%) sepia(0%) saturate(740%) hue-rotate(77deg) brightness(99%) contrast(92%)}#upload-gifs-icon{position:absolute;pointer-events:none;width:1.5em;height:1.48em;left:.07em;bottom:.08em;filter:brightness(0) saturate(100%) invert(49%) sepia(0%) saturate(2586%) hue-rotate(12deg) brightness(93%) contrast(90%)}#upload-audio-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.17em;bottom:.2em;filter:brightness(0) saturate(100%) invert(15%) sepia(0%) saturate(337%) hue-rotate(125deg) brightness(91%) contrast(94%);transform:scaleX(.95)}#camera-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.23em;bottom:.2em;filter:brightness(0) saturate(100%) invert(52%) sepia(0%) saturate(161%) hue-rotate(164deg) brightness(91%) contrast(92%);transform:scaleX(.95)}#upload-mixed-files-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.25em;bottom:.2em;filter:brightness(0) saturate(100%) invert(53%) sepia(0%) saturate(36%) hue-rotate(74deg) brightness(98%) contrast(93%);transform:scaleX(.95)}#interim-text{color:gray}#microphone-button{padding-top:.5px}.outer-button-container>#microphone-button{padding-bottom:1px}#microphone-icon{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.25em;bottom:.25em}.default-microphone-icon{filter:brightness(0) saturate(100%) invert(32%) sepia(0%) saturate(924%) hue-rotate(46deg) brightness(95%) contrast(99%)}.active-microphone-icon{filter:brightness(0) saturate(100%) invert(10%) sepia(97%) saturate(7495%) hue-rotate(0deg) brightness(101%) contrast(107%);border-radius:10px}.command-microphone-icon{filter:brightness(0) saturate(100%) invert(42%) sepia(96%) saturate(1067%) hue-rotate(77deg) brightness(99%) contrast(102%)}.unsupported-microphone{display:none}#submit-icon{height:100%;filter:brightness(0) saturate(100%) invert(32%) sepia(0%) saturate(924%) hue-rotate(46deg) brightness(95%) contrast(99%);width:1.21em}#stop-icon{background-color:#acacac;position:absolute;width:.95em;height:.95em;left:.35em;bottom:.35em;border-radius:2px}.submit-button-enlarged{scale:1.1;margin-right:.3em;margin-left:.3em}.dots-jumping{position:relative;left:calc(-9990px + .275em);width:.22em;height:.22em;border-radius:5px;background-color:#848484;color:#848484;box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484;animation:dots-jumping 1.5s infinite linear;bottom:-.75em}@keyframes dots-jumping{0%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}16.667%{box-shadow:9990px -6px #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}33.333%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}50%{box-shadow:9990px 0 #848484,calc(9990px + .44em) -6px 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}66.667%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}83.333%{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) -6px 0 0 #848484}to{box-shadow:9990px 0 #848484,calc(9990px + .44em) 0 0 0 #848484,calc(9990px + .8em) 0 0 0 #848484}}.dots-flashing{position:relative;width:.45em;height:.45em;border-radius:5px;background-color:var(--message-dots-color);color:var(--message-dots-color);animation:dots-flashing 1s infinite linear alternate;animation-delay:.5s}.dots-flashing:before,.dots-flashing:after{content:\"\";display:inline-block;position:absolute;top:0}.dots-flashing:before{left:-.7em;width:.45em;height:.45em;border-radius:5px;background-color:var(--message-dots-color);color:var(--message-dots-color);animation:dots-flashing 1s infinite alternate;animation-delay:0s}.dots-flashing:after{left:.7em;width:.45em;height:.45em;border-radius:5px;background-color:var(--message-dots-color);color:var(--message-dots-color);animation:dots-flashing 1s infinite alternate;animation-delay:1s}@keyframes dots-flashing{0%{background-color:var(--message-dots-color)}50%,to{background-color:var(--message-dots-color-fade)}}.input-button{border-radius:4px;cursor:pointer;margin-bottom:.2em;-webkit-user-select:none;user-select:none}.input-button-svg{width:1.65em;height:1.65em}.input-button:hover{background-color:#9c9c9c2e}.input-button:active{background-color:#9c9c9c5e}.loading-button{cursor:auto}.loading-button:hover{background-color:unset}.text-button{filter:unset!important;display:flex;justify-content:center;align-items:center;margin-left:4px;margin-right:4px;height:1.6em}#text-input-container{background-color:#fff;width:80%;display:flex;border:1px solid #0000001a;border-radius:5px;margin-top:.8em;margin-bottom:.8em;box-shadow:#959da533 0 1px 12px;overflow-y:auto;max-height:200px;position:relative}.text-input-container-left-adjustment{margin-left:1.5em}.text-input-container-right-adjustment{margin-right:1.5em}.text-input-container-left-small-adjustment{margin-left:1.1em}.text-input-container-left-small-adjustment>.outside-left{right:calc(14px - .55em)}.text-input-container-right-small-adjustment{margin-right:1.1em}.text-input-container-right-small-adjustment>.outside-right{left:calc(14px - .55em)}#text-input{text-align:left;outline:none;word-wrap:break-word;line-break:auto}.text-input-styling{padding:.4em .5em;overflow:overlay;width:100%}.text-input-inner-left-adjustment{padding-left:2.2em}.text-input-inner-right-adjustment{padding-right:2em}.text-input-disabled{pointer-events:none;-webkit-user-select:none;user-select:none}.text-input-placeholder{color:gray}.outside-right>#dropup-menu,.inside-right>#dropup-menu{right:0}#dropup-icon{position:absolute;pointer-events:none;width:1.16em;height:1.2em;left:.265em;bottom:.43em;filter:brightness(0) saturate(100%) invert(54%) sepia(0%) saturate(724%) hue-rotate(6deg) brightness(92%) contrast(90%)}#dropup-menu{background-color:#fff;position:absolute;transform:translateY(-100%);border-radius:5px;z-index:1;top:-.49em;box-shadow:#0003 -1px 2px 10px,#0000001a 0 2px 4px;cursor:pointer;-webkit-user-select:none;user-select:none}.dropup-menu-item{height:1.4em;padding:.28em .84em .28em .35em;display:flex;position:relative}.dropup-menu-item:first-child{padding-top:.49em;border-top-left-radius:inherit;border-top-right-radius:inherit}.dropup-menu-item:last-child{padding-bottom:.45em;border-bottom-left-radius:inherit;border-bottom-right-radius:inherit}.dropup-menu-item-icon{width:1.39em;position:relative;margin-right:.56em}.dropup-menu-item-icon>svg{bottom:0!important;top:0!important;margin-bottom:auto;margin-top:auto}.dropup-menu-item-text{margin-top:.08em;width:max-content}#input{width:100%;display:inline-flex;text-align:center;margin-left:auto;margin-right:auto;margin-top:auto;position:relative;justify-content:center}#chat-view{height:100%;display:grid;grid-template-columns:100%}::-webkit-scrollbar{width:9px;height:9px}::-webkit-scrollbar-thumb{background-color:#d0d0d0;border-radius:5px}::-webkit-scrollbar-track{background-color:#f2f2f2}.deep-chat-web-model-button{margin-top:10px;margin-bottom:5px;margin-left:1px}:host{all:initial;display:table-cell}#container{height:inherit;width:inherit;overflow:hidden}";
13457
13464
  var pa = Object.defineProperty,
13458
13465
  ma = Object.getOwnPropertyDescriptor,
13459
- _ = function _(s, e, t, i) {
13466
+ S = function S(s, e, t, i) {
13460
13467
  for (var n = i > 1 ? void 0 : i ? ma(e, t) : e, r = s.length - 1, o; r >= 0; r--) (o = s[r]) && (n = (i ? o(e, t, n) : o(n)) || n);
13461
13468
  return i && n && pa(e, t, n), n;
13462
13469
  };
13463
- var y = /*#__PURE__*/function (_Xi) {
13464
- function y() {
13470
+ var E = /*#__PURE__*/function (_Xi) {
13471
+ function E() {
13465
13472
  var _this78;
13466
- _classCallCheck(this, y);
13467
- _this78 = _callSuper(this, y), _this78.getMessages = function () {
13473
+ _classCallCheck(this, E);
13474
+ _this78 = _callSuper(this, E), _this78.getMessages = function () {
13468
13475
  return [];
13469
13476
  }, _this78.submitUserMessage = function () {
13470
13477
  return console.warn("submitUserMessage failed - please wait for chat view to render before calling this property.");
@@ -13479,8 +13486,8 @@ var y = /*#__PURE__*/function (_Xi) {
13479
13486
  }, 20);
13480
13487
  return _this78;
13481
13488
  }
13482
- _inherits(y, _Xi);
13483
- return _createClass(y, [{
13489
+ _inherits(E, _Xi);
13490
+ return _createClass(E, [{
13484
13491
  key: "changeToChatView",
13485
13492
  value: function changeToChatView() {
13486
13493
  this._activeService && (this._activeService.validateKeyProperty = !1), this.onRender();
@@ -13490,7 +13497,7 @@ var y = /*#__PURE__*/function (_Xi) {
13490
13497
  key: "onRender",
13491
13498
  value: function onRender() {
13492
13499
  var _this$_childElement;
13493
- Xt.attemptAppendStyleSheetToHead(this.style), ue.processConnect(this), (!this._activeService || this._activeService.demo) && (this._activeService = Mo.create(this)), this.auxiliaryStyle && !this._auxiliaryStyleApplied && (bt.apply(this.auxiliaryStyle, this.shadowRoot), this._auxiliaryStyleApplied = !0), bt.applyDefaultStyleToComponent(this.style, this.chatStyle), ue.checkForContainerStyles(this, this._elementRef), this._activeService.key && this._activeService.validateKeyProperty ? Jt.render(this._elementRef, this.changeToChatView.bind(this), this._activeService) : !(this._activeService instanceof H) || this._activeService.key ? ((_this$_childElement = this._childElement) !== null && _this$_childElement !== void 0 ? _this$_childElement : this._childElement = this.children[0], vn.render(this, this._elementRef, this._activeService, this._childElement)) : this._activeService instanceof H && D.render(this._elementRef, this.changeToChatView.bind(this), this._activeService), this._hasBeenRendered = !0, Qt.onRender(this);
13500
+ Xt.attemptAppendStyleSheetToHead(this.style), ue.processConnect(this), (!this._activeService || this._activeService.demo) && (this._activeService = Mo.create(this)), this.auxiliaryStyle && !this._auxiliaryStyleApplied && (bt.apply(this.auxiliaryStyle, this.shadowRoot), this._auxiliaryStyleApplied = !0), bt.applyDefaultStyleToComponent(this.style, this.chatStyle), ue.checkForContainerStyles(this, this._elementRef), this._activeService.key && this._activeService.validateKeyProperty ? Jt.render(this._elementRef, this.changeToChatView.bind(this), this._activeService) : !(this._activeService instanceof q) || this._activeService.key ? ((_this$_childElement = this._childElement) !== null && _this$_childElement !== void 0 ? _this$_childElement : this._childElement = this.children[0], vn.render(this, this._elementRef, this._activeService, this._childElement)) : this._activeService instanceof q && F.render(this._elementRef, this.changeToChatView.bind(this), this._activeService), this._hasBeenRendered = !0, Qt.onRender(this);
13494
13501
  }
13495
13502
  }, {
13496
13503
  key: "disconnectedCallback",
@@ -13499,43 +13506,43 @@ var y = /*#__PURE__*/function (_Xi) {
13499
13506
  }
13500
13507
  }]);
13501
13508
  }(Xi);
13502
- _([E("object")], y.prototype, "connect", 2);
13503
- _([E("object")], y.prototype, "directConnection", 2);
13504
- _([E("object")], y.prototype, "webModel", 2);
13505
- _([E("object")], y.prototype, "requestBodyLimits", 2);
13506
- _([E("function")], y.prototype, "requestInterceptor", 2);
13507
- _([E("function")], y.prototype, "responseInterceptor", 2);
13508
- _([E("function")], y.prototype, "validateInput", 2);
13509
- _([E("object")], y.prototype, "chatStyle", 2);
13510
- _([E("object")], y.prototype, "attachmentContainerStyle", 2);
13511
- _([E("object")], y.prototype, "dropupStyles", 2);
13512
- _([E("object")], y.prototype, "inputAreaStyle", 2);
13513
- _([E("object")], y.prototype, "textInput", 2);
13514
- _([E("object")], y.prototype, "submitButtonStyles", 2);
13515
- _([E("string")], y.prototype, "auxiliaryStyle", 2);
13516
- _([E("array")], y.prototype, "history", 2);
13517
- _([E("object")], y.prototype, "introMessage", 2);
13518
- _([E("object")], y.prototype, "avatars", 2);
13519
- _([E("object")], y.prototype, "names", 2);
13520
- _([E("boolean")], y.prototype, "displayLoadingBubble", 2);
13521
- _([E("object")], y.prototype, "errorMessages", 2);
13522
- _([E("object")], y.prototype, "messageStyles", 2);
13523
- _([E("object")], y.prototype, "textToSpeech", 2);
13524
- _([E("object")], y.prototype, "speechToText", 2);
13525
- _([E("object")], y.prototype, "images", 2);
13526
- _([E("object")], y.prototype, "gifs", 2);
13527
- _([E("object")], y.prototype, "camera", 2);
13528
- _([E("object")], y.prototype, "audio", 2);
13529
- _([E("object")], y.prototype, "microphone", 2);
13530
- _([E("object")], y.prototype, "mixedFiles", 2);
13531
- _([E("object")], y.prototype, "dragAndDrop", 2);
13532
- _([E("object")], y.prototype, "introPanelStyle", 2);
13533
- _([E("object")], y.prototype, "htmlClassUtilities", 2);
13534
- _([E("function")], y.prototype, "onMessage", 2);
13535
- _([E("function")], y.prototype, "onClearMessages", 2);
13536
- _([E("function")], y.prototype, "onComponentRender", 2);
13537
- _([E("function")], y.prototype, "onError", 2);
13538
- _([E("object")], y.prototype, "demo", 2);
13539
- _([E("object")], y.prototype, "_insertKeyViewStyles", 2);
13540
- customElements.define("deep-chat", y);
13541
- export { y as DeepChat };
13509
+ S([_("object")], E.prototype, "connect", 2);
13510
+ S([_("object")], E.prototype, "directConnection", 2);
13511
+ S([_("object")], E.prototype, "webModel", 2);
13512
+ S([_("object")], E.prototype, "requestBodyLimits", 2);
13513
+ S([_("function")], E.prototype, "requestInterceptor", 2);
13514
+ S([_("function")], E.prototype, "responseInterceptor", 2);
13515
+ S([_("function")], E.prototype, "validateInput", 2);
13516
+ S([_("object")], E.prototype, "chatStyle", 2);
13517
+ S([_("object")], E.prototype, "attachmentContainerStyle", 2);
13518
+ S([_("object")], E.prototype, "dropupStyles", 2);
13519
+ S([_("object")], E.prototype, "inputAreaStyle", 2);
13520
+ S([_("object")], E.prototype, "textInput", 2);
13521
+ S([_("object")], E.prototype, "submitButtonStyles", 2);
13522
+ S([_("string")], E.prototype, "auxiliaryStyle", 2);
13523
+ S([_("array")], E.prototype, "history", 2);
13524
+ S([_("object")], E.prototype, "introMessage", 2);
13525
+ S([_("object")], E.prototype, "avatars", 2);
13526
+ S([_("object")], E.prototype, "names", 2);
13527
+ S([_("boolean")], E.prototype, "displayLoadingBubble", 2);
13528
+ S([_("object")], E.prototype, "errorMessages", 2);
13529
+ S([_("object")], E.prototype, "messageStyles", 2);
13530
+ S([_("object")], E.prototype, "textToSpeech", 2);
13531
+ S([_("object")], E.prototype, "speechToText", 2);
13532
+ S([_("object")], E.prototype, "images", 2);
13533
+ S([_("object")], E.prototype, "gifs", 2);
13534
+ S([_("object")], E.prototype, "camera", 2);
13535
+ S([_("object")], E.prototype, "audio", 2);
13536
+ S([_("object")], E.prototype, "microphone", 2);
13537
+ S([_("object")], E.prototype, "mixedFiles", 2);
13538
+ S([_("object")], E.prototype, "dragAndDrop", 2);
13539
+ S([_("object")], E.prototype, "introPanelStyle", 2);
13540
+ S([_("object")], E.prototype, "htmlClassUtilities", 2);
13541
+ S([_("function")], E.prototype, "onMessage", 2);
13542
+ S([_("function")], E.prototype, "onClearMessages", 2);
13543
+ S([_("function")], E.prototype, "onComponentRender", 2);
13544
+ S([_("function")], E.prototype, "onError", 2);
13545
+ S([_("object")], E.prototype, "demo", 2);
13546
+ S([_("object")], E.prototype, "_insertKeyViewStyles", 2);
13547
+ customElements.define("deep-chat", E);
13548
+ export { E as DeepChat };