deep-chat-dev 9.0.132 → 9.0.133

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
@@ -135,7 +135,7 @@ var C = /*#__PURE__*/function () {
135
135
  }]);
136
136
  return C;
137
137
  }();
138
- var qn = /*#__PURE__*/function () {
138
+ var Un = /*#__PURE__*/function () {
139
139
  function jt() {
140
140
  _classCallCheck(this, jt);
141
141
  }
@@ -168,7 +168,7 @@ var qn = /*#__PURE__*/function () {
168
168
  }]);
169
169
  return jt;
170
170
  }();
171
- qn.DEFAULT_COMPONENT_STYLE = {
171
+ Un.DEFAULT_COMPONENT_STYLE = {
172
172
  height: "350px",
173
173
  width: "320px",
174
174
  border: "1px solid #cacaca",
@@ -182,7 +182,7 @@ qn.DEFAULT_COMPONENT_STYLE = {
182
182
  // this is also causing the chat to squeeze when there is no space
183
183
  overflow: "hidden"
184
184
  };
185
- var wi = qn;
185
+ var wi = Un;
186
186
  var R = /* @__PURE__ */function (s) {
187
187
  return s.ESCAPE = "Escape", s.ENTER = "Enter", s.TAB = "Tab", s.ARROW_UP = "ArrowUp", s.ARROW_DOWN = "ArrowDown", s.ARROW_RIGHT = "ArrowRight", s.ARROW_LEFT = "ArrowLeft", s.BACKSPACE = "Backspace", s.DELETE = "Delete", s.META = "Meta", s.CONTROL = "Control", s;
188
188
  }(R || {});
@@ -468,11 +468,11 @@ var Jn = /*#__PURE__*/function () {
468
468
  }();
469
469
  Jn.LOAD_VOICES_MS = 200;
470
470
  var Ft = Jn;
471
- var Re = /*#__PURE__*/function () {
472
- function Re() {
473
- _classCallCheck(this, Re);
471
+ var Se = /*#__PURE__*/function () {
472
+ function Se() {
473
+ _classCallCheck(this, Se);
474
474
  }
475
- _createClass(Re, null, [{
475
+ _createClass(Se, null, [{
476
476
  key: "checkForContainerStyles",
477
477
  value: function checkForContainerStyles(e, t) {
478
478
  var i = e.containerStyle;
@@ -509,8 +509,14 @@ var Re = /*#__PURE__*/function () {
509
509
  var t;
510
510
  (t = e.children[0]) != null && t.classList.contains("deep-chat-update-message") && (console.error('The "deep-chat-update-message" html class is deprecated since version 1.4.4.'), console.error("Please change to using {..., overwrite: true} object: https://deepchat.dev/docs/connect#Response"));
511
511
  }
512
+ }, {
513
+ key: "checkForStream",
514
+ value: function checkForStream(e) {
515
+ var t = e.stream;
516
+ if (t) return console.error("The stream property has been moved to the request object in version 1.4.12."), console.error("Please see the thew request object: https://deepchat.dev/docs/connect#request"), t;
517
+ }
512
518
  }]);
513
- return Re;
519
+ return Se;
514
520
  }();
515
521
  var ks = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNvLTg4NTktMSI/Pgo8c3ZnIGZpbGw9IiMwMDAwMDAiIHZlcnNpb249IjEuMSIgaWQ9IkxheWVyXzEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIAoJCXZpZXdCb3g9IjAgMCAzMiAzMiIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+Cgk8cGF0aCBkPSJNMjMsMzAuMzZIOWMtMi40MDQsMC00LjM2LTEuOTU2LTQuMzYtNC4zNlYxNWMwLTIuNDA0LDEuOTU2LTQuMzYsNC4zNi00LjM2aDMuNjU5CgkJYzAuMTY3LTEuNTY2LDEuNDE1LTIuODEzLDIuOTgxLTIuOTgxVjUuMzMzYy0xLjEzMS0wLjE3NC0yLTEuMTU0LTItMi4zMzNjMC0xLjMwMSwxLjA1OS0yLjM2LDIuMzYtMi4zNgoJCWMxLjMwMiwwLDIuMzYsMS4wNTksMi4zNiwyLjM2YzAsMS4xNzktMC44NjksMi4xNTktMiwyLjMzM1Y3LjY2YzEuNTY2LDAuMTY3LDIuODE0LDEuNDE1LDIuOTgxLDIuOTgxSDIzCgkJYzIuNDA0LDAsNC4zNiwxLjk1Niw0LjM2LDQuMzZ2MTFDMjcuMzYsMjguNDA0LDI1LjQwNCwzMC4zNiwyMywzMC4zNnogTTksMTEuMzZjLTIuMDA3LDAtMy42NCwxLjYzMy0zLjY0LDMuNjR2MTEKCQljMCwyLjAwNywxLjYzMywzLjY0LDMuNjQsMy42NGgxNGMyLjAwNywwLDMuNjQtMS42MzMsMy42NC0zLjY0VjE1YzAtMi4wMDctMS42MzMtMy42NC0zLjY0LTMuNjRIOXogTTEzLjM4NCwxMC42NGg1LjIzMQoJCUMxOC40MzksOS4zNTQsMTcuMzM0LDguMzYsMTYsOC4zNkMxNC42NjcsOC4zNiwxMy41NjEsOS4zNTQsMTMuMzg0LDEwLjY0eiBNMTYsMS4zNmMtMC45MDQsMC0xLjY0LDAuNzM2LTEuNjQsMS42NAoJCVMxNS4wOTYsNC42NCwxNiw0LjY0YzAuOTA0LDAsMS42NC0wLjczNiwxLjY0LTEuNjRTMTYuOTA0LDEuMzYsMTYsMS4zNnogTTIwLDI3LjM2aC04Yy0xLjMwMSwwLTIuMzYtMS4wNTktMi4zNi0yLjM2CgkJczEuMDU5LTIuMzYsMi4zNi0yLjM2aDhjMS4zMDIsMCwyLjM2LDEuMDU5LDIuMzYsMi4zNlMyMS4zMDIsMjcuMzYsMjAsMjcuMzZ6IE0xMiwyMy4zNmMtMC45MDQsMC0xLjY0LDAuNzM1LTEuNjQsMS42NAoJCXMwLjczNiwxLjY0LDEuNjQsMS42NGg4YzAuOTA0LDAsMS42NC0wLjczNSwxLjY0LTEuNjRzLTAuNzM1LTEuNjQtMS42NC0xLjY0SDEyeiBNMzEsMjMuODZoLTJjLTAuMTk5LDAtMC4zNi0wLjE2MS0wLjM2LTAuMzZWMTUKCQljMC0wLjE5OSwwLjE2MS0wLjM2LDAuMzYtMC4zNmgyYzAuMTk5LDAsMC4zNiwwLjE2MSwwLjM2LDAuMzZ2OC41QzMxLjM2LDIzLjY5OSwzMS4xOTksMjMuODYsMzEsMjMuODZ6IE0yOS4zNiwyMy4xNGgxLjI3OXYtNy43OAoJCUgyOS4zNlYyMy4xNHogTTMsMjMuODZIMWMtMC4xOTksMC0wLjM2LTAuMTYxLTAuMzYtMC4zNlYxNWMwLTAuMTk5LDAuMTYxLTAuMzYsMC4zNi0wLjM2aDJjMC4xOTksMCwwLjM2LDAuMTYxLDAuMzYsMC4zNnY4LjUKCQlDMy4zNiwyMy42OTksMy4xOTksMjMuODYsMywyMy44NnogTTEuMzYsMjMuMTRoMS4yOHYtNy43OEgxLjM2VjIzLjE0eiBNMjAsMjAuMzZjLTEuMzAyLDAtMi4zNi0xLjA1OS0yLjM2LTIuMzYKCQlzMS4wNTktMi4zNiwyLjM2LTIuMzZzMi4zNiwxLjA1OSwyLjM2LDIuMzZDMjIuMzYsMTkuMzAyLDIxLjMwMiwyMC4zNiwyMCwyMC4zNnogTTIwLDE2LjM2Yy0wLjkwNCwwLTEuNjQsMC43MzYtMS42NCwxLjY0CgkJczAuNzM1LDEuNjQsMS42NCwxLjY0czEuNjQtMC43MzUsMS42NC0xLjY0UzIwLjkwNCwxNi4zNiwyMCwxNi4zNnogTTEyLDIwLjM2Yy0xLjMwMSwwLTIuMzYtMS4wNTktMi4zNi0yLjM2czEuMDU5LTIuMzYsMi4zNi0yLjM2CgkJczIuMzYsMS4wNTksMi4zNiwyLjM2QzE0LjM2LDE5LjMwMiwxMy4zMDEsMjAuMzYsMTIsMjAuMzZ6IE0xMiwxNi4zNmMtMC45MDQsMC0xLjY0LDAuNzM2LTEuNjQsMS42NHMwLjczNiwxLjY0LDEuNjQsMS42NAoJCXMxLjY0LTAuNzM1LDEuNjQtMS42NFMxMi45MDQsMTYuMzYsMTIsMTYuMzZ6Ii8+Cgk8cmVjdCBzdHlsZT0iZmlsbDpub25lOyIgd2lkdGg9IjMyIiBoZWlnaHQ9IjMyIi8+Cjwvc3ZnPg==",
516
522
  Is = "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==",
@@ -569,13 +575,13 @@ var ks = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iaXNv
569
575
  Kn.CONTAINER_CLASS = "avatar-container";
570
576
  var cn = Kn;
571
577
  var Yn = /*#__PURE__*/function () {
572
- function Se() {
573
- _classCallCheck(this, Se);
578
+ function we() {
579
+ _classCallCheck(this, we);
574
580
  }
575
- _createClass(Se, null, [{
581
+ _createClass(we, null, [{
576
582
  key: "hide",
577
583
  value: function hide(e) {
578
- e.getElementsByClassName(Se.NAME_CLASS)[0].style.visibility = "hidden";
584
+ e.getElementsByClassName(we.NAME_CLASS)[0].style.visibility = "hidden";
579
585
  }
580
586
  }, {
581
587
  key: "getPosition",
@@ -601,26 +607,26 @@ var Yn = /*#__PURE__*/function () {
601
607
  key: "createName",
602
608
  value: function createName(e, t) {
603
609
  var i = document.createElement("div");
604
- return i.classList.add(Se.NAME_CLASS), i.textContent = Se.getNameText(e, t), Se.applyStyle(i, e, t), i;
610
+ return i.classList.add(we.NAME_CLASS), i.textContent = we.getNameText(e, t), we.applyStyle(i, e, t), i;
605
611
  }
606
612
  }, {
607
613
  key: "add",
608
614
  value: function add(e, t, i) {
609
615
  var n = typeof i == "boolean" ? {} : i,
610
- r = Se.createName(t, n),
611
- o = Se.getPosition(t, n);
616
+ r = we.createName(t, n),
617
+ o = we.getPosition(t, n);
612
618
  r.classList.add(o === "left" ? "left-item-position" : "right-item-position"), e.insertAdjacentElement(o === "left" ? "beforebegin" : "afterend", r);
613
619
  }
614
620
  }]);
615
- return Se;
621
+ return we;
616
622
  }();
617
623
  Yn.NAME_CLASS = "name";
618
624
  var dn = Yn;
619
625
  var ni = /*#__PURE__*/function () {
620
- function we() {
621
- _classCallCheck(this, we);
626
+ function Me() {
627
+ _classCallCheck(this, Me);
622
628
  }
623
- _createClass(we, null, [{
629
+ _createClass(Me, null, [{
624
630
  key: "getLastElementsByClass",
625
631
  value: function getLastElementsByClass(e, t, i) {
626
632
  var _loop = function _loop() {
@@ -661,8 +667,8 @@ var ni = /*#__PURE__*/function () {
661
667
  }, {
662
668
  key: "overwriteMessage",
663
669
  value: function overwriteMessage(e, t, i, n, r, o) {
664
- var a = we.getLastElementsByClass(t, [we.getRoleClass(n), o], ["loading-message-text"]),
665
- l = we.getLastMessage(e, n, r);
670
+ var a = Me.getLastElementsByClass(t, [Me.getRoleClass(n), o], ["loading-message-text"]),
671
+ l = Me.getLastMessage(e, n, r);
666
672
  return l && (l[r] = i), a;
667
673
  }
668
674
  }, {
@@ -674,18 +680,18 @@ var ni = /*#__PURE__*/function () {
674
680
  }, {
675
681
  key: "fillEmptyMessageElement",
676
682
  value: function fillEmptyMessageElement(e, t) {
677
- t.trim().length === 0 && (e.classList.add(we.EMPTY_MESSAGE_CLASS), e.innerHTML = '<div style="color:#00000000">.</div>');
683
+ t.trim().length === 0 && (e.classList.add(Me.EMPTY_MESSAGE_CLASS), e.innerHTML = '<div style="color:#00000000">.</div>');
678
684
  }
679
685
  }, {
680
686
  key: "unfillEmptyMessageElement",
681
687
  value: function unfillEmptyMessageElement(e, t) {
682
- e.classList.contains(we.EMPTY_MESSAGE_CLASS) && t.trim().length > 0 && e.replaceChildren();
688
+ e.classList.contains(Me.EMPTY_MESSAGE_CLASS) && t.trim().length > 0 && e.replaceChildren();
683
689
  }
684
690
  }, {
685
691
  key: "getLastMessageBubbleElement",
686
692
  value: function getLastMessageBubbleElement(e) {
687
693
  var t, i, n;
688
- return Array.from(((n = (i = (t = we.getLastMessageElement(e)) == null ? void 0 : t.children) == null ? void 0 : i[0]) == null ? void 0 : n.children) || []).find(function (r) {
694
+ return Array.from(((n = (i = (t = Me.getLastMessageElement(e)) == null ? void 0 : t.children) == null ? void 0 : i[0]) == null ? void 0 : n.children) || []).find(function (r) {
689
695
  return r.classList.contains("message-bubble");
690
696
  });
691
697
  }
@@ -706,17 +712,17 @@ var ni = /*#__PURE__*/function () {
706
712
  t && cn.hide(n), i && dn.hide(n);
707
713
  }
708
714
  }]);
709
- return we;
715
+ return Me;
710
716
  }();
711
717
  ni.AI_ROLE = "ai";
712
718
  ni.USER_ROLE = "user";
713
719
  ni.EMPTY_MESSAGE_CLASS = "empty-message";
714
720
  var b = ni;
715
- var Ie = /*#__PURE__*/function () {
716
- function Ie() {
717
- _classCallCheck(this, Ie);
721
+ var Le = /*#__PURE__*/function () {
722
+ function Le() {
723
+ _classCallCheck(this, Le);
718
724
  }
719
- _createClass(Ie, null, [{
725
+ _createClass(Le, null, [{
720
726
  key: "mouseUp",
721
727
  value: function mouseUp(e, t) {
722
728
  C.unsetAllCSSMouseStates(e, t), Object.assign(e.style, t["default"]), Object.assign(e.style, t.hover);
@@ -739,10 +745,10 @@ var Ie = /*#__PURE__*/function () {
739
745
  }, {
740
746
  key: "add",
741
747
  value: function add(e, t) {
742
- e.addEventListener("mouseenter", Ie.mouseEnter.bind(this, e, t)), e.addEventListener("mouseleave", Ie.mouseLeave.bind(this, e, t)), e.addEventListener("mousedown", Ie.mouseDown.bind(this, e, t)), e.addEventListener("mouseup", Ie.mouseUp.bind(this, e, t));
748
+ e.addEventListener("mouseenter", Le.mouseEnter.bind(this, e, t)), e.addEventListener("mouseleave", Le.mouseLeave.bind(this, e, t)), e.addEventListener("mousedown", Le.mouseDown.bind(this, e, t)), e.addEventListener("mouseup", Le.mouseUp.bind(this, e, t));
743
749
  }
744
750
  }]);
745
- return Ie;
751
+ return Le;
746
752
  }();
747
753
  var Ls = "deep-chat-temporary-message",
748
754
  Rs = "deep-chat-suggestion-button",
@@ -847,7 +853,7 @@ var le = /*#__PURE__*/function () {
847
853
  key: "applyStylesToElement",
848
854
  value: function applyStylesToElement(e, t) {
849
855
  var i = C.processStateful(t, {}, {});
850
- Ie.add(e, i), Object.assign(e.style, i["default"]);
856
+ Le.add(e, i), Object.assign(e.style, i["default"]);
851
857
  }
852
858
  }, {
853
859
  key: "applyEventsToElement",
@@ -902,7 +908,7 @@ var Qe = /*#__PURE__*/function () {
902
908
  value: function overwrite(e, t, i, n) {
903
909
  var r = e.messages,
904
910
  o = b.overwriteMessage(r, n, t, i, "html", "html-message");
905
- return o && (o.bubbleElement.innerHTML = t, le.apply(e, o.outerContainer), Re.flagHTMLUpdateClass(o.bubbleElement)), o;
911
+ return o && (o.bubbleElement.innerHTML = t, le.apply(e, o.outerContainer), Se.flagHTMLUpdateClass(o.bubbleElement)), o;
906
912
  }
907
913
  // prettier-ignore
908
914
  }, {
@@ -915,7 +921,7 @@ var Qe = /*#__PURE__*/function () {
915
921
  r.status = !1;
916
922
  }
917
923
  var o = Qe.createElements(e, t, i);
918
- return b.fillEmptyMessageElement(o.bubbleElement, t), le.apply(e, o.outerContainer), Re.flagHTMLUpdateClass(o.bubbleElement), e.applyCustomStyles(o, i, !1, (a = e.messageStyles) == null ? void 0 : a.html), Qe.addElement(e, o.outerContainer), o;
924
+ return b.fillEmptyMessageElement(o.bubbleElement, t), le.apply(e, o.outerContainer), Se.flagHTMLUpdateClass(o.bubbleElement), e.applyCustomStyles(o, i, !1, (a = e.messageStyles) == null ? void 0 : a.html), Qe.addElement(e, o.outerContainer), o;
919
925
  }
920
926
  }]);
921
927
  return Qe;
@@ -967,17 +973,17 @@ function Ne(s) {
967
973
  }
968
974
  var Bs = /[&<>"]/,
969
975
  zs = /[&<>"]/g,
970
- Us = {
976
+ qs = {
971
977
  "&": "&amp;",
972
978
  "<": "&lt;",
973
979
  ">": "&gt;",
974
980
  '"': "&quot;"
975
981
  };
976
- function qs(s) {
977
- return Us[s];
982
+ function Us(s) {
983
+ return qs[s];
978
984
  }
979
- function U(s) {
980
- return Bs.test(s) ? s.replace(zs, qs) : s;
985
+ function q(s) {
986
+ return Bs.test(s) ? s.replace(zs, Us) : s;
981
987
  }
982
988
  var g = {};
983
989
  g.blockquote_open = function () {
@@ -987,7 +993,7 @@ g.blockquote_close = function (s, e) {
987
993
  return "</blockquote>" + De(s, e);
988
994
  };
989
995
  g.code = function (s, e) {
990
- return s[e].block ? "<pre><code>" + U(s[e].content) + "</code></pre>" + De(s, e) : "<code>" + U(s[e].content) + "</code>";
996
+ return s[e].block ? "<pre><code>" + q(s[e].content) + "</code></pre>" + De(s, e) : "<code>" + q(s[e].content) + "</code>";
991
997
  };
992
998
  g.fence = function (s, e, t, i, n) {
993
999
  var r = s[e],
@@ -999,9 +1005,9 @@ g.fence = function (s, e, t, i, n) {
999
1005
  u;
1000
1006
  if (r.params) {
1001
1007
  if (c = r.params.split(/\s+/g), d = c.join(" "), Os(n.rules.fence_custom, c[0])) return n.rules.fence_custom[c[0]](s, e, t, i, n);
1002
- l = U(Ne(gt(d))), o = ' class="' + a + l + '"';
1008
+ l = q(Ne(gt(d))), o = ' class="' + a + l + '"';
1003
1009
  }
1004
- return t.highlight ? u = t.highlight.apply(t.highlight, [r.content].concat(c)) || U(r.content) : u = U(r.content), "<pre><code" + o + ">" + u + "</code></pre>" + De(s, e);
1010
+ return t.highlight ? u = t.highlight.apply(t.highlight, [r.content].concat(c)) || q(r.content) : u = q(r.content), "<pre><code" + o + ">" + u + "</code></pre>" + De(s, e);
1005
1011
  };
1006
1012
  g.fence_custom = {};
1007
1013
  g.heading_open = function (s, e) {
@@ -1041,17 +1047,17 @@ g.paragraph_close = function (s, e) {
1041
1047
  return (s[e].tight ? "" : "</p>") + (t ? De(s, e) : "");
1042
1048
  };
1043
1049
  g.link_open = function (s, e, t) {
1044
- var i = s[e].title ? ' title="' + U(Ne(s[e].title)) + '"' : "",
1050
+ var i = s[e].title ? ' title="' + q(Ne(s[e].title)) + '"' : "",
1045
1051
  n = t.linkTarget ? ' target="' + t.linkTarget + '"' : "";
1046
- return '<a href="' + U(s[e].href) + '"' + i + n + ">";
1052
+ return '<a href="' + q(s[e].href) + '"' + i + n + ">";
1047
1053
  };
1048
1054
  g.link_close = function () {
1049
1055
  return "</a>";
1050
1056
  };
1051
1057
  g.image = function (s, e, t) {
1052
- var i = ' src="' + U(s[e].src) + '"',
1053
- n = s[e].title ? ' title="' + U(Ne(s[e].title)) + '"' : "",
1054
- r = ' alt="' + (s[e].alt ? U(Ne(gt(s[e].alt))) : "") + '"',
1058
+ var i = ' src="' + q(s[e].src) + '"',
1059
+ n = s[e].title ? ' title="' + q(Ne(s[e].title)) + '"' : "",
1060
+ r = ' alt="' + (s[e].alt ? q(Ne(gt(s[e].alt))) : "") + '"',
1055
1061
  o = t.xhtmlOut ? " /" : "";
1056
1062
  return "<img" + i + r + n + o + ">";
1057
1063
  };
@@ -1124,10 +1130,10 @@ g.mark_close = function () {
1124
1130
  return "</mark>";
1125
1131
  };
1126
1132
  g.sub = function (s, e) {
1127
- return "<sub>" + U(s[e].content) + "</sub>";
1133
+ return "<sub>" + q(s[e].content) + "</sub>";
1128
1134
  };
1129
1135
  g.sup = function (s, e) {
1130
- return "<sup>" + U(s[e].content) + "</sup>";
1136
+ return "<sup>" + q(s[e].content) + "</sup>";
1131
1137
  };
1132
1138
  g.hardbreak = function (s, e, t) {
1133
1139
  return t.xhtmlOut ? "<br />\n" : "<br>\n";
@@ -1136,7 +1142,7 @@ g.softbreak = function (s, e, t) {
1136
1142
  return t.breaks ? t.xhtmlOut ? "<br />\n" : "<br>\n" : "\n";
1137
1143
  };
1138
1144
  g.text = function (s, e) {
1139
- return U(s[e].content);
1145
+ return q(s[e].content);
1140
1146
  };
1141
1147
  g.htmlblock = function (s, e) {
1142
1148
  return s[e].content;
@@ -1145,7 +1151,7 @@ g.htmltag = function (s, e) {
1145
1151
  return s[e].content;
1146
1152
  };
1147
1153
  g.abbr_open = function (s, e) {
1148
- return '<abbr title="' + U(Ne(s[e].title)) + '">';
1154
+ return '<abbr title="' + q(Ne(s[e].title)) + '">';
1149
1155
  };
1150
1156
  g.abbr_close = function () {
1151
1157
  return "</abbr>";
@@ -1572,11 +1578,11 @@ function He(s, e, t) {
1572
1578
  return s.substr(0, e) + t + s.substr(e + 1);
1573
1579
  }
1574
1580
  function sr(s) {
1575
- var e, t, i, n, r, o, a, l, c, d, u, h, f, m, p, _, S;
1581
+ var e, t, i, n, r, o, a, l, c, d, u, h, f, m, p, x, S;
1576
1582
  if (s.options.typographer) {
1577
1583
  for (S = [], p = s.tokens.length - 1; p >= 0; p--) if (s.tokens[p].type === "inline") {
1578
- for (_ = s.tokens[p].children, S.length = 0, e = 0; e < _.length; e++) if (t = _[e], !(t.type !== "text" || ir.test(t.text))) {
1579
- for (a = _[e].level, f = S.length - 1; f >= 0 && !(S[f].level <= a); f--);
1584
+ for (x = s.tokens[p].children, S.length = 0, e = 0; e < x.length; e++) if (t = x[e], !(t.type !== "text" || ir.test(t.text))) {
1585
+ for (a = x[e].level, f = S.length - 1; f >= 0 && !(S[f].level <= a); f--);
1580
1586
  S.length = f + 1, i = t.content, r = 0, o = i.length;
1581
1587
  e: for (; r < o && (fn.lastIndex = r, n = fn.exec(i), !!n);) {
1582
1588
  if (l = !mn(i, n.index - 1), r = n.index + 1, m = n[0] === "'", c = !mn(i, r), !c && !l) {
@@ -1585,7 +1591,7 @@ function sr(s) {
1585
1591
  }
1586
1592
  if (u = !c, h = !l, h) {
1587
1593
  for (f = S.length - 1; f >= 0 && (d = S[f], !(S[f].level < a)); f--) if (d.single === m && S[f].level === a) {
1588
- d = S[f], m ? (_[d.token].content = He(_[d.token].content, d.pos, s.options.quotes[2]), t.content = He(t.content, n.index, s.options.quotes[3])) : (_[d.token].content = He(_[d.token].content, d.pos, s.options.quotes[0]), t.content = He(t.content, n.index, s.options.quotes[1])), S.length = f;
1594
+ d = S[f], m ? (x[d.token].content = He(x[d.token].content, d.pos, s.options.quotes[2]), t.content = He(t.content, n.index, s.options.quotes[3])) : (x[d.token].content = He(x[d.token].content, d.pos, s.options.quotes[0]), t.content = He(t.content, n.index, s.options.quotes[1])), S.length = f;
1589
1595
  continue e;
1590
1596
  }
1591
1597
  }
@@ -1710,12 +1716,12 @@ function ar(s, e, t, i) {
1710
1716
  f,
1711
1717
  m,
1712
1718
  p = s.bMarks[e] + s.tShift[e],
1713
- _ = s.eMarks[e];
1714
- if (p > _ || s.src.charCodeAt(p++) !== 62 || s.level >= s.options.maxNesting) return !1;
1719
+ x = s.eMarks[e];
1720
+ if (p > x || s.src.charCodeAt(p++) !== 62 || s.level >= s.options.maxNesting) return !1;
1715
1721
  if (i) return !0;
1716
- for (s.src.charCodeAt(p) === 32 && p++, l = s.blkIndent, s.blkIndent = 0, a = [s.bMarks[e]], s.bMarks[e] = p, p = p < _ ? s.skipSpaces(p) : p, r = p >= _, o = [s.tShift[e]], s.tShift[e] = p - s.bMarks[e], u = s.parser.ruler.getRules("blockquote"), n = e + 1; n < t && (p = s.bMarks[n] + s.tShift[n], _ = s.eMarks[n], !(p >= _)); n++) {
1722
+ 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], u = s.parser.ruler.getRules("blockquote"), n = e + 1; n < t && (p = s.bMarks[n] + s.tShift[n], x = s.eMarks[n], !(p >= x)); n++) {
1717
1723
  if (s.src.charCodeAt(p++) === 62) {
1718
- s.src.charCodeAt(p) === 32 && p++, a.push(s.bMarks[n]), s.bMarks[n] = p, p = p < _ ? s.skipSpaces(p) : p, r = p >= _, o.push(s.tShift[n]), s.tShift[n] = p - s.bMarks[n];
1724
+ 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];
1719
1725
  continue;
1720
1726
  }
1721
1727
  if (r) break;
@@ -1790,7 +1796,7 @@ function dr(s, e, t, i) {
1790
1796
  f,
1791
1797
  m,
1792
1798
  p,
1793
- _,
1799
+ x,
1794
1800
  S,
1795
1801
  J,
1796
1802
  X,
@@ -1801,10 +1807,10 @@ function dr(s, e, t, i) {
1801
1807
  I,
1802
1808
  Rt,
1803
1809
  te;
1804
- if ((u = bn(s, e)) >= 0) _ = !0;else if ((u = gn(s, e)) >= 0) _ = !1;else return !1;
1810
+ if ((u = bn(s, e)) >= 0) x = !0;else if ((u = gn(s, e)) >= 0) x = !1;else return !1;
1805
1811
  if (s.level >= s.options.maxNesting) return !1;
1806
1812
  if (p = s.src.charCodeAt(u - 1), i) return !0;
1807
- for (J = s.tokens.length, _ ? (d = s.bMarks[e] + s.tShift[e], m = Number(s.src.substr(d, u - d - 1)), s.tokens.push({
1813
+ for (J = s.tokens.length, x ? (d = s.bMarks[e] + s.tShift[e], m = Number(s.src.substr(d, u - d - 1)), s.tokens.push({
1808
1814
  type: "ordered_list_open",
1809
1815
  order: m,
1810
1816
  lines: O = [e, 0],
@@ -1826,13 +1832,13 @@ function dr(s, e, t, i) {
1826
1832
  break;
1827
1833
  }
1828
1834
  if (te) break;
1829
- if (_) {
1835
+ if (x) {
1830
1836
  if (u = bn(s, n), u < 0) break;
1831
1837
  } else if (u = gn(s, n), u < 0) break;
1832
1838
  if (p !== s.src.charCodeAt(u - 1)) break;
1833
1839
  }
1834
1840
  return s.tokens.push({
1835
- type: _ ? "ordered_list_close" : "bullet_list_close",
1841
+ type: x ? "ordered_list_close" : "bullet_list_close",
1836
1842
  level: --s.level
1837
1843
  }), O[1] = n, s.line = n, Q && cr(s, J), !0;
1838
1844
  }
@@ -2039,7 +2045,7 @@ function yr(s, e) {
2039
2045
  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);
2040
2046
  }
2041
2047
  function xr(s, e, t, i) {
2042
- var n, r, o, a, l, c, d, u, h, f, m, p, _, S;
2048
+ var n, r, o, a, l, c, d, u, h, f, m, p, x, S;
2043
2049
  if (i) return s.ddIndent < 0 ? !1 : Ot(s, e) >= 0;
2044
2050
  if (d = e + 1, s.isEmpty(d) && ++d > t || s.tShift[d] < s.blkIndent || (n = Ot(s, d), n < 0) || s.level >= s.options.maxNesting) return !1;
2045
2051
  c = s.tokens.length, s.tokens.push({
@@ -2048,7 +2054,7 @@ function xr(s, e, t, i) {
2048
2054
  level: s.level++
2049
2055
  }), o = e, r = d;
2050
2056
  e: for (;;) {
2051
- for (S = !0, _ = !1, s.tokens.push({
2057
+ for (S = !0, x = !1, s.tokens.push({
2052
2058
  type: "dt_open",
2053
2059
  lines: [o, o],
2054
2060
  level: s.level++
@@ -2066,7 +2072,7 @@ function xr(s, e, t, i) {
2066
2072
  type: "dd_open",
2067
2073
  lines: a = [d, 0],
2068
2074
  level: s.level++
2069
- }), p = s.tight, h = s.ddIndent, u = 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 || _) && (S = !1), _ = s.line - r > 1 && s.isEmpty(s.line - 1), s.tShift[r] = m, s.tight = p, s.parentType = f, s.blkIndent = u, s.ddIndent = h, s.tokens.push({
2075
+ }), p = s.tight, h = s.ddIndent, u = 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 = u, s.ddIndent = h, s.tokens.push({
2070
2076
  type: "dd_close",
2071
2077
  level: --s.level
2072
2078
  }), a[1] = d = s.line, d >= t || s.tShift[d] < s.blkIndent) break e;
@@ -2513,8 +2519,8 @@ function zr(s, e) {
2513
2519
  level: s.level
2514
2520
  })), s.pos = i, s.posMax = o, !0);
2515
2521
  }
2516
- var Ur = ["coap", "doi", "javascript", "aaa", "aaas", "about", "acap", "cap", "cid", "crid", "data", "dav", "dict", "dns", "file", "ftp", "geo", "go", "gopher", "h323", "http", "https", "iax", "icap", "im", "imap", "info", "ipp", "iris", "iris.beep", "iris.xpc", "iris.xpcs", "iris.lwz", "ldap", "mailto", "mid", "msrp", "msrps", "mtqp", "mupdate", "news", "nfs", "ni", "nih", "nntp", "opaquelocktoken", "pop", "pres", "rtsp", "service", "session", "shttp", "sieve", "sip", "sips", "sms", "snmp", "soap.beep", "soap.beeps", "tag", "tel", "telnet", "tftp", "thismessage", "tn3270", "tip", "tv", "urn", "vemmi", "ws", "wss", "xcon", "xcon-userid", "xmlrpc.beep", "xmlrpc.beeps", "xmpp", "z39.50r", "z39.50s", "adiumxtra", "afp", "afs", "aim", "apt", "attachment", "aw", "beshare", "bitcoin", "bolo", "callto", "chrome", "chrome-extension", "com-eventbrite-attendee", "content", "cvs", "dlna-playsingle", "dlna-playcontainer", "dtn", "dvb", "ed2k", "facetime", "feed", "finger", "fish", "gg", "git", "gizmoproject", "gtalk", "hcp", "icon", "ipn", "irc", "irc6", "ircs", "itms", "jar", "jms", "keyparc", "lastfm", "ldaps", "magnet", "maps", "market", "message", "mms", "ms-help", "msnim", "mumble", "mvn", "notes", "oid", "palm", "paparazzi", "platform", "proxy", "psyc", "query", "res", "resource", "rmi", "rsync", "rtmp", "secondlife", "sftp", "sgn", "skype", "smb", "soldat", "spotify", "ssh", "steam", "svn", "teamspeak", "things", "udp", "unreal", "ut2004", "ventrilo", "view-source", "webcal", "wtai", "wyciwyg", "xfire", "xri", "ymsgr"],
2517
- qr = /^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,
2522
+ var qr = ["coap", "doi", "javascript", "aaa", "aaas", "about", "acap", "cap", "cid", "crid", "data", "dav", "dict", "dns", "file", "ftp", "geo", "go", "gopher", "h323", "http", "https", "iax", "icap", "im", "imap", "info", "ipp", "iris", "iris.beep", "iris.xpc", "iris.xpcs", "iris.lwz", "ldap", "mailto", "mid", "msrp", "msrps", "mtqp", "mupdate", "news", "nfs", "ni", "nih", "nntp", "opaquelocktoken", "pop", "pres", "rtsp", "service", "session", "shttp", "sieve", "sip", "sips", "sms", "snmp", "soap.beep", "soap.beeps", "tag", "tel", "telnet", "tftp", "thismessage", "tn3270", "tip", "tv", "urn", "vemmi", "ws", "wss", "xcon", "xcon-userid", "xmlrpc.beep", "xmlrpc.beeps", "xmpp", "z39.50r", "z39.50s", "adiumxtra", "afp", "afs", "aim", "apt", "attachment", "aw", "beshare", "bitcoin", "bolo", "callto", "chrome", "chrome-extension", "com-eventbrite-attendee", "content", "cvs", "dlna-playsingle", "dlna-playcontainer", "dtn", "dvb", "ed2k", "facetime", "feed", "finger", "fish", "gg", "git", "gizmoproject", "gtalk", "hcp", "icon", "ipn", "irc", "irc6", "ircs", "itms", "jar", "jms", "keyparc", "lastfm", "ldaps", "magnet", "maps", "market", "message", "mms", "ms-help", "msnim", "mumble", "mvn", "notes", "oid", "palm", "paparazzi", "platform", "proxy", "psyc", "query", "res", "resource", "rmi", "rsync", "rtmp", "secondlife", "sftp", "sgn", "skype", "smb", "soldat", "spotify", "ssh", "steam", "svn", "teamspeak", "things", "udp", "unreal", "ut2004", "ventrilo", "view-source", "webcal", "wtai", "wyciwyg", "xfire", "xri", "ymsgr"],
2523
+ Ur = /^<([a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/,
2518
2524
  Hr = /^<([a-zA-Z.\-]{1,25}):([^<>\x00-\x20]*)>/;
2519
2525
  function Gr(s, e) {
2520
2526
  var t,
@@ -2523,7 +2529,7 @@ function Gr(s, e) {
2523
2529
  r,
2524
2530
  o,
2525
2531
  a = s.pos;
2526
- return s.src.charCodeAt(a) !== 60 || (t = s.src.slice(a), t.indexOf(">") < 0) ? !1 : (i = t.match(Hr), i ? Ur.indexOf(i[1].toLowerCase()) < 0 || (r = i[0].slice(1, -1), o = ji(r), !s.parser.validateLink(r)) ? !1 : (e || (s.push({
2532
+ return s.src.charCodeAt(a) !== 60 || (t = s.src.slice(a), t.indexOf(">") < 0) ? !1 : (i = t.match(Hr), i ? qr.indexOf(i[1].toLowerCase()) < 0 || (r = i[0].slice(1, -1), o = ji(r), !s.parser.validateLink(r)) ? !1 : (e || (s.push({
2527
2533
  type: "link_open",
2528
2534
  href: o,
2529
2535
  level: s.level
@@ -2534,7 +2540,7 @@ function Gr(s, e) {
2534
2540
  }), s.push({
2535
2541
  type: "link_close",
2536
2542
  level: s.level
2537
- })), s.pos += i[0].length, !0) : (n = t.match(qr), n ? (r = n[0].slice(1, -1), o = ji("mailto:" + r), s.parser.validateLink(o) ? (e || (s.push({
2543
+ })), s.pos += i[0].length, !0) : (n = t.match(Ur), n ? (r = n[0].slice(1, -1), o = ji("mailto:" + r), s.parser.validateLink(o) ? (e || (s.push({
2538
2544
  type: "link_open",
2539
2545
  href: o,
2540
2546
  level: s.level
@@ -3465,7 +3471,7 @@ function Eo(s, e) {
3465
3471
  m.abort(), document.hidden || H();
3466
3472
  }
3467
3473
  l || document.addEventListener("visibilitychange", p);
3468
- var _ = xo,
3474
+ var x = xo,
3469
3475
  S = 0;
3470
3476
  function J() {
3471
3477
  document.removeEventListener("visibilitychange", p), window.clearTimeout(S), m.abort();
@@ -3500,7 +3506,7 @@ function Eo(s, e) {
3500
3506
  return mo(ee.body, go(bo(function (I) {
3501
3507
  I ? f[_n] = I : delete f[_n];
3502
3508
  }, function (I) {
3503
- _ = I;
3509
+ x = I;
3504
3510
  }, r)));
3505
3511
  case 9:
3506
3512
  o == null || o();
@@ -3512,7 +3518,7 @@ function Eo(s, e) {
3512
3518
  _context3.prev = 14;
3513
3519
  _context3.t0 = _context3["catch"](1);
3514
3520
  if (!m.signal.aborted) try {
3515
- I = (Q = a == null ? void 0 : a(_context3.t0)) !== null && Q !== void 0 ? Q : _;
3521
+ I = (Q = a == null ? void 0 : a(_context3.t0)) !== null && Q !== void 0 ? Q : x;
3516
3522
  window.clearTimeout(S), S = window.setTimeout(H, I);
3517
3523
  } catch (I) {
3518
3524
  J(), h(I);
@@ -3544,7 +3550,7 @@ var T = /*#__PURE__*/function () {
3544
3550
  var n,
3545
3551
  m,
3546
3552
  p,
3547
- _,
3553
+ x,
3548
3554
  S,
3549
3555
  J,
3550
3556
  X,
@@ -3591,7 +3597,7 @@ var T = /*#__PURE__*/function () {
3591
3597
  }
3592
3598
  return _context6.abrupt("return", he.stream(e, o, i));
3593
3599
  case 16:
3594
- if (!(((_ = e.requestSettings) == null ? void 0 : _.url) === Ee.URL)) {
3600
+ if (!(((x = e.requestSettings) == null ? void 0 : x.url) === Ee.URL)) {
3595
3601
  _context6.next = 18;
3596
3602
  break;
3597
3603
  }
@@ -3803,7 +3809,7 @@ var cs = /*#__PURE__*/function () {
3803
3809
  _context7.t0 = i;
3804
3810
  case 5:
3805
3811
  n = _context7.t0;
3806
- n.error ? (t.addNewErrorMessage("service", n.error), e.completionsHandlers.onFinish()) : T.isSimulatable(e.deepChat.stream, n) ? T.simulate(t, e.streamHandlers, n) : (t.addNewMessage(n), e.completionsHandlers.onFinish());
3812
+ n.error ? (t.addNewErrorMessage("service", n.error), e.completionsHandlers.onFinish()) : T.isSimulatable(e.stream, n) ? T.simulate(t, e.streamHandlers, n) : (t.addNewMessage(n), e.completionsHandlers.onFinish());
3807
3813
  case 7:
3808
3814
  case "end":
3809
3815
  return _context7.stop();
@@ -3901,7 +3907,7 @@ var B = /*#__PURE__*/function () {
3901
3907
  }
3902
3908
  throw Error(A.INVALID_RESPONSE(l, "server", !!e.deepChat.responseInterceptor, c));
3903
3909
  case 14:
3904
- if (T.isSimulation(e.deepChat.stream)) {
3910
+ if (T.isSimulation(e.stream)) {
3905
3911
  u = B.stream.bind(_this6, e, i, n), h = n[l.role || b.AI_ROLE];
3906
3912
  T.upsertWFiles(i, u, h, d);
3907
3913
  } else i.addNewMessage(d);
@@ -3921,7 +3927,7 @@ var B = /*#__PURE__*/function () {
3921
3927
  return _ref2.apply(this, arguments);
3922
3928
  };
3923
3929
  }(), t.onclose = function () {
3924
- console.error("Connection closed"), i.isLastMessageError() || i.addNewErrorMessage("service", "Connection error"), e.deepChat.stream && e.streamHandlers.abortStream.abort(), B.createConnection(e, i);
3930
+ console.error("Connection closed"), i.isLastMessageError() || i.addNewErrorMessage("service", "Connection error"), e.stream && e.streamHandlers.abortStream.abort(), B.createConnection(e, i);
3925
3931
  };
3926
3932
  }
3927
3933
  }, {
@@ -4005,7 +4011,7 @@ var B = /*#__PURE__*/function () {
4005
4011
  key: "stream",
4006
4012
  value: function stream(e, t, i, n) {
4007
4013
  if (!n) return;
4008
- var r = e.deepChat.stream.simulation;
4014
+ var r = e.stream.simulation;
4009
4015
  if (typeof r == "string") {
4010
4016
  var _i$o;
4011
4017
  var o = n.role || b.AI_ROLE,
@@ -4053,7 +4059,7 @@ var he = /*#__PURE__*/function () {
4053
4059
  _context10.t0 = c;
4054
4060
  case 8:
4055
4061
  d = _context10.t0;
4056
- v.validateResponseFormat(d) ? typeof d.error == "string" ? (console.error(d.error), i.addNewErrorMessage("service", d.error), e.completionsHandlers.onFinish()) : T.isSimulatable(e.deepChat.stream, d) ? T.simulate(i, e.streamHandlers, d) : (i.addNewMessage(d), e.completionsHandlers.onFinish()) : (console.error(A.INVALID_RESPONSE(c, "server", !!e.deepChat.responseInterceptor, d)), i.addNewErrorMessage("service", "Error in server message"), e.completionsHandlers.onFinish());
4062
+ v.validateResponseFormat(d) ? typeof d.error == "string" ? (console.error(d.error), i.addNewErrorMessage("service", d.error), e.completionsHandlers.onFinish()) : T.isSimulatable(e.stream, d) ? T.simulate(i, e.streamHandlers, d) : (i.addNewMessage(d), e.completionsHandlers.onFinish()) : (console.error(A.INVALID_RESPONSE(c, "server", !!e.deepChat.responseInterceptor, d)), i.addNewErrorMessage("service", "Error in server message"), e.completionsHandlers.onFinish());
4057
4063
  case 10:
4058
4064
  case "end":
4059
4065
  return _context10.stop();
@@ -4103,7 +4109,7 @@ var he = /*#__PURE__*/function () {
4103
4109
  },
4104
4110
  c = /*#__PURE__*/function () {
4105
4111
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee12(f) {
4106
- var p, _, m;
4112
+ var p, x, m;
4107
4113
  return _regeneratorRuntime().wrap(function _callee12$(_context12) {
4108
4114
  while (1) switch (_context12.prev = _context12.next) {
4109
4115
  case 0:
@@ -4114,7 +4120,7 @@ var he = /*#__PURE__*/function () {
4114
4120
  return _context12.abrupt("return");
4115
4121
  case 2:
4116
4122
  _context12.next = 4;
4117
- return (_ = (p = e.deepChat).responseInterceptor) == null ? void 0 : _.call(p, f);
4123
+ return (x = (p = e.deepChat).responseInterceptor) == null ? void 0 : x.call(p, f);
4118
4124
  case 4:
4119
4125
  _context12.t0 = _context12.sent;
4120
4126
  if (_context12.t0) {
@@ -4189,7 +4195,7 @@ var he = /*#__PURE__*/function () {
4189
4195
  _context13.t0 = d;
4190
4196
  case 7:
4191
4197
  u = _context13.t0;
4192
- if (!v.validateResponseFormat(u)) console.error(A.INVALID_RESPONSE(d, "server", !!e.deepChat.responseInterceptor, u)), t.addNewErrorMessage("service", "Error in server message");else if (typeof u.error == "string") console.error(u.error), t.isLastMessageError() || t.addNewErrorMessage("service", u.error);else if (T.isSimulation(e.deepChat.stream)) {
4198
+ if (!v.validateResponseFormat(u)) console.error(A.INVALID_RESPONSE(d, "server", !!e.deepChat.responseInterceptor, u)), t.addNewErrorMessage("service", "Error in server message");else if (typeof u.error == "string") console.error(u.error), t.isLastMessageError() || t.addNewErrorMessage("service", u.error);else if (T.isSimulation(e.stream)) {
4193
4199
  m = B.stream.bind(_this7, e, t, i.roleToStream), p = i.roleToStream[d.role || b.AI_ROLE];
4194
4200
  T.upsertWFiles(t, m, p, d);
4195
4201
  } else t.addNewMessage(u);
@@ -4292,7 +4298,7 @@ var w = /*#__PURE__*/function () {
4292
4298
  return v.processResponseByType(p);
4293
4299
  }).then( /*#__PURE__*/function () {
4294
4300
  var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee14(p) {
4295
- var J, X, _, S;
4301
+ var J, X, x, S;
4296
4302
  return _regeneratorRuntime().wrap(function _callee14$(_context14) {
4297
4303
  while (1) switch (_context14.prev = _context14.next) {
4298
4304
  case 0:
@@ -4312,9 +4318,9 @@ var w = /*#__PURE__*/function () {
4312
4318
  }
4313
4319
  _context14.t0 = p;
4314
4320
  case 7:
4315
- _ = _context14.t0;
4321
+ x = _context14.t0;
4316
4322
  _context14.next = 10;
4317
- return e.extractResultData(_, u, o);
4323
+ return e.extractResultData(x, u, o);
4318
4324
  case 10:
4319
4325
  S = _context14.sent;
4320
4326
  if (d) {
@@ -4327,9 +4333,9 @@ var w = /*#__PURE__*/function () {
4327
4333
  _context14.next = 15;
4328
4334
  break;
4329
4335
  }
4330
- throw Error(A.INVALID_RESPONSE(p, "response", !!e.deepChat.responseInterceptor, _));
4336
+ throw Error(A.INVALID_RESPONSE(p, "response", !!e.deepChat.responseInterceptor, x));
4331
4337
  case 15:
4332
- S.makingAnotherRequest || (T.isSimulatable(e.deepChat.stream, S) ? T.simulate(i, e.streamHandlers, S) : (i.addNewMessage(S), c()));
4338
+ S.makingAnotherRequest || (T.isSimulatable(e.stream, S) ? T.simulate(i, e.streamHandlers, S) : (i.addNewMessage(S), c()));
4333
4339
  case 16:
4334
4340
  case "end":
4335
4341
  return _context14.stop();
@@ -4389,7 +4395,7 @@ var w = /*#__PURE__*/function () {
4389
4395
  a = _context16.sent;
4390
4396
  a.timeoutMS ? setTimeout(function () {
4391
4397
  w.executePollRequest(e, t, i, n);
4392
- }, a.timeoutMS) : T.isSimulatable(e.deepChat.stream, o) ? T.simulate(n, e.streamHandlers, a) : (n.addNewMessage(a), r());
4398
+ }, a.timeoutMS) : T.isSimulatable(e.stream, o) ? T.simulate(n, e.streamHandlers, a) : (n.addNewMessage(a), r());
4393
4399
  case 13:
4394
4400
  case "end":
4395
4401
  return _context16.stop();
@@ -4628,8 +4634,8 @@ var Pe = /*#__PURE__*/function () {
4628
4634
  function Pe(e, t, i) {
4629
4635
  var _a$url;
4630
4636
  _classCallCheck(this, Pe);
4631
- var n, r, o, a;
4632
- this.rawBody = {}, this.validateConfigKey = !1, this.canSendMessage = Pe.canSendMessage, this.requestSettings = {}, this.fileTypes = {}, this.completionsHandlers = {}, this.streamHandlers = {}, this.deepChat = e, this.demo = i, Object.assign(this.rawBody, (n = e.request) == 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, L.set(e, this, t), e.request && (this.requestSettings = e.request), this.demo && ((_a$url = (a = this.requestSettings).url) !== null && _a$url !== void 0 ? _a$url : a.url = Ee.URL), this.requestSettings.websocket && B.setup(this);
4637
+ var n, r, o, a, l;
4638
+ this.rawBody = {}, this.validateConfigKey = !1, this.canSendMessage = Pe.canSendMessage, this.requestSettings = {}, this.fileTypes = {}, this.completionsHandlers = {}, this.streamHandlers = {}, this.deepChat = e, this.demo = i, Object.assign(this.rawBody, (n = e.request) == 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, L.set(e, this, t), e.request && (this.requestSettings = e.request), this.demo && ((_a$url = (a = this.requestSettings).url) !== null && _a$url !== void 0 ? _a$url : a.url = Ee.URL), this.requestSettings.websocket && B.setup(this), this.stream = ((l = this.deepChat.request) == null ? void 0 : l.stream) || Se.checkForStream(this.deepChat);
4633
4639
  }
4634
4640
  _createClass(Pe, [{
4635
4641
  key: "verifyKey",
@@ -4650,15 +4656,13 @@ var Pe = /*#__PURE__*/function () {
4650
4656
  value: function () {
4651
4657
  var _request4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee18(e, t) {
4652
4658
  var i,
4653
- n,
4654
4659
  _args18 = arguments;
4655
4660
  return _regeneratorRuntime().wrap(function _callee18$(_context18) {
4656
4661
  while (1) switch (_context18.prev = _context18.next) {
4657
4662
  case 0:
4658
4663
  i = _args18.length > 2 && _args18[2] !== undefined ? _args18[2] : !0;
4659
- n = this.deepChat.stream;
4660
- return _context18.abrupt("return", n && !T.isSimulation(n) ? T.request(this, e, t) : w.request(this, e, t, i));
4661
- case 3:
4664
+ return _context18.abrupt("return", this.stream && !T.isSimulation(this.stream) ? T.request(this, e, t) : w.request(this, e, t, i));
4665
+ case 2:
4662
4666
  case "end":
4663
4667
  return _context18.stop();
4664
4668
  }
@@ -4791,7 +4795,7 @@ var Pe = /*#__PURE__*/function () {
4791
4795
  _context23.next = 4;
4792
4796
  break;
4793
4797
  }
4794
- return _context23.abrupt("return", Re.handleResponseProperty(e));
4798
+ return _context23.abrupt("return", Se.handleResponseProperty(e));
4795
4799
  case 4:
4796
4800
  if (!v.validateResponseFormat(e)) {
4797
4801
  _context23.next = 6;
@@ -4843,17 +4847,17 @@ var Pe = /*#__PURE__*/function () {
4843
4847
  }]);
4844
4848
  return Pe;
4845
4849
  }();
4846
- var q = /*#__PURE__*/function (_Pe) {
4847
- _inherits(q, _Pe);
4850
+ var U = /*#__PURE__*/function (_Pe) {
4851
+ _inherits(U, _Pe);
4848
4852
  // prettier-ignore
4849
- function q(e, t, i, n, r) {
4853
+ function U(e, t, i, n, r) {
4850
4854
  var _this8;
4851
- _classCallCheck(this, q);
4855
+ _classCallCheck(this, U);
4852
4856
  var o;
4853
- _this8 = _callSuper(this, q, [e, r]), _this8.insertKeyPlaceholderText = "API Key", _this8.keyHelpUrl = "", Object.assign(_this8.rawBody, (o = e.request) == null ? void 0 : o.additionalBodyProps), _this8.keyVerificationDetails = t, _this8.buildHeadersFunc = i, n && _this8.setApiKeyProperties(n), _this8.requestSettings = _this8.buildRequestSettings(_this8.key || "", e.request);
4857
+ _this8 = _callSuper(this, U, [e, r]), _this8.insertKeyPlaceholderText = "API Key", _this8.keyHelpUrl = "", Object.assign(_this8.rawBody, (o = e.request) == null ? void 0 : o.additionalBodyProps), _this8.keyVerificationDetails = t, _this8.buildHeadersFunc = i, n && _this8.setApiKeyProperties(n), _this8.requestSettings = _this8.buildRequestSettings(_this8.key || "", e.request);
4854
4858
  return _this8;
4855
4859
  }
4856
- _createClass(q, [{
4860
+ _createClass(U, [{
4857
4861
  key: "setApiKeyProperties",
4858
4862
  value: function setApiKeyProperties(e) {
4859
4863
  this.key = e.key, e.validateKeyProperty && (this.validateConfigKey = e.validateKeyProperty);
@@ -4889,26 +4893,26 @@ var q = /*#__PURE__*/function (_Pe) {
4889
4893
  return !0;
4890
4894
  }
4891
4895
  }]);
4892
- return q;
4896
+ return U;
4893
4897
  }(Pe);
4894
- var Ut = /*#__PURE__*/function () {
4895
- function Ut() {
4896
- _classCallCheck(this, Ut);
4898
+ var qt = /*#__PURE__*/function () {
4899
+ function qt() {
4900
+ _classCallCheck(this, qt);
4897
4901
  }
4898
- _createClass(Ut, null, [{
4902
+ _createClass(qt, null, [{
4899
4903
  key: "waitForPropertiesToBeUpdatedBeforeRender",
4900
4904
  value: function waitForPropertiesToBeUpdatedBeforeRender(e) {
4901
4905
  e._propUpdated_ = !1, setTimeout(function () {
4902
- e._propUpdated_ ? Ut.waitForPropertiesToBeUpdatedBeforeRender(e) : (e._waitingToRender_ = !1, e.onRender());
4906
+ e._propUpdated_ ? qt.waitForPropertiesToBeUpdatedBeforeRender(e) : (e._waitingToRender_ = !1, e.onRender());
4903
4907
  });
4904
4908
  }
4905
4909
  }, {
4906
4910
  key: "attemptRender",
4907
4911
  value: function attemptRender(e) {
4908
- e._propUpdated_ = !0, e._waitingToRender_ || (e._waitingToRender_ = !0, Ut.waitForPropertiesToBeUpdatedBeforeRender(e));
4912
+ e._propUpdated_ = !0, e._waitingToRender_ || (e._waitingToRender_ = !0, qt.waitForPropertiesToBeUpdatedBeforeRender(e));
4909
4913
  }
4910
4914
  }]);
4911
- return Ut;
4915
+ return qt;
4912
4916
  }();
4913
4917
  var Yi = /*#__PURE__*/function (_HTMLElement) {
4914
4918
  _inherits(Je, _HTMLElement);
@@ -4933,7 +4937,7 @@ var Yi = /*#__PURE__*/function (_HTMLElement) {
4933
4937
  return i;
4934
4938
  },
4935
4939
  set: function set(o) {
4936
- i = o, t ? this[e] = o : Ut.attemptRender(this);
4940
+ i = o, t ? this[e] = o : qt.attemptRender(this);
4937
4941
  }
4938
4942
  });
4939
4943
  }
@@ -5336,7 +5340,7 @@ var wn = {
5336
5340
  var _this10;
5337
5341
  _classCallCheck(this, M);
5338
5342
  var t, i;
5339
- _this10 = _callSuper(this, M, [e]), _this10._isModelLoaded = !1, _this10._isModelLoading = !1, _this10._loadOnFirstMessage = !1, _this10._webModel = {}, _this10.permittedErrorPrefixes = [M.MULTIPLE_MODELS_ERROR, M.WEB_LLM_NOT_FOUND_ERROR, M.GENERIC_ERROR], _this10._conversationHistory = [], _typeof(e.webModel) == "object" && (_this10._webModel = e.webModel), (t = _this10._webModel.load) != null && t.clearCache && M.clearAllCache(), _this10.findModelInWindow(e), _this10.canSendMessage = _this10.canSubmit.bind(_assertThisInitialized(_this10)), _this10._chatEl = (i = e.shadowRoot) == null ? void 0 : i.children[0], e.initialMessages && M.setUpHistory(_this10._conversationHistory, e.initialMessages);
5343
+ _this10 = _callSuper(this, M, [e]), _this10._isModelLoaded = !1, _this10._isModelLoading = !1, _this10._loadOnFirstMessage = !1, _this10._webModel = {}, _this10.permittedErrorPrefixes = [M.MULTIPLE_MODELS_ERROR, M.WEB_LLM_NOT_FOUND_ERROR, M.GENERIC_ERROR], _this10._conversationHistory = [], _typeof(e.webModel) == "object" && (_this10._webModel = e.webModel), (t = _this10._webModel.load) != null && t.clearCache && M.clearAllCache(), _this10.findModelInWindow(e), _this10.canSendMessage = _this10.canSubmit.bind(_assertThisInitialized(_this10)), _this10._chatEl = (i = e.shadowRoot) == null ? void 0 : i.children[0], e.history && M.setUpHistory(_this10._conversationHistory, e.history);
5340
5344
  return _this10;
5341
5345
  }
5342
5346
  // need ref of messages object as web model exhibits unique behaviour to manipulate chat
@@ -5719,7 +5723,7 @@ var wn = {
5719
5723
  _yield$v$processReque5 = _context32.sent;
5720
5724
  r = _yield$v$processReque5.body;
5721
5725
  o = _yield$v$processReque5.error;
5722
- a = !!this.deepChat.stream;
5726
+ a = !!this.stream;
5723
5727
  try {
5724
5728
  if (o) v.displayError(e, new Error(o)), (a ? this.streamHandlers.onClose : this.completionsHandlers.onFinish)();else if (!r || !r.text) {
5725
5729
  l = A.INVALID_MODEL_REQUEST({
@@ -5728,7 +5732,7 @@ var wn = {
5728
5732
  console.error(l);
5729
5733
  c = a ? this.streamHandlers.onClose : this.completionsHandlers.onFinish;
5730
5734
  v.onInterceptorError(e, l, c);
5731
- } else this.generateRespByType(e, r.text, !!this.deepChat.stream, i);
5735
+ } else this.generateRespByType(e, r.text, !!this.stream, i);
5732
5736
  } catch (l) {
5733
5737
  this.unloadChat(l);
5734
5738
  }
@@ -5870,11 +5874,11 @@ it.WEB_LLM_NOT_FOUND_ERROR = "WebLLM module not found";
5870
5874
  it.DEFAULT_MODEL = "Llama-2-7b-chat-hf-q4f32_1";
5871
5875
  it.MODULE_SEARCH_LIMIT_S = 5;
5872
5876
  var Zi = it;
5873
- var qt = /*#__PURE__*/function () {
5874
- function qt() {
5875
- _classCallCheck(this, qt);
5877
+ var Ut = /*#__PURE__*/function () {
5878
+ function Ut() {
5879
+ _classCallCheck(this, Ut);
5876
5880
  }
5877
- _createClass(qt, null, [{
5881
+ _createClass(Ut, null, [{
5878
5882
  key: "buildHeaders",
5879
5883
  value: function buildHeaders(e) {
5880
5884
  return {
@@ -5896,19 +5900,19 @@ var qt = /*#__PURE__*/function () {
5896
5900
  return {
5897
5901
  url: "https://api-inference.huggingface.co/models/gpt2",
5898
5902
  method: "POST",
5899
- handleVerificationResult: qt.handleVerificationResult
5903
+ handleVerificationResult: Ut.handleVerificationResult
5900
5904
  };
5901
5905
  }
5902
5906
  }]);
5903
- return qt;
5907
+ return Ut;
5904
5908
  }();
5905
- var us = /*#__PURE__*/function (_q) {
5906
- _inherits(Bi, _q);
5909
+ var us = /*#__PURE__*/function (_U) {
5910
+ _inherits(Bi, _U);
5907
5911
  // prettier-ignore
5908
5912
  function Bi(e, t, i, n, r, o) {
5909
5913
  var _this16;
5910
5914
  _classCallCheck(this, Bi);
5911
- _this16 = _callSuper(this, Bi, [e, qt.buildKeyVerificationDetails(), qt.buildHeaders, r, o]), _this16.insertKeyPlaceholderText = "Hugging Face Token", _this16.keyHelpUrl = "https://huggingface.co/settings/tokens", _this16.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Hugging Face</b></div>\n <p>First message may take an extented amount of time to complete as the model needs to be initialized.</p>", _this16.permittedErrorPrefixes = ["Authorization header"], _this16.url = "".concat(Bi.URL_PREFIX).concat(i), _this16.textInputPlaceholderText = t, _typeof(n) == "object" && (n.model && (_this16.url = "".concat(Bi.URL_PREFIX).concat(n.model)), n.options && (_this16.rawBody.options = n.options), n.parameters && (_this16.rawBody.parameters = n.parameters));
5915
+ _this16 = _callSuper(this, Bi, [e, Ut.buildKeyVerificationDetails(), Ut.buildHeaders, r, o]), _this16.insertKeyPlaceholderText = "Hugging Face Token", _this16.keyHelpUrl = "https://huggingface.co/settings/tokens", _this16.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Hugging Face</b></div>\n <p>First message may take an extented amount of time to complete as the model needs to be initialized.</p>", _this16.permittedErrorPrefixes = ["Authorization header"], _this16.url = "".concat(Bi.URL_PREFIX).concat(i), _this16.textInputPlaceholderText = t, _typeof(n) == "object" && (n.model && (_this16.url = "".concat(Bi.URL_PREFIX).concat(n.model)), n.options && (_this16.rawBody.options = n.options), n.parameters && (_this16.rawBody.parameters = n.parameters));
5912
5916
  return _this16;
5913
5917
  }
5914
5918
  // prettier-ignore
@@ -5951,7 +5955,7 @@ var us = /*#__PURE__*/function (_q) {
5951
5955
  }()
5952
5956
  }]);
5953
5957
  return Bi;
5954
- }(q);
5958
+ }(U);
5955
5959
  us.URL_PREFIX = "https://api-inference.huggingface.co/models/";
5956
5960
  var Be = us;
5957
5961
  var St = /*#__PURE__*/function (_Be) {
@@ -6140,8 +6144,8 @@ var ce = /*#__PURE__*/function () {
6140
6144
  }]);
6141
6145
  return ce;
6142
6146
  }();
6143
- var oi = /*#__PURE__*/function (_q2) {
6144
- _inherits(oi, _q2);
6147
+ var oi = /*#__PURE__*/function (_U2) {
6148
+ _inherits(oi, _U2);
6145
6149
  // prettier-ignore
6146
6150
  function oi(e, t, i, n, r) {
6147
6151
  var _this18;
@@ -6150,7 +6154,7 @@ var oi = /*#__PURE__*/function (_q2) {
6150
6154
  return _this18;
6151
6155
  }
6152
6156
  return _createClass(oi);
6153
- }(q);
6157
+ }(U);
6154
6158
  var Ht = /*#__PURE__*/function (_oi) {
6155
6159
  _inherits(Ht, _oi);
6156
6160
  function Ht(e) {
@@ -6949,8 +6953,8 @@ var Jt = /*#__PURE__*/function () {
6949
6953
  }]);
6950
6954
  return Jt;
6951
6955
  }();
6952
- var Xi = /*#__PURE__*/function (_q3) {
6953
- _inherits(Xi, _q3);
6956
+ var Xi = /*#__PURE__*/function (_U3) {
6957
+ _inherits(Xi, _U3);
6954
6958
  function Xi(e, t, i, n, r) {
6955
6959
  var _this26;
6956
6960
  _classCallCheck(this, Xi);
@@ -6958,7 +6962,7 @@ var Xi = /*#__PURE__*/function (_q3) {
6958
6962
  return _this26;
6959
6963
  }
6960
6964
  return _createClass(Xi);
6961
- }(q);
6965
+ }(U);
6962
6966
  var Do = /*#__PURE__*/function (_Xi) {
6963
6967
  _inherits(Do, _Xi);
6964
6968
  function Do(e) {
@@ -7178,8 +7182,8 @@ var N = /*#__PURE__*/function () {
7178
7182
  }]);
7179
7183
  return N;
7180
7184
  }();
7181
- var Qi = /*#__PURE__*/function (_q4) {
7182
- _inherits(zi, _q4);
7185
+ var Qi = /*#__PURE__*/function (_U4) {
7186
+ _inherits(zi, _U4);
7183
7187
  function zi(e) {
7184
7188
  var _o$model, _a$voice;
7185
7189
  var _this27;
@@ -7273,30 +7277,30 @@ var Qi = /*#__PURE__*/function (_q4) {
7273
7277
  }()
7274
7278
  }]);
7275
7279
  return zi;
7276
- }(q);
7280
+ }(U);
7277
7281
  Qi.DEFAULT_MODEL = "tts-1";
7278
7282
  Qi.DEFAULT_VOIDE = "alloy";
7279
7283
  var Fo = Qi;
7280
- var ai = /*#__PURE__*/function (_q5) {
7281
- _inherits(Me, _q5);
7282
- function Me(e) {
7284
+ var ai = /*#__PURE__*/function (_U5) {
7285
+ _inherits(Te, _U5);
7286
+ function Te(e) {
7283
7287
  var _o$model2;
7284
7288
  var _this28;
7285
- _classCallCheck(this, Me);
7289
+ _classCallCheck(this, Te);
7286
7290
  var r, o;
7287
7291
  var t = JSON.parse(JSON.stringify(e.directConnection)),
7288
7292
  i = t == null ? void 0 : t.openAI;
7289
- _this28 = _callSuper(this, Me, [e, N.buildKeyVerificationDetails(), N.buildHeaders, i, {
7293
+ _this28 = _callSuper(this, Te, [e, N.buildKeyVerificationDetails(), N.buildHeaders, i, {
7290
7294
  audio: {}
7291
- }]), _this28.insertKeyPlaceholderText = "OpenAI API Key", _this28.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this28.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>OpenAI : Speech To Text</b></div>\n <p><b>Upload an audio file</b> to transcribe it into text. You can optionally provide text to guide the audio\n processing.\n <p>Click <a href=\"https://platform.openai.com/docs/guides/speech-to-text\">here</a> for more info.</p>", _this28.url = "", _this28.permittedErrorPrefixes = ["Invalid"], _this28.textInputPlaceholderText = "Upload an audio file", _this28._service_url = Me.AUDIO_TRANSCRIPTIONS_URL;
7295
+ }]), _this28.insertKeyPlaceholderText = "OpenAI API Key", _this28.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this28.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>OpenAI : Speech To Text</b></div>\n <p><b>Upload an audio file</b> to transcribe it into text. You can optionally provide text to guide the audio\n processing.\n <p>Click <a href=\"https://platform.openai.com/docs/guides/speech-to-text\">here</a> for more info.</p>", _this28.url = "", _this28.permittedErrorPrefixes = ["Invalid"], _this28.textInputPlaceholderText = "Upload an audio file", _this28._service_url = Te.AUDIO_TRANSCRIPTIONS_URL;
7292
7296
  var n = (r = t == null ? void 0 : t.openAI) == null ? void 0 : r.audio;
7293
- _typeof(n) == "object" && (_this28.processConfig(n), Me.cleanConfig(n), Object.assign(_this28.rawBody, n)), (_o$model2 = (o = _this28.rawBody).model) !== null && _o$model2 !== void 0 ? _o$model2 : o.model = Me.DEFAULT_MODEL, _this28.rawBody.response_format = "json", _this28.canSendMessage = Me.canSendFileMessage;
7297
+ _typeof(n) == "object" && (_this28.processConfig(n), Te.cleanConfig(n), Object.assign(_this28.rawBody, n)), (_o$model2 = (o = _this28.rawBody).model) !== null && _o$model2 !== void 0 ? _o$model2 : o.model = Te.DEFAULT_MODEL, _this28.rawBody.response_format = "json", _this28.canSendMessage = Te.canSendFileMessage;
7294
7298
  return _this28;
7295
7299
  }
7296
- _createClass(Me, [{
7300
+ _createClass(Te, [{
7297
7301
  key: "processConfig",
7298
7302
  value: function processConfig(e) {
7299
- e != null && e.type && e.type === "translation" && (this._service_url = Me.AUDIO_TRANSLATIONS_URL, delete e.language);
7303
+ e != null && e.type && e.type === "translation" && (this._service_url = Te.AUDIO_TRANSLATIONS_URL, delete e.language);
7300
7304
  }
7301
7305
  }, {
7302
7306
  key: "preprocessBody",
@@ -7328,7 +7332,7 @@ var ai = /*#__PURE__*/function (_q5) {
7328
7332
  throw new Error("No file was added");
7329
7333
  case 4:
7330
7334
  this.url = this.requestSettings.url || this._service_url;
7331
- n = this.preprocessBody(this.rawBody, t), r = Me.createFormDataBody(n, i[0]);
7335
+ n = this.preprocessBody(this.rawBody, t), r = Te.createFormDataBody(n, i[0]);
7332
7336
  v.tempRemoveContentHeader(this.requestSettings, w.request.bind(this, this, r, e), !1);
7333
7337
  case 7:
7334
7338
  case "end":
@@ -7387,8 +7391,8 @@ var ai = /*#__PURE__*/function (_q5) {
7387
7391
  }), i;
7388
7392
  }
7389
7393
  }]);
7390
- return Me;
7391
- }(q);
7394
+ return Te;
7395
+ }(U);
7392
7396
  ai.AUDIO_TRANSCRIPTIONS_URL = "https://api.openai.com/v1/audio/transcriptions";
7393
7397
  ai.AUDIO_TRANSLATIONS_URL = "https://api.openai.com/v1/audio/translations";
7394
7398
  ai.DEFAULT_MODEL = "whisper-1";
@@ -7495,8 +7499,8 @@ var Z = /*#__PURE__*/function () {
7495
7499
  }]);
7496
7500
  return Z;
7497
7501
  }();
7498
- var zo = /*#__PURE__*/function (_q6) {
7499
- _inherits(zo, _q6);
7502
+ var zo = /*#__PURE__*/function (_U6) {
7503
+ _inherits(zo, _U6);
7500
7504
  // prettier-ignore
7501
7505
  function zo(e, t, i, n, r) {
7502
7506
  var _this29;
@@ -7507,20 +7511,20 @@ var zo = /*#__PURE__*/function (_q6) {
7507
7511
  return _this29;
7508
7512
  }
7509
7513
  return _createClass(zo);
7510
- }(q);
7511
- var Uo = /*#__PURE__*/function (_zo) {
7512
- _inherits(Uo, _zo);
7513
- function Uo(e) {
7514
+ }(U);
7515
+ var qo = /*#__PURE__*/function (_zo) {
7516
+ _inherits(qo, _zo);
7517
+ function qo(e) {
7514
7518
  var _a$language;
7515
7519
  var _this30;
7516
- _classCallCheck(this, Uo);
7520
+ _classCallCheck(this, qo);
7517
7521
  var n, r, o, a;
7518
7522
  var t = (r = (n = e.directConnection) == null ? void 0 : n.azure) == null ? void 0 : r.summarization,
7519
7523
  i = (o = e.directConnection) == null ? void 0 : o.azure;
7520
- _this30 = _callSuper(this, Uo, [e, Z.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");
7524
+ _this30 = _callSuper(this, qo, [e, Z.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");
7521
7525
  return _this30;
7522
7526
  }
7523
- _createClass(Uo, [{
7527
+ _createClass(qo, [{
7524
7528
  key: "preprocessBody",
7525
7529
  value: function preprocessBody(e, t) {
7526
7530
  var i = t[t.length - 1].text;
@@ -7660,7 +7664,7 @@ var Uo = /*#__PURE__*/function (_zo) {
7660
7664
  return extractPollResultData;
7661
7665
  }()
7662
7666
  }]);
7663
- return Uo;
7667
+ return qo;
7664
7668
  }(zo);
7665
7669
  var ut = /*#__PURE__*/function () {
7666
7670
  function ut() {
@@ -7768,8 +7772,8 @@ var ut = /*#__PURE__*/function () {
7768
7772
  }]);
7769
7773
  return ut;
7770
7774
  }();
7771
- var en = /*#__PURE__*/function (_q7) {
7772
- _inherits(en, _q7);
7775
+ var en = /*#__PURE__*/function (_U7) {
7776
+ _inherits(en, _U7);
7773
7777
  function en(e) {
7774
7778
  var _this31;
7775
7779
  _classCallCheck(this, en);
@@ -7852,9 +7856,9 @@ var en = /*#__PURE__*/function (_q7) {
7852
7856
  }
7853
7857
  }]);
7854
7858
  return en;
7855
- }(q);
7856
- var hs = /*#__PURE__*/function (_q8) {
7857
- _inherits(hs, _q8);
7859
+ }(U);
7860
+ var hs = /*#__PURE__*/function (_U8) {
7861
+ _inherits(hs, _U8);
7858
7862
  // prettier-ignore
7859
7863
  function hs(e, t, i, n, r) {
7860
7864
  var _this32;
@@ -7865,7 +7869,7 @@ var hs = /*#__PURE__*/function (_q8) {
7865
7869
  return _this32;
7866
7870
  }
7867
7871
  return _createClass(hs);
7868
- }(q);
7872
+ }(U);
7869
7873
  var fs = /*#__PURE__*/function (_hs) {
7870
7874
  _inherits(ps, _hs);
7871
7875
  // prettier-ignore
@@ -7947,12 +7951,12 @@ var fs = /*#__PURE__*/function (_hs) {
7947
7951
  fs.HELP_LINK =
7948
7952
  // eslint-disable-next-line max-len
7949
7953
  "https://learn.microsoft.com/en-GB/azure/cognitive-services/speech-service/get-started-text-to-speech?tabs=windows%2Cterminal&pivots=programming-language-rest";
7950
- var qo = fs;
7954
+ var Uo = fs;
7951
7955
  var ms = /*#__PURE__*/function (_hs2) {
7952
- _inherits(Ui, _hs2);
7953
- function Ui(e) {
7956
+ _inherits(qi, _hs2);
7957
+ function qi(e) {
7954
7958
  var _this34;
7955
- _classCallCheck(this, Ui);
7959
+ _classCallCheck(this, qi);
7956
7960
  var o, a, l;
7957
7961
  var t = (a = (o = e.directConnection) == null ? void 0 : o.azure) == null ? void 0 : a.speechToText,
7958
7962
  i = (l = e.directConnection) == null ? void 0 : l.azure,
@@ -7963,12 +7967,12 @@ var ms = /*#__PURE__*/function (_hs2) {
7963
7967
  }
7964
7968
  }
7965
7969
  };
7966
- _this34 = _callSuper(this, Ui, [e, Z.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(Ui.HELP_LINK, "\">here</a> for more info.\n </p>"), _this34.url = "", _this34.isTextInputDisabled = !0, _this34.textInputPlaceholderText = "Upload an audio file", _this34.canSendMessage = Ui.canFileSendMessage;
7970
+ _this34 = _callSuper(this, qi, [e, Z.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(qi.HELP_LINK, "\">here</a> for more info.\n </p>"), _this34.url = "", _this34.isTextInputDisabled = !0, _this34.textInputPlaceholderText = "Upload an audio file", _this34.canSendMessage = qi.canFileSendMessage;
7967
7971
  var r = t.lang || "en-US";
7968
7972
  _this34.url = "https://".concat(t.region, ".stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?language=").concat(r, "&format=detailed"), _this34.recordAudio = void 0;
7969
7973
  return _this34;
7970
7974
  }
7971
- _createClass(Ui, [{
7975
+ _createClass(qi, [{
7972
7976
  key: "callServiceAPI",
7973
7977
  value: function () {
7974
7978
  var _callServiceAPI16 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee71(e, t, i) {
@@ -8033,14 +8037,14 @@ var ms = /*#__PURE__*/function (_hs2) {
8033
8037
  return !!(t != null && t[0]);
8034
8038
  }
8035
8039
  }]);
8036
- return Ui;
8040
+ return qi;
8037
8041
  }(hs);
8038
8042
  ms.HELP_LINK =
8039
8043
  // eslint-disable-next-line max-len
8040
8044
  "https://learn.microsoft.com/en-GB/azure/cognitive-services/speech-service/get-started-text-to-speech?tabs=windows%2Cterminal&pivots=programming-language-rest";
8041
8045
  var Ho = ms;
8042
- var Go = /*#__PURE__*/function (_q9) {
8043
- _inherits(Go, _q9);
8046
+ var Go = /*#__PURE__*/function (_U9) {
8047
+ _inherits(Go, _U9);
8044
8048
  // prettier-ignore
8045
8049
  function Go(e) {
8046
8050
  var _this35;
@@ -8118,7 +8122,7 @@ var Go = /*#__PURE__*/function (_q9) {
8118
8122
  }()
8119
8123
  }]);
8120
8124
  return Go;
8121
- }(q);
8125
+ }(U);
8122
8126
  var ve = /*#__PURE__*/function () {
8123
8127
  function ve() {
8124
8128
  _classCallCheck(this, ve);
@@ -8327,8 +8331,8 @@ var ve = /*#__PURE__*/function () {
8327
8331
  }]);
8328
8332
  return ve;
8329
8333
  }();
8330
- var li = /*#__PURE__*/function (_q10) {
8331
- _inherits(oe, _q10);
8334
+ var li = /*#__PURE__*/function (_U10) {
8335
+ _inherits(oe, _U10);
8332
8336
  function oe(e) {
8333
8337
  var _c$headers, _d$OpenAIBeta;
8334
8338
  var _this36;
@@ -8782,16 +8786,16 @@ var li = /*#__PURE__*/function (_q10) {
8782
8786
  }()
8783
8787
  }]);
8784
8788
  return oe;
8785
- }(q);
8789
+ }(U);
8786
8790
  li.THREAD_PREFIX = "https://api.openai.com/v1/threads";
8787
8791
  li.NEW_ASSISTANT_URL = "https://api.openai.com/v1/assistants";
8788
8792
  li.POLLING_TIMEOUT_MS = 800;
8789
8793
  var Vo = li;
8790
- var ci = /*#__PURE__*/function (_q11) {
8791
- _inherits(Te, _q11);
8792
- function Te(e) {
8794
+ var ci = /*#__PURE__*/function (_U11) {
8795
+ _inherits(Ce, _U11);
8796
+ function Ce(e) {
8793
8797
  var _this39;
8794
- _classCallCheck(this, Te);
8798
+ _classCallCheck(this, Ce);
8795
8799
  var o;
8796
8800
  var t = e.directConnection,
8797
8801
  i = t == null ? void 0 : t.openAI,
@@ -8803,7 +8807,7 @@ var ci = /*#__PURE__*/function (_q11) {
8803
8807
  }
8804
8808
  }
8805
8809
  };
8806
- _this39 = _callSuper(this, Te, [e, N.buildKeyVerificationDetails(), N.buildHeaders, i, n]), _this39.insertKeyPlaceholderText = "OpenAI API Key", _this39.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this39.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>OpenAI DALL\xB7E</b></div>\n <p><b>Insert text</b> to generate an image.</p>\n <p><b>Upload 1</b> PNG image to generate its variation and optionally insert text to specify the change.</p>\n <p><b>Upload 2</b> PNG images where the second is a copy of the first with a transparent area where the edit should\n take place and text to specify the edit.</p>\n <p>Click <a href=\"https://platform.openai.com/docs/guides/images/introduction\">here</a> for more info.</p>", _this39.url = "", _this39.permittedErrorPrefixes = ["Incorrect", "Invalid input image"];
8810
+ _this39 = _callSuper(this, Ce, [e, N.buildKeyVerificationDetails(), N.buildHeaders, i, n]), _this39.insertKeyPlaceholderText = "OpenAI API Key", _this39.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this39.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>OpenAI DALL\xB7E</b></div>\n <p><b>Insert text</b> to generate an image.</p>\n <p><b>Upload 1</b> PNG image to generate its variation and optionally insert text to specify the change.</p>\n <p><b>Upload 2</b> PNG images where the second is a copy of the first with a transparent area where the edit should\n take place and text to specify the edit.</p>\n <p>Click <a href=\"https://platform.openai.com/docs/guides/images/introduction\">here</a> for more info.</p>", _this39.url = "", _this39.permittedErrorPrefixes = ["Incorrect", "Invalid input image"];
8807
8811
  var r = (o = t == null ? void 0 : t.openAI) == null ? void 0 : o.images;
8808
8812
  if (_this39.camera) {
8809
8813
  var a = _typeof(r) == "object" && r.size ? Number.parseInt(r.size) : 1024;
@@ -8814,10 +8818,10 @@ var ci = /*#__PURE__*/function (_q11) {
8814
8818
  }
8815
8819
  };
8816
8820
  }
8817
- _typeof(r) == "object" && Object.assign(_this39.rawBody, r), _this39.canSendMessage = Te.canFileSendMessage;
8821
+ _typeof(r) == "object" && Object.assign(_this39.rawBody, r), _this39.canSendMessage = Ce.canFileSendMessage;
8818
8822
  return _this39;
8819
8823
  }
8820
- _createClass(Te, [{
8824
+ _createClass(Ce, [{
8821
8825
  key: "preprocessBody",
8822
8826
  value: function preprocessBody(e, t) {
8823
8827
  var i = JSON.parse(JSON.stringify(e));
@@ -8831,10 +8835,10 @@ var ci = /*#__PURE__*/function (_q11) {
8831
8835
  var n;
8832
8836
  var r = (a = (o = t[t.length - 1]) == null ? void 0 : o.text) == null ? void 0 : a.trim();
8833
8837
  if (i[1] || r && r !== "") {
8834
- this.url = Te.IMAGE_EDIT_URL;
8838
+ this.url = Ce.IMAGE_EDIT_URL;
8835
8839
  var l = this.preprocessBody(this.rawBody, r);
8836
- n = Te.createFormDataBody(l, i[0], i[1]);
8837
- } else this.url = Te.IMAGE_VARIATIONS_URL, n = Te.createFormDataBody(this.rawBody, i[0]);
8840
+ n = Ce.createFormDataBody(l, i[0], i[1]);
8841
+ } else this.url = Ce.IMAGE_VARIATIONS_URL, n = Ce.createFormDataBody(this.rawBody, i[0]);
8838
8842
  v.tempRemoveContentHeader(this.requestSettings, w.request.bind(this, this, n, e), !1);
8839
8843
  }
8840
8844
  }, {
@@ -8865,7 +8869,7 @@ var ci = /*#__PURE__*/function (_q11) {
8865
8869
  }
8866
8870
  throw new Error("Request settings have not been set up");
8867
8871
  case 8:
8868
- this.url = Te.IMAGE_GENERATION_URL;
8872
+ this.url = Ce.IMAGE_GENERATION_URL;
8869
8873
  r = this.preprocessBody(this.rawBody, t[t.length - 1].text);
8870
8874
  w.request(this, r, e);
8871
8875
  case 11:
@@ -8936,14 +8940,14 @@ var ci = /*#__PURE__*/function (_q11) {
8936
8940
  }), n;
8937
8941
  }
8938
8942
  }]);
8939
- return Te;
8940
- }(q);
8943
+ return Ce;
8944
+ }(U);
8941
8945
  ci.IMAGE_GENERATION_URL = "https://api.openai.com/v1/images/generations";
8942
8946
  ci.IMAGE_VARIATIONS_URL = "https://api.openai.com/v1/images/variations";
8943
8947
  ci.IMAGE_EDIT_URL = "https://api.openai.com/v1/images/edits";
8944
8948
  var Wo = ci;
8945
- var ht = /*#__PURE__*/function (_q12) {
8946
- _inherits(ht, _q12);
8949
+ var ht = /*#__PURE__*/function (_U12) {
8950
+ _inherits(ht, _U12);
8947
8951
  function ht(e) {
8948
8952
  var _this40$maxMessages, _l$model;
8949
8953
  var _this40;
@@ -8998,7 +9002,7 @@ var ht = /*#__PURE__*/function (_q12) {
8998
9002
  }
8999
9003
  throw new Error("Request settings have not been set up");
9000
9004
  case 2:
9001
- i = this.preprocessBody(this.rawBody, t), n = this.deepChat.stream;
9005
+ i = this.preprocessBody(this.rawBody, t), n = this.stream;
9002
9006
  n && (_typeof(n) != "object" || !n.simulation) || i.stream ? (i.stream = !0, T.request(this, i, e)) : w.request(this, i, e);
9003
9007
  case 4:
9004
9008
  case "end":
@@ -9216,7 +9220,7 @@ var ht = /*#__PURE__*/function (_q12) {
9216
9220
  }
9217
9221
  }]);
9218
9222
  return ht;
9219
- }(q);
9223
+ }(U);
9220
9224
  var Jo = /*#__PURE__*/function (_Xi3) {
9221
9225
  _inherits(Jo, _Xi3);
9222
9226
  function Jo(e) {
@@ -9322,8 +9326,8 @@ var $o = /*#__PURE__*/function () {
9322
9326
  if (t.huggingFace) return t.huggingFace.textGeneration ? new Io(e) : t.huggingFace.summarization ? new Ro(e) : t.huggingFace.translation ? new Oo(e) : t.huggingFace.fillMask ? new Po(e) : t.huggingFace.questionAnswer ? new Lo(e) : t.huggingFace.audioSpeechRecognition ? new ko(e) : t.huggingFace.audioClassification ? new Co(e) : t.huggingFace.imageClassification ? new Ao(e) : new No(e);
9323
9327
  if (t.azure) {
9324
9328
  if (t.azure.speechToText) return new Ho(e);
9325
- if (t.azure.textToSpeech) return new qo(e);
9326
- if (t.azure.summarization) return new Uo(e);
9329
+ if (t.azure.textToSpeech) return new Uo(e);
9330
+ if (t.azure.summarization) return new qo(e);
9327
9331
  if (t.azure.translation) return new Go(e);
9328
9332
  }
9329
9333
  if (t.stabilityAI) return t.stabilityAI.imageToImage ? new Vt(e) : t.stabilityAI.imageToImageUpscale ? new Ht(e) : t.stabilityAI.imageToImageMasking ? new Gt(e) : new Wt(e);
@@ -9334,22 +9338,22 @@ var $o = /*#__PURE__*/function () {
9334
9338
  return $o;
9335
9339
  }();
9336
9340
  var gs = /*#__PURE__*/function () {
9337
- function qi() {
9338
- _classCallCheck(this, qi);
9341
+ function Ui() {
9342
+ _classCallCheck(this, Ui);
9339
9343
  }
9340
- _createClass(qi, null, [{
9344
+ _createClass(Ui, null, [{
9341
9345
  key: "appendStyleSheetToHead",
9342
9346
  value: function appendStyleSheetToHead() {
9343
9347
  var e = document.getElementsByTagName("head")[0];
9344
9348
  if (!Array.from(e.getElementsByTagName("link")).some(function (i) {
9345
- return i.getAttribute("href") === qi.FONT_URL;
9349
+ return i.getAttribute("href") === Ui.FONT_URL;
9346
9350
  })) {
9347
9351
  var _i12 = document.createElement("link");
9348
- _i12.rel = "stylesheet", _i12.href = qi.FONT_URL, e.appendChild(_i12);
9352
+ _i12.rel = "stylesheet", _i12.href = Ui.FONT_URL, e.appendChild(_i12);
9349
9353
  }
9350
9354
  }
9351
9355
  }]);
9352
- return qi;
9356
+ return Ui;
9353
9357
  }();
9354
9358
  gs.FONT_URL = "https://fonts.googleapis.com/css2?family=Inter:wght@400;600&display=swap";
9355
9359
  var Ko = gs;
@@ -9376,7 +9380,7 @@ bs.attibutes = {
9376
9380
  return new Function("return ".concat(s))();
9377
9381
  }
9378
9382
  };
9379
- function x(s) {
9383
+ function E(s) {
9380
9384
  return function (e, t) {
9381
9385
  Object.defineProperty(e, t, {});
9382
9386
  var i = e.constructor,
@@ -9457,7 +9461,10 @@ var Yo = /*#__PURE__*/function () {
9457
9461
  if (!t.isDirectConnection()) return "Please define a valid service inside\n the [directConnection](https://deepchat.dev/docs/directConnection/#directConnection) object.";
9458
9462
  var n = (i = e.directConnection.openAI) == null ? void 0 : i.chat;
9459
9463
  if (_typeof(n) == "object" && n.tools && !n.function_handler) return "Please define the `function_handler` property inside the openAI [chat](https://deepchat.dev/docs/directConnection/openAI#Chat) object.";
9460
- } else if (e.request && !e.request.url && !e.request.handler) return "Please define a `url` or a `handler` property inside the [request](https://deepchat.dev/docs/connect#Request) object.";
9464
+ } else if (e.request) {
9465
+ if (e.demo && !e.request.stream) return "When [demo](https://deepchat.dev/docs/demo) mode is enabled - the [request](https://deepchat.dev/docs/connect#Request) object can only accept the [stream](https://deepchat.dev/docs/connect#Stream) property.";
9466
+ if (!e.request.url && !e.request.handler) return "Please define a `url` or a `handler` property inside the [request](https://deepchat.dev/docs/connect#Request) object.";
9467
+ }
9461
9468
  return null;
9462
9469
  }
9463
9470
  }]);
@@ -9542,22 +9549,22 @@ var ge = /*#__PURE__*/function () {
9542
9549
  }();
9543
9550
  var be = /*#__PURE__*/function (_Ye) {
9544
9551
  _inherits(be, _Ye);
9545
- function be(e, t) {
9552
+ function be(e, t, i) {
9546
9553
  var _this43;
9547
9554
  _classCallCheck(this, be);
9548
- var o, a;
9555
+ var a, l;
9549
9556
  _this43 = _callSuper(this, be, [e]);
9550
- var i = t.permittedErrorPrefixes,
9551
- n = t.introPanelMarkUp,
9552
- r = t.demo;
9553
- _this43._errorMessageOverrides = (o = e.errorMessages) == null ? void 0 : o.overrides, _this43._onClearMessages = zt.onClearMessages.bind(_assertThisInitialized(_this43), e), _this43._onError = zt.onError.bind(_assertThisInitialized(_this43), e), _this43._displayLoadingMessage = be.getDisplayLoadingMessage(e, t), _this43._permittedErrorPrefixes = i, _this43.addSetupMessageIfNeeded(e, t) || _this43.populateIntroPanel(e.children[0], n, e.introPanelStyle), _this43.addIntroductoryMessage(e, t), e.initialMessages && _this43.populateInitialMessages(e.initialMessages), _this43._displayServiceErrorMessages = (a = e.errorMessages) == null ? void 0 : a.displayServiceErrorMessages, e.getMessages = function () {
9557
+ var n = t.permittedErrorPrefixes,
9558
+ r = t.introPanelMarkUp,
9559
+ o = t.demo;
9560
+ _this43._errorMessageOverrides = (a = e.errorMessages) == null ? void 0 : a.overrides, _this43._onClearMessages = zt.onClearMessages.bind(_assertThisInitialized(_this43), e), _this43._onError = zt.onError.bind(_assertThisInitialized(_this43), e), _this43._displayLoadingMessage = be.getDisplayLoadingMessage(e, t), _this43._permittedErrorPrefixes = n, _this43.addSetupMessageIfNeeded(e, t) || _this43.populateIntroPanel(i, r, e.introPanelStyle), _this43.addIntroductoryMessage(e, t), e.history && _this43.populateInitialMessages(e.history), _this43._displayServiceErrorMessages = (l = e.errorMessages) == null ? void 0 : l.displayServiceErrorMessages, e.getMessages = function () {
9554
9561
  return JSON.parse(JSON.stringify(_this43.messages));
9555
- }, e.clearMessages = _this43.clearMessages.bind(_assertThisInitialized(_this43), t), e.refreshMessages = _this43.refreshTextMessages.bind(_assertThisInitialized(_this43)), e.scrollToBottom = G.scrollToBottom.bind(_assertThisInitialized(_this43), _this43.elementRef), e._addMessage = function (l, c) {
9556
- _this43.addNewMessage(_objectSpread(_objectSpread({}, l), {}, {
9557
- sendUpdate: !!c
9558
- }), !c);
9559
- }, t.isWebModel() && t.setUpMessages(_assertThisInitialized(_this43)), r && _this43.prepareDemo(r), e.textToSpeech && Ft.processConfig(e.textToSpeech, function (l) {
9560
- _this43.textToSpeech = l;
9562
+ }, e.clearMessages = _this43.clearMessages.bind(_assertThisInitialized(_this43), t), e.refreshMessages = _this43.refreshTextMessages.bind(_assertThisInitialized(_this43)), e.scrollToBottom = G.scrollToBottom.bind(_assertThisInitialized(_this43), _this43.elementRef), e._addMessage = function (c, d) {
9563
+ _this43.addNewMessage(_objectSpread(_objectSpread({}, c), {}, {
9564
+ sendUpdate: !!d
9565
+ }), !d);
9566
+ }, t.isWebModel() && t.setUpMessages(_assertThisInitialized(_this43)), o && _this43.prepareDemo(o), e.textToSpeech && Ft.processConfig(e.textToSpeech, function (c) {
9567
+ _this43.textToSpeech = c;
9561
9568
  }), t.fetchHistory && _this43.fetchHistory(t.fetchHistory);
9562
9569
  return _this43;
9563
9570
  }
@@ -9600,7 +9607,7 @@ var be = /*#__PURE__*/function (_Ye) {
9600
9607
  value: function populateInitialMessages(e) {
9601
9608
  var _this44 = this;
9602
9609
  e.forEach(function (t) {
9603
- Re.processInitialMessageFile(t), _this44.addNewMessage(t, !0);
9610
+ Se.processInitialMessageFile(t), _this44.addNewMessage(t, !0);
9604
9611
  }), setTimeout(function () {
9605
9612
  return G.scrollToBottom(_this44.elementRef);
9606
9613
  }, 0);
@@ -10020,14 +10027,14 @@ var yt = /*#__PURE__*/function () {
10020
10027
  }]);
10021
10028
  return yt;
10022
10029
  }();
10023
- var Ae = /*#__PURE__*/function () {
10024
- function Ae() {
10025
- _classCallCheck(this, Ae);
10030
+ var ke = /*#__PURE__*/function () {
10031
+ function ke() {
10032
+ _classCallCheck(this, ke);
10026
10033
  }
10027
- _createClass(Ae, null, [{
10034
+ _createClass(ke, null, [{
10028
10035
  key: "addItemEvents",
10029
10036
  value: function addItemEvents(e, t, i, n) {
10030
- Ie.add(t, n), t.addEventListener("click", function () {
10037
+ Le.add(t, n), t.addEventListener("click", function () {
10031
10038
  i.click();
10032
10039
  }), t.addEventListener("mouseenter", function (r) {
10033
10040
  e.highlightedItem = r.target;
@@ -10051,7 +10058,7 @@ var Ae = /*#__PURE__*/function () {
10051
10058
  key: "populateItem",
10052
10059
  value: function populateItem(e, t, i, n) {
10053
10060
  var r = e.children[0];
10054
- r.classList.contains("text-button") ? t.appendChild(Ae.createItemText(r.textContent, n == null ? void 0 : n.text)) : (t.appendChild(Ae.createItemIcon(e, n == null ? void 0 : n.iconContainer)), t.appendChild(Ae.createItemText(i, n == null ? void 0 : n.text)));
10061
+ r.classList.contains("text-button") ? t.appendChild(ke.createItemText(r.textContent, n == null ? void 0 : n.text)) : (t.appendChild(ke.createItemIcon(e, n == null ? void 0 : n.iconContainer)), t.appendChild(ke.createItemText(i, n == null ? void 0 : n.text)));
10055
10062
  }
10056
10063
  // prettier-ignore
10057
10064
  }, {
@@ -10061,16 +10068,16 @@ var Ae = /*#__PURE__*/function () {
10061
10068
  var n = t.elementRef,
10062
10069
  r = t.dropupText,
10063
10070
  o = document.createElement("div");
10064
- Object.assign(o.style, (l = i == null ? void 0 : i.item) == null ? void 0 : l["default"]), Ae.populateItem(n, o, r, i), o.classList.add("dropup-menu-item");
10071
+ Object.assign(o.style, (l = i == null ? void 0 : i.item) == null ? void 0 : l["default"]), ke.populateItem(n, o, r, i), o.classList.add("dropup-menu-item");
10065
10072
  var a = C.processStateful((i == null ? void 0 : i.item) || {}, {
10066
10073
  backgroundColor: "#f3f3f3"
10067
10074
  }, {
10068
10075
  backgroundColor: "#ebebeb"
10069
10076
  });
10070
- return Ae.addItemEvents(e, o, n, a), o;
10077
+ return ke.addItemEvents(e, o, n, a), o;
10071
10078
  }
10072
10079
  }]);
10073
- return Ae;
10080
+ return ke;
10074
10081
  }();
10075
10082
  var nn = /*#__PURE__*/function () {
10076
10083
  function nn(e, t) {
@@ -10099,7 +10106,7 @@ var nn = /*#__PURE__*/function () {
10099
10106
  }, {
10100
10107
  key: "addItem",
10101
10108
  value: function addItem(e) {
10102
- var t = Ae.createItem(this, e, this._styles);
10109
+ var t = ke.createItem(this, e, this._styles);
10103
10110
  this.elementRef.appendChild(t);
10104
10111
  }
10105
10112
  // prettier-ignore
@@ -10438,18 +10445,18 @@ var fe = /*#__PURE__*/function () {
10438
10445
  var ra = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n <title>play</title>\n <path d=\"M5.92 24.096q0 1.088 0.928 1.728 0.512 0.288 1.088 0.288 0.448 0 0.896-0.224l16.16-8.064q0.48-0.256 0.8-0.736t0.288-1.088-0.288-1.056-0.8-0.736l-16.16-8.064q-0.448-0.224-0.896-0.224-0.544 0-1.088 0.288-0.928 0.608-0.928 1.728v16.16z\"></path>\n</svg>",
10439
10446
  Tn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n<title>stop</title>\n<path d=\"M5.92 24.096q0 0.832 0.576 1.408t1.44 0.608h16.128q0.832 0 1.44-0.608t0.576-1.408v-16.16q0-0.832-0.576-1.44t-1.44-0.576h-16.128q-0.832 0-1.44 0.576t-0.576 1.44v16.16z\"></path>\n</svg>",
10440
10447
  vs = /*#__PURE__*/function (_fe) {
10441
- _inherits(Ce, _fe);
10448
+ _inherits(Ae, _fe);
10442
10449
  // prettier-ignore
10443
- function Ce(e, t, i, n) {
10444
- _classCallCheck(this, Ce);
10445
- return _callSuper(this, Ce, [e, t, i, n]);
10450
+ function Ae(e, t, i, n) {
10451
+ _classCallCheck(this, Ae);
10452
+ return _callSuper(this, Ae, [e, t, i, n]);
10446
10453
  }
10447
- _createClass(Ce, [{
10454
+ _createClass(Ae, [{
10448
10455
  key: "createTimer",
10449
10456
  value: function createTimer(e, t) {
10450
10457
  var _this50 = this;
10451
10458
  var i = 0;
10452
- var n = t !== void 0 && t < Ce.TIMER_LIMIT_S ? t : Ce.TIMER_LIMIT_S;
10459
+ var n = t !== void 0 && t < Ae.TIMER_LIMIT_S ? t : Ae.TIMER_LIMIT_S;
10453
10460
  return setInterval(function () {
10454
10461
  var a;
10455
10462
  i += 1, i === n && ((a = _this50.stopPlaceholderCallback) == null || a.call(_this50), _this50.clearTimer()), i === 600 && e.classList.add("audio-placeholder-text-4-digits");
@@ -10461,7 +10468,7 @@ var ra = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
10461
10468
  }, {
10462
10469
  key: "createPlaceholderAudioAttachment",
10463
10470
  value: function createPlaceholderAudioAttachment(e) {
10464
- var t = Ce.createAudioContainer(),
10471
+ var t = Ae.createAudioContainer(),
10465
10472
  i = document.createElement("div");
10466
10473
  i.classList.add("audio-placeholder-text-3-digits");
10467
10474
  var n = document.createElement("div");
@@ -10498,7 +10505,7 @@ var ra = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
10498
10505
  key: "completePlaceholderAttachment",
10499
10506
  value: function completePlaceholderAttachment(e, t) {
10500
10507
  var i = this._activePlaceholderAttachment;
10501
- i && (i.file = e, Ce.addAudioElements(i.attachmentContainerElement.children[0], t), i.removeButton = this.createRemoveAttachmentButton(i), i.attachmentContainerElement.appendChild(i.removeButton), this._activePlaceholderAttachment = void 0, this.clearTimer());
10508
+ i && (i.file = e, Ae.addAudioElements(i.attachmentContainerElement.children[0], t), i.removeButton = this.createRemoveAttachmentButton(i), i.attachmentContainerElement.appendChild(i.removeButton), this._activePlaceholderAttachment = void 0, this.clearTimer());
10502
10509
  }
10503
10510
  }, {
10504
10511
  key: "removePlaceholderAttachment",
@@ -10538,8 +10545,8 @@ var ra = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
10538
10545
  }, {
10539
10546
  key: "createAudioAttachment",
10540
10547
  value: function createAudioAttachment(e) {
10541
- var t = Ce.createAudioContainer();
10542
- return Ce.addAudioElements(t, e), t;
10548
+ var t = Ae.createAudioContainer();
10549
+ return Ae.addAudioElements(t, e), t;
10543
10550
  }
10544
10551
  }, {
10545
10552
  key: "stopAttachmentPlayback",
@@ -10548,7 +10555,7 @@ var ra = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
10548
10555
  (n = (i = (t = e.children[0]) == null ? void 0 : t.children) == null ? void 0 : i[0]) != null && n.classList.contains("stop-icon") && e.children[0].click();
10549
10556
  }
10550
10557
  }]);
10551
- return Ce;
10558
+ return Ae;
10552
10559
  }(fe);
10553
10560
  vs.TIMER_LIMIT_S = 5999;
10554
10561
  var Hi = vs;
@@ -10901,11 +10908,11 @@ var ue = /*#__PURE__*/function () {
10901
10908
  }]);
10902
10909
  return ue;
10903
10910
  }();
10904
- var ke = /*#__PURE__*/function () {
10905
- function ke() {
10906
- _classCallCheck(this, ke);
10911
+ var Ie = /*#__PURE__*/function () {
10912
+ function Ie() {
10913
+ _classCallCheck(this, Ie);
10907
10914
  }
10908
- _createClass(ke, null, [{
10915
+ _createClass(Ie, null, [{
10909
10916
  key: "validate",
10910
10917
  value:
10911
10918
  // prettier-ignore
@@ -10929,7 +10936,7 @@ var ke = /*#__PURE__*/function () {
10929
10936
  a = i.getAllFileData(), l = a == null ? void 0 : a.map(function (c) {
10930
10937
  return c.file;
10931
10938
  });
10932
- return _context102.abrupt("return", ke.validate(e, n, o, l));
10939
+ return _context102.abrupt("return", Ie.validate(e, n, o, l));
10933
10940
  case 5:
10934
10941
  case "end":
10935
10942
  return _context102.stop();
@@ -10952,7 +10959,7 @@ var ke = /*#__PURE__*/function () {
10952
10959
  n = (r = t.files) == null ? void 0 : r.map(function (o) {
10953
10960
  return o.file;
10954
10961
  });
10955
- return _context103.abrupt("return", ke.validate(e, i, t.text, n, !0));
10962
+ return _context103.abrupt("return", Ie.validate(e, i, t.text, n, !0));
10956
10963
  case 2:
10957
10964
  case "end":
10958
10965
  return _context103.stop();
@@ -10973,21 +10980,21 @@ var ke = /*#__PURE__*/function () {
10973
10980
  }, {
10974
10981
  key: "attach",
10975
10982
  value: function attach(e, t, i, n, r) {
10976
- var o = e.validateInput || Re.processValidateInput(e);
10983
+ var o = e.validateInput || Se.processValidateInput(e);
10977
10984
  e._validationHandler = /*#__PURE__*/function () {
10978
10985
  var _ref15 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee104(a) {
10979
10986
  var l;
10980
10987
  return _regeneratorRuntime().wrap(function _callee104$(_context104) {
10981
10988
  while (1) switch (_context104.prev = _context104.next) {
10982
10989
  case 0:
10983
- if (!(r.status.loadingActive || r.status.requestInProgress || t.isSubmitProgrammaticallyDisabled === !0 || !ke.validateWebsocket(t, r))) {
10990
+ if (!(r.status.loadingActive || r.status.requestInProgress || t.isSubmitProgrammaticallyDisabled === !0 || !Ie.validateWebsocket(t, r))) {
10984
10991
  _context104.next = 2;
10985
10992
  break;
10986
10993
  }
10987
10994
  return _context104.abrupt("return", !1);
10988
10995
  case 2:
10989
10996
  l = o || t.canSendMessage;
10990
- return _context104.abrupt("return", l ? a ? ke.useValidationFuncProgrammatic(l, a, r) : ke.useValidationFunc(l, i, n, r) : null);
10997
+ return _context104.abrupt("return", l ? a ? Ie.useValidationFuncProgrammatic(l, a, r) : Ie.useValidationFunc(l, i, n, r) : null);
10991
10998
  case 4:
10992
10999
  case "end":
10993
11000
  return _context104.stop();
@@ -11000,7 +11007,7 @@ var ke = /*#__PURE__*/function () {
11000
11007
  }();
11001
11008
  }
11002
11009
  }]);
11003
- return ke;
11010
+ return Ie;
11004
11011
  }();
11005
11012
  var aa = "<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n<svg height=\"1.4em\" width=\"1.4em\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n\t viewBox=\"0 0 490.9 490.9\" xml:space=\"preserve\">\n\t<g>\n\t\t<g>\n\t\t\t<path d=\"M245.5,322.9c53,0,96.2-43.2,96.2-96.2V96.2c0-53-43.2-96.2-96.2-96.2s-96.2,43.2-96.2,96.2v130.5\n\t\t\t\tC149.3,279.8,192.5,322.9,245.5,322.9z M173.8,96.2c0-39.5,32.2-71.7,71.7-71.7s71.7,32.2,71.7,71.7v130.5\n\t\t\t\tc0,39.5-32.2,71.7-71.7,71.7s-71.7-32.2-71.7-71.7V96.2z\"/>\n\t\t\t<path d=\"M94.4,214.5c-6.8,0-12.3,5.5-12.3,12.3c0,85.9,66.7,156.6,151.1,162.8v76.7h-63.9c-6.8,0-12.3,5.5-12.3,12.3\n\t\t\t\ts5.5,12.3,12.3,12.3h152.3c6.8,0,12.3-5.5,12.3-12.3s-5.5-12.3-12.3-12.3h-63.9v-76.7c84.4-6.3,151.1-76.9,151.1-162.8\n\t\t\t\tc0-6.8-5.5-12.3-12.3-12.3s-12.3,5.5-12.3,12.3c0,76.6-62.3,138.9-138.9,138.9s-138.9-62.3-138.9-138.9\n\t\t\t\tC106.6,220,101.2,214.5,94.4,214.5z\"/>\n\t\t</g>\n\t</g>\n</svg>\n";
11006
11013
  var xt = /*#__PURE__*/function (_Tt3) {
@@ -11311,11 +11318,11 @@ var sn = /*#__PURE__*/function () {
11311
11318
  return sn;
11312
11319
  }();
11313
11320
  Lt.AutoScroll = sn;
11314
- var Ue = {};
11315
- Object.defineProperty(Ue, "__esModule", {
11321
+ var qe = {};
11322
+ Object.defineProperty(qe, "__esModule", {
11316
11323
  value: !0
11317
11324
  });
11318
- Ue.Elements = void 0;
11325
+ qe.Elements = void 0;
11319
11326
  var ha = /*#__PURE__*/function () {
11320
11327
  function ha() {
11321
11328
  _classCallCheck(this, ha);
@@ -11363,12 +11370,12 @@ var ha = /*#__PURE__*/function () {
11363
11370
  }]);
11364
11371
  return ha;
11365
11372
  }();
11366
- Ue.Elements = ha;
11367
- var qe = {};
11368
- Object.defineProperty(qe, "__esModule", {
11373
+ qe.Elements = ha;
11374
+ var Ue = {};
11375
+ Object.defineProperty(Ue, "__esModule", {
11369
11376
  value: !0
11370
11377
  });
11371
- qe.Cursor = void 0;
11378
+ Ue.Cursor = void 0;
11372
11379
  var pt = /*#__PURE__*/function () {
11373
11380
  function pt() {
11374
11381
  _classCallCheck(this, pt);
@@ -11450,15 +11457,15 @@ var pt = /*#__PURE__*/function () {
11450
11457
  }]);
11451
11458
  return pt;
11452
11459
  }();
11453
- qe.Cursor = pt;
11460
+ Ue.Cursor = pt;
11454
11461
  Object.defineProperty(It, "__esModule", {
11455
11462
  value: !0
11456
11463
  });
11457
11464
  It.CommandUtils = void 0;
11458
11465
  var An = Lt,
11459
- fa = Ue,
11466
+ fa = qe,
11460
11467
  pa = nt,
11461
- kn = qe,
11468
+ kn = Ue,
11462
11469
  In = ze;
11463
11470
  var K = /*#__PURE__*/function () {
11464
11471
  function K() {
@@ -11561,8 +11568,8 @@ Object.defineProperty(pi, "__esModule", {
11561
11568
  value: !0
11562
11569
  });
11563
11570
  pi.Highlight = void 0;
11564
- var ma = Ue,
11565
- st = qe;
11571
+ var ma = qe,
11572
+ st = Ue;
11566
11573
  var Kt = /*#__PURE__*/function () {
11567
11574
  function Kt() {
11568
11575
  _classCallCheck(this, Kt);
@@ -11618,8 +11625,8 @@ Object.defineProperty(mi, "__esModule", {
11618
11625
  value: !0
11619
11626
  });
11620
11627
  mi.Padding = void 0;
11621
- var ga = Ue,
11622
- Ln = qe,
11628
+ var ga = qe,
11629
+ Ln = Ue,
11623
11630
  Ge = ze;
11624
11631
  var Yt = /*#__PURE__*/function () {
11625
11632
  function Yt() {
@@ -11689,10 +11696,10 @@ var Rn = hi,
11689
11696
  Nn = It,
11690
11697
  Dt = Lt,
11691
11698
  ki = pi,
11692
- se = Ue,
11699
+ se = qe,
11693
11700
  Ii = mi,
11694
11701
  On = nt,
11695
- Pn = qe,
11702
+ Pn = Ue,
11696
11703
  Li = ze;
11697
11704
  var va = /*#__PURE__*/function () {
11698
11705
  function va() {
@@ -12240,7 +12247,7 @@ bi.Azure = Qt;
12240
12247
  Object.defineProperty(xs, "__esModule", {
12241
12248
  value: !0
12242
12249
  });
12243
- var Un = di,
12250
+ var qn = di,
12244
12251
  wa = It,
12245
12252
  ie = gi,
12246
12253
  Ma = bi;
@@ -12258,12 +12265,12 @@ var Ke = /*#__PURE__*/function () {
12258
12265
  }, {
12259
12266
  key: "startWebSpeech",
12260
12267
  value: function startWebSpeech(e) {
12261
- Ke.stop() || (ie.GlobalState.service = new Un.WebSpeech(), ie.GlobalState.service.start(e));
12268
+ Ke.stop() || (ie.GlobalState.service = new qn.WebSpeech(), ie.GlobalState.service.start(e));
12262
12269
  }
12263
12270
  }, {
12264
12271
  key: "isWebSpeechSupported",
12265
12272
  value: function isWebSpeechSupported() {
12266
- return !!Un.WebSpeech.getAPI();
12273
+ return !!qn.WebSpeech.getAPI();
12267
12274
  }
12268
12275
  }, {
12269
12276
  key: "startAzure",
@@ -12477,11 +12484,11 @@ var z = /*#__PURE__*/function () {
12477
12484
  }]);
12478
12485
  return z;
12479
12486
  }();
12480
- var Le = /*#__PURE__*/function () {
12481
- function Le() {
12482
- _classCallCheck(this, Le);
12487
+ var Re = /*#__PURE__*/function () {
12488
+ function Re() {
12489
+ _classCallCheck(this, Re);
12483
12490
  }
12484
- _createClass(Le, null, [{
12491
+ _createClass(Re, null, [{
12485
12492
  key: "resetSubmit",
12486
12493
  value: function resetSubmit(e, t) {
12487
12494
  t ? e.unsetCustomStateStyles(["loading", "submit"]) : e.unsetCustomStateStyles(["stop", "loading", "submit"]), e.reapplyStateStyle("submit");
@@ -12497,16 +12504,16 @@ var Le = /*#__PURE__*/function () {
12497
12504
  }, {
12498
12505
  key: "setUpDisabledButton",
12499
12506
  value: function setUpDisabledButton(e) {
12500
- z.setPropertyValueIfDoesNotExist(e, ["submit", "container", "default", "backgroundColor"], ""), z.setPropertyValueIfDoesNotExist(e, ["disabled", "container", "default", "backgroundColor"], "unset"), z.setPropertyValueIfDoesNotExist(e.submit, ["svg", "styles", "default", "filter"], ""), z.setPropertyValueIfDoesNotExist(e.disabled, ["svg", "styles", "default", "filter"], "brightness(0) saturate(100%) invert(70%) sepia(0%) saturate(5564%) hue-rotate(207deg) brightness(100%) contrast(97%)"), Le.overwriteDefaultStyleWithSubmit(e, "disabled");
12507
+ z.setPropertyValueIfDoesNotExist(e, ["submit", "container", "default", "backgroundColor"], ""), z.setPropertyValueIfDoesNotExist(e, ["disabled", "container", "default", "backgroundColor"], "unset"), z.setPropertyValueIfDoesNotExist(e.submit, ["svg", "styles", "default", "filter"], ""), z.setPropertyValueIfDoesNotExist(e.disabled, ["svg", "styles", "default", "filter"], "brightness(0) saturate(100%) invert(70%) sepia(0%) saturate(5564%) hue-rotate(207deg) brightness(100%) contrast(97%)"), Re.overwriteDefaultStyleWithSubmit(e, "disabled");
12501
12508
  }
12502
12509
  }, {
12503
12510
  key: "process",
12504
12511
  value: function process(e) {
12505
12512
  var t = JSON.parse(JSON.stringify(e || {}));
12506
- return Le.overwriteDefaultStyleWithSubmit(t, "loading"), Le.overwriteDefaultStyleWithSubmit(t, "stop"), e != null && e.alwaysEnabled || Le.setUpDisabledButton(t), t;
12513
+ return Re.overwriteDefaultStyleWithSubmit(t, "loading"), Re.overwriteDefaultStyleWithSubmit(t, "stop"), e != null && e.alwaysEnabled || Re.setUpDisabledButton(t), t;
12507
12514
  }
12508
12515
  }]);
12509
- return Le;
12516
+ return Re;
12510
12517
  }();
12511
12518
  var Si = /*#__PURE__*/function (_Tt4) {
12512
12519
  _inherits(k, _Tt4);
@@ -12514,7 +12521,7 @@ var Si = /*#__PURE__*/function (_Tt4) {
12514
12521
  function k(e, t, i, n, r) {
12515
12522
  var _this66;
12516
12523
  _classCallCheck(this, k);
12517
- var o = Le.process(e.submitButtonStyles);
12524
+ var o = Re.process(e.submitButtonStyles);
12518
12525
  _this66 = _callSuper(this, k, [k.createButtonContainerElement(), o == null ? void 0 : o.position, o]), _this66._isSVGLoadingIconOverriden = !1, _this66.status = {
12519
12526
  requestInProgress: !1,
12520
12527
  loadingActive: !1
@@ -12568,7 +12575,7 @@ var Si = /*#__PURE__*/function (_Tt4) {
12568
12575
  abortStream: this._abortStream,
12569
12576
  stopClicked: this._stopClicked
12570
12577
  };
12571
- var t = this._serviceIO.deepChat.stream;
12578
+ var t = this._serviceIO.stream;
12572
12579
  _typeof(t) == "object" && typeof t.simulation == "number" && (this._serviceIO.streamHandlers.simulationInterim = t.simulation);
12573
12580
  }
12574
12581
  }, {
@@ -12618,7 +12625,7 @@ var Si = /*#__PURE__*/function (_Tt4) {
12618
12625
  return _regeneratorRuntime().wrap(function _callee110$(_context110) {
12619
12626
  while (1) switch (_context110.prev = _context110.next) {
12620
12627
  case 0:
12621
- typeof e == "string" && (e = Re.processSubmitUserMessage(e));
12628
+ typeof e == "string" && (e = Se.processSubmitUserMessage(e));
12622
12629
  t = {
12623
12630
  text: e.text
12624
12631
  };
@@ -12741,7 +12748,6 @@ var Si = /*#__PURE__*/function (_Tt4) {
12741
12748
  value: function changeToStopIcon() {
12742
12749
  this._serviceIO.websocket || (this.elementRef.classList.remove(k.LOADING_CLASS, k.DISABLED_CLASS, k.SUBMIT_CLASS), this.elementRef.replaceChildren(this._innerElements.stop), this.reapplyStateStyle("stop", ["loading", "submit"]), this.elementRef.onclick = this.stopStream.bind(this), this.status.loadingActive = !1);
12743
12750
  }
12744
- // WORK - animation needs to be lowered
12745
12751
  }, {
12746
12752
  key: "changeToLoadingIcon",
12747
12753
  value: function changeToLoadingIcon() {
@@ -12751,7 +12757,7 @@ var Si = /*#__PURE__*/function (_Tt4) {
12751
12757
  }, {
12752
12758
  key: "changeToSubmitIcon",
12753
12759
  value: function changeToSubmitIcon() {
12754
- this.elementRef.classList.contains(k.SUBMIT_CLASS) || (this.elementRef.classList.remove(k.LOADING_CLASS, k.DISABLED_CLASS), this.elementRef.classList.add(k.SUBMIT_CLASS), this.elementRef.replaceChildren(this._innerElements.submit), Le.resetSubmit(this, this.status.loadingActive), this.elementRef.onclick = this.submitFromInput.bind(this));
12760
+ this.elementRef.classList.contains(k.SUBMIT_CLASS) || (this.elementRef.classList.remove(k.LOADING_CLASS, k.DISABLED_CLASS), this.elementRef.classList.add(k.SUBMIT_CLASS), this.elementRef.replaceChildren(this._innerElements.submit), Re.resetSubmit(this, this.status.loadingActive), this.elementRef.onclick = this.submitFromInput.bind(this));
12755
12761
  }
12756
12762
  // called every time when user triggers an input via ValidationHandler - hence use class to check if not already present
12757
12763
  }, {
@@ -12973,7 +12979,7 @@ var mt = /*#__PURE__*/function () {
12973
12979
  button: new ei(e, r, t.addNewErrorMessage.bind(t))
12974
12980
  });
12975
12981
  var l = new Aa(e, r.inputElementRef, t, i, a);
12976
- r.submit = l.submitFromInput.bind(l), ke.attach(e, i, r, a, l), e.submitUserMessage = l.programmaticSubmit.bind(l), o.submit = {
12982
+ r.submit = l.submitFromInput.bind(l), Ie.attach(e, i, r, a, l), e.submitUserMessage = l.programmaticSubmit.bind(l), o.submit = {
12977
12983
  button: l
12978
12984
  }, mt.addElements(this.elementRef, r, o, n, a, e.dropupStyles);
12979
12985
  }
@@ -13043,19 +13049,19 @@ var on = /*#__PURE__*/function () {
13043
13049
  }
13044
13050
  _createClass(on, null, [{
13045
13051
  key: "createElements",
13046
- value: function createElements(e, t) {
13047
- var i = document.createElement("div");
13048
- i.id = "chat-view";
13049
- var n = new be(e, t);
13050
- t.websocket && B.createConnection(t, n);
13051
- var r = new mt(e, n, t, i);
13052
- return G.addElements(i, n.elementRef, r.elementRef), i;
13052
+ value: function createElements(e, t, i) {
13053
+ var n = document.createElement("div");
13054
+ n.id = "chat-view";
13055
+ var r = new be(e, t, i);
13056
+ t.websocket && B.createConnection(t, r);
13057
+ var o = new mt(e, r, t, n);
13058
+ return G.addElements(n, r.elementRef, o.elementRef), n;
13053
13059
  }
13054
13060
  }, {
13055
13061
  key: "render",
13056
- value: function render(e, t, i) {
13057
- var n = on.createElements(e, i);
13058
- t.replaceChildren(n);
13062
+ value: function render(e, t, i, n) {
13063
+ var r = on.createElements(e, i, n);
13064
+ t.replaceChildren(r);
13059
13065
  }
13060
13066
  }]);
13061
13067
  return on;
@@ -13063,7 +13069,7 @@ var on = /*#__PURE__*/function () {
13063
13069
  var Oa = "#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}.deep-chat-web-model-button{margin-top:10px;margin-bottom:5px;margin-left:1px}.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}:host{all:initial;display:table-cell}#container{height:inherit;width:inherit;overflow:hidden}\n";
13064
13070
  var Pa = Object.defineProperty,
13065
13071
  Da = Object.getOwnPropertyDescriptor,
13066
- E = function E(s, e, t, i) {
13072
+ _ = function _(s, e, t, i) {
13067
13073
  for (var n = i > 1 ? void 0 : i ? Da(e, t) : e, r = s.length - 1, o; r >= 0; r--) (o = s[r]) && (n = (i ? o(e, t, n) : o(n)) || n);
13068
13074
  return i && n && Pa(e, t, n), n;
13069
13075
  };
@@ -13096,7 +13102,8 @@ var y = /*#__PURE__*/function (_So) {
13096
13102
  }, {
13097
13103
  key: "onRender",
13098
13104
  value: function onRender() {
13099
- (!this._activeService || this._activeService.demo) && (this._activeService = $o.create(this)), this.auxiliaryStyle && !this._auxiliaryStyleApplied && (wi.apply(this.auxiliaryStyle, this.shadowRoot), this._auxiliaryStyleApplied = !0), wi.applyDefaultStyleToComponent(this.style, this.chatStyle), Re.checkForContainerStyles(this, this._elementRef), this._activeService.key && this._activeService.validateConfigKey ? Bt.render(this._elementRef, this.changeToChatView.bind(this), this._activeService) : !(this._activeService instanceof q) || this._activeService.key ? on.render(this, this._elementRef, this._activeService) : this._activeService instanceof q && P.render(this._elementRef, this.changeToChatView.bind(this), this._activeService), this._hasBeenRendered = !0, zt.onRender(this);
13105
+ var _this$_childElement;
13106
+ (!this._activeService || this._activeService.demo) && (this._activeService = $o.create(this)), this.auxiliaryStyle && !this._auxiliaryStyleApplied && (wi.apply(this.auxiliaryStyle, this.shadowRoot), this._auxiliaryStyleApplied = !0), wi.applyDefaultStyleToComponent(this.style, this.chatStyle), Se.checkForContainerStyles(this, this._elementRef), this._activeService.key && this._activeService.validateConfigKey ? Bt.render(this._elementRef, this.changeToChatView.bind(this), this._activeService) : !(this._activeService instanceof U) || this._activeService.key ? ((_this$_childElement = this._childElement) !== null && _this$_childElement !== void 0 ? _this$_childElement : this._childElement = this.children[0], on.render(this, this._elementRef, this._activeService, this._childElement)) : this._activeService instanceof U && P.render(this._elementRef, this.changeToChatView.bind(this), this._activeService), this._hasBeenRendered = !0, zt.onRender(this);
13100
13107
  }
13101
13108
  }, {
13102
13109
  key: "disconnectedCallback",
@@ -13106,44 +13113,43 @@ var y = /*#__PURE__*/function (_So) {
13106
13113
  }]);
13107
13114
  return y;
13108
13115
  }(So);
13109
- E([x("object")], y.prototype, "directConnection", 2);
13110
- E([x("object")], y.prototype, "request", 2);
13111
- E([x("object")], y.prototype, "webModel", 2);
13112
- E([x("object")], y.prototype, "stream", 2);
13113
- E([x("object")], y.prototype, "requestBodyLimits", 2);
13114
- E([x("function")], y.prototype, "requestInterceptor", 2);
13115
- E([x("function")], y.prototype, "responseInterceptor", 2);
13116
- E([x("function")], y.prototype, "validateInput", 2);
13117
- E([x("object")], y.prototype, "chatStyle", 2);
13118
- E([x("object")], y.prototype, "attachmentContainerStyle", 2);
13119
- E([x("object")], y.prototype, "dropupStyles", 2);
13120
- E([x("object")], y.prototype, "inputAreaStyle", 2);
13121
- E([x("object")], y.prototype, "textInput", 2);
13122
- E([x("object")], y.prototype, "submitButtonStyles", 2);
13123
- E([x("string")], y.prototype, "auxiliaryStyle", 2);
13124
- E([x("array")], y.prototype, "initialMessages", 2);
13125
- E([x("object")], y.prototype, "introMessage", 2);
13126
- E([x("object")], y.prototype, "avatars", 2);
13127
- E([x("object")], y.prototype, "names", 2);
13128
- E([x("boolean")], y.prototype, "displayLoadingBubble", 2);
13129
- E([x("object")], y.prototype, "errorMessages", 2);
13130
- E([x("object")], y.prototype, "messageStyles", 2);
13131
- E([x("object")], y.prototype, "textToSpeech", 2);
13132
- E([x("object")], y.prototype, "speechToText", 2);
13133
- E([x("object")], y.prototype, "images", 2);
13134
- E([x("object")], y.prototype, "gifs", 2);
13135
- E([x("object")], y.prototype, "camera", 2);
13136
- E([x("object")], y.prototype, "audio", 2);
13137
- E([x("object")], y.prototype, "microphone", 2);
13138
- E([x("object")], y.prototype, "mixedFiles", 2);
13139
- E([x("object")], y.prototype, "dragAndDrop", 2);
13140
- E([x("object")], y.prototype, "introPanelStyle", 2);
13141
- E([x("object")], y.prototype, "htmlClassUtilities", 2);
13142
- E([x("function")], y.prototype, "onNewMessage", 2);
13143
- E([x("function")], y.prototype, "onClearMessages", 2);
13144
- E([x("function")], y.prototype, "onComponentRender", 2);
13145
- E([x("function")], y.prototype, "onError", 2);
13146
- E([x("object")], y.prototype, "demo", 2);
13147
- E([x("object")], y.prototype, "_insertKeyViewStyles", 2);
13116
+ _([E("object")], y.prototype, "directConnection", 2);
13117
+ _([E("object")], y.prototype, "request", 2);
13118
+ _([E("object")], y.prototype, "webModel", 2);
13119
+ _([E("object")], y.prototype, "requestBodyLimits", 2);
13120
+ _([E("function")], y.prototype, "requestInterceptor", 2);
13121
+ _([E("function")], y.prototype, "responseInterceptor", 2);
13122
+ _([E("function")], y.prototype, "validateInput", 2);
13123
+ _([E("object")], y.prototype, "chatStyle", 2);
13124
+ _([E("object")], y.prototype, "attachmentContainerStyle", 2);
13125
+ _([E("object")], y.prototype, "dropupStyles", 2);
13126
+ _([E("object")], y.prototype, "inputAreaStyle", 2);
13127
+ _([E("object")], y.prototype, "textInput", 2);
13128
+ _([E("object")], y.prototype, "submitButtonStyles", 2);
13129
+ _([E("string")], y.prototype, "auxiliaryStyle", 2);
13130
+ _([E("array")], y.prototype, "history", 2);
13131
+ _([E("object")], y.prototype, "introMessage", 2);
13132
+ _([E("object")], y.prototype, "avatars", 2);
13133
+ _([E("object")], y.prototype, "names", 2);
13134
+ _([E("boolean")], y.prototype, "displayLoadingBubble", 2);
13135
+ _([E("object")], y.prototype, "errorMessages", 2);
13136
+ _([E("object")], y.prototype, "messageStyles", 2);
13137
+ _([E("object")], y.prototype, "textToSpeech", 2);
13138
+ _([E("object")], y.prototype, "speechToText", 2);
13139
+ _([E("object")], y.prototype, "images", 2);
13140
+ _([E("object")], y.prototype, "gifs", 2);
13141
+ _([E("object")], y.prototype, "camera", 2);
13142
+ _([E("object")], y.prototype, "audio", 2);
13143
+ _([E("object")], y.prototype, "microphone", 2);
13144
+ _([E("object")], y.prototype, "mixedFiles", 2);
13145
+ _([E("object")], y.prototype, "dragAndDrop", 2);
13146
+ _([E("object")], y.prototype, "introPanelStyle", 2);
13147
+ _([E("object")], y.prototype, "htmlClassUtilities", 2);
13148
+ _([E("function")], y.prototype, "onNewMessage", 2);
13149
+ _([E("function")], y.prototype, "onClearMessages", 2);
13150
+ _([E("function")], y.prototype, "onComponentRender", 2);
13151
+ _([E("function")], y.prototype, "onError", 2);
13152
+ _([E("object")], y.prototype, "demo", 2);
13153
+ _([E("object")], y.prototype, "_insertKeyViewStyles", 2);
13148
13154
  customElements.define("deep-chat", y);
13149
13155
  export { y as DeepChat };