deep-chat-dev 9.0.266 → 9.0.267
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/custom-elements.json +3839 -3809
- package/dist/deepChat.bundle.js +1 -1
- package/dist/deepChat.js +366 -332
- package/dist/services/openAI/realtime/openAIRealtimeIO.d.ts +3 -0
- package/dist/services/openAI/realtime/openAIRealtimeIO.d.ts.map +1 -1
- package/dist/types/openAIRealtime.d.ts +5 -0
- package/dist/types/openAIRealtime.d.ts.map +1 -1
- package/dist/types/stream.d.ts +2 -0
- package/dist/types/stream.d.ts.map +1 -1
- package/dist/types/streamWrapper.d.ts +8 -0
- package/dist/types/streamWrapper.d.ts.map +1 -0
- package/dist/views/chat/messages/stream/messageStream.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/deepChat.js
CHANGED
@@ -9653,9 +9653,10 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
|
|
9653
9653
|
var s = (r = t.openAI) == null ? void 0 : r.realtime;
|
9654
9654
|
if (_typeof(s) == "object") {
|
9655
9655
|
_this38._avatarConfig = s.avatar, _this38._ephemeralKey = s.ephemeralKey, _this38._errorConfig = s.error, _this38._loadingConfig = s.loading, Object.assign(_this38.rawBody, s.config);
|
9656
|
-
var
|
9657
|
-
|
9658
|
-
|
9656
|
+
var c = (a = (o = e.directConnection) == null ? void 0 : o.openAI) == null ? void 0 : a.realtime,
|
9657
|
+
_ref26 = c.config || {},
|
9658
|
+
d = _ref26.function_handler;
|
9659
|
+
d && (_this38._functionHandler = d), _this38._events = s.events, c.methods = _this38.generateMethods();
|
9659
9660
|
}
|
9660
9661
|
(_l$model = (l = _this38.rawBody).model) !== null && _l$model !== void 0 ? _l$model : l.model = "gpt-4o-realtime-preview-2024-12-17", _this38._avatarConfig = C.buildAvatarConfig(s), _this38._buttonsConfig = C.buildButtonsConfig(s), _this38._avatarEl = C.createAvatar(_this38._avatarConfig), _this38._containerEl = _this38.createContainer(), _this38._deepChat = e;
|
9661
9662
|
return _this38;
|
@@ -9816,6 +9817,32 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
|
|
9816
9817
|
}
|
9817
9818
|
return getEphemeralKey;
|
9818
9819
|
}()
|
9820
|
+
}, {
|
9821
|
+
key: "generateMethods",
|
9822
|
+
value: function generateMethods() {
|
9823
|
+
var _this39 = this;
|
9824
|
+
return {
|
9825
|
+
updateConfig: function updateConfig(e) {
|
9826
|
+
var t;
|
9827
|
+
(t = _this39._dc) == null || t.send(JSON.stringify({
|
9828
|
+
type: "session.update",
|
9829
|
+
session: e
|
9830
|
+
}));
|
9831
|
+
},
|
9832
|
+
sendMessage: function sendMessage(e, t) {
|
9833
|
+
var i = t || "system",
|
9834
|
+
r = {
|
9835
|
+
role: i,
|
9836
|
+
type: "message",
|
9837
|
+
content: [{
|
9838
|
+
type: i === "system" || i === "user" ? "input_text" : "text",
|
9839
|
+
text: e
|
9840
|
+
}]
|
9841
|
+
};
|
9842
|
+
_this39.sendMessage(r);
|
9843
|
+
}
|
9844
|
+
};
|
9845
|
+
}
|
9819
9846
|
}, {
|
9820
9847
|
key: "createContainer",
|
9821
9848
|
value: function createContainer() {
|
@@ -9843,11 +9870,11 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
|
|
9843
9870
|
}, {
|
9844
9871
|
key: "createMicophoneButton",
|
9845
9872
|
value: function createMicophoneButton() {
|
9846
|
-
var
|
9873
|
+
var _this40 = this;
|
9847
9874
|
var t;
|
9848
9875
|
var e = new ki((t = this._buttonsConfig) == null ? void 0 : t.microphone);
|
9849
9876
|
return e.elementRef.classList.add(C.BUTTON_DEFAULT, "deep-chat-openai-realtime-microphone"), e.elementRef.onclick = function () {
|
9850
|
-
e.isActive ? (
|
9877
|
+
e.isActive ? (_this40.toggleMicorphone(!0), e.elementRef.classList.replace(C.MICROPHONE_ACTIVE, C.BUTTON_DEFAULT), e.changeToDefault(), _this40._isMuted = !1) : (_this40.toggleMicorphone(!1), e.elementRef.classList.replace(C.BUTTON_DEFAULT, C.MICROPHONE_ACTIVE), N.removeAriaAttributes(e.elementRef), e.changeToActive(), _this40._isMuted = !0);
|
9851
9878
|
}, e;
|
9852
9879
|
}
|
9853
9880
|
}, {
|
@@ -9861,7 +9888,7 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
|
|
9861
9888
|
}, {
|
9862
9889
|
key: "createToggleButton",
|
9863
9890
|
value: function createToggleButton() {
|
9864
|
-
var
|
9891
|
+
var _this41 = this;
|
9865
9892
|
var t;
|
9866
9893
|
var e = new ki((t = this._buttonsConfig) == null ? void 0 : t.toggle);
|
9867
9894
|
return e.elementRef.classList.add(C.BUTTON_DEFAULT, "deep-chat-openai-realtime-toggle"), e.elementRef.onclick = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee91() {
|
@@ -9873,52 +9900,52 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
|
|
9873
9900
|
_context91.next = 4;
|
9874
9901
|
break;
|
9875
9902
|
}
|
9876
|
-
e.changeToDefault(),
|
9903
|
+
e.changeToDefault(), _this41.stop();
|
9877
9904
|
_context91.next = 30;
|
9878
9905
|
break;
|
9879
9906
|
case 4:
|
9880
9907
|
_context91.prev = 4;
|
9881
|
-
if (!
|
9908
|
+
if (!_this41._ephemeralKey) {
|
9882
9909
|
_context91.next = 11;
|
9883
9910
|
break;
|
9884
9911
|
}
|
9885
|
-
|
9912
|
+
_this41.displayLoading();
|
9886
9913
|
_context91.next = 9;
|
9887
|
-
return
|
9914
|
+
return _this41.init(_this41._ephemeralKey);
|
9888
9915
|
case 9:
|
9889
9916
|
_context91.next = 25;
|
9890
9917
|
break;
|
9891
9918
|
case 11:
|
9892
|
-
if (!
|
9919
|
+
if (!_this41._retrievingEphemeralKey) {
|
9893
9920
|
_context91.next = 22;
|
9894
9921
|
break;
|
9895
9922
|
}
|
9896
|
-
|
9923
|
+
_this41.displayLoading();
|
9897
9924
|
_context91.next = 15;
|
9898
|
-
return
|
9925
|
+
return _this41._retrievingEphemeralKey;
|
9899
9926
|
case 15:
|
9900
9927
|
s = _context91.sent;
|
9901
|
-
_context91.t0 = (i =
|
9928
|
+
_context91.t0 = (i = _this41._toggleButton) != null && i.isActive;
|
9902
9929
|
if (!_context91.t0) {
|
9903
9930
|
_context91.next = 20;
|
9904
9931
|
break;
|
9905
9932
|
}
|
9906
9933
|
_context91.next = 20;
|
9907
|
-
return
|
9934
|
+
return _this41.init(s);
|
9908
9935
|
case 20:
|
9909
9936
|
_context91.next = 25;
|
9910
9937
|
break;
|
9911
9938
|
case 22:
|
9912
|
-
|
9939
|
+
_this41.displayLoading();
|
9913
9940
|
_context91.next = 25;
|
9914
|
-
return
|
9941
|
+
return _this41.fetchEphemeralKey(!0);
|
9915
9942
|
case 25:
|
9916
9943
|
_context91.next = 30;
|
9917
9944
|
break;
|
9918
9945
|
case 27:
|
9919
9946
|
_context91.prev = 27;
|
9920
9947
|
_context91.t1 = _context91["catch"](4);
|
9921
|
-
console.error("Failed to start conversation:", _context91.t1),
|
9948
|
+
console.error("Failed to start conversation:", _context91.t1), _this41.displayError(), _this41.hideLoading();
|
9922
9949
|
case 30:
|
9923
9950
|
case "end":
|
9924
9951
|
return _context91.stop();
|
@@ -9930,8 +9957,8 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
|
|
9930
9957
|
key: "init",
|
9931
9958
|
value: function () {
|
9932
9959
|
var _init2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee94(e) {
|
9933
|
-
var
|
9934
|
-
var t, i, s, r, o, a, l, c
|
9960
|
+
var _this42 = this;
|
9961
|
+
var t, i, s, r, o, a, l, c;
|
9935
9962
|
return _regeneratorRuntime().wrap(function _callee94$(_context94) {
|
9936
9963
|
while (1) switch (_context94.prev = _context94.next) {
|
9937
9964
|
case 0:
|
@@ -9943,17 +9970,17 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
|
|
9943
9970
|
r.fftSize = 256;
|
9944
9971
|
o = new Uint8Array(r.frequencyBinCount);
|
9945
9972
|
this._pc.ontrack = /*#__PURE__*/function () {
|
9946
|
-
var _ref28 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee92(
|
9947
|
-
var
|
9973
|
+
var _ref28 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee92(a) {
|
9974
|
+
var l;
|
9948
9975
|
return _regeneratorRuntime().wrap(function _callee92$(_context92) {
|
9949
9976
|
while (1) switch (_context92.prev = _context92.next) {
|
9950
9977
|
case 0:
|
9951
|
-
if (!
|
9978
|
+
if (!a.streams[0]) {
|
9952
9979
|
_context92.next = 11;
|
9953
9980
|
break;
|
9954
9981
|
}
|
9955
|
-
i.srcObject =
|
9956
|
-
|
9982
|
+
i.srcObject = a.streams[0];
|
9983
|
+
l = s.createMediaStreamSource(a.streams[0]);
|
9957
9984
|
_context92.t0 = s.state === "suspended";
|
9958
9985
|
if (!_context92.t0) {
|
9959
9986
|
_context92.next = 7;
|
@@ -9962,12 +9989,12 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
|
|
9962
9989
|
_context92.next = 7;
|
9963
9990
|
return s.resume();
|
9964
9991
|
case 7:
|
9965
|
-
|
9966
|
-
|
9992
|
+
l.connect(r);
|
9993
|
+
_this42.monitorFrequencies(r, o);
|
9967
9994
|
_context92.next = 12;
|
9968
9995
|
break;
|
9969
9996
|
case 11:
|
9970
|
-
console.error("No streams found in the ontrack event."),
|
9997
|
+
console.error("No streams found in the ontrack event."), _this42.displayError();
|
9971
9998
|
case 12:
|
9972
9999
|
case "end":
|
9973
10000
|
return _context92.stop();
|
@@ -9981,54 +10008,54 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
|
|
9981
10008
|
_context94.next = 10;
|
9982
10009
|
return navigator.mediaDevices.getUserMedia({
|
9983
10010
|
audio: !0
|
9984
|
-
}).then(function (
|
9985
|
-
var
|
9986
|
-
t ===
|
9987
|
-
})["catch"](function (
|
9988
|
-
console.error("Error accessing microphone:",
|
10011
|
+
}).then(function (a) {
|
10012
|
+
var l;
|
10013
|
+
t === _this42._pc && (_this42._mediaStream = a, (l = _this42._pc) == null || l.addTrack(_this42._mediaStream.getTracks()[0]), _this42._isMuted && _this42.toggleMicorphone(!1));
|
10014
|
+
})["catch"](function (a) {
|
10015
|
+
console.error("Error accessing microphone:", a), _this42.displayError();
|
9989
10016
|
});
|
9990
10017
|
case 10:
|
9991
|
-
|
9992
|
-
|
9993
|
-
var _ref29 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee93(
|
9994
|
-
var d, u,
|
10018
|
+
this._dc = this._pc.createDataChannel("oai-events");
|
10019
|
+
this._dc.addEventListener("message", /*#__PURE__*/function () {
|
10020
|
+
var _ref29 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee93(a) {
|
10021
|
+
var c, d, u, l, f, m, p;
|
9995
10022
|
return _regeneratorRuntime().wrap(function _callee93$(_context93) {
|
9996
10023
|
while (1) switch (_context93.prev = _context93.next) {
|
9997
10024
|
case 0:
|
9998
|
-
|
9999
|
-
if (!(
|
10025
|
+
l = JSON.parse(a.data);
|
10026
|
+
if (!(l.type === "session.created")) {
|
10000
10027
|
_context93.next = 5;
|
10001
10028
|
break;
|
10002
10029
|
}
|
10003
|
-
|
10030
|
+
_this42.removeUnavailable(), _this42._toggleButton && (N.removeAriaAttributes(_this42._toggleButton.elementRef), _this42._toggleButton.changeToActive()), (d = (c = _this42._events) == null ? void 0 : c.started) == null || d.call(c), _this42._deepChat.dispatchEvent(new CustomEvent(Li.SESSION_STARTED)), _this42.hideLoading();
|
10004
10031
|
_context93.next = 20;
|
10005
10032
|
break;
|
10006
10033
|
case 5:
|
10007
|
-
if (!(
|
10034
|
+
if (!(l.type === "response.done")) {
|
10008
10035
|
_context93.next = 19;
|
10009
10036
|
break;
|
10010
10037
|
}
|
10011
|
-
|
10012
|
-
if (!((
|
10038
|
+
f = (u = JSON.parse(a.data).response.output) == null ? void 0 : u[0];
|
10039
|
+
if (!((f == null ? void 0 : f.type) === "function_call")) {
|
10013
10040
|
_context93.next = 17;
|
10014
10041
|
break;
|
10015
10042
|
}
|
10016
|
-
|
10043
|
+
m = f.name, p = f.call_id;
|
10017
10044
|
_context93.prev = 9;
|
10018
10045
|
_context93.next = 12;
|
10019
|
-
return
|
10046
|
+
return _this42.handleTool(m, f.arguments, p);
|
10020
10047
|
case 12:
|
10021
10048
|
_context93.next = 17;
|
10022
10049
|
break;
|
10023
10050
|
case 14:
|
10024
10051
|
_context93.prev = 14;
|
10025
10052
|
_context93.t0 = _context93["catch"](9);
|
10026
|
-
|
10053
|
+
_this42.stopOnError(_context93.t0);
|
10027
10054
|
case 17:
|
10028
10055
|
_context93.next = 20;
|
10029
10056
|
break;
|
10030
10057
|
case 19:
|
10031
|
-
|
10058
|
+
l.type === "error" ? _this42.stopOnError(l.error.message) : l.type === "invalid_request_error" ? _this42.stopOnError(l.message) : l.type;
|
10032
10059
|
case 20:
|
10033
10060
|
case "end":
|
10034
10061
|
return _context93.stop();
|
@@ -10043,14 +10070,14 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
|
|
10043
10070
|
_context94.next = 15;
|
10044
10071
|
return this._pc.createOffer();
|
10045
10072
|
case 15:
|
10046
|
-
|
10073
|
+
a = _context94.sent;
|
10047
10074
|
_context94.t0 = t !== this._pc;
|
10048
10075
|
if (_context94.t0) {
|
10049
10076
|
_context94.next = 21;
|
10050
10077
|
break;
|
10051
10078
|
}
|
10052
10079
|
_context94.next = 20;
|
10053
|
-
return this._pc.setLocalDescription(
|
10080
|
+
return this._pc.setLocalDescription(a);
|
10054
10081
|
case 20:
|
10055
10082
|
_context94.t0 = t !== this._pc;
|
10056
10083
|
case 21:
|
@@ -10063,14 +10090,14 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
|
|
10063
10090
|
_context94.next = 25;
|
10064
10091
|
return fetch("https://api.openai.com/v1/realtime", {
|
10065
10092
|
method: "POST",
|
10066
|
-
body:
|
10093
|
+
body: a.sdp,
|
10067
10094
|
headers: {
|
10068
10095
|
Authorization: "Bearer ".concat(e),
|
10069
10096
|
"Content-Type": "application/sdp"
|
10070
10097
|
}
|
10071
10098
|
});
|
10072
10099
|
case 25:
|
10073
|
-
|
10100
|
+
l = _context94.sent;
|
10074
10101
|
if (!(t !== this._pc)) {
|
10075
10102
|
_context94.next = 28;
|
10076
10103
|
break;
|
@@ -10078,10 +10105,10 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
|
|
10078
10105
|
return _context94.abrupt("return");
|
10079
10106
|
case 28:
|
10080
10107
|
_context94.next = 30;
|
10081
|
-
return
|
10108
|
+
return l.text();
|
10082
10109
|
case 30:
|
10083
10110
|
_context94.t1 = _context94.sent;
|
10084
|
-
|
10111
|
+
c = {
|
10085
10112
|
type: "answer",
|
10086
10113
|
sdp: _context94.t1
|
10087
10114
|
};
|
@@ -10091,7 +10118,7 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
|
|
10091
10118
|
break;
|
10092
10119
|
}
|
10093
10120
|
_context94.next = 36;
|
10094
|
-
return this._pc.setRemoteDescription(
|
10121
|
+
return this._pc.setRemoteDescription(c);
|
10095
10122
|
case 36:
|
10096
10123
|
_context94.t2 = t !== this._pc;
|
10097
10124
|
case 37:
|
@@ -10122,7 +10149,7 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
|
|
10122
10149
|
}, {
|
10123
10150
|
key: "monitorFrequencies",
|
10124
10151
|
value: function monitorFrequencies(e, t) {
|
10125
|
-
var
|
10152
|
+
var _this43 = this;
|
10126
10153
|
var i = function (_i3) {
|
10127
10154
|
function i() {
|
10128
10155
|
return _i3.apply(this, arguments);
|
@@ -10140,8 +10167,8 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
|
|
10140
10167
|
r = t.length * 255,
|
10141
10168
|
o = s / r * 100,
|
10142
10169
|
a = 1,
|
10143
|
-
l = a + o / 100 * (((c =
|
10144
|
-
|
10170
|
+
l = a + o / 100 * (((c = _this43._avatarConfig) == null ? void 0 : c.maxScale) - a);
|
10171
|
+
_this43._avatarEl.style.transform = "scale(".concat(l, ")"), requestAnimationFrame(i);
|
10145
10172
|
});
|
10146
10173
|
i();
|
10147
10174
|
}
|
@@ -10156,7 +10183,7 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
|
|
10156
10183
|
var e, t, i;
|
10157
10184
|
(e = this._mediaStream) == null || e.getTracks().forEach(function (s) {
|
10158
10185
|
return s.stop();
|
10159
|
-
}), this._mediaStream = null, this._pc && (this._pc.close(), this._pc = null, (i = (t = this._events) == null ? void 0 : t.stopped) == null || i.call(t));
|
10186
|
+
}), this._mediaStream = null, this._pc && (this._pc.close(), this._pc = null, (i = (t = this._events) == null ? void 0 : t.stopped) == null || i.call(t), this._dc = void 0);
|
10160
10187
|
}
|
10161
10188
|
}, {
|
10162
10189
|
key: "changeToUnavailable",
|
@@ -10213,8 +10240,8 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
|
|
10213
10240
|
}, {
|
10214
10241
|
key: "handleTool",
|
10215
10242
|
value: function () {
|
10216
|
-
var _handleTool = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee95(e, t, i
|
10217
|
-
var
|
10243
|
+
var _handleTool = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee95(e, t, i) {
|
10244
|
+
var s, r;
|
10218
10245
|
return _regeneratorRuntime().wrap(function _callee95$(_context95) {
|
10219
10246
|
while (1) switch (_context95.prev = _context95.next) {
|
10220
10247
|
case 0:
|
@@ -10230,37 +10257,44 @@ var Pn = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
|
|
10230
10257
|
arguments: t
|
10231
10258
|
});
|
10232
10259
|
case 4:
|
10233
|
-
|
10234
|
-
if (!(_typeof(
|
10260
|
+
s = _context95.sent;
|
10261
|
+
if (!(_typeof(s) != "object" || !z.isJson(s))) {
|
10235
10262
|
_context95.next = 7;
|
10236
10263
|
break;
|
10237
10264
|
}
|
10238
10265
|
throw Error('The `function_handler` response must be a JSON object, e.g. {response: "My response"}');
|
10239
10266
|
case 7:
|
10240
|
-
|
10241
|
-
type: "
|
10242
|
-
|
10243
|
-
|
10244
|
-
call_id: i,
|
10245
|
-
output: JSON.stringify(r)
|
10246
|
-
}
|
10247
|
-
});
|
10248
|
-
s.send(o);
|
10249
|
-
a = {
|
10250
|
-
type: "response.create"
|
10267
|
+
r = {
|
10268
|
+
type: "function_call_output",
|
10269
|
+
call_id: i,
|
10270
|
+
output: JSON.stringify(s)
|
10251
10271
|
};
|
10252
|
-
|
10253
|
-
case
|
10272
|
+
this.sendMessage(r);
|
10273
|
+
case 9:
|
10254
10274
|
case "end":
|
10255
10275
|
return _context95.stop();
|
10256
10276
|
}
|
10257
10277
|
}, _callee95, this);
|
10258
10278
|
}));
|
10259
|
-
function handleTool(_x173, _x174, _x175
|
10279
|
+
function handleTool(_x173, _x174, _x175) {
|
10260
10280
|
return _handleTool.apply(this, arguments);
|
10261
10281
|
}
|
10262
10282
|
return handleTool;
|
10263
|
-
}()
|
10283
|
+
}() // https://platform.openai.com/docs/api-reference/realtime-client-events/conversation/item/create
|
10284
|
+
}, {
|
10285
|
+
key: "sendMessage",
|
10286
|
+
value: function sendMessage(e) {
|
10287
|
+
if (!this._dc) return;
|
10288
|
+
var t = JSON.stringify({
|
10289
|
+
type: "conversation.item.create",
|
10290
|
+
item: e
|
10291
|
+
});
|
10292
|
+
this._dc.send(t);
|
10293
|
+
var i = {
|
10294
|
+
type: "response.create"
|
10295
|
+
};
|
10296
|
+
this._dc.send(JSON.stringify(i));
|
10297
|
+
}
|
10264
10298
|
}, {
|
10265
10299
|
key: "isCustomView",
|
10266
10300
|
value: function isCustomView() {
|
@@ -10323,15 +10357,15 @@ var cs = C;
|
|
10323
10357
|
var mt = /*#__PURE__*/function (_V6) {
|
10324
10358
|
function mt(e) {
|
10325
10359
|
var _o$model, _a$voice;
|
10326
|
-
var
|
10360
|
+
var _this44;
|
10327
10361
|
_classCallCheck(this, mt);
|
10328
10362
|
var r, o, a;
|
10329
10363
|
var t = JSON.parse(JSON.stringify(e.directConnection)),
|
10330
10364
|
i = t == null ? void 0 : t.openAI;
|
10331
|
-
|
10365
|
+
_this44 = _callSuper(this, mt, [e, L.buildKeyVerificationDetails(), L.buildHeaders, i]), _this44.insertKeyPlaceholderText = "OpenAI API Key", _this44.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this44.url = "https://api.openai.com/v1/audio/speech", _this44.permittedErrorPrefixes = ["Invalid"], _this44.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>OpenAI : Text To Speech</b></div>\n <p>Generate an audio file based on your text input.</p>\n <p>Click <a href=\"https://platform.openai.com/docs/guides/text-to-speech\">here</a> for more information.</p>";
|
10332
10366
|
var s = (r = t == null ? void 0 : t.openAI) == null ? void 0 : r.textToSpeech;
|
10333
|
-
_typeof(s) == "object" && Object.assign(
|
10334
|
-
return
|
10367
|
+
_typeof(s) == "object" && Object.assign(_this44.rawBody, s), (_o$model = (o = _this44.rawBody).model) !== null && _o$model !== void 0 ? _o$model : o.model = mt.DEFAULT_MODEL, (_a$voice = (a = _this44.rawBody).voice) !== null && _a$voice !== void 0 ? _a$voice : a.voice = mt.DEFAULT_VOIDE, _this44.textInputPlaceholderText = "Insert text to generate audio", _this44.rawBody.response_format = "mp3";
|
10368
|
+
return _this44;
|
10335
10369
|
}
|
10336
10370
|
_inherits(mt, _V6);
|
10337
10371
|
return _createClass(mt, [{
|
@@ -10365,7 +10399,7 @@ var mt = /*#__PURE__*/function (_V6) {
|
|
10365
10399
|
}
|
10366
10400
|
}, _callee96, this);
|
10367
10401
|
}));
|
10368
|
-
function callServiceAPI(
|
10402
|
+
function callServiceAPI(_x176, _x177) {
|
10369
10403
|
return _callServiceAPI10.apply(this, arguments);
|
10370
10404
|
}
|
10371
10405
|
return callServiceAPI;
|
@@ -10408,7 +10442,7 @@ var mt = /*#__PURE__*/function (_V6) {
|
|
10408
10442
|
}
|
10409
10443
|
}, _callee97);
|
10410
10444
|
}));
|
10411
|
-
function extractResultData(
|
10445
|
+
function extractResultData(_x178) {
|
10412
10446
|
return _extractResultData13.apply(this, arguments);
|
10413
10447
|
}
|
10414
10448
|
return extractResultData;
|
@@ -10420,17 +10454,17 @@ var ds = mt;
|
|
10420
10454
|
var pe = /*#__PURE__*/function (_V7) {
|
10421
10455
|
function pe(e) {
|
10422
10456
|
var _o$model2;
|
10423
|
-
var
|
10457
|
+
var _this45;
|
10424
10458
|
_classCallCheck(this, pe);
|
10425
10459
|
var r, o;
|
10426
10460
|
var t = JSON.parse(JSON.stringify(e.directConnection)),
|
10427
10461
|
i = t == null ? void 0 : t.openAI;
|
10428
|
-
|
10462
|
+
_this45 = _callSuper(this, pe, [e, L.buildKeyVerificationDetails(), L.buildHeaders, i, {
|
10429
10463
|
audio: {}
|
10430
|
-
}]),
|
10464
|
+
}]), _this45.insertKeyPlaceholderText = "OpenAI API Key", _this45.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this45.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>", _this45.url = "", _this45.permittedErrorPrefixes = ["Invalid"], _this45.textInputPlaceholderText = "Upload an audio file", _this45._service_url = pe.AUDIO_TRANSCRIPTIONS_URL;
|
10431
10465
|
var s = (r = t == null ? void 0 : t.openAI) == null ? void 0 : r.audio;
|
10432
|
-
_typeof(s) == "object" && (
|
10433
|
-
return
|
10466
|
+
_typeof(s) == "object" && (_this45.processConfig(s), pe.cleanConfig(s), Object.assign(_this45.rawBody, s)), (_o$model2 = (o = _this45.rawBody).model) !== null && _o$model2 !== void 0 ? _o$model2 : o.model = pe.DEFAULT_MODEL, _this45.rawBody.response_format = "json", _this45.canSendMessage = pe.canSendFileMessage;
|
10467
|
+
return _this45;
|
10434
10468
|
}
|
10435
10469
|
_inherits(pe, _V7);
|
10436
10470
|
return _createClass(pe, [{
|
@@ -10476,7 +10510,7 @@ var pe = /*#__PURE__*/function (_V7) {
|
|
10476
10510
|
}
|
10477
10511
|
}, _callee98, this);
|
10478
10512
|
}));
|
10479
|
-
function callServiceAPI(_x180, _x181
|
10513
|
+
function callServiceAPI(_x179, _x180, _x181) {
|
10480
10514
|
return _callServiceAPI11.apply(this, arguments);
|
10481
10515
|
}
|
10482
10516
|
return callServiceAPI;
|
@@ -10503,7 +10537,7 @@ var pe = /*#__PURE__*/function (_V7) {
|
|
10503
10537
|
}
|
10504
10538
|
}, _callee99);
|
10505
10539
|
}));
|
10506
|
-
function extractResultData(
|
10540
|
+
function extractResultData(_x182) {
|
10507
10541
|
return _extractResultData14.apply(this, arguments);
|
10508
10542
|
}
|
10509
10543
|
return extractResultData;
|
@@ -10634,12 +10668,12 @@ var fe = /*#__PURE__*/function () {
|
|
10634
10668
|
var Zo = /*#__PURE__*/function (_V8) {
|
10635
10669
|
// prettier-ignore
|
10636
10670
|
function Zo(e, t, i, s, r) {
|
10637
|
-
var
|
10671
|
+
var _this46;
|
10638
10672
|
_classCallCheck(this, Zo);
|
10639
|
-
|
10673
|
+
_this46 = _callSuper(this, Zo, [e, fe.buildLanguageKeyVerificationDetails(i), t, s, r]), _this46.insertKeyPlaceholderText = "Azure Language Subscription Key", _this46.keyHelpUrl =
|
10640
10674
|
// eslint-disable-next-line max-len
|
10641
|
-
"https://learn.microsoft.com/en-us/azure/api-management/api-management-subscriptions#create-and-manage-subscriptions-in-azure-portal",
|
10642
|
-
return
|
10675
|
+
"https://learn.microsoft.com/en-us/azure/api-management/api-management-subscriptions#create-and-manage-subscriptions-in-azure-portal", _this46.permittedErrorPrefixes = ["Access"];
|
10676
|
+
return _this46;
|
10643
10677
|
}
|
10644
10678
|
_inherits(Zo, _V8);
|
10645
10679
|
return _createClass(Zo);
|
@@ -10647,19 +10681,19 @@ var Zo = /*#__PURE__*/function (_V8) {
|
|
10647
10681
|
var Yt = /*#__PURE__*/function (_Zo) {
|
10648
10682
|
function Yt(e) {
|
10649
10683
|
var _a$language;
|
10650
|
-
var
|
10684
|
+
var _this47;
|
10651
10685
|
_classCallCheck(this, Yt);
|
10652
10686
|
var s, r, o, a;
|
10653
10687
|
var t = (r = (s = e.directConnection) == null ? void 0 : s.azure) == null ? void 0 : r.summarization,
|
10654
10688
|
i = (o = e.directConnection) == null ? void 0 : o.azure;
|
10655
|
-
|
10689
|
+
_this47 = _callSuper(this, Yt, [e, fe.buildSummarizationHeader, t.endpoint, i]), _this47.permittedErrorPrefixes = [Yt.ENDPOINT_ERROR_MESSAGE], _this47.url = "", _this47.textInputPlaceholderText = "Insert text to summarize", _this47.isTextInputDisabled = !1, t.endpoint ? ((_a$language = (a = _this47.rawBody).language) !== null && _a$language !== void 0 ? _a$language : a.language = "en", Object.assign(_this47.rawBody, t), _this47.url = "".concat(t.endpoint, "/language/analyze-text/jobs?api-version=2022-10-01-preview")) : (_this47.isTextInputDisabled = !0, _this47.canSendMessage = function () {
|
10656
10690
|
return !1;
|
10657
10691
|
}, setTimeout(function () {
|
10658
10692
|
e.addMessage({
|
10659
10693
|
error: Yt.ENDPOINT_ERROR_MESSAGE
|
10660
10694
|
});
|
10661
10695
|
}));
|
10662
|
-
return
|
10696
|
+
return _this47;
|
10663
10697
|
}
|
10664
10698
|
_inherits(Yt, _Zo);
|
10665
10699
|
return _createClass(Yt, [{
|
@@ -10701,7 +10735,7 @@ var Yt = /*#__PURE__*/function (_Zo) {
|
|
10701
10735
|
}
|
10702
10736
|
}, _callee100, this);
|
10703
10737
|
}));
|
10704
|
-
function callServiceAPI(
|
10738
|
+
function callServiceAPI(_x183, _x184) {
|
10705
10739
|
return _callServiceAPI12.apply(this, arguments);
|
10706
10740
|
}
|
10707
10741
|
return callServiceAPI;
|
@@ -10736,7 +10770,7 @@ var Yt = /*#__PURE__*/function (_Zo) {
|
|
10736
10770
|
}
|
10737
10771
|
}, _callee101, this);
|
10738
10772
|
}));
|
10739
|
-
function extractResultData(
|
10773
|
+
function extractResultData(_x185) {
|
10740
10774
|
return _extractResultData15.apply(this, arguments);
|
10741
10775
|
}
|
10742
10776
|
return extractResultData;
|
@@ -10796,7 +10830,7 @@ var Yt = /*#__PURE__*/function (_Zo) {
|
|
10796
10830
|
}
|
10797
10831
|
}, _callee102);
|
10798
10832
|
}));
|
10799
|
-
function extractPollResultData(
|
10833
|
+
function extractPollResultData(_x186) {
|
10800
10834
|
return _extractPollResultData5.apply(this, arguments);
|
10801
10835
|
}
|
10802
10836
|
return extractPollResultData;
|
@@ -10881,7 +10915,7 @@ var Vt = /*#__PURE__*/function () {
|
|
10881
10915
|
}
|
10882
10916
|
}, _callee103);
|
10883
10917
|
}));
|
10884
|
-
function poll(
|
10918
|
+
function poll(_x187, _x188) {
|
10885
10919
|
return _poll2.apply(this, arguments);
|
10886
10920
|
}
|
10887
10921
|
return poll;
|
@@ -10914,14 +10948,14 @@ var Vt = /*#__PURE__*/function () {
|
|
10914
10948
|
}();
|
10915
10949
|
var As = /*#__PURE__*/function (_V9) {
|
10916
10950
|
function As(e) {
|
10917
|
-
var
|
10951
|
+
var _this48;
|
10918
10952
|
_classCallCheck(this, As);
|
10919
10953
|
var i;
|
10920
10954
|
var t = (i = e.directConnection) == null ? void 0 : i.assemblyAI;
|
10921
|
-
|
10955
|
+
_this48 = _callSuper(this, As, [e, Vt.buildKeyVerificationDetails(), Vt.buildHeaders, t, {
|
10922
10956
|
audio: {}
|
10923
|
-
}]),
|
10924
|
-
return
|
10957
|
+
}]), _this48.insertKeyPlaceholderText = "AssemblyAI API Key", _this48.keyHelpUrl = "https://www.assemblyai.com/app/account", _this48.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>AssemblyAI Audio</b></div>\n <p><b>Upload an audio file</b> to transcribe it into text.\n <p>\n Click <a href=\"https://www.assemblyai.com/docs/Guides/transcribing_an_audio_file#get-started\">here</a> for more info.\n </p>", _this48.url = "https://api.assemblyai.com/v2/upload", _this48.isTextInputDisabled = !0, _this48.textInputPlaceholderText = "Upload an audio file", _this48.permittedErrorPrefixes = ["Authentication", "Invalid"], _this48.canSendMessage = As.canFileSendMessage;
|
10958
|
+
return _this48;
|
10925
10959
|
}
|
10926
10960
|
_inherits(As, _V9);
|
10927
10961
|
return _createClass(As, [{
|
@@ -10951,7 +10985,7 @@ var As = /*#__PURE__*/function (_V9) {
|
|
10951
10985
|
}
|
10952
10986
|
}, _callee104, this);
|
10953
10987
|
}));
|
10954
|
-
function callServiceAPI(_x190, _x191
|
10988
|
+
function callServiceAPI(_x189, _x190, _x191) {
|
10955
10989
|
return _callServiceAPI13.apply(this, arguments);
|
10956
10990
|
}
|
10957
10991
|
return callServiceAPI;
|
@@ -10984,7 +11018,7 @@ var As = /*#__PURE__*/function (_V9) {
|
|
10984
11018
|
}
|
10985
11019
|
}, _callee105, this);
|
10986
11020
|
}));
|
10987
|
-
function extractResultData(
|
11021
|
+
function extractResultData(_x192) {
|
10988
11022
|
return _extractResultData16.apply(this, arguments);
|
10989
11023
|
}
|
10990
11024
|
return extractResultData;
|
@@ -10999,12 +11033,12 @@ var As = /*#__PURE__*/function (_V9) {
|
|
10999
11033
|
var Nn = /*#__PURE__*/function (_V0) {
|
11000
11034
|
// prettier-ignore
|
11001
11035
|
function Nn(e, t, i, s, r) {
|
11002
|
-
var
|
11036
|
+
var _this49;
|
11003
11037
|
_classCallCheck(this, Nn);
|
11004
|
-
|
11038
|
+
_this49 = _callSuper(this, Nn, [e, fe.buildSpeechKeyVerificationDetails(i), t, s, r]), _this49.insertKeyPlaceholderText = "Azure Speech Subscription Key", _this49.keyHelpUrl =
|
11005
11039
|
// eslint-disable-next-line max-len
|
11006
11040
|
"https://learn.microsoft.com/en-us/azure/api-management/api-management-subscriptions#create-and-manage-subscriptions-in-azure-portal";
|
11007
|
-
return
|
11041
|
+
return _this49;
|
11008
11042
|
}
|
11009
11043
|
_inherits(Nn, _V0);
|
11010
11044
|
return _createClass(Nn);
|
@@ -11013,19 +11047,19 @@ var Qe = /*#__PURE__*/function (_Nn) {
|
|
11013
11047
|
// prettier-ignore
|
11014
11048
|
function Qe(e) {
|
11015
11049
|
var _a$lang, _l$name, _c$gender;
|
11016
|
-
var
|
11050
|
+
var _this50;
|
11017
11051
|
_classCallCheck(this, Qe);
|
11018
11052
|
var s, r, o, a, l, c;
|
11019
11053
|
var t = (r = (s = e.directConnection) == null ? void 0 : s.azure) == null ? void 0 : r.textToSpeech,
|
11020
11054
|
i = (o = e.directConnection) == null ? void 0 : o.azure;
|
11021
|
-
|
11055
|
+
_this50 = _callSuper(this, Qe, [e, fe.buildTextToSpeechHeaders.bind({}, (t == null ? void 0 : t.outputFormat) || "audio-16khz-128kbitrate-mono-mp3"), t.region, i]), _this50.permittedErrorPrefixes = [Qe.REGION_ERROR_MESSAGE], _this50.introPanelMarkUp = "\n <div style=\"width: 100%; text-align: center; margin-left: -10px\"><b>Azure Text To Speech</b></div>\n <p>Insert text to synthesize it to audio.\n <p>\n Click <a href=\"".concat(Qe.HELP_LINK, "\">here</a> for more info.\n </p>"), _this50.isTextInputDisabled = !1, _this50.url = "", t.region ? (Object.assign(_this50.rawBody, t), (_a$lang = (a = _this50.rawBody).lang) !== null && _a$lang !== void 0 ? _a$lang : a.lang = "en-US", (_l$name = (l = _this50.rawBody).name) !== null && _l$name !== void 0 ? _l$name : l.name = "en-US-JennyNeural", (_c$gender = (c = _this50.rawBody).gender) !== null && _c$gender !== void 0 ? _c$gender : c.gender = "Female", _this50.url = "https://".concat(t.region, ".tts.speech.microsoft.com/cognitiveservices/v1")) : (_this50.isTextInputDisabled = !0, _this50.canSendMessage = function () {
|
11022
11056
|
return !1;
|
11023
11057
|
}, setTimeout(function () {
|
11024
11058
|
e.addMessage({
|
11025
11059
|
error: Qe.REGION_ERROR_MESSAGE
|
11026
11060
|
});
|
11027
11061
|
}));
|
11028
|
-
return
|
11062
|
+
return _this50;
|
11029
11063
|
}
|
11030
11064
|
_inherits(Qe, _Nn);
|
11031
11065
|
return _createClass(Qe, [{
|
@@ -11056,7 +11090,7 @@ var Qe = /*#__PURE__*/function (_Nn) {
|
|
11056
11090
|
}
|
11057
11091
|
}, _callee106, this);
|
11058
11092
|
}));
|
11059
|
-
function callServiceAPI(
|
11093
|
+
function callServiceAPI(_x193, _x194) {
|
11060
11094
|
return _callServiceAPI14.apply(this, arguments);
|
11061
11095
|
}
|
11062
11096
|
return callServiceAPI;
|
@@ -11085,7 +11119,7 @@ var Qe = /*#__PURE__*/function (_Nn) {
|
|
11085
11119
|
}
|
11086
11120
|
}, _callee107);
|
11087
11121
|
}));
|
11088
|
-
function extractResultData(
|
11122
|
+
function extractResultData(_x195) {
|
11089
11123
|
return _extractResultData17.apply(this, arguments);
|
11090
11124
|
}
|
11091
11125
|
return extractResultData;
|
@@ -11100,7 +11134,7 @@ Qe.HELP_LINK =
|
|
11100
11134
|
var fs = Qe;
|
11101
11135
|
var Ke = /*#__PURE__*/function (_Nn2) {
|
11102
11136
|
function Ke(e) {
|
11103
|
-
var
|
11137
|
+
var _this51;
|
11104
11138
|
_classCallCheck(this, Ke);
|
11105
11139
|
var r, o, a;
|
11106
11140
|
var t = (o = (r = e.directConnection) == null ? void 0 : r.azure) == null ? void 0 : o.speechToText,
|
@@ -11112,18 +11146,18 @@ var Ke = /*#__PURE__*/function (_Nn2) {
|
|
11112
11146
|
}
|
11113
11147
|
}
|
11114
11148
|
};
|
11115
|
-
if (
|
11149
|
+
if (_this51 = _callSuper(this, Ke, [e, fe.buildSpeechToTextHeaders, t.region, i, s]), _this51.permittedErrorPrefixes = [Ke.REGION_ERROR_MESSAGE], _this51.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(Ke.HELP_LINK, "\">here</a> for more info.\n </p>"), _this51.url = "", _this51.isTextInputDisabled = !0, _this51.textInputPlaceholderText = "Upload an audio file", !t.region) _this51.isTextInputDisabled = !0, _this51.canSendMessage = function () {
|
11116
11150
|
return !1;
|
11117
11151
|
}, setTimeout(function () {
|
11118
11152
|
e.addMessage({
|
11119
11153
|
error: Ke.REGION_ERROR_MESSAGE
|
11120
11154
|
});
|
11121
11155
|
});else {
|
11122
|
-
|
11156
|
+
_this51.canSendMessage = Ke.canFileSendMessage;
|
11123
11157
|
var l = t.lang || "en-US";
|
11124
|
-
|
11158
|
+
_this51.url = "https://".concat(t.region, ".stt.speech.microsoft.com/speech/recognition/conversation/cognitiveservices/v1?language=").concat(l, "&format=detailed"), _this51.recordAudio = void 0;
|
11125
11159
|
}
|
11126
|
-
return
|
11160
|
+
return _this51;
|
11127
11161
|
}
|
11128
11162
|
_inherits(Ke, _Nn2);
|
11129
11163
|
return _createClass(Ke, [{
|
@@ -11153,7 +11187,7 @@ var Ke = /*#__PURE__*/function (_Nn2) {
|
|
11153
11187
|
}
|
11154
11188
|
}, _callee108, this);
|
11155
11189
|
}));
|
11156
|
-
function callServiceAPI(_x197, _x198
|
11190
|
+
function callServiceAPI(_x196, _x197, _x198) {
|
11157
11191
|
return _callServiceAPI15.apply(this, arguments);
|
11158
11192
|
}
|
11159
11193
|
return callServiceAPI;
|
@@ -11180,7 +11214,7 @@ var Ke = /*#__PURE__*/function (_Nn2) {
|
|
11180
11214
|
}
|
11181
11215
|
}, _callee109);
|
11182
11216
|
}));
|
11183
|
-
function extractResultData(
|
11217
|
+
function extractResultData(_x199) {
|
11184
11218
|
return _extractResultData18.apply(this, arguments);
|
11185
11219
|
}
|
11186
11220
|
return extractResultData;
|
@@ -11201,15 +11235,15 @@ var ps = Ke;
|
|
11201
11235
|
var Qo = /*#__PURE__*/function (_V1) {
|
11202
11236
|
// prettier-ignore
|
11203
11237
|
function Qo(e) {
|
11204
|
-
var
|
11238
|
+
var _this52;
|
11205
11239
|
_classCallCheck(this, Qo);
|
11206
11240
|
var s, r, o;
|
11207
11241
|
var t = (r = (s = e.directConnection) == null ? void 0 : s.azure) == null ? void 0 : r.translation,
|
11208
11242
|
i = (o = e.directConnection) == null ? void 0 : o.azure;
|
11209
|
-
|
11243
|
+
_this52 = _callSuper(this, Qo, [e, fe.buildTranslationKeyVerificationDetails(t.region), fe.buildTranslationHeaders.bind({}, t == null ? void 0 : t.region), i]), _this52.insertKeyPlaceholderText = "Azure Translate Subscription Key", _this52.keyHelpUrl =
|
11210
11244
|
// eslint-disable-next-line max-len
|
11211
|
-
"https://learn.microsoft.com/en-us/azure/api-management/api-management-subscriptions#create-and-manage-subscriptions-in-azure-portal",
|
11212
|
-
return
|
11245
|
+
"https://learn.microsoft.com/en-us/azure/api-management/api-management-subscriptions#create-and-manage-subscriptions-in-azure-portal", _this52.url = "", _this52.url = "https://api.cognitive.microsofttranslator.com/translate?api-version=3.0&to=".concat(t.language || "es");
|
11246
|
+
return _this52;
|
11213
11247
|
}
|
11214
11248
|
_inherits(Qo, _V1);
|
11215
11249
|
return _createClass(Qo, [{
|
@@ -11242,7 +11276,7 @@ var Qo = /*#__PURE__*/function (_V1) {
|
|
11242
11276
|
}
|
11243
11277
|
}, _callee110, this);
|
11244
11278
|
}));
|
11245
|
-
function callServiceAPI(
|
11279
|
+
function callServiceAPI(_x200, _x201) {
|
11246
11280
|
return _callServiceAPI16.apply(this, arguments);
|
11247
11281
|
}
|
11248
11282
|
return callServiceAPI;
|
@@ -11270,7 +11304,7 @@ var Qo = /*#__PURE__*/function (_V1) {
|
|
11270
11304
|
}
|
11271
11305
|
}, _callee111);
|
11272
11306
|
}));
|
11273
|
-
function extractResultData(
|
11307
|
+
function extractResultData(_x202) {
|
11274
11308
|
return _extractResultData19.apply(this, arguments);
|
11275
11309
|
}
|
11276
11310
|
return extractResultData;
|
@@ -11280,23 +11314,23 @@ var Qo = /*#__PURE__*/function (_V1) {
|
|
11280
11314
|
var bt = /*#__PURE__*/function (_V10) {
|
11281
11315
|
// prettier-ignore
|
11282
11316
|
function bt(e, t, i, s, r) {
|
11283
|
-
var
|
11284
|
-
var
|
11317
|
+
var _this53$maxMessages, _p$model;
|
11318
|
+
var _this53;
|
11285
11319
|
_classCallCheck(this, bt);
|
11286
11320
|
var u, h, f, m, p;
|
11287
11321
|
var o = JSON.parse(JSON.stringify(e.directConnection)),
|
11288
11322
|
a = t || L.buildKeyVerificationDetails(),
|
11289
11323
|
l = i || L.buildHeaders,
|
11290
11324
|
c = s || o.openAI;
|
11291
|
-
|
11325
|
+
_this53 = _callSuper(this, bt, [e, a, l, c]), _this53.insertKeyPlaceholderText = "OpenAI API Key", _this53.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this53.url = "https://api.openai.com/v1/chat/completions", _this53.permittedErrorPrefixes = ["Incorrect"], _this53.asyncCallInProgress = !1, _this53._systemMessage = bt.generateSystemMessage("You are a helpful assistant.");
|
11292
11326
|
var d = r || ((u = o.openAI) == null ? void 0 : u.chat);
|
11293
11327
|
if (_typeof(d) == "object") {
|
11294
|
-
d.system_prompt && (
|
11328
|
+
d.system_prompt && (_this53._systemMessage = bt.generateSystemMessage(d.system_prompt));
|
11295
11329
|
var g = (m = (f = (h = e.directConnection) == null ? void 0 : h.openAI) == null ? void 0 : f.chat) == null ? void 0 : m.function_handler;
|
11296
|
-
g && (
|
11330
|
+
g && (_this53._functionHandler = g), _this53.cleanConfig(d), Object.assign(_this53.rawBody, d);
|
11297
11331
|
}
|
11298
|
-
(
|
11299
|
-
return
|
11332
|
+
(_this53$maxMessages = _this53.maxMessages) !== null && _this53$maxMessages !== void 0 ? _this53$maxMessages : _this53.maxMessages = -1, (_p$model = (p = _this53.rawBody).model) !== null && _p$model !== void 0 ? _p$model : p.model = "gpt-4o";
|
11333
|
+
return _this53;
|
11300
11334
|
}
|
11301
11335
|
_inherits(bt, _V10);
|
11302
11336
|
return _createClass(bt, [{
|
@@ -11343,7 +11377,7 @@ var bt = /*#__PURE__*/function (_V10) {
|
|
11343
11377
|
}
|
11344
11378
|
}, _callee112, this);
|
11345
11379
|
}));
|
11346
|
-
function callServiceAPI(
|
11380
|
+
function callServiceAPI(_x203, _x204) {
|
11347
11381
|
return _callServiceAPI17.apply(this, arguments);
|
11348
11382
|
}
|
11349
11383
|
return callServiceAPI;
|
@@ -11373,7 +11407,7 @@ var bt = /*#__PURE__*/function (_V10) {
|
|
11373
11407
|
}
|
11374
11408
|
}, _callee113, this);
|
11375
11409
|
}));
|
11376
|
-
function extractResultData(_x206, _x207
|
11410
|
+
function extractResultData(_x205, _x206, _x207) {
|
11377
11411
|
return _extractResultData20.apply(this, arguments);
|
11378
11412
|
}
|
11379
11413
|
return extractResultData;
|
@@ -11382,7 +11416,7 @@ var bt = /*#__PURE__*/function (_V10) {
|
|
11382
11416
|
key: "extractStreamResult",
|
11383
11417
|
value: function () {
|
11384
11418
|
var _extractStreamResult = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee114(e, t, i) {
|
11385
|
-
var
|
11419
|
+
var _this54 = this;
|
11386
11420
|
var s, r, o;
|
11387
11421
|
return _regeneratorRuntime().wrap(function _callee114$(_context114) {
|
11388
11422
|
while (1) switch (_context114.prev = _context114.next) {
|
@@ -11399,7 +11433,7 @@ var bt = /*#__PURE__*/function (_V10) {
|
|
11399
11433
|
return _context114.abrupt("return", (this._streamToolCalls = void 0, this.handleTools(o, t, i)));
|
11400
11434
|
case 7:
|
11401
11435
|
s != null && s.tool_calls && (this._streamToolCalls ? s.tool_calls.forEach(function (o, a) {
|
11402
|
-
|
11436
|
+
_this54._streamToolCalls && (_this54._streamToolCalls[a]["function"].arguments += o["function"].arguments);
|
11403
11437
|
}) : this._streamToolCalls = s.tool_calls);
|
11404
11438
|
case 8:
|
11405
11439
|
return _context114.abrupt("return", {
|
@@ -11411,7 +11445,7 @@ var bt = /*#__PURE__*/function (_V10) {
|
|
11411
11445
|
}
|
11412
11446
|
}, _callee114, this);
|
11413
11447
|
}));
|
11414
|
-
function extractStreamResult(_x209, _x210
|
11448
|
+
function extractStreamResult(_x208, _x209, _x210) {
|
11415
11449
|
return _extractStreamResult.apply(this, arguments);
|
11416
11450
|
}
|
11417
11451
|
return extractStreamResult;
|
@@ -11537,7 +11571,7 @@ var bt = /*#__PURE__*/function (_V10) {
|
|
11537
11571
|
}
|
11538
11572
|
}, _callee115, this, [[25, 40]]);
|
11539
11573
|
}));
|
11540
|
-
function handleTools(_x212, _x213
|
11574
|
+
function handleTools(_x211, _x212, _x213) {
|
11541
11575
|
return _handleTools2.apply(this, arguments);
|
11542
11576
|
}
|
11543
11577
|
return handleTools;
|
@@ -11573,26 +11607,26 @@ var bt = /*#__PURE__*/function (_V10) {
|
|
11573
11607
|
}(V);
|
11574
11608
|
var Ts = /*#__PURE__*/function (_bt) {
|
11575
11609
|
function Ts(e) {
|
11576
|
-
var
|
11610
|
+
var _this55;
|
11577
11611
|
_classCallCheck(this, Ts);
|
11578
11612
|
var o, a, l, c, d, u, h;
|
11579
11613
|
var t = JSON.parse(JSON.stringify(e.directConnection)),
|
11580
11614
|
i = t.azure,
|
11581
11615
|
s = ((a = (o = t.azure) == null ? void 0 : o.openAI) == null ? void 0 : a.urlDetails) || {},
|
11582
11616
|
r = (c = (l = t.azure) == null ? void 0 : l.openAI) == null ? void 0 : c.chat;
|
11583
|
-
if (
|
11617
|
+
if (_this55 = _callSuper(this, Ts, [e, ue.buildKeyVerificationDetails(s), ue.buildHeaders, i, r]), _this55.permittedErrorPrefixes = [ue.URL_DETAILS_ERROR_MESSAGE], _this55.isTextInputDisabled = !1, _typeof(r) == "object") {
|
11584
11618
|
var _ref31 = (h = (u = (d = e.directConnection) == null ? void 0 : d.azure) == null ? void 0 : u.openAI) == null ? void 0 : h.chat,
|
11585
11619
|
f = _ref31.function_handler;
|
11586
|
-
f && (
|
11620
|
+
f && (_this55._functionHandler = f);
|
11587
11621
|
}
|
11588
|
-
ue.validateURLDetails(s) ?
|
11622
|
+
ue.validateURLDetails(s) ? _this55.url = Ts.buildURL(s) : (_this55.isTextInputDisabled = !0, _this55.canSendMessage = function () {
|
11589
11623
|
return !1;
|
11590
11624
|
}, setTimeout(function () {
|
11591
11625
|
e.addMessage({
|
11592
11626
|
error: ue.URL_DETAILS_ERROR_MESSAGE
|
11593
11627
|
});
|
11594
11628
|
}));
|
11595
|
-
return
|
11629
|
+
return _this55;
|
11596
11630
|
}
|
11597
11631
|
_inherits(Ts, _bt);
|
11598
11632
|
return _createClass(Ts, null, [{
|
@@ -11607,7 +11641,7 @@ var Ts = /*#__PURE__*/function (_bt) {
|
|
11607
11641
|
}(bt);
|
11608
11642
|
var me = /*#__PURE__*/function (_V11) {
|
11609
11643
|
function me(e) {
|
11610
|
-
var
|
11644
|
+
var _this56;
|
11611
11645
|
_classCallCheck(this, me);
|
11612
11646
|
var o;
|
11613
11647
|
var t = e.directConnection,
|
@@ -11620,19 +11654,19 @@ var me = /*#__PURE__*/function (_V11) {
|
|
11620
11654
|
}
|
11621
11655
|
}
|
11622
11656
|
};
|
11623
|
-
|
11657
|
+
_this56 = _callSuper(this, me, [e, L.buildKeyVerificationDetails(), L.buildHeaders, i, s]), _this56.insertKeyPlaceholderText = "OpenAI API Key", _this56.keyHelpUrl = "https://platform.openai.com/account/api-keys", _this56.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>", _this56.url = "", _this56.permittedErrorPrefixes = ["Incorrect", "Invalid input image"];
|
11624
11658
|
var r = (o = t == null ? void 0 : t.openAI) == null ? void 0 : o.images;
|
11625
|
-
if (
|
11659
|
+
if (_this56.camera) {
|
11626
11660
|
var a = _typeof(r) == "object" && r.size ? Number.parseInt(r.size) : 1024;
|
11627
|
-
|
11661
|
+
_this56.camera.files = {
|
11628
11662
|
dimensions: {
|
11629
11663
|
width: a,
|
11630
11664
|
height: a
|
11631
11665
|
}
|
11632
11666
|
};
|
11633
11667
|
}
|
11634
|
-
_typeof(r) == "object" && Object.assign(
|
11635
|
-
return
|
11668
|
+
_typeof(r) == "object" && Object.assign(_this56.rawBody, r), _this56.canSendMessage = me.canFileSendMessage;
|
11669
|
+
return _this56;
|
11636
11670
|
}
|
11637
11671
|
_inherits(me, _V11);
|
11638
11672
|
return _createClass(me, [{
|
@@ -11692,7 +11726,7 @@ var me = /*#__PURE__*/function (_V11) {
|
|
11692
11726
|
}
|
11693
11727
|
}, _callee116, this);
|
11694
11728
|
}));
|
11695
|
-
function callServiceAPI(_x215, _x216
|
11729
|
+
function callServiceAPI(_x214, _x215, _x216) {
|
11696
11730
|
return _callServiceAPI18.apply(this, arguments);
|
11697
11731
|
}
|
11698
11732
|
return callServiceAPI;
|
@@ -11727,7 +11761,7 @@ var me = /*#__PURE__*/function (_V11) {
|
|
11727
11761
|
}
|
11728
11762
|
}, _callee117);
|
11729
11763
|
}));
|
11730
|
-
function extractResultData(
|
11764
|
+
function extractResultData(_x217) {
|
11731
11765
|
return _extractResultData21.apply(this, arguments);
|
11732
11766
|
}
|
11733
11767
|
return extractResultData;
|
@@ -11759,15 +11793,15 @@ me.IMAGE_GENERATION_URL = "https://api.openai.com/v1/images/generations", me.IMA
|
|
11759
11793
|
var ms = me;
|
11760
11794
|
var ea = /*#__PURE__*/function (_ws3) {
|
11761
11795
|
function ea(e) {
|
11762
|
-
var
|
11763
|
-
var
|
11796
|
+
var _this57$maxMessages;
|
11797
|
+
var _this57;
|
11764
11798
|
_classCallCheck(this, ea);
|
11765
11799
|
var r;
|
11766
11800
|
var t = JSON.parse(JSON.stringify(e.directConnection)),
|
11767
11801
|
i = (r = t.cohere) == null ? void 0 : r.chat,
|
11768
11802
|
s = t.cohere;
|
11769
|
-
|
11770
|
-
return
|
11803
|
+
_this57 = _callSuper(this, ea, [e, "https://api.cohere.ai/v1/chat", "Ask me anything!", i, s]), _typeof(i) == "object" && Object.assign(_this57.rawBody, i), (_this57$maxMessages = _this57.maxMessages) !== null && _this57$maxMessages !== void 0 ? _this57$maxMessages : _this57.maxMessages = -1;
|
11804
|
+
return _this57;
|
11771
11805
|
}
|
11772
11806
|
_inherits(ea, _ws3);
|
11773
11807
|
return _createClass(ea, [{
|
@@ -11806,7 +11840,7 @@ var ea = /*#__PURE__*/function (_ws3) {
|
|
11806
11840
|
}
|
11807
11841
|
}, _callee118, this);
|
11808
11842
|
}));
|
11809
|
-
function callServiceAPI(
|
11843
|
+
function callServiceAPI(_x218, _x219) {
|
11810
11844
|
return _callServiceAPI19.apply(this, arguments);
|
11811
11845
|
}
|
11812
11846
|
return callServiceAPI;
|
@@ -11833,7 +11867,7 @@ var ea = /*#__PURE__*/function (_ws3) {
|
|
11833
11867
|
}
|
11834
11868
|
}, _callee119);
|
11835
11869
|
}));
|
11836
|
-
function extractResultData(
|
11870
|
+
function extractResultData(_x220) {
|
11837
11871
|
return _extractResultData22.apply(this, arguments);
|
11838
11872
|
}
|
11839
11873
|
return extractResultData;
|
@@ -11873,13 +11907,13 @@ var Ii = /*#__PURE__*/function () {
|
|
11873
11907
|
}();
|
11874
11908
|
var ta = /*#__PURE__*/function (_V12) {
|
11875
11909
|
function ta(e) {
|
11876
|
-
var
|
11877
|
-
var
|
11910
|
+
var _this58$maxMessages, _s$model;
|
11911
|
+
var _this58;
|
11878
11912
|
_classCallCheck(this, ta);
|
11879
11913
|
var s;
|
11880
11914
|
var i = JSON.parse(JSON.stringify(e.directConnection)).mistral;
|
11881
|
-
|
11882
|
-
return
|
11915
|
+
_this58 = _callSuper(this, ta, [e, Ii.buildKeyVerificationDetails(), Ii.buildHeaders, i]), _this58.insertKeyPlaceholderText = "Mistral API Key", _this58.keyHelpUrl = "https://console.mistral.ai/api-keys/", _this58.url = "https://api.mistral.ai/v1/chat/completions", _this58.permittedErrorPrefixes = ["invalid"], i && (_this58.cleanConfig(i), Object.assign(_this58.rawBody, i)), (_this58$maxMessages = _this58.maxMessages) !== null && _this58$maxMessages !== void 0 ? _this58$maxMessages : _this58.maxMessages = -1, (_s$model = (s = _this58.rawBody).model) !== null && _s$model !== void 0 ? _s$model : s.model = "open-mistral-7b";
|
11916
|
+
return _this58;
|
11883
11917
|
}
|
11884
11918
|
_inherits(ta, _V12);
|
11885
11919
|
return _createClass(ta, [{
|
@@ -11924,7 +11958,7 @@ var ta = /*#__PURE__*/function (_V12) {
|
|
11924
11958
|
}
|
11925
11959
|
}, _callee120, this);
|
11926
11960
|
}));
|
11927
|
-
function callServiceAPI(
|
11961
|
+
function callServiceAPI(_x221, _x222) {
|
11928
11962
|
return _callServiceAPI20.apply(this, arguments);
|
11929
11963
|
}
|
11930
11964
|
return callServiceAPI;
|
@@ -11951,7 +11985,7 @@ var ta = /*#__PURE__*/function (_V12) {
|
|
11951
11985
|
}
|
11952
11986
|
}, _callee121);
|
11953
11987
|
}));
|
11954
|
-
function extractResultData(
|
11988
|
+
function extractResultData(_x223) {
|
11955
11989
|
return _extractResultData23.apply(this, arguments);
|
11956
11990
|
}
|
11957
11991
|
return extractResultData;
|
@@ -12268,29 +12302,29 @@ var na = /*#__PURE__*/function () {
|
|
12268
12302
|
}();
|
12269
12303
|
var de = /*#__PURE__*/function (_he) {
|
12270
12304
|
function de(e, t, i) {
|
12271
|
-
var
|
12305
|
+
var _this59;
|
12272
12306
|
_classCallCheck(this, de);
|
12273
12307
|
var a, l;
|
12274
|
-
|
12308
|
+
_this59 = _callSuper(this, de, [e]);
|
12275
12309
|
var s = t.permittedErrorPrefixes,
|
12276
12310
|
r = t.introPanelMarkUp,
|
12277
12311
|
o = t.demo;
|
12278
|
-
|
12279
|
-
return y.deepCloneMessagesWithReferences(
|
12312
|
+
_this59._errorMessageOverrides = (a = e.errorMessages) == null ? void 0 : a.overrides, _this59._onClearMessages = yi.onClearMessages.bind(_this59, e), _this59._onError = yi.onError.bind(_this59, e), _this59._isLoadingMessageAllowed = de.getDefaultDisplayLoadingMessage(e, t), _typeof(e.displayLoadingBubble) == "object" && e.displayLoadingBubble.toggle && (e.displayLoadingBubble.toggle = _this59.setLoadingToggle.bind(_this59)), _this59._permittedErrorPrefixes = s, _this59.addSetupMessageIfNeeded(e, t) || _this59.populateIntroPanel(i, r, e.introPanelStyle), o && _this59.prepareDemo(te.processDemo(o), e.loadHistory), _this59.addIntroductoryMessages(e, t), new ii(e, _this59, t), _this59._displayServiceErrorMessages = (l = e.errorMessages) == null ? void 0 : l.displayServiceErrorMessages, e.getMessages = function () {
|
12313
|
+
return y.deepCloneMessagesWithReferences(_this59.messageToElements.map(function (_ref35) {
|
12280
12314
|
var _ref36 = _slicedToArray(_ref35, 1),
|
12281
12315
|
c = _ref36[0];
|
12282
12316
|
return c;
|
12283
12317
|
}));
|
12284
|
-
}, e.clearMessages =
|
12285
|
-
|
12318
|
+
}, e.clearMessages = _this59.clearMessages.bind(_this59, t), e.refreshMessages = _this59.refreshTextMessages.bind(_this59, e.remarkable), e.scrollToBottom = G.scrollToBottom.bind(_this59, _this59.elementRef), e.addMessage = function (c, d) {
|
12319
|
+
_this59.addAnyMessage(_objectSpread(_objectSpread({}, c), {}, {
|
12286
12320
|
sendUpdate: !!d
|
12287
12321
|
}), !d);
|
12288
12322
|
}, e.updateMessage = function (c, d) {
|
12289
|
-
return le.update(
|
12290
|
-
}, t.isWebModel() && t.setUpMessages(
|
12291
|
-
|
12323
|
+
return le.update(_this59, c, d);
|
12324
|
+
}, t.isWebModel() && t.setUpMessages(_this59), e.textToSpeech && gt.processConfig(e.textToSpeech, function (c) {
|
12325
|
+
_this59.textToSpeech = c;
|
12292
12326
|
});
|
12293
|
-
return
|
12327
|
+
return _this59;
|
12294
12328
|
}
|
12295
12329
|
_inherits(de, _he);
|
12296
12330
|
return _createClass(de, [{
|
@@ -12325,17 +12359,17 @@ var de = /*#__PURE__*/function (_he) {
|
|
12325
12359
|
}, {
|
12326
12360
|
key: "addIntroductoryMessages",
|
12327
12361
|
value: function addIntroductoryMessages(e, t) {
|
12328
|
-
var
|
12362
|
+
var _this60 = this;
|
12329
12363
|
e != null && e.shadowRoot && (this._introMessage = e.introMessage);
|
12330
12364
|
var i = this._introMessage;
|
12331
12365
|
t != null && t.isWebModel() && (i !== null && i !== void 0 ? i : i = t.getIntroMessage(i));
|
12332
12366
|
var s = !(e != null && e.history) && !!(e != null && e.loadHistory || t != null && t.fetchHistory);
|
12333
12367
|
i && (Array.isArray(i) ? i.forEach(function (r, o) {
|
12334
12368
|
if (o !== 0) {
|
12335
|
-
var a =
|
12336
|
-
y.hideRoleElements(a,
|
12369
|
+
var a = _this60.messageElementRefs[_this60.messageElementRefs.length - 1].innerContainer;
|
12370
|
+
y.hideRoleElements(a, _this60.avatar, _this60.name);
|
12337
12371
|
}
|
12338
|
-
|
12372
|
+
_this60.addIntroductoryMessage(r, s);
|
12339
12373
|
}) : this.addIntroductoryMessage(i, s));
|
12340
12374
|
}
|
12341
12375
|
}, {
|
@@ -12422,7 +12456,7 @@ var de = /*#__PURE__*/function (_he) {
|
|
12422
12456
|
}, {
|
12423
12457
|
key: "addNewErrorMessage",
|
12424
12458
|
value: function addNewErrorMessage(e, t) {
|
12425
|
-
var
|
12459
|
+
var _this61 = this;
|
12426
12460
|
var i = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !1;
|
12427
12461
|
var c, d, u, h, f, m;
|
12428
12462
|
(c = this._hiddenAttachments) == null || c.readdHiddenFiles(), this.removeMessageOnError();
|
@@ -12434,7 +12468,7 @@ var de = /*#__PURE__*/function (_he) {
|
|
12434
12468
|
o.classList.add(y.ERROR_MESSAGE_TEXT_CLASS), this.renderText(o, s);
|
12435
12469
|
var l = J.extractParticularSharedStyles(["fontSize", "fontFamily"], (h = this.messageStyles) == null ? void 0 : h["default"]);
|
12436
12470
|
J.applyCustomStylesToElements(r, !1, l), J.applyCustomStylesToElements(r, !1, (f = this.messageStyles) == null ? void 0 : f.error), i || this.appendOuterContainerElemet(a), this.textToSpeech && gt.speak(s, this.textToSpeech), (m = this._onError) == null || m.call(this, s), setTimeout(function () {
|
12437
|
-
return G.scrollToBottom(
|
12471
|
+
return G.scrollToBottom(_this61.elementRef);
|
12438
12472
|
});
|
12439
12473
|
}
|
12440
12474
|
}, {
|
@@ -12518,7 +12552,7 @@ var de = /*#__PURE__*/function (_he) {
|
|
12518
12552
|
}
|
12519
12553
|
}, _callee122, this);
|
12520
12554
|
}));
|
12521
|
-
function addMultipleFiles(
|
12555
|
+
function addMultipleFiles(_x224, _x225) {
|
12522
12556
|
return _addMultipleFiles.apply(this, arguments);
|
12523
12557
|
}
|
12524
12558
|
return addMultipleFiles;
|
@@ -12699,13 +12733,13 @@ Q.MENU_ITEM_CLASS = "dropup-menu-item", Q.TEXT_CLASS = "dropup-menu-item-text",
|
|
12699
12733
|
var Ee = Q;
|
12700
12734
|
var O = /*#__PURE__*/function (_ct2) {
|
12701
12735
|
function O(e, t, i, s) {
|
12702
|
-
var
|
12736
|
+
var _this62;
|
12703
12737
|
_classCallCheck(this, O);
|
12704
12738
|
var a, l, c, d, u, h;
|
12705
12739
|
var r = ((d = (c = (l = (a = e == null ? void 0 : e.styles) == null ? void 0 : a.button) == null ? void 0 : l["default"]) == null ? void 0 : c.text) == null ? void 0 : d.content) || "Custom ".concat(t),
|
12706
12740
|
o = ra;
|
12707
|
-
|
12708
|
-
return
|
12741
|
+
_this62 = _callSuper(this, O, [O.createButtonElement(), o, e == null ? void 0 : e.position, (u = e == null ? void 0 : e.styles) == null ? void 0 : u.button, r]), _this62._state = "default", _this62.isCustom = !0, _this62._innerElements = _this62.createInnerElementsForStates(_this62.customStyles), _this62._menuStyles = s, _this62._onClick = e.onClick, _this62._dropupStyles = (h = e.styles) == null ? void 0 : h.dropup, _this62.setSetState(e), _this62.addClickListener(i), _this62.changeState(e.initialState, !0);
|
12742
|
+
return _this62;
|
12709
12743
|
}
|
12710
12744
|
_inherits(O, _ct2);
|
12711
12745
|
return _createClass(O, [{
|
@@ -12722,19 +12756,19 @@ var O = /*#__PURE__*/function (_ct2) {
|
|
12722
12756
|
}, {
|
12723
12757
|
key: "setSetState",
|
12724
12758
|
value: function setSetState(e) {
|
12725
|
-
var
|
12759
|
+
var _this63 = this;
|
12726
12760
|
e.setState = function (t) {
|
12727
|
-
t === "default" &&
|
12761
|
+
t === "default" && _this63.changeToDefault(), t === "active" && _this63.changeToActive(), t === "disabled" && _this63.changeToDisabled();
|
12728
12762
|
};
|
12729
12763
|
}
|
12730
12764
|
}, {
|
12731
12765
|
key: "addClickListener",
|
12732
12766
|
value: function addClickListener(e) {
|
12733
|
-
var
|
12767
|
+
var _this64 = this;
|
12734
12768
|
this.elementRef.addEventListener("click", function () {
|
12735
12769
|
var i;
|
12736
|
-
var t = (i =
|
12737
|
-
e == null || e(), (t === "default" || t === "active" || t === "disabled") &&
|
12770
|
+
var t = (i = _this64._onClick) == null ? void 0 : i.call(_this64, _this64._state);
|
12771
|
+
e == null || e(), (t === "default" || t === "active" || t === "disabled") && _this64.changeState(t);
|
12738
12772
|
});
|
12739
12773
|
}
|
12740
12774
|
}, {
|
@@ -12868,11 +12902,11 @@ var ni = /*#__PURE__*/function () {
|
|
12868
12902
|
}();
|
12869
12903
|
var Cs = /*#__PURE__*/function () {
|
12870
12904
|
function Cs(e, t) {
|
12871
|
-
var
|
12905
|
+
var _this65 = this;
|
12872
12906
|
_classCallCheck(this, Cs);
|
12873
12907
|
var i;
|
12874
12908
|
this._isOpen = !0, this._styles = t, this.elementRef = Cs.createElement((i = this._styles) == null ? void 0 : i.container), this.close(), setTimeout(function () {
|
12875
|
-
return
|
12909
|
+
return _this65.addWindowEvents(e);
|
12876
12910
|
});
|
12877
12911
|
}
|
12878
12912
|
return _createClass(Cs, [{
|
@@ -12925,15 +12959,15 @@ var Cs = /*#__PURE__*/function () {
|
|
12925
12959
|
}();
|
12926
12960
|
var et = /*#__PURE__*/function (_ct3) {
|
12927
12961
|
function et(e, t) {
|
12928
|
-
var
|
12962
|
+
var _this66;
|
12929
12963
|
_classCallCheck(this, et);
|
12930
12964
|
var s;
|
12931
|
-
|
12965
|
+
_this66 = _callSuper(this, et, [et.createButtonElement(), oa, void 0, {
|
12932
12966
|
styles: (s = t == null ? void 0 : t.button) == null ? void 0 : s.styles
|
12933
12967
|
}]);
|
12934
|
-
var i =
|
12935
|
-
|
12936
|
-
return
|
12968
|
+
var i = _this66.createInnerElementsForStates(_this66.customStyles);
|
12969
|
+
_this66._menu = new Cs(e, t == null ? void 0 : t.menu), _this66.addClickEvent(), _this66.buttonContainer = et.createButtonContainer(), _this66.changeElementsByState(i.styles), _this66.buttonContainer.appendChild(_this66.elementRef), _this66.elementRef.classList.add(et.BUTTON_ICON_CLASS), _this66.buttonContainer.appendChild(_this66._menu.elementRef), _this66.reapplyStateStyle("styles"), _this66.addContainerEvents(e);
|
12970
|
+
return _this66;
|
12937
12971
|
}
|
12938
12972
|
_inherits(et, _ct3);
|
12939
12973
|
return _createClass(et, [{
|
@@ -12956,10 +12990,10 @@ var et = /*#__PURE__*/function (_ct3) {
|
|
12956
12990
|
}, {
|
12957
12991
|
key: "addContainerEvents",
|
12958
12992
|
value: function addContainerEvents(e) {
|
12959
|
-
var
|
12993
|
+
var _this67 = this;
|
12960
12994
|
e.addEventListener("click", function (t) {
|
12961
12995
|
var i = t.target.classList;
|
12962
|
-
!i.contains(et.BUTTON_ICON_CLASS) && !i.contains(st.DISABLED_CONTAINER_CLASS) &&
|
12996
|
+
!i.contains(et.BUTTON_ICON_CLASS) && !i.contains(st.DISABLED_CONTAINER_CLASS) && _this67._menu.close();
|
12963
12997
|
});
|
12964
12998
|
}
|
12965
12999
|
}], [{
|
@@ -13095,10 +13129,10 @@ var aa = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 24 24\"
|
|
13095
13129
|
};
|
13096
13130
|
var Gi = /*#__PURE__*/function (_ct4) {
|
13097
13131
|
function Gi(e) {
|
13098
|
-
var
|
13132
|
+
var _this68;
|
13099
13133
|
_classCallCheck(this, Gi);
|
13100
|
-
(e == null ? void 0 : e.position) === "dropup-menu" && (e.position = "outside-right"),
|
13101
|
-
return
|
13134
|
+
(e == null ? void 0 : e.position) === "dropup-menu" && (e.position = "outside-right"), _this68 = _callSuper(this, Gi, [Gi.createMicrophoneElement(), On, e == null ? void 0 : e.position, e]), _this68.isActive = !1, _this68._innerElements = _this68.createInnerElementsForStates(_this68.customStyles), _this68.changeToDefault();
|
13135
|
+
return _this68;
|
13102
13136
|
}
|
13103
13137
|
_inherits(Gi, _ct4);
|
13104
13138
|
return _createClass(Gi, [{
|
@@ -13302,9 +13336,9 @@ function pa() {
|
|
13302
13336
|
}, {
|
13303
13337
|
key: "keyDownWindow",
|
13304
13338
|
value: function keyDownWindow(t) {
|
13305
|
-
var
|
13339
|
+
var _this69 = this;
|
13306
13340
|
t.element && n.getElementIfFocusedOnAvailable(t.element, document.activeElement) && (n.KEY_DOWN_TIMEOUT !== null && clearTimeout(n.KEY_DOWN_TIMEOUT), n.KEY_DOWN_TIMEOUT = setTimeout(function () {
|
13307
|
-
n.KEY_DOWN_TIMEOUT = null,
|
13341
|
+
n.KEY_DOWN_TIMEOUT = null, _this69.resetRecording(t);
|
13308
13342
|
}, 500));
|
13309
13343
|
}
|
13310
13344
|
}, {
|
@@ -13941,22 +13975,22 @@ function va() {
|
|
13941
13975
|
}, {
|
13942
13976
|
key: "setEvents",
|
13943
13977
|
value: function setEvents() {
|
13944
|
-
var
|
13978
|
+
var _this70 = this;
|
13945
13979
|
this._service && (this._service.onstart = function () {
|
13946
|
-
|
13980
|
+
_this70.setStateOnStart();
|
13947
13981
|
}, this._service.onerror = function (r) {
|
13948
|
-
e.Browser.IS_SAFARI() && r.message === "Another request is started" || r.error === "aborted" &&
|
13982
|
+
e.Browser.IS_SAFARI() && r.message === "Another request is started" || r.error === "aborted" && _this70.isRestarting || r.error !== "no-speech" && _this70.error(r.message || r.error);
|
13949
13983
|
}, this._service.onaudioend = function () {
|
13950
|
-
|
13984
|
+
_this70.setStateOnStop();
|
13951
13985
|
}, this._service.onend = function () {
|
13952
|
-
|
13986
|
+
_this70._stopping = !1;
|
13953
13987
|
}, this._service.onresult = function (r) {
|
13954
|
-
if (_typeof(r.results) > "u" &&
|
13955
|
-
var
|
13956
|
-
o =
|
13957
|
-
a =
|
13958
|
-
l =
|
13959
|
-
|
13988
|
+
if (_typeof(r.results) > "u" && _this70._service) _this70._service.onend = null, _this70._service.stop();else if (_this70._extractText && !_this70._stopping) {
|
13989
|
+
var _this70$_extractText = _this70._extractText(r, _this70.finalTranscript, _this70._translations),
|
13990
|
+
o = _this70$_extractText.interimTranscript,
|
13991
|
+
a = _this70$_extractText.finalTranscript,
|
13992
|
+
l = _this70$_extractText.newText;
|
13993
|
+
_this70.updateElements(o, a, l);
|
13960
13994
|
}
|
13961
13995
|
});
|
13962
13996
|
}
|
@@ -14076,7 +14110,7 @@ function _a() {
|
|
14076
14110
|
}
|
14077
14111
|
}, _callee123);
|
14078
14112
|
}));
|
14079
|
-
function getNewSpeechConfig(
|
14113
|
+
function getNewSpeechConfig(_x226, _x227) {
|
14080
14114
|
return _getNewSpeechConfig.apply(this, arguments);
|
14081
14115
|
}
|
14082
14116
|
return getNewSpeechConfig;
|
@@ -14105,7 +14139,7 @@ function _a() {
|
|
14105
14139
|
}
|
14106
14140
|
}, _callee124);
|
14107
14141
|
}));
|
14108
|
-
function get(
|
14142
|
+
function get(_x228, _x229) {
|
14109
14143
|
return _get.apply(this, arguments);
|
14110
14144
|
}
|
14111
14145
|
return get;
|
@@ -14211,10 +14245,10 @@ function Ta() {
|
|
14211
14245
|
r = Un();
|
14212
14246
|
var o = /*#__PURE__*/function (_r$Speech) {
|
14213
14247
|
function o() {
|
14214
|
-
var
|
14248
|
+
var _this71;
|
14215
14249
|
_classCallCheck(this, o);
|
14216
|
-
|
14217
|
-
return
|
14250
|
+
_this71 = _callSuper(this, o, arguments), _this71._newTextPadding = "";
|
14251
|
+
return _this71;
|
14218
14252
|
}
|
14219
14253
|
_inherits(o, _r$Speech);
|
14220
14254
|
return _createClass(o, [{
|
@@ -14246,7 +14280,7 @@ function Ta() {
|
|
14246
14280
|
}
|
14247
14281
|
}, _callee125, this);
|
14248
14282
|
}));
|
14249
|
-
function startAsync(
|
14283
|
+
function startAsync(_x230) {
|
14250
14284
|
return _startAsync.apply(this, arguments);
|
14251
14285
|
}
|
14252
14286
|
return startAsync;
|
@@ -14283,7 +14317,7 @@ function Ta() {
|
|
14283
14317
|
}
|
14284
14318
|
}, _callee126, this);
|
14285
14319
|
}));
|
14286
|
-
function instantiateService(
|
14320
|
+
function instantiateService(_x231) {
|
14287
14321
|
return _instantiateService.apply(this, arguments);
|
14288
14322
|
}
|
14289
14323
|
return instantiateService;
|
@@ -14341,12 +14375,12 @@ function Ta() {
|
|
14341
14375
|
}, {
|
14342
14376
|
key: "retrieveTokenInterval",
|
14343
14377
|
value: function retrieveTokenInterval(l) {
|
14344
|
-
var
|
14378
|
+
var _this72 = this;
|
14345
14379
|
this._retrieveTokenInterval = setInterval(function () {
|
14346
14380
|
l == null || l().then(function (c) {
|
14347
|
-
|
14381
|
+
_this72._service && (_this72._service.authorizationToken = (c == null ? void 0 : c.trim()) || "");
|
14348
14382
|
})["catch"](function (c) {
|
14349
|
-
|
14383
|
+
_this72.error(c);
|
14350
14384
|
});
|
14351
14385
|
}, 1e4);
|
14352
14386
|
}
|
@@ -14437,10 +14471,10 @@ var Ma = /*#__PURE__*/function () {
|
|
14437
14471
|
return _createClass(Ma, [{
|
14438
14472
|
key: "setSilenceTimeout",
|
14439
14473
|
value: function setSilenceTimeout(e, t) {
|
14440
|
-
var
|
14474
|
+
var _this73 = this;
|
14441
14475
|
this._silenceTimeout = setTimeout(function () {
|
14442
14476
|
var i;
|
14443
|
-
(i = e.submit) == null || i.call(e), mi.stop(),
|
14477
|
+
(i = e.submit) == null || i.call(e), mi.stop(), _this73._stop || setTimeout(t, ri.MICROPHONE_RESET_TIMEOUT_MS);
|
14444
14478
|
}, this._silenceMS);
|
14445
14479
|
}
|
14446
14480
|
}, {
|
@@ -14462,21 +14496,21 @@ var Ma = /*#__PURE__*/function () {
|
|
14462
14496
|
}();
|
14463
14497
|
var Zt = /*#__PURE__*/function (_Gi) {
|
14464
14498
|
function Zt(e, t, i) {
|
14465
|
-
var
|
14499
|
+
var _this74;
|
14466
14500
|
_classCallCheck(this, Zt);
|
14467
14501
|
var s = _typeof(e.speechToText) == "object" ? e.speechToText : {};
|
14468
|
-
|
14469
|
-
var
|
14470
|
-
r =
|
14471
|
-
o =
|
14472
|
-
if (
|
14502
|
+
_this74 = _callSuper(this, Zt, [s == null ? void 0 : s.button]);
|
14503
|
+
var _this74$processConfig = _this74.processConfiguration(t, e.speechToText),
|
14504
|
+
r = _this74$processConfig.serviceName,
|
14505
|
+
o = _this74$processConfig.processedConfig;
|
14506
|
+
if (_this74._addErrorMessage = i, r === "webspeech" && !mi.isWebSpeechSupported()) _this74.changeToUnsupported();else {
|
14473
14507
|
var a = !e.textInput || !e.textInput.disabled;
|
14474
|
-
|
14508
|
+
_this74.elementRef.onclick = _this74.buttonClick.bind(_this74, t, a, r, o);
|
14475
14509
|
}
|
14476
14510
|
setTimeout(function () {
|
14477
|
-
|
14511
|
+
_this74._validationHandler = e._validationHandler;
|
14478
14512
|
});
|
14479
|
-
return
|
14513
|
+
return _this74;
|
14480
14514
|
}
|
14481
14515
|
// prettier-ignore
|
14482
14516
|
_inherits(Zt, _Gi);
|
@@ -14512,26 +14546,26 @@ var Zt = /*#__PURE__*/function (_Gi) {
|
|
14512
14546
|
}, {
|
14513
14547
|
key: "buttonClick",
|
14514
14548
|
value: function buttonClick(e, t, i, s) {
|
14515
|
-
var
|
14549
|
+
var _this75 = this;
|
14516
14550
|
var r = s == null ? void 0 : s.events;
|
14517
14551
|
e.removePlaceholderStyle(), mi.toggle(i, _objectSpread({
|
14518
14552
|
insertInCursorLocation: !1,
|
14519
14553
|
element: t ? e.inputElementRef : void 0,
|
14520
14554
|
onError: function onError() {
|
14521
14555
|
var o;
|
14522
|
-
|
14556
|
+
_this75.onError(), (o = _this75._silenceSubmit) == null || o.clearSilenceTimeout();
|
14523
14557
|
},
|
14524
14558
|
onStart: function onStart() {
|
14525
14559
|
var o;
|
14526
|
-
|
14560
|
+
_this75.changeToActive(), (o = r == null ? void 0 : r.onStart) == null || o.call(r);
|
14527
14561
|
},
|
14528
14562
|
onStop: function onStop() {
|
14529
14563
|
var o, a, l;
|
14530
|
-
(o =
|
14564
|
+
(o = _this75._validationHandler) == null || o.call(_this75), (a = _this75._silenceSubmit) == null || a.clearSilenceTimeout(), _this75.changeToDefault(), (l = r == null ? void 0 : r.onStop) == null || l.call(r);
|
14531
14565
|
},
|
14532
14566
|
onPauseTrigger: function onPauseTrigger(o) {
|
14533
14567
|
var a, l;
|
14534
|
-
(a =
|
14568
|
+
(a = _this75._silenceSubmit) == null || a.onPause(o, e, _this75.elementRef.onclick), (l = r == null ? void 0 : r.onPauseTrigger) == null || l.call(r, o);
|
14535
14569
|
},
|
14536
14570
|
onPreResult: function onPreResult(o, a) {
|
14537
14571
|
var l;
|
@@ -14539,11 +14573,11 @@ var Zt = /*#__PURE__*/function (_Gi) {
|
|
14539
14573
|
},
|
14540
14574
|
onResult: function onResult(o, a) {
|
14541
14575
|
var l, c, d;
|
14542
|
-
a && ((l =
|
14576
|
+
a && ((l = _this75._validationHandler) == null || l.call(_this75)), (c = _this75._silenceSubmit) == null || c.resetSilenceTimeout(e, _this75.elementRef.onclick), (d = r == null ? void 0 : r.onResult) == null || d.call(r, o, a);
|
14543
14577
|
},
|
14544
14578
|
onCommandModeTrigger: function onCommandModeTrigger(o) {
|
14545
14579
|
var a;
|
14546
|
-
|
14580
|
+
_this75.onCommandModeTrigger(o), (a = r == null ? void 0 : r.onCommandModeTrigger) == null || a.call(r, o);
|
14547
14581
|
}
|
14548
14582
|
}, s));
|
14549
14583
|
}
|
@@ -14577,10 +14611,10 @@ var ri = Zt;
|
|
14577
14611
|
var Ne = /*#__PURE__*/function () {
|
14578
14612
|
// prettier-ignore
|
14579
14613
|
function Ne(e, t, i, s) {
|
14580
|
-
var
|
14614
|
+
var _this76 = this;
|
14581
14615
|
_classCallCheck(this, Ne);
|
14582
14616
|
this._attachments = [], this._fileCountLimit = 99, this._acceptedFormat = "", this._hiddenAttachments = /* @__PURE__ */new Set(), t.maxNumberOfFiles && (this._fileCountLimit = t.maxNumberOfFiles), this._toggleContainerDisplay = i, this._fileAttachmentsContainerRef = s, t.acceptedFormats && (this._acceptedFormat = t.acceptedFormats), setTimeout(function () {
|
14583
|
-
|
14617
|
+
_this76._validationHandler = e._validationHandler;
|
14584
14618
|
});
|
14585
14619
|
}
|
14586
14620
|
return _createClass(Ne, [{
|
@@ -14652,12 +14686,12 @@ var Ne = /*#__PURE__*/function () {
|
|
14652
14686
|
}, {
|
14653
14687
|
key: "hideAttachments",
|
14654
14688
|
value: function hideAttachments() {
|
14655
|
-
var
|
14689
|
+
var _this77 = this;
|
14656
14690
|
this._hiddenAttachments.clear(), this._attachments.forEach(function (e) {
|
14657
14691
|
setTimeout(function () {
|
14658
14692
|
var t;
|
14659
14693
|
return (t = e.removeButton) == null ? void 0 : t.click();
|
14660
|
-
}),
|
14694
|
+
}), _this77._hiddenAttachments.add(e);
|
14661
14695
|
});
|
14662
14696
|
}
|
14663
14697
|
}, {
|
@@ -14673,9 +14707,9 @@ var Ne = /*#__PURE__*/function () {
|
|
14673
14707
|
}, {
|
14674
14708
|
key: "readdAttachments",
|
14675
14709
|
value: function readdAttachments() {
|
14676
|
-
var
|
14710
|
+
var _this78 = this;
|
14677
14711
|
Array.from(this._hiddenAttachments).forEach(function (e) {
|
14678
|
-
|
14712
|
+
_this78._fileAttachmentsContainerRef.appendChild(e.attachmentContainerElement), _this78._attachments.push(e);
|
14679
14713
|
}), this._hiddenAttachments.clear();
|
14680
14714
|
}
|
14681
14715
|
}], [{
|
@@ -14736,12 +14770,12 @@ var Oe = /*#__PURE__*/function (_Ne) {
|
|
14736
14770
|
return _createClass(Oe, [{
|
14737
14771
|
key: "createTimer",
|
14738
14772
|
value: function createTimer(e, t) {
|
14739
|
-
var
|
14773
|
+
var _this79 = this;
|
14740
14774
|
var i = 0;
|
14741
14775
|
var s = t !== void 0 && t < Oe.TIMER_LIMIT_S ? t : Oe.TIMER_LIMIT_S;
|
14742
14776
|
return setInterval(function () {
|
14743
14777
|
var a;
|
14744
|
-
i += 1, i === s && ((a =
|
14778
|
+
i += 1, i === s && ((a = _this79.stopPlaceholderCallback) == null || a.call(_this79), _this79.clearTimer()), i === 600 && e.classList.add("audio-placeholder-text-4-digits");
|
14745
14779
|
var r = Math.floor(i / 60),
|
14746
14780
|
o = (i % 60).toString().padStart(2, "0");
|
14747
14781
|
e.textContent = "".concat(r, ":").concat(o);
|
@@ -14761,7 +14795,7 @@ var Oe = /*#__PURE__*/function (_Ne) {
|
|
14761
14795
|
}, {
|
14762
14796
|
key: "addPlaceholderAudioAttachmentEvents",
|
14763
14797
|
value: function addPlaceholderAudioAttachmentEvents(e, t, i) {
|
14764
|
-
var
|
14798
|
+
var _this80 = this;
|
14765
14799
|
var s = function s() {
|
14766
14800
|
return e.replaceChildren(t);
|
14767
14801
|
};
|
@@ -14772,7 +14806,7 @@ var Oe = /*#__PURE__*/function (_Ne) {
|
|
14772
14806
|
e.addEventListener("mouseleave", r);
|
14773
14807
|
var o = function o() {
|
14774
14808
|
var a;
|
14775
|
-
return (a =
|
14809
|
+
return (a = _this80.stopPlaceholderCallback) == null ? void 0 : a.call(_this80);
|
14776
14810
|
};
|
14777
14811
|
e.addEventListener("click", o);
|
14778
14812
|
}
|
@@ -14907,7 +14941,7 @@ var di = /*#__PURE__*/function () {
|
|
14907
14941
|
}
|
14908
14942
|
}, _callee127);
|
14909
14943
|
}));
|
14910
|
-
return function (
|
14944
|
+
return function (_x232) {
|
14911
14945
|
return _ref39.apply(this, arguments);
|
14912
14946
|
};
|
14913
14947
|
}()));
|
@@ -14978,20 +15012,20 @@ var ge = /*#__PURE__*/function () {
|
|
14978
15012
|
}, {
|
14979
15013
|
key: "addButtons",
|
14980
15014
|
value: function addButtons() {
|
14981
|
-
var
|
15015
|
+
var _this81 = this;
|
14982
15016
|
for (var _len2 = arguments.length, e = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
14983
15017
|
e[_key2] = arguments[_key2];
|
14984
15018
|
}
|
14985
15019
|
e.forEach(function (t) {
|
14986
|
-
N.addAttributes(t),
|
15020
|
+
N.addAttributes(t), _this81._buttonPanel.appendChild(t);
|
14987
15021
|
});
|
14988
15022
|
}
|
14989
15023
|
}, {
|
14990
15024
|
key: "close",
|
14991
15025
|
value: function close() {
|
14992
|
-
var
|
15026
|
+
var _this82 = this;
|
14993
15027
|
this._elementRef.classList.remove("show-modal"), this._elementRef.classList.add("hide-modal"), this._backgroundPanelRef.classList.remove("show-modal-background"), this._backgroundPanelRef.classList.add("hide-modal-background"), this._isOpen = !1, setTimeout(function () {
|
14994
|
-
|
15028
|
+
_this82._elementRef.style.display = "none", _this82._backgroundPanelRef.style.display = "none";
|
14995
15029
|
}, ge.MODAL_CLOSE_TIMEOUT_MS);
|
14996
15030
|
}
|
14997
15031
|
}, {
|
@@ -15007,10 +15041,10 @@ var ge = /*#__PURE__*/function () {
|
|
15007
15041
|
}, {
|
15008
15042
|
key: "addCloseButton",
|
15009
15043
|
value: function addCloseButton(e, t, i) {
|
15010
|
-
var
|
15044
|
+
var _this83 = this;
|
15011
15045
|
var s = t ? ge.createSVGButton(e) : ge.createTextButton(e);
|
15012
15046
|
return this.addButtons(s), s.onclick = function () {
|
15013
|
-
|
15047
|
+
_this83.close(), setTimeout(function () {
|
15014
15048
|
i == null || i();
|
15015
15049
|
}, 140);
|
15016
15050
|
}, s;
|
@@ -15081,15 +15115,15 @@ var tt = ge;
|
|
15081
15115
|
var Di = /*#__PURE__*/function (_ct5) {
|
15082
15116
|
// prettier-ignore
|
15083
15117
|
function Di(e, t, i, s, r, o) {
|
15084
|
-
var
|
15118
|
+
var _this84;
|
15085
15119
|
_classCallCheck(this, Di);
|
15086
15120
|
var d, u, h, f, m, p, g, b, M;
|
15087
15121
|
var a = (d = i == null ? void 0 : i.button) == null ? void 0 : d.position,
|
15088
15122
|
l = ((f = (h = (u = i == null ? void 0 : i.button) == null ? void 0 : u.styles) == null ? void 0 : h.text) == null ? void 0 : f.content) || o;
|
15089
|
-
|
15090
|
-
var c =
|
15091
|
-
|
15092
|
-
return
|
15123
|
+
_this84 = _callSuper(this, Di, [Di.createButtonElement(), r, a, i.button, l]);
|
15124
|
+
var c = _this84.createInnerElementsForStates(s, _this84.customStyles);
|
15125
|
+
_this84._inputElement = Di.createInputElement((m = i == null ? void 0 : i.files) == null ? void 0 : m.acceptedFormats), _this84.addClickEvent(e, i), _this84.changeElementsByState(c.styles), _this84.reapplyStateStyle("styles"), _this84._fileAttachmentsType = t, _this84._openModalOnce = ((g = (p = i.files) == null ? void 0 : p.infoModal) == null ? void 0 : g.openModalOnce) === !1 || (M = (b = i.files) == null ? void 0 : b.infoModal) == null ? void 0 : M.openModalOnce;
|
15126
|
+
return _this84;
|
15093
15127
|
}
|
15094
15128
|
_inherits(Di, _ct5);
|
15095
15129
|
return _createClass(Di, [{
|
@@ -15223,7 +15257,7 @@ var We = /*#__PURE__*/function () {
|
|
15223
15257
|
}
|
15224
15258
|
}, _callee129);
|
15225
15259
|
}));
|
15226
|
-
function useValidationFunc(_x234, _x235, _x236
|
15260
|
+
function useValidationFunc(_x233, _x234, _x235, _x236) {
|
15227
15261
|
return _useValidationFunc.apply(this, arguments);
|
15228
15262
|
}
|
15229
15263
|
return useValidationFunc;
|
@@ -15246,7 +15280,7 @@ var We = /*#__PURE__*/function () {
|
|
15246
15280
|
}
|
15247
15281
|
}, _callee130);
|
15248
15282
|
}));
|
15249
|
-
function useValidationFuncProgrammatic(_x238, _x239
|
15283
|
+
function useValidationFuncProgrammatic(_x237, _x238, _x239) {
|
15250
15284
|
return _useValidationFuncProgrammatic.apply(this, arguments);
|
15251
15285
|
}
|
15252
15286
|
return useValidationFuncProgrammatic;
|
@@ -15283,7 +15317,7 @@ var We = /*#__PURE__*/function () {
|
|
15283
15317
|
}
|
15284
15318
|
}, _callee131);
|
15285
15319
|
}));
|
15286
|
-
return function (
|
15320
|
+
return function (_x240) {
|
15287
15321
|
return _ref40.apply(this, arguments);
|
15288
15322
|
};
|
15289
15323
|
}();
|
@@ -15307,11 +15341,11 @@ var jn = /*#__PURE__*/function () {
|
|
15307
15341
|
}();
|
15308
15342
|
var La = /*#__PURE__*/function (_Gi2) {
|
15309
15343
|
function La(e, t) {
|
15310
|
-
var
|
15344
|
+
var _this85;
|
15311
15345
|
_classCallCheck(this, La);
|
15312
15346
|
var i, s;
|
15313
|
-
|
15314
|
-
return
|
15347
|
+
_this85 = _callSuper(this, La, [t.button]), _this85._waitingForBrowserApproval = !1, _this85._audioType = e, _this85._extension = ((i = t.files) == null ? void 0 : i.format) || "mp3", _this85._maxDurationSeconds = (s = t.files) == null ? void 0 : s.maxDurationSeconds, _this85.elementRef.onclick = _this85.buttonClick.bind(_assertThisInitialized(_this85));
|
15348
|
+
return _this85;
|
15315
15349
|
}
|
15316
15350
|
_inherits(La, _Gi2);
|
15317
15351
|
return _createClass(La, [{
|
@@ -15322,10 +15356,10 @@ var La = /*#__PURE__*/function (_Gi2) {
|
|
15322
15356
|
}, {
|
15323
15357
|
key: "stop",
|
15324
15358
|
value: function stop() {
|
15325
|
-
var
|
15359
|
+
var _this86 = this;
|
15326
15360
|
return new Promise(function (e) {
|
15327
15361
|
var t, i;
|
15328
|
-
|
15362
|
+
_this86.changeToDefault(), (t = _this86._mediaRecorder) == null || t.stop(), (i = _this86._mediaStream) == null || i.getTracks().forEach(function (s) {
|
15329
15363
|
return s.stop();
|
15330
15364
|
}), setTimeout(function () {
|
15331
15365
|
e();
|
@@ -15335,23 +15369,23 @@ var La = /*#__PURE__*/function (_Gi2) {
|
|
15335
15369
|
}, {
|
15336
15370
|
key: "record",
|
15337
15371
|
value: function record() {
|
15338
|
-
var
|
15372
|
+
var _this87 = this;
|
15339
15373
|
navigator.mediaDevices.getUserMedia({
|
15340
15374
|
audio: !0
|
15341
15375
|
}).then(function (e) {
|
15342
|
-
|
15343
|
-
|
15344
|
-
}),
|
15376
|
+
_this87.changeToActive(), _this87._mediaRecorder = new MediaRecorder(e), _this87._audioType.addPlaceholderAttachment(_this87.stop.bind(_this87), _this87._maxDurationSeconds), _this87._mediaStream = e, _this87._mediaRecorder.addEventListener("dataavailable", function (t) {
|
15377
|
+
_this87.createFile(t);
|
15378
|
+
}), _this87._mediaRecorder.start();
|
15345
15379
|
})["catch"](function (e) {
|
15346
|
-
console.error(e),
|
15380
|
+
console.error(e), _this87.stop();
|
15347
15381
|
})["finally"](function () {
|
15348
|
-
|
15382
|
+
_this87._waitingForBrowserApproval = !1;
|
15349
15383
|
});
|
15350
15384
|
}
|
15351
15385
|
}, {
|
15352
15386
|
key: "createFile",
|
15353
15387
|
value: function createFile(e) {
|
15354
|
-
var
|
15388
|
+
var _this88 = this;
|
15355
15389
|
var t = new Blob([e.data], {
|
15356
15390
|
type: "audio/".concat(this._extension)
|
15357
15391
|
}),
|
@@ -15361,7 +15395,7 @@ var La = /*#__PURE__*/function (_Gi2) {
|
|
15361
15395
|
}),
|
15362
15396
|
r = new FileReader();
|
15363
15397
|
r.readAsDataURL(s), r.onload = function (o) {
|
15364
|
-
|
15398
|
+
_this88._audioType.completePlaceholderAttachment(s, o.target.result);
|
15365
15399
|
};
|
15366
15400
|
}
|
15367
15401
|
}]);
|
@@ -15400,20 +15434,20 @@ var it = /*#__PURE__*/function () {
|
|
15400
15434
|
var P = /*#__PURE__*/function (_ct6) {
|
15401
15435
|
// prettier-ignore
|
15402
15436
|
function P(e, t, i, s, r, o) {
|
15403
|
-
var
|
15437
|
+
var _this89;
|
15404
15438
|
_classCallCheck(this, P);
|
15405
15439
|
var a = it.process(e.submitButtonStyles),
|
15406
15440
|
l = Ia;
|
15407
|
-
|
15441
|
+
_this89 = _callSuper(this, P, [P.createButtonContainerElement(), l, a == null ? void 0 : a.position, a]), _this89._isSVGLoadingIconOverriden = !1, _this89.status = {
|
15408
15442
|
requestInProgress: !1,
|
15409
15443
|
loadingActive: !1
|
15410
|
-
},
|
15444
|
+
}, _this89._messages = i, _this89._textInput = t, _this89._fileAttachments = r, _this89._innerElements = _this89.createInnerElementsForStates(), _this89._abortStream = new AbortController(), _this89._stopClicked = {
|
15411
15445
|
listener: function listener() {}
|
15412
|
-
},
|
15446
|
+
}, _this89._serviceIO = s, _this89._alwaysEnabled = !!(a != null && a.alwaysEnabled), e.disableSubmitButton = _this89.disableSubmitButton.bind(_assertThisInitialized(_this89), s), _this89.attemptOverwriteLoadingStyle(e), o.microphone && _this89.setUpSpeechToText(o.microphone.button, e.speechToText), setTimeout(function () {
|
15413
15447
|
var c;
|
15414
|
-
|
15448
|
+
_this89._validationHandler = e._validationHandler, _this89.assignHandlers(_this89._validationHandler), (c = _this89._validationHandler) == null || c.call(_assertThisInitialized(_this89));
|
15415
15449
|
});
|
15416
|
-
return
|
15450
|
+
return _this89;
|
15417
15451
|
}
|
15418
15452
|
_inherits(P, _ct6);
|
15419
15453
|
return _createClass(P, [{
|
@@ -15433,7 +15467,7 @@ var P = /*#__PURE__*/function (_ct6) {
|
|
15433
15467
|
}, {
|
15434
15468
|
key: "createCustomElements",
|
15435
15469
|
value: function createCustomElements() {
|
15436
|
-
var
|
15470
|
+
var _this90 = this;
|
15437
15471
|
var e = Ae.createCustomElements("submit", this.svg, this.customStyles),
|
15438
15472
|
t = {
|
15439
15473
|
loading: void 0,
|
@@ -15441,7 +15475,7 @@ var P = /*#__PURE__*/function (_ct6) {
|
|
15441
15475
|
};
|
15442
15476
|
return Object.keys(t).forEach(function (i) {
|
15443
15477
|
var s = i,
|
15444
|
-
r = Ae.createCustomElements(s,
|
15478
|
+
r = Ae.createCustomElements(s, _this90.svg, _this90.customStyles);
|
15445
15479
|
r && (t[s] = r);
|
15446
15480
|
}), t.submit = e || this.buildDefaultIconElement("submit-icon"), t;
|
15447
15481
|
}
|
@@ -15521,7 +15555,7 @@ var P = /*#__PURE__*/function (_ct6) {
|
|
15521
15555
|
key: "programmaticSubmit",
|
15522
15556
|
value: function () {
|
15523
15557
|
var _programmaticSubmit = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee133(e) {
|
15524
|
-
var
|
15558
|
+
var _this91 = this;
|
15525
15559
|
var t;
|
15526
15560
|
return _regeneratorRuntime().wrap(function _callee133$(_context133) {
|
15527
15561
|
while (1) switch (_context133.prev = _context133.next) {
|
@@ -15536,7 +15570,7 @@ var P = /*#__PURE__*/function (_ct6) {
|
|
15536
15570
|
type: Ne.getTypeFromBlob(i)
|
15537
15571
|
};
|
15538
15572
|
})), e.custom && (t.custom = e.custom), setTimeout(function () {
|
15539
|
-
return
|
15573
|
+
return _this91.attemptSubmit(t, !0);
|
15540
15574
|
});
|
15541
15575
|
case 3:
|
15542
15576
|
case "end":
|
@@ -15544,7 +15578,7 @@ var P = /*#__PURE__*/function (_ct6) {
|
|
15544
15578
|
}
|
15545
15579
|
}, _callee133);
|
15546
15580
|
}));
|
15547
|
-
function programmaticSubmit(
|
15581
|
+
function programmaticSubmit(_x241) {
|
15548
15582
|
return _programmaticSubmit.apply(this, arguments);
|
15549
15583
|
}
|
15550
15584
|
return programmaticSubmit;
|
@@ -15606,7 +15640,7 @@ var P = /*#__PURE__*/function (_ct6) {
|
|
15606
15640
|
}
|
15607
15641
|
}, _callee134, this);
|
15608
15642
|
}));
|
15609
|
-
function attemptSubmit(
|
15643
|
+
function attemptSubmit(_x242) {
|
15610
15644
|
return _attemptSubmit.apply(this, arguments);
|
15611
15645
|
}
|
15612
15646
|
return attemptSubmit;
|
@@ -15643,7 +15677,7 @@ var P = /*#__PURE__*/function (_ct6) {
|
|
15643
15677
|
}
|
15644
15678
|
}, _callee135, this);
|
15645
15679
|
}));
|
15646
|
-
function addNewMessage(
|
15680
|
+
function addNewMessage(_x243) {
|
15647
15681
|
return _addNewMessage.apply(this, arguments);
|
15648
15682
|
}
|
15649
15683
|
return addNewMessage;
|
@@ -15668,10 +15702,10 @@ var P = /*#__PURE__*/function (_ct6) {
|
|
15668
15702
|
}, {
|
15669
15703
|
key: "changeToSubmitIcon",
|
15670
15704
|
value: function changeToSubmitIcon() {
|
15671
|
-
var
|
15705
|
+
var _this92 = this;
|
15672
15706
|
this.elementRef.classList.contains(P.SUBMIT_CLASS) || (this.elementRef.classList.remove(P.LOADING_CLASS, P.DISABLED_CLASS), N.removeAriaAttributes(this.elementRef), this.elementRef.classList.add(P.SUBMIT_CLASS), this.changeElementsByState(this._innerElements.submit), it.resetSubmit(this, this.status.loadingActive), this.elementRef.onclick = function () {
|
15673
15707
|
var e;
|
15674
|
-
|
15708
|
+
_this92.submitFromInput(), (e = _this92._microphoneButton) != null && e.isActive && ri.toggleSpeechAfterSubmit(_this92._microphoneButton.elementRef, !!_this92._stopSTTAfterSubmit);
|
15675
15709
|
});
|
15676
15710
|
}
|
15677
15711
|
// called every time when user triggers an input via ValidationHandler - hence use class to check if not already present
|
@@ -15716,14 +15750,14 @@ var Oa = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\"
|
|
15716
15750
|
var Ms = /*#__PURE__*/function (_tt) {
|
15717
15751
|
// prettier-ignore
|
15718
15752
|
function Ms(e, t, i, s) {
|
15719
|
-
var
|
15753
|
+
var _this93;
|
15720
15754
|
_classCallCheck(this, Ms);
|
15721
|
-
|
15722
|
-
var
|
15723
|
-
r =
|
15724
|
-
o =
|
15725
|
-
|
15726
|
-
return
|
15755
|
+
_this93 = _callSuper(this, Ms, [e, ["modal-content", "modal-camera-content"], i]), _this93._stopped = !1, _this93._format = "image/png", _this93._canvas = document.createElement("canvas"), _this93._canvas.classList.add("camera-modal-canvas");
|
15756
|
+
var _this93$addButtonsAnd = _this93.addButtonsAndTheirEvents(t),
|
15757
|
+
r = _this93$addButtonsAnd.captureButton,
|
15758
|
+
o = _this93$addButtonsAnd.submitButton;
|
15759
|
+
_this93._captureButton = r, _this93._submitButton = o, _this93._captureIcon = _this93._captureButton.children[0], _this93._refreshIcon = Ue.createSVGElement(Oa), _this93._refreshIcon.classList.add("modal-svg-button-icon", "modal-svg-refresh-icon"), (s == null ? void 0 : s.format) === "jpeg" && (_this93._format = "image/jpeg"), s != null && s.dimensions && (_this93._dimensions = s.dimensions), _this93._contentRef.appendChild(_this93._canvas), _this93.extensionCloseCallback = _this93.stop;
|
15760
|
+
return _this93;
|
15727
15761
|
}
|
15728
15762
|
_inherits(Ms, _tt);
|
15729
15763
|
return _createClass(Ms, [{
|
@@ -15743,38 +15777,38 @@ var Ms = /*#__PURE__*/function (_tt) {
|
|
15743
15777
|
}, {
|
15744
15778
|
key: "addButtonEvents",
|
15745
15779
|
value: function addButtonEvents(e, t, i, s) {
|
15746
|
-
var
|
15780
|
+
var _this94 = this;
|
15747
15781
|
e.onclick = function () {
|
15748
|
-
|
15782
|
+
_this94.capture();
|
15749
15783
|
}, t.addEventListener("click", this.stop.bind(this)), i.onclick = function () {
|
15750
|
-
var r =
|
15751
|
-
r && di.addFilesToType([r], [s]),
|
15784
|
+
var r = _this94.getFile();
|
15785
|
+
r && di.addFilesToType([r], [s]), _this94.stop(), _this94.close();
|
15752
15786
|
};
|
15753
15787
|
}
|
15754
15788
|
}, {
|
15755
15789
|
key: "stop",
|
15756
15790
|
value: function stop() {
|
15757
|
-
var
|
15791
|
+
var _this95 = this;
|
15758
15792
|
this._mediaStream && this._mediaStream.getTracks().forEach(function (e) {
|
15759
15793
|
return e.stop();
|
15760
15794
|
}), this._stopped = !0, setTimeout(function () {
|
15761
|
-
|
15762
|
-
var e =
|
15763
|
-
e == null || e.clearRect(0, 0,
|
15795
|
+
_this95._captureButton.replaceChildren(_this95._captureIcon), _this95._captureButton.classList.replace("modal-svg-refresh-button", "modal-svg-camera-button");
|
15796
|
+
var e = _this95._canvas.getContext("2d");
|
15797
|
+
e == null || e.clearRect(0, 0, _this95._canvas.width, _this95._canvas.height);
|
15764
15798
|
}, tt.MODAL_CLOSE_TIMEOUT_MS);
|
15765
15799
|
}
|
15766
15800
|
}, {
|
15767
15801
|
key: "start",
|
15768
15802
|
value: function start() {
|
15769
|
-
var
|
15803
|
+
var _this96 = this;
|
15770
15804
|
this._dataURL = void 0, this._submitButton.classList.add("modal-svg-submit-disabled"), this._stopped = !1, navigator.mediaDevices.getUserMedia({
|
15771
15805
|
video: this._dimensions || !0
|
15772
15806
|
}).then(function (e) {
|
15773
|
-
if (
|
15807
|
+
if (_this96._mediaStream = e, !_this96.isOpen()) return _this96.stop();
|
15774
15808
|
var t = document.createElement("video");
|
15775
|
-
t.srcObject = e, t.play(), requestAnimationFrame(
|
15809
|
+
t.srcObject = e, t.play(), requestAnimationFrame(_this96.updateCanvas.bind(_this96, t, _this96._canvas));
|
15776
15810
|
})["catch"](function (e) {
|
15777
|
-
console.error(e),
|
15811
|
+
console.error(e), _this96.stop(), _this96.close();
|
15778
15812
|
});
|
15779
15813
|
}
|
15780
15814
|
}, {
|
@@ -15829,15 +15863,15 @@ var Ms = /*#__PURE__*/function (_tt) {
|
|
15829
15863
|
var Ba = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<svg viewBox=\"0 0 32 32\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M29 7h-4.599l-2.401-4h-12l-2.4 4h-4.6c-1 0-3 1-3 2.969v16.031c0 1.657 1.5 3 2.792 3h26.271c1.313 0 2.938-1.406 2.938-2.968v-16.032c0-1-1-3-3-3zM30 26.032c0 0.395-0.639 0.947-0.937 0.969h-26.265c-0.232-0.019-0.797-0.47-0.797-1v-16.031c0-0.634 0.851-0.953 1-0.969h5.732l2.4-4h9.802l1.785 3.030 0.55 0.97h5.731c0.705 0 0.99 0.921 1 1v16.032zM16 10c-3.866 0-7 3.134-7 7s3.134 7 7 7 7-3.134 7-7-3.134-7-7-7zM16 22c-2.757 0-5-2.243-5-5s2.243-5 5-5 5 2.243 5 5-2.243 5-5 5z\"></path>\n</svg>";
|
15830
15864
|
var ks = /*#__PURE__*/function (_ct7) {
|
15831
15865
|
function ks(e, t, i) {
|
15832
|
-
var
|
15866
|
+
var _this97;
|
15833
15867
|
_classCallCheck(this, ks);
|
15834
15868
|
var a, l, c, d;
|
15835
15869
|
var s = (a = i == null ? void 0 : i.button) == null ? void 0 : a.position,
|
15836
15870
|
r = ((d = (c = (l = i == null ? void 0 : i.button) == null ? void 0 : l.styles) == null ? void 0 : c.text) == null ? void 0 : d.content) || "Photo";
|
15837
|
-
|
15838
|
-
var o =
|
15839
|
-
i &&
|
15840
|
-
return
|
15871
|
+
_this97 = _callSuper(this, ks, [ks.createButtonElement(), Ba, s, (i == null ? void 0 : i.button) || {}, r]);
|
15872
|
+
var o = _this97.createInnerElementsForStates(_this97.customStyles);
|
15873
|
+
i && _this97.addClickEvent(e, t, i.modalContainerStyle, i.files), _this97.changeElementsByState(o.styles), _this97.reapplyStateStyle("styles");
|
15874
|
+
return _this97;
|
15841
15875
|
}
|
15842
15876
|
_inherits(ks, _ct7);
|
15843
15877
|
return _createClass(ks, [{
|
@@ -15959,7 +15993,7 @@ var Ls = /*#__PURE__*/function () {
|
|
15959
15993
|
}
|
15960
15994
|
}]);
|
15961
15995
|
}();
|
15962
|
-
var Fa = "#validate-property-key-view{height:100%;position:relative;display:flex;justify-content:center;align-items:center;padding:8px}#loading-validate-key-property{display:inline-block;width:50px;height:50px}#loading-validate-key-property:after{content:\" \";display:block;width:38px;height:38px;margin:1px;border-radius:50%;border:5px solid #5fb2ff;border-color:#5fb2ff transparent #5fb2ff transparent;animation:loading-spinner 1.4s linear infinite}#deep-chat-openai-realtime-container{height:100%;width:100%}#deep-chat-openai-realtime-avatar-container{height:60%;width:100%;display:flex;justify-content:center;align-items:center}#deep-chat-openai-realtime-avatar{border-radius:50%;height:110px;border:1px solid rgb(215,215,215);padding:8px;-webkit-user-select:none;user-select:none;margin-top:20px}#deep-chat-openai-realtime-buttons-container{height:40%;display:flex;position:relative}.deep-chat-openai-realtime-button-container{height:100%;width:50%;display:flex;justify-content:center;align-items:center}.deep-chat-openai-realtime-button{width:70px;height:70px;border-radius:50%;display:flex;justify-content:center;align-items:center;cursor:pointer}.deep-chat-openai-realtime-button-default{background-color:#e3e3e3}.deep-chat-openai-realtime-button-default:hover{background-color:#d4d4d4}.deep-chat-openai-realtime-button-default:active{background-color:#c5c5c5}.deep-chat-openai-realtime-button-loading{opacity:.7;pointer-events:none}.deep-chat-openai-realtime-microphone-active{background-color:#ffe7e7}.deep-chat-openai-realtime-microphone-active:hover{background-color:#ffdede}.deep-chat-openai-realtime-microphone-active:active{background-color:#ffd2d2}.deep-chat-openai-realtime-microphone>*{height:30px;width:30px}.deep-chat-openai-realtime-microphone-active>*{filter:brightness(0) saturate(100%) invert(35%) sepia(60%) saturate(1360%) hue-rotate(325deg) brightness(95%) contrast(92%)}.deep-chat-openai-realtime-toggle>*{height:32px;width:32px;padding-left:3px;filter:brightness(0) saturate(100%) invert(22%) sepia(0%) saturate(4537%) hue-rotate(208deg) brightness(105%) contrast(91%)}.deep-chat-openai-realtime-button-unavailable{opacity:.45;pointer-events:none}#deep-chat-openai-realtime-error{color:red;position:absolute;top:calc(50% + 40px);left:50%;transform:translate(-50%,-50%);font-size:17px}#deep-chat-openai-realtime-loading{position:absolute;font-size:15px;top:50%;left:50%;transform:translate(-50%,-50%)}#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-key{display:inline-block;width:16px;height:16px}#loading-key: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-spinner 1.2s linear infinite}#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}@keyframes loading-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.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}.deep-chat-last-group-messages-active{height:100%}.loading-history-message-full-view{position:absolute;height:70%;width:100%;display:flex;align-items:center}.loading-history-message-small{height:20px;margin-bottom:30px}.loading-history-message-small>div>div{scale:.6}.loading-history-message{margin-top:0;width:100%;max-width:100%;display:flex;justify-content:center;background-color:unset}.loading-history{width:70px}.loading-history div{position:absolute;width:var(--loading-history-width);height:var(--loading-history-height);margin:var(--loading-history-margin);border:var(--loading-history-border);border-radius:50%;animation:loading-spinner 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:var(--loading-history-color) transparent transparent transparent}.loading-history div:nth-child(1){animation-delay:-.45s}.loading-history div:nth-child(2){animation-delay:-.3s}.loading-history div:nth-child(3){animation-delay:-.15s}.html-message{max-width:unset}.error-message-text{margin:14px auto 10px;background-color:#f4c0c0;color:#474747;text-align:center;max-width:95%}.deep-chat-loading-message-dots-container{width:1em;padding:.6em .75em .6em 1.3em}.loading-message-dots{position:relative;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite linear alternate;animation-delay:.5s}.loading-message-dots:before,.loading-message-dots:after{content:\"\";display:inline-block;position:absolute;top:0}.loading-message-dots:before{left:-.7em;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite alternate;animation-delay:0s}.loading-message-dots:after{left:.7em;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite alternate;animation-delay:1s}@keyframes loading-message-dots{0%{background-color:var(--loading-message-color)}50%,to{background-color:var(--loading-message-color-fade)}}.message-bubble>p:first-child,.message-bubble>.partial-render-message>p:first-child{margin-top:0}.message-bubble>p:last-child,.message-bubble>.partial-render-message:last-child>p{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{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}.role-hidden{display:none}.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:3}.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:2;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}.loading-submit-button{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:loading-submit-button 1.5s infinite linear;bottom:-.75em}@keyframes loading-submit-button{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}}.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-svg-text{padding:1px;height:1.65em;display:flex}.input-button-svg-text>svg{padding:.22rem}.input-button-svg-text>div{margin-left:2px}.input-button:hover,.input-button:focus-visible{background-color:#9c9c9c2e}.input-button:active{background-color:#9c9c9c5e}.input-button:active:not(:hover){background-color:transparent}.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;width:max-content}#custom-icon{height:100%;width:1.2em}.custom-button-container-default{color:#505050}.custom-button-container-default>.dropup-menu-item-icon{color:unset}.custom-button-container-default>svg{filter:brightness(0) saturate(100%) invert(39%) sepia(1%) saturate(0%) hue-rotate(83deg) brightness(93%) contrast(90%)}.custom-button-container-default>.dropup-menu-item-icon>svg{position:absolute;left:.2em}.custom-button-container-active{background-color:#edf7ff;color:#0285ff}.custom-button-container-active:hover,.custom-button-container-active:focus-visible{background-color:#def0ff}.custom-button-container-active:active{background-color:#d2eaff}.custom-button-container-active>svg{filter:brightness(0) saturate(100%) invert(32%) sepia(34%) saturate(4196%) hue-rotate(196deg) brightness(107%) contrast(104%)}.custom-button-container-disabled{color:#aeaeae;cursor:auto}.custom-button-container-disabled>div{pointer-events:none}.custom-button-container-disabled:hover,.custom-button-container-disabled:focus-visible{background-color:transparent}.custom-button-container-disabled:active{background-color:transparent}.custom-button-container-disabled>svg{filter:brightness(0) saturate(100%) invert(67%) sepia(0%) saturate(818%) hue-rotate(28deg) brightness(102%) contrast(100%)}#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}[contenteditable]:empty:before{content:attr(deep-chat-placeholder-text);pointer-events:none}[contenteditable][textcolor]:empty:before{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-button>*{pointer-events:none}#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:hover,.dropup-menu-item:focus-visible{background-color:#f3f3f3}.dropup-menu-item:active{background-color:#ebebeb}.dropup-menu-item:active:not(:hover){background-color:transparent}.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}.dropup-menu-item-icon>svg{bottom:0!important;top:0!important;margin-bottom:auto;margin-top:auto}#dropup-menu-item-icon-element-custom{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.28em;filter:brightness(0) saturate(100%) invert(15%) sepia(0%) saturate(337%) hue-rotate(125deg) brightness(91%) contrast(94%)}.dropup-menu-item-text{margin-left:.56em;margin-top:.08em;width:max-content}#input{width:100%;display:inline-flex;text-align:center;margin-left:auto;margin-right:auto;margin-top:auto;position:relative;justify-content:center}#chat-view{height:100%;display:grid;grid-template-columns:100%}::-webkit-scrollbar{width:9px;height:9px}::-webkit-scrollbar-thumb{background-color:#d0d0d0;border-radius:5px}::-webkit-scrollbar-track{background-color:#f2f2f2}.deep-chat-web-model-button{margin-top:10px;margin-bottom:5px;margin-left:1px}:host{all:initial;display:table-cell}#container{height:inherit;width:inherit;overflow:hidden}";
|
15996
|
+
var Fa = "#validate-property-key-view{height:100%;position:relative;display:flex;justify-content:center;align-items:center;padding:8px}#loading-validate-key-property{display:inline-block;width:50px;height:50px}#loading-validate-key-property:after{content:\" \";display:block;width:38px;height:38px;margin:1px;border-radius:50%;border:5px solid #5fb2ff;border-color:#5fb2ff transparent #5fb2ff transparent;animation:loading-spinner 1.4s linear infinite}#deep-chat-openai-realtime-container{height:100%;width:100%}#deep-chat-openai-realtime-avatar-container{height:60%;width:100%;display:flex;justify-content:center;align-items:center}#deep-chat-openai-realtime-avatar{border-radius:50%;height:110px;border:1px solid rgb(215,215,215);padding:8px;-webkit-user-select:none;user-select:none;margin-top:20px}#deep-chat-openai-realtime-buttons-container{height:40%;display:flex;position:relative}.deep-chat-openai-realtime-button-container{height:100%;width:50%;display:flex;justify-content:center;align-items:center}.deep-chat-openai-realtime-button{width:70px;height:70px;border-radius:50%;display:flex;justify-content:center;align-items:center;cursor:pointer}.deep-chat-openai-realtime-button-default{background-color:#e3e3e3}.deep-chat-openai-realtime-button-default:hover{background-color:#d4d4d4}.deep-chat-openai-realtime-button-default:active{background-color:#c5c5c5}.deep-chat-openai-realtime-button-loading{opacity:.7;pointer-events:none}.deep-chat-openai-realtime-microphone-active{background-color:#ffe7e7}.deep-chat-openai-realtime-microphone-active:hover{background-color:#ffdede}.deep-chat-openai-realtime-microphone-active:active{background-color:#ffd2d2}.deep-chat-openai-realtime-microphone>*{height:30px;width:30px}.deep-chat-openai-realtime-microphone-active>*{filter:brightness(0) saturate(100%) invert(35%) sepia(60%) saturate(1360%) hue-rotate(325deg) brightness(95%) contrast(92%)}.deep-chat-openai-realtime-toggle>*{height:32px;width:32px;padding-left:3px;filter:brightness(0) saturate(100%) invert(22%) sepia(0%) saturate(4537%) hue-rotate(208deg) brightness(105%) contrast(91%)}.deep-chat-openai-realtime-button-unavailable{opacity:.45;pointer-events:none}#deep-chat-openai-realtime-error{color:red;position:absolute;top:calc(50% + 40px);left:50%;transform:translate(-50%,-50%);font-size:17px}#deep-chat-openai-realtime-loading{position:absolute;font-size:15px;top:50%;left:50%;transform:translate(-50%,-50%)}#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-key{display:inline-block;width:16px;height:16px}#loading-key: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-spinner 1.2s linear infinite}#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}@keyframes loading-spinner{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.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}.deep-chat-last-group-messages-active{height:100%}.loading-history-message-full-view{position:absolute;height:70%;width:100%;display:flex;align-items:center}.loading-history-message-small{height:20px;margin-bottom:30px}.loading-history-message-small>div>div{scale:.6}.loading-history-message{margin-top:0;width:100%;max-width:100%;display:flex;justify-content:center;background-color:unset}.loading-history{width:70px}.loading-history div{position:absolute;width:var(--loading-history-width);height:var(--loading-history-height);margin:var(--loading-history-margin);border:var(--loading-history-border);border-radius:50%;animation:loading-spinner 1.2s cubic-bezier(.5,0,.5,1) infinite;border-color:var(--loading-history-color) transparent transparent transparent}.loading-history div:nth-child(1){animation-delay:-.45s}.loading-history div:nth-child(2){animation-delay:-.3s}.loading-history div:nth-child(3){animation-delay:-.15s}.html-message{max-width:unset}.error-message-text{margin:14px auto 10px;background-color:#f4c0c0;color:#474747;text-align:center;max-width:95%}.deep-chat-loading-message-dots-container{width:1em;padding:.6em .75em .6em 1.3em}.loading-message-dots{position:relative;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite linear alternate;animation-delay:.5s}.loading-message-dots:before,.loading-message-dots:after{content:\"\";display:inline-block;position:absolute;top:0}.loading-message-dots:before{left:-.7em;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite alternate;animation-delay:0s}.loading-message-dots:after{left:.7em;width:.45em;height:.45em;border-radius:5px;background-color:var(--loading-message-color);color:var(--loading-message-color);animation:loading-message-dots 1s infinite alternate;animation-delay:1s}@keyframes loading-message-dots{0%{background-color:var(--loading-message-color)}50%,to{background-color:var(--loading-message-color-fade)}}.message-bubble>p:first-child,.message-bubble>.partial-render-message>p:first-child,.stream-wrapper>p:first-child{margin-top:0}.message-bubble>p:last-child,.message-bubble>.partial-render-message:last-child>p,.stream-wrapper>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{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}.role-hidden{display:none}.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:3}.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:2;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}.loading-submit-button{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:loading-submit-button 1.5s infinite linear;bottom:-.75em}@keyframes loading-submit-button{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}}.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-svg-text{padding:1px;height:1.65em;display:flex}.input-button-svg-text>svg{padding:.22rem}.input-button-svg-text>div{margin-left:2px}.input-button:hover,.input-button:focus-visible{background-color:#9c9c9c2e}.input-button:active{background-color:#9c9c9c5e}.input-button:active:not(:hover){background-color:transparent}.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;width:max-content}#custom-icon{height:100%;width:1.2em}.custom-button-container-default{color:#505050}.custom-button-container-default>.dropup-menu-item-icon{color:unset}.custom-button-container-default>svg{filter:brightness(0) saturate(100%) invert(39%) sepia(1%) saturate(0%) hue-rotate(83deg) brightness(93%) contrast(90%)}.custom-button-container-default>.dropup-menu-item-icon>svg{position:absolute;left:.2em}.custom-button-container-active{background-color:#edf7ff;color:#0285ff}.custom-button-container-active:hover,.custom-button-container-active:focus-visible{background-color:#def0ff}.custom-button-container-active:active{background-color:#d2eaff}.custom-button-container-active>svg{filter:brightness(0) saturate(100%) invert(32%) sepia(34%) saturate(4196%) hue-rotate(196deg) brightness(107%) contrast(104%)}.custom-button-container-disabled{color:#aeaeae;cursor:auto}.custom-button-container-disabled>div{pointer-events:none}.custom-button-container-disabled:hover,.custom-button-container-disabled:focus-visible{background-color:transparent}.custom-button-container-disabled:active{background-color:transparent}.custom-button-container-disabled>svg{filter:brightness(0) saturate(100%) invert(67%) sepia(0%) saturate(818%) hue-rotate(28deg) brightness(102%) contrast(100%)}#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}[contenteditable]:empty:before{content:attr(deep-chat-placeholder-text);pointer-events:none}[contenteditable][textcolor]:empty:before{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-button>*{pointer-events:none}#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:hover,.dropup-menu-item:focus-visible{background-color:#f3f3f3}.dropup-menu-item:active{background-color:#ebebeb}.dropup-menu-item:active:not(:hover){background-color:transparent}.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}.dropup-menu-item-icon>svg{bottom:0!important;top:0!important;margin-bottom:auto;margin-top:auto}#dropup-menu-item-icon-element-custom{position:absolute;pointer-events:none;width:1.21em;height:1.21em;left:.28em;filter:brightness(0) saturate(100%) invert(15%) sepia(0%) saturate(337%) hue-rotate(125deg) brightness(91%) contrast(94%)}.dropup-menu-item-text{margin-left:.56em;margin-top:.08em;width:max-content}#input{width:100%;display:inline-flex;text-align:center;margin-left:auto;margin-right:auto;margin-top:auto;position:relative;justify-content:center}#chat-view{height:100%;display:grid;grid-template-columns:100%}::-webkit-scrollbar{width:9px;height:9px}::-webkit-scrollbar-thumb{background-color:#d0d0d0;border-radius:5px}::-webkit-scrollbar-track{background-color:#f2f2f2}.deep-chat-web-model-button{margin-top:10px;margin-bottom:5px;margin-left:1px}:host{all:initial;display:table-cell}#container{height:inherit;width:inherit;overflow:hidden}";
|
15963
15997
|
var Ua = Object.defineProperty,
|
15964
15998
|
w = function w(n, e, t, i) {
|
15965
15999
|
for (var s = void 0, r = n.length - 1, o; r >= 0; r--) (o = n[r]) && (s = o(e, t, s) || s);
|
@@ -15967,22 +16001,22 @@ var Ua = Object.defineProperty,
|
|
15967
16001
|
};
|
15968
16002
|
var _ = /*#__PURE__*/function (_rs) {
|
15969
16003
|
function _() {
|
15970
|
-
var
|
16004
|
+
var _this98;
|
15971
16005
|
_classCallCheck(this, _);
|
15972
|
-
|
16006
|
+
_this98 = _callSuper(this, _), _this98.getMessages = function () {
|
15973
16007
|
return [];
|
15974
|
-
},
|
16008
|
+
}, _this98.submitUserMessage = function () {
|
15975
16009
|
return console.warn("submitUserMessage failed - please wait for chat view to render before calling this property.");
|
15976
|
-
},
|
16010
|
+
}, _this98.addMessage = function () {
|
15977
16011
|
return console.warn("addMessage failed - please wait for chat view to render before calling this property.");
|
15978
|
-
},
|
15979
|
-
return ai.focusFromParentElement(
|
15980
|
-
},
|
16012
|
+
}, _this98.updateMessage = function () {}, _this98.clearMessages = function () {}, _this98.focusInput = function () {
|
16013
|
+
return ai.focusFromParentElement(_this98._elementRef);
|
16014
|
+
}, _this98.refreshMessages = function () {}, _this98.scrollToBottom = function () {}, _this98.disableSubmitButton = function () {}, _this98.setPlaceholderText = function () {}, _this98._hasBeenRendered = !1, _this98._auxiliaryStyleApplied = !1, _this98._elementRef = document.createElement("div"), _this98._elementRef.id = "container", _this98.attachShadow({
|
15981
16015
|
mode: "open"
|
15982
|
-
}).appendChild(
|
15983
|
-
|
16016
|
+
}).appendChild(_this98._elementRef), Ht.apply(Fa, _this98.shadowRoot), setTimeout(function () {
|
16017
|
+
_this98._hasBeenRendered || _this98.onRender();
|
15984
16018
|
}, 20);
|
15985
|
-
return
|
16019
|
+
return _this98;
|
15986
16020
|
}
|
15987
16021
|
_inherits(_, _rs);
|
15988
16022
|
return _createClass(_, [{
|