quickblox-react-ui-kit 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/CommonTypes/FunctionResult.d.ts +5 -1
- package/dist/Data/DefaultConfigurations.d.ts +2 -2
- package/dist/Domain/use_cases/ai/AIAnswerAssistUseCase.d.ts +13 -0
- package/dist/Domain/use_cases/ai/AIAnswerAssistWithProxyUseCase.d.ts +13 -0
- package/dist/Domain/use_cases/ai/AITranslateUseCase.d.ts +14 -0
- package/dist/Domain/use_cases/ai/AITranslateWithProxyUseCase.d.ts +14 -0
- package/dist/Presentation/Views/Base/BaseViewModel.d.ts +2 -0
- package/dist/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/AIMessageWidget.d.ts +4 -1
- package/dist/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/AIWidgetActions/AIWidgetActions.d.ts +3 -2
- package/dist/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/Tone.d.ts +5 -13
- package/dist/Presentation/components/UI/Dialogs/MessagesView/DefaultAttachmentComponent/DefaultAttachmentComponent.d.ts +7 -0
- package/dist/Presentation/components/UI/Dialogs/MessagesView/ErrorToast/ErrorToast.d.ts +7 -0
- package/dist/Presentation/components/UI/Dialogs/MessagesView/InComingMessage/InComingMessage.d.ts +3 -1
- package/dist/Presentation/components/UI/Dialogs/PreviewDialog/PreviewAudioFile/PreviewAudioFile.d.ts +7 -0
- package/dist/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDefaultFile/PreviewDefaultFile.d.ts +7 -0
- package/dist/Presentation/components/UI/Dialogs/PreviewDialog/PreviewImageFile/PreviewImageFile.d.ts +8 -0
- package/dist/Presentation/components/UI/Dialogs/PreviewDialog/PreviewVideoFile/PreviewVideoFile.d.ts +7 -0
- package/dist/Presentation/components/UI/svgs/Icons/AIWidgets/BotIcon/BotIcon.d.ts +4 -0
- package/dist/QBconfig.d.ts +14 -3
- package/dist/index-ui.js +316 -33
- package/dist/utils/utils.d.ts +9 -0
- package/global.d.ts +12 -4
- package/package.json +5 -1
- package/src/CommonTypes/FunctionResult.ts +6 -1
- package/src/Data/DefaultConfigurations.ts +155 -19
- package/src/Domain/use_cases/ai/AIAnswerAssistUseCase.ts +69 -0
- package/src/Domain/use_cases/ai/AIAnswerAssistWithProxyUseCase.ts +71 -0
- package/src/Domain/use_cases/ai/AIRephraseUseCase.ts +38 -36
- package/src/Domain/use_cases/ai/AIRephraseWithProxyUseCase.ts +25 -21
- package/src/Domain/use_cases/ai/AITranslateUseCase.ts +76 -0
- package/src/Domain/use_cases/ai/AITranslateWithProxyUseCase.ts +79 -0
- package/src/Presentation/Views/Base/BaseViewModel.ts +2 -0
- package/src/Presentation/Views/Dialogs/Dialogs.tsx +1 -1
- package/src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/AIMessageWidget.ts +7 -2
- package/src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/AIWidgetActions/AIWidgetActions.tsx +10 -4
- package/src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/Tone.ts +29 -15
- package/src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAIAssistAnswerWidget.tsx +10 -6
- package/src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAIAssistAnswerWidgetWithProxy.tsx +10 -6
- package/src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAIRephraseMessageWidget.tsx +17 -0
- package/src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAIRephraseMessageWidgetWithProxy.tsx +16 -0
- package/src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAITranslateWidget.tsx +13 -12
- package/src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAITranslateWidgetWithProxy.tsx +13 -12
- package/src/Presentation/components/UI/Dialogs/MessagesView/DefaultAttachmentComponent/DefaultAttachmentComponent.scss +76 -0
- package/src/Presentation/components/UI/Dialogs/MessagesView/DefaultAttachmentComponent/DefaultAttachmentComponent.tsx +34 -0
- package/src/Presentation/components/UI/Dialogs/MessagesView/ErrorToast/ErrorToast.scss +26 -0
- package/src/Presentation/components/UI/Dialogs/MessagesView/ErrorToast/ErrorToast.tsx +25 -0
- package/src/Presentation/components/UI/Dialogs/MessagesView/InComingMessage/InComingMessage.scss +4 -6
- package/src/Presentation/components/UI/Dialogs/MessagesView/InComingMessage/InComingMessage.tsx +93 -405
- package/src/Presentation/components/UI/Dialogs/MessagesView/MessagesView.scss +2 -3
- package/src/Presentation/components/UI/Dialogs/MessagesView/MessagesView.tsx +561 -400
- package/src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewAudioFile/PreviewAudioFile.scss +62 -0
- package/src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewAudioFile/PreviewAudioFile.tsx +25 -0
- package/src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDefaultFile/PreviewDefaultFile.scss +61 -0
- package/src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDefaultFile/PreviewDefaultFile.tsx +32 -0
- package/src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDialog.scss +2 -2
- package/src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDialog.tsx +50 -2
- package/src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewImageFile/PreviewImageFile.scss +40 -0
- package/src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewImageFile/PreviewImageFile.tsx +26 -0
- package/src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewVideoFile/PreviewVideoFile.scss +62 -0
- package/src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewVideoFile/PreviewVideoFile.tsx +25 -0
- package/src/Presentation/components/UI/svgs/Icons/AIWidgets/BotIcon/BotIcon.svg +5 -0
- package/src/Presentation/components/UI/svgs/Icons/AIWidgets/BotIcon/BotIcon.tsx +50 -0
- package/src/Presentation/components/layouts/Desktop/QuickBloxUIKitDesktopLayout.tsx +3 -15
- package/src/Presentation/components/providers/QuickBloxUIKitProvider/useQbInitializedDataContext.ts +15 -14
- package/src/QBconfig.ts +156 -10
- package/src/package_artan_react_ui.json +13 -9
- package/src/package_original.json +5 -1
- package/src/utils/utils.ts +63 -0
package/dist/index-ui.js
CHANGED
|
@@ -194,6 +194,28 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
|
|
|
194
194
|
|
|
195
195
|
/***/ }),
|
|
196
196
|
|
|
197
|
+
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/Presentation/components/UI/Dialogs/MessagesView/DefaultAttachmentComponent/DefaultAttachmentComponent.scss":
|
|
198
|
+
/*!*****************************************************************************************************************************************************************************************************!*\
|
|
199
|
+
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/Presentation/components/UI/Dialogs/MessagesView/DefaultAttachmentComponent/DefaultAttachmentComponent.scss ***!
|
|
200
|
+
\*****************************************************************************************************************************************************************************************************/
|
|
201
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
202
|
+
|
|
203
|
+
"use strict";
|
|
204
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".default-attachment-component-container,\\n.default-attachment-component-container * {\\n box-sizing: border-box;\\n}\\n\\n.default-attachment-component-container {\\n border-radius: 22px 22px 22px 0px;\\n padding: 8px 16px 8px 1px;\\n display: flex;\\n flex-direction: row;\\n gap: 8px;\\n align-items: center;\\n justify-content: flex-start;\\n flex-shrink: 0;\\n position: relative;\\n}\\n.default-attachment-component-container--file-wrapper {\\n display: flex;\\n flex-direction: row;\\n gap: 8px;\\n align-items: center;\\n justify-content: flex-start;\\n align-self: stretch;\\n flex-shrink: 0;\\n position: relative;\\n}\\n.default-attachment-component-container--file-wrapper--placeholder {\\n flex-shrink: 0;\\n width: 32px;\\n height: 32px;\\n position: static;\\n}\\n.default-attachment-component-container--file-wrapper--placeholder__bg {\\n background: var(--field-border, #90979f);\\n border-radius: 8px;\\n width: 32px;\\n height: 32px;\\n position: absolute;\\n left: 0px;\\n top: 0px;\\n}\\n.default-attachment-component-container--file-wrapper--placeholder__icon {\\n border-radius: 4px;\\n padding: 4px;\\n display: flex;\\n flex-direction: row;\\n gap: 0px;\\n align-items: center;\\n justify-content: center;\\n width: 24px;\\n height: 24px;\\n position: absolute;\\n left: 4px;\\n top: 4px;\\n}\\n.default-attachment-component-container--file-wrapper--file-d {\\n color: var(--secondary-elements, #202f3e);\\n text-align: left;\\n font: 400 14px/20px \\\"Roboto\\\", sans-serif;\\n position: relative;\\n}\\n\\n.media-text-document {\\n align-self: stretch;\\n flex: 1;\\n position: relative;\\n overflow: visible;\\n}\", \"\"]);\n// Exports\n/* harmony default export */ __webpack_exports__[\"default\"] = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/MessagesView/DefaultAttachmentComponent/DefaultAttachmentComponent.scss?./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js");
|
|
205
|
+
|
|
206
|
+
/***/ }),
|
|
207
|
+
|
|
208
|
+
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/Presentation/components/UI/Dialogs/MessagesView/ErrorToast/ErrorToast.scss":
|
|
209
|
+
/*!*********************************************************************************************************************************************************************!*\
|
|
210
|
+
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/Presentation/components/UI/Dialogs/MessagesView/ErrorToast/ErrorToast.scss ***!
|
|
211
|
+
\*********************************************************************************************************************************************************************/
|
|
212
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
213
|
+
|
|
214
|
+
"use strict";
|
|
215
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".error-toast,\\n.error-toast * {\\n box-sizing: border-box;\\n}\\n\\n.error-toast {\\n background: var(--color-background-overlay);\\n border-radius: 4px;\\n opacity: 0.6000000238;\\n padding: 4px 12px 4px 12px;\\n display: flex;\\n flex-direction: column;\\n gap: 10px;\\n align-items: flex-start;\\n justify-content: flex-start;\\n position: relative;\\n}\\n\\n.translation-failed-try-again {\\n color: var(--color-background);\\n text-align: left;\\n font: 500 12px/16px \\\"Roboto\\\", sans-serif;\\n position: relative;\\n display: flex;\\n align-items: center;\\n justify-content: flex-start;\\n}\", \"\"]);\n// Exports\n/* harmony default export */ __webpack_exports__[\"default\"] = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/MessagesView/ErrorToast/ErrorToast.scss?./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js");
|
|
216
|
+
|
|
217
|
+
/***/ }),
|
|
218
|
+
|
|
197
219
|
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/Presentation/components/UI/Dialogs/MessagesView/HeaderMessages/HeaderMessages.scss":
|
|
198
220
|
/*!*****************************************************************************************************************************************************************************!*\
|
|
199
221
|
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/Presentation/components/UI/Dialogs/MessagesView/HeaderMessages/HeaderMessages.scss ***!
|
|
@@ -245,7 +267,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
|
|
|
245
267
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
246
268
|
|
|
247
269
|
"use strict";
|
|
248
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".message-view-container--incoming-message-wrapper--context-menu {\\n cursor: pointer;\\n display: flex;\\n flex-direction: column;\\n justify-content: flex-end;\\n min-width: 35px;\\n}\\n\\n.widget-ai-translate-with-choice-languages-container {\\n display: flex;\\n flex-direction: row;\\n justify-content: center;\\n align-items: center;\\n}\\n.widget-ai-translate-with-choice-languages-container--default-language {\\n cursor: pointer;\\n}\\n.widget-ai-translate-with-choice-languages-container--separator {\\n margin-left: 10px;\\n margin-right: 5px;\\n}\\n.widget-ai-translate-with-choice-languages-container--select-language {\\n cursor: pointer;\\n}\\n\\n.incoming-text-message,\\n.incoming-text-message * {\\n box-sizing: border-box;\\n}\\n\\n.incoming-text-message {\\n background: var(--secondary-background);\\n padding: 0px 16px 8px 8px;\\n display: flex;\\n flex-direction: row;\\n gap: 8px;\\n align-items: flex-end;\\n justify-content: flex-start;\\n flex-shrink: 0;\\n width: 680px;\\n position: relative;\\n}\\n\\n.incoming {\\n display: flex;\\n flex-direction: column;\\n gap: 2px;\\n align-items: flex-start;\\n justify-content: flex-end;\\n flex-shrink: 0;\\n position: relative;\\n}\\n\\n.name {\\n padding: 0px 16px 0px 16px;\\n display: flex;\\n flex-direction: row;\\n gap: 8px;\\n align-items: flex-start;\\n justify-content: flex-start;\\n flex-shrink: 0;\\n position: relative;\\n}\\n\\n.caption {\\n display: flex;\\n flex-direction: row;\\n gap: 0px;\\n align-items: center;\\n justify-content: flex-start;\\n flex-shrink: 0;\\n position: relative;\\n}\\n\\n.name2 {\\n color: var(--secondary-secondary-300, #636d78);\\n text-align: left;\\n font: var(--label-label-medium, 500 12px/16px \\\"Roboto\\\", sans-serif);\\n position: relative;\\n}\\n\\n.message {\\n display: flex;\\n flex-direction: row;\\n gap: 8px;\\n align-items: flex-end;\\n justify-content: flex-start;\\n flex-shrink: 0;\\n position: relative;\\n}\\n\\n.bubble {\\n display: flex;\\n flex-direction: column;\\n gap: 4px;\\n align-items: flex-end;\\n justify-content: flex-end;\\n flex-shrink: 0;\\n position: relative;\\n}\\n\\n.chat-bubble-background {\\n background: var(--incoming-background);\\n border-radius: 22px 22px 22px 0px;\\n padding: 8px 12px 8px 12px;\\n display: flex;\\n flex-direction: row;\\n gap: 10px;\\n align-items: flex-start;\\n justify-content: flex-start;\\n flex-shrink: 0;\\n position: relative;\\n min-width: 120px;\\n max-width: 480px;\\n}\\n\\n.message-in-a-single-line {\\n color: var(--secondary-secondary-900, #0b121b);\\n text-align: left;\\n font: var(--body-body-medium, 400 14px/20px \\\"Roboto\\\", sans-serif);\\n position: relative;\\n display: flex;\\n align-items: center;\\n justify-content: flex-start;\\n}\\n\\n.translate {\\n padding: 0px 12px 0px 0px;\\n display: flex;\\n flex-direction: row;\\n gap: 8px;\\n align-items: center;\\n justify-content: flex-end;\\n align-self: stretch;\\n flex-shrink: 0;\\n position: relative;\\n}\\n\\n.caption2 {\\n display: flex;\\n flex-direction: row;\\n gap: 0px;\\n align-items: center;\\n justify-content: flex-end;\\n flex: 1;\\n position: relative;\\n}\\n\\n.time {\\n color: var(--secondary-secondary-300, #636d78);\\n text-align: right;\\n font: var(--label-label-small, 500 11px/16px \\\"Roboto\\\", sans-serif);\\n position: relative;\\n}\\n\\n.icon {\\n border-radius: 4px;\\n display: flex;\\n flex-direction: row;\\n gap: 0px;\\n align-items: center;\\n justify-content: center;\\n flex-shrink: 0;\\n width: 16px;\\n height: 16px;\\n position: relative;\\n}\\n\\n.media-translate {\\n align-self: stretch;\\n flex: 1;\\n position: relative;\\n overflow: visible;\\n}\\n\\n.assist-answer {\\n padding: 0px 0px 16px 0px;\\n display: flex;\\n flex-direction: row;\\n gap: 10px;\\n align-items: center;\\n justify-content: center;\\n align-self: stretch;\\n flex-shrink: 0;\\n position: relative;\\n}\\n\\n.icon2 {\\n border-radius: 4px;\\n padding: 4px;\\n display: flex;\\n flex-direction: row;\\n gap: 0px;\\n align-items: center;\\n justify-content: center;\\n flex-shrink: 0;\\n width: 32px;\\n height: 32px;\\n position: relative;\\n}\\n\\n.status-loader {\\n align-self: stretch;\\n flex: 1;\\n position: relative;\\n overflow: visible;\\n}\\n\\n.caption3 {\\n padding: 0px 0px 16px 0px;\\n display: flex;\\n flex-direction: row;\\n gap: 0px;\\n align-items: flex-start;\\n justify-content: flex-start;\\n flex-shrink: 0;\\n position: relative;\\n}\\n\\n.ai-translate-action {\\n color: var(--
|
|
270
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".message-view-container--incoming-message-wrapper--context-menu {\\n cursor: pointer;\\n display: flex;\\n flex-direction: column;\\n justify-content: flex-end;\\n min-width: 35px;\\n}\\n\\n.widget-ai-translate-with-choice-languages-container {\\n display: flex;\\n flex-direction: row;\\n justify-content: center;\\n align-items: center;\\n}\\n.widget-ai-translate-with-choice-languages-container--default-language {\\n cursor: pointer;\\n}\\n.widget-ai-translate-with-choice-languages-container--separator {\\n margin-left: 10px;\\n margin-right: 5px;\\n}\\n.widget-ai-translate-with-choice-languages-container--select-language {\\n cursor: pointer;\\n}\\n\\n.incoming-text-message,\\n.incoming-text-message * {\\n box-sizing: border-box;\\n}\\n\\n.incoming-text-message {\\n background: var(--secondary-background);\\n padding: 0px 16px 8px 8px;\\n display: flex;\\n flex-direction: row;\\n gap: 8px;\\n align-items: flex-end;\\n justify-content: flex-start;\\n flex-shrink: 0;\\n width: 680px;\\n position: relative;\\n}\\n\\n.incoming {\\n display: flex;\\n flex-direction: column;\\n gap: 2px;\\n align-items: flex-start;\\n justify-content: flex-end;\\n flex-shrink: 0;\\n position: relative;\\n}\\n\\n.name {\\n padding: 0px 16px 0px 16px;\\n display: flex;\\n flex-direction: row;\\n gap: 8px;\\n align-items: flex-start;\\n justify-content: flex-start;\\n flex-shrink: 0;\\n position: relative;\\n}\\n\\n.caption {\\n display: flex;\\n flex-direction: row;\\n gap: 0px;\\n align-items: center;\\n justify-content: flex-start;\\n flex-shrink: 0;\\n position: relative;\\n}\\n\\n.name2 {\\n color: var(--secondary-secondary-300, #636d78);\\n text-align: left;\\n font: var(--label-label-medium, 500 12px/16px \\\"Roboto\\\", sans-serif);\\n position: relative;\\n}\\n\\n.message {\\n display: flex;\\n flex-direction: row;\\n gap: 8px;\\n align-items: flex-end;\\n justify-content: flex-start;\\n flex-shrink: 0;\\n position: relative;\\n}\\n\\n.bubble {\\n display: flex;\\n flex-direction: column;\\n gap: 4px;\\n align-items: flex-end;\\n justify-content: flex-end;\\n flex-shrink: 0;\\n position: relative;\\n}\\n\\n.chat-bubble-background {\\n background: var(--incoming-background);\\n border-radius: 22px 22px 22px 0px;\\n padding: 8px 12px 8px 12px;\\n display: flex;\\n flex-direction: row;\\n gap: 10px;\\n align-items: flex-start;\\n justify-content: flex-start;\\n flex-shrink: 0;\\n position: relative;\\n min-width: 120px;\\n max-width: 480px;\\n}\\n\\n.message-in-a-single-line {\\n color: var(--secondary-secondary-900, #0b121b);\\n text-align: left;\\n font: var(--body-body-medium, 400 14px/20px \\\"Roboto\\\", sans-serif);\\n position: relative;\\n display: flex;\\n align-items: center;\\n justify-content: flex-start;\\n}\\n\\n.translate {\\n padding: 0px 12px 0px 0px;\\n display: flex;\\n flex-direction: row;\\n gap: 8px;\\n align-items: center;\\n justify-content: flex-end;\\n align-self: stretch;\\n flex-shrink: 0;\\n position: relative;\\n}\\n\\n.caption2 {\\n display: flex;\\n flex-direction: row;\\n gap: 0px;\\n align-items: center;\\n justify-content: flex-end;\\n flex: 1;\\n position: relative;\\n}\\n\\n.time {\\n color: var(--secondary-secondary-300, #636d78);\\n text-align: right;\\n font: var(--label-label-small, 500 11px/16px \\\"Roboto\\\", sans-serif);\\n position: relative;\\n}\\n\\n.icon-translate {\\n border-radius: 4px;\\n display: flex;\\n flex-direction: row;\\n gap: 0px;\\n align-items: center;\\n justify-content: center;\\n flex-shrink: 0;\\n width: 16px;\\n height: 16px;\\n position: relative;\\n}\\n\\n.media-translate {\\n align-self: stretch;\\n flex: 1;\\n position: relative;\\n overflow: visible;\\n}\\n\\n.assist-answer {\\n padding: 0px 0px 16px 0px;\\n display: flex;\\n flex-direction: row;\\n gap: 10px;\\n align-items: center;\\n justify-content: center;\\n align-self: stretch;\\n flex-shrink: 0;\\n position: relative;\\n}\\n\\n.icon2 {\\n border-radius: 4px;\\n padding: 4px;\\n display: flex;\\n flex-direction: row;\\n gap: 0px;\\n align-items: center;\\n justify-content: center;\\n flex-shrink: 0;\\n width: 32px;\\n height: 32px;\\n position: relative;\\n}\\n\\n.status-loader {\\n align-self: stretch;\\n flex: 1;\\n position: relative;\\n overflow: visible;\\n}\\n\\n.caption3 {\\n padding: 0px 0px 16px 0px;\\n display: flex;\\n flex-direction: row;\\n gap: 0px;\\n align-items: flex-start;\\n justify-content: flex-start;\\n flex-shrink: 0;\\n position: relative;\\n}\\n\\n.ai-translate-action {\\n color: var(--tertiary-elements);\\n text-align: right;\\n font: 500 11px/16px \\\"Roboto\\\", sans-serif;\\n position: relative;\\n}\\n\\n.ai-assist-answer {\\n display: flex;\\n flex-direction: row;\\n gap: 10px;\\n align-items: center;\\n justify-content: center;\\n align-self: stretch;\\n flex-shrink: 0;\\n position: relative;\\n}\\n\\n.icon {\\n border-radius: 4px;\\n padding: 4px;\\n display: flex;\\n flex-direction: row;\\n gap: 0px;\\n align-items: center;\\n justify-content: center;\\n flex-shrink: 0;\\n width: 32px;\\n height: 32px;\\n position: relative;\\n}\\n\\n.actions-assist-answer {\\n padding: 5px 3px 5px 3px;\\n align-self: stretch;\\n flex: 1;\\n position: relative;\\n overflow: visible;\\n}\", \"\"]);\n// Exports\n/* harmony default export */ __webpack_exports__[\"default\"] = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/MessagesView/InComingMessage/InComingMessage.scss?./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js");
|
|
249
271
|
|
|
250
272
|
/***/ }),
|
|
251
273
|
|
|
@@ -256,7 +278,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
|
|
|
256
278
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
257
279
|
|
|
258
280
|
"use strict";
|
|
259
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".message-view-container {\\n min-height: 800px;\\n max-height: 800px;\\n display: flex;\\n flex-flow: column nowrap;\\n justify-content: space-between;\\n align-items: center;\\n margin: 0 auto;\\n gap: 3px;\\n}\\n.message-view-container--header {\\n min-height: 64px;\\n max-height: 64px;\\n width: 100%;\\n}\\n.message-view-container--information {\\n background-color: var(--color-background-info);\\n width: 100%;\\n display: flex;\\n flex-direction: row;\\n flex-wrap: nowrap;\\n justify-content: center;\\n align-items: center;\\n gap: 3px;\\n max-height: 16px;\\n min-height: 16px;\\n width: 100%;\\n padding-bottom: 2px;\\n padding-top: 2px;\\n border-radius: 4px;\\n margin-left: 20px;\\n margin-right: 20px;\\n line-height: 16px;\\n font-size: 11px;\\n}\\n.message-view-container--messages {\\n background-color: var(--secondary-background);\\n width: 100%;\\n max-height: 656px;\\n display: flex;\\n flex-flow: column nowrap;\\n justify-content: flex-end;\\n}\\n.message-view-container--system-message-wrapper {\\n justify-content: center;\\n align-items: center;\\n justify-items: center;\\n width: 100%;\\n display: flex;\\n flex-direction: column;\\n flex-wrap: nowrap;\\n margin: 0 auto;\\n gap: 3px;\\n}\\n.message-view-container--system-message-wrapper__date_container {\\n background-color: var(--disabled-elements);\\n border-radius: 30px;\\n width: 72px;\\n height: 20px;\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 500;\\n font-size: 11px;\\n line-height: 16px;\\n /* identical to box height, or 145% */\\n text-align: center;\\n letter-spacing: 0.5px;\\n justify-content: center;\\n align-items: center;\\n justify-items: center;\\n display: flex;\\n flex-direction: row;\\n flex-wrap: nowrap;\\n margin: 0 auto;\\n gap: 3px;\\n}\\n.message-view-container--incoming-message-wrapper {\\n display: flex;\\n flex-direction: column;\\n flex-wrap: nowrap;\\n justify-content: flex-start;\\n margin-top: 10px;\\n margin-bottom: 10px;\\n padding-bottom: 8px;\\n gap: 8px;\\n}\\n.message-view-container--incoming-message-wrapper__message {\\n display: flex;\\n flex-direction: row;\\n flex-wrap: nowrap;\\n justify-content: flex-start;\\n gap: 8px;\\n}\\n.message-view-container--incoming-message-wrapper__avatar {\\n display: flex;\\n flex-direction: column;\\n justify-content: flex-end;\\n align-items: center;\\n}\\n.message-view-container__sender-avatar {\\n min-height: 36px;\\n min-width: 36px;\\n max-height: 36px;\\n max-width: 36px;\\n height: 36px;\\n width: 36px;\\n border-radius: 50%;\\n justify-content: center;\\n align-items: center;\\n display: flex;\\n background-color: var(--disabled-elements);\\n}\\n.message-view-container--incoming-message-container {\\n display: flex;\\n flex-flow: column nowrap;\\n gap: 3px;\\n height: 100%;\\n max-width: 504px;\\n}\\n.message-view-container__sender-name {\\n color: var(--secondary-text);\\n padding-left: 16px;\\n}\\n.message-view-container__sender-message {\\n background: var(--incoming-background);\\n border-radius: 22px 22px 22px 0px;\\n padding: 8px 12px;\\n color: var(--main-text);\\n}\\n.message-view-container__widget-ai-translate {\\n text-align: left;\\n margin-left: 46px;\\n font-family: Roboto;\\n font-size: 11px;\\n font-style: normal;\\n font-weight: 500;\\n line-height: 16px; /* 145.455% */\\n letter-spacing: 0.5px;\\n color: var(--tertiary-elements);\\n align-self: self-start;\\n white-space: nowrap;\\n cursor: pointer;\\n}\\n.message-view-container__incoming-time {\\n display: flex;\\n flex-direction: column;\\n justify-content: flex-end;\\n color: var(--main-text);\\n}\\n.message-view-container__status-message {\\n display: flex;\\n flex-direction: row;\\n justify-content: flex-end;\\n gap: 2px;\\n}\\n.message-view-container--outgoing-message-wrapper {\\n margin-right: 20px;\\n display: flex;\\n flex-direction: row;\\n flex-wrap: nowrap;\\n justify-content: flex-end;\\n gap: 8px;\\n margin-bottom: 10px;\\n margin-top: 10px;\\n}\\n.message-view-container__outgoing-message {\\n background: var(--outgoing-background);\\n border-radius: 22px 22px 0px 22px;\\n padding: 8px 12px;\\n height: 100%;\\n max-width: 504px;\\n color: var(--main-text);\\n}\\n.message-view-container--message-content-wrapper {\\n max-width: 240px;\\n max-height: 160px;\\n min-width: 240px;\\n width: 240px;\\n display: flex;\\n flex-direction: row;\\n flex-wrap: nowrap;\\n justify-content:
|
|
281
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".message-view-container {\\n min-height: 800px;\\n max-height: 800px;\\n display: flex;\\n flex-flow: column nowrap;\\n justify-content: space-between;\\n align-items: center;\\n margin: 0 auto;\\n gap: 3px;\\n}\\n.message-view-container--header {\\n min-height: 64px;\\n max-height: 64px;\\n width: 100%;\\n}\\n.message-view-container--information {\\n background-color: var(--color-background-info);\\n width: 100%;\\n display: flex;\\n flex-direction: row;\\n flex-wrap: nowrap;\\n justify-content: center;\\n align-items: center;\\n gap: 3px;\\n max-height: 16px;\\n min-height: 16px;\\n width: 100%;\\n padding-bottom: 2px;\\n padding-top: 2px;\\n border-radius: 4px;\\n margin-left: 20px;\\n margin-right: 20px;\\n line-height: 16px;\\n font-size: 11px;\\n}\\n.message-view-container--messages {\\n background-color: var(--secondary-background);\\n width: 100%;\\n max-height: 656px;\\n display: flex;\\n flex-flow: column nowrap;\\n justify-content: flex-end;\\n}\\n.message-view-container--system-message-wrapper {\\n justify-content: center;\\n align-items: center;\\n justify-items: center;\\n width: 100%;\\n display: flex;\\n flex-direction: column;\\n flex-wrap: nowrap;\\n margin: 0 auto;\\n gap: 3px;\\n}\\n.message-view-container--system-message-wrapper__date_container {\\n background-color: var(--disabled-elements);\\n border-radius: 30px;\\n width: 72px;\\n height: 20px;\\n font-family: \\\"Roboto\\\";\\n font-style: normal;\\n font-weight: 500;\\n font-size: 11px;\\n line-height: 16px;\\n /* identical to box height, or 145% */\\n text-align: center;\\n letter-spacing: 0.5px;\\n justify-content: center;\\n align-items: center;\\n justify-items: center;\\n display: flex;\\n flex-direction: row;\\n flex-wrap: nowrap;\\n margin: 0 auto;\\n gap: 3px;\\n}\\n.message-view-container--incoming-message-wrapper {\\n display: flex;\\n flex-direction: column;\\n flex-wrap: nowrap;\\n justify-content: flex-start;\\n margin-top: 10px;\\n margin-bottom: 10px;\\n padding-bottom: 8px;\\n gap: 8px;\\n}\\n.message-view-container--incoming-message-wrapper__message {\\n display: flex;\\n flex-direction: row;\\n flex-wrap: nowrap;\\n justify-content: flex-start;\\n gap: 8px;\\n}\\n.message-view-container--incoming-message-wrapper__avatar {\\n display: flex;\\n flex-direction: column;\\n justify-content: flex-end;\\n align-items: center;\\n}\\n.message-view-container__sender-avatar {\\n min-height: 36px;\\n min-width: 36px;\\n max-height: 36px;\\n max-width: 36px;\\n height: 36px;\\n width: 36px;\\n border-radius: 50%;\\n justify-content: center;\\n align-items: center;\\n display: flex;\\n background-color: var(--disabled-elements);\\n}\\n.message-view-container--incoming-message-container {\\n display: flex;\\n flex-flow: column nowrap;\\n gap: 3px;\\n height: 100%;\\n max-width: 504px;\\n}\\n.message-view-container__sender-name {\\n color: var(--secondary-text);\\n padding-left: 16px;\\n}\\n.message-view-container__sender-message {\\n background: var(--incoming-background);\\n border-radius: 22px 22px 22px 0px;\\n padding: 8px 12px;\\n color: var(--main-text);\\n}\\n.message-view-container__widget-ai-translate {\\n text-align: left;\\n margin-left: 46px;\\n font-family: Roboto;\\n font-size: 11px;\\n font-style: normal;\\n font-weight: 500;\\n line-height: 16px; /* 145.455% */\\n letter-spacing: 0.5px;\\n color: var(--tertiary-elements);\\n align-self: self-start;\\n white-space: nowrap;\\n cursor: pointer;\\n}\\n.message-view-container__incoming-time {\\n display: flex;\\n flex-direction: column;\\n justify-content: flex-end;\\n color: var(--main-text);\\n}\\n.message-view-container__status-message {\\n display: flex;\\n flex-direction: row;\\n justify-content: flex-end;\\n gap: 2px;\\n}\\n.message-view-container--outgoing-message-wrapper {\\n margin-right: 20px;\\n display: flex;\\n flex-direction: row;\\n flex-wrap: nowrap;\\n justify-content: flex-end;\\n gap: 8px;\\n margin-bottom: 10px;\\n margin-top: 10px;\\n}\\n.message-view-container__outgoing-message {\\n background: var(--outgoing-background);\\n border-radius: 22px 22px 0px 22px;\\n padding: 8px 12px;\\n height: 100%;\\n max-width: 504px;\\n color: var(--main-text);\\n}\\n.message-view-container--message-content-wrapper {\\n max-width: 240px;\\n max-height: 160px;\\n min-width: 240px;\\n width: 240px;\\n display: flex;\\n flex-direction: row;\\n flex-wrap: nowrap;\\n justify-content: left;\\n align-items: center;\\n margin: 0 auto;\\n padding: 0;\\n border-radius: 4px;\\n}\\n.message-view-container--file-message-content-wrapper {\\n max-width: 85px;\\n max-height: 32px;\\n min-width: 85px;\\n min-height: 32px;\\n width: 85px;\\n height: 32px;\\n display: flex;\\n flex-direction: row;\\n flex-wrap: nowrap;\\n justify-content: center;\\n align-items: center;\\n margin: 0 auto;\\n gap: 12px;\\n}\\n.message-view-container__file-message-icon {\\n min-height: 32px;\\n min-width: 32px;\\n max-height: 32px;\\n max-width: 32px;\\n height: 32px;\\n width: 32px;\\n border-radius: 4px;\\n background: var(--caption);\\n}\\n.message-view-container--warning-error {\\n min-height: 11px;\\n max-height: 11px;\\n height: 11px;\\n justify-content: flex-start;\\n align-items: flex-start;\\n justify-items: flex-start;\\n text-align: left;\\n vertical-align: middle;\\n line-height: 11px;\\n font-size: 10px;\\n color: var(--main-elements);\\n font-weight: bold;\\n width: 100%;\\n display: flex;\\n flex-direction: row;\\n flex-wrap: nowrap;\\n margin: 0 auto;\\n gap: 3px;\\n}\\n.message-view-container--chat-input {\\n min-height: 54px;\\n max-height: 182px;\\n height: 54px;\\n width: 100%;\\n display: flex;\\n flex-direction: row;\\n flex-wrap: nowrap;\\n justify-content: space-between;\\n align-items: center;\\n margin: 0 auto;\\n padding-left: 12px;\\n padding-right: 12px;\\n padding-bottom: 2px;\\n gap: 6px;\\n}\\n.message-view-container--chat-input:disabled {\\n background-color: dimgrey;\\n color: linen;\\n opacity: 1;\\n cursor: not-allowed;\\n}\\n.message-view-container--chat-input textarea {\\n width: 100%;\\n height: 44px;\\n min-Height: 44px;\\n max-Height: 128px;\\n background-Color: var(--chat-input);\\n border-Radius: 4px;\\n padding-left: 16px;\\n padding-top: 8px;\\n line-height: 24px;\\n font-size: 16px;\\n margin: 0 auto;\\n resize: none;\\n}\\n\\n.input-text-message * {\\n box-sizing: border-box;\\n}\\n\\n.input-text-message {\\n background: var(--primary-primary-a-200, #f7f9ff);\\n border-radius: 4px;\\n display: flex;\\n flex-direction: row;\\n gap: 8px;\\n align-items: flex-end;\\n justify-content: flex-start;\\n flex: 1;\\n position: relative;\\n}\\n\\n.type-message {\\n color: var(--secondary-secondary-200, #90979f);\\n text-align: left;\\n font: var(--body-body-large, 400 16px/24px \\\"Roboto\\\", sans-serif);\\n position: relative;\\n flex: 1;\\n display: flex;\\n align-items: center;\\n justify-content: flex-start;\\n}\\n\\n.right {\\n display: flex;\\n flex-direction: row;\\n gap: 10px;\\n align-items: center;\\n justify-content: flex-end;\\n flex-shrink: 0;\\n position: relative;\\n margin-bottom: 5px;\\n}\\n\\n.ai-assist-icon {\\n border-radius: 4px;\\n padding: 4px;\\n display: flex;\\n flex-direction: row;\\n gap: 0px;\\n align-items: center;\\n justify-content: center;\\n flex-shrink: 0;\\n width: 24px;\\n height: 24px;\\n position: relative;\\n}\", \"\"]);\n// Exports\n/* harmony default export */ __webpack_exports__[\"default\"] = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/MessagesView/MessagesView.scss?./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js");
|
|
260
282
|
|
|
261
283
|
/***/ }),
|
|
262
284
|
|
|
@@ -293,6 +315,28 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
|
|
|
293
315
|
|
|
294
316
|
/***/ }),
|
|
295
317
|
|
|
318
|
+
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewAudioFile/PreviewAudioFile.scss":
|
|
319
|
+
/*!**********************************************************************************************************************************************************************************!*\
|
|
320
|
+
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewAudioFile/PreviewAudioFile.scss ***!
|
|
321
|
+
\**********************************************************************************************************************************************************************************/
|
|
322
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
323
|
+
|
|
324
|
+
"use strict";
|
|
325
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".preview-audio-file-container,\\n.preview-audio-file-container * {\\n box-sizing: border-box;\\n}\\n\\n.preview-audio-file-container {\\n display: flex;\\n flex-direction: row;\\n gap: 8px;\\n align-items: center;\\n justify-content: flex-start;\\n align-self: stretch;\\n flex-shrink: 0;\\n position: relative;\\n}\\n.preview-audio-file-container--placeholder {\\n flex-shrink: 0;\\n width: 32px;\\n height: 32px;\\n position: static;\\n}\\n.preview-audio-file-container--placeholder__bg {\\n background: var(--incoming-background, #e4e6e8);\\n border-radius: 8px;\\n width: 32px;\\n height: 32px;\\n position: absolute;\\n left: 0px;\\n top: 0px;\\n}\\n.preview-audio-file-container--placeholder__icon {\\n border-radius: 4px;\\n padding: 4px;\\n display: flex;\\n flex-direction: row;\\n gap: 0px;\\n align-items: center;\\n justify-content: center;\\n width: 24px;\\n height: 24px;\\n position: absolute;\\n left: 4px;\\n top: 4px;\\n}\\n.preview-audio-file-container--audio-mp-3 {\\n color: var(--main-text, #0b121b);\\n text-align: left;\\n font: 400 12px/16px \\\"Roboto\\\", sans-serif;\\n position: relative;\\n flex: 1;\\n}\\n\\n.media-audio-file {\\n align-self: stretch;\\n flex: 1;\\n position: relative;\\n overflow: visible;\\n}\", \"\"]);\n// Exports\n/* harmony default export */ __webpack_exports__[\"default\"] = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewAudioFile/PreviewAudioFile.scss?./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js");
|
|
326
|
+
|
|
327
|
+
/***/ }),
|
|
328
|
+
|
|
329
|
+
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDefaultFile/PreviewDefaultFile.scss":
|
|
330
|
+
/*!**************************************************************************************************************************************************************************************!*\
|
|
331
|
+
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDefaultFile/PreviewDefaultFile.scss ***!
|
|
332
|
+
\**************************************************************************************************************************************************************************************/
|
|
333
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
334
|
+
|
|
335
|
+
"use strict";
|
|
336
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".preview-default-file-container,\\n.preview-default-file-container * {\\n box-sizing: border-box;\\n}\\n\\n.preview-default-file-container {\\n display: flex;\\n flex-direction: row;\\n gap: 8px;\\n align-items: center;\\n justify-content: flex-start;\\n align-self: stretch;\\n flex-shrink: 0;\\n position: relative;\\n}\\n.preview-default-file-container--placeholder {\\n flex-shrink: 0;\\n width: 32px;\\n height: 32px;\\n position: static;\\n}\\n.preview-default-file-container--placeholder__bg {\\n background: var(--incoming-background, #e4e6e8);\\n border-radius: 8px;\\n width: 32px;\\n height: 32px;\\n position: absolute;\\n left: 0px;\\n top: 0px;\\n}\\n.preview-default-file-container--placeholder__icon {\\n border-radius: 4px;\\n padding: 4px;\\n display: flex;\\n flex-direction: row;\\n gap: 0px;\\n align-items: center;\\n justify-content: center;\\n width: 24px;\\n height: 24px;\\n position: absolute;\\n left: 4px;\\n top: 4px;\\n}\\n.preview-default-file-container--default-file {\\n color: var(--main-text, #0b121b);\\n text-align: left;\\n font: 400 12px/16px \\\"Roboto\\\", sans-serif;\\n position: relative;\\n flex: 1;\\n}\\n\\n.media-text-document {\\n align-self: stretch;\\n flex: 1;\\n position: relative;\\n overflow: visible;\\n}\", \"\"]);\n// Exports\n/* harmony default export */ __webpack_exports__[\"default\"] = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDefaultFile/PreviewDefaultFile.scss?./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js");
|
|
337
|
+
|
|
338
|
+
/***/ }),
|
|
339
|
+
|
|
296
340
|
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDialog.scss":
|
|
297
341
|
/*!**************************************************************************************************************************************************************!*\
|
|
298
342
|
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDialog.scss ***!
|
|
@@ -300,7 +344,29 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
|
|
|
300
344
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
301
345
|
|
|
302
346
|
"use strict";
|
|
303
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n___CSS_LOADER_EXPORT___.push([module.id, \"@import url(https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,400;0,500;0,700;1,700&display=swap);\"]);\n___CSS_LOADER_EXPORT___.push([module.id, \"@import url(https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&display=swap);\"]);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"@charset \\\"UTF-8\\\";\\n/* http://meyerweb.com/eric/tools/css/reset/\\n v2.0-modified | 20110126\\n License: none (public domain)\\n*/\\nhtml, body, div, span, applet, object, iframe,\\nh1, h2, h3, h4, h5, h6, p, blockquote, pre,\\na, abbr, acronym, address, big, cite, code,\\ndel, dfn, em, img, ins, kbd, q, s, samp,\\nsmall, strike, strong, sub, sup, tt, var,\\nb, u, i, center,\\ndl, dt, dd, ol, ul, li,\\nfieldset, form, label, legend,\\ntable, caption, tbody, tfoot, thead, tr, th, td,\\narticle, aside, canvas, details, embed,\\nfigure, figcaption, footer, header, hgroup,\\nmenu, nav, output, ruby, section, summary,\\ntime, mark, audio, video {\\n margin: 0;\\n padding: 0;\\n border: 0;\\n font-size: 100%;\\n font: inherit;\\n vertical-align: baseline;\\n}\\n\\n/* make sure to set some focus styles for accessibility */\\n:focus {\\n outline: 0;\\n}\\n\\n/* HTML5 display-role reset for older browsers */\\narticle, aside, details, figcaption, figure,\\nfooter, header, hgroup, menu, nav, section {\\n display: block;\\n}\\n\\nbody {\\n line-height: 1;\\n}\\n\\nol, ul {\\n list-style: none;\\n}\\n\\nblockquote, q {\\n quotes: none;\\n}\\n\\nblockquote:before, blockquote:after,\\nq:before, q:after {\\n content: \\\"\\\";\\n content: none;\\n}\\n\\ntable {\\n border-collapse: collapse;\\n border-spacing: 0;\\n}\\n\\ninput[type=search]::-webkit-search-cancel-button,\\ninput[type=search]::-webkit-search-decoration,\\ninput[type=search]::-webkit-search-results-button,\\ninput[type=search]::-webkit-search-results-decoration {\\n -webkit-appearance: none;\\n -moz-appearance: none;\\n}\\n\\ninput[type=search] {\\n -webkit-appearance: none;\\n -moz-appearance: none;\\n -webkit-box-sizing: content-box;\\n -moz-box-sizing: content-box;\\n box-sizing: content-box;\\n}\\n\\ntextarea {\\n overflow: auto;\\n vertical-align: top;\\n resize: vertical;\\n}\\n\\n/**\\n * Correct `inline-block` display not defined in IE 6/7/8/9 and Firefox 3.\\n */\\naudio,\\ncanvas,\\nvideo {\\n display: inline-block;\\n *display: inline;\\n *zoom: 1;\\n max-width: 100%;\\n}\\n\\n/**\\n * Prevent modern browsers from displaying `audio` without controls.\\n * Remove excess height in iOS 5 devices.\\n */\\naudio:not([controls]) {\\n display: none;\\n height: 0;\\n}\\n\\n/**\\n * Address styling not present in IE 7/8/9, Firefox 3, and Safari 4.\\n * Known issue: no IE 6 support.\\n */\\n[hidden] {\\n display: none;\\n}\\n\\n/**\\n * 1. Correct text resizing oddly in IE 6/7 when body `font-size` is set using\\n * `em` units.\\n * 2. Prevent iOS text size adjust after orientation change, without disabling\\n * user zoom.\\n */\\nhtml {\\n font-size: 100%; /* 1 */\\n -webkit-text-size-adjust: 100%; /* 2 */\\n -ms-text-size-adjust: 100%; /* 2 */\\n}\\n\\n/**\\n * Address `outline` inconsistency between Chrome and other browsers.\\n */\\na:focus {\\n outline: thin dotted;\\n}\\n\\n/**\\n * Improve readability when focused and also mouse hovered in all browsers.\\n */\\na:active,\\na:hover {\\n outline: 0;\\n}\\n\\n/**\\n * 1. Remove border when inside `a` element in IE 6/7/8/9 and Firefox 3.\\n * 2. Improve image quality when scaled in IE 7.\\n */\\nimg {\\n border: 0; /* 1 */\\n -ms-interpolation-mode: bicubic; /* 2 */\\n}\\n\\n/**\\n * Address margin not present in IE 6/7/8/9, Safari 5, and Opera 11.\\n */\\nfigure {\\n margin: 0;\\n}\\n\\n/**\\n * Correct margin displayed oddly in IE 6/7.\\n */\\nform {\\n margin: 0;\\n}\\n\\n/**\\n * Define consistent border, margin, and padding.\\n */\\nfieldset {\\n border: 1px solid #c0c0c0;\\n margin: 0 2px;\\n padding: 0.35em 0.625em 0.75em;\\n}\\n\\n/**\\n * 1. Correct color not being inherited in IE 6/7/8/9.\\n * 2. Correct text not wrapping in Firefox 3.\\n * 3. Correct alignment displayed oddly in IE 6/7.\\n */\\nlegend {\\n border: 0; /* 1 */\\n padding: 0;\\n white-space: normal; /* 2 */\\n *margin-left: -7px; /* 3 */\\n}\\n\\n/**\\n * 1. Correct font size not being inherited in all browsers.\\n * 2. Address margins set differently in IE 6/7, Firefox 3+, Safari 5,\\n * and Chrome.\\n * 3. Improve appearance and consistency in all browsers.\\n */\\nbutton,\\ninput,\\nselect,\\ntextarea {\\n font-size: 100%; /* 1 */\\n margin: 0; /* 2 */\\n vertical-align: baseline; /* 3 */\\n *vertical-align: middle; /* 3 */\\n}\\n\\n/**\\n * Address Firefox 3+ setting `line-height` on `input` using `!important` in\\n * the UA stylesheet.\\n */\\nbutton,\\ninput {\\n line-height: normal;\\n}\\n\\n/**\\n * Address inconsistent `text-transform` inheritance for `button` and `select`.\\n * All other form control elements do not inherit `text-transform` values.\\n * Correct `button` style inheritance in Chrome, Safari 5+, and IE 6+.\\n * Correct `select` style inheritance in Firefox 4+ and Opera.\\n */\\nbutton,\\nselect {\\n text-transform: none;\\n}\\n\\n/**\\n * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`\\n * and `video` controls.\\n * 2. Correct inability to style clickable `input` types in iOS.\\n * 3. Improve usability and consistency of cursor style between image-type\\n * `input` and others.\\n * 4. Remove inner spacing in IE 7 without affecting normal text inputs.\\n * Known issue: inner spacing remains in IE 6.\\n */\\nbutton,\\nhtml input[type=button],\\ninput[type=reset],\\ninput[type=submit] {\\n -webkit-appearance: button; /* 2 */\\n cursor: pointer; /* 3 */\\n *overflow: visible; /* 4 */\\n}\\n\\n/**\\n * Re-set default cursor for disabled elements.\\n */\\nbutton[disabled],\\nhtml input[disabled] {\\n cursor: default;\\n}\\n\\n/**\\n * 1. Address box sizing set to content-box in IE 8/9.\\n * 2. Remove excess padding in IE 8/9.\\n * 3. Remove excess padding in IE 7.\\n * Known issue: excess padding remains in IE 6.\\n */\\ninput[type=checkbox],\\ninput[type=radio] {\\n box-sizing: border-box; /* 1 */\\n padding: 0; /* 2 */\\n *height: 13px; /* 3 */\\n *width: 13px; /* 3 */\\n}\\n\\n/**\\n * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.\\n * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome\\n * (include `-moz` to future-proof).\\n */\\ninput[type=search] {\\n -webkit-appearance: textfield; /* 1 */\\n -moz-box-sizing: content-box;\\n -webkit-box-sizing: content-box; /* 2 */\\n box-sizing: content-box;\\n}\\n\\n/**\\n * Remove inner padding and search cancel button in Safari 5 and Chrome\\n * on OS X.\\n */\\ninput[type=search]::-webkit-search-cancel-button,\\ninput[type=search]::-webkit-search-decoration {\\n -webkit-appearance: none;\\n}\\n\\n/**\\n * Remove inner padding and border in Firefox 3+.\\n */\\nbutton::-moz-focus-inner,\\ninput::-moz-focus-inner {\\n border: 0;\\n padding: 0;\\n}\\n\\n/**\\n * 1. Remove default vertical scrollbar in IE 6/7/8/9.\\n * 2. Improve readability and alignment in all browsers.\\n */\\ntextarea {\\n overflow: auto; /* 1 */\\n vertical-align: top; /* 2 */\\n}\\n\\n/**\\n * Remove most spacing between table cells.\\n */\\ntable {\\n border-collapse: collapse;\\n border-spacing: 0;\\n}\\n\\nhtml,\\nbutton,\\ninput,\\nselect,\\ntextarea {\\n color: #222;\\n}\\n\\n::-moz-selection {\\n background: #b3d4fc;\\n text-shadow: none;\\n}\\n\\n::selection {\\n background: #b3d4fc;\\n text-shadow: none;\\n}\\n\\nimg {\\n vertical-align: middle;\\n}\\n\\nfieldset {\\n border: 0;\\n margin: 0;\\n padding: 0;\\n}\\n\\ntextarea {\\n resize: vertical;\\n}\\n\\n.chromeframe {\\n margin: 0.2em 0;\\n background: #ccc;\\n color: #000;\\n padding: 0.2em 0;\\n}\\n\\n* {\\n padding: 0;\\n margin: 0;\\n border: 0;\\n}\\n\\n*, *:before, *:after {\\n -moz-box-sizing: border-box;\\n -webkit-box-sizing: border-box;\\n box-sizing: border-box;\\n}\\n\\n:focus, :active {\\n outline: none;\\n}\\n\\na:focus, a:active {\\n outline: none;\\n}\\n\\nnav, footer, header, aside {\\n display: block;\\n}\\n\\nhtml, body {\\n height: 100%;\\n width: 100%;\\n font-size: 100%;\\n line-height: 1;\\n font-size: 14px;\\n -ms-text-size-adjust: 100%;\\n -moz-text-size-adjust: 100%;\\n -webkit-text-size-adjust: 100%;\\n}\\n\\ninput, button, textarea {\\n font-family: inherit;\\n}\\n\\ninput::-ms-clear {\\n display: none;\\n}\\n\\nbutton {\\n cursor: pointer;\\n}\\n\\nbutton::-moz-focus-inner {\\n padding: 0;\\n border: 0;\\n}\\n\\na, a:visited {\\n text-decoration: none;\\n}\\n\\nul li {\\n list-style: none;\\n}\\n\\nimg {\\n vertical-align: top;\\n}\\n\\nh1, h2, h3, h4, h5, h6 {\\n font-size: inherit;\\n font-weight: 400;\\n}\\n\\n/*\\n@font-face {\\n font-family: \\\"Roboto-Regular\\\";\\n src: url(\\\"../fonts/Roboto-Regular.eot\\\");\\n src: local(\\\"☺\\\"), url(\\\"../fonts/Roboto-Regular.woff\\\") format(\\\"woff\\\"),\\n url(\\\"../fonts/Roboto-Regular.ttf\\\") format(\\\"truetype\\\");\\n font-weight: normal;\\n font-style: normal;\\n}\\n\\n@font-face {\\n font-family: \\\"Roboto-Medium\\\";\\n src: url(\\\"../fonts/Roboto-Medium.eot\\\");\\n src: local(\\\"☺\\\"), url(\\\"../fonts/Roboto-Medium.woff\\\") format(\\\"woff\\\"),\\n url(\\\"../fonts/Roboto-Medium.ttf\\\") format(\\\"truetype\\\");\\n font-weight: normal;\\n font-style: normal;\\n}\\n\\n@font-face {\\n font-family: \\\"Roboto-Bold\\\";\\n src: url(\\\"../fonts/Roboto-Bold.eot\\\");\\n src: local(\\\"☺\\\"), url(\\\"../fonts/Roboto-Bold.woff\\\") format(\\\"woff\\\"),\\n url(\\\"../fonts/Roboto-Bold.ttf\\\") format(\\\"truetype\\\");\\n font-weight: normal;\\n font-style: normal;\\n}\\n*/\\n:root {\\n --primary: #3978FC;\\n --color-background: #FFFFFF;\\n --color-background-modal: #C4D7FE;\\n --color-background-overlay: #0B121B;\\n --color-divider: #E7EFFF;\\n --color-font: #0B121B;\\n --color-icon: #3978FC;\\n --color-background-info:#C4D7FE;\\n --tertiary-elements: #636D78;\\n --main-elements: #3978FC;\\n --secondary-elements: #202F3E;\\n --input-elements: #202F3E;\\n --disabled-elements: #BCC1C5;\\n --field-border: #90979F;\\n --main-text: #0B121B;\\n --secondary-text: #636D78;\\n --caption: #90979F;\\n --main-background: #FFFFFF;\\n --secondary-background: #FFFFFF;\\n --secondary-background-modal: rgba(19, 29, 40, 0.8);\\n --incoming-background: #E4E6E8;\\n --outgoing-background: #E7EFFF;\\n --dropdown-background: #FFFFFF;\\n --chat-input: #F7F9FF;\\n --divider: #E7EFFF;\\n --error: #FF3B30;\\n --hightlight: #FFFDC1;\\n}\\n\\nhtml[data-theme=dark] {\\n --primary: #3978FC;\\n --color-background: #0B121B;\\n --color-background-modal: #131D28;\\n --color-background-overlay: #0B121B;\\n --color-divider: #414E5B;\\n --color-font: #FFFFFF;\\n --color-icon: #74A1FD;\\n --color-background-info: #3978FC;\\n --tertiary-elements: rgba(144, 151, 159, 0.8);\\n --main-elements: #74A1FD;\\n --secondary-elements: #FFFFFF;\\n --input-elements: #90979F;\\n --disabled-elements: #636D78;\\n --field-border: #90979F;\\n --main-text: #FFFFFF;\\n --secondary-text: #90979F;\\n --caption: #BCC1C5;\\n --main-background: #202F3E;\\n --secondary-background: #131D28;\\n --incoming-background: #414E5B;\\n --outgoing-background: #3978FC;\\n --dropdown-background: #414E5B;\\n --chat-input: #131D28;\\n --divider: #414E5B;\\n --error: #FF766E;\\n --hightlight: #FFFDC1;\\n}\\n\\n* {\\n box-sizing: border-box;\\n}\\n\\nbody {\\n font-family: \\\"Roboto\\\";\\n color: var(--main-text);\\n background-color: var(--main-background);\\n overflow: hidden !important;\\n scrollbar-width: none !important;\\n max-height: 810px;\\n max-width: 1380px;\\n}\\n\\n.preview-dialog-container {\\n height: 72px;\\n min-height: 72px;\\n min-width: 320px;\\n padding: 8px 16px;\\n border: 1px solid var(--color-divider);\\n}\\n.preview-dialog-container.preview-selected {\\n background-color: var(--color-divider);\\n}\\n.preview-dialog-container__text-title {\\n text-align: left;\\n max-width: 120px;\\n text-overflow: ellipsis;\\n white-space: nowrap;\\n overflow: hidden;\\n}\\n.preview-dialog-container__text {\\n position: relative;\\n font-size: 12px;\\n font-family: \\\"Roboto\\\";\\n color: var(--color-font);\\n width: 200px; /* Could be anything you like. */\\n}\\n.preview-dialog-container__text-left {\\n position: relative;\\n font-size: 12px;\\n font-family: \\\"Roboto\\\";\\n color: var(--color-font);\\n width: 180px; /* Could be anything you like. */\\n}\\n.preview-dialog-container__text-concat {\\n position: relative;\\n display: inline-block;\\n word-wrap: break-word;\\n overflow: hidden;\\n max-height: 24px; /* (Number of lines you want visible) * (line-height) */\\n line-height: 12px;\\n text-align: justify;\\n}\\n\\n.avatar-wrapper {\\n background: var(--caption);\\n width: 55px;\\n height: 55px;\\n border-radius: 50%;\\n display: flex;\\n align-items: center;\\n text-align: center;\\n margin: 0 auto;\\n}\\n.avatar-wrapper.public_avatar {\\n background: var(--color-background-modal);\\n}\\n.avatar-wrapper.icon_colors {\\n color: var(--color-icon);\\n background-color: var(--secondary-text);\\n}\\n\\n.badge-text-style {\\n align-items: center;\\n text-align: center;\\n margin: 0 auto;\\n padding-top: 2px;\\n}\", \"\"]);\n// Exports\n/* harmony default export */ __webpack_exports__[\"default\"] = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDialog.scss?./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js");
|
|
347
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n___CSS_LOADER_EXPORT___.push([module.id, \"@import url(https://fonts.googleapis.com/css2?family=Ubuntu:ital,wght@0,400;0,500;0,700;1,700&display=swap);\"]);\n___CSS_LOADER_EXPORT___.push([module.id, \"@import url(https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&display=swap);\"]);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \"@charset \\\"UTF-8\\\";\\n/* http://meyerweb.com/eric/tools/css/reset/\\n v2.0-modified | 20110126\\n License: none (public domain)\\n*/\\nhtml, body, div, span, applet, object, iframe,\\nh1, h2, h3, h4, h5, h6, p, blockquote, pre,\\na, abbr, acronym, address, big, cite, code,\\ndel, dfn, em, img, ins, kbd, q, s, samp,\\nsmall, strike, strong, sub, sup, tt, var,\\nb, u, i, center,\\ndl, dt, dd, ol, ul, li,\\nfieldset, form, label, legend,\\ntable, caption, tbody, tfoot, thead, tr, th, td,\\narticle, aside, canvas, details, embed,\\nfigure, figcaption, footer, header, hgroup,\\nmenu, nav, output, ruby, section, summary,\\ntime, mark, audio, video {\\n margin: 0;\\n padding: 0;\\n border: 0;\\n font-size: 100%;\\n font: inherit;\\n vertical-align: baseline;\\n}\\n\\n/* make sure to set some focus styles for accessibility */\\n:focus {\\n outline: 0;\\n}\\n\\n/* HTML5 display-role reset for older browsers */\\narticle, aside, details, figcaption, figure,\\nfooter, header, hgroup, menu, nav, section {\\n display: block;\\n}\\n\\nbody {\\n line-height: 1;\\n}\\n\\nol, ul {\\n list-style: none;\\n}\\n\\nblockquote, q {\\n quotes: none;\\n}\\n\\nblockquote:before, blockquote:after,\\nq:before, q:after {\\n content: \\\"\\\";\\n content: none;\\n}\\n\\ntable {\\n border-collapse: collapse;\\n border-spacing: 0;\\n}\\n\\ninput[type=search]::-webkit-search-cancel-button,\\ninput[type=search]::-webkit-search-decoration,\\ninput[type=search]::-webkit-search-results-button,\\ninput[type=search]::-webkit-search-results-decoration {\\n -webkit-appearance: none;\\n -moz-appearance: none;\\n}\\n\\ninput[type=search] {\\n -webkit-appearance: none;\\n -moz-appearance: none;\\n -webkit-box-sizing: content-box;\\n -moz-box-sizing: content-box;\\n box-sizing: content-box;\\n}\\n\\ntextarea {\\n overflow: auto;\\n vertical-align: top;\\n resize: vertical;\\n}\\n\\n/**\\n * Correct `inline-block` display not defined in IE 6/7/8/9 and Firefox 3.\\n */\\naudio,\\ncanvas,\\nvideo {\\n display: inline-block;\\n *display: inline;\\n *zoom: 1;\\n max-width: 100%;\\n}\\n\\n/**\\n * Prevent modern browsers from displaying `audio` without controls.\\n * Remove excess height in iOS 5 devices.\\n */\\naudio:not([controls]) {\\n display: none;\\n height: 0;\\n}\\n\\n/**\\n * Address styling not present in IE 7/8/9, Firefox 3, and Safari 4.\\n * Known issue: no IE 6 support.\\n */\\n[hidden] {\\n display: none;\\n}\\n\\n/**\\n * 1. Correct text resizing oddly in IE 6/7 when body `font-size` is set using\\n * `em` units.\\n * 2. Prevent iOS text size adjust after orientation change, without disabling\\n * user zoom.\\n */\\nhtml {\\n font-size: 100%; /* 1 */\\n -webkit-text-size-adjust: 100%; /* 2 */\\n -ms-text-size-adjust: 100%; /* 2 */\\n}\\n\\n/**\\n * Address `outline` inconsistency between Chrome and other browsers.\\n */\\na:focus {\\n outline: thin dotted;\\n}\\n\\n/**\\n * Improve readability when focused and also mouse hovered in all browsers.\\n */\\na:active,\\na:hover {\\n outline: 0;\\n}\\n\\n/**\\n * 1. Remove border when inside `a` element in IE 6/7/8/9 and Firefox 3.\\n * 2. Improve image quality when scaled in IE 7.\\n */\\nimg {\\n border: 0; /* 1 */\\n -ms-interpolation-mode: bicubic; /* 2 */\\n}\\n\\n/**\\n * Address margin not present in IE 6/7/8/9, Safari 5, and Opera 11.\\n */\\nfigure {\\n margin: 0;\\n}\\n\\n/**\\n * Correct margin displayed oddly in IE 6/7.\\n */\\nform {\\n margin: 0;\\n}\\n\\n/**\\n * Define consistent border, margin, and padding.\\n */\\nfieldset {\\n border: 1px solid #c0c0c0;\\n margin: 0 2px;\\n padding: 0.35em 0.625em 0.75em;\\n}\\n\\n/**\\n * 1. Correct color not being inherited in IE 6/7/8/9.\\n * 2. Correct text not wrapping in Firefox 3.\\n * 3. Correct alignment displayed oddly in IE 6/7.\\n */\\nlegend {\\n border: 0; /* 1 */\\n padding: 0;\\n white-space: normal; /* 2 */\\n *margin-left: -7px; /* 3 */\\n}\\n\\n/**\\n * 1. Correct font size not being inherited in all browsers.\\n * 2. Address margins set differently in IE 6/7, Firefox 3+, Safari 5,\\n * and Chrome.\\n * 3. Improve appearance and consistency in all browsers.\\n */\\nbutton,\\ninput,\\nselect,\\ntextarea {\\n font-size: 100%; /* 1 */\\n margin: 0; /* 2 */\\n vertical-align: baseline; /* 3 */\\n *vertical-align: middle; /* 3 */\\n}\\n\\n/**\\n * Address Firefox 3+ setting `line-height` on `input` using `!important` in\\n * the UA stylesheet.\\n */\\nbutton,\\ninput {\\n line-height: normal;\\n}\\n\\n/**\\n * Address inconsistent `text-transform` inheritance for `button` and `select`.\\n * All other form control elements do not inherit `text-transform` values.\\n * Correct `button` style inheritance in Chrome, Safari 5+, and IE 6+.\\n * Correct `select` style inheritance in Firefox 4+ and Opera.\\n */\\nbutton,\\nselect {\\n text-transform: none;\\n}\\n\\n/**\\n * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`\\n * and `video` controls.\\n * 2. Correct inability to style clickable `input` types in iOS.\\n * 3. Improve usability and consistency of cursor style between image-type\\n * `input` and others.\\n * 4. Remove inner spacing in IE 7 without affecting normal text inputs.\\n * Known issue: inner spacing remains in IE 6.\\n */\\nbutton,\\nhtml input[type=button],\\ninput[type=reset],\\ninput[type=submit] {\\n -webkit-appearance: button; /* 2 */\\n cursor: pointer; /* 3 */\\n *overflow: visible; /* 4 */\\n}\\n\\n/**\\n * Re-set default cursor for disabled elements.\\n */\\nbutton[disabled],\\nhtml input[disabled] {\\n cursor: default;\\n}\\n\\n/**\\n * 1. Address box sizing set to content-box in IE 8/9.\\n * 2. Remove excess padding in IE 8/9.\\n * 3. Remove excess padding in IE 7.\\n * Known issue: excess padding remains in IE 6.\\n */\\ninput[type=checkbox],\\ninput[type=radio] {\\n box-sizing: border-box; /* 1 */\\n padding: 0; /* 2 */\\n *height: 13px; /* 3 */\\n *width: 13px; /* 3 */\\n}\\n\\n/**\\n * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.\\n * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome\\n * (include `-moz` to future-proof).\\n */\\ninput[type=search] {\\n -webkit-appearance: textfield; /* 1 */\\n -moz-box-sizing: content-box;\\n -webkit-box-sizing: content-box; /* 2 */\\n box-sizing: content-box;\\n}\\n\\n/**\\n * Remove inner padding and search cancel button in Safari 5 and Chrome\\n * on OS X.\\n */\\ninput[type=search]::-webkit-search-cancel-button,\\ninput[type=search]::-webkit-search-decoration {\\n -webkit-appearance: none;\\n}\\n\\n/**\\n * Remove inner padding and border in Firefox 3+.\\n */\\nbutton::-moz-focus-inner,\\ninput::-moz-focus-inner {\\n border: 0;\\n padding: 0;\\n}\\n\\n/**\\n * 1. Remove default vertical scrollbar in IE 6/7/8/9.\\n * 2. Improve readability and alignment in all browsers.\\n */\\ntextarea {\\n overflow: auto; /* 1 */\\n vertical-align: top; /* 2 */\\n}\\n\\n/**\\n * Remove most spacing between table cells.\\n */\\ntable {\\n border-collapse: collapse;\\n border-spacing: 0;\\n}\\n\\nhtml,\\nbutton,\\ninput,\\nselect,\\ntextarea {\\n color: #222;\\n}\\n\\n::-moz-selection {\\n background: #b3d4fc;\\n text-shadow: none;\\n}\\n\\n::selection {\\n background: #b3d4fc;\\n text-shadow: none;\\n}\\n\\nimg {\\n vertical-align: middle;\\n}\\n\\nfieldset {\\n border: 0;\\n margin: 0;\\n padding: 0;\\n}\\n\\ntextarea {\\n resize: vertical;\\n}\\n\\n.chromeframe {\\n margin: 0.2em 0;\\n background: #ccc;\\n color: #000;\\n padding: 0.2em 0;\\n}\\n\\n* {\\n padding: 0;\\n margin: 0;\\n border: 0;\\n}\\n\\n*, *:before, *:after {\\n -moz-box-sizing: border-box;\\n -webkit-box-sizing: border-box;\\n box-sizing: border-box;\\n}\\n\\n:focus, :active {\\n outline: none;\\n}\\n\\na:focus, a:active {\\n outline: none;\\n}\\n\\nnav, footer, header, aside {\\n display: block;\\n}\\n\\nhtml, body {\\n height: 100%;\\n width: 100%;\\n font-size: 100%;\\n line-height: 1;\\n font-size: 14px;\\n -ms-text-size-adjust: 100%;\\n -moz-text-size-adjust: 100%;\\n -webkit-text-size-adjust: 100%;\\n}\\n\\ninput, button, textarea {\\n font-family: inherit;\\n}\\n\\ninput::-ms-clear {\\n display: none;\\n}\\n\\nbutton {\\n cursor: pointer;\\n}\\n\\nbutton::-moz-focus-inner {\\n padding: 0;\\n border: 0;\\n}\\n\\na, a:visited {\\n text-decoration: none;\\n}\\n\\nul li {\\n list-style: none;\\n}\\n\\nimg {\\n vertical-align: top;\\n}\\n\\nh1, h2, h3, h4, h5, h6 {\\n font-size: inherit;\\n font-weight: 400;\\n}\\n\\n/*\\n@font-face {\\n font-family: \\\"Roboto-Regular\\\";\\n src: url(\\\"../fonts/Roboto-Regular.eot\\\");\\n src: local(\\\"☺\\\"), url(\\\"../fonts/Roboto-Regular.woff\\\") format(\\\"woff\\\"),\\n url(\\\"../fonts/Roboto-Regular.ttf\\\") format(\\\"truetype\\\");\\n font-weight: normal;\\n font-style: normal;\\n}\\n\\n@font-face {\\n font-family: \\\"Roboto-Medium\\\";\\n src: url(\\\"../fonts/Roboto-Medium.eot\\\");\\n src: local(\\\"☺\\\"), url(\\\"../fonts/Roboto-Medium.woff\\\") format(\\\"woff\\\"),\\n url(\\\"../fonts/Roboto-Medium.ttf\\\") format(\\\"truetype\\\");\\n font-weight: normal;\\n font-style: normal;\\n}\\n\\n@font-face {\\n font-family: \\\"Roboto-Bold\\\";\\n src: url(\\\"../fonts/Roboto-Bold.eot\\\");\\n src: local(\\\"☺\\\"), url(\\\"../fonts/Roboto-Bold.woff\\\") format(\\\"woff\\\"),\\n url(\\\"../fonts/Roboto-Bold.ttf\\\") format(\\\"truetype\\\");\\n font-weight: normal;\\n font-style: normal;\\n}\\n*/\\n:root {\\n --primary: #3978FC;\\n --color-background: #FFFFFF;\\n --color-background-modal: #C4D7FE;\\n --color-background-overlay: #0B121B;\\n --color-divider: #E7EFFF;\\n --color-font: #0B121B;\\n --color-icon: #3978FC;\\n --color-background-info:#C4D7FE;\\n --tertiary-elements: #636D78;\\n --main-elements: #3978FC;\\n --secondary-elements: #202F3E;\\n --input-elements: #202F3E;\\n --disabled-elements: #BCC1C5;\\n --field-border: #90979F;\\n --main-text: #0B121B;\\n --secondary-text: #636D78;\\n --caption: #90979F;\\n --main-background: #FFFFFF;\\n --secondary-background: #FFFFFF;\\n --secondary-background-modal: rgba(19, 29, 40, 0.8);\\n --incoming-background: #E4E6E8;\\n --outgoing-background: #E7EFFF;\\n --dropdown-background: #FFFFFF;\\n --chat-input: #F7F9FF;\\n --divider: #E7EFFF;\\n --error: #FF3B30;\\n --hightlight: #FFFDC1;\\n}\\n\\nhtml[data-theme=dark] {\\n --primary: #3978FC;\\n --color-background: #0B121B;\\n --color-background-modal: #131D28;\\n --color-background-overlay: #0B121B;\\n --color-divider: #414E5B;\\n --color-font: #FFFFFF;\\n --color-icon: #74A1FD;\\n --color-background-info: #3978FC;\\n --tertiary-elements: rgba(144, 151, 159, 0.8);\\n --main-elements: #74A1FD;\\n --secondary-elements: #FFFFFF;\\n --input-elements: #90979F;\\n --disabled-elements: #636D78;\\n --field-border: #90979F;\\n --main-text: #FFFFFF;\\n --secondary-text: #90979F;\\n --caption: #BCC1C5;\\n --main-background: #202F3E;\\n --secondary-background: #131D28;\\n --incoming-background: #414E5B;\\n --outgoing-background: #3978FC;\\n --dropdown-background: #414E5B;\\n --chat-input: #131D28;\\n --divider: #414E5B;\\n --error: #FF766E;\\n --hightlight: #FFFDC1;\\n}\\n\\n* {\\n box-sizing: border-box;\\n}\\n\\nbody {\\n font-family: \\\"Roboto\\\";\\n color: var(--main-text);\\n background-color: var(--main-background);\\n overflow: hidden !important;\\n scrollbar-width: none !important;\\n max-height: 810px;\\n max-width: 1380px;\\n}\\n\\n.preview-dialog-container {\\n height: 72px;\\n min-height: 72px;\\n min-width: 320px;\\n padding: 8px 16px;\\n border: 1px solid var(--color-divider);\\n}\\n.preview-dialog-container.preview-selected {\\n background-color: var(--color-divider);\\n}\\n.preview-dialog-container__text-title {\\n text-align: left;\\n max-width: 120px;\\n text-overflow: ellipsis;\\n white-space: nowrap;\\n overflow: hidden;\\n}\\n.preview-dialog-container__text {\\n position: relative;\\n font-size: 12px;\\n font-family: \\\"Roboto\\\";\\n color: var(--color-font);\\n width: 200px; /* Could be anything you like. */\\n}\\n.preview-dialog-container__text-left {\\n position: relative;\\n font-size: 12px;\\n font-family: \\\"Roboto\\\";\\n color: var(--color-font);\\n width: 180px; /* Could be anything you like. */\\n}\\n.preview-dialog-container__text-concat {\\n position: relative;\\n display: inline-block;\\n word-wrap: break-word;\\n overflow: hidden;\\n max-height: 32px; /* (Number of lines you want visible) * (line-height) */\\n line-height: 11px;\\n text-align: justify;\\n}\\n\\n.avatar-wrapper {\\n background: var(--caption);\\n width: 55px;\\n height: 55px;\\n border-radius: 50%;\\n display: flex;\\n align-items: center;\\n text-align: center;\\n margin: 0 auto;\\n}\\n.avatar-wrapper.public_avatar {\\n background: var(--color-background-modal);\\n}\\n.avatar-wrapper.icon_colors {\\n color: var(--color-icon);\\n background-color: var(--secondary-text);\\n}\\n\\n.badge-text-style {\\n align-items: center;\\n text-align: center;\\n margin: 0 auto;\\n padding-top: 2px;\\n}\", \"\"]);\n// Exports\n/* harmony default export */ __webpack_exports__[\"default\"] = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDialog.scss?./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js");
|
|
348
|
+
|
|
349
|
+
/***/ }),
|
|
350
|
+
|
|
351
|
+
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewImageFile/PreviewImageFile.scss":
|
|
352
|
+
/*!**********************************************************************************************************************************************************************************!*\
|
|
353
|
+
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewImageFile/PreviewImageFile.scss ***!
|
|
354
|
+
\**********************************************************************************************************************************************************************************/
|
|
355
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
356
|
+
|
|
357
|
+
"use strict";
|
|
358
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".preview-image-file-container,\\n.preview-image-file-container * {\\n box-sizing: border-box;\\n}\\n\\n.preview-image-file-container {\\n display: flex;\\n flex-direction: row;\\n gap: 8px;\\n align-items: center;\\n justify-content: flex-start;\\n align-self: stretch;\\n flex-shrink: 0;\\n position: relative;\\n}\\n.preview-image-file-container--placeholder {\\n flex-shrink: 0;\\n width: 32px;\\n height: 32px;\\n position: static;\\n}\\n.preview-image-file-container--placeholder__bg {\\n border-radius: 8px;\\n width: 32px;\\n height: 32px;\\n position: absolute;\\n left: 0px;\\n top: 0px;\\n}\\n.preview-image-file-container--travel-img {\\n color: var(--main-text, #0b121b);\\n text-align: left;\\n font: 400 12px/16px \\\"Roboto\\\", sans-serif;\\n position: relative;\\n flex: 1;\\n}\", \"\"]);\n// Exports\n/* harmony default export */ __webpack_exports__[\"default\"] = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewImageFile/PreviewImageFile.scss?./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js");
|
|
359
|
+
|
|
360
|
+
/***/ }),
|
|
361
|
+
|
|
362
|
+
/***/ "./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewVideoFile/PreviewVideoFile.scss":
|
|
363
|
+
/*!**********************************************************************************************************************************************************************************!*\
|
|
364
|
+
!*** ./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewVideoFile/PreviewVideoFile.scss ***!
|
|
365
|
+
\**********************************************************************************************************************************************************************************/
|
|
366
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
367
|
+
|
|
368
|
+
"use strict";
|
|
369
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js */ \"./node_modules/css-loader/dist/runtime/noSourceMaps.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../../../../../node_modules/css-loader/dist/runtime/api.js */ \"./node_modules/css-loader/dist/runtime/api.js\");\n/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);\n// Imports\n\n\nvar ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".preview-video-file-container,\\n.preview-video-file-container * {\\n box-sizing: border-box;\\n}\\n\\n.preview-video-file-container {\\n display: flex;\\n flex-direction: row;\\n gap: 8px;\\n align-items: center;\\n justify-content: flex-start;\\n align-self: stretch;\\n flex-shrink: 0;\\n position: relative;\\n}\\n.preview-video-file-container--placeholder {\\n flex-shrink: 0;\\n width: 32px;\\n height: 32px;\\n position: static;\\n}\\n.preview-video-file-container--placeholder__bg {\\n background: var(--incoming-background, #e4e6e8);\\n border-radius: 8px;\\n width: 32px;\\n height: 32px;\\n position: absolute;\\n left: 0px;\\n top: 0px;\\n}\\n.preview-video-file-container--placeholder__icon {\\n border-radius: 4px;\\n padding: 4px;\\n display: flex;\\n flex-direction: row;\\n gap: 0px;\\n align-items: center;\\n justify-content: center;\\n width: 24px;\\n height: 24px;\\n position: absolute;\\n left: 4px;\\n top: 4px;\\n}\\n.preview-video-file-container--video-mp-4 {\\n color: var(--main-text, #0b121b);\\n text-align: left;\\n font: 400 12px/16px \\\"Roboto\\\", sans-serif;\\n position: relative;\\n flex: 1;\\n}\\n\\n.toggle-play {\\n align-self: stretch;\\n flex: 1;\\n position: relative;\\n overflow: visible;\\n}\", \"\"]);\n// Exports\n/* harmony default export */ __webpack_exports__[\"default\"] = (___CSS_LOADER_EXPORT___);\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewVideoFile/PreviewVideoFile.scss?./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js");
|
|
304
370
|
|
|
305
371
|
/***/ }),
|
|
306
372
|
|
|
@@ -469,6 +535,36 @@ eval("\n\nmodule.exports = function (i) {\n return i[1];\n};\n\n//# sourceURL=w
|
|
|
469
535
|
|
|
470
536
|
/***/ }),
|
|
471
537
|
|
|
538
|
+
/***/ "./node_modules/qb-ai-answer-assistant/dist/index.js":
|
|
539
|
+
/*!***********************************************************!*\
|
|
540
|
+
!*** ./node_modules/qb-ai-answer-assistant/dist/index.js ***!
|
|
541
|
+
\***********************************************************/
|
|
542
|
+
/***/ (function(module) {
|
|
543
|
+
|
|
544
|
+
eval("/*\n * ATTENTION: The \"eval\" devtool has been used (maybe by default in mode: \"development\").\n * This devtool is neither made for production nor for readable output files.\n * It uses \"eval()\" calls to create a separate source file in the browser devtools.\n * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)\n * or disable the default devtool with \"devtool: false\".\n * If you are looking for production-ready output files, see mode: \"production\" (https://webpack.js.org/configuration/mode/).\n */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(true)\n\t\tmodule.exports = factory();\n\telse { var i, a; }\n})(self, function() {\nreturn /******/ (function() { // webpackBootstrap\n/******/ \tvar __webpack_modules__ = ({\n\n/***/ \"./node_modules/qb-ai-core/dist/index.js\":\n/*!***********************************************!*\\\n !*** ./node_modules/qb-ai-core/dist/index.js ***!\n \\***********************************************/\n/***/ (function(module) {\n\neval(\"/*\\n * ATTENTION: The \\\"eval\\\" devtool has been used (maybe by default in mode: \\\"development\\\").\\n * This devtool is neither made for production nor for readable output files.\\n * It uses \\\"eval()\\\" calls to create a separate source file in the browser devtools.\\n * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)\\n * or disable the default devtool with \\\"devtool: false\\\".\\n * If you are looking for production-ready output files, see mode: \\\"production\\\" (https://webpack.js.org/configuration/mode/).\\n */\\n(function webpackUniversalModuleDefinition(root, factory) {\\n\\tif(true)\\n\\t\\tmodule.exports = factory();\\n\\telse { var i, a; }\\n})(self, function() {\\nreturn /******/ (function() { // webpackBootstrap\\n/******/ \\t\\\"use strict\\\";\\n/******/ \\tvar __webpack_modules__ = ({\\n\\n/***/ \\\"./src/AIException.ts\\\":\\n/*!****************************!*\\\\\\n !*** ./src/AIException.ts ***!\\n \\\\****************************/\\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\\n\\neval(\\\"__webpack_require__.r(__webpack_exports__);\\\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\\\n/* harmony export */ AIException: function() { return /* binding */ AIException; }\\\\n/* harmony export */ });\\\\nvar __extends = (undefined && undefined.__extends) || (function () {\\\\n var extendStatics = function (d, b) {\\\\n extendStatics = Object.setPrototypeOf ||\\\\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\\\\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\\\\n return extendStatics(d, b);\\\\n };\\\\n return function (d, b) {\\\\n if (typeof b !== \\\\\\\"function\\\\\\\" && b !== null)\\\\n throw new TypeError(\\\\\\\"Class extends value \\\\\\\" + String(b) + \\\\\\\" is not a constructor or null\\\\\\\");\\\\n extendStatics(d, b);\\\\n function __() { this.constructor = d; }\\\\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\\\\n };\\\\n})();\\\\nvar AIException = /** @class */ (function (_super) {\\\\n __extends(AIException, _super);\\\\n function AIException(message, code) {\\\\n var _this = _super.call(this, message) || this;\\\\n _this.message = message;\\\\n _this.code = code;\\\\n return _this;\\\\n }\\\\n return AIException;\\\\n}(Error));\\\\n\\\\n\\\\n\\\\n//# sourceURL=webpack://qb-ai-core/./src/AIException.ts?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./src/AIModel.ts\\\":\\n/*!************************!*\\\\\\n !*** ./src/AIModel.ts ***!\\n \\\\************************/\\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\\n\\neval(\\\"__webpack_require__.r(__webpack_exports__);\\\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\\\n/* harmony export */ AIModel: function() { return /* binding */ AIModel; }\\\\n/* harmony export */ });\\\\nvar AIModel = /** @class */ (function () {\\\\n function AIModel() {\\\\n }\\\\n AIModel.gpt__3_5__turbo = \\\\\\\"gpt-3.5-turbo\\\\\\\";\\\\n AIModel.gpt__3_5__turbo__0613 = \\\\\\\"gpt-3.5-turbo-0613\\\\\\\";\\\\n AIModel.gpt__3_5__turbo__16k = \\\\\\\"gpt-3.5-turbo-16k\\\\\\\";\\\\n AIModel.gpt__3_5__turbo__16k__0613 = \\\\\\\"gpt-3.5-turbo-16k-0613\\\\\\\";\\\\n AIModel.gpt__4 = \\\\\\\"gpt-4\\\\\\\";\\\\n AIModel.gpt__4__0613 = \\\\\\\"gpt-4-0613\\\\\\\";\\\\n AIModel.gpt__4__32k = \\\\\\\"gpt-4-32k\\\\\\\";\\\\n AIModel.gpt__4__32k__0613 = \\\\\\\"gpt-4-32k-0613\\\\\\\";\\\\n return AIModel;\\\\n}());\\\\n\\\\n\\\\n\\\\n//# sourceURL=webpack://qb-ai-core/./src/AIModel.ts?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./src/ApiVersion.ts\\\":\\n/*!***************************!*\\\\\\n !*** ./src/ApiVersion.ts ***!\\n \\\\***************************/\\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\\n\\neval(\\\"__webpack_require__.r(__webpack_exports__);\\\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\\\n/* harmony export */ ApiVersion: function() { return /* binding */ ApiVersion; }\\\\n/* harmony export */ });\\\\nvar ApiVersion = /** @class */ (function () {\\\\n function ApiVersion() {\\\\n }\\\\n ApiVersion.v1 = \\\\\\\"v1\\\\\\\";\\\\n return ApiVersion;\\\\n}());\\\\n\\\\n\\\\n\\\\n//# sourceURL=webpack://qb-ai-core/./src/ApiVersion.ts?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./src/QBAICore.ts\\\":\\n/*!*************************!*\\\\\\n !*** ./src/QBAICore.ts ***!\\n \\\\*************************/\\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\\n\\neval(\\\"__webpack_require__.r(__webpack_exports__);\\\\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\\\\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\\\\n return new (P || (P = Promise))(function (resolve, reject) {\\\\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\\\\n function rejected(value) { try { step(generator[\\\\\\\"throw\\\\\\\"](value)); } catch (e) { reject(e); } }\\\\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\\\\n step((generator = generator.apply(thisArg, _arguments || [])).next());\\\\n });\\\\n};\\\\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\\\\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\\\\n return g = { next: verb(0), \\\\\\\"throw\\\\\\\": verb(1), \\\\\\\"return\\\\\\\": verb(2) }, typeof Symbol === \\\\\\\"function\\\\\\\" && (g[Symbol.iterator] = function() { return this; }), g;\\\\n function verb(n) { return function (v) { return step([n, v]); }; }\\\\n function step(op) {\\\\n if (f) throw new TypeError(\\\\\\\"Generator is already executing.\\\\\\\");\\\\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\\\\n if (f = 1, y && (t = op[0] & 2 ? y[\\\\\\\"return\\\\\\\"] : op[0] ? y[\\\\\\\"throw\\\\\\\"] || ((t = y[\\\\\\\"return\\\\\\\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\\\\n if (y = 0, t) op = [op[0] & 2, t.value];\\\\n switch (op[0]) {\\\\n case 0: case 1: t = op; break;\\\\n case 4: _.label++; return { value: op[1], done: false };\\\\n case 5: _.label++; y = op[1]; op = [0]; continue;\\\\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\\\\n default:\\\\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\\\\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\\\\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\\\\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\\\\n if (t[2]) _.ops.pop();\\\\n _.trys.pop(); continue;\\\\n }\\\\n op = body.call(thisArg, _);\\\\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\\\\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\\\\n }\\\\n};\\\\nvar QBAICore = /** @class */ (function () {\\\\n function QBAICore() {\\\\n }\\\\n QBAICore.sendPromptToProxy = function (apiKey, context, model, temperature, apiEndpoint) {\\\\n var _a;\\\\n return __awaiter(this, void 0, void 0, function () {\\\\n var requestOptions, response, data, outputMessage;\\\\n return __generator(this, function (_b) {\\\\n switch (_b.label) {\\\\n case 0:\\\\n requestOptions = {\\\\n method: 'POST',\\\\n headers: {\\\\n 'Content-Type': 'application/json',\\\\n 'qb-token': apiKey,\\\\n },\\\\n body: JSON.stringify({\\\\n // messages: [...dialogMessages, { role: 'user', content: prompt }],\\\\n messages: context,\\\\n model: model,\\\\n temperature: temperature,\\\\n }),\\\\n };\\\\n return [4 /*yield*/, fetch(apiEndpoint, requestOptions)];\\\\n case 1:\\\\n response = _b.sent();\\\\n return [4 /*yield*/, response.json()];\\\\n case 2:\\\\n data = _b.sent();\\\\n outputMessage = ((_a = data.choices[0].message) === null || _a === void 0 ? void 0 : _a.content) || '';\\\\n return [2 /*return*/, outputMessage];\\\\n }\\\\n });\\\\n });\\\\n };\\\\n QBAICore.sendPromptToOpenai = function (apiKey, context, model, temperature, organization, apiEndpoint) {\\\\n var _a;\\\\n return __awaiter(this, void 0, void 0, function () {\\\\n var requestOptions, requestOptionsWithOrganization, workOptions, response, data, outputMessage;\\\\n return __generator(this, function (_b) {\\\\n switch (_b.label) {\\\\n case 0:\\\\n requestOptions = {\\\\n method: 'POST',\\\\n headers: {\\\\n 'Content-Type': 'application/json',\\\\n Authorization: \\\\\\\"Bearer \\\\\\\".concat(apiKey),\\\\n },\\\\n body: JSON.stringify({\\\\n messages: context,\\\\n model: model,\\\\n temperature: temperature,\\\\n }),\\\\n };\\\\n requestOptionsWithOrganization = {\\\\n method: 'POST',\\\\n headers: {\\\\n 'Content-Type': 'application/json',\\\\n Authorization: \\\\\\\"Bearer \\\\\\\".concat(apiKey),\\\\n 'OpenAI-Organization': \\\\\\\"\\\\\\\".concat(organization),\\\\n },\\\\n body: JSON.stringify({\\\\n messages: context,\\\\n temperature: temperature,\\\\n }),\\\\n };\\\\n workOptions = organization && organization.length > 0\\\\n ? requestOptionsWithOrganization\\\\n : requestOptions;\\\\n return [4 /*yield*/, fetch(apiEndpoint, workOptions)];\\\\n case 1:\\\\n response = _b.sent();\\\\n return [4 /*yield*/, response.json()];\\\\n case 2:\\\\n data = _b.sent();\\\\n outputMessage = ((_a = data.choices[0].message) === null || _a === void 0 ? void 0 : _a.content) || '';\\\\n return [2 /*return*/, outputMessage];\\\\n }\\\\n });\\\\n });\\\\n };\\\\n return QBAICore;\\\\n}());\\\\n/* harmony default export */ __webpack_exports__[\\\\\\\"default\\\\\\\"] = (QBAICore);\\\\n\\\\n\\\\n//# sourceURL=webpack://qb-ai-core/./src/QBAICore.ts?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./src/Role.ts\\\":\\n/*!*********************!*\\\\\\n !*** ./src/Role.ts ***!\\n \\\\*********************/\\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\\n\\neval(\\\"__webpack_require__.r(__webpack_exports__);\\\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\\\n/* harmony export */ Role: function() { return /* binding */ Role; }\\\\n/* harmony export */ });\\\\nvar Role = /** @class */ (function () {\\\\n function Role() {\\\\n }\\\\n Role.me = \\\\\\\"me\\\\\\\";\\\\n Role.other = \\\\\\\"other\\\\\\\";\\\\n return Role;\\\\n}());\\\\n\\\\n;\\\\n\\\\n\\\\n//# sourceURL=webpack://qb-ai-core/./src/Role.ts?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./src/index.ts\\\":\\n/*!**********************!*\\\\\\n !*** ./src/index.ts ***!\\n \\\\**********************/\\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\\n\\neval(\\\"__webpack_require__.r(__webpack_exports__);\\\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\\\n/* harmony export */ AIException: function() { return /* reexport safe */ _AIException__WEBPACK_IMPORTED_MODULE_3__.AIException; },\\\\n/* harmony export */ AIModel: function() { return /* reexport safe */ _AIModel__WEBPACK_IMPORTED_MODULE_0__.AIModel; },\\\\n/* harmony export */ ApiVersion: function() { return /* reexport safe */ _ApiVersion__WEBPACK_IMPORTED_MODULE_1__.ApiVersion; },\\\\n/* harmony export */ QBAICore: function() { return /* reexport safe */ _QBAICore__WEBPACK_IMPORTED_MODULE_4__[\\\\\\\"default\\\\\\\"]; },\\\\n/* harmony export */ Role: function() { return /* reexport safe */ _Role__WEBPACK_IMPORTED_MODULE_2__.Role; }\\\\n/* harmony export */ });\\\\n/* harmony import */ var _AIModel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AIModel */ \\\\\\\"./src/AIModel.ts\\\\\\\");\\\\n/* harmony import */ var _ApiVersion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ApiVersion */ \\\\\\\"./src/ApiVersion.ts\\\\\\\");\\\\n/* harmony import */ var _Role__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Role */ \\\\\\\"./src/Role.ts\\\\\\\");\\\\n/* harmony import */ var _AIException__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./AIException */ \\\\\\\"./src/AIException.ts\\\\\\\");\\\\n/* harmony import */ var _QBAICore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./QBAICore */ \\\\\\\"./src/QBAICore.ts\\\\\\\");\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n//# sourceURL=webpack://qb-ai-core/./src/index.ts?\\\");\\n\\n/***/ })\\n\\n/******/ \\t});\\n/************************************************************************/\\n/******/ \\t// The module cache\\n/******/ \\tvar __webpack_module_cache__ = {};\\n/******/ \\t\\n/******/ \\t// The require function\\n/******/ \\tfunction __nested_webpack_require_13895__(moduleId) {\\n/******/ \\t\\t// Check if module is in cache\\n/******/ \\t\\tvar cachedModule = __webpack_module_cache__[moduleId];\\n/******/ \\t\\tif (cachedModule !== undefined) {\\n/******/ \\t\\t\\treturn cachedModule.exports;\\n/******/ \\t\\t}\\n/******/ \\t\\t// Create a new module (and put it into the cache)\\n/******/ \\t\\tvar module = __webpack_module_cache__[moduleId] = {\\n/******/ \\t\\t\\t// no module.id needed\\n/******/ \\t\\t\\t// no module.loaded needed\\n/******/ \\t\\t\\texports: {}\\n/******/ \\t\\t};\\n/******/ \\t\\n/******/ \\t\\t// Execute the module function\\n/******/ \\t\\t__webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_13895__);\\n/******/ \\t\\n/******/ \\t\\t// Return the exports of the module\\n/******/ \\t\\treturn module.exports;\\n/******/ \\t}\\n/******/ \\t\\n/************************************************************************/\\n/******/ \\t/* webpack/runtime/define property getters */\\n/******/ \\t!function() {\\n/******/ \\t\\t// define getter functions for harmony exports\\n/******/ \\t\\t__nested_webpack_require_13895__.d = function(exports, definition) {\\n/******/ \\t\\t\\tfor(var key in definition) {\\n/******/ \\t\\t\\t\\tif(__nested_webpack_require_13895__.o(definition, key) && !__nested_webpack_require_13895__.o(exports, key)) {\\n/******/ \\t\\t\\t\\t\\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\\n/******/ \\t\\t\\t\\t}\\n/******/ \\t\\t\\t}\\n/******/ \\t\\t};\\n/******/ \\t}();\\n/******/ \\t\\n/******/ \\t/* webpack/runtime/hasOwnProperty shorthand */\\n/******/ \\t!function() {\\n/******/ \\t\\t__nested_webpack_require_13895__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }\\n/******/ \\t}();\\n/******/ \\t\\n/******/ \\t/* webpack/runtime/make namespace object */\\n/******/ \\t!function() {\\n/******/ \\t\\t// define __esModule on exports\\n/******/ \\t\\t__nested_webpack_require_13895__.r = function(exports) {\\n/******/ \\t\\t\\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\\n/******/ \\t\\t\\t\\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\\n/******/ \\t\\t\\t}\\n/******/ \\t\\t\\tObject.defineProperty(exports, '__esModule', { value: true });\\n/******/ \\t\\t};\\n/******/ \\t}();\\n/******/ \\t\\n/************************************************************************/\\n/******/ \\t\\n/******/ \\t// startup\\n/******/ \\t// Load entry module and return exports\\n/******/ \\t// This entry module can't be inlined because the eval devtool is used.\\n/******/ \\tvar __nested_webpack_exports__ = __nested_webpack_require_13895__(\\\"./src/index.ts\\\");\\n/******/ \\t\\n/******/ \\treturn __nested_webpack_exports__;\\n/******/ })()\\n;\\n});\\n\\n//# sourceURL=webpack://qb-ai-answer-assistant/./node_modules/qb-ai-core/dist/index.js?\");\n\n/***/ }),\n\n/***/ \"./src/AIAnswerAssistantException.ts\":\n/*!*******************************************!*\\\n !*** ./src/AIAnswerAssistantException.ts ***!\n \\*******************************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ UNDEFINED_SETTINGS__AI_ANSWER_ASSISTANT_CODE: function() { return /* binding */ UNDEFINED_SETTINGS__AI_ANSWER_ASSISTANT_CODE; },\\n/* harmony export */ UNDEFINED_SETTINGS__AI_ANSWER_ASSISTANT_MESSAGE: function() { return /* binding */ UNDEFINED_SETTINGS__AI_ANSWER_ASSISTANT_MESSAGE; }\\n/* harmony export */ });\\n/* harmony import */ var qb_ai_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! qb-ai-core */ \\\"./node_modules/qb-ai-core/dist/index.js\\\");\\n/* harmony import */ var qb_ai_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(qb_ai_core__WEBPACK_IMPORTED_MODULE_0__);\\nvar __extends = (undefined && undefined.__extends) || (function () {\\n var extendStatics = function (d, b) {\\n extendStatics = Object.setPrototypeOf ||\\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\\n return extendStatics(d, b);\\n };\\n return function (d, b) {\\n if (typeof b !== \\\"function\\\" && b !== null)\\n throw new TypeError(\\\"Class extends value \\\" + String(b) + \\\" is not a constructor or null\\\");\\n extendStatics(d, b);\\n function __() { this.constructor = d; }\\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\\n };\\n})();\\n\\nvar UNDEFINED_SETTINGS__AI_ANSWER_ASSISTANT_MESSAGE = 'Undefined settings';\\nvar UNDEFINED_SETTINGS__AI_ANSWER_ASSISTANT_CODE = 121;\\nvar AIAnswerAssistantException = /** @class */ (function (_super) {\\n __extends(AIAnswerAssistantException, _super);\\n function AIAnswerAssistantException(message, code) {\\n var _this = _super.call(this, message, code) || this;\\n _this.message = message;\\n return _this;\\n }\\n return AIAnswerAssistantException;\\n}(qb_ai_core__WEBPACK_IMPORTED_MODULE_0__.AIException));\\n/* harmony default export */ __webpack_exports__[\\\"default\\\"] = (AIAnswerAssistantException);\\n\\n\\n//# sourceURL=webpack://qb-ai-answer-assistant/./src/AIAnswerAssistantException.ts?\");\n\n/***/ }),\n\n/***/ \"./src/AIAnswerAssistantSettings.ts\":\n/*!******************************************!*\\\n !*** ./src/AIAnswerAssistantSettings.ts ***!\n \\******************************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\nvar AIAnswerAssistantSettings = /** @class */ (function () {\\n function AIAnswerAssistantSettings(apiKey, apiVersion, maxRequestTokens, maxResponseTokens, model, organization, serverPath, temperature, token) {\\n this._apiKey = apiKey;\\n this._apiVersion = apiVersion;\\n this._maxRequestTokens = maxRequestTokens;\\n this._maxResponseTokens = maxResponseTokens;\\n this._model = model;\\n this._organization = organization;\\n this._serverPath = serverPath;\\n this._temperature = temperature;\\n this._token = token;\\n }\\n Object.defineProperty(AIAnswerAssistantSettings.prototype, \\\"apiKey\\\", {\\n get: function () {\\n return this._apiKey;\\n },\\n set: function (value) {\\n this._apiKey = value;\\n },\\n enumerable: false,\\n configurable: true\\n });\\n Object.defineProperty(AIAnswerAssistantSettings.prototype, \\\"apiVersion\\\", {\\n get: function () {\\n return this._apiVersion;\\n },\\n set: function (value) {\\n this._apiVersion = value;\\n },\\n enumerable: false,\\n configurable: true\\n });\\n Object.defineProperty(AIAnswerAssistantSettings.prototype, \\\"maxRequestTokens\\\", {\\n get: function () {\\n return this._maxRequestTokens;\\n },\\n set: function (value) {\\n this._maxRequestTokens = value;\\n },\\n enumerable: false,\\n configurable: true\\n });\\n Object.defineProperty(AIAnswerAssistantSettings.prototype, \\\"maxResponseTokens\\\", {\\n get: function () {\\n return this._maxResponseTokens;\\n },\\n set: function (value) {\\n this._maxResponseTokens = value;\\n },\\n enumerable: false,\\n configurable: true\\n });\\n Object.defineProperty(AIAnswerAssistantSettings.prototype, \\\"model\\\", {\\n get: function () {\\n return this._model;\\n },\\n set: function (value) {\\n this._model = value;\\n },\\n enumerable: false,\\n configurable: true\\n });\\n Object.defineProperty(AIAnswerAssistantSettings.prototype, \\\"organization\\\", {\\n get: function () {\\n return this._organization;\\n },\\n set: function (value) {\\n this._organization = value;\\n },\\n enumerable: false,\\n configurable: true\\n });\\n Object.defineProperty(AIAnswerAssistantSettings.prototype, \\\"serverPath\\\", {\\n get: function () {\\n return this._serverPath;\\n },\\n set: function (value) {\\n this._serverPath = value;\\n },\\n enumerable: false,\\n configurable: true\\n });\\n Object.defineProperty(AIAnswerAssistantSettings.prototype, \\\"temperature\\\", {\\n get: function () {\\n return this._temperature;\\n },\\n set: function (value) {\\n this._temperature = value;\\n },\\n enumerable: false,\\n configurable: true\\n });\\n Object.defineProperty(AIAnswerAssistantSettings.prototype, \\\"token\\\", {\\n get: function () {\\n return this._token;\\n },\\n set: function (value) {\\n this._token = value;\\n },\\n enumerable: false,\\n configurable: true\\n });\\n return AIAnswerAssistantSettings;\\n}());\\n/* harmony default export */ __webpack_exports__[\\\"default\\\"] = (AIAnswerAssistantSettings);\\n\\n\\n//# sourceURL=webpack://qb-ai-answer-assistant/./src/AIAnswerAssistantSettings.ts?\");\n\n/***/ }),\n\n/***/ \"./src/QBAIAnswerAssistant.ts\":\n/*!************************************!*\\\n !*** ./src/QBAIAnswerAssistant.ts ***!\n \\************************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony import */ var qb_ai_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! qb-ai-core */ \\\"./node_modules/qb-ai-core/dist/index.js\\\");\\n/* harmony import */ var qb_ai_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(qb_ai_core__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _AIAnswerAssistantSettings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AIAnswerAssistantSettings */ \\\"./src/AIAnswerAssistantSettings.ts\\\");\\n/* harmony import */ var _AIAnswerAssistantException__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AIAnswerAssistantException */ \\\"./src/AIAnswerAssistantException.ts\\\");\\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\\n return new (P || (P = Promise))(function (resolve, reject) {\\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\\n function rejected(value) { try { step(generator[\\\"throw\\\"](value)); } catch (e) { reject(e); } }\\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\\n step((generator = generator.apply(thisArg, _arguments || [])).next());\\n });\\n};\\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\\n return g = { next: verb(0), \\\"throw\\\": verb(1), \\\"return\\\": verb(2) }, typeof Symbol === \\\"function\\\" && (g[Symbol.iterator] = function() { return this; }), g;\\n function verb(n) { return function (v) { return step([n, v]); }; }\\n function step(op) {\\n if (f) throw new TypeError(\\\"Generator is already executing.\\\");\\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\\n if (f = 1, y && (t = op[0] & 2 ? y[\\\"return\\\"] : op[0] ? y[\\\"throw\\\"] || ((t = y[\\\"return\\\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\\n if (y = 0, t) op = [op[0] & 2, t.value];\\n switch (op[0]) {\\n case 0: case 1: t = op; break;\\n case 4: _.label++; return { value: op[1], done: false };\\n case 5: _.label++; y = op[1]; op = [0]; continue;\\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\\n default:\\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\\n if (t[2]) _.ops.pop();\\n _.trys.pop(); continue;\\n }\\n op = body.call(thisArg, _);\\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\\n }\\n};\\nvar __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {\\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\\n if (ar || !(i in from)) {\\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\\n ar[i] = from[i];\\n }\\n }\\n return to.concat(ar || Array.prototype.slice.call(from));\\n};\\n\\n\\n\\nvar QBAIAnswerAssistant = /** @class */ (function () {\\n function QBAIAnswerAssistant() {\\n }\\n QBAIAnswerAssistant.createAnswer = function (text, messages, settings) {\\n return __awaiter(this, void 0, void 0, function () {\\n var prompt;\\n return __generator(this, function (_a) {\\n prompt = QBAIAnswerAssistant.createAnswerAssistPrompt(text);\\n if (settings.apiKey) {\\n return [2 /*return*/, QBAIAnswerAssistant.getData(prompt, \\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\\n messages, settings.serverPath, settings.apiKey, qb_ai_core__WEBPACK_IMPORTED_MODULE_0__.AIModel.gpt__3_5__turbo, settings.temperature, settings.organization)];\\n }\\n else if (settings.serverPath) {\\n return [2 /*return*/, QBAIAnswerAssistant.getDataWithProxyServer(prompt, \\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\\n messages, settings.serverPath, settings.token, qb_ai_core__WEBPACK_IMPORTED_MODULE_0__.AIModel.gpt__3_5__turbo, settings.temperature, settings.organization)];\\n }\\n else {\\n throw new _AIAnswerAssistantException__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"](_AIAnswerAssistantException__WEBPACK_IMPORTED_MODULE_2__.UNDEFINED_SETTINGS__AI_ANSWER_ASSISTANT_MESSAGE, _AIAnswerAssistantException__WEBPACK_IMPORTED_MODULE_2__.UNDEFINED_SETTINGS__AI_ANSWER_ASSISTANT_CODE);\\n }\\n return [2 /*return*/];\\n });\\n });\\n };\\n QBAIAnswerAssistant.createAnswerAssistPrompt = function (textToSend) {\\n var prompt = \\\"You are a customer support chat operator. Your goal is to provide helpful and informative responses to customer inquiries. Give a response to the next user's query, considering the entire conversation context. Answer in the format of simple sentences. Do not include question in answer. Please, provide answer for this issue:'\\\".concat(textToSend, \\\"'.\\\");\\n return prompt;\\n };\\n QBAIAnswerAssistant.createDefaultAIAnswerAssistantSettings = function () {\\n return new _AIAnswerAssistantSettings__WEBPACK_IMPORTED_MODULE_1__[\\\"default\\\"]('', qb_ai_core__WEBPACK_IMPORTED_MODULE_0__.ApiVersion.v1, 3584, 3584, qb_ai_core__WEBPACK_IMPORTED_MODULE_0__.AIModel.gpt__3_5__turbo, '', 'https://api.openai.com/v1/chat/completions', 0.5, '');\\n };\\n QBAIAnswerAssistant.updateChatRoles = function (result) {\\n var context = result.map(function (item) {\\n var currentRole = 'user';\\n if (item.role === 'system') {\\n currentRole = 'system';\\n }\\n else {\\n currentRole = item.role === qb_ai_core__WEBPACK_IMPORTED_MODULE_0__.Role.other ? 'assistant' : 'user';\\n }\\n var tmp = { role: currentRole, content: item.content };\\n return tmp;\\n });\\n return context;\\n };\\n QBAIAnswerAssistant.getData = function (prompt, dialogMessages, servername, sessionToken, openAIModel, temperature, organization) {\\n if (openAIModel === void 0) { openAIModel = 'gpt-3.5-turbo'; }\\n if (temperature === void 0) { temperature = 0.5; }\\n if (organization === void 0) { organization = ''; }\\n return __awaiter(this, void 0, void 0, function () {\\n var apiEndpoint, apiKey, model, allData, context, err_1, outputMessage;\\n return __generator(this, function (_a) {\\n switch (_a.label) {\\n case 0:\\n apiEndpoint = \\\"\\\".concat(servername);\\n apiKey = sessionToken;\\n model = openAIModel;\\n allData = __spreadArray(__spreadArray([], dialogMessages, true), [{ role: 'user', content: prompt }], false);\\n context = this.updateChatRoles(allData);\\n _a.label = 1;\\n case 1:\\n _a.trys.push([1, 3, , 4]);\\n return [4 /*yield*/, qb_ai_core__WEBPACK_IMPORTED_MODULE_0__.QBAICore.sendPromptToOpenai(apiKey, context, model, temperature, organization, apiEndpoint)];\\n case 2: return [2 /*return*/, _a.sent()];\\n case 3:\\n err_1 = _a.sent();\\n outputMessage = QBAIAnswerAssistant.stringifyError(err_1);\\n throw new _AIAnswerAssistantException__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"](outputMessage, -1);\\n case 4: return [2 /*return*/];\\n }\\n });\\n });\\n };\\n QBAIAnswerAssistant.getDataWithProxyServer = function (prompt, dialogMessages, servername, sessionToken, openAIModel, temperature, organization) {\\n if (openAIModel === void 0) { openAIModel = 'gpt-3.5-turbo'; }\\n if (temperature === void 0) { temperature = 0.5; }\\n if (organization === void 0) { organization = ''; }\\n return __awaiter(this, void 0, void 0, function () {\\n var apiEndpoint, apiKey, model, allData, context, err_2, outputMessage;\\n return __generator(this, function (_a) {\\n switch (_a.label) {\\n case 0:\\n apiEndpoint = \\\"\\\".concat(servername);\\n apiKey = sessionToken;\\n model = openAIModel;\\n allData = __spreadArray(__spreadArray([], dialogMessages, true), [{ role: 'user', content: prompt }], false);\\n context = this.updateChatRoles(allData);\\n _a.label = 1;\\n case 1:\\n _a.trys.push([1, 3, , 4]);\\n return [4 /*yield*/, qb_ai_core__WEBPACK_IMPORTED_MODULE_0__.QBAICore.sendPromptToProxy(apiKey, context, model, temperature, apiEndpoint)];\\n case 2: return [2 /*return*/, _a.sent()];\\n case 3:\\n err_2 = _a.sent();\\n outputMessage = QBAIAnswerAssistant.stringifyError(err_2);\\n throw new _AIAnswerAssistantException__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"](outputMessage, -1);\\n case 4: return [2 /*return*/];\\n }\\n });\\n });\\n };\\n QBAIAnswerAssistant.stringifyError = function (error) {\\n if (typeof error === 'string')\\n return error;\\n if (error && typeof error === 'object') {\\n var dataError = error;\\n if (dataError.detail) {\\n return QBAIAnswerAssistant.parseErrorMessage(dataError.detail);\\n }\\n if (dataError === null || dataError === void 0 ? void 0 : dataError.message) {\\n return QBAIAnswerAssistant.parseErrorMessage(dataError.message);\\n }\\n return QBAIAnswerAssistant.parseErrorObject(dataError);\\n }\\n return JSON.stringify(error);\\n };\\n QBAIAnswerAssistant.parseErrorMessage = function (message) {\\n var data = QBAIAnswerAssistant.jsonParse(message);\\n if (typeof data === 'string') {\\n return data;\\n }\\n if (Array.isArray(data)) {\\n return data.join('');\\n }\\n if (typeof data === 'object') {\\n return QBAIAnswerAssistant.parseErrorObject(data);\\n }\\n return data;\\n };\\n QBAIAnswerAssistant.jsonParse = function (text) {\\n try {\\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\\n // @ts-ignore\\n return JSON.parse(text);\\n }\\n catch (error) {\\n return text;\\n }\\n };\\n QBAIAnswerAssistant.parseErrorObject = function (data) {\\n return Object.keys(data)\\n .map(function (key) {\\n var field = data[key];\\n return Array.isArray(field)\\n ? \\\"\\\".concat(key, \\\" \\\").concat(field.join(''))\\n : \\\"\\\".concat(key, \\\" \\\").concat(field);\\n })\\n .join(' ')\\n .replace(/errors\\\\s?/, '');\\n };\\n return QBAIAnswerAssistant;\\n}());\\n/* harmony default export */ __webpack_exports__[\\\"default\\\"] = (QBAIAnswerAssistant);\\n\\n\\n//# sourceURL=webpack://qb-ai-answer-assistant/./src/QBAIAnswerAssistant.ts?\");\n\n/***/ }),\n\n/***/ \"./src/index.ts\":\n/*!**********************!*\\\n !*** ./src/index.ts ***!\n \\**********************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ QBAIAnswerAssistant: function() { return /* reexport safe */ _QBAIAnswerAssistant__WEBPACK_IMPORTED_MODULE_0__[\\\"default\\\"]; }\\n/* harmony export */ });\\n/* harmony import */ var _QBAIAnswerAssistant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./QBAIAnswerAssistant */ \\\"./src/QBAIAnswerAssistant.ts\\\");\\n\\n\\n\\n\\n//# sourceURL=webpack://qb-ai-answer-assistant/./src/index.ts?\");\n\n/***/ })\n\n/******/ \t});\n/************************************************************************/\n/******/ \t// The module cache\n/******/ \tvar __webpack_module_cache__ = {};\n/******/ \t\n/******/ \t// The require function\n/******/ \tfunction __nested_webpack_require_38210__(moduleId) {\n/******/ \t\t// Check if module is in cache\n/******/ \t\tvar cachedModule = __webpack_module_cache__[moduleId];\n/******/ \t\tif (cachedModule !== undefined) {\n/******/ \t\t\treturn cachedModule.exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\t\t// no module.id needed\n/******/ \t\t\t// no module.loaded needed\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/ \t\n/******/ \t\t// Execute the module function\n/******/ \t\t__webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_38210__);\n/******/ \t\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/ \t\n/************************************************************************/\n/******/ \t/* webpack/runtime/compat get default export */\n/******/ \t!function() {\n/******/ \t\t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t\t__nested_webpack_require_38210__.n = function(module) {\n/******/ \t\t\tvar getter = module && module.__esModule ?\n/******/ \t\t\t\tfunction() { return module['default']; } :\n/******/ \t\t\t\tfunction() { return module; };\n/******/ \t\t\t__nested_webpack_require_38210__.d(getter, { a: getter });\n/******/ \t\t\treturn getter;\n/******/ \t\t};\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/define property getters */\n/******/ \t!function() {\n/******/ \t\t// define getter functions for harmony exports\n/******/ \t\t__nested_webpack_require_38210__.d = function(exports, definition) {\n/******/ \t\t\tfor(var key in definition) {\n/******/ \t\t\t\tif(__nested_webpack_require_38210__.o(definition, key) && !__nested_webpack_require_38210__.o(exports, key)) {\n/******/ \t\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n/******/ \t\t\t\t}\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/hasOwnProperty shorthand */\n/******/ \t!function() {\n/******/ \t\t__nested_webpack_require_38210__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/make namespace object */\n/******/ \t!function() {\n/******/ \t\t// define __esModule on exports\n/******/ \t\t__nested_webpack_require_38210__.r = function(exports) {\n/******/ \t\t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t\t}\n/******/ \t\t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t\t};\n/******/ \t}();\n/******/ \t\n/************************************************************************/\n/******/ \t\n/******/ \t// startup\n/******/ \t// Load entry module and return exports\n/******/ \t// This entry module can't be inlined because the eval devtool is used.\n/******/ \tvar __nested_webpack_exports__ = __nested_webpack_require_38210__(\"./src/index.ts\");\n/******/ \t\n/******/ \treturn __nested_webpack_exports__;\n/******/ })()\n;\n});\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./node_modules/qb-ai-answer-assistant/dist/index.js?");
|
|
545
|
+
|
|
546
|
+
/***/ }),
|
|
547
|
+
|
|
548
|
+
/***/ "./node_modules/qb-ai-rephrase/dist/index.js":
|
|
549
|
+
/*!***************************************************!*\
|
|
550
|
+
!*** ./node_modules/qb-ai-rephrase/dist/index.js ***!
|
|
551
|
+
\***************************************************/
|
|
552
|
+
/***/ (function(module) {
|
|
553
|
+
|
|
554
|
+
eval("/*\n * ATTENTION: The \"eval\" devtool has been used (maybe by default in mode: \"development\").\n * This devtool is neither made for production nor for readable output files.\n * It uses \"eval()\" calls to create a separate source file in the browser devtools.\n * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)\n * or disable the default devtool with \"devtool: false\".\n * If you are looking for production-ready output files, see mode: \"production\" (https://webpack.js.org/configuration/mode/).\n */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(true)\n\t\tmodule.exports = factory();\n\telse { var i, a; }\n})(self, function() {\nreturn /******/ (function() { // webpackBootstrap\n/******/ \tvar __webpack_modules__ = ({\n\n/***/ \"./node_modules/qb-ai-core/dist/index.js\":\n/*!***********************************************!*\\\n !*** ./node_modules/qb-ai-core/dist/index.js ***!\n \\***********************************************/\n/***/ (function(module) {\n\neval(\"/*\\n * ATTENTION: The \\\"eval\\\" devtool has been used (maybe by default in mode: \\\"development\\\").\\n * This devtool is neither made for production nor for readable output files.\\n * It uses \\\"eval()\\\" calls to create a separate source file in the browser devtools.\\n * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)\\n * or disable the default devtool with \\\"devtool: false\\\".\\n * If you are looking for production-ready output files, see mode: \\\"production\\\" (https://webpack.js.org/configuration/mode/).\\n */\\n(function webpackUniversalModuleDefinition(root, factory) {\\n\\tif(true)\\n\\t\\tmodule.exports = factory();\\n\\telse { var i, a; }\\n})(self, function() {\\nreturn /******/ (function() { // webpackBootstrap\\n/******/ \\t\\\"use strict\\\";\\n/******/ \\tvar __webpack_modules__ = ({\\n\\n/***/ \\\"./src/AIException.ts\\\":\\n/*!****************************!*\\\\\\n !*** ./src/AIException.ts ***!\\n \\\\****************************/\\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\\n\\neval(\\\"__webpack_require__.r(__webpack_exports__);\\\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\\\n/* harmony export */ AIException: function() { return /* binding */ AIException; }\\\\n/* harmony export */ });\\\\nvar __extends = (undefined && undefined.__extends) || (function () {\\\\n var extendStatics = function (d, b) {\\\\n extendStatics = Object.setPrototypeOf ||\\\\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\\\\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\\\\n return extendStatics(d, b);\\\\n };\\\\n return function (d, b) {\\\\n if (typeof b !== \\\\\\\"function\\\\\\\" && b !== null)\\\\n throw new TypeError(\\\\\\\"Class extends value \\\\\\\" + String(b) + \\\\\\\" is not a constructor or null\\\\\\\");\\\\n extendStatics(d, b);\\\\n function __() { this.constructor = d; }\\\\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\\\\n };\\\\n})();\\\\nvar AIException = /** @class */ (function (_super) {\\\\n __extends(AIException, _super);\\\\n function AIException(message, code) {\\\\n var _this = _super.call(this, message) || this;\\\\n _this.message = message;\\\\n _this.code = code;\\\\n return _this;\\\\n }\\\\n return AIException;\\\\n}(Error));\\\\n\\\\n\\\\n\\\\n//# sourceURL=webpack://qb-ai-core/./src/AIException.ts?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./src/AIModel.ts\\\":\\n/*!************************!*\\\\\\n !*** ./src/AIModel.ts ***!\\n \\\\************************/\\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\\n\\neval(\\\"__webpack_require__.r(__webpack_exports__);\\\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\\\n/* harmony export */ AIModel: function() { return /* binding */ AIModel; }\\\\n/* harmony export */ });\\\\nvar AIModel = /** @class */ (function () {\\\\n function AIModel() {\\\\n }\\\\n AIModel.gpt__3_5__turbo = \\\\\\\"gpt-3.5-turbo\\\\\\\";\\\\n AIModel.gpt__3_5__turbo__0613 = \\\\\\\"gpt-3.5-turbo-0613\\\\\\\";\\\\n AIModel.gpt__3_5__turbo__16k = \\\\\\\"gpt-3.5-turbo-16k\\\\\\\";\\\\n AIModel.gpt__3_5__turbo__16k__0613 = \\\\\\\"gpt-3.5-turbo-16k-0613\\\\\\\";\\\\n AIModel.gpt__4 = \\\\\\\"gpt-4\\\\\\\";\\\\n AIModel.gpt__4__0613 = \\\\\\\"gpt-4-0613\\\\\\\";\\\\n AIModel.gpt__4__32k = \\\\\\\"gpt-4-32k\\\\\\\";\\\\n AIModel.gpt__4__32k__0613 = \\\\\\\"gpt-4-32k-0613\\\\\\\";\\\\n return AIModel;\\\\n}());\\\\n\\\\n\\\\n\\\\n//# sourceURL=webpack://qb-ai-core/./src/AIModel.ts?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./src/ApiVersion.ts\\\":\\n/*!***************************!*\\\\\\n !*** ./src/ApiVersion.ts ***!\\n \\\\***************************/\\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\\n\\neval(\\\"__webpack_require__.r(__webpack_exports__);\\\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\\\n/* harmony export */ ApiVersion: function() { return /* binding */ ApiVersion; }\\\\n/* harmony export */ });\\\\nvar ApiVersion = /** @class */ (function () {\\\\n function ApiVersion() {\\\\n }\\\\n ApiVersion.v1 = \\\\\\\"v1\\\\\\\";\\\\n return ApiVersion;\\\\n}());\\\\n\\\\n\\\\n\\\\n//# sourceURL=webpack://qb-ai-core/./src/ApiVersion.ts?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./src/QBAICore.ts\\\":\\n/*!*************************!*\\\\\\n !*** ./src/QBAICore.ts ***!\\n \\\\*************************/\\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\\n\\neval(\\\"__webpack_require__.r(__webpack_exports__);\\\\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\\\\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\\\\n return new (P || (P = Promise))(function (resolve, reject) {\\\\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\\\\n function rejected(value) { try { step(generator[\\\\\\\"throw\\\\\\\"](value)); } catch (e) { reject(e); } }\\\\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\\\\n step((generator = generator.apply(thisArg, _arguments || [])).next());\\\\n });\\\\n};\\\\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\\\\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\\\\n return g = { next: verb(0), \\\\\\\"throw\\\\\\\": verb(1), \\\\\\\"return\\\\\\\": verb(2) }, typeof Symbol === \\\\\\\"function\\\\\\\" && (g[Symbol.iterator] = function() { return this; }), g;\\\\n function verb(n) { return function (v) { return step([n, v]); }; }\\\\n function step(op) {\\\\n if (f) throw new TypeError(\\\\\\\"Generator is already executing.\\\\\\\");\\\\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\\\\n if (f = 1, y && (t = op[0] & 2 ? y[\\\\\\\"return\\\\\\\"] : op[0] ? y[\\\\\\\"throw\\\\\\\"] || ((t = y[\\\\\\\"return\\\\\\\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\\\\n if (y = 0, t) op = [op[0] & 2, t.value];\\\\n switch (op[0]) {\\\\n case 0: case 1: t = op; break;\\\\n case 4: _.label++; return { value: op[1], done: false };\\\\n case 5: _.label++; y = op[1]; op = [0]; continue;\\\\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\\\\n default:\\\\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\\\\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\\\\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\\\\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\\\\n if (t[2]) _.ops.pop();\\\\n _.trys.pop(); continue;\\\\n }\\\\n op = body.call(thisArg, _);\\\\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\\\\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\\\\n }\\\\n};\\\\nvar QBAICore = /** @class */ (function () {\\\\n function QBAICore() {\\\\n }\\\\n QBAICore.sendPromptToProxy = function (apiKey, context, model, temperature, apiEndpoint) {\\\\n var _a;\\\\n return __awaiter(this, void 0, void 0, function () {\\\\n var requestOptions, response, data, outputMessage;\\\\n return __generator(this, function (_b) {\\\\n switch (_b.label) {\\\\n case 0:\\\\n requestOptions = {\\\\n method: 'POST',\\\\n headers: {\\\\n 'Content-Type': 'application/json',\\\\n 'qb-token': apiKey,\\\\n },\\\\n body: JSON.stringify({\\\\n // messages: [...dialogMessages, { role: 'user', content: prompt }],\\\\n messages: context,\\\\n model: model,\\\\n temperature: temperature,\\\\n }),\\\\n };\\\\n return [4 /*yield*/, fetch(apiEndpoint, requestOptions)];\\\\n case 1:\\\\n response = _b.sent();\\\\n return [4 /*yield*/, response.json()];\\\\n case 2:\\\\n data = _b.sent();\\\\n outputMessage = ((_a = data.choices[0].message) === null || _a === void 0 ? void 0 : _a.content) || '';\\\\n return [2 /*return*/, outputMessage];\\\\n }\\\\n });\\\\n });\\\\n };\\\\n QBAICore.sendPromptToOpenai = function (apiKey, context, model, temperature, organization, apiEndpoint) {\\\\n var _a;\\\\n return __awaiter(this, void 0, void 0, function () {\\\\n var requestOptions, requestOptionsWithOrganization, workOptions, response, data, outputMessage;\\\\n return __generator(this, function (_b) {\\\\n switch (_b.label) {\\\\n case 0:\\\\n requestOptions = {\\\\n method: 'POST',\\\\n headers: {\\\\n 'Content-Type': 'application/json',\\\\n Authorization: \\\\\\\"Bearer \\\\\\\".concat(apiKey),\\\\n },\\\\n body: JSON.stringify({\\\\n messages: context,\\\\n model: model,\\\\n temperature: temperature,\\\\n }),\\\\n };\\\\n requestOptionsWithOrganization = {\\\\n method: 'POST',\\\\n headers: {\\\\n 'Content-Type': 'application/json',\\\\n Authorization: \\\\\\\"Bearer \\\\\\\".concat(apiKey),\\\\n 'OpenAI-Organization': \\\\\\\"\\\\\\\".concat(organization),\\\\n },\\\\n body: JSON.stringify({\\\\n messages: context,\\\\n temperature: temperature,\\\\n }),\\\\n };\\\\n workOptions = organization && organization.length > 0\\\\n ? requestOptionsWithOrganization\\\\n : requestOptions;\\\\n return [4 /*yield*/, fetch(apiEndpoint, workOptions)];\\\\n case 1:\\\\n response = _b.sent();\\\\n return [4 /*yield*/, response.json()];\\\\n case 2:\\\\n data = _b.sent();\\\\n outputMessage = ((_a = data.choices[0].message) === null || _a === void 0 ? void 0 : _a.content) || '';\\\\n return [2 /*return*/, outputMessage];\\\\n }\\\\n });\\\\n });\\\\n };\\\\n return QBAICore;\\\\n}());\\\\n/* harmony default export */ __webpack_exports__[\\\\\\\"default\\\\\\\"] = (QBAICore);\\\\n\\\\n\\\\n//# sourceURL=webpack://qb-ai-core/./src/QBAICore.ts?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./src/Role.ts\\\":\\n/*!*********************!*\\\\\\n !*** ./src/Role.ts ***!\\n \\\\*********************/\\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\\n\\neval(\\\"__webpack_require__.r(__webpack_exports__);\\\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\\\n/* harmony export */ Role: function() { return /* binding */ Role; }\\\\n/* harmony export */ });\\\\nvar Role = /** @class */ (function () {\\\\n function Role() {\\\\n }\\\\n Role.me = \\\\\\\"me\\\\\\\";\\\\n Role.other = \\\\\\\"other\\\\\\\";\\\\n return Role;\\\\n}());\\\\n\\\\n;\\\\n\\\\n\\\\n//# sourceURL=webpack://qb-ai-core/./src/Role.ts?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./src/index.ts\\\":\\n/*!**********************!*\\\\\\n !*** ./src/index.ts ***!\\n \\\\**********************/\\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\\n\\neval(\\\"__webpack_require__.r(__webpack_exports__);\\\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\\\n/* harmony export */ AIException: function() { return /* reexport safe */ _AIException__WEBPACK_IMPORTED_MODULE_3__.AIException; },\\\\n/* harmony export */ AIModel: function() { return /* reexport safe */ _AIModel__WEBPACK_IMPORTED_MODULE_0__.AIModel; },\\\\n/* harmony export */ ApiVersion: function() { return /* reexport safe */ _ApiVersion__WEBPACK_IMPORTED_MODULE_1__.ApiVersion; },\\\\n/* harmony export */ QBAICore: function() { return /* reexport safe */ _QBAICore__WEBPACK_IMPORTED_MODULE_4__[\\\\\\\"default\\\\\\\"]; },\\\\n/* harmony export */ Role: function() { return /* reexport safe */ _Role__WEBPACK_IMPORTED_MODULE_2__.Role; }\\\\n/* harmony export */ });\\\\n/* harmony import */ var _AIModel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AIModel */ \\\\\\\"./src/AIModel.ts\\\\\\\");\\\\n/* harmony import */ var _ApiVersion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ApiVersion */ \\\\\\\"./src/ApiVersion.ts\\\\\\\");\\\\n/* harmony import */ var _Role__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Role */ \\\\\\\"./src/Role.ts\\\\\\\");\\\\n/* harmony import */ var _AIException__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./AIException */ \\\\\\\"./src/AIException.ts\\\\\\\");\\\\n/* harmony import */ var _QBAICore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./QBAICore */ \\\\\\\"./src/QBAICore.ts\\\\\\\");\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n//# sourceURL=webpack://qb-ai-core/./src/index.ts?\\\");\\n\\n/***/ })\\n\\n/******/ \\t});\\n/************************************************************************/\\n/******/ \\t// The module cache\\n/******/ \\tvar __webpack_module_cache__ = {};\\n/******/ \\t\\n/******/ \\t// The require function\\n/******/ \\tfunction __nested_webpack_require_13895__(moduleId) {\\n/******/ \\t\\t// Check if module is in cache\\n/******/ \\t\\tvar cachedModule = __webpack_module_cache__[moduleId];\\n/******/ \\t\\tif (cachedModule !== undefined) {\\n/******/ \\t\\t\\treturn cachedModule.exports;\\n/******/ \\t\\t}\\n/******/ \\t\\t// Create a new module (and put it into the cache)\\n/******/ \\t\\tvar module = __webpack_module_cache__[moduleId] = {\\n/******/ \\t\\t\\t// no module.id needed\\n/******/ \\t\\t\\t// no module.loaded needed\\n/******/ \\t\\t\\texports: {}\\n/******/ \\t\\t};\\n/******/ \\t\\n/******/ \\t\\t// Execute the module function\\n/******/ \\t\\t__webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_13895__);\\n/******/ \\t\\n/******/ \\t\\t// Return the exports of the module\\n/******/ \\t\\treturn module.exports;\\n/******/ \\t}\\n/******/ \\t\\n/************************************************************************/\\n/******/ \\t/* webpack/runtime/define property getters */\\n/******/ \\t!function() {\\n/******/ \\t\\t// define getter functions for harmony exports\\n/******/ \\t\\t__nested_webpack_require_13895__.d = function(exports, definition) {\\n/******/ \\t\\t\\tfor(var key in definition) {\\n/******/ \\t\\t\\t\\tif(__nested_webpack_require_13895__.o(definition, key) && !__nested_webpack_require_13895__.o(exports, key)) {\\n/******/ \\t\\t\\t\\t\\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\\n/******/ \\t\\t\\t\\t}\\n/******/ \\t\\t\\t}\\n/******/ \\t\\t};\\n/******/ \\t}();\\n/******/ \\t\\n/******/ \\t/* webpack/runtime/hasOwnProperty shorthand */\\n/******/ \\t!function() {\\n/******/ \\t\\t__nested_webpack_require_13895__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }\\n/******/ \\t}();\\n/******/ \\t\\n/******/ \\t/* webpack/runtime/make namespace object */\\n/******/ \\t!function() {\\n/******/ \\t\\t// define __esModule on exports\\n/******/ \\t\\t__nested_webpack_require_13895__.r = function(exports) {\\n/******/ \\t\\t\\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\\n/******/ \\t\\t\\t\\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\\n/******/ \\t\\t\\t}\\n/******/ \\t\\t\\tObject.defineProperty(exports, '__esModule', { value: true });\\n/******/ \\t\\t};\\n/******/ \\t}();\\n/******/ \\t\\n/************************************************************************/\\n/******/ \\t\\n/******/ \\t// startup\\n/******/ \\t// Load entry module and return exports\\n/******/ \\t// This entry module can't be inlined because the eval devtool is used.\\n/******/ \\tvar __nested_webpack_exports__ = __nested_webpack_require_13895__(\\\"./src/index.ts\\\");\\n/******/ \\t\\n/******/ \\treturn __nested_webpack_exports__;\\n/******/ })()\\n;\\n});\\n\\n//# sourceURL=webpack://qb-ai-rephrase/./node_modules/qb-ai-core/dist/index.js?\");\n\n/***/ }),\n\n/***/ \"./src/AIRephraseException.ts\":\n/*!************************************!*\\\n !*** ./src/AIRephraseException.ts ***!\n \\************************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ UNDEFINED_SETTINGS__AI_REPHRASE_CODE: function() { return /* binding */ UNDEFINED_SETTINGS__AI_REPHRASE_CODE; },\\n/* harmony export */ UNDEFINED_SETTINGS__AI_REPHRASE_MESSAGE: function() { return /* binding */ UNDEFINED_SETTINGS__AI_REPHRASE_MESSAGE; }\\n/* harmony export */ });\\n/* harmony import */ var qb_ai_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! qb-ai-core */ \\\"./node_modules/qb-ai-core/dist/index.js\\\");\\n/* harmony import */ var qb_ai_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(qb_ai_core__WEBPACK_IMPORTED_MODULE_0__);\\nvar __extends = (undefined && undefined.__extends) || (function () {\\n var extendStatics = function (d, b) {\\n extendStatics = Object.setPrototypeOf ||\\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\\n return extendStatics(d, b);\\n };\\n return function (d, b) {\\n if (typeof b !== \\\"function\\\" && b !== null)\\n throw new TypeError(\\\"Class extends value \\\" + String(b) + \\\" is not a constructor or null\\\");\\n extendStatics(d, b);\\n function __() { this.constructor = d; }\\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\\n };\\n})();\\n\\nvar UNDEFINED_SETTINGS__AI_REPHRASE_MESSAGE = 'Undefined settings';\\nvar UNDEFINED_SETTINGS__AI_REPHRASE_CODE = 131;\\nvar AIRephraseException = /** @class */ (function (_super) {\\n __extends(AIRephraseException, _super);\\n function AIRephraseException(message, code) {\\n var _this = _super.call(this, message, code) || this;\\n _this.message = message;\\n return _this;\\n }\\n return AIRephraseException;\\n}(qb_ai_core__WEBPACK_IMPORTED_MODULE_0__.AIException));\\n/* harmony default export */ __webpack_exports__[\\\"default\\\"] = (AIRephraseException);\\n\\n\\n//# sourceURL=webpack://qb-ai-rephrase/./src/AIRephraseException.ts?\");\n\n/***/ }),\n\n/***/ \"./src/AIRephraseSettings.ts\":\n/*!***********************************!*\\\n !*** ./src/AIRephraseSettings.ts ***!\n \\***********************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\nvar AIRephraseSettings = /** @class */ (function () {\\n function AIRephraseSettings(apiKey, apiVersion, tone, maxRequestTokens, maxResponseTokens, model, organization, serverPath, temperature, token) {\\n this._apiKey = apiKey;\\n this._apiVersion = apiVersion;\\n this._tone = tone;\\n this._maxRequestTokens = maxRequestTokens;\\n this._maxResponseTokens = maxResponseTokens;\\n this._model = model;\\n this._organization = organization;\\n this._serverPath = serverPath;\\n this._temperature = temperature;\\n this._token = token;\\n }\\n Object.defineProperty(AIRephraseSettings.prototype, \\\"apiKey\\\", {\\n get: function () {\\n return this._apiKey;\\n },\\n set: function (value) {\\n this._apiKey = value;\\n },\\n enumerable: false,\\n configurable: true\\n });\\n Object.defineProperty(AIRephraseSettings.prototype, \\\"apiVersion\\\", {\\n get: function () {\\n return this._apiVersion;\\n },\\n set: function (value) {\\n this._apiVersion = value;\\n },\\n enumerable: false,\\n configurable: true\\n });\\n Object.defineProperty(AIRephraseSettings.prototype, \\\"tone\\\", {\\n get: function () {\\n return this._tone;\\n },\\n set: function (value) {\\n this._tone = value;\\n },\\n enumerable: false,\\n configurable: true\\n });\\n Object.defineProperty(AIRephraseSettings.prototype, \\\"maxRequestTokens\\\", {\\n get: function () {\\n return this._maxRequestTokens;\\n },\\n set: function (value) {\\n this._maxRequestTokens = value;\\n },\\n enumerable: false,\\n configurable: true\\n });\\n Object.defineProperty(AIRephraseSettings.prototype, \\\"maxResponseTokens\\\", {\\n get: function () {\\n return this._maxResponseTokens;\\n },\\n set: function (value) {\\n this._maxResponseTokens = value;\\n },\\n enumerable: false,\\n configurable: true\\n });\\n Object.defineProperty(AIRephraseSettings.prototype, \\\"model\\\", {\\n get: function () {\\n return this._model;\\n },\\n set: function (value) {\\n this._model = value;\\n },\\n enumerable: false,\\n configurable: true\\n });\\n Object.defineProperty(AIRephraseSettings.prototype, \\\"organization\\\", {\\n get: function () {\\n return this._organization;\\n },\\n set: function (value) {\\n this._organization = value;\\n },\\n enumerable: false,\\n configurable: true\\n });\\n Object.defineProperty(AIRephraseSettings.prototype, \\\"serverPath\\\", {\\n get: function () {\\n return this._serverPath;\\n },\\n set: function (value) {\\n this._serverPath = value;\\n },\\n enumerable: false,\\n configurable: true\\n });\\n Object.defineProperty(AIRephraseSettings.prototype, \\\"temperature\\\", {\\n get: function () {\\n return this._temperature;\\n },\\n set: function (value) {\\n this._temperature = value;\\n },\\n enumerable: false,\\n configurable: true\\n });\\n Object.defineProperty(AIRephraseSettings.prototype, \\\"token\\\", {\\n get: function () {\\n return this._token;\\n },\\n set: function (value) {\\n this._token = value;\\n },\\n enumerable: false,\\n configurable: true\\n });\\n return AIRephraseSettings;\\n}());\\n/* harmony default export */ __webpack_exports__[\\\"default\\\"] = (AIRephraseSettings);\\n\\n\\n//# sourceURL=webpack://qb-ai-rephrase/./src/AIRephraseSettings.ts?\");\n\n/***/ }),\n\n/***/ \"./src/QBAIRephrase.ts\":\n/*!*****************************!*\\\n !*** ./src/QBAIRephrase.ts ***!\n \\*****************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony import */ var qb_ai_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! qb-ai-core */ \\\"./node_modules/qb-ai-core/dist/index.js\\\");\\n/* harmony import */ var qb_ai_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(qb_ai_core__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _AIRephraseSettings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AIRephraseSettings */ \\\"./src/AIRephraseSettings.ts\\\");\\n/* harmony import */ var _AIRephraseException__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AIRephraseException */ \\\"./src/AIRephraseException.ts\\\");\\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\\n return new (P || (P = Promise))(function (resolve, reject) {\\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\\n function rejected(value) { try { step(generator[\\\"throw\\\"](value)); } catch (e) { reject(e); } }\\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\\n step((generator = generator.apply(thisArg, _arguments || [])).next());\\n });\\n};\\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\\n return g = { next: verb(0), \\\"throw\\\": verb(1), \\\"return\\\": verb(2) }, typeof Symbol === \\\"function\\\" && (g[Symbol.iterator] = function() { return this; }), g;\\n function verb(n) { return function (v) { return step([n, v]); }; }\\n function step(op) {\\n if (f) throw new TypeError(\\\"Generator is already executing.\\\");\\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\\n if (f = 1, y && (t = op[0] & 2 ? y[\\\"return\\\"] : op[0] ? y[\\\"throw\\\"] || ((t = y[\\\"return\\\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\\n if (y = 0, t) op = [op[0] & 2, t.value];\\n switch (op[0]) {\\n case 0: case 1: t = op; break;\\n case 4: _.label++; return { value: op[1], done: false };\\n case 5: _.label++; y = op[1]; op = [0]; continue;\\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\\n default:\\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\\n if (t[2]) _.ops.pop();\\n _.trys.pop(); continue;\\n }\\n op = body.call(thisArg, _);\\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\\n }\\n};\\nvar __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {\\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\\n if (ar || !(i in from)) {\\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\\n ar[i] = from[i];\\n }\\n }\\n return to.concat(ar || Array.prototype.slice.call(from));\\n};\\n\\n\\n\\nvar QBAIRephrase = /** @class */ (function () {\\n function QBAIRephrase() {\\n }\\n QBAIRephrase.rephrase = function (text, messages, settings) {\\n return __awaiter(this, void 0, void 0, function () {\\n var prompt;\\n return __generator(this, function (_a) {\\n prompt = QBAIRephrase.createRephrasePrompt(text, settings.tone);\\n if (settings.apiKey) {\\n return [2 /*return*/, QBAIRephrase.getData(prompt, \\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\\n messages, settings.serverPath, settings.apiKey, qb_ai_core__WEBPACK_IMPORTED_MODULE_0__.AIModel.gpt__3_5__turbo, settings.temperature, settings.organization)];\\n }\\n else if (settings.serverPath) {\\n return [2 /*return*/, QBAIRephrase.getDataWithProxyServer(prompt, \\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\\n messages, settings.serverPath, settings.token, qb_ai_core__WEBPACK_IMPORTED_MODULE_0__.AIModel.gpt__3_5__turbo, settings.temperature, settings.organization)];\\n }\\n else {\\n throw new _AIRephraseException__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"](_AIRephraseException__WEBPACK_IMPORTED_MODULE_2__.UNDEFINED_SETTINGS__AI_REPHRASE_MESSAGE, _AIRephraseException__WEBPACK_IMPORTED_MODULE_2__.UNDEFINED_SETTINGS__AI_REPHRASE_CODE);\\n }\\n return [2 /*return*/];\\n });\\n });\\n };\\n QBAIRephrase.createRephrasePrompt = function (textToSend, tone) {\\n var prompt = \\\"Analyze the entire context of our conversation \\\\u2013 all the messages \\\\u2013 and create a brief summary of our discussion. Based on this analysis, rephrase the following text in a style and tone that is typical for most of the dialogue messages. Provide only the rephrased text in as the message text to rephrase and nothing more.Give me only rephrase text in brackets and nothing more. Here is the message text to rephrase:\\\\\\\"\\\".concat(textToSend, \\\"\\\\\\\"\\\");\\n if (tone) {\\n if (tone.name && tone.description) {\\n // prompt = `Analyze the entire context of our conversation – all the messages – and create a brief summary of our discussion. Based on this analysis, rephrase the following text in a ${QBAIRephrase.toneToString(\\n // tone,\\n // )} style. Provide only the rephrased text in the same language as the message text to rephrase and nothing more.Do not translate the rephrased text into English or any other language. Give me only rephrase text in brackets and nothing more.The tone '${\\n // tone.name\\n // }' is characterized as: '${\\n // tone.description\\n // }'. Here is the message text to rephrase:\\\"${textToSend}\\\"`;\\n // Hitesh 09.10.2023\\n // prompt = `Rephrase the provided text in the '${tone.name}' tone and only return the rephrased text. The provided text may or may not be present in the appropriate tone, it is your duty to re-write it according to the provided instructions. If the rephrasing fails or is not possible for any reason, only return ‘Rephrase failed’.Text to be rephrased is: '${textToSend}'.The '${tone.name}' tone is defined as: '${tone.description}'.`;\\n // Hitesh 10.10.2023\\n prompt = \\\"Rephrase the provided text in the '\\\".concat(tone.name, \\\"' tone and only return the rephrased text. The provided text may or may not be present in the appropriate tone, it is your duty to re-write it according to the provided instructions. You must provide the rephrased text in the same language in which the text to be rephrased is provided. Do not translate the rephrased text into English or any other language.Text to be rephrased is: '\\\").concat(textToSend, \\\"'.The '\\\").concat(tone.name, \\\"' tone is defined as: '\\\").concat(tone.description, \\\"'.\\\");\\n }\\n else if (tone.name) {\\n prompt = \\\"Analyze the entire context of our conversation \\\\u2013 all the messages \\\\u2013 and create a brief summary of our discussion. Based on this analysis, rephrase the following text in a \\\".concat(QBAIRephrase.toneToString(tone), \\\" style. Provide only the rephrased text in the same language as the message text to rephrase and nothing more.Give me only rephrase text in brackets and nothing more. Here is the message text to rephrase:\\\\\\\"\\\").concat(textToSend, \\\"\\\\\\\"\\\");\\n }\\n }\\n // prompt +=\\n // \\\". If rephrasing is not possible or fails, return 'Rephrase failed.'\\\";\\n return prompt;\\n };\\n QBAIRephrase.defaultTones = function () {\\n return [\\n {\\n name: 'Professional Tone',\\n description: 'This would edit messages to sound more formal, using technical vocabulary, clear sentence structures, and maintaining a respectful tone. It would avoid colloquial language and ensure appropriate salutations and sign-offs',\\n iconEmoji: '👔',\\n },\\n {\\n name: 'Friendly Tone',\\n description: 'This would adjust messages to reflect a casual, friendly tone. It would incorporate casual language, use emoticons, exclamation points, and other informalities to make the message seem more friendly and approachable.',\\n iconEmoji: '🤝',\\n },\\n {\\n name: 'Encouraging Tone',\\n description: 'This tone would be useful for motivation and encouragement. It would include positive words, affirmations, and express support and belief in the recipient.',\\n iconEmoji: '💪',\\n },\\n {\\n name: 'Empathetic Tone',\\n description: 'This tone would be utilized to display understanding and empathy. It would involve softer language, acknowledging feelings, and demonstrating compassion and support.',\\n iconEmoji: '🤲',\\n },\\n {\\n name: 'Neutral Tone',\\n description: 'For times when you want to maintain an even, unbiased, and objective tone. It would avoid extreme language and emotive words, opting for clear, straightforward communication.',\\n iconEmoji: '😐',\\n },\\n {\\n name: 'Assertive Tone',\\n description: 'This tone is beneficial for making clear points, standing ground, or in negotiations. It uses direct language, is confident, and does not mince words.',\\n iconEmoji: '🔨',\\n },\\n {\\n name: 'Instructive Tone',\\n description: 'This tone would be useful for tutorials, guides, or other teaching and training materials. It is clear, concise, and walks the reader through steps or processes in a logical manner.',\\n iconEmoji: '📖',\\n },\\n {\\n name: 'Persuasive Tone',\\n description: 'This tone can be used when trying to convince someone or argue a point. It uses persuasive language, powerful words, and logical reasoning.',\\n iconEmoji: '☝️',\\n },\\n {\\n name: 'Sarcastic/Ironic Tone',\\n description: 'This tone can make the communication more humorous or show an ironic stance. It is harder to implement as it requires the AI to understand nuanced language and may not always be taken as intended by the reader.',\\n iconEmoji: '😏',\\n },\\n {\\n name: 'Poetic Tone',\\n description: 'This would add an artistic touch to messages, using figurative language, rhymes, and rhythm to create a more expressive text.',\\n iconEmoji: '🎭',\\n },\\n ];\\n };\\n QBAIRephrase.createDefaultAIRephraseSettings = function () {\\n return new _AIRephraseSettings__WEBPACK_IMPORTED_MODULE_1__[\\\"default\\\"]('', qb_ai_core__WEBPACK_IMPORTED_MODULE_0__.ApiVersion.v1, QBAIRephrase.defaultTones()[0], 3584, 3584, qb_ai_core__WEBPACK_IMPORTED_MODULE_0__.AIModel.gpt__3_5__turbo, '', 'https://api.openai.com/v1/chat/completions', 0.5, '');\\n };\\n QBAIRephrase.updateChatRoles = function (result) {\\n var context = result.map(function (item) {\\n var currentRole = 'user';\\n if (item.role === 'system') {\\n currentRole = 'system';\\n }\\n else {\\n currentRole = item.role === qb_ai_core__WEBPACK_IMPORTED_MODULE_0__.Role.other ? 'assistant' : 'user';\\n }\\n var tmp = { role: currentRole, content: item.content };\\n return tmp;\\n });\\n return context;\\n };\\n QBAIRephrase.getData = function (prompt, dialogMessages, servername, sessionToken, openAIModel, temperature, organization) {\\n if (openAIModel === void 0) { openAIModel = 'gpt-3.5-turbo'; }\\n if (temperature === void 0) { temperature = 0.5; }\\n if (organization === void 0) { organization = ''; }\\n return __awaiter(this, void 0, void 0, function () {\\n var apiEndpoint, apiKey, model, allData, context, err_1, outputMessage;\\n return __generator(this, function (_a) {\\n switch (_a.label) {\\n case 0:\\n apiEndpoint = \\\"\\\".concat(servername);\\n apiKey = sessionToken;\\n model = openAIModel;\\n allData = __spreadArray(__spreadArray([], dialogMessages, true), [{ role: 'user', content: prompt }], false);\\n context = this.updateChatRoles(allData);\\n _a.label = 1;\\n case 1:\\n _a.trys.push([1, 3, , 4]);\\n return [4 /*yield*/, qb_ai_core__WEBPACK_IMPORTED_MODULE_0__.QBAICore.sendPromptToOpenai(apiKey, context, model, temperature, organization, apiEndpoint)];\\n case 2: return [2 /*return*/, _a.sent()];\\n case 3:\\n err_1 = _a.sent();\\n outputMessage = QBAIRephrase.stringifyError(err_1);\\n throw new _AIRephraseException__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"](outputMessage, -1);\\n case 4: return [2 /*return*/];\\n }\\n });\\n });\\n };\\n QBAIRephrase.getDataWithProxyServer = function (prompt, dialogMessages, servername, sessionToken, openAIModel, temperature, organization) {\\n if (openAIModel === void 0) { openAIModel = 'gpt-3.5-turbo'; }\\n if (temperature === void 0) { temperature = 0.5; }\\n if (organization === void 0) { organization = ''; }\\n return __awaiter(this, void 0, void 0, function () {\\n var apiEndpoint, apiKey, model, allData, context, err_2, outputMessage;\\n return __generator(this, function (_a) {\\n switch (_a.label) {\\n case 0:\\n apiEndpoint = \\\"\\\".concat(servername);\\n apiKey = sessionToken;\\n model = openAIModel;\\n allData = __spreadArray(__spreadArray([], dialogMessages, true), [{ role: 'user', content: prompt }], false);\\n context = this.updateChatRoles(allData);\\n _a.label = 1;\\n case 1:\\n _a.trys.push([1, 3, , 4]);\\n return [4 /*yield*/, qb_ai_core__WEBPACK_IMPORTED_MODULE_0__.QBAICore.sendPromptToProxy(apiKey, context, model, temperature, apiEndpoint)];\\n case 2: return [2 /*return*/, _a.sent()];\\n case 3:\\n err_2 = _a.sent();\\n outputMessage = QBAIRephrase.stringifyError(err_2);\\n throw new _AIRephraseException__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"](outputMessage, -1);\\n case 4: return [2 /*return*/];\\n }\\n });\\n });\\n };\\n QBAIRephrase.stringifyError = function (error) {\\n if (typeof error === 'string')\\n return error;\\n if (error && typeof error === 'object') {\\n var dataError = error;\\n if (dataError.detail) {\\n return QBAIRephrase.parseErrorMessage(dataError.detail);\\n }\\n if (dataError === null || dataError === void 0 ? void 0 : dataError.message) {\\n return QBAIRephrase.parseErrorMessage(dataError.message);\\n }\\n return QBAIRephrase.parseErrorObject(dataError);\\n }\\n return JSON.stringify(error);\\n };\\n QBAIRephrase.toneToString = function (tone) {\\n return tone.name;\\n };\\n QBAIRephrase.stringToTone = function (toneStr, description, emoji) {\\n return {\\n name: toneStr,\\n description: description || '',\\n iconEmoji: emoji || '',\\n };\\n };\\n QBAIRephrase.parseErrorMessage = function (message) {\\n var data = QBAIRephrase.jsonParse(message);\\n if (typeof data === 'string') {\\n return data;\\n }\\n if (Array.isArray(data)) {\\n return data.join('');\\n }\\n if (typeof data === 'object') {\\n return QBAIRephrase.parseErrorObject(data);\\n }\\n return data;\\n };\\n QBAIRephrase.jsonParse = function (text) {\\n try {\\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\\n // @ts-ignore\\n return JSON.parse(text);\\n }\\n catch (error) {\\n return text;\\n }\\n };\\n QBAIRephrase.parseErrorObject = function (data) {\\n return Object.keys(data)\\n .map(function (key) {\\n var field = data[key];\\n return Array.isArray(field)\\n ? \\\"\\\".concat(key, \\\" \\\").concat(field.join(''))\\n : \\\"\\\".concat(key, \\\" \\\").concat(field);\\n })\\n .join(' ')\\n .replace(/errors\\\\s?/, '');\\n };\\n return QBAIRephrase;\\n}());\\n/* harmony default export */ __webpack_exports__[\\\"default\\\"] = (QBAIRephrase);\\n\\n\\n//# sourceURL=webpack://qb-ai-rephrase/./src/QBAIRephrase.ts?\");\n\n/***/ }),\n\n/***/ \"./src/index.ts\":\n/*!**********************!*\\\n !*** ./src/index.ts ***!\n \\**********************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ QBAIRephrase: function() { return /* reexport safe */ _QBAIRephrase__WEBPACK_IMPORTED_MODULE_0__[\\\"default\\\"]; }\\n/* harmony export */ });\\n/* harmony import */ var _QBAIRephrase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./QBAIRephrase */ \\\"./src/QBAIRephrase.ts\\\");\\n\\n\\n\\n\\n//# sourceURL=webpack://qb-ai-rephrase/./src/index.ts?\");\n\n/***/ })\n\n/******/ \t});\n/************************************************************************/\n/******/ \t// The module cache\n/******/ \tvar __webpack_module_cache__ = {};\n/******/ \t\n/******/ \t// The require function\n/******/ \tfunction __nested_webpack_require_44187__(moduleId) {\n/******/ \t\t// Check if module is in cache\n/******/ \t\tvar cachedModule = __webpack_module_cache__[moduleId];\n/******/ \t\tif (cachedModule !== undefined) {\n/******/ \t\t\treturn cachedModule.exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\t\t// no module.id needed\n/******/ \t\t\t// no module.loaded needed\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/ \t\n/******/ \t\t// Execute the module function\n/******/ \t\t__webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_44187__);\n/******/ \t\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/ \t\n/************************************************************************/\n/******/ \t/* webpack/runtime/compat get default export */\n/******/ \t!function() {\n/******/ \t\t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t\t__nested_webpack_require_44187__.n = function(module) {\n/******/ \t\t\tvar getter = module && module.__esModule ?\n/******/ \t\t\t\tfunction() { return module['default']; } :\n/******/ \t\t\t\tfunction() { return module; };\n/******/ \t\t\t__nested_webpack_require_44187__.d(getter, { a: getter });\n/******/ \t\t\treturn getter;\n/******/ \t\t};\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/define property getters */\n/******/ \t!function() {\n/******/ \t\t// define getter functions for harmony exports\n/******/ \t\t__nested_webpack_require_44187__.d = function(exports, definition) {\n/******/ \t\t\tfor(var key in definition) {\n/******/ \t\t\t\tif(__nested_webpack_require_44187__.o(definition, key) && !__nested_webpack_require_44187__.o(exports, key)) {\n/******/ \t\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n/******/ \t\t\t\t}\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/hasOwnProperty shorthand */\n/******/ \t!function() {\n/******/ \t\t__nested_webpack_require_44187__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/make namespace object */\n/******/ \t!function() {\n/******/ \t\t// define __esModule on exports\n/******/ \t\t__nested_webpack_require_44187__.r = function(exports) {\n/******/ \t\t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t\t}\n/******/ \t\t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t\t};\n/******/ \t}();\n/******/ \t\n/************************************************************************/\n/******/ \t\n/******/ \t// startup\n/******/ \t// Load entry module and return exports\n/******/ \t// This entry module can't be inlined because the eval devtool is used.\n/******/ \tvar __nested_webpack_exports__ = __nested_webpack_require_44187__(\"./src/index.ts\");\n/******/ \t\n/******/ \treturn __nested_webpack_exports__;\n/******/ })()\n;\n});\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./node_modules/qb-ai-rephrase/dist/index.js?");
|
|
555
|
+
|
|
556
|
+
/***/ }),
|
|
557
|
+
|
|
558
|
+
/***/ "./node_modules/qb-ai-translate/dist/index.js":
|
|
559
|
+
/*!****************************************************!*\
|
|
560
|
+
!*** ./node_modules/qb-ai-translate/dist/index.js ***!
|
|
561
|
+
\****************************************************/
|
|
562
|
+
/***/ (function(module) {
|
|
563
|
+
|
|
564
|
+
eval("/*\n * ATTENTION: The \"eval\" devtool has been used (maybe by default in mode: \"development\").\n * This devtool is neither made for production nor for readable output files.\n * It uses \"eval()\" calls to create a separate source file in the browser devtools.\n * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)\n * or disable the default devtool with \"devtool: false\".\n * If you are looking for production-ready output files, see mode: \"production\" (https://webpack.js.org/configuration/mode/).\n */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(true)\n\t\tmodule.exports = factory();\n\telse { var i, a; }\n})(self, function() {\nreturn /******/ (function() { // webpackBootstrap\n/******/ \tvar __webpack_modules__ = ({\n\n/***/ \"./node_modules/qb-ai-core/dist/index.js\":\n/*!***********************************************!*\\\n !*** ./node_modules/qb-ai-core/dist/index.js ***!\n \\***********************************************/\n/***/ (function(module) {\n\neval(\"/*\\n * ATTENTION: The \\\"eval\\\" devtool has been used (maybe by default in mode: \\\"development\\\").\\n * This devtool is neither made for production nor for readable output files.\\n * It uses \\\"eval()\\\" calls to create a separate source file in the browser devtools.\\n * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)\\n * or disable the default devtool with \\\"devtool: false\\\".\\n * If you are looking for production-ready output files, see mode: \\\"production\\\" (https://webpack.js.org/configuration/mode/).\\n */\\n(function webpackUniversalModuleDefinition(root, factory) {\\n\\tif(true)\\n\\t\\tmodule.exports = factory();\\n\\telse { var i, a; }\\n})(self, function() {\\nreturn /******/ (function() { // webpackBootstrap\\n/******/ \\t\\\"use strict\\\";\\n/******/ \\tvar __webpack_modules__ = ({\\n\\n/***/ \\\"./src/AIException.ts\\\":\\n/*!****************************!*\\\\\\n !*** ./src/AIException.ts ***!\\n \\\\****************************/\\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\\n\\neval(\\\"__webpack_require__.r(__webpack_exports__);\\\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\\\n/* harmony export */ AIException: function() { return /* binding */ AIException; }\\\\n/* harmony export */ });\\\\nvar __extends = (undefined && undefined.__extends) || (function () {\\\\n var extendStatics = function (d, b) {\\\\n extendStatics = Object.setPrototypeOf ||\\\\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\\\\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\\\\n return extendStatics(d, b);\\\\n };\\\\n return function (d, b) {\\\\n if (typeof b !== \\\\\\\"function\\\\\\\" && b !== null)\\\\n throw new TypeError(\\\\\\\"Class extends value \\\\\\\" + String(b) + \\\\\\\" is not a constructor or null\\\\\\\");\\\\n extendStatics(d, b);\\\\n function __() { this.constructor = d; }\\\\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\\\\n };\\\\n})();\\\\nvar AIException = /** @class */ (function (_super) {\\\\n __extends(AIException, _super);\\\\n function AIException(message, code) {\\\\n var _this = _super.call(this, message) || this;\\\\n _this.message = message;\\\\n _this.code = code;\\\\n return _this;\\\\n }\\\\n return AIException;\\\\n}(Error));\\\\n\\\\n\\\\n\\\\n//# sourceURL=webpack://qb-ai-core/./src/AIException.ts?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./src/AIModel.ts\\\":\\n/*!************************!*\\\\\\n !*** ./src/AIModel.ts ***!\\n \\\\************************/\\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\\n\\neval(\\\"__webpack_require__.r(__webpack_exports__);\\\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\\\n/* harmony export */ AIModel: function() { return /* binding */ AIModel; }\\\\n/* harmony export */ });\\\\nvar AIModel = /** @class */ (function () {\\\\n function AIModel() {\\\\n }\\\\n AIModel.gpt__3_5__turbo = \\\\\\\"gpt-3.5-turbo\\\\\\\";\\\\n AIModel.gpt__3_5__turbo__0613 = \\\\\\\"gpt-3.5-turbo-0613\\\\\\\";\\\\n AIModel.gpt__3_5__turbo__16k = \\\\\\\"gpt-3.5-turbo-16k\\\\\\\";\\\\n AIModel.gpt__3_5__turbo__16k__0613 = \\\\\\\"gpt-3.5-turbo-16k-0613\\\\\\\";\\\\n AIModel.gpt__4 = \\\\\\\"gpt-4\\\\\\\";\\\\n AIModel.gpt__4__0613 = \\\\\\\"gpt-4-0613\\\\\\\";\\\\n AIModel.gpt__4__32k = \\\\\\\"gpt-4-32k\\\\\\\";\\\\n AIModel.gpt__4__32k__0613 = \\\\\\\"gpt-4-32k-0613\\\\\\\";\\\\n return AIModel;\\\\n}());\\\\n\\\\n\\\\n\\\\n//# sourceURL=webpack://qb-ai-core/./src/AIModel.ts?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./src/ApiVersion.ts\\\":\\n/*!***************************!*\\\\\\n !*** ./src/ApiVersion.ts ***!\\n \\\\***************************/\\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\\n\\neval(\\\"__webpack_require__.r(__webpack_exports__);\\\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\\\n/* harmony export */ ApiVersion: function() { return /* binding */ ApiVersion; }\\\\n/* harmony export */ });\\\\nvar ApiVersion = /** @class */ (function () {\\\\n function ApiVersion() {\\\\n }\\\\n ApiVersion.v1 = \\\\\\\"v1\\\\\\\";\\\\n return ApiVersion;\\\\n}());\\\\n\\\\n\\\\n\\\\n//# sourceURL=webpack://qb-ai-core/./src/ApiVersion.ts?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./src/QBAICore.ts\\\":\\n/*!*************************!*\\\\\\n !*** ./src/QBAICore.ts ***!\\n \\\\*************************/\\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\\n\\neval(\\\"__webpack_require__.r(__webpack_exports__);\\\\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\\\\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\\\\n return new (P || (P = Promise))(function (resolve, reject) {\\\\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\\\\n function rejected(value) { try { step(generator[\\\\\\\"throw\\\\\\\"](value)); } catch (e) { reject(e); } }\\\\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\\\\n step((generator = generator.apply(thisArg, _arguments || [])).next());\\\\n });\\\\n};\\\\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\\\\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\\\\n return g = { next: verb(0), \\\\\\\"throw\\\\\\\": verb(1), \\\\\\\"return\\\\\\\": verb(2) }, typeof Symbol === \\\\\\\"function\\\\\\\" && (g[Symbol.iterator] = function() { return this; }), g;\\\\n function verb(n) { return function (v) { return step([n, v]); }; }\\\\n function step(op) {\\\\n if (f) throw new TypeError(\\\\\\\"Generator is already executing.\\\\\\\");\\\\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\\\\n if (f = 1, y && (t = op[0] & 2 ? y[\\\\\\\"return\\\\\\\"] : op[0] ? y[\\\\\\\"throw\\\\\\\"] || ((t = y[\\\\\\\"return\\\\\\\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\\\\n if (y = 0, t) op = [op[0] & 2, t.value];\\\\n switch (op[0]) {\\\\n case 0: case 1: t = op; break;\\\\n case 4: _.label++; return { value: op[1], done: false };\\\\n case 5: _.label++; y = op[1]; op = [0]; continue;\\\\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\\\\n default:\\\\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\\\\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\\\\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\\\\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\\\\n if (t[2]) _.ops.pop();\\\\n _.trys.pop(); continue;\\\\n }\\\\n op = body.call(thisArg, _);\\\\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\\\\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\\\\n }\\\\n};\\\\nvar QBAICore = /** @class */ (function () {\\\\n function QBAICore() {\\\\n }\\\\n QBAICore.sendPromptToProxy = function (apiKey, context, model, temperature, apiEndpoint) {\\\\n var _a;\\\\n return __awaiter(this, void 0, void 0, function () {\\\\n var requestOptions, response, data, outputMessage;\\\\n return __generator(this, function (_b) {\\\\n switch (_b.label) {\\\\n case 0:\\\\n requestOptions = {\\\\n method: 'POST',\\\\n headers: {\\\\n 'Content-Type': 'application/json',\\\\n 'qb-token': apiKey,\\\\n },\\\\n body: JSON.stringify({\\\\n // messages: [...dialogMessages, { role: 'user', content: prompt }],\\\\n messages: context,\\\\n model: model,\\\\n temperature: temperature,\\\\n }),\\\\n };\\\\n return [4 /*yield*/, fetch(apiEndpoint, requestOptions)];\\\\n case 1:\\\\n response = _b.sent();\\\\n return [4 /*yield*/, response.json()];\\\\n case 2:\\\\n data = _b.sent();\\\\n outputMessage = ((_a = data.choices[0].message) === null || _a === void 0 ? void 0 : _a.content) || '';\\\\n return [2 /*return*/, outputMessage];\\\\n }\\\\n });\\\\n });\\\\n };\\\\n QBAICore.sendPromptToOpenai = function (apiKey, context, model, temperature, organization, apiEndpoint) {\\\\n var _a;\\\\n return __awaiter(this, void 0, void 0, function () {\\\\n var requestOptions, requestOptionsWithOrganization, workOptions, response, data, outputMessage;\\\\n return __generator(this, function (_b) {\\\\n switch (_b.label) {\\\\n case 0:\\\\n requestOptions = {\\\\n method: 'POST',\\\\n headers: {\\\\n 'Content-Type': 'application/json',\\\\n Authorization: \\\\\\\"Bearer \\\\\\\".concat(apiKey),\\\\n },\\\\n body: JSON.stringify({\\\\n messages: context,\\\\n model: model,\\\\n temperature: temperature,\\\\n }),\\\\n };\\\\n requestOptionsWithOrganization = {\\\\n method: 'POST',\\\\n headers: {\\\\n 'Content-Type': 'application/json',\\\\n Authorization: \\\\\\\"Bearer \\\\\\\".concat(apiKey),\\\\n 'OpenAI-Organization': \\\\\\\"\\\\\\\".concat(organization),\\\\n },\\\\n body: JSON.stringify({\\\\n messages: context,\\\\n temperature: temperature,\\\\n }),\\\\n };\\\\n workOptions = organization && organization.length > 0\\\\n ? requestOptionsWithOrganization\\\\n : requestOptions;\\\\n return [4 /*yield*/, fetch(apiEndpoint, workOptions)];\\\\n case 1:\\\\n response = _b.sent();\\\\n return [4 /*yield*/, response.json()];\\\\n case 2:\\\\n data = _b.sent();\\\\n outputMessage = ((_a = data.choices[0].message) === null || _a === void 0 ? void 0 : _a.content) || '';\\\\n return [2 /*return*/, outputMessage];\\\\n }\\\\n });\\\\n });\\\\n };\\\\n return QBAICore;\\\\n}());\\\\n/* harmony default export */ __webpack_exports__[\\\\\\\"default\\\\\\\"] = (QBAICore);\\\\n\\\\n\\\\n//# sourceURL=webpack://qb-ai-core/./src/QBAICore.ts?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./src/Role.ts\\\":\\n/*!*********************!*\\\\\\n !*** ./src/Role.ts ***!\\n \\\\*********************/\\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\\n\\neval(\\\"__webpack_require__.r(__webpack_exports__);\\\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\\\n/* harmony export */ Role: function() { return /* binding */ Role; }\\\\n/* harmony export */ });\\\\nvar Role = /** @class */ (function () {\\\\n function Role() {\\\\n }\\\\n Role.me = \\\\\\\"me\\\\\\\";\\\\n Role.other = \\\\\\\"other\\\\\\\";\\\\n return Role;\\\\n}());\\\\n\\\\n;\\\\n\\\\n\\\\n//# sourceURL=webpack://qb-ai-core/./src/Role.ts?\\\");\\n\\n/***/ }),\\n\\n/***/ \\\"./src/index.ts\\\":\\n/*!**********************!*\\\\\\n !*** ./src/index.ts ***!\\n \\\\**********************/\\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\\n\\neval(\\\"__webpack_require__.r(__webpack_exports__);\\\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\\\n/* harmony export */ AIException: function() { return /* reexport safe */ _AIException__WEBPACK_IMPORTED_MODULE_3__.AIException; },\\\\n/* harmony export */ AIModel: function() { return /* reexport safe */ _AIModel__WEBPACK_IMPORTED_MODULE_0__.AIModel; },\\\\n/* harmony export */ ApiVersion: function() { return /* reexport safe */ _ApiVersion__WEBPACK_IMPORTED_MODULE_1__.ApiVersion; },\\\\n/* harmony export */ QBAICore: function() { return /* reexport safe */ _QBAICore__WEBPACK_IMPORTED_MODULE_4__[\\\\\\\"default\\\\\\\"]; },\\\\n/* harmony export */ Role: function() { return /* reexport safe */ _Role__WEBPACK_IMPORTED_MODULE_2__.Role; }\\\\n/* harmony export */ });\\\\n/* harmony import */ var _AIModel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AIModel */ \\\\\\\"./src/AIModel.ts\\\\\\\");\\\\n/* harmony import */ var _ApiVersion__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ApiVersion */ \\\\\\\"./src/ApiVersion.ts\\\\\\\");\\\\n/* harmony import */ var _Role__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Role */ \\\\\\\"./src/Role.ts\\\\\\\");\\\\n/* harmony import */ var _AIException__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./AIException */ \\\\\\\"./src/AIException.ts\\\\\\\");\\\\n/* harmony import */ var _QBAICore__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./QBAICore */ \\\\\\\"./src/QBAICore.ts\\\\\\\");\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n\\\\n//# sourceURL=webpack://qb-ai-core/./src/index.ts?\\\");\\n\\n/***/ })\\n\\n/******/ \\t});\\n/************************************************************************/\\n/******/ \\t// The module cache\\n/******/ \\tvar __webpack_module_cache__ = {};\\n/******/ \\t\\n/******/ \\t// The require function\\n/******/ \\tfunction __nested_webpack_require_13895__(moduleId) {\\n/******/ \\t\\t// Check if module is in cache\\n/******/ \\t\\tvar cachedModule = __webpack_module_cache__[moduleId];\\n/******/ \\t\\tif (cachedModule !== undefined) {\\n/******/ \\t\\t\\treturn cachedModule.exports;\\n/******/ \\t\\t}\\n/******/ \\t\\t// Create a new module (and put it into the cache)\\n/******/ \\t\\tvar module = __webpack_module_cache__[moduleId] = {\\n/******/ \\t\\t\\t// no module.id needed\\n/******/ \\t\\t\\t// no module.loaded needed\\n/******/ \\t\\t\\texports: {}\\n/******/ \\t\\t};\\n/******/ \\t\\n/******/ \\t\\t// Execute the module function\\n/******/ \\t\\t__webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_13895__);\\n/******/ \\t\\n/******/ \\t\\t// Return the exports of the module\\n/******/ \\t\\treturn module.exports;\\n/******/ \\t}\\n/******/ \\t\\n/************************************************************************/\\n/******/ \\t/* webpack/runtime/define property getters */\\n/******/ \\t!function() {\\n/******/ \\t\\t// define getter functions for harmony exports\\n/******/ \\t\\t__nested_webpack_require_13895__.d = function(exports, definition) {\\n/******/ \\t\\t\\tfor(var key in definition) {\\n/******/ \\t\\t\\t\\tif(__nested_webpack_require_13895__.o(definition, key) && !__nested_webpack_require_13895__.o(exports, key)) {\\n/******/ \\t\\t\\t\\t\\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\\n/******/ \\t\\t\\t\\t}\\n/******/ \\t\\t\\t}\\n/******/ \\t\\t};\\n/******/ \\t}();\\n/******/ \\t\\n/******/ \\t/* webpack/runtime/hasOwnProperty shorthand */\\n/******/ \\t!function() {\\n/******/ \\t\\t__nested_webpack_require_13895__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }\\n/******/ \\t}();\\n/******/ \\t\\n/******/ \\t/* webpack/runtime/make namespace object */\\n/******/ \\t!function() {\\n/******/ \\t\\t// define __esModule on exports\\n/******/ \\t\\t__nested_webpack_require_13895__.r = function(exports) {\\n/******/ \\t\\t\\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\\n/******/ \\t\\t\\t\\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\\n/******/ \\t\\t\\t}\\n/******/ \\t\\t\\tObject.defineProperty(exports, '__esModule', { value: true });\\n/******/ \\t\\t};\\n/******/ \\t}();\\n/******/ \\t\\n/************************************************************************/\\n/******/ \\t\\n/******/ \\t// startup\\n/******/ \\t// Load entry module and return exports\\n/******/ \\t// This entry module can't be inlined because the eval devtool is used.\\n/******/ \\tvar __nested_webpack_exports__ = __nested_webpack_require_13895__(\\\"./src/index.ts\\\");\\n/******/ \\t\\n/******/ \\treturn __nested_webpack_exports__;\\n/******/ })()\\n;\\n});\\n\\n//# sourceURL=webpack://qb-ai-translate/./node_modules/qb-ai-core/dist/index.js?\");\n\n/***/ }),\n\n/***/ \"./src/AITranslateException.ts\":\n/*!*************************************!*\\\n !*** ./src/AITranslateException.ts ***!\n \\*************************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ UNDEFINED_SETTINGS__AI_TRANSLATE_LANGUAGE_CODE: function() { return /* binding */ UNDEFINED_SETTINGS__AI_TRANSLATE_LANGUAGE_CODE; },\\n/* harmony export */ UNDEFINED_SETTINGS__AI_TRANSLATE_LANGUAGE_MESSAGE: function() { return /* binding */ UNDEFINED_SETTINGS__AI_TRANSLATE_LANGUAGE_MESSAGE; },\\n/* harmony export */ UNEXPECTED__AI_TRANSLATE_LANGUAGE_CODE: function() { return /* binding */ UNEXPECTED__AI_TRANSLATE_LANGUAGE_CODE; },\\n/* harmony export */ UNEXPECTED__AI_TRANSLATE_LANGUAGE_MESSAGE: function() { return /* binding */ UNEXPECTED__AI_TRANSLATE_LANGUAGE_MESSAGE; }\\n/* harmony export */ });\\n/* harmony import */ var qb_ai_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! qb-ai-core */ \\\"./node_modules/qb-ai-core/dist/index.js\\\");\\n/* harmony import */ var qb_ai_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(qb_ai_core__WEBPACK_IMPORTED_MODULE_0__);\\nvar __extends = (undefined && undefined.__extends) || (function () {\\n var extendStatics = function (d, b) {\\n extendStatics = Object.setPrototypeOf ||\\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\\n return extendStatics(d, b);\\n };\\n return function (d, b) {\\n if (typeof b !== \\\"function\\\" && b !== null)\\n throw new TypeError(\\\"Class extends value \\\" + String(b) + \\\" is not a constructor or null\\\");\\n extendStatics(d, b);\\n function __() { this.constructor = d; }\\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\\n };\\n})();\\n\\nvar UNDEFINED_SETTINGS__AI_TRANSLATE_LANGUAGE_MESSAGE = 'Undefined settings';\\nvar UNDEFINED_SETTINGS__AI_TRANSLATE_LANGUAGE_CODE = 121;\\nvar UNEXPECTED__AI_TRANSLATE_LANGUAGE_MESSAGE = 'Unexpected language';\\nvar UNEXPECTED__AI_TRANSLATE_LANGUAGE_CODE = 122;\\nvar AITranslateException = /** @class */ (function (_super) {\\n __extends(AITranslateException, _super);\\n function AITranslateException(message, code) {\\n var _this = _super.call(this, message, code) || this;\\n _this.message = message;\\n return _this;\\n }\\n return AITranslateException;\\n}(qb_ai_core__WEBPACK_IMPORTED_MODULE_0__.AIException));\\n/* harmony default export */ __webpack_exports__[\\\"default\\\"] = (AITranslateException);\\n\\n\\n//# sourceURL=webpack://qb-ai-translate/./src/AITranslateException.ts?\");\n\n/***/ }),\n\n/***/ \"./src/AITranslateSettings.ts\":\n/*!************************************!*\\\n !*** ./src/AITranslateSettings.ts ***!\n \\************************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\nvar AITranslateSettings = /** @class */ (function () {\\n function AITranslateSettings(apiKey, apiVersion, language, maxRequestTokens, maxResponseTokens, model, organization, serverPath, temperature, token) {\\n this._apiKey = apiKey;\\n this._apiVersion = apiVersion;\\n this._language = language;\\n this._maxRequestTokens = maxRequestTokens;\\n this._maxResponseTokens = maxResponseTokens;\\n this._model = model;\\n this._organization = organization;\\n this._serverPath = serverPath;\\n this._temperature = temperature;\\n this._token = token;\\n }\\n Object.defineProperty(AITranslateSettings.prototype, \\\"apiKey\\\", {\\n get: function () {\\n return this._apiKey;\\n },\\n set: function (value) {\\n this._apiKey = value;\\n },\\n enumerable: false,\\n configurable: true\\n });\\n Object.defineProperty(AITranslateSettings.prototype, \\\"apiVersion\\\", {\\n get: function () {\\n return this._apiVersion;\\n },\\n set: function (value) {\\n this._apiVersion = value;\\n },\\n enumerable: false,\\n configurable: true\\n });\\n Object.defineProperty(AITranslateSettings.prototype, \\\"language\\\", {\\n get: function () {\\n return this._language;\\n },\\n set: function (value) {\\n this._language = value;\\n },\\n enumerable: false,\\n configurable: true\\n });\\n Object.defineProperty(AITranslateSettings.prototype, \\\"maxRequestTokens\\\", {\\n get: function () {\\n return this._maxRequestTokens;\\n },\\n set: function (value) {\\n this._maxRequestTokens = value;\\n },\\n enumerable: false,\\n configurable: true\\n });\\n Object.defineProperty(AITranslateSettings.prototype, \\\"maxResponseTokens\\\", {\\n get: function () {\\n return this._maxResponseTokens;\\n },\\n set: function (value) {\\n this._maxResponseTokens = value;\\n },\\n enumerable: false,\\n configurable: true\\n });\\n Object.defineProperty(AITranslateSettings.prototype, \\\"model\\\", {\\n get: function () {\\n return this._model;\\n },\\n set: function (value) {\\n this._model = value;\\n },\\n enumerable: false,\\n configurable: true\\n });\\n Object.defineProperty(AITranslateSettings.prototype, \\\"organization\\\", {\\n get: function () {\\n return this._organization;\\n },\\n set: function (value) {\\n this._organization = value;\\n },\\n enumerable: false,\\n configurable: true\\n });\\n Object.defineProperty(AITranslateSettings.prototype, \\\"serverPath\\\", {\\n get: function () {\\n return this._serverPath;\\n },\\n set: function (value) {\\n this._serverPath = value;\\n },\\n enumerable: false,\\n configurable: true\\n });\\n Object.defineProperty(AITranslateSettings.prototype, \\\"temperature\\\", {\\n get: function () {\\n return this._temperature;\\n },\\n set: function (value) {\\n this._temperature = value;\\n },\\n enumerable: false,\\n configurable: true\\n });\\n Object.defineProperty(AITranslateSettings.prototype, \\\"token\\\", {\\n get: function () {\\n return this._token;\\n },\\n set: function (value) {\\n this._token = value;\\n },\\n enumerable: false,\\n configurable: true\\n });\\n return AITranslateSettings;\\n}());\\n/* harmony default export */ __webpack_exports__[\\\"default\\\"] = (AITranslateSettings);\\n\\n\\n//# sourceURL=webpack://qb-ai-translate/./src/AITranslateSettings.ts?\");\n\n/***/ }),\n\n/***/ \"./src/QBAITranslate.ts\":\n/*!******************************!*\\\n !*** ./src/QBAITranslate.ts ***!\n \\******************************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony import */ var qb_ai_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! qb-ai-core */ \\\"./node_modules/qb-ai-core/dist/index.js\\\");\\n/* harmony import */ var qb_ai_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(qb_ai_core__WEBPACK_IMPORTED_MODULE_0__);\\n/* harmony import */ var _AITranslateSettings__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./AITranslateSettings */ \\\"./src/AITranslateSettings.ts\\\");\\n/* harmony import */ var _AITranslateException__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AITranslateException */ \\\"./src/AITranslateException.ts\\\");\\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\\n return new (P || (P = Promise))(function (resolve, reject) {\\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\\n function rejected(value) { try { step(generator[\\\"throw\\\"](value)); } catch (e) { reject(e); } }\\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\\n step((generator = generator.apply(thisArg, _arguments || [])).next());\\n });\\n};\\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\\n return g = { next: verb(0), \\\"throw\\\": verb(1), \\\"return\\\": verb(2) }, typeof Symbol === \\\"function\\\" && (g[Symbol.iterator] = function() { return this; }), g;\\n function verb(n) { return function (v) { return step([n, v]); }; }\\n function step(op) {\\n if (f) throw new TypeError(\\\"Generator is already executing.\\\");\\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\\n if (f = 1, y && (t = op[0] & 2 ? y[\\\"return\\\"] : op[0] ? y[\\\"throw\\\"] || ((t = y[\\\"return\\\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\\n if (y = 0, t) op = [op[0] & 2, t.value];\\n switch (op[0]) {\\n case 0: case 1: t = op; break;\\n case 4: _.label++; return { value: op[1], done: false };\\n case 5: _.label++; y = op[1]; op = [0]; continue;\\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\\n default:\\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\\n if (t[2]) _.ops.pop();\\n _.trys.pop(); continue;\\n }\\n op = body.call(thisArg, _);\\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\\n }\\n};\\nvar __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {\\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\\n if (ar || !(i in from)) {\\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\\n ar[i] = from[i];\\n }\\n }\\n return to.concat(ar || Array.prototype.slice.call(from));\\n};\\n\\n\\n\\nvar QBAITranslate = /** @class */ (function () {\\n function QBAITranslate() {\\n }\\n QBAITranslate.translate = function (text, messages, settings) {\\n return __awaiter(this, void 0, void 0, function () {\\n var prompt;\\n return __generator(this, function (_a) {\\n if (QBAITranslate.availableLanguages().filter(function (item) { return item.language === settings.language; }).length === 0) {\\n throw new _AITranslateException__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"](_AITranslateException__WEBPACK_IMPORTED_MODULE_2__.UNEXPECTED__AI_TRANSLATE_LANGUAGE_MESSAGE, _AITranslateException__WEBPACK_IMPORTED_MODULE_2__.UNEXPECTED__AI_TRANSLATE_LANGUAGE_CODE);\\n }\\n prompt = QBAITranslate.createTranslatePrompt(text, settings.language);\\n if (settings.apiKey) {\\n return [2 /*return*/, QBAITranslate.getData(prompt, \\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\\n messages, settings.serverPath, settings.apiKey, qb_ai_core__WEBPACK_IMPORTED_MODULE_0__.AIModel.gpt__3_5__turbo, settings.temperature, settings.organization)];\\n }\\n else if (settings.serverPath) {\\n return [2 /*return*/, QBAITranslate.getDataWithProxyServer(prompt, \\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\\n messages, settings.serverPath, settings.token, qb_ai_core__WEBPACK_IMPORTED_MODULE_0__.AIModel.gpt__3_5__turbo, settings.temperature, settings.organization)];\\n }\\n else {\\n throw new _AITranslateException__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"](_AITranslateException__WEBPACK_IMPORTED_MODULE_2__.UNDEFINED_SETTINGS__AI_TRANSLATE_LANGUAGE_MESSAGE, _AITranslateException__WEBPACK_IMPORTED_MODULE_2__.UNDEFINED_SETTINGS__AI_TRANSLATE_LANGUAGE_CODE);\\n }\\n return [2 /*return*/];\\n });\\n });\\n };\\n QBAITranslate.createTranslatePrompt = function (textToSend, language) {\\n var prompt = \\\"Please, translate the provided text in english language and only return the translated text. If the translation fails or is not possible for any reason, only return 'Translation failed'. Text to be translated is: '\\\".concat(textToSend, \\\"'.\\\");\\n if (language) {\\n prompt = \\\"Please, translate the provided text in \\\".concat(language, \\\" language and only return the translated text. If the translation fails or is not possible for any reason, only return 'Translation failed'. Text to be translated is: '\\\").concat(textToSend, \\\"'.\\\");\\n }\\n return prompt;\\n };\\n QBAITranslate.availableLanguages = function () {\\n var languageBCP47 = [\\n { code: 'ar-SA', language: 'Arabic' },\\n { code: 'bn-BD', language: 'Bangla' },\\n { code: 'bn-IN', language: 'Bangla' },\\n { code: 'cs-CZ', language: 'Czech' },\\n { code: 'da-DK', language: 'Danish' },\\n { code: 'de-AT', language: 'German' },\\n { code: 'de-CH', language: 'German' },\\n { code: 'de-DE', language: 'German' },\\n { code: 'el-GR', language: 'Greek' },\\n { code: 'en-AU', language: 'English' },\\n { code: 'en-CA', language: 'English' },\\n { code: 'en-GB', language: 'English' },\\n { code: 'en-IE', language: 'English' },\\n { code: 'en-IN', language: 'English' },\\n { code: 'en-NZ', language: 'English' },\\n { code: 'en-US', language: 'English' },\\n { code: 'en-ZA', language: 'English' },\\n { code: 'es-AR', language: 'Spanish' },\\n { code: 'es-CL', language: 'Spanish' },\\n { code: 'es-CO', language: 'Spanish' },\\n { code: 'es-ES', language: 'Spanish' },\\n { code: 'es-MX', language: 'Spanish' },\\n { code: 'es-US', language: 'Spanish' },\\n { code: 'fi-FI', language: 'Finnish' },\\n { code: 'fr-BE', language: 'French' },\\n { code: 'fr-CA', language: 'French' },\\n { code: 'fr-CH', language: 'French' },\\n { code: 'fr-FR', language: 'French' },\\n { code: 'he-IL', language: 'Hebrew' },\\n { code: 'hi-IN', language: 'Hindi' },\\n { code: 'hu-HU', language: 'Hungarian' },\\n { code: 'id-ID', language: 'Indonesian' },\\n { code: 'it-CH', language: 'Italian' },\\n { code: 'it-IT', language: 'Italian' },\\n { code: 'ja-JP', language: 'Japanese' },\\n { code: 'ko-KR', language: 'Korean' },\\n { code: 'nl-BE', language: 'Dutch' },\\n { code: 'nl-NL', language: 'Dutch' },\\n { code: 'no-NO', language: 'Norwegian' },\\n { code: 'pl-PL', language: 'Polish' },\\n { code: 'pt-BR', language: 'Portuguese' },\\n { code: 'pt-PT', language: 'Portuguese' },\\n { code: 'ro-RO', language: 'Romanian' },\\n { code: 'ru-RU', language: 'Russian' },\\n { code: 'sk-SK', language: 'Slovak' },\\n { code: 'sv-SE', language: 'Swedish' },\\n { code: 'ta-IN', language: 'Tamil' },\\n { code: 'ta-LK', language: 'Tamil' },\\n { code: 'th-TH', language: 'Thai' },\\n { code: 'tr-TR', language: 'Turkish' },\\n { code: 'zh-CN', language: 'Chinese' },\\n { code: 'zh-HK', language: 'Chinese' },\\n { code: 'zh-TW', language: 'Chinese' },\\n { code: 'uk-UA', language: 'Ukrainian' },\\n ];\\n return languageBCP47;\\n };\\n QBAITranslate.createDefaultAITranslateSettings = function () {\\n return new _AITranslateSettings__WEBPACK_IMPORTED_MODULE_1__[\\\"default\\\"]('', qb_ai_core__WEBPACK_IMPORTED_MODULE_0__.ApiVersion.v1, 'English', 3584, 3584, qb_ai_core__WEBPACK_IMPORTED_MODULE_0__.AIModel.gpt__3_5__turbo, '', 'https://api.openai.com/v1/chat/completions', 0.5, '');\\n };\\n QBAITranslate.updateChatRoles = function (result) {\\n var context = result.map(function (item) {\\n var currentRole = 'user';\\n if (item.role === 'system') {\\n currentRole = 'system';\\n }\\n else {\\n currentRole = item.role === qb_ai_core__WEBPACK_IMPORTED_MODULE_0__.Role.other ? 'assistant' : 'user';\\n }\\n var tmp = { role: currentRole, content: item.content };\\n return tmp;\\n });\\n return context;\\n };\\n QBAITranslate.getData = function (prompt, dialogMessages, servername, sessionToken, openAIModel, temperature, organization) {\\n if (openAIModel === void 0) { openAIModel = 'gpt-3.5-turbo'; }\\n if (temperature === void 0) { temperature = 0.5; }\\n if (organization === void 0) { organization = ''; }\\n return __awaiter(this, void 0, void 0, function () {\\n var apiEndpoint, apiKey, model, allData, context, err_1, outputMessage;\\n return __generator(this, function (_a) {\\n switch (_a.label) {\\n case 0:\\n apiEndpoint = \\\"\\\".concat(servername);\\n apiKey = sessionToken;\\n model = openAIModel;\\n allData = __spreadArray(__spreadArray([], dialogMessages, true), [{ role: 'user', content: prompt }], false);\\n context = this.updateChatRoles(allData);\\n _a.label = 1;\\n case 1:\\n _a.trys.push([1, 3, , 4]);\\n return [4 /*yield*/, qb_ai_core__WEBPACK_IMPORTED_MODULE_0__.QBAICore.sendPromptToOpenai(apiKey, context, model, temperature, organization, apiEndpoint)];\\n case 2: return [2 /*return*/, _a.sent()];\\n case 3:\\n err_1 = _a.sent();\\n outputMessage = QBAITranslate.stringifyError(err_1);\\n throw new _AITranslateException__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"](outputMessage, -1);\\n case 4: return [2 /*return*/];\\n }\\n });\\n });\\n };\\n QBAITranslate.getDataWithProxyServer = function (prompt, dialogMessages, servername, sessionToken, openAIModel, temperature, organization) {\\n if (openAIModel === void 0) { openAIModel = 'gpt-3.5-turbo'; }\\n if (temperature === void 0) { temperature = 0.5; }\\n if (organization === void 0) { organization = ''; }\\n return __awaiter(this, void 0, void 0, function () {\\n var apiEndpoint, apiKey, model, allData, context, err_2, outputMessage;\\n return __generator(this, function (_a) {\\n switch (_a.label) {\\n case 0:\\n apiEndpoint = \\\"\\\".concat(servername);\\n apiKey = sessionToken;\\n model = openAIModel;\\n allData = __spreadArray(__spreadArray([], dialogMessages, true), [{ role: 'user', content: prompt }], false);\\n context = this.updateChatRoles(allData);\\n _a.label = 1;\\n case 1:\\n _a.trys.push([1, 3, , 4]);\\n return [4 /*yield*/, qb_ai_core__WEBPACK_IMPORTED_MODULE_0__.QBAICore.sendPromptToProxy(apiKey, context, model, temperature, apiEndpoint)];\\n case 2: return [2 /*return*/, _a.sent()];\\n case 3:\\n err_2 = _a.sent();\\n outputMessage = QBAITranslate.stringifyError(err_2);\\n throw new _AITranslateException__WEBPACK_IMPORTED_MODULE_2__[\\\"default\\\"](outputMessage, -1);\\n case 4: return [2 /*return*/];\\n }\\n });\\n });\\n };\\n QBAITranslate.stringifyError = function (error) {\\n if (typeof error === 'string')\\n return error;\\n if (error && typeof error === 'object') {\\n var dataError = error;\\n if (dataError.detail) {\\n return QBAITranslate.parseErrorMessage(dataError.detail);\\n }\\n if (dataError === null || dataError === void 0 ? void 0 : dataError.message) {\\n return QBAITranslate.parseErrorMessage(dataError.message);\\n }\\n return QBAITranslate.parseErrorObject(dataError);\\n }\\n return JSON.stringify(error);\\n };\\n QBAITranslate.parseErrorMessage = function (message) {\\n var data = QBAITranslate.jsonParse(message);\\n if (typeof data === 'string') {\\n return data;\\n }\\n if (Array.isArray(data)) {\\n return data.join('');\\n }\\n if (typeof data === 'object') {\\n return QBAITranslate.parseErrorObject(data);\\n }\\n return data;\\n };\\n QBAITranslate.jsonParse = function (text) {\\n try {\\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\\n // @ts-ignore\\n return JSON.parse(text);\\n }\\n catch (error) {\\n return text;\\n }\\n };\\n QBAITranslate.parseErrorObject = function (data) {\\n return Object.keys(data)\\n .map(function (key) {\\n var field = data[key];\\n return Array.isArray(field)\\n ? \\\"\\\".concat(key, \\\" \\\").concat(field.join(''))\\n : \\\"\\\".concat(key, \\\" \\\").concat(field);\\n })\\n .join(' ')\\n .replace(/errors\\\\s?/, '');\\n };\\n return QBAITranslate;\\n}());\\n/* harmony default export */ __webpack_exports__[\\\"default\\\"] = (QBAITranslate);\\n\\n\\n//# sourceURL=webpack://qb-ai-translate/./src/QBAITranslate.ts?\");\n\n/***/ }),\n\n/***/ \"./src/index.ts\":\n/*!**********************!*\\\n !*** ./src/index.ts ***!\n \\**********************/\n/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\neval(\"__webpack_require__.r(__webpack_exports__);\\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\\n/* harmony export */ QBAITranslate: function() { return /* reexport safe */ _QBAITranslate__WEBPACK_IMPORTED_MODULE_0__[\\\"default\\\"]; }\\n/* harmony export */ });\\n/* harmony import */ var _QBAITranslate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./QBAITranslate */ \\\"./src/QBAITranslate.ts\\\");\\n\\n\\n\\n\\n//# sourceURL=webpack://qb-ai-translate/./src/index.ts?\");\n\n/***/ })\n\n/******/ \t});\n/************************************************************************/\n/******/ \t// The module cache\n/******/ \tvar __webpack_module_cache__ = {};\n/******/ \t\n/******/ \t// The require function\n/******/ \tfunction __nested_webpack_require_42162__(moduleId) {\n/******/ \t\t// Check if module is in cache\n/******/ \t\tvar cachedModule = __webpack_module_cache__[moduleId];\n/******/ \t\tif (cachedModule !== undefined) {\n/******/ \t\t\treturn cachedModule.exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = __webpack_module_cache__[moduleId] = {\n/******/ \t\t\t// no module.id needed\n/******/ \t\t\t// no module.loaded needed\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/ \t\n/******/ \t\t// Execute the module function\n/******/ \t\t__webpack_modules__[moduleId](module, module.exports, __nested_webpack_require_42162__);\n/******/ \t\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/ \t\n/************************************************************************/\n/******/ \t/* webpack/runtime/compat get default export */\n/******/ \t!function() {\n/******/ \t\t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t\t__nested_webpack_require_42162__.n = function(module) {\n/******/ \t\t\tvar getter = module && module.__esModule ?\n/******/ \t\t\t\tfunction() { return module['default']; } :\n/******/ \t\t\t\tfunction() { return module; };\n/******/ \t\t\t__nested_webpack_require_42162__.d(getter, { a: getter });\n/******/ \t\t\treturn getter;\n/******/ \t\t};\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/define property getters */\n/******/ \t!function() {\n/******/ \t\t// define getter functions for harmony exports\n/******/ \t\t__nested_webpack_require_42162__.d = function(exports, definition) {\n/******/ \t\t\tfor(var key in definition) {\n/******/ \t\t\t\tif(__nested_webpack_require_42162__.o(definition, key) && !__nested_webpack_require_42162__.o(exports, key)) {\n/******/ \t\t\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n/******/ \t\t\t\t}\n/******/ \t\t\t}\n/******/ \t\t};\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/hasOwnProperty shorthand */\n/******/ \t!function() {\n/******/ \t\t__nested_webpack_require_42162__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }\n/******/ \t}();\n/******/ \t\n/******/ \t/* webpack/runtime/make namespace object */\n/******/ \t!function() {\n/******/ \t\t// define __esModule on exports\n/******/ \t\t__nested_webpack_require_42162__.r = function(exports) {\n/******/ \t\t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t\t}\n/******/ \t\t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t\t};\n/******/ \t}();\n/******/ \t\n/************************************************************************/\n/******/ \t\n/******/ \t// startup\n/******/ \t// Load entry module and return exports\n/******/ \t// This entry module can't be inlined because the eval devtool is used.\n/******/ \tvar __nested_webpack_exports__ = __nested_webpack_require_42162__(\"./src/index.ts\");\n/******/ \t\n/******/ \treturn __nested_webpack_exports__;\n/******/ })()\n;\n});\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./node_modules/qb-ai-translate/dist/index.js?");
|
|
565
|
+
|
|
566
|
+
/***/ }),
|
|
567
|
+
|
|
472
568
|
/***/ "./node_modules/react/cjs/react-jsx-runtime.development.js":
|
|
473
569
|
/*!*****************************************************************!*\
|
|
474
570
|
!*** ./node_modules/react/cjs/react-jsx-runtime.development.js ***!
|
|
@@ -656,6 +752,28 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
|
|
|
656
752
|
|
|
657
753
|
/***/ }),
|
|
658
754
|
|
|
755
|
+
/***/ "./src/Presentation/components/UI/Dialogs/MessagesView/DefaultAttachmentComponent/DefaultAttachmentComponent.scss":
|
|
756
|
+
/*!************************************************************************************************************************!*\
|
|
757
|
+
!*** ./src/Presentation/components/UI/Dialogs/MessagesView/DefaultAttachmentComponent/DefaultAttachmentComponent.scss ***!
|
|
758
|
+
\************************************************************************************************************************/
|
|
759
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
760
|
+
|
|
761
|
+
"use strict";
|
|
762
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ \"./node_modules/style-loader/dist/runtime/styleDomAPI.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ \"./node_modules/style-loader/dist/runtime/insertBySelector.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ \"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ \"./node_modules/style-loader/dist/runtime/insertStyleElement.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ \"./node_modules/style-loader/dist/runtime/styleTagTransform.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_DefaultAttachmentComponent_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../../../../../node_modules/css-loader/dist/cjs.js!../../../../../../../node_modules/sass-loader/dist/cjs.js!./DefaultAttachmentComponent.scss */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/Presentation/components/UI/Dialogs/MessagesView/DefaultAttachmentComponent/DefaultAttachmentComponent.scss\");\n\n \n \n \n \n \n \n \n \n \n\nvar options = {};\n\noptions.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());\noptions.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());\n\n options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, \"head\");\n \noptions.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());\noptions.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());\n\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_DefaultAttachmentComponent_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"], options);\n\n\n\n\n /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_DefaultAttachmentComponent_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"] && _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_DefaultAttachmentComponent_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_DefaultAttachmentComponent_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"].locals : undefined);\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/MessagesView/DefaultAttachmentComponent/DefaultAttachmentComponent.scss?");
|
|
763
|
+
|
|
764
|
+
/***/ }),
|
|
765
|
+
|
|
766
|
+
/***/ "./src/Presentation/components/UI/Dialogs/MessagesView/ErrorToast/ErrorToast.scss":
|
|
767
|
+
/*!****************************************************************************************!*\
|
|
768
|
+
!*** ./src/Presentation/components/UI/Dialogs/MessagesView/ErrorToast/ErrorToast.scss ***!
|
|
769
|
+
\****************************************************************************************/
|
|
770
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
771
|
+
|
|
772
|
+
"use strict";
|
|
773
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ \"./node_modules/style-loader/dist/runtime/styleDomAPI.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ \"./node_modules/style-loader/dist/runtime/insertBySelector.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ \"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ \"./node_modules/style-loader/dist/runtime/insertStyleElement.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ \"./node_modules/style-loader/dist/runtime/styleTagTransform.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_ErrorToast_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../../../../../node_modules/css-loader/dist/cjs.js!../../../../../../../node_modules/sass-loader/dist/cjs.js!./ErrorToast.scss */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/Presentation/components/UI/Dialogs/MessagesView/ErrorToast/ErrorToast.scss\");\n\n \n \n \n \n \n \n \n \n \n\nvar options = {};\n\noptions.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());\noptions.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());\n\n options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, \"head\");\n \noptions.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());\noptions.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());\n\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_ErrorToast_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"], options);\n\n\n\n\n /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_ErrorToast_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"] && _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_ErrorToast_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_ErrorToast_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"].locals : undefined);\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/MessagesView/ErrorToast/ErrorToast.scss?");
|
|
774
|
+
|
|
775
|
+
/***/ }),
|
|
776
|
+
|
|
659
777
|
/***/ "./src/Presentation/components/UI/Dialogs/MessagesView/HeaderMessages/HeaderMessages.scss":
|
|
660
778
|
/*!************************************************************************************************!*\
|
|
661
779
|
!*** ./src/Presentation/components/UI/Dialogs/MessagesView/HeaderMessages/HeaderMessages.scss ***!
|
|
@@ -755,6 +873,28 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
|
|
|
755
873
|
|
|
756
874
|
/***/ }),
|
|
757
875
|
|
|
876
|
+
/***/ "./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewAudioFile/PreviewAudioFile.scss":
|
|
877
|
+
/*!*****************************************************************************************************!*\
|
|
878
|
+
!*** ./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewAudioFile/PreviewAudioFile.scss ***!
|
|
879
|
+
\*****************************************************************************************************/
|
|
880
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
881
|
+
|
|
882
|
+
"use strict";
|
|
883
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ \"./node_modules/style-loader/dist/runtime/styleDomAPI.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ \"./node_modules/style-loader/dist/runtime/insertBySelector.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ \"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ \"./node_modules/style-loader/dist/runtime/insertStyleElement.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ \"./node_modules/style-loader/dist/runtime/styleTagTransform.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_PreviewAudioFile_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../../../../../node_modules/css-loader/dist/cjs.js!../../../../../../../node_modules/sass-loader/dist/cjs.js!./PreviewAudioFile.scss */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewAudioFile/PreviewAudioFile.scss\");\n\n \n \n \n \n \n \n \n \n \n\nvar options = {};\n\noptions.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());\noptions.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());\n\n options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, \"head\");\n \noptions.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());\noptions.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());\n\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_PreviewAudioFile_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"], options);\n\n\n\n\n /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_PreviewAudioFile_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"] && _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_PreviewAudioFile_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_PreviewAudioFile_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"].locals : undefined);\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewAudioFile/PreviewAudioFile.scss?");
|
|
884
|
+
|
|
885
|
+
/***/ }),
|
|
886
|
+
|
|
887
|
+
/***/ "./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDefaultFile/PreviewDefaultFile.scss":
|
|
888
|
+
/*!*********************************************************************************************************!*\
|
|
889
|
+
!*** ./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDefaultFile/PreviewDefaultFile.scss ***!
|
|
890
|
+
\*********************************************************************************************************/
|
|
891
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
892
|
+
|
|
893
|
+
"use strict";
|
|
894
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ \"./node_modules/style-loader/dist/runtime/styleDomAPI.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ \"./node_modules/style-loader/dist/runtime/insertBySelector.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ \"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ \"./node_modules/style-loader/dist/runtime/insertStyleElement.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ \"./node_modules/style-loader/dist/runtime/styleTagTransform.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_PreviewDefaultFile_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../../../../../node_modules/css-loader/dist/cjs.js!../../../../../../../node_modules/sass-loader/dist/cjs.js!./PreviewDefaultFile.scss */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDefaultFile/PreviewDefaultFile.scss\");\n\n \n \n \n \n \n \n \n \n \n\nvar options = {};\n\noptions.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());\noptions.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());\n\n options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, \"head\");\n \noptions.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());\noptions.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());\n\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_PreviewDefaultFile_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"], options);\n\n\n\n\n /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_PreviewDefaultFile_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"] && _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_PreviewDefaultFile_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_PreviewDefaultFile_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"].locals : undefined);\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDefaultFile/PreviewDefaultFile.scss?");
|
|
895
|
+
|
|
896
|
+
/***/ }),
|
|
897
|
+
|
|
758
898
|
/***/ "./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDialog.scss":
|
|
759
899
|
/*!*********************************************************************************!*\
|
|
760
900
|
!*** ./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDialog.scss ***!
|
|
@@ -766,6 +906,28 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _nod
|
|
|
766
906
|
|
|
767
907
|
/***/ }),
|
|
768
908
|
|
|
909
|
+
/***/ "./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewImageFile/PreviewImageFile.scss":
|
|
910
|
+
/*!*****************************************************************************************************!*\
|
|
911
|
+
!*** ./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewImageFile/PreviewImageFile.scss ***!
|
|
912
|
+
\*****************************************************************************************************/
|
|
913
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
914
|
+
|
|
915
|
+
"use strict";
|
|
916
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ \"./node_modules/style-loader/dist/runtime/styleDomAPI.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ \"./node_modules/style-loader/dist/runtime/insertBySelector.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ \"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ \"./node_modules/style-loader/dist/runtime/insertStyleElement.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ \"./node_modules/style-loader/dist/runtime/styleTagTransform.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_PreviewImageFile_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../../../../../node_modules/css-loader/dist/cjs.js!../../../../../../../node_modules/sass-loader/dist/cjs.js!./PreviewImageFile.scss */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewImageFile/PreviewImageFile.scss\");\n\n \n \n \n \n \n \n \n \n \n\nvar options = {};\n\noptions.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());\noptions.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());\n\n options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, \"head\");\n \noptions.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());\noptions.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());\n\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_PreviewImageFile_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"], options);\n\n\n\n\n /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_PreviewImageFile_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"] && _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_PreviewImageFile_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_PreviewImageFile_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"].locals : undefined);\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewImageFile/PreviewImageFile.scss?");
|
|
917
|
+
|
|
918
|
+
/***/ }),
|
|
919
|
+
|
|
920
|
+
/***/ "./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewVideoFile/PreviewVideoFile.scss":
|
|
921
|
+
/*!*****************************************************************************************************!*\
|
|
922
|
+
!*** ./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewVideoFile/PreviewVideoFile.scss ***!
|
|
923
|
+
\*****************************************************************************************************/
|
|
924
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
925
|
+
|
|
926
|
+
"use strict";
|
|
927
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ \"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ \"./node_modules/style-loader/dist/runtime/styleDomAPI.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ \"./node_modules/style-loader/dist/runtime/insertBySelector.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ \"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ \"./node_modules/style-loader/dist/runtime/insertStyleElement.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../../../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ \"./node_modules/style-loader/dist/runtime/styleTagTransform.js\");\n/* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);\n/* harmony import */ var _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_PreviewVideoFile_scss__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../../../../../node_modules/css-loader/dist/cjs.js!../../../../../../../node_modules/sass-loader/dist/cjs.js!./PreviewVideoFile.scss */ \"./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewVideoFile/PreviewVideoFile.scss\");\n\n \n \n \n \n \n \n \n \n \n\nvar options = {};\n\noptions.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());\noptions.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());\n\n options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, \"head\");\n \noptions.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());\noptions.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());\n\nvar update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_PreviewVideoFile_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"], options);\n\n\n\n\n /* harmony default export */ __webpack_exports__[\"default\"] = (_node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_PreviewVideoFile_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"] && _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_PreviewVideoFile_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"].locals ? _node_modules_css_loader_dist_cjs_js_node_modules_sass_loader_dist_cjs_js_PreviewVideoFile_scss__WEBPACK_IMPORTED_MODULE_6__[\"default\"].locals : undefined);\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewVideoFile/PreviewVideoFile.scss?");
|
|
928
|
+
|
|
929
|
+
/***/ }),
|
|
930
|
+
|
|
769
931
|
/***/ "./src/Presentation/components/UI/Dialogs/YesNoQuestion/YesNoQuestion.scss":
|
|
770
932
|
/*!*********************************************************************************!*\
|
|
771
933
|
!*** ./src/Presentation/components/UI/Dialogs/YesNoQuestion/YesNoQuestion.scss ***!
|
|
@@ -982,7 +1144,7 @@ eval("\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElem
|
|
|
982
1144
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
983
1145
|
|
|
984
1146
|
"use strict";
|
|
985
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"DefaultConfigurations\": function() { return /* binding */ DefaultConfigurations; }\n/* harmony export */ });\nvar supportedLanguagesForIATranslate = [\n 'English',\n 'Ukrainian',\n 'Spanish',\n 'Portuguese',\n 'French',\n 'German',\n];\nvar languageBCP47 = {\n 'ar-SA': 'Arabic',\n 'bn-BD': 'Bangla',\n 'bn-IN': 'Bangla',\n 'cs-CZ': 'Czech',\n 'da-DK': 'Danish',\n 'de-AT': 'German',\n 'de-CH': 'German',\n 'de-DE': 'German',\n 'el-GR': 'Greek',\n 'en-AU': 'English',\n 'en-CA': 'English',\n 'en-GB': 'English',\n 'en-IE': 'English',\n 'en-IN': 'English',\n 'en-NZ': 'English',\n 'en-US': 'English',\n 'en-ZA': 'English',\n 'es-AR': 'Spanish',\n 'es-CL': 'Spanish',\n 'es-CO': 'Spanish',\n 'es-ES': 'Spanish',\n 'es-MX': 'Spanish',\n 'es-US': 'Spanish',\n 'fi-FI': 'Finnish',\n 'fr-BE': 'French',\n 'fr-CA': 'French',\n 'fr-CH': 'French',\n 'fr-FR': 'French',\n 'he-IL': 'Hebrew',\n 'hi-IN': 'Hindi',\n 'hu-HU': 'Hungarian',\n 'id-ID': 'Indonesian',\n 'it-CH': 'Italian',\n 'it-IT': 'Italian',\n 'ja-JP': 'Japanese',\n 'ko-KR': 'Korean',\n 'nl-BE': 'Dutch',\n 'nl-NL': 'Dutch',\n 'no-NO': 'Norwegian',\n 'pl-PL': 'Polish',\n 'pt-BR': 'Portuguese',\n 'pt-PT': 'Portuguese',\n 'ro-RO': 'Romanian',\n 'ru-RU': 'Russian',\n 'sk-SK': 'Slovak',\n 'sv-SE': 'Swedish',\n 'ta-IN': 'Tamil',\n 'ta-LK': 'Tamil',\n 'th-TH': 'Thai',\n 'tr-TR': 'Turkish',\n 'zh-CN': 'Chinese',\n 'zh-HK': 'Chinese',\n 'zh-TW': 'Chinese',\n 'uk-UA': 'Ukrainian',\n};\nvar getDefaultSystemLanguage = function () {\n var sysLanguage = navigator.language;\n var language = languageBCP47[sysLanguage] || 'English';\n return language;\n};\nvar DefaultConfigurations = /** @class */ (function () {\n function DefaultConfigurations() {\n }\n DefaultConfigurations.getDefaultProxyConfig = function () {\n return {\n api: 'v1/chat/completions',\n servername: 'https://api.openai.com',\n port: '',\n sessionToken: '',\n };\n };\n DefaultConfigurations.getDefaultLanguageForAITranslate = function () {\n var languageForAITranslate = 'English';\n var defaultLanguage = DefaultConfigurations.getDefaultQBConfig().configAIApi\n .AITranslateWidgetConfig.defaultLanguage;\n if (defaultLanguage.length > 0 &&\n supportedLanguagesForIATranslate.includes(defaultLanguage)) {\n languageForAITranslate = defaultLanguage;\n }\n else {\n var sysLanguage = getDefaultSystemLanguage();\n if (supportedLanguagesForIATranslate.includes(sysLanguage)) {\n languageForAITranslate = sysLanguage;\n }\n }\n return languageForAITranslate;\n };\n DefaultConfigurations.getAdditionalLanguagesForAITranslate = function () {\n var additionalLanguages = [];\n var languages = DefaultConfigurations.getDefaultQBConfig().configAIApi\n .AITranslateWidgetConfig.languages;\n languages.forEach(function (item) {\n if (supportedLanguagesForIATranslate.includes(item)) {\n additionalLanguages.push(item);\n }\n else {\n additionalLanguages.push('English');\n }\n });\n return additionalLanguages;\n };\n //\n DefaultConfigurations.getDefaultQBConfig = function () {\n return {\n credentials: {\n appId: -1,\n accountKey: '',\n authKey: '',\n authSecret: '',\n sessionToken: '',\n },\n configAIApi: {\n AIAnswerAssistWidgetConfig: {\n apiKey: '',\n useDefault: true,\n proxyConfig: {\n api: 'v1/chat/completions',\n servername: 'https://api.openai.com/',\n port: '',\n sessionToken: '',\n },\n },\n AITranslateWidgetConfig: {\n apiKey: '',\n useDefault: true,\n defaultLanguage: 'English',\n languages: [\n 'English',\n 'Spanish',\n 'French',\n 'Portuguese',\n 'German',\n 'Ukrainian',\n ],\n proxyConfig: {\n api: 'v1/chat/completions',\n servername: 'https://api.openai.com/',\n port: '',\n sessionToken: '',\n },\n },\n AIRephraseWidgetConfig: {\n apiKey: '',\n useDefault: true,\n defaultTone: 'Professional',\n proxyConfig: {\n api: 'v1/chat/completions',\n servername: 'https://api.openai.com/',\n port: '',\n sessionToken: '',\n },\n },\n },\n appConfig: {\n maxFileSize: 10 * 1024 * 1024,\n sessionTimeOut: 122,\n chatProtocol: {\n active: 2,\n },\n debug: true,\n endpoints: {\n api: 'api.quickblox.com',\n chat: 'chat.quickblox.com',\n },\n streamManagement: {\n enable: true,\n },\n },\n };\n };\n return DefaultConfigurations;\n}());\n\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Data/DefaultConfigurations.ts?");
|
|
1147
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"DefaultConfigurations\": function() { return /* binding */ DefaultConfigurations; }\n/* harmony export */ });\nvar supportedLanguagesForIATranslate = [\n 'English',\n 'Ukrainian',\n 'Spanish',\n 'Portuguese',\n 'French',\n 'German',\n];\n// [\"en-US\", \"zh-CN\", \"ja-JP\"]\nvar languageBCP47 = {\n 'ar-SA': 'Arabic',\n 'bn-BD': 'Bangla',\n 'bn-IN': 'Bangla',\n 'cs-CZ': 'Czech',\n 'da-DK': 'Danish',\n 'de-AT': 'German',\n 'de-CH': 'German',\n 'de-DE': 'German',\n 'el-GR': 'Greek',\n 'en-AU': 'English',\n 'en-CA': 'English',\n 'en-GB': 'English',\n 'en-IE': 'English',\n 'en-IN': 'English',\n 'en-NZ': 'English',\n 'en-US': 'English',\n 'en-ZA': 'English',\n 'es-AR': 'Spanish',\n 'es-CL': 'Spanish',\n 'es-CO': 'Spanish',\n 'es-ES': 'Spanish',\n 'es-MX': 'Spanish',\n 'es-US': 'Spanish',\n 'fi-FI': 'Finnish',\n 'fr-BE': 'French',\n 'fr-CA': 'French',\n 'fr-CH': 'French',\n 'fr-FR': 'French',\n 'he-IL': 'Hebrew',\n 'hi-IN': 'Hindi',\n 'hu-HU': 'Hungarian',\n 'id-ID': 'Indonesian',\n 'it-CH': 'Italian',\n 'it-IT': 'Italian',\n 'ja-JP': 'Japanese',\n 'ko-KR': 'Korean',\n 'nl-BE': 'Dutch',\n 'nl-NL': 'Dutch',\n 'no-NO': 'Norwegian',\n 'pl-PL': 'Polish',\n 'pt-BR': 'Portuguese',\n 'pt-PT': 'Portuguese',\n 'ro-RO': 'Romanian',\n 'ru-RU': 'Russian',\n 'sk-SK': 'Slovak',\n 'sv-SE': 'Swedish',\n 'ta-IN': 'Tamil',\n 'ta-LK': 'Tamil',\n 'th-TH': 'Thai',\n 'tr-TR': 'Turkish',\n 'zh-CN': 'Chinese',\n 'zh-HK': 'Chinese',\n 'zh-TW': 'Chinese',\n 'uk-UA': 'Ukrainian',\n};\nvar getDefaultSystemLanguage = function () {\n var sysLanguage = navigator.language;\n var language = languageBCP47[sysLanguage] || 'English';\n return language;\n};\nvar DefaultConfigurations = /** @class */ (function () {\n function DefaultConfigurations() {\n }\n DefaultConfigurations.getDefaultProxyConfig = function () {\n return {\n api: 'v1/chat/completions',\n servername: 'https://api.openai.com',\n port: '',\n };\n };\n DefaultConfigurations.getDefaultLanguageForAITranslate = function (configAITranslate) {\n var languageForAITranslate = 'English';\n var defaultLanguage = configAITranslate.defaultLanguage ||\n DefaultConfigurations.getDefaultQBConfig().configAIApi\n .AITranslateWidgetConfig.defaultLanguage;\n if (defaultLanguage.length > 0 &&\n supportedLanguagesForIATranslate.includes(defaultLanguage)) {\n languageForAITranslate = defaultLanguage;\n }\n else {\n var sysLanguage = getDefaultSystemLanguage();\n if (supportedLanguagesForIATranslate.includes(sysLanguage)) {\n languageForAITranslate = sysLanguage;\n }\n }\n return languageForAITranslate;\n };\n DefaultConfigurations.getAdditionalLanguagesForAITranslate = function (configAITranslate) {\n var additionalLanguages = [];\n var languages = configAITranslate.languages ||\n DefaultConfigurations.getDefaultQBConfig().configAIApi\n .AITranslateWidgetConfig.languages;\n languages.forEach(function (item) {\n if (supportedLanguagesForIATranslate.includes(item)) {\n additionalLanguages.push(item);\n }\n else {\n additionalLanguages.push('English');\n }\n });\n return additionalLanguages;\n };\n //\n DefaultConfigurations.getDefaultQBConfig = function () {\n return {\n credentials: {\n appId: -1,\n accountKey: '',\n authKey: '',\n authSecret: '',\n sessionToken: '',\n },\n configAIApi: {\n AIAnswerAssistWidgetConfig: {\n organizationName: 'Quickblox',\n openAIModel: 'gpt-3.5-turbo',\n apiKey: '',\n maxTokens: 3584,\n useDefault: true,\n proxyConfig: {\n api: 'v1/chat/completions',\n servername: 'https://api.openai.com/',\n port: '',\n },\n },\n AITranslateWidgetConfig: {\n organizationName: 'Quickblox',\n openAIModel: 'gpt-3.5-turbo',\n apiKey: '',\n maxTokens: 3584,\n useDefault: true,\n defaultLanguage: 'English',\n languages: ['English', 'French', 'Portuguese', 'German', 'Ukrainian'],\n proxyConfig: {\n api: 'v1/chat/completions',\n servername: '',\n port: '',\n },\n // proxyConfig: {\n // api: 'v1/chat/completions',\n // servername: 'http://localhost',\n // port: '3012',\n // },\n },\n AIRephraseWidgetConfig: {\n organizationName: 'Quickblox',\n openAIModel: 'gpt-3.5-turbo',\n apiKey: '',\n maxTokens: 3584,\n useDefault: true,\n defaultTone: 'Professional',\n Tones: [\n {\n name: 'Professional Tone',\n description: 'This would edit messages to sound more formal, using technical vocabulary, clear sentence structures, and maintaining a respectful tone. It would avoid colloquial language and ensure appropriate salutations and sign-offs',\n iconEmoji: '👔',\n },\n {\n name: 'Friendly Tone',\n description: 'This would adjust messages to reflect a casual, friendly tone. It would incorporate casual language, use emoticons, exclamation points, and other informalities to make the message seem more friendly and approachable.',\n iconEmoji: '🤝',\n },\n {\n name: 'Encouraging Tone',\n description: 'This tone would be useful for motivation and encouragement. It would include positive words, affirmations, and express support and belief in the recipient.',\n iconEmoji: '💪',\n },\n {\n name: 'Empathetic Tone',\n description: 'This tone would be utilized to display understanding and empathy. It would involve softer language, acknowledging feelings, and demonstrating compassion and support.',\n iconEmoji: '🤲',\n },\n {\n name: 'Neutral Tone',\n description: 'For times when you want to maintain an even, unbiased, and objective tone. It would avoid extreme language and emotive words, opting for clear, straightforward communication.',\n iconEmoji: '😐',\n },\n {\n name: 'Assertive Tone',\n description: 'This tone is beneficial for making clear points, standing ground, or in negotiations. It uses direct language, is confident, and does not mince words.',\n iconEmoji: '🔨',\n },\n {\n name: 'Instructive Tone',\n description: 'This tone would be useful for tutorials, guides, or other teaching and training materials. It is clear, concise, and walks the reader through steps or processes in a logical manner.',\n iconEmoji: '📖',\n },\n {\n name: 'Persuasive Tone',\n description: 'This tone can be used when trying to convince someone or argue a point. It uses persuasive language, powerful words, and logical reasoning.',\n iconEmoji: '☝️',\n },\n {\n name: 'Sarcastic/Ironic Tone',\n description: 'This tone can make the communication more humorous or show an ironic stance. It is harder to implement as it requires the AI to understand nuanced language and may not always be taken as intended by the reader.',\n iconEmoji: '😏',\n },\n {\n name: 'Poetic Tone',\n description: 'This would add an artistic touch to messages, using figurative language, rhymes, and rhythm to create a more expressive text.',\n iconEmoji: '🎭',\n },\n ],\n proxyConfig: {\n api: 'v1/chat/completions',\n servername: 'https://api.openai.com/',\n port: '',\n },\n },\n },\n appConfig: {\n maxFileSize: 10 * 1024 * 1024,\n sessionTimeOut: 122,\n chatProtocol: {\n active: 2,\n },\n debug: true,\n endpoints: {\n api: 'api.quickblox.com',\n chat: 'chat.quickblox.com',\n },\n streamManagement: {\n enable: true,\n },\n },\n // credentials: {\n // appId: -1,\n // accountKey: '',\n // authKey: '',\n // authSecret: '',\n // sessionToken: '',\n // },\n // configAIApi: {\n // AIAnswerAssistWidgetConfig: {\n // apiKey: '',\n // useDefault: true,\n // proxyConfig: {\n // api: 'v1/chat/completions',\n // servername: 'https://api.openai.com/',\n // port: '',\n // sessionToken: '',\n // },\n // },\n // AITranslateWidgetConfig: {\n // apiKey: '',\n // useDefault: true,\n // defaultLanguage: 'English',\n // languages: [\n // 'English',\n // 'Spanish',\n // 'French',\n // 'Portuguese',\n // 'German',\n // 'Ukrainian',\n // ],\n // proxyConfig: {\n // api: 'v1/chat/completions',\n // servername: 'https://api.openai.com/',\n // port: '',\n // sessionToken: '',\n // },\n // },\n // AIRephraseWidgetConfig: {\n // apiKey: '',\n // useDefault: true,\n // defaultTone: 'Professional',\n // proxyConfig: {\n // api: 'v1/chat/completions',\n // servername: 'https://api.openai.com/',\n // port: '',\n // sessionToken: '',\n // },\n // },\n // },\n // appConfig: {\n // maxFileSize: 10 * 1024 * 1024,\n // sessionTimeOut: 122,\n // chatProtocol: {\n // active: 2,\n // },\n // debug: true,\n // endpoints: {\n // api: 'api.quickblox.com',\n // chat: 'chat.quickblox.com',\n // },\n // streamManagement: {\n // enable: true,\n // },\n // },\n };\n };\n return DefaultConfigurations;\n}());\n\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Data/DefaultConfigurations.ts?");
|
|
986
1148
|
|
|
987
1149
|
/***/ }),
|
|
988
1150
|
|
|
@@ -1668,6 +1830,28 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
1668
1830
|
|
|
1669
1831
|
/***/ }),
|
|
1670
1832
|
|
|
1833
|
+
/***/ "./src/Domain/use_cases/ai/AIAnswerAssistUseCase.ts":
|
|
1834
|
+
/*!**********************************************************!*\
|
|
1835
|
+
!*** ./src/Domain/use_cases/ai/AIAnswerAssistUseCase.ts ***!
|
|
1836
|
+
\**********************************************************/
|
|
1837
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1838
|
+
|
|
1839
|
+
"use strict";
|
|
1840
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AIAnswerAssistUseCase\": function() { return /* binding */ AIAnswerAssistUseCase; }\n/* harmony export */ });\n/* harmony import */ var qb_ai_answer_assistant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! qb-ai-answer-assistant */ \"./node_modules/qb-ai-answer-assistant/dist/index.js\");\n/* harmony import */ var qb_ai_answer_assistant__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(qb_ai_answer_assistant__WEBPACK_IMPORTED_MODULE_0__);\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n// eslint-disable-next-line import/extensions\n\nvar AIAnswerAssistUseCase = /** @class */ (function () {\n function AIAnswerAssistUseCase(textToSend, dialogMessages, servername, api, port, sessionToken, openAIModel) {\n if (openAIModel === void 0) { openAIModel = 'gpt-3.5-turbo'; }\n console.log('CONSTRUCTOR AIRephraseUseCase');\n this.api = api;\n this.openAIModel = openAIModel;\n this.port = port;\n this.sessionToken = sessionToken;\n this.textToSend = textToSend;\n this.servername = servername;\n this.dialogMessages = dialogMessages;\n }\n AIAnswerAssistUseCase.prototype.execute = function () {\n return __awaiter(this, void 0, void 0, function () {\n var settings;\n return __generator(this, function (_a) {\n console.log('execute AIRephraseUseCase');\n settings = qb_ai_answer_assistant__WEBPACK_IMPORTED_MODULE_0__.QBAIAnswerAssistant.createDefaultAIAnswerAssistantSettings();\n settings.apiKey = this.sessionToken;\n // settings.organization = 'Quickblox';\n settings.model = this.openAIModel;\n return [2 /*return*/, qb_ai_answer_assistant__WEBPACK_IMPORTED_MODULE_0__.QBAIAnswerAssistant.createAnswer(this.textToSend, this.dialogMessages, settings)];\n });\n });\n };\n return AIAnswerAssistUseCase;\n}());\n\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Domain/use_cases/ai/AIAnswerAssistUseCase.ts?");
|
|
1841
|
+
|
|
1842
|
+
/***/ }),
|
|
1843
|
+
|
|
1844
|
+
/***/ "./src/Domain/use_cases/ai/AIAnswerAssistWithProxyUseCase.ts":
|
|
1845
|
+
/*!*******************************************************************!*\
|
|
1846
|
+
!*** ./src/Domain/use_cases/ai/AIAnswerAssistWithProxyUseCase.ts ***!
|
|
1847
|
+
\*******************************************************************/
|
|
1848
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1849
|
+
|
|
1850
|
+
"use strict";
|
|
1851
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AIAnswerAssistWithProxyUseCase\": function() { return /* binding */ AIAnswerAssistWithProxyUseCase; }\n/* harmony export */ });\n/* harmony import */ var qb_ai_answer_assistant__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! qb-ai-answer-assistant */ \"./node_modules/qb-ai-answer-assistant/dist/index.js\");\n/* harmony import */ var qb_ai_answer_assistant__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(qb_ai_answer_assistant__WEBPACK_IMPORTED_MODULE_0__);\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n// eslint-disable-next-line import/extensions\n\nvar AIAnswerAssistWithProxyUseCase = /** @class */ (function () {\n function AIAnswerAssistWithProxyUseCase(textToSend, dialogMessages, servername, api, port, sessionToken, openAIModel) {\n if (openAIModel === void 0) { openAIModel = 'gpt-3.5-turbo'; }\n console.log('CONSTRUCTOR AIRephraseUseCase');\n this.api = api;\n this.openAIModel = openAIModel;\n this.port = port;\n this.sessionToken = sessionToken;\n this.textToSend = textToSend;\n this.servername = servername;\n this.dialogMessages = dialogMessages;\n }\n AIAnswerAssistWithProxyUseCase.prototype.execute = function () {\n return __awaiter(this, void 0, void 0, function () {\n var settings;\n return __generator(this, function (_a) {\n console.log('execute AIRephraseUseCase');\n settings = qb_ai_answer_assistant__WEBPACK_IMPORTED_MODULE_0__.QBAIAnswerAssistant.createDefaultAIAnswerAssistantSettings();\n settings.token = this.sessionToken;\n // settings.organization = 'Quickblox';\n settings.model = this.openAIModel;\n settings.serverPath = \"\".concat(this.servername, \":\").concat(this.port, \"/\").concat(this.api);\n return [2 /*return*/, qb_ai_answer_assistant__WEBPACK_IMPORTED_MODULE_0__.QBAIAnswerAssistant.createAnswer(this.textToSend, this.dialogMessages, settings)];\n });\n });\n };\n return AIAnswerAssistWithProxyUseCase;\n}());\n\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Domain/use_cases/ai/AIAnswerAssistWithProxyUseCase.ts?");
|
|
1852
|
+
|
|
1853
|
+
/***/ }),
|
|
1854
|
+
|
|
1671
1855
|
/***/ "./src/Domain/use_cases/ai/AIRephraseUseCase.ts":
|
|
1672
1856
|
/*!******************************************************!*\
|
|
1673
1857
|
!*** ./src/Domain/use_cases/ai/AIRephraseUseCase.ts ***!
|
|
@@ -1675,7 +1859,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
1675
1859
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1676
1860
|
|
|
1677
1861
|
"use strict";
|
|
1678
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AIRephraseUseCase\": function() { return /* binding */ AIRephraseUseCase; }\n/* harmony export */ });\n/* harmony import */ var
|
|
1862
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AIRephraseUseCase\": function() { return /* binding */ AIRephraseUseCase; }\n/* harmony export */ });\n/* harmony import */ var qb_ai_rephrase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! qb-ai-rephrase */ \"./node_modules/qb-ai-rephrase/dist/index.js\");\n/* harmony import */ var qb_ai_rephrase__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(qb_ai_rephrase__WEBPACK_IMPORTED_MODULE_0__);\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n// eslint-disable-next-line import/extensions\n\nvar AIRephraseUseCase = /** @class */ (function () {\n function AIRephraseUseCase(textToSend, tone, dialogMessages, servername, api, port, sessionToken, openAIModel) {\n if (openAIModel === void 0) { openAIModel = 'gpt-3.5-turbo'; }\n console.log('CONSTRUCTOR AIRephraseUseCase');\n this.api = api;\n this.openAIModel = openAIModel;\n this.port = port;\n this.sessionToken = sessionToken;\n this.textToSend = textToSend;\n this.tone = tone;\n this.servername = servername;\n this.dialogMessages = dialogMessages;\n }\n AIRephraseUseCase.prototype.execute = function () {\n return __awaiter(this, void 0, void 0, function () {\n var settings;\n return __generator(this, function (_a) {\n console.log('execute AIRephraseUseCase');\n settings = qb_ai_rephrase__WEBPACK_IMPORTED_MODULE_0__.QBAIRephrase.createDefaultAIRephraseSettings();\n settings.apiKey = this.sessionToken;\n // settings.organization = 'Quickblox';\n settings.model = this.openAIModel;\n settings.tone = this.tone;\n return [2 /*return*/, qb_ai_rephrase__WEBPACK_IMPORTED_MODULE_0__.QBAIRephrase.rephrase(this.textToSend, this.dialogMessages, settings)];\n });\n });\n };\n return AIRephraseUseCase;\n}());\n\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Domain/use_cases/ai/AIRephraseUseCase.ts?");
|
|
1679
1863
|
|
|
1680
1864
|
/***/ }),
|
|
1681
1865
|
|
|
@@ -1686,7 +1870,29 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
1686
1870
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1687
1871
|
|
|
1688
1872
|
"use strict";
|
|
1689
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AIRephraseWithProxyUseCase\": function() { return /* binding */ AIRephraseWithProxyUseCase; }\n/* harmony export */ });\n/* harmony import */ var
|
|
1873
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AIRephraseWithProxyUseCase\": function() { return /* binding */ AIRephraseWithProxyUseCase; }\n/* harmony export */ });\n/* harmony import */ var qb_ai_rephrase__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! qb-ai-rephrase */ \"./node_modules/qb-ai-rephrase/dist/index.js\");\n/* harmony import */ var qb_ai_rephrase__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(qb_ai_rephrase__WEBPACK_IMPORTED_MODULE_0__);\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n// eslint-disable-next-line import/extensions\n\nvar AIRephraseWithProxyUseCase = /** @class */ (function () {\n function AIRephraseWithProxyUseCase(textToSend, tone, dialogMessages, servername, api, port, sessionToken, openAIModel) {\n if (openAIModel === void 0) { openAIModel = 'gpt-3.5-turbo'; }\n console.log('CONSTRUCTOR AIRephraseUseCase');\n this.api = api;\n this.openAIModel = openAIModel;\n this.port = port;\n this.sessionToken = sessionToken;\n this.textToSend = textToSend;\n this.tone = tone;\n this.servername = servername;\n this.dialogMessages = dialogMessages;\n }\n AIRephraseWithProxyUseCase.prototype.execute = function () {\n return __awaiter(this, void 0, void 0, function () {\n var settings;\n return __generator(this, function (_a) {\n console.log('execute AIRephraseUseCase');\n settings = qb_ai_rephrase__WEBPACK_IMPORTED_MODULE_0__.QBAIRephrase.createDefaultAIRephraseSettings();\n settings.token = this.sessionToken;\n // settings.organization = 'Quickblox';\n settings.model = this.openAIModel;\n settings.tone = this.tone;\n settings.serverPath = \"\".concat(this.servername, \":\").concat(this.port, \"/\").concat(this.api);\n return [2 /*return*/, qb_ai_rephrase__WEBPACK_IMPORTED_MODULE_0__.QBAIRephrase.rephrase(this.textToSend, this.dialogMessages, settings)];\n });\n });\n };\n return AIRephraseWithProxyUseCase;\n}());\n\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Domain/use_cases/ai/AIRephraseWithProxyUseCase.ts?");
|
|
1874
|
+
|
|
1875
|
+
/***/ }),
|
|
1876
|
+
|
|
1877
|
+
/***/ "./src/Domain/use_cases/ai/AITranslateUseCase.ts":
|
|
1878
|
+
/*!*******************************************************!*\
|
|
1879
|
+
!*** ./src/Domain/use_cases/ai/AITranslateUseCase.ts ***!
|
|
1880
|
+
\*******************************************************/
|
|
1881
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1882
|
+
|
|
1883
|
+
"use strict";
|
|
1884
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AITranslateUseCase\": function() { return /* binding */ AITranslateUseCase; }\n/* harmony export */ });\n/* harmony import */ var qb_ai_translate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! qb-ai-translate */ \"./node_modules/qb-ai-translate/dist/index.js\");\n/* harmony import */ var qb_ai_translate__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(qb_ai_translate__WEBPACK_IMPORTED_MODULE_0__);\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n\nvar AITranslateUseCase = /** @class */ (function () {\n function AITranslateUseCase(textToSend, language, dialogMessages, servername, api, port, sessionToken, openAIModel) {\n if (openAIModel === void 0) { openAIModel = 'gpt-3.5-turbo'; }\n console.log('CONSTRUCTOR AIRephraseUseCase');\n this.api = api;\n this.openAIModel = openAIModel;\n this.port = port;\n this.sessionToken = sessionToken;\n this.textToSend = textToSend;\n this.language = language;\n this.servername = servername;\n this.dialogMessages = dialogMessages;\n }\n AITranslateUseCase.prototype.execute = function () {\n return __awaiter(this, void 0, void 0, function () {\n var settings;\n return __generator(this, function (_a) {\n console.log('execute AIRephraseUseCase');\n settings = \n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n qb_ai_translate__WEBPACK_IMPORTED_MODULE_0__.QBAITranslate.createDefaultAITranslateSettings();\n settings.apiKey = this.sessionToken;\n // settings.organization = 'Quickblox';\n settings.model = this.openAIModel;\n settings.language = this.language;\n return [2 /*return*/, qb_ai_translate__WEBPACK_IMPORTED_MODULE_0__.QBAITranslate.translate(this.textToSend, this.dialogMessages, settings)];\n });\n });\n };\n return AITranslateUseCase;\n}());\n\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Domain/use_cases/ai/AITranslateUseCase.ts?");
|
|
1885
|
+
|
|
1886
|
+
/***/ }),
|
|
1887
|
+
|
|
1888
|
+
/***/ "./src/Domain/use_cases/ai/AITranslateWithProxyUseCase.ts":
|
|
1889
|
+
/*!****************************************************************!*\
|
|
1890
|
+
!*** ./src/Domain/use_cases/ai/AITranslateWithProxyUseCase.ts ***!
|
|
1891
|
+
\****************************************************************/
|
|
1892
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1893
|
+
|
|
1894
|
+
"use strict";
|
|
1895
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AITranslateWithProxyUseCase\": function() { return /* binding */ AITranslateWithProxyUseCase; }\n/* harmony export */ });\n/* harmony import */ var qb_ai_translate__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! qb-ai-translate */ \"./node_modules/qb-ai-translate/dist/index.js\");\n/* harmony import */ var qb_ai_translate__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(qb_ai_translate__WEBPACK_IMPORTED_MODULE_0__);\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n// eslint-disable-next-line import/extensions\n\nvar AITranslateWithProxyUseCase = /** @class */ (function () {\n function AITranslateWithProxyUseCase(textToSend, language, dialogMessages, servername, api, port, sessionToken, openAIModel) {\n if (openAIModel === void 0) { openAIModel = 'gpt-3.5-turbo'; }\n console.log('CONSTRUCTOR AIRephraseUseCase');\n this.api = api;\n this.openAIModel = openAIModel;\n this.port = port;\n this.sessionToken = sessionToken;\n this.textToSend = textToSend;\n this.language = language;\n this.servername = servername;\n this.dialogMessages = dialogMessages;\n }\n AITranslateWithProxyUseCase.prototype.execute = function () {\n return __awaiter(this, void 0, void 0, function () {\n var settings;\n return __generator(this, function (_a) {\n console.log('execute AIRephraseUseCase');\n settings = \n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n qb_ai_translate__WEBPACK_IMPORTED_MODULE_0__.QBAITranslate.createDefaultAITranslateSettings();\n settings.token = this.sessionToken;\n // settings.organization = 'Quickblox';\n settings.model = this.openAIModel;\n settings.language = this.language;\n settings.serverPath = \"\".concat(this.servername, \":\").concat(this.port, \"/\").concat(this.api);\n return [2 /*return*/, qb_ai_translate__WEBPACK_IMPORTED_MODULE_0__.QBAITranslate.translate(this.textToSend, this.dialogMessages, settings)];\n });\n });\n };\n return AITranslateWithProxyUseCase;\n}());\n\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Domain/use_cases/ai/AITranslateWithProxyUseCase.ts?");
|
|
1690
1896
|
|
|
1691
1897
|
/***/ }),
|
|
1692
1898
|
|
|
@@ -1741,7 +1947,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var reac
|
|
|
1741
1947
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1742
1948
|
|
|
1743
1949
|
"use strict";
|
|
1744
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _Dialogs_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Dialogs.scss */ \"./src/Presentation/Views/Dialogs/Dialogs.scss\");\n/* harmony import */ var _components_containers_ColumnContainer_ColumnContainer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../components/containers/ColumnContainer/ColumnContainer */ \"./src/Presentation/components/containers/ColumnContainer/ColumnContainer.tsx\");\n/* harmony import */ var _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../Domain/entity/DialogTypes */ \"./src/Domain/entity/DialogTypes.ts\");\n/* harmony import */ var _components_UI_Dialogs_PreviewDialog_PreviewDialogViewModel__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../components/UI/Dialogs/PreviewDialog/PreviewDialogViewModel */ \"./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDialogViewModel.ts\");\n/* harmony import */ var _components_UI_Dialogs_PreviewDialog_PreviewDialog__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../components/UI/Dialogs/PreviewDialog/PreviewDialog */ \"./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDialog.tsx\");\n/* harmony import */ var _components_UI_Placeholders_LoaderComponent_LoaderComponent__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../components/UI/Placeholders/LoaderComponent/LoaderComponent */ \"./src/Presentation/components/UI/Placeholders/LoaderComponent/LoaderComponent.tsx\");\n/* harmony import */ var _components_UI_Placeholders_ErrorComponent_ErrorComponent__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../components/UI/Placeholders/ErrorComponent/ErrorComponent */ \"./src/Presentation/components/UI/Placeholders/ErrorComponent/ErrorComponent.tsx\");\n/* harmony import */ var _components_UI_Dialogs_HeaderDialogs_HeaderDialogs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../components/UI/Dialogs/HeaderDialogs/HeaderDialogs */ \"./src/Presentation/components/UI/Dialogs/HeaderDialogs/HeaderDialogs.tsx\");\n/* harmony import */ var _components_providers_ModalContextProvider_Modal__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../components/providers/ModalContextProvider/Modal */ \"./src/Presentation/components/providers/ModalContextProvider/Modal.tsx\");\n/* harmony import */ var _CreateDialogFlow_CreateNewDialogFlow__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../CreateDialogFlow/CreateNewDialogFlow */ \"./src/Presentation/Views/CreateDialogFlow/CreateNewDialogFlow.tsx\");\n/* harmony import */ var _utils_DateTimeFormatter__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../utils/DateTimeFormatter */ \"./src/utils/DateTimeFormatter.ts\");\n/* harmony import */ var _components_UI_svgs_Icons_Navigation_Search__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/UI/svgs/Icons/Navigation/Search */ \"./src/Presentation/components/UI/svgs/Icons/Navigation/Search/index.tsx\");\n/* harmony import */ var _components_UI_svgs_Icons_Actions_Remove__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/UI/svgs/Icons/Actions/Remove */ \"./src/Presentation/components/UI/svgs/Icons/Actions/Remove/index.tsx\");\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// eslint-disable-next-line react/function-component-definition\nvar DialogsComponent = function (_a) {\n var header = _a.header, subHeaderContent = _a.subHeaderContent, upHeaderContent = _a.upHeaderContent, onDialogSelectHandler = _a.onDialogSelectHandler, dialogsViewModel = _a.dialogsViewModel, _b = _a.additionalSettings, additionalSettings = _b === void 0 ? undefined : _b;\n var dialogs = [];\n var _c = react__WEBPACK_IMPORTED_MODULE_1___default().useState([]), dialogsToView = _c[0], setDialogsToView = _c[1];\n var _d = react__WEBPACK_IMPORTED_MODULE_1___default().useState({ selectedIndex: undefined, item: undefined }), selectedItem = _d[0], setSelectedItem = _d[1];\n var _e = react__WEBPACK_IMPORTED_MODULE_1___default().useState(false), showSearchDialogs = _e[0], setShowSearchDialogs = _e[1];\n var _f = react__WEBPACK_IMPORTED_MODULE_1___default().useState(''), nameDialogForSearch = _f[0], setNameDialogForSearch = _f[1];\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n console.log('USE EFFECT DIALOG LIST HAS CHANGED');\n console.log(JSON.stringify(dialogsViewModel === null || dialogsViewModel === void 0 ? void 0 : dialogsViewModel.dialogs));\n dialogs.slice(0);\n dialogsViewModel === null || dialogsViewModel === void 0 ? void 0 : dialogsViewModel.dialogs.forEach(function (entiy, index) {\n var pw = new _components_UI_Dialogs_PreviewDialog_PreviewDialogViewModel__WEBPACK_IMPORTED_MODULE_5__[\"default\"](function (it) {\n if (onDialogSelectHandler) {\n setSelectedItem({ selectedIndex: index, item: it });\n onDialogSelectHandler(it);\n }\n }, function (it) {\n if (onDialogSelectHandler) {\n setSelectedItem({ selectedIndex: index, item: it });\n onDialogSelectHandler(it);\n }\n }, \n // Number(entiy.id),\n // entiy.name,\n entiy);\n if (selectedItem && selectedItem.selectedIndex === index) {\n pw.isSelected = true;\n }\n dialogs.push(pw);\n });\n setDialogsToView(dialogs);\n }, [dialogsViewModel === null || dialogsViewModel === void 0 ? void 0 : dialogsViewModel.dialogs]);\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n var fetchMoreData = function () {\n var _a;\n console.log('call fetchMoreData with: pagination: ', JSON.stringify(dialogsViewModel === null || dialogsViewModel === void 0 ? void 0 : dialogsViewModel.pagination), 'View length: ', dialogsToView.length, 'Model length: ', dialogsViewModel === null || dialogsViewModel === void 0 ? void 0 : dialogsViewModel.dialogs.length);\n if ((dialogsViewModel === null || dialogsViewModel === void 0 ? void 0 : dialogsViewModel.dialogs.length) === dialogsToView.length &&\n ((_a = dialogsViewModel === null || dialogsViewModel === void 0 ? void 0 : dialogsViewModel.pagination) === null || _a === void 0 ? void 0 : _a.hasNextPage())) {\n // setDialogsToView((prevState) => {\n // const newState = [...prevState];\n //\n // const newDialogEntity: DialogEntity =\n // dialogsViewModel?.dialogs[prevState.length];\n //\n // newState.push(newDialogEntity);\n //\n // return newState;\n // });\n var newPagination = dialogsViewModel === null || dialogsViewModel === void 0 ? void 0 : dialogsViewModel.pagination;\n newPagination.perPage = 6;\n newPagination.nextPage(); // curPage + 1\n console.log('call fetchMoreData with: pagination: ', JSON.stringify(newPagination), 'View length: ', dialogsToView.length, 'Model length: ', dialogsViewModel === null || dialogsViewModel === void 0 ? void 0 : dialogsViewModel.dialogs.length);\n // eslint-disable-next-line @typescript-eslint/await-thenable\n dialogsViewModel === null || dialogsViewModel === void 0 ? void 0 : dialogsViewModel.getDialogs(newPagination);\n }\n };\n // useEffect(() => {\n // const firstPagination = new Pagination(1, 1000);\n //\n // console.log(\n // 'useEffect DialogsComponent, getDialogs(): ',\n // JSON.stringify(firstPagination),\n // );\n // dialogsViewModel?.getDialogs(firstPagination);\n // }, []);\n var handleModal = react__WEBPACK_IMPORTED_MODULE_1___default().useContext(_components_providers_ModalContextProvider_Modal__WEBPACK_IMPORTED_MODULE_10__.ModalContext).handleModal;\n var useHeader = !(additionalSettings === null || additionalSettings === void 0 ? void 0 : additionalSettings.withoutHeader) || header || false;\n var useSubContent = (additionalSettings === null || additionalSettings === void 0 ? void 0 : additionalSettings.useSubHeader) || subHeaderContent || false;\n var useUpContent = (additionalSettings === null || additionalSettings === void 0 ? void 0 : additionalSettings.useUpHeader) || upHeaderContent || false;\n var HeaderContent = header || ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_UI_Dialogs_HeaderDialogs_HeaderDialogs__WEBPACK_IMPORTED_MODULE_9__[\"default\"], { title: \"Dialogs\", clickSearchHandler: function () {\n setShowSearchDialogs(!showSearchDialogs);\n setNameDialogForSearch('');\n }, ClickActionHandler: function () {\n handleModal(true, (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_CreateDialogFlow_CreateNewDialogFlow__WEBPACK_IMPORTED_MODULE_11__[\"default\"], { dialogsViewModel: dialogsViewModel }), 'New dialog', false, false, {\n minHeight: '200px',\n minWidth: '380px',\n maxWidth: '380px',\n backgroundColor: 'var(--main-background)',\n // border: '3px solid red',\n });\n }, theme: additionalSettings === null || additionalSettings === void 0 ? void 0 : additionalSettings.themeHeader }));\n var renderPreviewDialog = function (item, index) {\n var _a;\n function getMessageDateTimeSent() {\n var dateInt = 0;\n var formattedValue = '';\n if (item.entity.lastMessage.dateSent) {\n dateInt = parseInt(item.entity.lastMessage.dateSent, 10);\n if (Number.isNaN(dateInt)) {\n return formattedValue;\n }\n formattedValue = (0,_utils_DateTimeFormatter__WEBPACK_IMPORTED_MODULE_12__.getTimeShort24hFormat)(dateInt * 1000);\n }\n return formattedValue;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n function isMute(entity) {\n return false;\n }\n var getDialogAvatar = function (currentDialog) {\n var AvatarComponent;\n if (currentDialog.entity.type === _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_4__.DialogType.group ||\n currentDialog.entity.type === _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_4__.DialogType[\"public\"]) {\n var imagePhoto = currentDialog.entity.photo;\n console.log('Dialogs: avatar: ', imagePhoto || 'NO FOTO');\n AvatarComponent = imagePhoto ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"img\", { style: { width: '55px', height: '55px', borderRadius: '50%' }, src: imagePhoto })) : undefined;\n }\n return AvatarComponent;\n };\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ onClick: function () {\n setDialogsToView(function (prevState) {\n var newState = __spreadArray([], prevState, true);\n if (selectedItem && selectedItem.selectedIndex) {\n newState[selectedItem.selectedIndex].isSelected = false;\n }\n newState[index].isSelected = true;\n return newState;\n });\n } }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_UI_Dialogs_PreviewDialog_PreviewDialog__WEBPACK_IMPORTED_MODULE_6__[\"default\"], { typeDialog: ((_a = item === null || item === void 0 ? void 0 : item.entity) === null || _a === void 0 ? void 0 : _a.type) || _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_4__.DialogType.group, dialogViewModel: item, theme: {\n themeName: (additionalSettings === null || additionalSettings === void 0 ? void 0 : additionalSettings.themeName) === 'dark' ? 'dark' : 'light',\n selected: item.isSelected,\n muted: isMute(item.entity),\n colorTheme: additionalSettings === null || additionalSettings === void 0 ? void 0 : additionalSettings.themePreview,\n }, title: \"\".concat(item.entity.name || ''), unreadMessageCount: item.entity.unreadMessageCount > 0\n ? item.entity.unreadMessageCount\n : undefined, message_date_time_sent: getMessageDateTimeSent(), previewMessage: item.entity.lastMessage.text, dialogAvatar: getDialogAvatar(item) }) }), index));\n };\n var loaderTheme = {\n color: 'var(--color-background-info)',\n width: '44',\n height: '44',\n };\n var renderSearchDialogs = function () {\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ className: \"search-dialog-name-input\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_UI_svgs_Icons_Navigation_Search__WEBPACK_IMPORTED_MODULE_13__[\"default\"], { applyZoom: true, width: \"24\", height: \"24\", color: \"var(--tertiary-elements)\" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"input\", { type: \"text\", style: { width: '268px' }, value: nameDialogForSearch, onChange: function (event) {\n setNameDialogForSearch(event.target.value);\n }, placeholder: \"Search\" }), nameDialogForSearch.length > 0 ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: { cursor: 'pointer' }, onClick: function () {\n setNameDialogForSearch('');\n } }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_UI_svgs_Icons_Actions_Remove__WEBPACK_IMPORTED_MODULE_14__[\"default\"], { width: \"24\", height: \"24\", color: \"var(--tertiary-elements)\" }) }))) : null] })));\n };\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: {\n minHeight: '800px',\n minWidth: '322px',\n border: '1px solid var(--divider)',\n } }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components_containers_ColumnContainer_ColumnContainer__WEBPACK_IMPORTED_MODULE_3__[\"default\"], { children: [useUpContent && upHeaderContent, useHeader && HeaderContent, useSubContent && subHeaderContent, (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ className: \"scroll-box\" }, { children: [(dialogsViewModel === null || dialogsViewModel === void 0 ? void 0 : dialogsViewModel.loading) && (\n // <div style={{ maxHeight: '44px', minHeight: '44px', height: '44px' }}>\n // <LoaderComponent width=\"44\" height=\"44\" color=\"var(--divider)\" />\n // </div>\n (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n } }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: {\n height: '44px',\n width: '44px',\n } }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_UI_Placeholders_LoaderComponent_LoaderComponent__WEBPACK_IMPORTED_MODULE_7__[\"default\"], { width: loaderTheme.width, height: loaderTheme.height, color: loaderTheme.color }) })) }))), (dialogsViewModel === null || dialogsViewModel === void 0 ? void 0 : dialogsViewModel.error) && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_UI_Placeholders_ErrorComponent_ErrorComponent__WEBPACK_IMPORTED_MODULE_8__[\"default\"], { title: \"Something is wrong.\", ClickActionHandler: function () {\n alert('call click retry');\n } })), showSearchDialogs ? renderSearchDialogs() : null, nameDialogForSearch.length > 0 &&\n dialogsToView\n .filter(function (item) {\n return item.entity.name\n .toUpperCase()\n .includes(nameDialogForSearch.toUpperCase(), 0);\n })\n .map(function (item, index) { return renderPreviewDialog(item, index); }), nameDialogForSearch.length === 0 &&\n (dialogsToView && dialogsToView.length) > 0 &&\n dialogsToView.map(function (item, index) {\n return renderPreviewDialog(item, index);\n })] }))] }) })));\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (DialogsComponent);\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/Views/Dialogs/Dialogs.tsx?");
|
|
1950
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _Dialogs_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Dialogs.scss */ \"./src/Presentation/Views/Dialogs/Dialogs.scss\");\n/* harmony import */ var _components_containers_ColumnContainer_ColumnContainer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../components/containers/ColumnContainer/ColumnContainer */ \"./src/Presentation/components/containers/ColumnContainer/ColumnContainer.tsx\");\n/* harmony import */ var _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../Domain/entity/DialogTypes */ \"./src/Domain/entity/DialogTypes.ts\");\n/* harmony import */ var _components_UI_Dialogs_PreviewDialog_PreviewDialogViewModel__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../components/UI/Dialogs/PreviewDialog/PreviewDialogViewModel */ \"./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDialogViewModel.ts\");\n/* harmony import */ var _components_UI_Dialogs_PreviewDialog_PreviewDialog__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../components/UI/Dialogs/PreviewDialog/PreviewDialog */ \"./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDialog.tsx\");\n/* harmony import */ var _components_UI_Placeholders_LoaderComponent_LoaderComponent__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../components/UI/Placeholders/LoaderComponent/LoaderComponent */ \"./src/Presentation/components/UI/Placeholders/LoaderComponent/LoaderComponent.tsx\");\n/* harmony import */ var _components_UI_Placeholders_ErrorComponent_ErrorComponent__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../components/UI/Placeholders/ErrorComponent/ErrorComponent */ \"./src/Presentation/components/UI/Placeholders/ErrorComponent/ErrorComponent.tsx\");\n/* harmony import */ var _components_UI_Dialogs_HeaderDialogs_HeaderDialogs__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../components/UI/Dialogs/HeaderDialogs/HeaderDialogs */ \"./src/Presentation/components/UI/Dialogs/HeaderDialogs/HeaderDialogs.tsx\");\n/* harmony import */ var _components_providers_ModalContextProvider_Modal__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../components/providers/ModalContextProvider/Modal */ \"./src/Presentation/components/providers/ModalContextProvider/Modal.tsx\");\n/* harmony import */ var _CreateDialogFlow_CreateNewDialogFlow__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../CreateDialogFlow/CreateNewDialogFlow */ \"./src/Presentation/Views/CreateDialogFlow/CreateNewDialogFlow.tsx\");\n/* harmony import */ var _utils_DateTimeFormatter__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../utils/DateTimeFormatter */ \"./src/utils/DateTimeFormatter.ts\");\n/* harmony import */ var _components_UI_svgs_Icons_Navigation_Search__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/UI/svgs/Icons/Navigation/Search */ \"./src/Presentation/components/UI/svgs/Icons/Navigation/Search/index.tsx\");\n/* harmony import */ var _components_UI_svgs_Icons_Actions_Remove__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/UI/svgs/Icons/Actions/Remove */ \"./src/Presentation/components/UI/svgs/Icons/Actions/Remove/index.tsx\");\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// eslint-disable-next-line react/function-component-definition\nvar DialogsComponent = function (_a) {\n var header = _a.header, subHeaderContent = _a.subHeaderContent, upHeaderContent = _a.upHeaderContent, onDialogSelectHandler = _a.onDialogSelectHandler, dialogsViewModel = _a.dialogsViewModel, _b = _a.additionalSettings, additionalSettings = _b === void 0 ? undefined : _b;\n var dialogs = [];\n var _c = react__WEBPACK_IMPORTED_MODULE_1___default().useState([]), dialogsToView = _c[0], setDialogsToView = _c[1];\n var _d = react__WEBPACK_IMPORTED_MODULE_1___default().useState({ selectedIndex: undefined, item: undefined }), selectedItem = _d[0], setSelectedItem = _d[1];\n var _e = react__WEBPACK_IMPORTED_MODULE_1___default().useState(false), showSearchDialogs = _e[0], setShowSearchDialogs = _e[1];\n var _f = react__WEBPACK_IMPORTED_MODULE_1___default().useState(''), nameDialogForSearch = _f[0], setNameDialogForSearch = _f[1];\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n console.log('USE EFFECT DIALOG LIST HAS CHANGED');\n console.log(JSON.stringify(dialogsViewModel === null || dialogsViewModel === void 0 ? void 0 : dialogsViewModel.dialogs));\n dialogs.slice(0);\n dialogsViewModel === null || dialogsViewModel === void 0 ? void 0 : dialogsViewModel.dialogs.forEach(function (entiy, index) {\n var pw = new _components_UI_Dialogs_PreviewDialog_PreviewDialogViewModel__WEBPACK_IMPORTED_MODULE_5__[\"default\"](function (it) {\n if (onDialogSelectHandler) {\n setSelectedItem({ selectedIndex: index, item: it });\n onDialogSelectHandler(it);\n }\n }, function (it) {\n if (onDialogSelectHandler) {\n setSelectedItem({ selectedIndex: index, item: it });\n onDialogSelectHandler(it);\n }\n }, \n // Number(entiy.id),\n // entiy.name,\n entiy);\n if (selectedItem && selectedItem.selectedIndex === index) {\n pw.isSelected = true;\n }\n dialogs.push(pw);\n });\n setDialogsToView(dialogs);\n }, [dialogsViewModel === null || dialogsViewModel === void 0 ? void 0 : dialogsViewModel.dialogs]);\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n var fetchMoreData = function () {\n var _a;\n console.log('call fetchMoreData with: pagination: ', JSON.stringify(dialogsViewModel === null || dialogsViewModel === void 0 ? void 0 : dialogsViewModel.pagination), 'View length: ', dialogsToView.length, 'Model length: ', dialogsViewModel === null || dialogsViewModel === void 0 ? void 0 : dialogsViewModel.dialogs.length);\n if ((dialogsViewModel === null || dialogsViewModel === void 0 ? void 0 : dialogsViewModel.dialogs.length) === dialogsToView.length &&\n ((_a = dialogsViewModel === null || dialogsViewModel === void 0 ? void 0 : dialogsViewModel.pagination) === null || _a === void 0 ? void 0 : _a.hasNextPage())) {\n // setDialogsToView((prevState) => {\n // const newState = [...prevState];\n //\n // const newDialogEntity: DialogEntity =\n // dialogsViewModel?.dialogs[prevState.length];\n //\n // newState.push(newDialogEntity);\n //\n // return newState;\n // });\n var newPagination = dialogsViewModel === null || dialogsViewModel === void 0 ? void 0 : dialogsViewModel.pagination;\n newPagination.perPage = 6;\n newPagination.nextPage(); // curPage + 1\n console.log('call fetchMoreData with: pagination: ', JSON.stringify(newPagination), 'View length: ', dialogsToView.length, 'Model length: ', dialogsViewModel === null || dialogsViewModel === void 0 ? void 0 : dialogsViewModel.dialogs.length);\n // eslint-disable-next-line @typescript-eslint/await-thenable\n dialogsViewModel === null || dialogsViewModel === void 0 ? void 0 : dialogsViewModel.getDialogs(newPagination);\n }\n };\n // useEffect(() => {\n // const firstPagination = new Pagination(1, 1000);\n //\n // console.log(\n // 'useEffect DialogsComponent, getDialogs(): ',\n // JSON.stringify(firstPagination),\n // );\n // dialogsViewModel?.getDialogs(firstPagination);\n // }, []);\n var handleModal = react__WEBPACK_IMPORTED_MODULE_1___default().useContext(_components_providers_ModalContextProvider_Modal__WEBPACK_IMPORTED_MODULE_10__.ModalContext).handleModal;\n var useHeader = !(additionalSettings === null || additionalSettings === void 0 ? void 0 : additionalSettings.withoutHeader) || header || false;\n var useSubContent = (additionalSettings === null || additionalSettings === void 0 ? void 0 : additionalSettings.useSubHeader) || subHeaderContent || false;\n var useUpContent = (additionalSettings === null || additionalSettings === void 0 ? void 0 : additionalSettings.useUpHeader) || upHeaderContent || false;\n var HeaderContent = header || ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_UI_Dialogs_HeaderDialogs_HeaderDialogs__WEBPACK_IMPORTED_MODULE_9__[\"default\"], { title: \"Dialogs\", clickSearchHandler: function () {\n setShowSearchDialogs(!showSearchDialogs);\n setNameDialogForSearch('');\n }, ClickActionHandler: function () {\n handleModal(true, (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_CreateDialogFlow_CreateNewDialogFlow__WEBPACK_IMPORTED_MODULE_11__[\"default\"], { dialogsViewModel: dialogsViewModel }), 'New dialog', false, false, {\n minHeight: '200px',\n minWidth: '380px',\n maxWidth: '380px',\n backgroundColor: 'var(--main-background)',\n // border: '3px solid red',\n });\n }, theme: additionalSettings === null || additionalSettings === void 0 ? void 0 : additionalSettings.themeHeader }));\n var renderPreviewDialog = function (item, index) {\n var _a;\n function getMessageDateTimeSent() {\n var dateInt = 0;\n var formattedValue = '';\n if (item.entity.lastMessage.dateSent) {\n dateInt = parseInt(item.entity.lastMessage.dateSent, 10);\n if (Number.isNaN(dateInt)) {\n return formattedValue;\n }\n formattedValue = (0,_utils_DateTimeFormatter__WEBPACK_IMPORTED_MODULE_12__.getTimeShort24hFormat)(dateInt * 1000);\n }\n return formattedValue;\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n function isMute(entity) {\n return false;\n }\n var getDialogAvatar = function (currentDialog) {\n var AvatarComponent;\n if (currentDialog.entity.type === _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_4__.DialogType.group ||\n currentDialog.entity.type === _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_4__.DialogType[\"public\"]) {\n var imagePhoto = currentDialog.entity.photo;\n // console.log('Dialogs: avatar: ', imagePhoto || 'NO FOTO');\n AvatarComponent = imagePhoto ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"img\", { style: { width: '55px', height: '55px', borderRadius: '50%' }, src: imagePhoto })) : undefined;\n }\n return AvatarComponent;\n };\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ onClick: function () {\n setDialogsToView(function (prevState) {\n var newState = __spreadArray([], prevState, true);\n if (selectedItem && selectedItem.selectedIndex) {\n newState[selectedItem.selectedIndex].isSelected = false;\n }\n newState[index].isSelected = true;\n return newState;\n });\n } }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_UI_Dialogs_PreviewDialog_PreviewDialog__WEBPACK_IMPORTED_MODULE_6__[\"default\"], { typeDialog: ((_a = item === null || item === void 0 ? void 0 : item.entity) === null || _a === void 0 ? void 0 : _a.type) || _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_4__.DialogType.group, dialogViewModel: item, theme: {\n themeName: (additionalSettings === null || additionalSettings === void 0 ? void 0 : additionalSettings.themeName) === 'dark' ? 'dark' : 'light',\n selected: item.isSelected,\n muted: isMute(item.entity),\n colorTheme: additionalSettings === null || additionalSettings === void 0 ? void 0 : additionalSettings.themePreview,\n }, title: \"\".concat(item.entity.name || ''), unreadMessageCount: item.entity.unreadMessageCount > 0\n ? item.entity.unreadMessageCount\n : undefined, message_date_time_sent: getMessageDateTimeSent(), previewMessage: item.entity.lastMessage.text, dialogAvatar: getDialogAvatar(item) }) }), index));\n };\n var loaderTheme = {\n color: 'var(--color-background-info)',\n width: '44',\n height: '44',\n };\n var renderSearchDialogs = function () {\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ className: \"search-dialog-name-input\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_UI_svgs_Icons_Navigation_Search__WEBPACK_IMPORTED_MODULE_13__[\"default\"], { applyZoom: true, width: \"24\", height: \"24\", color: \"var(--tertiary-elements)\" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"input\", { type: \"text\", style: { width: '268px' }, value: nameDialogForSearch, onChange: function (event) {\n setNameDialogForSearch(event.target.value);\n }, placeholder: \"Search\" }), nameDialogForSearch.length > 0 ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: { cursor: 'pointer' }, onClick: function () {\n setNameDialogForSearch('');\n } }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_UI_svgs_Icons_Actions_Remove__WEBPACK_IMPORTED_MODULE_14__[\"default\"], { width: \"24\", height: \"24\", color: \"var(--tertiary-elements)\" }) }))) : null] })));\n };\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: {\n minHeight: '800px',\n minWidth: '322px',\n border: '1px solid var(--divider)',\n } }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_components_containers_ColumnContainer_ColumnContainer__WEBPACK_IMPORTED_MODULE_3__[\"default\"], { children: [useUpContent && upHeaderContent, useHeader && HeaderContent, useSubContent && subHeaderContent, (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ className: \"scroll-box\" }, { children: [(dialogsViewModel === null || dialogsViewModel === void 0 ? void 0 : dialogsViewModel.loading) && (\n // <div style={{ maxHeight: '44px', minHeight: '44px', height: '44px' }}>\n // <LoaderComponent width=\"44\" height=\"44\" color=\"var(--divider)\" />\n // </div>\n (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n } }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: {\n height: '44px',\n width: '44px',\n } }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_UI_Placeholders_LoaderComponent_LoaderComponent__WEBPACK_IMPORTED_MODULE_7__[\"default\"], { width: loaderTheme.width, height: loaderTheme.height, color: loaderTheme.color }) })) }))), (dialogsViewModel === null || dialogsViewModel === void 0 ? void 0 : dialogsViewModel.error) && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_components_UI_Placeholders_ErrorComponent_ErrorComponent__WEBPACK_IMPORTED_MODULE_8__[\"default\"], { title: \"Something is wrong.\", ClickActionHandler: function () {\n alert('call click retry');\n } })), showSearchDialogs ? renderSearchDialogs() : null, nameDialogForSearch.length > 0 &&\n dialogsToView\n .filter(function (item) {\n return item.entity.name\n .toUpperCase()\n .includes(nameDialogForSearch.toUpperCase(), 0);\n })\n .map(function (item, index) { return renderPreviewDialog(item, index); }), nameDialogForSearch.length === 0 &&\n (dialogsToView && dialogsToView.length) > 0 &&\n dialogsToView.map(function (item, index) {\n return renderPreviewDialog(item, index);\n })] }))] }) })));\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (DialogsComponent);\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/Views/Dialogs/Dialogs.tsx?");
|
|
1745
1951
|
|
|
1746
1952
|
/***/ }),
|
|
1747
1953
|
|
|
@@ -1950,7 +2156,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var reac
|
|
|
1950
2156
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1951
2157
|
|
|
1952
2158
|
"use strict";
|
|
1953
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _AIWidgetActions_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AIWidgetActions.scss */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/AIWidgetActions/AIWidgetActions.scss\");\n/* harmony import */ var _svgs_Icons_Actions_EditDots__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../svgs/Icons/Actions/EditDots */ \"./src/Presentation/components/UI/svgs/Icons/Actions/EditDots/index.tsx\");\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\n\n\n\n\nvar ContextMenuStyles = {\n contextMenuIcon: {\n display: 'inline-block',\n position: 'relative',\n maxWidth: '42px',\n maxHeight: '42px',\n cursor: 'pointer',\n },\n contextMenuContent: {\n position: 'absolute',\n bottom: '10px',\n right: '0',\n backgroundColor: 'white',\n border: '1px solid gray',\n borderRadius: '8px',\n padding: '4px',\n zIndex: 1,\n width: 'max-content',\n },\n menuItemContainer: {\n display: 'flex',\n alignItems: 'center',\n padding: '4px',\n cursor: 'pointer',\n fontWeight: 'normal',\n },\n menuTitle: {\n padding: '4px',\n fontWeight: 'bold',\n },\n};\nfunction AIWidgetActions(_a) {\n var items = _a.items, widgetToRender = _a.widgetToRender, _b = _a.title, title = _b === void 0 ? null : _b;\n var
|
|
2159
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _AIWidgetActions_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./AIWidgetActions.scss */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/AIWidgetActions/AIWidgetActions.scss\");\n/* harmony import */ var _svgs_Icons_Actions_EditDots__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../svgs/Icons/Actions/EditDots */ \"./src/Presentation/components/UI/svgs/Icons/Actions/EditDots/index.tsx\");\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\n\n\n\n\nvar ContextMenuStyles = {\n contextMenuIcon: {\n display: 'inline-block',\n position: 'relative',\n maxWidth: '42px',\n maxHeight: '42px',\n // cursor: 'pointer',\n },\n contextMenuContent: {\n position: 'absolute',\n bottom: '10px',\n right: '0',\n backgroundColor: 'white',\n border: '1px solid gray',\n borderRadius: '8px',\n padding: '4px',\n zIndex: 1,\n width: 'max-content',\n },\n menuItemContainer: {\n display: 'flex',\n alignItems: 'center',\n padding: '4px',\n cursor: 'pointer',\n fontWeight: 'normal',\n },\n menuTitle: {\n padding: '4px',\n fontWeight: 'bold',\n },\n};\nfunction AIWidgetActions(_a) {\n var items = _a.items, widgetToRender = _a.widgetToRender, _b = _a.title, title = _b === void 0 ? null : _b, _c = _a.disabled, disabled = _c === void 0 ? true : _c;\n var _d = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false), menuVisible = _d[0], setMenuVisible = _d[1];\n var contextMenuRef = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)(null);\n var handleClick = function () {\n if (disabled)\n setMenuVisible(!menuVisible);\n };\n var handleMenuItemClick = function (action) {\n action();\n setMenuVisible(false);\n };\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n function handleClickOutside(event) {\n if (contextMenuRef.current &&\n !contextMenuRef.current.contains(event.target)) {\n setMenuVisible(false);\n }\n }\n document.addEventListener('mousedown', handleClickOutside);\n return function () {\n document.removeEventListener('mousedown', handleClickOutside);\n };\n }, []);\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ style: ContextMenuStyles.contextMenuIcon }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ onClick: handleClick }, { children: widgetToRender || (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Actions_EditDots__WEBPACK_IMPORTED_MODULE_3__[\"default\"], {}) })), menuVisible && (\n // <div ref={contextMenuRef} style={ContextMenuStyles.contextMenuContent}>\n (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ ref: contextMenuRef, className: \"dropdown-context-menu-tone\", style: { cursor: 'pointer' } }, { children: [title && (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: ContextMenuStyles.menuTitle }, { children: title })), items === null || items === void 0 ? void 0 : items.map(function (item, index) { return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ \n // style={ContextMenuStyles.menuItemContainer}\n className: \"dropdown-context-menu-tone-menu-item\", onClick: function () {\n handleMenuItemClick(item.action);\n } }, { children: [item.icon && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"dropdown-context-menu-tone-menu-item-icon\" }, { children: item.icon }))), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"dropdown-context-menu-tone-menu-item-title\" }, { children: item.title })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { className: \"dropdown-context-menu-tone-menu-item-icon\" })] }), index)); })] })))] })));\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (AIWidgetActions);\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/AIWidgetActions/AIWidgetActions.tsx?");
|
|
1954
2160
|
|
|
1955
2161
|
/***/ }),
|
|
1956
2162
|
|
|
@@ -1972,7 +2178,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var reac
|
|
|
1972
2178
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1973
2179
|
|
|
1974
2180
|
"use strict";
|
|
1975
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"
|
|
2181
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"stringToTone\": function() { return /* binding */ stringToTone; },\n/* harmony export */ \"toneToString\": function() { return /* binding */ toneToString; }\n/* harmony export */ });\n// export enum Tone {\n// Professional = 'Professional Tone',\n// Friendly = 'Friendly Tone',\n// Encouraging = 'Encouraging Tone',\n// Empathetic = 'Empathetic Tone',\n// Neutral = 'Neutral Tone',\n// Assertive = 'Assertive Tone',\n// Instructive = 'Instructive Tone',\n// Persuasive = 'Persuasive Tone',\n// Sarcastic = 'Sarcastic/Ironic Tone',\n// Poetic = 'Poetic Tone',\n// Unchanged = 'Unchanged',\n// }\nvar toneToString = function (tone) {\n return tone.name;\n};\nvar stringToTone = function (toneStr, description, emoji) {\n return {\n name: toneStr,\n description: description || '',\n iconEmoji: emoji || '',\n };\n};\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/Tone.ts?");
|
|
1976
2182
|
|
|
1977
2183
|
/***/ }),
|
|
1978
2184
|
|
|
@@ -1983,7 +2189,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
1983
2189
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1984
2190
|
|
|
1985
2191
|
"use strict";
|
|
1986
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ UseDefaultAIAssistAnswerWidget; }\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _svgs_Icons_AIWidgets_AIWidget__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../svgs/Icons/AIWidgets/AIWidget */ \"./src/Presentation/components/UI/svgs/Icons/AIWidgets/AIWidget/index.tsx\");\n/* harmony import */ var _ErrorMessageIcon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ErrorMessageIcon */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/ErrorMessageIcon.tsx\");\n/* harmony import */ var
|
|
2192
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ UseDefaultAIAssistAnswerWidget; }\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _svgs_Icons_AIWidgets_AIWidget__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../svgs/Icons/AIWidgets/AIWidget */ \"./src/Presentation/components/UI/svgs/Icons/AIWidgets/AIWidget/index.tsx\");\n/* harmony import */ var _ErrorMessageIcon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ErrorMessageIcon */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/ErrorMessageIcon.tsx\");\n/* harmony import */ var _Domain_use_cases_ai_AIAnswerAssistUseCase__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../../Domain/use_cases/ai/AIAnswerAssistUseCase */ \"./src/Domain/use_cases/ai/AIAnswerAssistUseCase.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n\n\n\n\n\n// interface MessageWidgetProps {\n// // https://api.openai.com/v1/chat/completions'\n// // api: 'v1/chat/completions',\n// // servername: 'https://myproxy.com',\n// // https://func270519800.azurewebsites.net/api/TranslateTextToEng\n// servername: string;\n// api: string;\n// port: string;\n// apiKeyOrSessionToken: string;\n// apiKey: string;\n// }\nfunction UseDefaultAIAssistAnswerWidget(_a) {\n var _this = this;\n var servername = _a.servername, api = _a.api, port = _a.port, apiKeyOrSessionToken = _a.apiKeyOrSessionToken;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n var _b = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''), errorMessage = _b[0], setErrorMessage = _b[1];\n // eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-function\n var fileToWidget = function (file, context) { };\n var renderWidget = function () {\n if (errorMessage && errorMessage.length > 0) {\n var errorsDescriptions = [];\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ErrorMessageIcon__WEBPACK_IMPORTED_MODULE_3__[\"default\"], { errorMessageText: errorMessage, errorsDescriptions: errorsDescriptions }));\n }\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_AIWidgets_AIWidget__WEBPACK_IMPORTED_MODULE_2__[\"default\"], { applyZoom: true, color: \"green\" });\n };\n var _c = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''), textFromWidgetToContent = _c[0], setTextFromWidgetToContent = _c[1];\n var textToWidget = function (textToSend, context) { return __awaiter(_this, void 0, void 0, function () {\n var openAIModel, useCaseAIAnswerAssist;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!(textToSend && textToSend.length > 0)) return [3 /*break*/, 2];\n openAIModel = 'gpt-3.5-turbo';\n useCaseAIAnswerAssist = new _Domain_use_cases_ai_AIAnswerAssistUseCase__WEBPACK_IMPORTED_MODULE_4__.AIAnswerAssistUseCase(textToSend, \n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n context, servername, api, port, apiKeyOrSessionToken, openAIModel);\n return [4 /*yield*/, useCaseAIAnswerAssist.execute().then(function (data) {\n setTextFromWidgetToContent(data);\n return data;\n })];\n case 1: \n // eslint-disable-next-line no-return-await\n return [2 /*return*/, _a.sent()];\n case 2: return [2 /*return*/, ''];\n }\n });\n }); };\n return {\n textToContent: textFromWidgetToContent,\n renderWidget: renderWidget,\n textToWidget: textToWidget,\n };\n}\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAIAssistAnswerWidget.tsx?");
|
|
1987
2193
|
|
|
1988
2194
|
/***/ }),
|
|
1989
2195
|
|
|
@@ -1994,7 +2200,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
1994
2200
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
1995
2201
|
|
|
1996
2202
|
"use strict";
|
|
1997
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ UseDefaultAIAssistAnswerWidgetWithProxy; }\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _svgs_Icons_AIWidgets_AIWidget__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../svgs/Icons/AIWidgets/AIWidget */ \"./src/Presentation/components/UI/svgs/Icons/AIWidgets/AIWidget/index.tsx\");\n/* harmony import */ var _ErrorMessageIcon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ErrorMessageIcon */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/ErrorMessageIcon.tsx\");\n/* harmony import */ var
|
|
2203
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ UseDefaultAIAssistAnswerWidgetWithProxy; }\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _svgs_Icons_AIWidgets_AIWidget__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../svgs/Icons/AIWidgets/AIWidget */ \"./src/Presentation/components/UI/svgs/Icons/AIWidgets/AIWidget/index.tsx\");\n/* harmony import */ var _ErrorMessageIcon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ErrorMessageIcon */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/ErrorMessageIcon.tsx\");\n/* harmony import */ var _Domain_use_cases_ai_AIAnswerAssistWithProxyUseCase__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../../Domain/use_cases/ai/AIAnswerAssistWithProxyUseCase */ \"./src/Domain/use_cases/ai/AIAnswerAssistWithProxyUseCase.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n\n\n\n\n\n// interface MessageWidgetProps {\n// // https://api.openai.com/v1/chat/completions'\n// // api: 'v1/chat/completions',\n// // servername: 'https://myproxy.com',\n// // https://func270519800.azurewebsites.net/api/TranslateTextToEng\n// servername: string;\n// api: string;\n// port: string;\n// apiKeyOrSessionToken: string;\n// apiKey: string;\n// }\nfunction UseDefaultAIAssistAnswerWidgetWithProxy(_a) {\n var _this = this;\n var servername = _a.servername, api = _a.api, port = _a.port, apiKeyOrSessionToken = _a.apiKeyOrSessionToken;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n var _b = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''), errorMessage = _b[0], setErrorMessage = _b[1];\n // eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-function\n var fileToWidget = function (file, context) { };\n var renderWidget = function () {\n if (errorMessage && errorMessage.length > 0) {\n var errorsDescriptions = [];\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ErrorMessageIcon__WEBPACK_IMPORTED_MODULE_3__[\"default\"], { errorMessageText: errorMessage, errorsDescriptions: errorsDescriptions }));\n }\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_AIWidgets_AIWidget__WEBPACK_IMPORTED_MODULE_2__[\"default\"], { applyZoom: true, color: \"green\" });\n };\n var _c = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''), textFromWidgetToContent = _c[0], setTextFromWidgetToContent = _c[1];\n var textToWidget = function (textToSend, context) { return __awaiter(_this, void 0, void 0, function () {\n var openAIModel, useCaseAIAnswerAssist;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!(textToSend && textToSend.length > 0)) return [3 /*break*/, 2];\n openAIModel = 'gpt-3.5-turbo';\n useCaseAIAnswerAssist = new _Domain_use_cases_ai_AIAnswerAssistWithProxyUseCase__WEBPACK_IMPORTED_MODULE_4__.AIAnswerAssistWithProxyUseCase(textToSend, \n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n context, servername, api, port, apiKeyOrSessionToken, openAIModel);\n return [4 /*yield*/, useCaseAIAnswerAssist.execute().then(function (data) {\n setTextFromWidgetToContent(data);\n return data;\n })];\n case 1: \n // eslint-disable-next-line no-return-await\n return [2 /*return*/, _a.sent()];\n case 2: return [2 /*return*/, ''];\n }\n });\n }); };\n return {\n textToContent: textFromWidgetToContent,\n renderWidget: renderWidget,\n textToWidget: textToWidget,\n };\n}\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAIAssistAnswerWidgetWithProxy.tsx?");
|
|
1998
2204
|
|
|
1999
2205
|
/***/ }),
|
|
2000
2206
|
|
|
@@ -2005,7 +2211,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
2005
2211
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2006
2212
|
|
|
2007
2213
|
"use strict";
|
|
2008
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ UseDefaultAIRephraseMessageWidget; }\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _ErrorMessageIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ErrorMessageIcon */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/ErrorMessageIcon.tsx\");\n/* harmony import */ var _svgs_Icons_AIWidgets_AIWidget__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../svgs/Icons/AIWidgets/AIWidget */ \"./src/Presentation/components/UI/svgs/Icons/AIWidgets/AIWidget/index.tsx\");\n/* harmony import */ var _Domain_use_cases_ai_AIRephraseUseCase__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../../Domain/use_cases/ai/AIRephraseUseCase */ \"./src/Domain/use_cases/ai/AIRephraseUseCase.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n\n\n\n\n\n// interface MessageWidgetProps {\n// servername: string;\n// api: string;\n// port: string;\n// apiKeyOrSessionToken: string;\n// apiKey: string;\n// }\nfunction UseDefaultAIRephraseMessageWidget(_a) {\n var _this = this;\n var servername = _a.servername, api = _a.api, port = _a.port, apiKeyOrSessionToken = _a.apiKeyOrSessionToken;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n var _b = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''), errorMessage = _b[0], setErrorMessage = _b[1];\n // eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-function\n var fileToWidget = function (file, context) { };\n var renderWidget = function () {\n if (errorMessage && errorMessage.length > 0) {\n var errorsDescriptions = [];\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ErrorMessageIcon__WEBPACK_IMPORTED_MODULE_2__[\"default\"], { errorMessageText: errorMessage, errorsDescriptions: errorsDescriptions }));\n }\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_AIWidgets_AIWidget__WEBPACK_IMPORTED_MODULE_3__[\"default\"], { applyZoom: true, color: \"green\" });\n };\n var _c = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''), textFromWidgetToContent = _c[0], setTextFromWidgetToContent = _c[1];\n var textToWidget = function (textToSend, context, additionalSettings) { return __awaiter(_this, void 0, void 0, function () {\n var tone, openAIModel, useCaseAIRephrase;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!(textToSend && textToSend.length > 0)) return [3 /*break*/, 2];\n tone = (additionalSettings || {}).tone;\n openAIModel = 'gpt-3.5-turbo';\n useCaseAIRephrase = new _Domain_use_cases_ai_AIRephraseUseCase__WEBPACK_IMPORTED_MODULE_4__.AIRephraseUseCase(textToSend, tone, context, servername, api, port, apiKeyOrSessionToken, openAIModel);\n return [4 /*yield*/, useCaseAIRephrase.execute().then(function (data) {\n setTextFromWidgetToContent(data);\n return data;\n })];\n case 1: \n // eslint-disable-next-line no-return-await\n return [2 /*return*/, _a.sent()];\n case 2: \n //\n return [2 /*return*/, ''];\n }\n });\n }); };\n return {\n textToContent: textFromWidgetToContent,\n renderWidget: renderWidget,\n textToWidget: textToWidget,\n };\n}\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAIRephraseMessageWidget.tsx?");
|
|
2214
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ UseDefaultAIRephraseMessageWidget; }\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _ErrorMessageIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ErrorMessageIcon */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/ErrorMessageIcon.tsx\");\n/* harmony import */ var _svgs_Icons_AIWidgets_AIWidget__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../svgs/Icons/AIWidgets/AIWidget */ \"./src/Presentation/components/UI/svgs/Icons/AIWidgets/AIWidget/index.tsx\");\n/* harmony import */ var _Domain_use_cases_ai_AIRephraseUseCase__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../../Domain/use_cases/ai/AIRephraseUseCase */ \"./src/Domain/use_cases/ai/AIRephraseUseCase.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n\n\n\n\n\n// interface MessageWidgetProps {\n// servername: string;\n// api: string;\n// port: string;\n// apiKeyOrSessionToken: string;\n// apiKey: string;\n// }\nfunction UseDefaultAIRephraseMessageWidget(_a) {\n var _this = this;\n var servername = _a.servername, api = _a.api, port = _a.port, apiKeyOrSessionToken = _a.apiKeyOrSessionToken;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n var _b = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''), errorMessage = _b[0], setErrorMessage = _b[1];\n // eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-function\n var fileToWidget = function (file, context) { };\n var renderWidget = function () {\n if (errorMessage && errorMessage.length > 0) {\n var errorsDescriptions = [];\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ErrorMessageIcon__WEBPACK_IMPORTED_MODULE_2__[\"default\"], { errorMessageText: errorMessage, errorsDescriptions: errorsDescriptions }));\n }\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_AIWidgets_AIWidget__WEBPACK_IMPORTED_MODULE_3__[\"default\"], { applyZoom: true, color: \"green\" });\n };\n var _c = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''), textFromWidgetToContent = _c[0], setTextFromWidgetToContent = _c[1];\n var textToWidget = function (textToSend, context, additionalSettings) { return __awaiter(_this, void 0, void 0, function () {\n var tone, openAIModel, useCaseAIRephrase;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!(textToSend && textToSend.length > 0)) return [3 /*break*/, 2];\n tone = (additionalSettings || {}).tone;\n openAIModel = 'gpt-3.5-turbo';\n useCaseAIRephrase = new _Domain_use_cases_ai_AIRephraseUseCase__WEBPACK_IMPORTED_MODULE_4__.AIRephraseUseCase(textToSend, tone, context, servername, api, port, apiKeyOrSessionToken, openAIModel);\n return [4 /*yield*/, useCaseAIRephrase.execute().then(function (data) {\n setTextFromWidgetToContent(data);\n return data;\n })];\n case 1: \n // eslint-disable-next-line no-return-await\n return [2 /*return*/, _a.sent()];\n case 2: \n //\n return [2 /*return*/, ''];\n }\n });\n }); };\n // const tonesToWidget = (): Tone[] => {\n // return [\n // Tone.Professional,\n // Tone.Friendly,\n // Tone.Encouraging,\n // Tone.Empathetic,\n // Tone.Assertive,\n // Tone.Neutral,\n // Tone.Instructive,\n // Tone.Persuasive,\n // Tone.Sarcastic,\n // Tone.Poetic,\n // Tone.Unchanged,\n // ];\n // };\n return {\n textToContent: textFromWidgetToContent,\n renderWidget: renderWidget,\n textToWidget: textToWidget,\n // tonesToWidget,\n };\n}\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAIRephraseMessageWidget.tsx?");
|
|
2009
2215
|
|
|
2010
2216
|
/***/ }),
|
|
2011
2217
|
|
|
@@ -2016,7 +2222,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
2016
2222
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2017
2223
|
|
|
2018
2224
|
"use strict";
|
|
2019
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ UseDefaultAIRephraseMessageWidgetWithProxy; }\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _ErrorMessageIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ErrorMessageIcon */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/ErrorMessageIcon.tsx\");\n/* harmony import */ var _svgs_Icons_AIWidgets_AIWidget__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../svgs/Icons/AIWidgets/AIWidget */ \"./src/Presentation/components/UI/svgs/Icons/AIWidgets/AIWidget/index.tsx\");\n/* harmony import */ var _Domain_use_cases_ai_AIRephraseWithProxyUseCase__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../../Domain/use_cases/ai/AIRephraseWithProxyUseCase */ \"./src/Domain/use_cases/ai/AIRephraseWithProxyUseCase.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n\n\n\n\n\n// interface MessageWidgetProps {\n// servername: string;\n// api: string;\n// port: string;\n// apiKeyOrSessionToken: string;\n// apiKey: string;\n// }\nfunction UseDefaultAIRephraseMessageWidgetWithProxy(_a) {\n var _this = this;\n var servername = _a.servername, api = _a.api, port = _a.port, apiKeyOrSessionToken = _a.apiKeyOrSessionToken;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n var _b = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''), errorMessage = _b[0], setErrorMessage = _b[1];\n // eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-function\n var fileToWidget = function (file, context) { };\n var renderWidget = function () {\n if (errorMessage && errorMessage.length > 0) {\n var errorsDescriptions = [];\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ErrorMessageIcon__WEBPACK_IMPORTED_MODULE_2__[\"default\"], { errorMessageText: errorMessage, errorsDescriptions: errorsDescriptions }));\n }\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_AIWidgets_AIWidget__WEBPACK_IMPORTED_MODULE_3__[\"default\"], { applyZoom: true, color: \"green\" });\n };\n var _c = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''), textFromWidgetToContent = _c[0], setTextFromWidgetToContent = _c[1];\n var textToWidget = function (textToSend, context, additionalSettings) { return __awaiter(_this, void 0, void 0, function () {\n var tone, openAIModel, useCaseAIRephrase;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!(textToSend && textToSend.length > 0)) return [3 /*break*/, 2];\n tone = (additionalSettings || {}).tone;\n openAIModel = 'gpt-3.5-turbo';\n useCaseAIRephrase = new _Domain_use_cases_ai_AIRephraseWithProxyUseCase__WEBPACK_IMPORTED_MODULE_4__.AIRephraseWithProxyUseCase(textToSend, tone, context, servername, api, port, apiKeyOrSessionToken, openAIModel);\n return [4 /*yield*/, useCaseAIRephrase.execute().then(function (data) {\n setTextFromWidgetToContent(data);\n return data;\n })];\n case 1: \n // eslint-disable-next-line no-return-await\n return [2 /*return*/, _a.sent()];\n case 2: \n //\n return [2 /*return*/, ''];\n }\n });\n }); };\n return {\n textToContent: textFromWidgetToContent,\n renderWidget: renderWidget,\n textToWidget: textToWidget,\n };\n}\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAIRephraseMessageWidgetWithProxy.tsx?");
|
|
2225
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ UseDefaultAIRephraseMessageWidgetWithProxy; }\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _ErrorMessageIcon__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ErrorMessageIcon */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/ErrorMessageIcon.tsx\");\n/* harmony import */ var _svgs_Icons_AIWidgets_AIWidget__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../svgs/Icons/AIWidgets/AIWidget */ \"./src/Presentation/components/UI/svgs/Icons/AIWidgets/AIWidget/index.tsx\");\n/* harmony import */ var _Domain_use_cases_ai_AIRephraseWithProxyUseCase__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../../Domain/use_cases/ai/AIRephraseWithProxyUseCase */ \"./src/Domain/use_cases/ai/AIRephraseWithProxyUseCase.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n\n\n\n\n\n// interface MessageWidgetProps {\n// servername: string;\n// api: string;\n// port: string;\n// apiKeyOrSessionToken: string;\n// apiKey: string;\n// }\nfunction UseDefaultAIRephraseMessageWidgetWithProxy(_a) {\n var _this = this;\n var servername = _a.servername, api = _a.api, port = _a.port, apiKeyOrSessionToken = _a.apiKeyOrSessionToken;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n var _b = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''), errorMessage = _b[0], setErrorMessage = _b[1];\n // eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-function\n var fileToWidget = function (file, context) { };\n var renderWidget = function () {\n if (errorMessage && errorMessage.length > 0) {\n var errorsDescriptions = [];\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ErrorMessageIcon__WEBPACK_IMPORTED_MODULE_2__[\"default\"], { errorMessageText: errorMessage, errorsDescriptions: errorsDescriptions }));\n }\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_AIWidgets_AIWidget__WEBPACK_IMPORTED_MODULE_3__[\"default\"], { applyZoom: true, color: \"green\" });\n };\n var _c = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''), textFromWidgetToContent = _c[0], setTextFromWidgetToContent = _c[1];\n var textToWidget = function (textToSend, context, additionalSettings) { return __awaiter(_this, void 0, void 0, function () {\n var tone, openAIModel, useCaseAIRephrase;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!(textToSend && textToSend.length > 0)) return [3 /*break*/, 2];\n tone = (additionalSettings || {}).tone;\n openAIModel = 'gpt-3.5-turbo';\n useCaseAIRephrase = new _Domain_use_cases_ai_AIRephraseWithProxyUseCase__WEBPACK_IMPORTED_MODULE_4__.AIRephraseWithProxyUseCase(textToSend, tone, context, servername, api, port, apiKeyOrSessionToken, openAIModel);\n return [4 /*yield*/, useCaseAIRephrase.execute().then(function (data) {\n setTextFromWidgetToContent(data);\n return data;\n })];\n case 1: \n // eslint-disable-next-line no-return-await\n return [2 /*return*/, _a.sent()];\n case 2: \n //\n return [2 /*return*/, ''];\n }\n });\n }); };\n // const tonesToWidget = (): Tone[] => {\n // return [\n // Tone.Professional,\n // Tone.Friendly,\n // Tone.Encouraging,\n // Tone.Empathetic,\n // Tone.Assertive,\n // Tone.Neutral,\n // Tone.Instructive,\n // Tone.Persuasive,\n // Tone.Sarcastic,\n // Tone.Poetic,\n // Tone.Unchanged,\n // ];\n // };\n return {\n textToContent: textFromWidgetToContent,\n renderWidget: renderWidget,\n textToWidget: textToWidget,\n // tonesToWidget,\n };\n}\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAIRephraseMessageWidgetWithProxy.tsx?");
|
|
2020
2226
|
|
|
2021
2227
|
/***/ }),
|
|
2022
2228
|
|
|
@@ -2027,7 +2233,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
2027
2233
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2028
2234
|
|
|
2029
2235
|
"use strict";
|
|
2030
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ UseDefaultAITranslateWidget; }\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _svgs_Icons_AIWidgets_AIWidget__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../svgs/Icons/AIWidgets/AIWidget */ \"./src/Presentation/components/UI/svgs/Icons/AIWidgets/AIWidget/index.tsx\");\n/* harmony import */ var _ErrorMessageIcon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ErrorMessageIcon */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/ErrorMessageIcon.tsx\");\n/* harmony import */ var
|
|
2236
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ UseDefaultAITranslateWidget; }\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _svgs_Icons_AIWidgets_AIWidget__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../svgs/Icons/AIWidgets/AIWidget */ \"./src/Presentation/components/UI/svgs/Icons/AIWidgets/AIWidget/index.tsx\");\n/* harmony import */ var _ErrorMessageIcon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ErrorMessageIcon */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/ErrorMessageIcon.tsx\");\n/* harmony import */ var _Domain_use_cases_ai_AITranslateUseCase__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../../Domain/use_cases/ai/AITranslateUseCase */ \"./src/Domain/use_cases/ai/AITranslateUseCase.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n\n\n\n\n\n// interface MessageWidgetProps {\n// // https://api.openai.com/v1/chat/completions'\n// // api: 'v1/chat/completions',\n// // servername: 'https://myproxy.com',\n// // https://func270519800.azurewebsites.net/api/TranslateTextToEng\n// servername: string;\n// api: string;\n// port: string;\n// apiKeyOrSessionToken: string;\n// apiKey: string;\n// }\nfunction UseDefaultAITranslateWidget(_a) {\n var _this = this;\n var servername = _a.servername, api = _a.api, port = _a.port, apiKeyOrSessionToken = _a.apiKeyOrSessionToken;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n var _b = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''), errorMessage = _b[0], setErrorMessage = _b[1];\n // eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-function\n var fileToWidget = function (file, context) { };\n var renderWidget = function () {\n if (errorMessage && errorMessage.length > 0) {\n var errorsDescriptions = [];\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ErrorMessageIcon__WEBPACK_IMPORTED_MODULE_3__[\"default\"], { errorMessageText: errorMessage, errorsDescriptions: errorsDescriptions }));\n }\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_AIWidgets_AIWidget__WEBPACK_IMPORTED_MODULE_2__[\"default\"], { applyZoom: true, color: \"green\" });\n };\n var _c = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''), textFromWidgetToContent = _c[0], setTextFromWidgetToContent = _c[1];\n var textToWidget = function (textToSend, context, additionalSettings) { return __awaiter(_this, void 0, void 0, function () {\n var language, openAIModel, useCaseAITranslate;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!(textToSend && textToSend.length > 0)) return [3 /*break*/, 2];\n language = (additionalSettings || {}).language;\n openAIModel = 'gpt-3.5-turbo';\n useCaseAITranslate = new _Domain_use_cases_ai_AITranslateUseCase__WEBPACK_IMPORTED_MODULE_4__.AITranslateUseCase(textToSend, \n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n language, context, servername, api, port, apiKeyOrSessionToken, openAIModel);\n return [4 /*yield*/, useCaseAITranslate.execute().then(function (data) {\n setTextFromWidgetToContent(data);\n return data;\n })];\n case 1: \n // eslint-disable-next-line no-return-await\n return [2 /*return*/, _a.sent()];\n case 2: return [2 /*return*/, ''];\n }\n });\n }); };\n return {\n textToContent: textFromWidgetToContent,\n renderWidget: renderWidget,\n textToWidget: textToWidget,\n };\n}\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAITranslateWidget.tsx?");
|
|
2031
2237
|
|
|
2032
2238
|
/***/ }),
|
|
2033
2239
|
|
|
@@ -2038,7 +2244,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
2038
2244
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2039
2245
|
|
|
2040
2246
|
"use strict";
|
|
2041
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ UseDefaultAITranslateWidgetWithProxy; }\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _svgs_Icons_AIWidgets_AIWidget__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../svgs/Icons/AIWidgets/AIWidget */ \"./src/Presentation/components/UI/svgs/Icons/AIWidgets/AIWidget/index.tsx\");\n/* harmony import */ var _ErrorMessageIcon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ErrorMessageIcon */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/ErrorMessageIcon.tsx\");\n/* harmony import */ var
|
|
2247
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"default\": function() { return /* binding */ UseDefaultAITranslateWidgetWithProxy; }\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _svgs_Icons_AIWidgets_AIWidget__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../svgs/Icons/AIWidgets/AIWidget */ \"./src/Presentation/components/UI/svgs/Icons/AIWidgets/AIWidget/index.tsx\");\n/* harmony import */ var _ErrorMessageIcon__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ErrorMessageIcon */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/ErrorMessageIcon.tsx\");\n/* harmony import */ var _Domain_use_cases_ai_AITranslateWithProxyUseCase__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../../Domain/use_cases/ai/AITranslateWithProxyUseCase */ \"./src/Domain/use_cases/ai/AITranslateWithProxyUseCase.ts\");\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n\n\n\n\n\n// interface MessageWidgetProps {\n// // https://api.openai.com/v1/chat/completions'\n// // api: 'v1/chat/completions',\n// // servername: 'https://myproxy.com',\n// // https://func270519800.azurewebsites.net/api/TranslateTextToEng\n// servername: string;\n// api: string;\n// port: string;\n// apiKeyOrSessionToken: string;\n// apiKey: string;\n// }\nfunction UseDefaultAITranslateWidgetWithProxy(_a) {\n var _this = this;\n var servername = _a.servername, api = _a.api, port = _a.port, apiKeyOrSessionToken = _a.apiKeyOrSessionToken;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n var _b = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''), errorMessage = _b[0], setErrorMessage = _b[1];\n // eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/no-empty-function\n var fileToWidget = function (file, context) { };\n var renderWidget = function () {\n if (errorMessage && errorMessage.length > 0) {\n var errorsDescriptions = [];\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ErrorMessageIcon__WEBPACK_IMPORTED_MODULE_3__[\"default\"], { errorMessageText: errorMessage, errorsDescriptions: errorsDescriptions }));\n }\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_AIWidgets_AIWidget__WEBPACK_IMPORTED_MODULE_2__[\"default\"], { applyZoom: true, color: \"green\" });\n };\n var _c = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''), textFromWidgetToContent = _c[0], setTextFromWidgetToContent = _c[1];\n var textToWidget = function (textToSend, context, additionalSettings) { return __awaiter(_this, void 0, void 0, function () {\n var language, openAIModel, useCaseAITranslate;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!(textToSend && textToSend.length > 0)) return [3 /*break*/, 2];\n language = (additionalSettings || {}).language;\n openAIModel = 'gpt-3.5-turbo';\n useCaseAITranslate = new _Domain_use_cases_ai_AITranslateWithProxyUseCase__WEBPACK_IMPORTED_MODULE_4__.AITranslateWithProxyUseCase(textToSend, \n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n language, context, servername, api, port, apiKeyOrSessionToken, openAIModel);\n return [4 /*yield*/, useCaseAITranslate.execute().then(function (data) {\n setTextFromWidgetToContent(data);\n return data;\n })];\n case 1: \n // eslint-disable-next-line no-return-await\n return [2 /*return*/, _a.sent()];\n case 2: return [2 /*return*/, ''];\n }\n });\n }); };\n return {\n textToContent: textFromWidgetToContent,\n renderWidget: renderWidget,\n textToWidget: textToWidget,\n };\n}\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAITranslateWidgetWithProxy.tsx?");
|
|
2042
2248
|
|
|
2043
2249
|
/***/ }),
|
|
2044
2250
|
|
|
@@ -2053,6 +2259,28 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var reac
|
|
|
2053
2259
|
|
|
2054
2260
|
/***/ }),
|
|
2055
2261
|
|
|
2262
|
+
/***/ "./src/Presentation/components/UI/Dialogs/MessagesView/DefaultAttachmentComponent/DefaultAttachmentComponent.tsx":
|
|
2263
|
+
/*!***********************************************************************************************************************!*\
|
|
2264
|
+
!*** ./src/Presentation/components/UI/Dialogs/MessagesView/DefaultAttachmentComponent/DefaultAttachmentComponent.tsx ***!
|
|
2265
|
+
\***********************************************************************************************************************/
|
|
2266
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2267
|
+
|
|
2268
|
+
"use strict";
|
|
2269
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* harmony import */ var _DefaultAttachmentComponent_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./DefaultAttachmentComponent.scss */ \"./src/Presentation/components/UI/Dialogs/MessagesView/DefaultAttachmentComponent/DefaultAttachmentComponent.scss\");\n/* harmony import */ var _svgs_Icons_Media_TextDocument__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../svgs/Icons/Media/TextDocument */ \"./src/Presentation/components/UI/svgs/Icons/Media/TextDocument/index.tsx\");\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\n\n\n\n// eslint-disable-next-line react/function-component-definition\nvar DefaultAttachmentComponent = function (_a) {\n var fileName = _a.fileName;\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"default-attachment-component-container\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ className: \"default-attachment-component-container--file-wrapper\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ className: \"default-attachment-component-container--file-wrapper--placeholder\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { className: \"default-attachment-component-container--file-wrapper--placeholder__bg\" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"default-attachment-component-container--file-wrapper--placeholder__icon\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Media_TextDocument__WEBPACK_IMPORTED_MODULE_2__[\"default\"], { width: \"16\", height: \"16\", applyZoom: true, color: \"var(--incoming-background)\" }) }))] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"default-attachment-component-container--file-wrapper__file-d\" }, { children: fileName }))] })) })));\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (DefaultAttachmentComponent);\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/MessagesView/DefaultAttachmentComponent/DefaultAttachmentComponent.tsx?");
|
|
2270
|
+
|
|
2271
|
+
/***/ }),
|
|
2272
|
+
|
|
2273
|
+
/***/ "./src/Presentation/components/UI/Dialogs/MessagesView/ErrorToast/ErrorToast.tsx":
|
|
2274
|
+
/*!***************************************************************************************!*\
|
|
2275
|
+
!*** ./src/Presentation/components/UI/Dialogs/MessagesView/ErrorToast/ErrorToast.tsx ***!
|
|
2276
|
+
\***************************************************************************************/
|
|
2277
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2278
|
+
|
|
2279
|
+
"use strict";
|
|
2280
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"ErrorToast\": function() { return /* binding */ ErrorToast; }\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* harmony import */ var _ErrorToast_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ErrorToast.scss */ \"./src/Presentation/components/UI/Dialogs/MessagesView/ErrorToast/ErrorToast.scss\");\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\n\n\n// eslint-disable-next-line react/function-component-definition\nvar ErrorToast = function (_a) {\n var messageText = _a.messageText;\n return (\n // <div>\n // {messageText} - {displayTimeout}\n // </div>\n (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"error-toast\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ className: \"translation-failed-try-again\" }, { children: [messageText, \" Try again.\"] })) })));\n};\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/MessagesView/ErrorToast/ErrorToast.tsx?");
|
|
2281
|
+
|
|
2282
|
+
/***/ }),
|
|
2283
|
+
|
|
2056
2284
|
/***/ "./src/Presentation/components/UI/Dialogs/MessagesView/HeaderMessages/HeaderMessages.tsx":
|
|
2057
2285
|
/*!***********************************************************************************************!*\
|
|
2058
2286
|
!*** ./src/Presentation/components/UI/Dialogs/MessagesView/HeaderMessages/HeaderMessages.tsx ***!
|
|
@@ -2104,7 +2332,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
2104
2332
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2105
2333
|
|
|
2106
2334
|
"use strict";
|
|
2107
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"InComingMessage\": function() { return /* binding */ InComingMessage; }\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _InComingMessage_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./InComingMessage.scss */ \"./src/Presentation/components/UI/Dialogs/MessagesView/InComingMessage/InComingMessage.scss\");\n/* harmony import */ var _utils_DateTimeFormatter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../../utils/DateTimeFormatter */ \"./src/utils/DateTimeFormatter.ts\");\n/* harmony import */ var _Domain_entity_FileTypes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../../Domain/entity/FileTypes */ \"./src/Domain/entity/FileTypes.ts\");\n/* harmony import */ var _VideoAttachmentComponent_VideoAttachmentComponent__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../VideoAttachmentComponent/VideoAttachmentComponent */ \"./src/Presentation/components/UI/Dialogs/MessagesView/VideoAttachmentComponent/VideoAttachmentComponent.tsx\");\n/* harmony import */ var _svgs_Icons_Toggle_ImagePlay__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../svgs/Icons/Toggle/ImagePlay */ \"./src/Presentation/components/UI/svgs/Icons/Toggle/ImagePlay/index.tsx\");\n/* harmony import */ var _AudioAttachmentComponent_AudioAttachmentComponent__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../AudioAttachmentComponent/AudioAttachmentComponent */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AudioAttachmentComponent/AudioAttachmentComponent.tsx\");\n/* harmony import */ var _svgs_Icons_Media_AudioFile__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../svgs/Icons/Media/AudioFile */ \"./src/Presentation/components/UI/svgs/Icons/Media/AudioFile/index.tsx\");\n/* harmony import */ var _ImageAttachmentComponent_ImageAttachmentComponent__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../ImageAttachmentComponent/ImageAttachmentComponent */ \"./src/Presentation/components/UI/Dialogs/MessagesView/ImageAttachmentComponent/ImageAttachmentComponent.tsx\");\n/* harmony import */ var _svgs_Icons_Media_ImageEmpty__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../svgs/Icons/Media/ImageEmpty */ \"./src/Presentation/components/UI/svgs/Icons/Media/ImageEmpty/index.tsx\");\n/* harmony import */ var _svgs_Icons_Media_ImageFile__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../svgs/Icons/Media/ImageFile */ \"./src/Presentation/components/UI/svgs/Icons/Media/ImageFile/index.tsx\");\n/* harmony import */ var _containers_ColumnContainer_ColumnContainer__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../../containers/ColumnContainer/ColumnContainer */ \"./src/Presentation/components/containers/ColumnContainer/ColumnContainer.tsx\");\n/* harmony import */ var _HighLightLink_HighLightLink__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../HighLightLink/HighLightLink */ \"./src/Presentation/components/UI/Dialogs/MessagesView/HighLightLink/HighLightLink.tsx\");\n/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../../../../utils/utils */ \"./src/utils/utils.ts\");\n/* harmony import */ var _Placeholders_LoaderComponent_LoaderComponent__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../../Placeholders/LoaderComponent/LoaderComponent */ \"./src/Presentation/components/UI/Placeholders/LoaderComponent/LoaderComponent.tsx\");\n/* harmony import */ var _svgs_Icons_Actions_AssistAnswer__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../svgs/Icons/Actions/AssistAnswer */ \"./src/Presentation/components/UI/svgs/Icons/Actions/AssistAnswer/index.tsx\");\n/* harmony import */ var _AIWidgets_AIWidgetActions_AIWidgetActions__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../AIWidgets/AIWidgetActions/AIWidgetActions */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/AIWidgetActions/AIWidgetActions.tsx\");\n/* harmony import */ var _svgs_Icons_Media_Translate__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../svgs/Icons/Media/Translate */ \"./src/Presentation/components/UI/svgs/Icons/Media/Translate/index.tsx\");\n/* harmony import */ var _AvatarContentIncomingUser_AvatarContentIncomingUser__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./AvatarContentIncomingUser/AvatarContentIncomingUser */ \"./src/Presentation/components/UI/Dialogs/MessagesView/InComingMessage/AvatarContentIncomingUser/AvatarContentIncomingUser.tsx\");\n/* harmony import */ var _Data_DefaultConfigurations__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../../../../Data/DefaultConfigurations */ \"./src/Data/DefaultConfigurations.ts\");\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction InComingMessage(props) {\n var _a, _b;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n var _c = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false), haveHover = _c[0], setHaveHover = _c[1];\n // const [openMenu, setOpenMenu] = useState(false);\n var _d = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false), waitAIWidget = _d[0], setWaitAIWidget = _d[1];\n var _e = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false), waitAITranslateWidget = _e[0], setWaitAITranslateWidget = _e[1];\n var _f = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''), widgetTextContent = _f[0], setWidgetTextContent = _f[1];\n var _g = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(true), originalTextMessage = _g[0], setOriginalTextMessage = _g[1];\n // const [errorAITranslate, setErrorAITranslate] = useState<boolean>(false);\n // useEffect(() => {\n // setWaitAIWidget(false);\n // if (\n // props.AIRephraseMessage?.textToContent &&\n // props.AIRephraseMessage?.textToContent.length > 0\n // ) {\n // setMessageTextState(props.AIRephraseMessage?.textToContent);\n // setWidgetTextContent(props.AIRephraseMessage?.textToContent);\n // setTimeout(() => {\n // setWidgetTextContent('');\n // }, 45 * 1000);\n // }\n // }, [props.AIRephraseMessage?.textToContent]);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n setWaitAIWidget(false);\n }, [(_a = props.AITranslation) === null || _a === void 0 ? void 0 : _a.textToContent]);\n //\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n setWaitAIWidget(false);\n // if (\n // props.AIAnswerToMessage?.textToContent &&\n // props.AIAnswerToMessage?.textToContent.length > 0\n // ) {\n // // setMessageTextState(props.AIAnswerToMessage?.textToContent);\n // setWidgetTextContent(props.AIAnswerToMessage?.textToContent);\n // setTimeout(() => {\n // setWidgetTextContent('');\n // }, 45 * 1000);\n // }\n }, [(_b = props.AIAnswerToMessage) === null || _b === void 0 ? void 0 : _b.textToContent]);\n var messageContentRender = function (mc, translateText, theme) {\n var messageText = ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: !originalTextMessage ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: widgetTextContent })) : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: mc.message })) }));\n var messageContent = messageText;\n var attachmentContentRender = function (att) {\n var contentPlaceHolder = (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: att.type.toString() });\n if (att.type.toString().includes(_Domain_entity_FileTypes__WEBPACK_IMPORTED_MODULE_4__.FileType.video)) {\n contentPlaceHolder = att.file ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_VideoAttachmentComponent_VideoAttachmentComponent__WEBPACK_IMPORTED_MODULE_5__[\"default\"], { videoFile: att.file })) : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Toggle_ImagePlay__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {}));\n }\n if (att.type.toString().includes(_Domain_entity_FileTypes__WEBPACK_IMPORTED_MODULE_4__.FileType.audio)) {\n contentPlaceHolder = att.file ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_AudioAttachmentComponent_AudioAttachmentComponent__WEBPACK_IMPORTED_MODULE_7__[\"default\"], { audioFile: att.file })) : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Media_AudioFile__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {}));\n }\n if (att.type.toString().includes(_Domain_entity_FileTypes__WEBPACK_IMPORTED_MODULE_4__.FileType.image)) {\n contentPlaceHolder = att.file ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ImageAttachmentComponent_ImageAttachmentComponent__WEBPACK_IMPORTED_MODULE_9__[\"default\"], { imageFile: att.file })) : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Media_ImageEmpty__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {}));\n }\n if (att.type.toString().includes(_Domain_entity_FileTypes__WEBPACK_IMPORTED_MODULE_4__.FileType.text)) {\n contentPlaceHolder = att.file ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: \"TEXT\" })) : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Media_ImageFile__WEBPACK_IMPORTED_MODULE_11__[\"default\"], { applyZoom: true }));\n }\n var contentResult = ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"message-view-container--message-content-wrapper\" }, { children: contentPlaceHolder })));\n if (att.type === _Domain_entity_FileTypes__WEBPACK_IMPORTED_MODULE_4__.FileType.text) {\n contentResult = ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ className: \"message-view-container--file-message-content-wrapper\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: theme ? { backgroundColor: theme.caption() } : {}, className: \"message-view-container__file-message-icon\" }, { children: contentPlaceHolder })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: att.name || 'file' })] })));\n }\n return contentResult;\n };\n if (mc.attachments && mc.attachments.length > 0) {\n messageContent = ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_containers_ColumnContainer_ColumnContainer__WEBPACK_IMPORTED_MODULE_12__[\"default\"], __assign({ maxWidth: \"100%\" }, { children: [mc.attachments.map(function (attachment) {\n return attachmentContentRender(attachment);\n }), messageText] })));\n }\n if ((0,_HighLightLink_HighLightLink__WEBPACK_IMPORTED_MODULE_13__.messageHasUrls)(mc.message) &&\n !(mc.attachments && mc.attachments.length > 0)) {\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HighLightLink_HighLightLink__WEBPACK_IMPORTED_MODULE_13__.HighLightLink, { messageText: mc.message });\n }\n return messageContent;\n };\n var messageEntitiesToIChatMessageCollection = function (messageEntities, currentUserId) {\n var MAX_TOKENS = 3584;\n var items = messageEntities.filter(function (it) {\n return !it.notification_type ||\n (it.notification_type && it.notification_type.length === 0);\n });\n var messages = (0,_utils_utils__WEBPACK_IMPORTED_MODULE_14__.loopToLimitTokens)(MAX_TOKENS, items, function (_a) {\n var message = _a.message;\n return message || '';\n }).reverse();\n var chatCompletionMessages = messages.map(function (_a) {\n var message = _a.message, sender_id = _a.sender_id;\n return ({\n role: sender_id === currentUserId ? 'user' : 'assistant',\n content: message,\n });\n });\n //\n return chatCompletionMessages;\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n function sendMessageToTranslate(message, messagesToView, currentUserId, AITranslation, selectedLanguage) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!!waitAITranslateWidget) return [3 /*break*/, 2];\n setWaitAITranslateWidget(true);\n return [4 /*yield*/, (AITranslation === null || AITranslation === void 0 ? void 0 : AITranslation.textToWidget(message.message, messageEntitiesToIChatMessageCollection(messagesToView, currentUserId), {\n language: selectedLanguage ||\n _Data_DefaultConfigurations__WEBPACK_IMPORTED_MODULE_20__.DefaultConfigurations.getDefaultLanguageForAITranslate(),\n // language: DefaultConfigurations.getDefaultLanguageForAITranslate()\n // selectedLanguage ||\n // QBConfig.configAIApi.AITranslateWidgetConfig.defaultLanguage ||\n // 'English',\n }).then(function (textTranslate) {\n // eslint-disable-next-line promise/always-return\n setWidgetTextContent(textTranslate || '');\n setWaitAITranslateWidget(false);\n setOriginalTextMessage(false);\n }).catch(function () {\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n // setErrorAITranslate(true);\n setWaitAITranslateWidget(false);\n setOriginalTextMessage(true);\n }))];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2: return [2 /*return*/];\n }\n });\n });\n }\n function sendMessageToAIAssistAnswer(message, messagesToView, currentUserId, AIAnswerToMessage) {\n if (!waitAIWidget) {\n setWaitAIWidget(true);\n props.onLoader();\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n AIAnswerToMessage === null || AIAnswerToMessage === void 0 ? void 0 : AIAnswerToMessage.textToWidget(message.message, messageEntitiesToIChatMessageCollection(messagesToView, currentUserId));\n }\n }\n var renderWidgetAITranslate = function (mc, messagesToView, currentUserId, AITranslate) {\n return (AITranslate && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ className: \"translate\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"caption2\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"ai-translate-action\", onClick: function () {\n if (originalTextMessage) {\n sendMessageToTranslate(mc, messagesToView, currentUserId, AITranslate);\n }\n else {\n setOriginalTextMessage(true);\n setWidgetTextContent('');\n }\n } }, { children: originalTextMessage ? 'Show translation' : 'Show original' })) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_AIWidgets_AIWidgetActions_AIWidgetActions__WEBPACK_IMPORTED_MODULE_17__[\"default\"], { widgetToRender: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"icon\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Media_Translate__WEBPACK_IMPORTED_MODULE_18__[\"default\"], { width: \"16\", height: \"16\", applyZoom: true, color: \"var(--tertiary-elements)\" }) })), items: _Data_DefaultConfigurations__WEBPACK_IMPORTED_MODULE_20__.DefaultConfigurations.getAdditionalLanguagesForAITranslate().map(function (item) {\n return {\n title: item,\n action: function () {\n sendMessageToTranslate(mc, messagesToView, currentUserId, AITranslate, item);\n },\n };\n }) })] }))\n // <div className=\"widget-ai-translate-with-choice-languages-container\">\n // <div\n // className=\"widget-ai-translate-with-choice-languages-container--default-language\"\n // onClick={() => {\n // if (originalTextMessage) {\n // sendMessageToTranslate(\n // mc,\n // messagesToView,\n // currentUserId,\n // AITranslation,\n // );\n // } else {\n // setOriginalTextMessage(true);\n // setWidgetTextContent('');\n // }\n // }}\n // >\n // {originalTextMessage ? 'Show translation' : 'Show original'}\n // </div>\n // <div className=\"widget-ai-translate-with-choice-languages-container--separator\">\n // {' '}\n // </div>\n // <div className=\"widget-ai-translate-with-choice-languages-container--select-language\">\n // <AIWidgetActions\n // widgetToRender={\n // <AIWidgetIcon\n // applyZoom\n // color=\"var(--main-elements)\"\n // width=\"16\"\n // height=\"16\"\n // />\n // }\n // items={[\n // {\n // title: 'English',\n // // eslint-disable-next-line @typescript-eslint/no-empty-function\n // action: () => {\n // sendMessageToTranslate(\n // mc,\n // messagesToView,\n // currentUserId,\n // AITranslation,\n // 'English',\n // );\n // },\n // },\n // {\n // title: 'Ukrainian',\n // action: () => {\n // sendMessageToTranslate(\n // mc,\n // messagesToView,\n // currentUserId,\n // AITranslation,\n // 'Ukrainian',\n // );\n // },\n // },\n // {\n // title: 'Spanish',\n // action: () => {\n // sendMessageToTranslate(\n // mc,\n // messagesToView,\n // currentUserId,\n // AITranslation,\n // 'Spanish',\n // );\n // },\n // },\n // {\n // title: 'Portuguese',\n // action: () => {\n // sendMessageToTranslate(\n // mc,\n // messagesToView,\n // currentUserId,\n // AITranslation,\n // 'Portuguese',\n // );\n // },\n // },\n // {\n // title: 'French',\n // action: () => {\n // sendMessageToTranslate(\n // mc,\n // messagesToView,\n // currentUserId,\n // AITranslation,\n // 'French',\n // );\n // },\n // },\n // // {\n // // title: 'German',\n // // action: () => {},\n // // },\n // ]}\n // />\n // </div>\n // {waitAITranslateWidget && (\n // <div\n // className=\"widget-ai-translate-with-choice-languages-container--separator\"\n // style={{\n // height: '16px',\n // width: '16px',\n // }}\n // >\n // <LoaderComponent\n // width=\"16\"\n // height=\"16\"\n // color=\"var(--color-background-info)\"\n // />\n // </div>\n // )}\n // {errorAITranslate && (\n // <div className=\"widget-ai-translate-with-choice-languages-container--separator\">\n // <ErrorMessageIcon\n // errorMessageText=\"OpenAI server does not response\"\n // errorsDescriptions={[]}\n // />\n // </div>\n // )}\n // </div>\n ));\n };\n var renderWidgetAIAssist = function (mc, messagesToView, currentUserId, AIAnswer) {\n return (AIAnswer && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"assist-answer\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"icon\", onClick: function () {\n return sendMessageToAIAssistAnswer(mc, messagesToView, currentUserId, AIAnswer);\n } }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: {\n padding: '5px 3px 5px 3px',\n alignSelf: 'stretch',\n flex: '1',\n position: 'relative',\n overflow: 'visible',\n } }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Actions_AssistAnswer__WEBPACK_IMPORTED_MODULE_16__[\"default\"], { width: \"24\", height: \"24\", applyZoom: true, color: \"var(--main-elements)\" }) })) })) }))));\n };\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ className: \"incoming-text-message\", onMouseEnter: function () { return setHaveHover(true); }, onMouseLeave: function () { return setHaveHover(false); } }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_AvatarContentIncomingUser_AvatarContentIncomingUser__WEBPACK_IMPORTED_MODULE_19__[\"default\"], {}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ className: \"incoming\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"name\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"caption\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"name2\" }, { children: props.senderName || props.message.sender_id.toString() })) })) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ className: \"message\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ className: \"bubble\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"chat-bubble-background\" }, { children: messageContentRender(props.message, widgetTextContent, props.theme) })), renderWidgetAITranslate(props.message, props.messagesToView, props.currentUserId, props.AITranslation)] })), waitAITranslateWidget ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"assist-answer\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"icon\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: {\n padding: '5px 3px 5px 3px',\n alignSelf: 'stretch',\n flex: '1',\n position: 'relative',\n overflow: 'visible',\n } }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Placeholders_LoaderComponent_LoaderComponent__WEBPACK_IMPORTED_MODULE_15__[\"default\"], { width: \"24\", height: \"24\", applyZoom: true, color: \"var(--caption)\" }) })) })) }))) : null, !waitAITranslateWidget\n ? renderWidgetAIAssist(props.message, props.messagesToView, props.currentUserId, props.AIAnswerToMessage)\n : null, (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"caption3\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"time\" }, { children: (0,_utils_DateTimeFormatter__WEBPACK_IMPORTED_MODULE_3__.getTimeShort24hFormat)(props.message.date_sent) })) }))] }))] }))] }))\n // <div\n // className=\"message-view-container--incoming-message-wrapper\"\n // onMouseEnter={() => setHaveHover(true)}\n // onMouseLeave={() => setHaveHover(false)}\n // >\n // <div className=\"message-view-container--incoming-message-wrapper__message\">\n // <div className=\"message-view-container--incoming-message-wrapper__avatar\">\n // <div\n // style={\n // props.theme\n // ? { backgroundColor: props.theme.disabledElements() }\n // : {}\n // }\n // className=\"message-view-container__sender-avatar\"\n // >\n // <User\n // width=\"24\"\n // height=\"24\"\n // applyZoom\n // color=\"var(--secondary-text)\"\n // />\n // </div>\n // </div>\n // <div className=\"message-view-container--incoming-message-container\">\n // <div\n // style={props.theme ? { color: props.theme.secondaryText() } : {}}\n // className=\"message-view-container__sender-name\"\n // >\n // {props.senderName || props.message.sender_id.toString()}\n // </div>\n // <div\n // style={\n // props.theme\n // ? {\n // color: props.theme.mainText(),\n // backgroundColor: props.theme.incomingBackground(),\n // }\n // : {}\n // }\n // className=\"message-view-container__sender-message\"\n // >\n // {/* eslint-disable-next-line @typescript-eslint/no-unsafe-argument */}\n // {messageContentRender(\n // props.message,\n // widgetTextContent,\n // props.theme,\n // )}\n // </div>\n // </div>\n // {haveHover || openMenu ? (\n // <div\n // className=\"message-view-container--incoming-message-wrapper--context-menu\"\n // onClick={() => {\n // setOpenMenu(!openMenu);\n // }}\n // >\n // <EditDots\n // color={\n // props.theme\n // ? props.theme.secondaryText()\n // : 'var(--secondary-text)'\n // }\n // />\n // {/* {openMenu ? ( */}\n // {/* <DropDownMenu */}\n // {/* items={contextMessageMenu} */}\n // {/* itemsAI={contextMessageMenuAI} */}\n // {/* /> */}\n // {/* ) : null} */}\n // </div>\n // ) : (\n // <div\n // style={props.theme ? { color: props.theme.mainText() } : {}}\n // className=\"message-view-container__incoming-time\"\n // >\n // {getTimeShort24hFormat(props.message.date_sent)}\n // </div>\n // )}\n //\n // <div\n // className=\"message-view-container__incoming-time\"\n // onClick={props.onClick}\n // >\n // {/* {props.renderWidget} */}\n // {renderWidgetAIAssist(\n // props.message,\n // props.messagesToView,\n // props.currentUserId,\n // props.AITranslation,\n // props.AIAnswerToMessage,\n // )}\n // </div>\n // {waitAIWidget && (\n // <div\n // className=\"message-view-container__incoming-time\"\n // style={{\n // height: '24px',\n // width: '24px',\n // }}\n // >\n // <LoaderComponent\n // width=\"24\"\n // height=\"24\"\n // color=\"var(--color-background-info)\"\n // />\n // </div>\n // )}\n // </div>\n // <div className=\"message-view-container__widget-ai-translate\">\n // {renderWidgetAITranslate(\n // props.message,\n // props.messagesToView,\n // props.currentUserId,\n // props.AITranslation,\n // )}\n // </div>\n // </div>\n );\n}\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/MessagesView/InComingMessage/InComingMessage.tsx?");
|
|
2335
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"InComingMessage\": function() { return /* binding */ InComingMessage; }\n/* harmony export */ });\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _InComingMessage_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./InComingMessage.scss */ \"./src/Presentation/components/UI/Dialogs/MessagesView/InComingMessage/InComingMessage.scss\");\n/* harmony import */ var _utils_DateTimeFormatter__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../../../../utils/DateTimeFormatter */ \"./src/utils/DateTimeFormatter.ts\");\n/* harmony import */ var _Domain_entity_FileTypes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../../../../Domain/entity/FileTypes */ \"./src/Domain/entity/FileTypes.ts\");\n/* harmony import */ var _VideoAttachmentComponent_VideoAttachmentComponent__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../VideoAttachmentComponent/VideoAttachmentComponent */ \"./src/Presentation/components/UI/Dialogs/MessagesView/VideoAttachmentComponent/VideoAttachmentComponent.tsx\");\n/* harmony import */ var _svgs_Icons_Toggle_ImagePlay__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../svgs/Icons/Toggle/ImagePlay */ \"./src/Presentation/components/UI/svgs/Icons/Toggle/ImagePlay/index.tsx\");\n/* harmony import */ var _AudioAttachmentComponent_AudioAttachmentComponent__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../AudioAttachmentComponent/AudioAttachmentComponent */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AudioAttachmentComponent/AudioAttachmentComponent.tsx\");\n/* harmony import */ var _svgs_Icons_Media_AudioFile__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../svgs/Icons/Media/AudioFile */ \"./src/Presentation/components/UI/svgs/Icons/Media/AudioFile/index.tsx\");\n/* harmony import */ var _ImageAttachmentComponent_ImageAttachmentComponent__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../ImageAttachmentComponent/ImageAttachmentComponent */ \"./src/Presentation/components/UI/Dialogs/MessagesView/ImageAttachmentComponent/ImageAttachmentComponent.tsx\");\n/* harmony import */ var _svgs_Icons_Media_ImageEmpty__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../svgs/Icons/Media/ImageEmpty */ \"./src/Presentation/components/UI/svgs/Icons/Media/ImageEmpty/index.tsx\");\n/* harmony import */ var _svgs_Icons_Media_ImageFile__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../../svgs/Icons/Media/ImageFile */ \"./src/Presentation/components/UI/svgs/Icons/Media/ImageFile/index.tsx\");\n/* harmony import */ var _containers_ColumnContainer_ColumnContainer__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../../containers/ColumnContainer/ColumnContainer */ \"./src/Presentation/components/containers/ColumnContainer/ColumnContainer.tsx\");\n/* harmony import */ var _HighLightLink_HighLightLink__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../HighLightLink/HighLightLink */ \"./src/Presentation/components/UI/Dialogs/MessagesView/HighLightLink/HighLightLink.tsx\");\n/* harmony import */ var _Placeholders_LoaderComponent_LoaderComponent__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../../Placeholders/LoaderComponent/LoaderComponent */ \"./src/Presentation/components/UI/Placeholders/LoaderComponent/LoaderComponent.tsx\");\n/* harmony import */ var _AIWidgets_AIWidgetActions_AIWidgetActions__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../AIWidgets/AIWidgetActions/AIWidgetActions */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/AIWidgetActions/AIWidgetActions.tsx\");\n/* harmony import */ var _svgs_Icons_Media_Translate__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../svgs/Icons/Media/Translate */ \"./src/Presentation/components/UI/svgs/Icons/Media/Translate/index.tsx\");\n/* harmony import */ var _AvatarContentIncomingUser_AvatarContentIncomingUser__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./AvatarContentIncomingUser/AvatarContentIncomingUser */ \"./src/Presentation/components/UI/Dialogs/MessagesView/InComingMessage/AvatarContentIncomingUser/AvatarContentIncomingUser.tsx\");\n/* harmony import */ var _Data_DefaultConfigurations__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../../../../Data/DefaultConfigurations */ \"./src/Data/DefaultConfigurations.ts\");\n/* harmony import */ var _providers_QuickBloxUIKitProvider_useQbInitializedDataContext__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../../providers/QuickBloxUIKitProvider/useQbInitializedDataContext */ \"./src/Presentation/components/providers/QuickBloxUIKitProvider/useQbInitializedDataContext.ts\");\n/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../../../../utils/utils */ \"./src/utils/utils.ts\");\n/* harmony import */ var _svgs_Icons_AIWidgets_BotIcon_BotIcon__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../../svgs/Icons/AIWidgets/BotIcon/BotIcon */ \"./src/Presentation/components/UI/svgs/Icons/AIWidgets/BotIcon/BotIcon.tsx\");\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nfunction InComingMessage(props) {\n var _a, _b;\n var currentContext = (0,_providers_QuickBloxUIKitProvider_useQbInitializedDataContext__WEBPACK_IMPORTED_MODULE_19__[\"default\"])();\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n var _c = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false), haveHover = _c[0], setHaveHover = _c[1];\n // const [openMenu, setOpenMenu] = useState(false);\n var _d = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false), waitAIWidget = _d[0], setWaitAIWidget = _d[1];\n var _e = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false), waitAITranslateWidget = _e[0], setWaitAITranslateWidget = _e[1];\n var _f = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''), widgetTextContent = _f[0], setWidgetTextContent = _f[1];\n var _g = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(true), originalTextMessage = _g[0], setOriginalTextMessage = _g[1];\n var maxTokensForAITranslate = currentContext.InitParams.qbConfig.configAIApi.AITranslateWidgetConfig\n .maxTokens;\n var maxTokensForAnswerAssist = currentContext.InitParams.qbConfig.configAIApi.AIAnswerAssistWidgetConfig\n .maxTokens;\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n setWaitAIWidget(false);\n }, [(_a = props.AITranslation) === null || _a === void 0 ? void 0 : _a.textToContent]);\n //\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n setWaitAIWidget(false);\n }, [(_b = props.AIAnswerToMessage) === null || _b === void 0 ? void 0 : _b.textToContent]);\n var messageContentRender = function (mc, translateText, theme) {\n var messageText = ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: !originalTextMessage ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: widgetTextContent })) : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: mc.message })) }));\n var messageContent = messageText;\n var attachmentContentRender = function (att) {\n var contentPlaceHolder = (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: att.type.toString() });\n if (att.type.toString().includes(_Domain_entity_FileTypes__WEBPACK_IMPORTED_MODULE_4__.FileType.video)) {\n contentPlaceHolder = att.file ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_VideoAttachmentComponent_VideoAttachmentComponent__WEBPACK_IMPORTED_MODULE_5__[\"default\"], { videoFile: att.file })) : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Toggle_ImagePlay__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {}));\n }\n if (att.type.toString().includes(_Domain_entity_FileTypes__WEBPACK_IMPORTED_MODULE_4__.FileType.audio)) {\n contentPlaceHolder = att.file ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_AudioAttachmentComponent_AudioAttachmentComponent__WEBPACK_IMPORTED_MODULE_7__[\"default\"], { audioFile: att.file })) : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Media_AudioFile__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {}));\n }\n if (att.type.toString().includes(_Domain_entity_FileTypes__WEBPACK_IMPORTED_MODULE_4__.FileType.image)) {\n contentPlaceHolder = att.file ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ImageAttachmentComponent_ImageAttachmentComponent__WEBPACK_IMPORTED_MODULE_9__[\"default\"], { imageFile: att.file })) : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Media_ImageEmpty__WEBPACK_IMPORTED_MODULE_10__[\"default\"], {}));\n }\n if (att.type.toString().includes(_Domain_entity_FileTypes__WEBPACK_IMPORTED_MODULE_4__.FileType.text)) {\n contentPlaceHolder = att.file ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: \"TEXT\" })) : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Media_ImageFile__WEBPACK_IMPORTED_MODULE_11__[\"default\"], { applyZoom: true }));\n }\n var contentResult = ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"message-view-container--message-content-wrapper\" }, { children: contentPlaceHolder })));\n if (att.type === _Domain_entity_FileTypes__WEBPACK_IMPORTED_MODULE_4__.FileType.text) {\n contentResult = ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ className: \"message-view-container--file-message-content-wrapper\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: theme ? { backgroundColor: theme.caption() } : {}, className: \"message-view-container__file-message-icon\" }, { children: contentPlaceHolder })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: att.name || 'file' })] })));\n }\n return contentResult;\n };\n if (mc.attachments && mc.attachments.length > 0) {\n messageContent = ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_containers_ColumnContainer_ColumnContainer__WEBPACK_IMPORTED_MODULE_12__[\"default\"], __assign({ maxWidth: \"100%\" }, { children: [mc.attachments.map(function (attachment) {\n return attachmentContentRender(attachment);\n }), messageText] })));\n }\n if ((0,_HighLightLink_HighLightLink__WEBPACK_IMPORTED_MODULE_13__.messageHasUrls)(mc.message) &&\n !(mc.attachments && mc.attachments.length > 0)) {\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HighLightLink_HighLightLink__WEBPACK_IMPORTED_MODULE_13__.HighLightLink, { messageText: mc.message });\n }\n return messageContent;\n };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n function sendMessageToTranslate(message, messagesToView, currentUserId, AITranslation, selectedLanguage) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!!waitAITranslateWidget) return [3 /*break*/, 2];\n setWaitAITranslateWidget(true);\n return [4 /*yield*/, (AITranslation === null || AITranslation === void 0 ? void 0 : AITranslation.textToWidget(message.message, _utils_utils__WEBPACK_IMPORTED_MODULE_20__.AIUtils.messageEntitiesToIChatMessageCollection(messagesToView, currentUserId, maxTokensForAITranslate), {\n language: selectedLanguage ||\n _Data_DefaultConfigurations__WEBPACK_IMPORTED_MODULE_18__.DefaultConfigurations.getDefaultLanguageForAITranslate(currentContext.InitParams.qbConfig.configAIApi\n .AITranslateWidgetConfig),\n }).then(function (textTranslate) {\n // eslint-disable-next-line promise/always-return\n setWidgetTextContent(textTranslate || '');\n // eslint-disable-next-line promise/always-return\n if (textTranslate === 'Translation failed.') {\n props.onErrorToast('Translation failed.');\n }\n setWaitAITranslateWidget(false);\n setOriginalTextMessage(false);\n }).catch(function () {\n props.onErrorToast('Translation failed.');\n setWaitAITranslateWidget(false);\n setOriginalTextMessage(true);\n }))];\n case 1:\n _a.sent();\n _a.label = 2;\n case 2: return [2 /*return*/];\n }\n });\n });\n }\n function sendMessageToAIAssistAnswer(message, messagesToView, currentUserId, AIAnswerToMessage) {\n if (!waitAIWidget) {\n setWaitAIWidget(true);\n props.onStartLoader();\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n AIAnswerToMessage === null || AIAnswerToMessage === void 0 ? void 0 : AIAnswerToMessage.textToWidget(message.message, _utils_utils__WEBPACK_IMPORTED_MODULE_20__.AIUtils.messageEntitiesToIChatMessageCollection(messagesToView, currentUserId, maxTokensForAnswerAssist)).then(function (answerText) {\n // eslint-disable-next-line promise/always-return\n if (answerText === 'Assist failed.') {\n props.onErrorToast('Assist failed.');\n }\n setWaitAIWidget(false);\n props.onStopLoader();\n }).catch(function () {\n props.onErrorToast('Assist failed.');\n setWaitAIWidget(false);\n props.onStopLoader();\n });\n }\n }\n var renderWidgetAITranslate = function (mc, messagesToView, currentUserId, AITranslate) {\n return (AITranslate && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ className: \"translate\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"caption2\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"ai-translate-action\", style: {\n cursor: !waitAITranslateWidget ? 'pointer' : '',\n }, onClick: function () {\n console.log('click translate....');\n if (!waitAITranslateWidget) {\n if (originalTextMessage) {\n sendMessageToTranslate(mc, messagesToView, currentUserId, AITranslate);\n }\n else {\n setOriginalTextMessage(true);\n setWidgetTextContent('');\n }\n }\n } }, { children: originalTextMessage ? 'Show translation' : 'Show original' })) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_AIWidgets_AIWidgetActions_AIWidgetActions__WEBPACK_IMPORTED_MODULE_15__[\"default\"], { disabled: !waitAITranslateWidget, widgetToRender: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"icon-translate\", style: {\n cursor: !waitAITranslateWidget ? 'pointer' : '',\n } }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Media_Translate__WEBPACK_IMPORTED_MODULE_16__[\"default\"], { width: \"16\", height: \"16\", applyZoom: true, color: \"var(--tertiary-elements)\" }) })), items: _Data_DefaultConfigurations__WEBPACK_IMPORTED_MODULE_18__.DefaultConfigurations.getAdditionalLanguagesForAITranslate(currentContext.InitParams.qbConfig.configAIApi\n .AITranslateWidgetConfig).map(function (item) {\n return {\n title: item,\n action: function () {\n console.log('click translate....');\n if (!waitAITranslateWidget) {\n sendMessageToTranslate(mc, messagesToView, currentUserId, AITranslate, item);\n }\n },\n };\n }) })] }))));\n };\n var renderWidgetAIAssist = function (mc, messagesToView, currentUserId, AIAnswer) {\n return (AIAnswer && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"ai-assist-answer\", style: {\n cursor: !waitAIWidget ? 'pointer' : '',\n } }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"ai-assist-icon\", onClick: function () {\n return sendMessageToAIAssistAnswer(mc, messagesToView, currentUserId, AIAnswer);\n } }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: {\n padding: '5px 3px 5px 3px',\n alignSelf: 'stretch',\n flex: '1',\n position: 'relative',\n overflow: 'visible',\n } }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_AIWidgets_BotIcon_BotIcon__WEBPACK_IMPORTED_MODULE_21__[\"default\"], { width: \"24\", height: \"25\", applyZoom: true, color: \"var(--primary)\" }) })) })) }))));\n };\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ className: \"incoming-text-message\", onMouseEnter: function () { return setHaveHover(true); }, onMouseLeave: function () { return setHaveHover(false); } }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_AvatarContentIncomingUser_AvatarContentIncomingUser__WEBPACK_IMPORTED_MODULE_17__[\"default\"], {}), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ className: \"incoming\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"name\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"caption\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"name2\" }, { children: props.senderName || props.message.sender_id.toString() })) })) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ className: \"message\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ className: \"bubble\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"chat-bubble-background\" }, { children: messageContentRender(props.message, widgetTextContent, props.theme) })), renderWidgetAITranslate(props.message, props.messagesToView, props.currentUserId, props.AITranslation)] })), waitAITranslateWidget ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"assist-answer\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"icon\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: {\n padding: '5px 3px 5px 3px',\n alignSelf: 'stretch',\n flex: '1',\n position: 'relative',\n overflow: 'visible',\n } }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Placeholders_LoaderComponent_LoaderComponent__WEBPACK_IMPORTED_MODULE_14__[\"default\"], { width: \"24\", height: \"24\", applyZoom: true, color: \"var(--caption)\" }) })) })) }))) : null, !waitAITranslateWidget\n ? renderWidgetAIAssist(props.message, props.messagesToView, props.currentUserId, props.AIAnswerToMessage)\n : null, (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"caption3\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"time\" }, { children: (0,_utils_DateTimeFormatter__WEBPACK_IMPORTED_MODULE_3__.getTimeShort24hFormat)(props.message.date_sent) })) }))] }))] }))] })));\n}\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/MessagesView/InComingMessage/InComingMessage.tsx?");
|
|
2108
2336
|
|
|
2109
2337
|
/***/ }),
|
|
2110
2338
|
|
|
@@ -2115,7 +2343,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
2115
2343
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2116
2344
|
|
|
2117
2345
|
"use strict";
|
|
2118
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _MessagesView_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./MessagesView.scss */ \"./src/Presentation/components/UI/Dialogs/MessagesView/MessagesView.scss\");\n/* harmony import */ var _providers_QuickBloxUIKitProvider_useQBConnection__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../providers/QuickBloxUIKitProvider/useQBConnection */ \"./src/Presentation/components/providers/QuickBloxUIKitProvider/useQBConnection.ts\");\n/* harmony import */ var _containers_ScrollableContainer_ScrollableContainer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../containers/ScrollableContainer/ScrollableContainer */ \"./src/Presentation/components/containers/ScrollableContainer/ScrollableContainer.tsx\");\n/* harmony import */ var _Domain_entity_FileTypes__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../../../Domain/entity/FileTypes */ \"./src/Domain/entity/FileTypes.ts\");\n/* harmony import */ var _svgs_Icons_Media_ImageEmpty__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../svgs/Icons/Media/ImageEmpty */ \"./src/Presentation/components/UI/svgs/Icons/Media/ImageEmpty/index.tsx\");\n/* harmony import */ var _svgs_Icons_Toggle_ImagePlay__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../svgs/Icons/Toggle/ImagePlay */ \"./src/Presentation/components/UI/svgs/Icons/Toggle/ImagePlay/index.tsx\");\n/* harmony import */ var _containers_ColumnContainer_ColumnContainer__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../containers/ColumnContainer/ColumnContainer */ \"./src/Presentation/components/containers/ColumnContainer/ColumnContainer.tsx\");\n/* harmony import */ var _svgs_Icons_Media_ImageFile__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../svgs/Icons/Media/ImageFile */ \"./src/Presentation/components/UI/svgs/Icons/Media/ImageFile/index.tsx\");\n/* harmony import */ var _useMessagesViewModel__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./useMessagesViewModel */ \"./src/Presentation/components/UI/Dialogs/MessagesView/useMessagesViewModel.ts\");\n/* harmony import */ var _Placeholders_LoaderComponent_LoaderComponent__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../Placeholders/LoaderComponent/LoaderComponent */ \"./src/Presentation/components/UI/Placeholders/LoaderComponent/LoaderComponent.tsx\");\n/* harmony import */ var _Placeholders_ErrorComponent_ErrorComponent__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Placeholders/ErrorComponent/ErrorComponent */ \"./src/Presentation/components/UI/Placeholders/ErrorComponent/ErrorComponent.tsx\");\n/* harmony import */ var _HeaderMessages_HeaderMessages__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./HeaderMessages/HeaderMessages */ \"./src/Presentation/components/UI/Dialogs/MessagesView/HeaderMessages/HeaderMessages.tsx\");\n/* harmony import */ var _VideoAttachmentComponent_VideoAttachmentComponent__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./VideoAttachmentComponent/VideoAttachmentComponent */ \"./src/Presentation/components/UI/Dialogs/MessagesView/VideoAttachmentComponent/VideoAttachmentComponent.tsx\");\n/* harmony import */ var _ImageAttachmentComponent_ImageAttachmentComponent__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./ImageAttachmentComponent/ImageAttachmentComponent */ \"./src/Presentation/components/UI/Dialogs/MessagesView/ImageAttachmentComponent/ImageAttachmentComponent.tsx\");\n/* harmony import */ var _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../../../../Domain/entity/DialogTypes */ \"./src/Domain/entity/DialogTypes.ts\");\n/* harmony import */ var _providers_QuickBloxUIKitProvider_useQbInitializedDataContext__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../providers/QuickBloxUIKitProvider/useQbInitializedDataContext */ \"./src/Presentation/components/providers/QuickBloxUIKitProvider/useQbInitializedDataContext.ts\");\n/* harmony import */ var _Domain_repository_Pagination__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../../../Domain/repository/Pagination */ \"./src/Domain/repository/Pagination.ts\");\n/* harmony import */ var _utils_DateTimeFormatter__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../../../utils/DateTimeFormatter */ \"./src/utils/DateTimeFormatter.ts\");\n/* harmony import */ var _svgs_ActiveSvg_ActiveSvg__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../svgs/ActiveSvg/ActiveSvg */ \"./src/Presentation/components/UI/svgs/ActiveSvg/ActiveSvg.tsx\");\n/* harmony import */ var _svgs_Icons_Media_Attachment__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../svgs/Icons/Media/Attachment */ \"./src/Presentation/components/UI/svgs/Icons/Media/Attachment/index.tsx\");\n/* harmony import */ var _svgs_Icons_Actions_Send__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../svgs/Icons/Actions/Send */ \"./src/Presentation/components/UI/svgs/Icons/Actions/Send/index.tsx\");\n/* harmony import */ var _AudioAttachmentComponent_AudioAttachmentComponent__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./AudioAttachmentComponent/AudioAttachmentComponent */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AudioAttachmentComponent/AudioAttachmentComponent.tsx\");\n/* harmony import */ var _svgs_Icons_Media_AudioFile__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../svgs/Icons/Media/AudioFile */ \"./src/Presentation/components/UI/svgs/Icons/Media/AudioFile/index.tsx\");\n/* harmony import */ var _svgs_Icons_Actions_Voice__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../svgs/Icons/Actions/Voice */ \"./src/Presentation/components/UI/svgs/Icons/Actions/Voice/index.tsx\");\n/* harmony import */ var _utils_parse__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../../../../utils/parse */ \"./src/utils/parse.ts\");\n/* harmony import */ var _VoiceRecordingProgress_VoiceRecordingProgress__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./VoiceRecordingProgress/VoiceRecordingProgress */ \"./src/Presentation/components/UI/Dialogs/MessagesView/VoiceRecordingProgress/VoiceRecordingProgress.tsx\");\n/* harmony import */ var _HighLightLink_HighLightLink__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./HighLightLink/HighLightLink */ \"./src/Presentation/components/UI/Dialogs/MessagesView/HighLightLink/HighLightLink.tsx\");\n/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../../../../../utils/utils */ \"./src/utils/utils.ts\");\n/* harmony import */ var _OutGoingMessage_OutGoingMessage__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./OutGoingMessage/OutGoingMessage */ \"./src/Presentation/components/UI/Dialogs/MessagesView/OutGoingMessage/OutGoingMessage.tsx\");\n/* harmony import */ var _InComingMessage_InComingMessage__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./InComingMessage/InComingMessage */ \"./src/Presentation/components/UI/Dialogs/MessagesView/InComingMessage/InComingMessage.tsx\");\n/* harmony import */ var _AIWidgets_Tone__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./AIWidgets/Tone */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/Tone.ts\");\n/* harmony import */ var _svgs_Icons_AIWidgets_NecktieIcon__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../../svgs/Icons/AIWidgets/NecktieIcon */ \"./src/Presentation/components/UI/svgs/Icons/AIWidgets/NecktieIcon/index.tsx\");\n/* harmony import */ var _svgs_Icons_AIWidgets_HandshakeIcon__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../../svgs/Icons/AIWidgets/HandshakeIcon */ \"./src/Presentation/components/UI/svgs/Icons/AIWidgets/HandshakeIcon/index.tsx\");\n/* harmony import */ var _svgs_Icons_AIWidgets_WhiteCheckMarkIcon__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../../svgs/Icons/AIWidgets/WhiteCheckMarkIcon */ \"./src/Presentation/components/UI/svgs/Icons/AIWidgets/WhiteCheckMarkIcon/index.tsx\");\n/* harmony import */ var _svgs_Icons_AIWidgets_MuscleIcon__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../../svgs/Icons/AIWidgets/MuscleIcon */ \"./src/Presentation/components/UI/svgs/Icons/AIWidgets/MuscleIcon/index.tsx\");\n/* harmony import */ var _svgs_Icons_AIWidgets_PalmsUpTogetherIcon__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../../svgs/Icons/AIWidgets/PalmsUpTogetherIcon */ \"./src/Presentation/components/UI/svgs/Icons/AIWidgets/PalmsUpTogetherIcon/index.tsx\");\n/* harmony import */ var _svgs_Icons_AIWidgets_NeutralFaceIcon__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../../svgs/Icons/AIWidgets/NeutralFaceIcon */ \"./src/Presentation/components/UI/svgs/Icons/AIWidgets/NeutralFaceIcon/index.tsx\");\n/* harmony import */ var _svgs_Icons_AIWidgets_HammerIcon__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ../../svgs/Icons/AIWidgets/HammerIcon */ \"./src/Presentation/components/UI/svgs/Icons/AIWidgets/HammerIcon/index.tsx\");\n/* harmony import */ var _svgs_Icons_AIWidgets_BookIcon_BookIcon__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ../../svgs/Icons/AIWidgets/BookIcon/BookIcon */ \"./src/Presentation/components/UI/svgs/Icons/AIWidgets/BookIcon/BookIcon.tsx\");\n/* harmony import */ var _svgs_Icons_AIWidgets_PointUpIcon__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ../../svgs/Icons/AIWidgets/PointUpIcon */ \"./src/Presentation/components/UI/svgs/Icons/AIWidgets/PointUpIcon/index.tsx\");\n/* harmony import */ var _svgs_Icons_AIWidgets_SmirkIcon__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ../../svgs/Icons/AIWidgets/SmirkIcon */ \"./src/Presentation/components/UI/svgs/Icons/AIWidgets/SmirkIcon/index.tsx\");\n/* harmony import */ var _svgs_Icons_AIWidgets_PerformingArtsIcon__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ../../svgs/Icons/AIWidgets/PerformingArtsIcon */ \"./src/Presentation/components/UI/svgs/Icons/AIWidgets/PerformingArtsIcon/index.tsx\");\n/* harmony import */ var _AIWidgets_AIWidgetActions_AIWidgetActions__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./AIWidgets/AIWidgetActions/AIWidgetActions */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/AIWidgetActions/AIWidgetActions.tsx\");\n/* harmony import */ var _svgs_Icons_Actions_Tone__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ../../svgs/Icons/Actions/Tone */ \"./src/Presentation/components/UI/svgs/Icons/Actions/Tone/index.tsx\");\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// eslint-disable-next-line react/function-component-definition\nvar MessagesView = function (_a) {\n var _b, _c, _d;\n var \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n AIRephrase = _a.AIRephrase, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n AITranslate = _a.AITranslate, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n AIAssist = _a.AIAssist, dialogsViewModel = _a.dialogsViewModel, onDialogInformationHandler = _a.onDialogInformationHandler, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _e = _a.maxWidthToResize, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n maxWidthToResize = _e === void 0 ? undefined : _e, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _f = _a.theme, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n theme = _f === void 0 ? undefined : _f, _g = _a.subHeaderContent, subHeaderContent = _g === void 0 ? undefined : _g, _h = _a.upHeaderContent, upHeaderContent = _h === void 0 ? undefined : _h;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n var maxWidthToResizing = maxWidthToResize || '$message-view-container-wrapper-min-width';\n // const maxWidthToResizing = '720px'; // $message-view-container-wrapper-min-width:\n var currentContext = (0,_providers_QuickBloxUIKitProvider_useQbInitializedDataContext__WEBPACK_IMPORTED_MODULE_17__[\"default\"])();\n var currentUserId = (_b = currentContext.storage.REMOTE_DATA_SOURCE.authInformation) === null || _b === void 0 ? void 0 : _b.userId;\n var currentUserName = (_c = currentContext.storage.REMOTE_DATA_SOURCE.authInformation) === null || _c === void 0 ? void 0 : _c.userName;\n // const translations: Record<number, string> = {};\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n var _j = (0,_providers_QuickBloxUIKitProvider_useQBConnection__WEBPACK_IMPORTED_MODULE_3__[\"default\"])(), connectionRepository = _j.connectionRepository, browserOnline = _j.browserOnline;\n var _k = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(100), dialogMessagesCount = _k[0], setDialogMessageCount = _k[1];\n var _l = react__WEBPACK_IMPORTED_MODULE_1___default().useState(true), hasMore = _l[0], setHasMore = _l[1];\n var _m = react__WEBPACK_IMPORTED_MODULE_1___default().useState(false), scrollUpToDown = _m[0], setScrollUpToDown = _m[1];\n var _o = react__WEBPACK_IMPORTED_MODULE_1___default().useState([]), messagesToView = _o[0], setMessagesToView = _o[1];\n var _p = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false), waitAIWidget = _p[0], setWaitAIWidget = _p[1];\n var messageEntitiesToIChatMessageCollection = function (messageEntities) {\n var MAX_TOKENS = 3584;\n var items = messageEntities.filter(function (it) {\n return !it.notification_type ||\n (it.notification_type && it.notification_type.length === 0);\n });\n var messages = (0,_utils_utils__WEBPACK_IMPORTED_MODULE_29__.loopToLimitTokens)(MAX_TOKENS, items, function (_a) {\n var message = _a.message;\n return message || '';\n }).reverse();\n var chatCompletionMessages = messages.map(function (_a) {\n var message = _a.message, sender_id = _a.sender_id;\n return ({\n role: sender_id === currentUserId ? 'user' : 'assistant',\n content: message,\n });\n });\n //\n return chatCompletionMessages;\n };\n var messagesViewModel = (0,_useMessagesViewModel__WEBPACK_IMPORTED_MODULE_10__[\"default\"])((_d = dialogsViewModel.entity) === null || _d === void 0 ? void 0 : _d.type, dialogsViewModel.entity);\n var maxFileSize = currentContext.InitParams.maxFileSize;\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n console.log('HAVE NEW DIALOG');\n // messagesViewModel.getMessages(new Pagination());\n messagesViewModel.entity = dialogsViewModel.entity;\n setMessagesToView([]);\n }, [dialogsViewModel.entity]);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n console.log('HAVE NEW ENTITY');\n messagesViewModel.getMessages(new _Domain_repository_Pagination__WEBPACK_IMPORTED_MODULE_18__.Pagination());\n }, [messagesViewModel.entity]);\n //\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n console.log('HAVE NEW ENTITY');\n dialogsViewModel.setWaitLoadingStatus(messagesViewModel === null || messagesViewModel === void 0 ? void 0 : messagesViewModel.loading);\n }, [messagesViewModel === null || messagesViewModel === void 0 ? void 0 : messagesViewModel.loading]);\n //\n function prepareFirstPage(initData) {\n var firstPageSize = messagesViewModel.messages.length < 47\n ? messagesViewModel.messages.length\n : 47;\n // for (let i = 0; i < firstPageSize; i += 1) {\n for (var i = firstPageSize - 1; i >= 0; i -= 1) {\n initData.push(messagesViewModel.messages[i]);\n }\n }\n var fetchMoreData = function () {\n if (messagesToView.length >= dialogMessagesCount) {\n setHasMore(false);\n return;\n }\n if (hasMore &&\n messagesToView.length > 0 &&\n messagesToView.length < dialogMessagesCount) {\n setMessagesToView(function (prevState) {\n var newState = __spreadArray([], prevState, true);\n var newMessageEntity = messagesViewModel.messages[prevState.length];\n newState.push(newMessageEntity);\n return newState;\n });\n }\n };\n //\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n var _a;\n console.log('Messages have changed');\n setDialogMessageCount(((_a = messagesViewModel === null || messagesViewModel === void 0 ? void 0 : messagesViewModel.messages) === null || _a === void 0 ? void 0 : _a.length) || 0);\n if ((messagesToView === null || messagesToView === void 0 ? void 0 : messagesToView.length) === 0 && messagesViewModel.messages.length > 0) {\n // setDialogMessageCount(messagesViewModel.messages.length);\n var initData = [];\n console.log(JSON.stringify(messagesViewModel.messages));\n prepareFirstPage(initData);\n setMessagesToView(initData);\n }\n else if (messagesViewModel.messages.length - messagesToView.length >= 1) {\n setHasMore(true);\n setScrollUpToDown(true);\n }\n }, [messagesViewModel.messages]);\n //\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n console.log('dialogMessagesCount have changed');\n if (messagesViewModel.messages.length - messagesToView.length >= 1) {\n fetchMoreData();\n }\n }, [dialogMessagesCount]);\n //\n var getSenderName = function (sender) {\n if (!sender)\n return undefined;\n return (sender.full_name || sender.login || sender.email || sender.id.toString());\n };\n // function sendMessageToTranslate(message: MessageEntity) {\n // if (!waitAIWidget) {\n // setWaitAIWidget(true);\n // AITranslation?.textToWidget(\n // message.message,\n // messageEntitiesToIChatMessageCollection(messagesToView),\n // );\n // }\n // }\n //\n // function sendMessageToAIAssistAnswer(message: MessageEntity) {\n // if (!waitAIWidget) {\n // setWaitAIWidget(true);\n // AIAnswerToMessage?.textToWidget(\n // message.message,\n // messageEntitiesToIChatMessageCollection(messagesToView),\n // );\n // }\n // }\n var renderMessage = function (message, index) {\n var SystemMessage = 'SystemMessage';\n var IncomingMessage = 'IncomingMessage';\n var OutgoingMessage = 'OutgoingMessage';\n console.log('render message: ', JSON.stringify(message), ' index: ', index);\n var messageView;\n var checkMessageType = function (m) {\n if (m.notification_type && m.notification_type.length > 0) {\n return SystemMessage;\n }\n if ((m.sender && m.sender.id.toString() !== (currentUserId === null || currentUserId === void 0 ? void 0 : currentUserId.toString())) ||\n m.sender_id.toString() !== (currentUserId === null || currentUserId === void 0 ? void 0 : currentUserId.toString())) {\n return IncomingMessage;\n }\n return OutgoingMessage;\n };\n var messageTypes = checkMessageType(message);\n var messageContentRender = function (mc) {\n var messageText = (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: mc.message });\n var messageContent = messageText;\n var attachmentContentRender = function (att) {\n var contentPlaceHolder = (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: att.type.toString() });\n if (att.type.toString().includes(_Domain_entity_FileTypes__WEBPACK_IMPORTED_MODULE_5__.FileType.video)) {\n contentPlaceHolder = att.file ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_VideoAttachmentComponent_VideoAttachmentComponent__WEBPACK_IMPORTED_MODULE_14__[\"default\"], { videoFile: att.file })) : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Toggle_ImagePlay__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {}));\n }\n if (att.type.toString().includes(_Domain_entity_FileTypes__WEBPACK_IMPORTED_MODULE_5__.FileType.audio)) {\n contentPlaceHolder = att.file ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_AudioAttachmentComponent_AudioAttachmentComponent__WEBPACK_IMPORTED_MODULE_23__[\"default\"], { audioFile: att.file })) : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Media_AudioFile__WEBPACK_IMPORTED_MODULE_24__[\"default\"], {}));\n }\n if (att.type.toString().includes(_Domain_entity_FileTypes__WEBPACK_IMPORTED_MODULE_5__.FileType.image)) {\n contentPlaceHolder = att.file ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ImageAttachmentComponent_ImageAttachmentComponent__WEBPACK_IMPORTED_MODULE_15__[\"default\"], { imageFile: att.file })) : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Media_ImageEmpty__WEBPACK_IMPORTED_MODULE_6__[\"default\"], {}));\n }\n if (att.type.toString().includes(_Domain_entity_FileTypes__WEBPACK_IMPORTED_MODULE_5__.FileType.text)) {\n contentPlaceHolder = att.file ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: \"TEXT\" })) : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Media_ImageFile__WEBPACK_IMPORTED_MODULE_9__[\"default\"], { applyZoom: true }));\n }\n var contentResult = ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"message-view-container--message-content-wrapper\" }, { children: contentPlaceHolder })));\n if (att.type === _Domain_entity_FileTypes__WEBPACK_IMPORTED_MODULE_5__.FileType.text) {\n contentResult = ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ className: \"message-view-container--file-message-content-wrapper\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: theme ? { backgroundColor: theme.caption() } : {}, className: \"message-view-container__file-message-icon\" }, { children: contentPlaceHolder })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: att.name || 'file' })] })));\n }\n return contentResult;\n };\n if (mc.attachments && mc.attachments.length > 0) {\n messageContent = ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_containers_ColumnContainer_ColumnContainer__WEBPACK_IMPORTED_MODULE_8__[\"default\"], __assign({ maxWidth: \"100%\" }, { children: [mc.attachments.map(function (attachment) {\n return attachmentContentRender(attachment);\n }), messageText] })));\n }\n if ((0,_HighLightLink_HighLightLink__WEBPACK_IMPORTED_MODULE_28__.messageHasUrls)(mc.message) &&\n !(mc.attachments && mc.attachments.length > 0)) {\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HighLightLink_HighLightLink__WEBPACK_IMPORTED_MODULE_28__.HighLightLink, { messageText: mc.message });\n }\n return messageContent;\n };\n if (messageTypes === SystemMessage) {\n messageView = ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ className: \"message-view-container--system-message-wrapper\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: theme ? { backgroundColor: theme.disabledElements() } : {}, className: \"message-view-container--system-message-wrapper__date_container\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", { children: [(0,_utils_DateTimeFormatter__WEBPACK_IMPORTED_MODULE_19__.getDateShortFormatEU)(message.date_sent), \",\"] }) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: message.message })] }), message.id));\n }\n else if (messageTypes === IncomingMessage) {\n messageView = ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_InComingMessage_InComingMessage__WEBPACK_IMPORTED_MODULE_31__.InComingMessage, { theme: theme, senderName: getSenderName(message.sender), message: message, \n // element={messageContentRender(message)}\n onLoader: function () {\n // sendMessageToTranslate(message);\n setWaitAIWidget(true);\n }, \n // renderWidget={\n // <ContextMenu\n // widgetToRender={\n // <AIWidgetIcon applyZoom color=\"var(--main-elements)\" />\n // }\n // items={[\n // {\n // title: 'AI Assist Answer',\n // action: () => {\n // sendMessageToAIAssistAnswer(message);\n // },\n // },\n // {\n // title: 'AI Translate',\n // action: () => {\n // sendMessageToTranslate(message);\n // },\n // },\n // ]}\n // />\n // }\n currentUserId: currentUserId, messagesToView: messagesToView, AITranslation: AITranslate, AIAnswerToMessage: AIAssist }, message.id));\n }\n else {\n messageView = ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_OutGoingMessage_OutGoingMessage__WEBPACK_IMPORTED_MODULE_30__.OutGoingMessage, { message: message, theme: theme, element: messageContentRender(message) }, message.id));\n }\n return messageView;\n };\n var getCountDialogMembers = function (dialogEntity) {\n var participants = [];\n if (dialogEntity.type === _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_16__.DialogType.group) {\n participants = dialogEntity.participantIds;\n }\n else if (dialogEntity.type === _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_16__.DialogType[\"private\"]) {\n participants = [dialogEntity.participantId];\n }\n else if (dialogEntity.type === _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_16__.DialogType[\"public\"]) {\n participants = [];\n }\n return participants.length;\n };\n var _q = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null), fileToSend = _q[0], setFileToSend = _q[1];\n var _r = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''), messageText = _r[0], setMessageText = _r[1];\n var _s = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''), warningErrorText = _s[0], setWarningErrorText = _s[1];\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n var _t = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''), widgetTextContent = _t[0], setWidgetTextContent = _t[1];\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n setWarningErrorText(messagesViewModel.typingText);\n }, [messagesViewModel.typingText]);\n var ChangeFileHandler = function (event) {\n var reader = new FileReader();\n var file = event.currentTarget.files\n ? event.currentTarget.files[0]\n : null;\n reader.onloadend = function () {\n setFileToSend(file);\n };\n if (file !== null)\n reader.readAsDataURL(file);\n };\n var showErrorMessage = function (errorMessage) {\n setWarningErrorText(errorMessage);\n setTimeout(function () {\n setWarningErrorText('');\n }, 3000);\n };\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n console.log('have Attachments');\n var MAXSIZE = maxFileSize || 90 * 1000000;\n var MAXSIZE_FOR_MESSAGE = MAXSIZE / (1024 * 1024);\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n var flag = (fileToSend === null || fileToSend === void 0 ? void 0 : fileToSend.size) && (fileToSend === null || fileToSend === void 0 ? void 0 : fileToSend.size) < MAXSIZE;\n if ((fileToSend === null || fileToSend === void 0 ? void 0 : fileToSend.size) && (fileToSend === null || fileToSend === void 0 ? void 0 : fileToSend.size) < MAXSIZE) {\n messagesViewModel.sendAttachmentMessage(fileToSend);\n }\n else if (fileToSend) {\n showErrorMessage(\"file size \".concat(fileToSend === null || fileToSend === void 0 ? void 0 : fileToSend.size, \" must be less then \").concat(MAXSIZE_FOR_MESSAGE, \" mb.\"));\n }\n }, [fileToSend]);\n var _u = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(true), isVoiceMessage = _u[0], setVoiceMessage = _u[1];\n var _v = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false), isRecording = _v[0], setIsRecording = _v[1];\n //\n var _w = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false), permission = _w[0], setPermission = _w[1];\n // const [recordingStatus, setRecordingStatus] = useState('inactive');\n var _x = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(), stream = _x[0], setStream = _x[1];\n // const [mediaRecorder, setMediaRecorder] = useState<MediaRecorder>();\n var mediaRecorder = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)();\n var _y = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(), resultAudioBlob = _y[0], setResultAudioBlob = _y[1];\n var _z = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]), audioChunks = _z[0], setAudioChunks = _z[1];\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n var mimeType = 'audio/webm;codecs=opus'; // audio/ogg audio/mpeg audio/webm audio/x-wav audio/mp4\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n var getMicrophonePermission = function () { return __awaiter(void 0, void 0, void 0, function () {\n var mediaStream, err_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!window) return [3 /*break*/, 5];\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, navigator.mediaDevices.getUserMedia({\n audio: true,\n video: false,\n })];\n case 2:\n mediaStream = _a.sent();\n setPermission(true);\n setStream(mediaStream);\n return [3 /*break*/, 4];\n case 3:\n err_1 = _a.sent();\n // setWarningErrorText(\n // 'The MediaRecorder API is not supported in your browser.',\n // );\n showErrorMessage(\"The MediaRecorder API throws exception \".concat((0,_utils_parse__WEBPACK_IMPORTED_MODULE_26__.stringifyError)(err_1), \" .\"));\n return [3 /*break*/, 4];\n case 4: return [3 /*break*/, 6];\n case 5:\n // setWarningErrorText(\n // 'The MediaRecorder API is not supported in your browser.',\n // );\n showErrorMessage('The MediaRecorder API is not supported in your browser.');\n _a.label = 6;\n case 6: return [2 /*return*/];\n }\n });\n }); };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/require-await\n var startRecording = function () { return __awaiter(void 0, void 0, void 0, function () {\n var mimeContent, media, localAudioChunks;\n return __generator(this, function (_a) {\n if (!stream)\n return [2 /*return*/];\n mimeContent = window.MediaRecorder.isTypeSupported('audio/mp4;codecs=mp4a')\n ? 'audio/mp4;codecs=mp4a'\n : 'audio/webm;codecs=opus';\n media = new MediaRecorder(stream, { mimeType: mimeContent });\n mediaRecorder.current = media;\n mediaRecorder.current.start();\n localAudioChunks = [];\n mediaRecorder.current.ondataavailable = function (event) {\n // const localAudioChunks: any[] = [];\n if (typeof event.data === 'undefined')\n return;\n if (event.data.size === 0)\n return;\n localAudioChunks.push(event.data);\n console.log('voice data');\n // setAudioChunks(localAudioChunks);\n };\n setAudioChunks(localAudioChunks);\n return [2 /*return*/];\n });\n }); };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n var stopRecording = function () {\n if (!mediaRecorder.current)\n return;\n // setRecordingStatus('inactive');\n mediaRecorder.current.stop();\n mediaRecorder.current.onstop = function () {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n var mimeContent = window.MediaRecorder.isTypeSupported('audio/mp4;codecs=mp4a')\n ? 'audio/mp4;codecs=mp4a'\n : 'audio/webm;codecs=opus';\n // const audioBlob = new Blob(audioChunks, { type: mimeContent }); // mimeType\n // const mp4Blob = new Blob(recordedChunks, { type: 'video/mp4' });\n // const audioBlob = new Blob(audioChunks, { type: 'video/mp4' }); // mimeType\n var audioBlob = new Blob(audioChunks, { type: 'audio/mp4' }); // mimeType\n setResultAudioBlob(audioBlob);\n setAudioChunks([]);\n //\n stream === null || stream === void 0 ? void 0 : stream.getAudioTracks().forEach(function (track) {\n track.stop();\n });\n setPermission(false);\n //\n };\n };\n //\n var blobToFile = function (theBlob, fileName) {\n var b = theBlob;\n // A Blob() is almost a File() - it's just missing the two properties below which we will add\n b.lastModifiedDate = new Date();\n b.name = fileName;\n // Cast to a File() type\n var resultFile = theBlob;\n return resultFile;\n };\n var _0 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false), useAudioWidget = _0[0], setUseAudioWidget = _0[1];\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n var fileExt = 'mp4';\n if (resultAudioBlob) {\n var voiceMessage = blobToFile(resultAudioBlob, \"\".concat(currentUserName || '', \"_voice_message.\").concat(fileExt));\n setFileToSend(voiceMessage);\n if (useAudioWidget) {\n setUseAudioWidget(false);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n // AITranslation?.fileToWidget(\n // voiceMessage,\n // messageEntitiesToIChatMessageCollection(messagesToView),\n // );\n }\n //\n }\n }, [resultAudioBlob]);\n // test component version\n // useEffect(() => {\n // if (isRecording) {\n // setWarningErrorText(`Your voice is recording during for 1 minute`);\n // } else {\n // setWarningErrorText('');\n // }\n // }, [isRecording]);\n // work version below:\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n // setFileToSend(null);\n if (isRecording) {\n if (!permission) {\n // eslint-disable-next-line promise/catch-or-return,promise/always-return\n getMicrophonePermission().catch(function () {\n // setWarningErrorText(`Have no audio.`);\n showErrorMessage(\"Have no audio.\");\n });\n }\n else {\n // eslint-disable-next-line promise/catch-or-return,promise/always-return\n startRecording().then(function () {\n setWarningErrorText(\"Your voice is recording during for 1 minutes\");\n });\n }\n }\n else {\n if (permission && mediaRecorder.current) {\n stopRecording();\n }\n setWarningErrorText('');\n }\n }, [isRecording]);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n if (isRecording && permission) {\n // eslint-disable-next-line promise/always-return,promise/catch-or-return\n startRecording().then(function () {\n setWarningErrorText(\"Your voice is recording during for 1 minutes\");\n });\n }\n }, [permission]);\n function sendTextMessageActions() {\n if (messagesViewModel === null || messagesViewModel === void 0 ? void 0 : messagesViewModel.loading)\n return;\n setVoiceMessage(true);\n if (messageText.length > 0 && messageText.length <= 1000) {\n var messageTextToSend = messageText;\n setMessageText('');\n messagesViewModel.sendTextMessage(messageTextToSend);\n setMessageText('');\n }\n else {\n setWarningErrorText('length of text message must be less then 1000 chars.');\n setTimeout(function () {\n setWarningErrorText('');\n }, 3000);\n }\n }\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n setWaitAIWidget(false);\n if ((AIRephrase === null || AIRephrase === void 0 ? void 0 : AIRephrase.textToContent) && (AIRephrase === null || AIRephrase === void 0 ? void 0 : AIRephrase.textToContent.length) > 0) {\n setMessageText(AIRephrase === null || AIRephrase === void 0 ? void 0 : AIRephrase.textToContent);\n setWidgetTextContent(AIRephrase === null || AIRephrase === void 0 ? void 0 : AIRephrase.textToContent);\n setTimeout(function () {\n setWidgetTextContent('');\n }, 45 * 1000);\n }\n }, [AIRephrase === null || AIRephrase === void 0 ? void 0 : AIRephrase.textToContent]);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n setWaitAIWidget(false);\n // if (\n // AITranslation?.textToContent &&\n // AITranslation?.textToContent.length > 0\n // ) {\n // setMessageText(AITranslation?.textToContent);\n // setWidgetTextContent(AITranslation?.textToContent);\n // setTimeout(() => {\n // setWidgetTextContent('');\n // }, 45 * 1000);\n // }\n }, [AITranslate === null || AITranslate === void 0 ? void 0 : AITranslate.textToContent]);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n setWaitAIWidget(false);\n if ((AIAssist === null || AIAssist === void 0 ? void 0 : AIAssist.textToContent) && (AIAssist === null || AIAssist === void 0 ? void 0 : AIAssist.textToContent.length) > 0) {\n setMessageText(AIAssist === null || AIAssist === void 0 ? void 0 : AIAssist.textToContent);\n setWidgetTextContent(AIAssist === null || AIAssist === void 0 ? void 0 : AIAssist.textToContent);\n setTimeout(function () {\n setWidgetTextContent('');\n }, 45 * 1000);\n }\n }, [AIAssist === null || AIAssist === void 0 ? void 0 : AIAssist.textToContent]);\n var useSubContent = subHeaderContent || false;\n var useUpContent = upHeaderContent || false;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n function getAIEditingMessagesItems() {\n return [\n {\n title: 'Professional Tone',\n icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_AIWidgets_NecktieIcon__WEBPACK_IMPORTED_MODULE_33__[\"default\"], {}),\n action: function () {\n if (messageText && messageText.length > 0 && !waitAIWidget) {\n setWaitAIWidget(true);\n AIRephrase === null || AIRephrase === void 0 ? void 0 : AIRephrase.textToWidget(messageText, messageEntitiesToIChatMessageCollection(messagesToView), { tone: _AIWidgets_Tone__WEBPACK_IMPORTED_MODULE_32__.Tone.Professional });\n }\n },\n },\n {\n title: 'Friendly Tone',\n icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_AIWidgets_HandshakeIcon__WEBPACK_IMPORTED_MODULE_34__[\"default\"], {}),\n action: function () {\n if (messageText && messageText.length > 0 && !waitAIWidget) {\n setWaitAIWidget(true);\n AIRephrase === null || AIRephrase === void 0 ? void 0 : AIRephrase.textToWidget(messageText, messageEntitiesToIChatMessageCollection(messagesToView), { tone: _AIWidgets_Tone__WEBPACK_IMPORTED_MODULE_32__.Tone.Friendly });\n }\n },\n },\n {\n title: 'Encouraging Tone',\n icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_AIWidgets_MuscleIcon__WEBPACK_IMPORTED_MODULE_36__[\"default\"], {}),\n action: function () {\n if (messageText && messageText.length > 0 && !waitAIWidget) {\n setWaitAIWidget(true);\n AIRephrase === null || AIRephrase === void 0 ? void 0 : AIRephrase.textToWidget(messageText, messageEntitiesToIChatMessageCollection(messagesToView), { tone: _AIWidgets_Tone__WEBPACK_IMPORTED_MODULE_32__.Tone.Encouraging });\n }\n },\n },\n {\n title: 'Empathetic Tone',\n icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_AIWidgets_PalmsUpTogetherIcon__WEBPACK_IMPORTED_MODULE_37__[\"default\"], {}),\n action: function () {\n if (messageText && messageText.length > 0 && !waitAIWidget) {\n setWaitAIWidget(true);\n AIRephrase === null || AIRephrase === void 0 ? void 0 : AIRephrase.textToWidget(messageText, messageEntitiesToIChatMessageCollection(messagesToView), { tone: _AIWidgets_Tone__WEBPACK_IMPORTED_MODULE_32__.Tone.Empathetic });\n }\n },\n },\n {\n title: 'Neutral Tone',\n icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_AIWidgets_NeutralFaceIcon__WEBPACK_IMPORTED_MODULE_38__[\"default\"], {}),\n action: function () {\n if (messageText && messageText.length > 0 && !waitAIWidget) {\n setWaitAIWidget(true);\n AIRephrase === null || AIRephrase === void 0 ? void 0 : AIRephrase.textToWidget(messageText, messageEntitiesToIChatMessageCollection(messagesToView), { tone: _AIWidgets_Tone__WEBPACK_IMPORTED_MODULE_32__.Tone.Neutral });\n }\n },\n },\n {\n title: 'Assertive Tone',\n icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_AIWidgets_HammerIcon__WEBPACK_IMPORTED_MODULE_39__[\"default\"], {}),\n action: function () {\n if (messageText && messageText.length > 0 && !waitAIWidget) {\n setWaitAIWidget(true);\n AIRephrase === null || AIRephrase === void 0 ? void 0 : AIRephrase.textToWidget(messageText, messageEntitiesToIChatMessageCollection(messagesToView), { tone: _AIWidgets_Tone__WEBPACK_IMPORTED_MODULE_32__.Tone.Assertive });\n }\n },\n },\n {\n title: 'Instructive Tone',\n icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_AIWidgets_BookIcon_BookIcon__WEBPACK_IMPORTED_MODULE_40__[\"default\"], {}),\n action: function () {\n if (messageText && messageText.length > 0 && !waitAIWidget) {\n setWaitAIWidget(true);\n AIRephrase === null || AIRephrase === void 0 ? void 0 : AIRephrase.textToWidget(messageText, messageEntitiesToIChatMessageCollection(messagesToView), { tone: _AIWidgets_Tone__WEBPACK_IMPORTED_MODULE_32__.Tone.Instructive });\n }\n },\n },\n {\n title: 'Persuasive Tone',\n icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_AIWidgets_PointUpIcon__WEBPACK_IMPORTED_MODULE_41__[\"default\"], {}),\n action: function () {\n if (messageText && messageText.length > 0 && !waitAIWidget) {\n setWaitAIWidget(true);\n AIRephrase === null || AIRephrase === void 0 ? void 0 : AIRephrase.textToWidget(messageText, messageEntitiesToIChatMessageCollection(messagesToView), { tone: _AIWidgets_Tone__WEBPACK_IMPORTED_MODULE_32__.Tone.Persuasive });\n }\n },\n },\n {\n title: 'Sarcastic/Ironic Tone',\n icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_AIWidgets_SmirkIcon__WEBPACK_IMPORTED_MODULE_42__[\"default\"], {}),\n action: function () {\n if (messageText && messageText.length > 0 && !waitAIWidget) {\n setWaitAIWidget(true);\n AIRephrase === null || AIRephrase === void 0 ? void 0 : AIRephrase.textToWidget(messageText, messageEntitiesToIChatMessageCollection(messagesToView), { tone: _AIWidgets_Tone__WEBPACK_IMPORTED_MODULE_32__.Tone.Sarcastic });\n }\n },\n },\n {\n title: 'Poetic Tone',\n icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_AIWidgets_PerformingArtsIcon__WEBPACK_IMPORTED_MODULE_43__[\"default\"], {}),\n action: function () {\n if (messageText && messageText.length > 0 && !waitAIWidget) {\n setWaitAIWidget(true);\n AIRephrase === null || AIRephrase === void 0 ? void 0 : AIRephrase.textToWidget(messageText, messageEntitiesToIChatMessageCollection(messagesToView), { tone: _AIWidgets_Tone__WEBPACK_IMPORTED_MODULE_32__.Tone.Poetic });\n }\n },\n },\n {\n title: 'Back to original text',\n icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_AIWidgets_WhiteCheckMarkIcon__WEBPACK_IMPORTED_MODULE_35__[\"default\"], {}),\n action: function () {\n if (messageText && messageText.length > 0 && !waitAIWidget) {\n setWaitAIWidget(true);\n AIRephrase === null || AIRephrase === void 0 ? void 0 : AIRephrase.textToWidget(messageText, messageEntitiesToIChatMessageCollection(messagesToView), { tone: _AIWidgets_Tone__WEBPACK_IMPORTED_MODULE_32__.Tone.Unchanged });\n }\n },\n },\n ];\n }\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ style: maxWidthToResize\n ? {\n maxWidth: \"\".concat(maxWidthToResizing),\n minWidth: \"$message-view-container-wrapper-min-width\",\n // width: `${maxWidthToResizing}`,\n width: '100%',\n }\n : {}, className: \"message-view-container\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ style: {\n flexGrow: \"1\",\n flexShrink: \"1\",\n flexBasis: \"\".concat(maxWidthToResizing),\n }, className: \"message-view-container--header\" }, { children: [useUpContent && upHeaderContent, (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HeaderMessages_HeaderMessages__WEBPACK_IMPORTED_MODULE_13__[\"default\"], { dialog: messagesViewModel.entity, InformationHandler: onDialogInformationHandler, countMembers: getCountDialogMembers(dialogsViewModel.entity) }), useSubContent && subHeaderContent] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ style: theme\n ? {\n flexGrow: \"1\",\n flexShrink: \"1\",\n flexBasis: \"\".concat(maxWidthToResizing),\n backgroundColor: theme.secondaryBackground(), // var(--secondary-background);\n }\n : {\n flexGrow: \"1\",\n flexShrink: \"1\",\n flexBasis: \"\".concat(maxWidthToResizing),\n }, className: \"message-view-container--messages\" }, { children: [(messagesViewModel === null || messagesViewModel === void 0 ? void 0 : messagesViewModel.error) && !messagesViewModel.loading && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Placeholders_ErrorComponent_ErrorComponent__WEBPACK_IMPORTED_MODULE_12__[\"default\"], { title: messagesViewModel === null || messagesViewModel === void 0 ? void 0 : messagesViewModel.error, ClickActionHandler: function () {\n alert('call click retry');\n } })), messagesViewModel &&\n messagesViewModel.messages &&\n messagesViewModel.messages.length > 0 &&\n messagesToView &&\n messagesToView.length > 0 && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_containers_ScrollableContainer_ScrollableContainer__WEBPACK_IMPORTED_MODULE_4__[\"default\"], { data: messagesToView, renderItem: renderMessage, onEndReached: fetchMoreData, onEndReachedThreshold: 0.8, refreshing: messagesViewModel === null || messagesViewModel === void 0 ? void 0 : messagesViewModel.loading, autoScrollToBottom: scrollUpToDown })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n } }, { children: (messagesViewModel === null || messagesViewModel === void 0 ? void 0 : messagesViewModel.loading) && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: {\n height: '44px',\n width: '44px',\n } }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Placeholders_LoaderComponent_LoaderComponent__WEBPACK_IMPORTED_MODULE_11__[\"default\"], { width: \"44\", height: \"44\", color: \"var(--color-background-info)\" }) }))) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: theme ? { color: theme.mainElements() } : {}, className: \"message-view-container--warning-error\" }, { children: warningErrorText }))] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ style: {\n flex: \"flex: 1 1 \".concat(maxWidthToResizing),\n }, onBlur: function () {\n if (!(messageText && messageText.length > 0)) {\n setVoiceMessage(true);\n }\n }, className: \"message-view-container--chat-input\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"label\", __assign({ htmlFor: \"btnUploadAttachment\", style: {\n cursor: 'pointer',\n } }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_ActiveSvg_ActiveSvg__WEBPACK_IMPORTED_MODULE_20__[\"default\"], { content: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Media_Attachment__WEBPACK_IMPORTED_MODULE_21__[\"default\"], { width: \"32\", height: \"32\", applyZoom: true, color: theme ? theme.inputElements() : 'var(--input-elements)' }), clickAction: function () {\n console.log('click send message');\n }, touchAction: function () {\n console.log('touch send message');\n } }) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"input\", { id: \"btnUploadAttachment\", type: \"file\", accept: \"image/*, audio/*, video/*, .pdf, .txt,\", style: { display: 'none' }, onChange: function (event) {\n ChangeFileHandler(event);\n } })] })), !isRecording && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ className: \"input-text-message\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"type-message\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"textarea\", { style: theme ? { backgroundColor: theme.chatInput() } : {}, disabled: messagesViewModel === null || messagesViewModel === void 0 ? void 0 : messagesViewModel.loading, value: messageText, onFocus: function () {\n setVoiceMessage(false);\n }, onChange: function (event) {\n setMessageText(event.target.value);\n }, onInput: function () {\n messagesViewModel.sendTypingTextMessage();\n }, onKeyDown: function (e) {\n console.log(\"onKeyDown: \".concat(e.key, \" shift \").concat(e.shiftKey ? 'true' : 'false', \" ctrl \").concat(e.ctrlKey ? 'true' : 'false'));\n if (e.key === 'Enter' && !e.shiftKey && !e.ctrlKey) {\n sendTextMessageActions();\n }\n }, placeholder: \"enter text to send\" }) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"right\" }, { children: AIRephrase && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"icon\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_AIWidgets_AIWidgetActions_AIWidgetActions__WEBPACK_IMPORTED_MODULE_44__[\"default\"], { widgetToRender: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Actions_Tone__WEBPACK_IMPORTED_MODULE_45__[\"default\"], { width: \"24\", height: \"24\", applyZoom: true, color: theme ? theme.mainText() : 'var(--main-text)' }), items: getAIEditingMessagesItems() }) }))) }))] }))), isRecording && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_VoiceRecordingProgress_VoiceRecordingProgress__WEBPACK_IMPORTED_MODULE_27__[\"default\"], { startStatus: isRecording, longRecInSec: 60, ClickActionHandler: function () {\n console.log('click send voice message');\n if (messagesViewModel === null || messagesViewModel === void 0 ? void 0 : messagesViewModel.loading)\n return;\n setIsRecording(!isRecording);\n }, TouchActionHandler: function () {\n console.log('touch send voice message');\n if (messagesViewModel === null || messagesViewModel === void 0 ? void 0 : messagesViewModel.loading)\n return;\n setIsRecording(!isRecording);\n } })), !isVoiceMessage && !waitAIWidget && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_ActiveSvg_ActiveSvg__WEBPACK_IMPORTED_MODULE_20__[\"default\"], { content: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Actions_Send__WEBPACK_IMPORTED_MODULE_22__[\"default\"], { width: \"21\", height: \"18\", applyZoom: true, color: theme ? theme.mainElements() : 'var(--main-elements)' }), clickAction: function () {\n console.log('click send message');\n sendTextMessageActions();\n }, touchAction: function () {\n console.log('touch send message');\n } }) })), waitAIWidget ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: {\n height: '44px',\n width: '24px',\n } }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Placeholders_LoaderComponent_LoaderComponent__WEBPACK_IMPORTED_MODULE_11__[\"default\"], { width: \"24\", height: \"24\", color: \"var(--caption)\" }) }))) : (isVoiceMessage && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_ActiveSvg_ActiveSvg__WEBPACK_IMPORTED_MODULE_20__[\"default\"], { content: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Actions_Voice__WEBPACK_IMPORTED_MODULE_25__[\"default\"], { width: \"21\", height: \"18\", applyZoom: true, color: isRecording ? 'var(--error)' : 'var(--input-elements)' }), clickAction: function () {\n console.log('click send voice message');\n if (messagesViewModel === null || messagesViewModel === void 0 ? void 0 : messagesViewModel.loading)\n return;\n setIsRecording(!isRecording);\n }, touchAction: function () {\n console.log('touch send message');\n if (messagesViewModel === null || messagesViewModel === void 0 ? void 0 : messagesViewModel.loading)\n return;\n setIsRecording(!isRecording);\n } }) })))] }))] })));\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (MessagesView);\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/MessagesView/MessagesView.tsx?");
|
|
2346
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _MessagesView_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./MessagesView.scss */ \"./src/Presentation/components/UI/Dialogs/MessagesView/MessagesView.scss\");\n/* harmony import */ var qb_ai_rephrase__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! qb-ai-rephrase */ \"./node_modules/qb-ai-rephrase/dist/index.js\");\n/* harmony import */ var qb_ai_rephrase__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(qb_ai_rephrase__WEBPACK_IMPORTED_MODULE_3__);\n/* harmony import */ var _providers_QuickBloxUIKitProvider_useQBConnection__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../providers/QuickBloxUIKitProvider/useQBConnection */ \"./src/Presentation/components/providers/QuickBloxUIKitProvider/useQBConnection.ts\");\n/* harmony import */ var _containers_ScrollableContainer_ScrollableContainer__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../../containers/ScrollableContainer/ScrollableContainer */ \"./src/Presentation/components/containers/ScrollableContainer/ScrollableContainer.tsx\");\n/* harmony import */ var _Domain_entity_FileTypes__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../../Domain/entity/FileTypes */ \"./src/Domain/entity/FileTypes.ts\");\n/* harmony import */ var _svgs_Icons_Media_ImageEmpty__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../svgs/Icons/Media/ImageEmpty */ \"./src/Presentation/components/UI/svgs/Icons/Media/ImageEmpty/index.tsx\");\n/* harmony import */ var _svgs_Icons_Toggle_ImagePlay__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../svgs/Icons/Toggle/ImagePlay */ \"./src/Presentation/components/UI/svgs/Icons/Toggle/ImagePlay/index.tsx\");\n/* harmony import */ var _containers_ColumnContainer_ColumnContainer__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../../containers/ColumnContainer/ColumnContainer */ \"./src/Presentation/components/containers/ColumnContainer/ColumnContainer.tsx\");\n/* harmony import */ var _svgs_Icons_Media_ImageFile__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../svgs/Icons/Media/ImageFile */ \"./src/Presentation/components/UI/svgs/Icons/Media/ImageFile/index.tsx\");\n/* harmony import */ var _useMessagesViewModel__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./useMessagesViewModel */ \"./src/Presentation/components/UI/Dialogs/MessagesView/useMessagesViewModel.ts\");\n/* harmony import */ var _Placeholders_LoaderComponent_LoaderComponent__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../Placeholders/LoaderComponent/LoaderComponent */ \"./src/Presentation/components/UI/Placeholders/LoaderComponent/LoaderComponent.tsx\");\n/* harmony import */ var _Placeholders_ErrorComponent_ErrorComponent__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../Placeholders/ErrorComponent/ErrorComponent */ \"./src/Presentation/components/UI/Placeholders/ErrorComponent/ErrorComponent.tsx\");\n/* harmony import */ var _HeaderMessages_HeaderMessages__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./HeaderMessages/HeaderMessages */ \"./src/Presentation/components/UI/Dialogs/MessagesView/HeaderMessages/HeaderMessages.tsx\");\n/* harmony import */ var _VideoAttachmentComponent_VideoAttachmentComponent__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./VideoAttachmentComponent/VideoAttachmentComponent */ \"./src/Presentation/components/UI/Dialogs/MessagesView/VideoAttachmentComponent/VideoAttachmentComponent.tsx\");\n/* harmony import */ var _ImageAttachmentComponent_ImageAttachmentComponent__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./ImageAttachmentComponent/ImageAttachmentComponent */ \"./src/Presentation/components/UI/Dialogs/MessagesView/ImageAttachmentComponent/ImageAttachmentComponent.tsx\");\n/* harmony import */ var _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../../../../Domain/entity/DialogTypes */ \"./src/Domain/entity/DialogTypes.ts\");\n/* harmony import */ var _providers_QuickBloxUIKitProvider_useQbInitializedDataContext__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../../providers/QuickBloxUIKitProvider/useQbInitializedDataContext */ \"./src/Presentation/components/providers/QuickBloxUIKitProvider/useQbInitializedDataContext.ts\");\n/* harmony import */ var _Domain_repository_Pagination__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../../../../Domain/repository/Pagination */ \"./src/Domain/repository/Pagination.ts\");\n/* harmony import */ var _utils_DateTimeFormatter__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../../../../utils/DateTimeFormatter */ \"./src/utils/DateTimeFormatter.ts\");\n/* harmony import */ var _svgs_ActiveSvg_ActiveSvg__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../svgs/ActiveSvg/ActiveSvg */ \"./src/Presentation/components/UI/svgs/ActiveSvg/ActiveSvg.tsx\");\n/* harmony import */ var _svgs_Icons_Media_Attachment__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../svgs/Icons/Media/Attachment */ \"./src/Presentation/components/UI/svgs/Icons/Media/Attachment/index.tsx\");\n/* harmony import */ var _svgs_Icons_Actions_Send__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../svgs/Icons/Actions/Send */ \"./src/Presentation/components/UI/svgs/Icons/Actions/Send/index.tsx\");\n/* harmony import */ var _AudioAttachmentComponent_AudioAttachmentComponent__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./AudioAttachmentComponent/AudioAttachmentComponent */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AudioAttachmentComponent/AudioAttachmentComponent.tsx\");\n/* harmony import */ var _svgs_Icons_Media_AudioFile__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../svgs/Icons/Media/AudioFile */ \"./src/Presentation/components/UI/svgs/Icons/Media/AudioFile/index.tsx\");\n/* harmony import */ var _svgs_Icons_Actions_Voice__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../svgs/Icons/Actions/Voice */ \"./src/Presentation/components/UI/svgs/Icons/Actions/Voice/index.tsx\");\n/* harmony import */ var _utils_parse__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../../../../../utils/parse */ \"./src/utils/parse.ts\");\n/* harmony import */ var _VoiceRecordingProgress_VoiceRecordingProgress__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./VoiceRecordingProgress/VoiceRecordingProgress */ \"./src/Presentation/components/UI/Dialogs/MessagesView/VoiceRecordingProgress/VoiceRecordingProgress.tsx\");\n/* harmony import */ var _HighLightLink_HighLightLink__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./HighLightLink/HighLightLink */ \"./src/Presentation/components/UI/Dialogs/MessagesView/HighLightLink/HighLightLink.tsx\");\n/* harmony import */ var _OutGoingMessage_OutGoingMessage__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./OutGoingMessage/OutGoingMessage */ \"./src/Presentation/components/UI/Dialogs/MessagesView/OutGoingMessage/OutGoingMessage.tsx\");\n/* harmony import */ var _InComingMessage_InComingMessage__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./InComingMessage/InComingMessage */ \"./src/Presentation/components/UI/Dialogs/MessagesView/InComingMessage/InComingMessage.tsx\");\n/* harmony import */ var _svgs_Icons_AIWidgets_NecktieIcon__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../../svgs/Icons/AIWidgets/NecktieIcon */ \"./src/Presentation/components/UI/svgs/Icons/AIWidgets/NecktieIcon/index.tsx\");\n/* harmony import */ var _svgs_Icons_AIWidgets_HandshakeIcon__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../../svgs/Icons/AIWidgets/HandshakeIcon */ \"./src/Presentation/components/UI/svgs/Icons/AIWidgets/HandshakeIcon/index.tsx\");\n/* harmony import */ var _svgs_Icons_AIWidgets_WhiteCheckMarkIcon__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../../svgs/Icons/AIWidgets/WhiteCheckMarkIcon */ \"./src/Presentation/components/UI/svgs/Icons/AIWidgets/WhiteCheckMarkIcon/index.tsx\");\n/* harmony import */ var _svgs_Icons_AIWidgets_MuscleIcon__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../../svgs/Icons/AIWidgets/MuscleIcon */ \"./src/Presentation/components/UI/svgs/Icons/AIWidgets/MuscleIcon/index.tsx\");\n/* harmony import */ var _svgs_Icons_AIWidgets_PalmsUpTogetherIcon__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../../svgs/Icons/AIWidgets/PalmsUpTogetherIcon */ \"./src/Presentation/components/UI/svgs/Icons/AIWidgets/PalmsUpTogetherIcon/index.tsx\");\n/* harmony import */ var _svgs_Icons_AIWidgets_NeutralFaceIcon__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../../svgs/Icons/AIWidgets/NeutralFaceIcon */ \"./src/Presentation/components/UI/svgs/Icons/AIWidgets/NeutralFaceIcon/index.tsx\");\n/* harmony import */ var _svgs_Icons_AIWidgets_HammerIcon__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../../svgs/Icons/AIWidgets/HammerIcon */ \"./src/Presentation/components/UI/svgs/Icons/AIWidgets/HammerIcon/index.tsx\");\n/* harmony import */ var _svgs_Icons_AIWidgets_BookIcon_BookIcon__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ../../svgs/Icons/AIWidgets/BookIcon/BookIcon */ \"./src/Presentation/components/UI/svgs/Icons/AIWidgets/BookIcon/BookIcon.tsx\");\n/* harmony import */ var _svgs_Icons_AIWidgets_PointUpIcon__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ../../svgs/Icons/AIWidgets/PointUpIcon */ \"./src/Presentation/components/UI/svgs/Icons/AIWidgets/PointUpIcon/index.tsx\");\n/* harmony import */ var _svgs_Icons_AIWidgets_SmirkIcon__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ../../svgs/Icons/AIWidgets/SmirkIcon */ \"./src/Presentation/components/UI/svgs/Icons/AIWidgets/SmirkIcon/index.tsx\");\n/* harmony import */ var _svgs_Icons_AIWidgets_PerformingArtsIcon__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ../../svgs/Icons/AIWidgets/PerformingArtsIcon */ \"./src/Presentation/components/UI/svgs/Icons/AIWidgets/PerformingArtsIcon/index.tsx\");\n/* harmony import */ var _AIWidgets_AIWidgetActions_AIWidgetActions__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./AIWidgets/AIWidgetActions/AIWidgetActions */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/AIWidgetActions/AIWidgetActions.tsx\");\n/* harmony import */ var _svgs_Icons_Actions_Tone__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../../svgs/Icons/Actions/Tone */ \"./src/Presentation/components/UI/svgs/Icons/Actions/Tone/index.tsx\");\n/* harmony import */ var _DefaultAttachmentComponent_DefaultAttachmentComponent__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./DefaultAttachmentComponent/DefaultAttachmentComponent */ \"./src/Presentation/components/UI/Dialogs/MessagesView/DefaultAttachmentComponent/DefaultAttachmentComponent.tsx\");\n/* harmony import */ var _utils_utils__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ../../../../../utils/utils */ \"./src/utils/utils.ts\");\n/* harmony import */ var _ErrorToast_ErrorToast__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./ErrorToast/ErrorToast */ \"./src/Presentation/components/UI/Dialogs/MessagesView/ErrorToast/ErrorToast.tsx\");\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// eslint-disable-next-line react/function-component-definition\nvar MessagesView = function (_a) {\n var _b, _c, _d;\n var \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n AIRephrase = _a.AIRephrase, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n AITranslate = _a.AITranslate, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n AIAssist = _a.AIAssist, dialogsViewModel = _a.dialogsViewModel, onDialogInformationHandler = _a.onDialogInformationHandler, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _e = _a.maxWidthToResize, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n maxWidthToResize = _e === void 0 ? undefined : _e, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _f = _a.theme, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n theme = _f === void 0 ? undefined : _f, _g = _a.subHeaderContent, subHeaderContent = _g === void 0 ? undefined : _g, _h = _a.upHeaderContent, upHeaderContent = _h === void 0 ? undefined : _h;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n var maxWidthToResizing = maxWidthToResize || '$message-view-container-wrapper-min-width';\n // const maxWidthToResizing = '720px'; // $message-view-container-wrapper-min-width:\n var currentContext = (0,_providers_QuickBloxUIKitProvider_useQbInitializedDataContext__WEBPACK_IMPORTED_MODULE_18__[\"default\"])();\n var currentUserId = (_b = currentContext.storage.REMOTE_DATA_SOURCE.authInformation) === null || _b === void 0 ? void 0 : _b.userId;\n var currentUserName = (_c = currentContext.storage.REMOTE_DATA_SOURCE.authInformation) === null || _c === void 0 ? void 0 : _c.userName;\n // const translations: Record<number, string> = {};\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n var _j = (0,_providers_QuickBloxUIKitProvider_useQBConnection__WEBPACK_IMPORTED_MODULE_4__[\"default\"])(), connectionRepository = _j.connectionRepository, browserOnline = _j.browserOnline;\n var _k = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(100), dialogMessagesCount = _k[0], setDialogMessageCount = _k[1];\n var _l = react__WEBPACK_IMPORTED_MODULE_1___default().useState(true), hasMore = _l[0], setHasMore = _l[1];\n var _m = react__WEBPACK_IMPORTED_MODULE_1___default().useState(false), scrollUpToDown = _m[0], setScrollUpToDown = _m[1];\n var _o = react__WEBPACK_IMPORTED_MODULE_1___default().useState([]), messagesToView = _o[0], setMessagesToView = _o[1];\n var _p = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(true), showErrorToast = _p[0], setShowErrorToast = _p[1];\n var _q = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''), messageErrorToast = _q[0], setMessageErrorToast = _q[1];\n var _r = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false), waitAIWidget = _r[0], setWaitAIWidget = _r[1];\n var _s = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''), prevTextMessage = _s[0], setPrevTextMessage = _s[1];\n var maxTokensForAIRephrase = currentContext.InitParams.qbConfig.configAIApi.AIRephraseWidgetConfig\n .maxTokens;\n var rephraseTones = currentContext.InitParams.qbConfig.configAIApi.AIRephraseWidgetConfig.Tones;\n var messagesViewModel = (0,_useMessagesViewModel__WEBPACK_IMPORTED_MODULE_11__[\"default\"])((_d = dialogsViewModel.entity) === null || _d === void 0 ? void 0 : _d.type, dialogsViewModel.entity);\n var maxFileSize = currentContext.InitParams.maxFileSize;\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n if (showErrorToast) {\n setTimeout(function () {\n setShowErrorToast(false);\n setMessageErrorToast('');\n }, 1800);\n }\n }, [showErrorToast]);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n console.log('HAVE NEW DIALOG');\n // messagesViewModel.getMessages(new Pagination());\n messagesViewModel.entity = dialogsViewModel.entity;\n setMessagesToView([]);\n }, [dialogsViewModel.entity]);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n console.log('HAVE NEW ENTITY');\n messagesViewModel.getMessages(new _Domain_repository_Pagination__WEBPACK_IMPORTED_MODULE_19__.Pagination());\n }, [messagesViewModel.entity]);\n //\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n console.log('HAVE NEW ENTITY');\n dialogsViewModel.setWaitLoadingStatus(messagesViewModel === null || messagesViewModel === void 0 ? void 0 : messagesViewModel.loading);\n }, [messagesViewModel === null || messagesViewModel === void 0 ? void 0 : messagesViewModel.loading]);\n //\n function prepareFirstPage(initData) {\n var firstPageSize = messagesViewModel.messages.length < 47\n ? messagesViewModel.messages.length\n : 47;\n // for (let i = 0; i < firstPageSize; i += 1) {\n for (var i = firstPageSize - 1; i >= 0; i -= 1) {\n initData.push(messagesViewModel.messages[i]);\n }\n }\n var fetchMoreData = function () {\n if (messagesToView.length >= dialogMessagesCount) {\n setHasMore(false);\n return;\n }\n if (hasMore &&\n messagesToView.length > 0 &&\n messagesToView.length < dialogMessagesCount) {\n setMessagesToView(function (prevState) {\n var newState = __spreadArray([], prevState, true);\n var newMessageEntity = messagesViewModel.messages[prevState.length];\n newState.push(newMessageEntity);\n return newState;\n });\n }\n };\n //\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n var _a;\n console.log('Messages have changed');\n setDialogMessageCount(((_a = messagesViewModel === null || messagesViewModel === void 0 ? void 0 : messagesViewModel.messages) === null || _a === void 0 ? void 0 : _a.length) || 0);\n if ((messagesToView === null || messagesToView === void 0 ? void 0 : messagesToView.length) === 0 && messagesViewModel.messages.length > 0) {\n // setDialogMessageCount(messagesViewModel.messages.length);\n var initData = [];\n console.log(JSON.stringify(messagesViewModel.messages));\n prepareFirstPage(initData);\n setMessagesToView(initData);\n }\n else if (messagesViewModel.messages.length - messagesToView.length >= 1) {\n setHasMore(true);\n setScrollUpToDown(true);\n }\n }, [messagesViewModel.messages]);\n //\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n console.log('dialogMessagesCount have changed');\n if (messagesViewModel.messages.length - messagesToView.length >= 1) {\n fetchMoreData();\n }\n }, [dialogMessagesCount]);\n //\n var getSenderName = function (sender) {\n if (!sender)\n return undefined;\n return (sender.full_name || sender.login || sender.email || sender.id.toString());\n };\n // function sendMessageToTranslate(message: MessageEntity) {\n // if (!waitAIWidget) {\n // setWaitAIWidget(true);\n // AITranslation?.textToWidget(\n // message.message,\n // messageEntitiesToIChatMessageCollection(messagesToView),\n // );\n // }\n // }\n //\n // function sendMessageToAIAssistAnswer(message: MessageEntity) {\n // if (!waitAIWidget) {\n // setWaitAIWidget(true);\n // AIAnswerToMessage?.textToWidget(\n // message.message,\n // messageEntitiesToIChatMessageCollection(messagesToView),\n // );\n // }\n // }\n var renderMessage = function (message, index) {\n var SystemMessage = 'SystemMessage';\n var IncomingMessage = 'IncomingMessage';\n var OutgoingMessage = 'OutgoingMessage';\n console.log('render message: ', JSON.stringify(message), ' index: ', index);\n var messageView;\n var checkMessageType = function (m) {\n if (m.notification_type && m.notification_type.length > 0) {\n return SystemMessage;\n }\n if ((m.sender && m.sender.id.toString() !== (currentUserId === null || currentUserId === void 0 ? void 0 : currentUserId.toString())) ||\n m.sender_id.toString() !== (currentUserId === null || currentUserId === void 0 ? void 0 : currentUserId.toString())) {\n return IncomingMessage;\n }\n return OutgoingMessage;\n };\n var messageTypes = checkMessageType(message);\n var messageContentRender = function (mc) {\n var messageText = (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: mc.message });\n var messageContent = messageText;\n var attachmentContentRender = function (att) {\n // let contentPlaceHolder: JSX.Element = <div>{att.type.toString()}</div>;\n var _a;\n var contentPlaceHolder = ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_DefaultAttachmentComponent_DefaultAttachmentComponent__WEBPACK_IMPORTED_MODULE_45__[\"default\"], { fileName: ((_a = att.file) === null || _a === void 0 ? void 0 : _a.name) || '' }));\n if (att.type.toString().includes(_Domain_entity_FileTypes__WEBPACK_IMPORTED_MODULE_6__.FileType.video)) {\n contentPlaceHolder = att.file ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_VideoAttachmentComponent_VideoAttachmentComponent__WEBPACK_IMPORTED_MODULE_15__[\"default\"], { videoFile: att.file })) : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Toggle_ImagePlay__WEBPACK_IMPORTED_MODULE_8__[\"default\"], {}));\n }\n if (att.type.toString().includes(_Domain_entity_FileTypes__WEBPACK_IMPORTED_MODULE_6__.FileType.audio)) {\n contentPlaceHolder = att.file ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_AudioAttachmentComponent_AudioAttachmentComponent__WEBPACK_IMPORTED_MODULE_24__[\"default\"], { audioFile: att.file })) : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Media_AudioFile__WEBPACK_IMPORTED_MODULE_25__[\"default\"], {}));\n }\n if (att.type.toString().includes(_Domain_entity_FileTypes__WEBPACK_IMPORTED_MODULE_6__.FileType.image)) {\n contentPlaceHolder = att.file ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ImageAttachmentComponent_ImageAttachmentComponent__WEBPACK_IMPORTED_MODULE_16__[\"default\"], { imageFile: att.file })) : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Media_ImageEmpty__WEBPACK_IMPORTED_MODULE_7__[\"default\"], {}));\n }\n if (att.type.toString().includes(_Domain_entity_FileTypes__WEBPACK_IMPORTED_MODULE_6__.FileType.text)) {\n contentPlaceHolder = att.file ? (\n // <div>TEXT</div>\n (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_DefaultAttachmentComponent_DefaultAttachmentComponent__WEBPACK_IMPORTED_MODULE_45__[\"default\"], { fileName: att.file.name || '' })) : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Media_ImageFile__WEBPACK_IMPORTED_MODULE_10__[\"default\"], { width: \"24\", height: \"24\", applyZoom: true }));\n }\n var contentResult = ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"message-view-container--message-content-wrapper\" }, { children: contentPlaceHolder })));\n if (att.type === _Domain_entity_FileTypes__WEBPACK_IMPORTED_MODULE_6__.FileType.text) {\n contentResult = ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ className: \"message-view-container--file-message-content-wrapper\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: theme ? { backgroundColor: theme.caption() } : {}, className: \"message-view-container__file-message-icon\" }, { children: contentPlaceHolder })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: att.name || 'file' })] })));\n }\n return contentResult;\n };\n if (mc.attachments && mc.attachments.length > 0) {\n messageContent = ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_containers_ColumnContainer_ColumnContainer__WEBPACK_IMPORTED_MODULE_9__[\"default\"], __assign({ maxWidth: \"100%\" }, { children: [mc.attachments.map(function (attachment) {\n return attachmentContentRender(attachment);\n }), messageText] })));\n }\n if ((0,_HighLightLink_HighLightLink__WEBPACK_IMPORTED_MODULE_29__.messageHasUrls)(mc.message) &&\n !(mc.attachments && mc.attachments.length > 0)) {\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HighLightLink_HighLightLink__WEBPACK_IMPORTED_MODULE_29__.HighLightLink, { messageText: mc.message });\n }\n return messageContent;\n };\n if (messageTypes === SystemMessage) {\n messageView = ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ className: \"message-view-container--system-message-wrapper\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: theme ? { backgroundColor: theme.disabledElements() } : {}, className: \"message-view-container--system-message-wrapper__date_container\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", { children: [(0,_utils_DateTimeFormatter__WEBPACK_IMPORTED_MODULE_20__.getDateShortFormatEU)(message.date_sent), \",\"] }) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: message.message })] }), message.id));\n }\n else if (messageTypes === IncomingMessage) {\n messageView = ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_InComingMessage_InComingMessage__WEBPACK_IMPORTED_MODULE_31__.InComingMessage, { theme: theme, senderName: getSenderName(message.sender), message: message, \n // element={messageContentRender(message)}\n onStartLoader: function () {\n setWaitAIWidget(true);\n }, onStopLoader: function () {\n setWaitAIWidget(false);\n }, onErrorToast: function (messageError) {\n setShowErrorToast(true);\n setMessageErrorToast(messageError);\n }, \n // renderWidget={\n // <ContextMenu\n // widgetToRender={\n // <AIWidgetIcon applyZoom color=\"var(--main-elements)\" />\n // }\n // items={[\n // {\n // title: 'AI Assist Answer',\n // action: () => {\n // sendMessageToAIAssistAnswer(message);\n // },\n // },\n // {\n // title: 'AI Translate',\n // action: () => {\n // sendMessageToTranslate(message);\n // },\n // },\n // ]}\n // />\n // }\n currentUserId: currentUserId, messagesToView: messagesToView, AITranslation: AITranslate, AIAnswerToMessage: AIAssist }, message.id));\n }\n else {\n messageView = ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_OutGoingMessage_OutGoingMessage__WEBPACK_IMPORTED_MODULE_30__.OutGoingMessage, { message: message, theme: theme, element: messageContentRender(message) }, message.id));\n }\n return messageView;\n };\n var getCountDialogMembers = function (dialogEntity) {\n var participants = [];\n if (dialogEntity.type === _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_17__.DialogType.group) {\n participants = dialogEntity.participantIds;\n }\n else if (dialogEntity.type === _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_17__.DialogType[\"private\"]) {\n participants = [dialogEntity.participantId];\n }\n else if (dialogEntity.type === _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_17__.DialogType[\"public\"]) {\n participants = [];\n }\n return participants.length;\n };\n var _t = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(null), fileToSend = _t[0], setFileToSend = _t[1];\n var _u = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''), messageText = _u[0], setMessageText = _u[1];\n var _v = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''), warningErrorText = _v[0], setWarningErrorText = _v[1];\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n var _w = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(''), widgetTextContent = _w[0], setWidgetTextContent = _w[1];\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n setWarningErrorText(messagesViewModel.typingText);\n }, [messagesViewModel.typingText]);\n var ChangeFileHandler = function (event) {\n var reader = new FileReader();\n var file = event.currentTarget.files\n ? event.currentTarget.files[0]\n : null;\n reader.onloadend = function () {\n setFileToSend(file);\n };\n if (file !== null)\n reader.readAsDataURL(file);\n };\n var showErrorMessage = function (errorMessage) {\n setWarningErrorText(errorMessage);\n setTimeout(function () {\n setWarningErrorText('');\n }, 3000);\n };\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n console.log('have Attachments');\n var MAXSIZE = maxFileSize || 90 * 1000000;\n var MAXSIZE_FOR_MESSAGE = MAXSIZE / (1024 * 1024);\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n var flag = (fileToSend === null || fileToSend === void 0 ? void 0 : fileToSend.size) && (fileToSend === null || fileToSend === void 0 ? void 0 : fileToSend.size) < MAXSIZE;\n if ((fileToSend === null || fileToSend === void 0 ? void 0 : fileToSend.size) && (fileToSend === null || fileToSend === void 0 ? void 0 : fileToSend.size) < MAXSIZE) {\n messagesViewModel.sendAttachmentMessage(fileToSend);\n }\n else if (fileToSend) {\n showErrorMessage(\"file size \".concat(fileToSend === null || fileToSend === void 0 ? void 0 : fileToSend.size, \" must be less then \").concat(MAXSIZE_FOR_MESSAGE, \" mb.\"));\n }\n }, [fileToSend]);\n var _x = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(true), isVoiceMessage = _x[0], setVoiceMessage = _x[1];\n var _y = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false), isRecording = _y[0], setIsRecording = _y[1];\n //\n var _z = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false), permission = _z[0], setPermission = _z[1];\n // const [recordingStatus, setRecordingStatus] = useState('inactive');\n var _0 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(), stream = _0[0], setStream = _0[1];\n // const [mediaRecorder, setMediaRecorder] = useState<MediaRecorder>();\n var mediaRecorder = (0,react__WEBPACK_IMPORTED_MODULE_1__.useRef)();\n var _1 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(), resultAudioBlob = _1[0], setResultAudioBlob = _1[1];\n var _2 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)([]), audioChunks = _2[0], setAudioChunks = _2[1];\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n var mimeType = 'audio/webm;codecs=opus'; // audio/ogg audio/mpeg audio/webm audio/x-wav audio/mp4\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n var getMicrophonePermission = function () { return __awaiter(void 0, void 0, void 0, function () {\n var mediaStream, err_1;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n if (!window) return [3 /*break*/, 5];\n _a.label = 1;\n case 1:\n _a.trys.push([1, 3, , 4]);\n return [4 /*yield*/, navigator.mediaDevices.getUserMedia({\n audio: true,\n video: false,\n })];\n case 2:\n mediaStream = _a.sent();\n setPermission(true);\n setStream(mediaStream);\n return [3 /*break*/, 4];\n case 3:\n err_1 = _a.sent();\n // setWarningErrorText(\n // 'The MediaRecorder API is not supported in your browser.',\n // );\n showErrorMessage(\"The MediaRecorder API throws exception \".concat((0,_utils_parse__WEBPACK_IMPORTED_MODULE_27__.stringifyError)(err_1), \" .\"));\n return [3 /*break*/, 4];\n case 4: return [3 /*break*/, 6];\n case 5:\n // setWarningErrorText(\n // 'The MediaRecorder API is not supported in your browser.',\n // );\n showErrorMessage('The MediaRecorder API is not supported in your browser.');\n _a.label = 6;\n case 6: return [2 /*return*/];\n }\n });\n }); };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/require-await\n var startRecording = function () { return __awaiter(void 0, void 0, void 0, function () {\n var mimeTypes, mimeContent, media, localAudioChunks;\n return __generator(this, function (_a) {\n if (!stream)\n return [2 /*return*/];\n mimeTypes = [\n 'audio/aac',\n 'audio/mp4',\n 'audio/mpeg',\n 'audio/ogg',\n 'audio/wav',\n 'audio/webm',\n 'audio/3gpp',\n 'audio/flac',\n 'audio/x-aiff',\n 'audio/x-m4a',\n ];\n console.log('MIME TYPES: ');\n mimeTypes.forEach(function (mType) {\n if (MediaRecorder.isTypeSupported(mimeType)) {\n console.log(\"\".concat(mType, \" is supported\"));\n }\n else {\n console.log(\"\".concat(mType, \" is not supported\"));\n }\n });\n mimeContent = window.MediaRecorder.isTypeSupported('audio/mp4')\n ? 'audio/mp4;codecs=mp4a'\n : 'audio/webm;codecs=opus';\n media = new MediaRecorder(stream, { mimeType: mimeContent });\n mediaRecorder.current = media;\n mediaRecorder.current.start();\n localAudioChunks = [];\n mediaRecorder.current.ondataavailable = function (event) {\n // const localAudioChunks: any[] = [];\n if (typeof event.data === 'undefined')\n return;\n if (event.data.size === 0)\n return;\n localAudioChunks.push(event.data);\n console.log('voice data');\n // setAudioChunks(localAudioChunks);\n };\n setAudioChunks(localAudioChunks);\n return [2 /*return*/];\n });\n }); };\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n var stopRecording = function () {\n if (!mediaRecorder.current)\n return;\n // setRecordingStatus('inactive');\n mediaRecorder.current.stop();\n mediaRecorder.current.onstop = function () {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n var mimeContent = window.MediaRecorder.isTypeSupported('audio/mp4;codecs=mp4a')\n ? 'audio/mp4;codecs=mp4a'\n : 'audio/webm;codecs=opus';\n // const audioBlob = new Blob(audioChunks, { type: mimeContent }); // mimeType\n // const mp4Blob = new Blob(recordedChunks, { type: 'video/mp4' });\n // const audioBlob = new Blob(audioChunks, { type: 'video/mp4' }); // mimeType\n // const audioBlob = new Blob(audioChunks, { type: 'audio/mp4' }); // mimeType\n var audioBlob = new Blob(audioChunks, { type: 'audio/mp4' });\n setResultAudioBlob(audioBlob);\n setAudioChunks([]);\n //\n stream === null || stream === void 0 ? void 0 : stream.getAudioTracks().forEach(function (track) {\n track.stop();\n });\n setPermission(false);\n //\n };\n };\n //\n var blobToFile = function (theBlob, fileName) {\n var b = theBlob;\n // A Blob() is almost a File() - it's just missing the two properties below which we will add\n b.lastModifiedDate = new Date();\n b.name = fileName;\n // Cast to a File() type\n var resultFile = theBlob;\n return resultFile;\n };\n var _3 = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(false), useAudioWidget = _3[0], setUseAudioWidget = _3[1];\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n var fileExt = 'mp4';\n if (resultAudioBlob) {\n var voiceMessage = blobToFile(resultAudioBlob, \"\".concat(currentUserName || '', \"_voice_message.\").concat(fileExt));\n setFileToSend(voiceMessage);\n if (useAudioWidget) {\n setUseAudioWidget(false);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-call\n // AITranslation?.fileToWidget(\n // voiceMessage,\n // messageEntitiesToIChatMessageCollection(messagesToView),\n // );\n }\n //\n }\n }, [resultAudioBlob]);\n // test component version\n // useEffect(() => {\n // if (isRecording) {\n // setWarningErrorText(`Your voice is recording during for 1 minute`);\n // } else {\n // setWarningErrorText('');\n // }\n // }, [isRecording]);\n // work version below:\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n // setFileToSend(null);\n if (isRecording) {\n if (!permission) {\n // eslint-disable-next-line promise/catch-or-return,promise/always-return\n getMicrophonePermission().catch(function () {\n // setWarningErrorText(`Have no audio.`);\n showErrorMessage(\"Have no audio.\");\n });\n }\n else {\n // eslint-disable-next-line promise/catch-or-return,promise/always-return\n startRecording().then(function () {\n setWarningErrorText(\"Your voice is recording during for 1 minutes\");\n });\n }\n }\n else {\n if (permission && mediaRecorder.current) {\n stopRecording();\n }\n setWarningErrorText('');\n }\n }, [isRecording]);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n if (isRecording && permission) {\n // eslint-disable-next-line promise/always-return,promise/catch-or-return\n startRecording().then(function () {\n setWarningErrorText(\"Your voice is recording during for 1 minutes\");\n });\n }\n }, [permission]);\n function sendTextMessageActions() {\n if (messagesViewModel === null || messagesViewModel === void 0 ? void 0 : messagesViewModel.loading)\n return;\n setVoiceMessage(true);\n if (messageText.length > 0 && messageText.length <= 1000) {\n var messageTextToSend = messageText;\n setMessageText('');\n messagesViewModel.sendTextMessage(messageTextToSend);\n setMessageText('');\n }\n else {\n setWarningErrorText('length of text message must be less then 1000 chars.');\n setTimeout(function () {\n setWarningErrorText('');\n }, 3000);\n }\n }\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n setWaitAIWidget(false);\n if ((AIRephrase === null || AIRephrase === void 0 ? void 0 : AIRephrase.textToContent) && (AIRephrase === null || AIRephrase === void 0 ? void 0 : AIRephrase.textToContent.length) > 0) {\n setMessageText(AIRephrase === null || AIRephrase === void 0 ? void 0 : AIRephrase.textToContent);\n setWidgetTextContent(AIRephrase === null || AIRephrase === void 0 ? void 0 : AIRephrase.textToContent);\n setTimeout(function () {\n setWidgetTextContent('');\n }, 45 * 1000);\n }\n }, [AIRephrase === null || AIRephrase === void 0 ? void 0 : AIRephrase.textToContent]);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n setWaitAIWidget(false);\n // if (\n // AITranslation?.textToContent &&\n // AITranslation?.textToContent.length > 0\n // ) {\n // setMessageText(AITranslation?.textToContent);\n // setWidgetTextContent(AITranslation?.textToContent);\n // setTimeout(() => {\n // setWidgetTextContent('');\n // }, 45 * 1000);\n // }\n }, [AITranslate === null || AITranslate === void 0 ? void 0 : AITranslate.textToContent]);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n setWaitAIWidget(false);\n if ((AIAssist === null || AIAssist === void 0 ? void 0 : AIAssist.textToContent) && (AIAssist === null || AIAssist === void 0 ? void 0 : AIAssist.textToContent.length) > 0) {\n setMessageText(AIAssist === null || AIAssist === void 0 ? void 0 : AIAssist.textToContent);\n setWidgetTextContent(AIAssist === null || AIAssist === void 0 ? void 0 : AIAssist.textToContent);\n setTimeout(function () {\n setWidgetTextContent('');\n }, 45 * 1000);\n }\n }, [AIAssist === null || AIAssist === void 0 ? void 0 : AIAssist.textToContent]);\n var useSubContent = subHeaderContent || false;\n var useUpContent = upHeaderContent || false;\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n // function getAIEditingMessagesItems() {\n // return [\n // {\n // title: 'Professional Tone',\n // icon: <NecktieIcon />,\n // action: () => {\n // if (messageText && messageText.length > 0 && !waitAIWidget) {\n // setWaitAIWidget(true);\n // AIRephrase?.textToWidget(\n // messageText,\n // AIUtils.messageEntitiesToIChatMessageCollection(\n // messagesToView,\n // currentUserId,\n // maxTokensForAIRephrase,\n // ),\n // {\n // tone: QBAIRephrase.defaultTones()[0],\n // // tone: {\n // // name: 'Professional Tone',\n // // description: '',\n // // iconEmoji: '',\n // // },\n // },\n // )\n // .then((answerText) => {\n // // eslint-disable-next-line promise/always-return\n // if (answerText === 'Rephrase failed.') {\n // setMessageErrorToast('Rephrase failed.');\n // setShowErrorToast(true);\n // }\n // setWaitAIWidget(false);\n // })\n // .catch(() => {\n // setMessageErrorToast('Rephrase failed.');\n // setShowErrorToast(true);\n // setWaitAIWidget(false);\n // });\n // }\n // },\n // },\n // {\n // title: 'Friendly Tone',\n // icon: <HandshakeIcon />,\n // action: () => {\n // if (messageText && messageText.length > 0 && !waitAIWidget) {\n // setWaitAIWidget(true);\n // AIRephrase?.textToWidget(\n // messageText,\n // AIUtils.messageEntitiesToIChatMessageCollection(\n // messagesToView,\n // currentUserId,\n // maxTokensForAIRephrase,\n // ),\n // {\n // // tone: { name: 'Friendly Tone', description: '', iconEmoji: '' },\n // tone: QBAIRephrase.defaultTones()[1],\n // },\n // )\n // .then((answerText) => {\n // // eslint-disable-next-line promise/always-return\n // if (answerText === 'Rephrase failed.') {\n // setMessageErrorToast('Rephrase failed.');\n // setShowErrorToast(true);\n // }\n // setWaitAIWidget(false);\n // })\n // .catch(() => {\n // setMessageErrorToast('Rephrase failed.');\n // setShowErrorToast(true);\n // setWaitAIWidget(false);\n // });\n // }\n // },\n // },\n // {\n // title: 'Encouraging Tone',\n // icon: <MuscleIcon />,\n // action: () => {\n // if (messageText && messageText.length > 0 && !waitAIWidget) {\n // setWaitAIWidget(true);\n // AIRephrase?.textToWidget(\n // messageText,\n // AIUtils.messageEntitiesToIChatMessageCollection(\n // messagesToView,\n // currentUserId,\n // maxTokensForAIRephrase,\n // ),\n // {\n // tone: QBAIRephrase.defaultTones()[2],\n // // tone: {\n // // name: 'Encouraging Tone',\n // // description: '',\n // // iconEmoji: '',\n // // },\n // },\n // )\n // .then((answerText) => {\n // // eslint-disable-next-line promise/always-return\n // if (answerText === 'Rephrase failed.') {\n // setMessageErrorToast('Rephrase failed.');\n // setShowErrorToast(true);\n // }\n // setWaitAIWidget(false);\n // })\n // .catch(() => {\n // setMessageErrorToast('Rephrase failed.');\n // setShowErrorToast(true);\n // setWaitAIWidget(false);\n // });\n // }\n // },\n // },\n // {\n // title: 'Empathetic Tone',\n // icon: <PalmsUpTogetherIcon />,\n // action: () => {\n // if (messageText && messageText.length > 0 && !waitAIWidget) {\n // setWaitAIWidget(true);\n // AIRephrase?.textToWidget(\n // messageText,\n // AIUtils.messageEntitiesToIChatMessageCollection(\n // messagesToView,\n // currentUserId,\n // maxTokensForAIRephrase,\n // ),\n // {\n // tone: QBAIRephrase.defaultTones()[3],\n // // tone: {\n // // name: 'Empathetic Tone',\n // // description: '',\n // // iconEmoji: '',\n // // },\n // },\n // )\n // .then((answerText) => {\n // // eslint-disable-next-line promise/always-return\n // if (answerText === 'Rephrase failed.') {\n // setMessageErrorToast('Rephrase failed.');\n // setShowErrorToast(true);\n // }\n // setWaitAIWidget(false);\n // })\n // .catch(() => {\n // setMessageErrorToast('Rephrase failed.');\n // setShowErrorToast(true);\n // setWaitAIWidget(false);\n // });\n // }\n // },\n // },\n // {\n // title: 'Neutral Tone',\n // icon: <NeutralFaceIcon />,\n // action: () => {\n // if (messageText && messageText.length > 0 && !waitAIWidget) {\n // setWaitAIWidget(true);\n // AIRephrase?.textToWidget(\n // messageText,\n // AIUtils.messageEntitiesToIChatMessageCollection(\n // messagesToView,\n // currentUserId,\n // maxTokensForAIRephrase,\n // ),\n // {\n // // tone: { name: 'Neutral Tone', description: '', iconEmoji: '' },\n // tone: QBAIRephrase.defaultTones()[4],\n // },\n // )\n // .then((answerText) => {\n // // eslint-disable-next-line promise/always-return\n // if (answerText === 'Rephrase failed.') {\n // setMessageErrorToast('Rephrase failed.');\n // setShowErrorToast(true);\n // }\n // setWaitAIWidget(false);\n // })\n // .catch(() => {\n // setMessageErrorToast('Rephrase failed.');\n // setShowErrorToast(true);\n // setWaitAIWidget(false);\n // });\n // }\n // },\n // },\n // {\n // title: 'Assertive Tone',\n // icon: <HammerIcon />,\n // action: () => {\n // if (messageText && messageText.length > 0 && !waitAIWidget) {\n // setWaitAIWidget(true);\n // AIRephrase?.textToWidget(\n // messageText,\n // AIUtils.messageEntitiesToIChatMessageCollection(\n // messagesToView,\n // currentUserId,\n // maxTokensForAIRephrase,\n // ),\n // {\n // tone: QBAIRephrase.defaultTones()[5],\n // // tone: {\n // // name: 'Assertive Tone',\n // // description: '',\n // // iconEmoji: '',\n // // },\n // },\n // )\n // .then((answerText) => {\n // // eslint-disable-next-line promise/always-return\n // if (answerText === 'Rephrase failed.') {\n // setMessageErrorToast('Rephrase failed.');\n // setShowErrorToast(true);\n // }\n // setWaitAIWidget(false);\n // })\n // .catch(() => {\n // setMessageErrorToast('Rephrase failed.');\n // setShowErrorToast(true);\n // setWaitAIWidget(false);\n // });\n // }\n // },\n // },\n // {\n // title: 'Instructive Tone',\n // icon: <BookIcon />,\n // action: () => {\n // if (messageText && messageText.length > 0 && !waitAIWidget) {\n // setWaitAIWidget(true);\n // AIRephrase?.textToWidget(\n // messageText,\n // AIUtils.messageEntitiesToIChatMessageCollection(\n // messagesToView,\n // currentUserId,\n // maxTokensForAIRephrase,\n // ),\n // {\n // tone: QBAIRephrase.defaultTones()[6],\n // // tone: {\n // // name: 'Instructive Tone',\n // // description: '',\n // // iconEmoji: '',\n // // },\n // },\n // )\n // .then((answerText) => {\n // // eslint-disable-next-line promise/always-return\n // if (answerText === 'Rephrase failed.') {\n // setMessageErrorToast('Rephrase failed.');\n // setShowErrorToast(true);\n // }\n // setWaitAIWidget(false);\n // })\n // .catch(() => {\n // setMessageErrorToast('Rephrase failed.');\n // setShowErrorToast(true);\n // setWaitAIWidget(false);\n // });\n // }\n // },\n // },\n // {\n // title: 'Persuasive Tone',\n // icon: <PointUpIcon />,\n // action: () => {\n // if (messageText && messageText.length > 0 && !waitAIWidget) {\n // setWaitAIWidget(true);\n // AIRephrase?.textToWidget(\n // messageText,\n // AIUtils.messageEntitiesToIChatMessageCollection(\n // messagesToView,\n // currentUserId,\n // maxTokensForAIRephrase,\n // ),\n // {\n // tone: QBAIRephrase.defaultTones()[7],\n // // tone: {\n // // name: 'Persuasive Tone',\n // // description: '',\n // // iconEmoji: '',\n // // },\n // },\n // )\n // .then((answerText) => {\n // // eslint-disable-next-line promise/always-return\n // if (answerText === 'Rephrase failed.') {\n // setMessageErrorToast('Rephrase failed.');\n // setShowErrorToast(true);\n // }\n // setWaitAIWidget(false);\n // })\n // .catch(() => {\n // setMessageErrorToast('Rephrase failed.');\n // setShowErrorToast(true);\n // setWaitAIWidget(false);\n // });\n // }\n // },\n // },\n // {\n // title: 'Sarcastic/Ironic Tone',\n // icon: <SmirkIcon />,\n // action: () => {\n // if (messageText && messageText.length > 0 && !waitAIWidget) {\n // setWaitAIWidget(true);\n // AIRephrase?.textToWidget(\n // messageText,\n // AIUtils.messageEntitiesToIChatMessageCollection(\n // messagesToView,\n // currentUserId,\n // maxTokensForAIRephrase,\n // ),\n // {\n // tone: QBAIRephrase.defaultTones()[8],\n // // tone: {\n // // name: 'Sarcastic/Ironic Tone',\n // // description: '',\n // // iconEmoji: '',\n // // },\n // },\n // )\n // .then((answerText) => {\n // // eslint-disable-next-line promise/always-return\n // if (answerText === 'Rephrase failed.') {\n // setMessageErrorToast('Rephrase failed.');\n // setShowErrorToast(true);\n // }\n // setWaitAIWidget(false);\n // })\n // .catch(() => {\n // setMessageErrorToast('Rephrase failed.');\n // setShowErrorToast(true);\n // setWaitAIWidget(false);\n // });\n // }\n // },\n // },\n // {\n // title: 'Poetic Tone',\n // icon: <PerformingArtsIcon />,\n // action: () => {\n // if (messageText && messageText.length > 0 && !waitAIWidget) {\n // setWaitAIWidget(true);\n // AIRephrase?.textToWidget(\n // messageText,\n // AIUtils.messageEntitiesToIChatMessageCollection(\n // messagesToView,\n // currentUserId,\n // maxTokensForAIRephrase,\n // ),\n // {\n // tone: QBAIRephrase.defaultTones()[9],\n // // tone: { name: 'Poetic Tone', description: '', iconEmoji: '' }\n // },\n // )\n // .then((answerText) => {\n // // eslint-disable-next-line promise/always-return\n // if (answerText === 'Rephrase failed.') {\n // setMessageErrorToast('Rephrase failed.');\n // setShowErrorToast(true);\n // }\n // setWaitAIWidget(false);\n // })\n // .catch(() => {\n // setMessageErrorToast('Rephrase failed.');\n // setShowErrorToast(true);\n // setWaitAIWidget(false);\n // });\n // }\n // },\n // },\n // {\n // title: 'Back to original text',\n // icon: <WhiteCheckMarkIcon />,\n // action: () => {\n // if (messageText && messageText.length > 0 && !waitAIWidget) {\n // setWaitAIWidget(true);\n // AIRephrase?.textToWidget(\n // messageText,\n // AIUtils.messageEntitiesToIChatMessageCollection(\n // messagesToView,\n // currentUserId,\n // maxTokensForAIRephrase,\n // ),\n // {\n // tone: {\n // name: 'Unchanged',\n // description: 'Unchanged',\n // iconEmoji: '',\n // },\n // },\n // )\n // .then((answerText) => {\n // // eslint-disable-next-line promise/always-return\n // if (answerText === 'Rephrase failed.') {\n // setMessageErrorToast('Rephrase failed.');\n // setShowErrorToast(true);\n // }\n // setWaitAIWidget(false);\n // })\n // .catch(() => {\n // setMessageErrorToast('Rephrase failed.');\n // setShowErrorToast(true);\n // setWaitAIWidget(false);\n // });\n // }\n // },\n // },\n // ];\n // }\n function getDefaultIcon(index) {\n var defaultIcons = [\n (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_AIWidgets_NecktieIcon__WEBPACK_IMPORTED_MODULE_32__[\"default\"], {}),\n (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_AIWidgets_HandshakeIcon__WEBPACK_IMPORTED_MODULE_33__[\"default\"], {}),\n (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_AIWidgets_MuscleIcon__WEBPACK_IMPORTED_MODULE_35__[\"default\"], {}),\n (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_AIWidgets_PalmsUpTogetherIcon__WEBPACK_IMPORTED_MODULE_36__[\"default\"], {}),\n (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_AIWidgets_NeutralFaceIcon__WEBPACK_IMPORTED_MODULE_37__[\"default\"], {}),\n (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_AIWidgets_HammerIcon__WEBPACK_IMPORTED_MODULE_38__[\"default\"], {}),\n (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_AIWidgets_BookIcon_BookIcon__WEBPACK_IMPORTED_MODULE_39__[\"default\"], {}),\n (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_AIWidgets_PointUpIcon__WEBPACK_IMPORTED_MODULE_40__[\"default\"], {}),\n (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_AIWidgets_SmirkIcon__WEBPACK_IMPORTED_MODULE_41__[\"default\"], {}),\n (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_AIWidgets_PerformingArtsIcon__WEBPACK_IMPORTED_MODULE_42__[\"default\"], {}),\n ];\n return defaultIcons[index] || (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_AIWidgets_NeutralFaceIcon__WEBPACK_IMPORTED_MODULE_37__[\"default\"], {});\n }\n function getAIEditingMessagesItems() {\n var items = [];\n var tones = rephraseTones || qb_ai_rephrase__WEBPACK_IMPORTED_MODULE_3__.QBAIRephrase.defaultTones();\n var _loop_1 = function (i) {\n var tone = tones[i];\n var title = tone.name;\n var icon = getDefaultIcon(i) || (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_AIWidgets_NeutralFaceIcon__WEBPACK_IMPORTED_MODULE_37__[\"default\"], {});\n var action = function () {\n if (messageText && messageText.length > 0 && !waitAIWidget) {\n setWaitAIWidget(true);\n setPrevTextMessage(messageText);\n AIRephrase === null || AIRephrase === void 0 ? void 0 : AIRephrase.textToWidget(messageText, _utils_utils__WEBPACK_IMPORTED_MODULE_46__.AIUtils.messageEntitiesToIChatMessageCollection(messagesToView, currentUserId, maxTokensForAIRephrase), {\n tone: tone,\n }).then(function (answerText) {\n // eslint-disable-next-line promise/always-return\n if (answerText === 'Rephrase failed.') {\n setMessageErrorToast('Rephrase failed.');\n setShowErrorToast(true);\n }\n setWaitAIWidget(false);\n }).catch(function () {\n setMessageErrorToast('Rephrase failed.');\n setShowErrorToast(true);\n setWaitAIWidget(false);\n });\n }\n };\n items.push({\n title: title,\n icon: icon,\n action: action,\n });\n };\n for (var i = 0; i < tones.length; i += 1) {\n _loop_1(i);\n }\n //\n items.push({\n title: 'Back to prev.',\n icon: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_AIWidgets_WhiteCheckMarkIcon__WEBPACK_IMPORTED_MODULE_34__[\"default\"], {}),\n action: function () {\n if (messageText && messageText.length > 0 && !waitAIWidget) {\n setMessageText(prevTextMessage);\n }\n },\n });\n //\n return items;\n }\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ style: maxWidthToResize\n ? {\n maxWidth: \"\".concat(maxWidthToResizing),\n minWidth: \"$message-view-container-wrapper-min-width\",\n // width: `${maxWidthToResizing}`,\n width: '100%',\n }\n : {}, className: \"message-view-container\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ style: {\n flexGrow: \"1\",\n flexShrink: \"1\",\n flexBasis: \"\".concat(maxWidthToResizing),\n }, className: \"message-view-container--header\" }, { children: [useUpContent && upHeaderContent, (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_HeaderMessages_HeaderMessages__WEBPACK_IMPORTED_MODULE_14__[\"default\"], { dialog: messagesViewModel.entity, InformationHandler: onDialogInformationHandler, countMembers: getCountDialogMembers(dialogsViewModel.entity) }), useSubContent && subHeaderContent] })), showErrorToast && !(messagesViewModel === null || messagesViewModel === void 0 ? void 0 : messagesViewModel.loading) ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_ErrorToast_ErrorToast__WEBPACK_IMPORTED_MODULE_47__.ErrorToast, { messageText: messageErrorToast })) : null, (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ style: theme\n ? {\n flexGrow: \"1\",\n flexShrink: \"1\",\n flexBasis: \"\".concat(maxWidthToResizing),\n backgroundColor: theme.secondaryBackground(), // var(--secondary-background);\n }\n : {\n flexGrow: \"1\",\n flexShrink: \"1\",\n flexBasis: \"\".concat(maxWidthToResizing),\n }, className: \"message-view-container--messages\" }, { children: [(messagesViewModel === null || messagesViewModel === void 0 ? void 0 : messagesViewModel.error) && !messagesViewModel.loading && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Placeholders_ErrorComponent_ErrorComponent__WEBPACK_IMPORTED_MODULE_13__[\"default\"], { title: messagesViewModel === null || messagesViewModel === void 0 ? void 0 : messagesViewModel.error, ClickActionHandler: function () {\n alert('call click retry');\n } })), messagesViewModel &&\n messagesViewModel.messages &&\n messagesViewModel.messages.length > 0 &&\n messagesToView &&\n messagesToView.length > 0 && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_containers_ScrollableContainer_ScrollableContainer__WEBPACK_IMPORTED_MODULE_5__[\"default\"], { data: messagesToView, renderItem: renderMessage, onEndReached: fetchMoreData, onEndReachedThreshold: 0.8, refreshing: messagesViewModel === null || messagesViewModel === void 0 ? void 0 : messagesViewModel.loading, autoScrollToBottom: scrollUpToDown })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: {\n display: 'flex',\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n } }, { children: (messagesViewModel === null || messagesViewModel === void 0 ? void 0 : messagesViewModel.loading) && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: {\n height: '44px',\n width: '44px',\n } }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Placeholders_LoaderComponent_LoaderComponent__WEBPACK_IMPORTED_MODULE_12__[\"default\"], { width: \"44\", height: \"44\", color: \"var(--color-background-info)\" }) }))) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: theme ? { color: theme.mainElements() } : {}, className: \"message-view-container--warning-error\" }, { children: warningErrorText }))] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ style: {\n flex: \"flex: 1 1 \".concat(maxWidthToResizing),\n }, onBlur: function () {\n if (!(messageText && messageText.length > 0)) {\n setVoiceMessage(true);\n }\n }, className: \"message-view-container--chat-input\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"label\", __assign({ htmlFor: \"btnUploadAttachment\", style: {\n cursor: 'pointer',\n } }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_ActiveSvg_ActiveSvg__WEBPACK_IMPORTED_MODULE_21__[\"default\"], { content: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Media_Attachment__WEBPACK_IMPORTED_MODULE_22__[\"default\"], { width: \"32\", height: \"32\", applyZoom: true, color: theme ? theme.inputElements() : 'var(--input-elements)' }), clickAction: function () {\n console.log('click send message');\n }, touchAction: function () {\n console.log('touch send message');\n } }) }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"input\", { id: \"btnUploadAttachment\", type: \"file\", accept: \"image/*, audio/*, video/*, .pdf, .txt,\", style: { display: 'none' }, onChange: function (event) {\n ChangeFileHandler(event);\n } })] })), !isRecording && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ className: \"input-text-message\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"type-message\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"textarea\", { style: theme ? { backgroundColor: theme.chatInput() } : {}, disabled: messagesViewModel === null || messagesViewModel === void 0 ? void 0 : messagesViewModel.loading, value: messageText, onFocus: function () {\n setVoiceMessage(false);\n }, onChange: function (event) {\n setMessageText(event.target.value);\n }, onInput: function () {\n messagesViewModel.sendTypingTextMessage();\n }, onKeyDown: function (e) {\n console.log(\"onKeyDown: \".concat(e.key, \" shift \").concat(e.shiftKey ? 'true' : 'false', \" ctrl \").concat(e.ctrlKey ? 'true' : 'false'));\n if (e.key === 'Enter' && !e.shiftKey && !e.ctrlKey) {\n sendTextMessageActions();\n }\n }, placeholder: \"enter text to send\" }) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"right\" }, { children: AIRephrase && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"icon\", style: {\n cursor: !waitAIWidget ? 'pointer' : '',\n } }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_AIWidgets_AIWidgetActions_AIWidgetActions__WEBPACK_IMPORTED_MODULE_43__[\"default\"], { widgetToRender: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Actions_Tone__WEBPACK_IMPORTED_MODULE_44__[\"default\"], { width: \"24\", height: \"24\", applyZoom: true, color: theme ? theme.mainText() : 'var(--main-text)' }), items: getAIEditingMessagesItems() }) }))) }))] }))), isRecording && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_VoiceRecordingProgress_VoiceRecordingProgress__WEBPACK_IMPORTED_MODULE_28__[\"default\"], { startStatus: isRecording, longRecInSec: 60, ClickActionHandler: function () {\n console.log('click send voice message');\n if (messagesViewModel === null || messagesViewModel === void 0 ? void 0 : messagesViewModel.loading)\n return;\n setIsRecording(!isRecording);\n }, TouchActionHandler: function () {\n console.log('touch send voice message');\n if (messagesViewModel === null || messagesViewModel === void 0 ? void 0 : messagesViewModel.loading)\n return;\n setIsRecording(!isRecording);\n } })), !isVoiceMessage && !waitAIWidget && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_ActiveSvg_ActiveSvg__WEBPACK_IMPORTED_MODULE_21__[\"default\"], { content: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Actions_Send__WEBPACK_IMPORTED_MODULE_23__[\"default\"], { width: \"21\", height: \"18\", applyZoom: true, color: theme ? theme.mainElements() : 'var(--main-elements)' }), clickAction: function () {\n console.log('click send message');\n sendTextMessageActions();\n }, touchAction: function () {\n console.log('touch send message');\n } }) })), waitAIWidget ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: {\n height: '44px',\n width: '24px',\n } }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Placeholders_LoaderComponent_LoaderComponent__WEBPACK_IMPORTED_MODULE_12__[\"default\"], { width: \"24\", height: \"24\", color: \"var(--caption)\" }) }))) : (isVoiceMessage && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_ActiveSvg_ActiveSvg__WEBPACK_IMPORTED_MODULE_21__[\"default\"], { content: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Actions_Voice__WEBPACK_IMPORTED_MODULE_26__[\"default\"], { width: \"21\", height: \"18\", applyZoom: true, color: isRecording ? 'var(--error)' : 'var(--input-elements)' }), clickAction: function () {\n console.log('click send voice message');\n if (messagesViewModel === null || messagesViewModel === void 0 ? void 0 : messagesViewModel.loading)\n return;\n setIsRecording(!isRecording);\n }, touchAction: function () {\n console.log('touch send message');\n if (messagesViewModel === null || messagesViewModel === void 0 ? void 0 : messagesViewModel.loading)\n return;\n setIsRecording(!isRecording);\n } }) })))] }))] })));\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (MessagesView);\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/MessagesView/MessagesView.tsx?");
|
|
2119
2347
|
|
|
2120
2348
|
/***/ }),
|
|
2121
2349
|
|
|
@@ -2163,6 +2391,28 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
2163
2391
|
|
|
2164
2392
|
/***/ }),
|
|
2165
2393
|
|
|
2394
|
+
/***/ "./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewAudioFile/PreviewAudioFile.tsx":
|
|
2395
|
+
/*!****************************************************************************************************!*\
|
|
2396
|
+
!*** ./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewAudioFile/PreviewAudioFile.tsx ***!
|
|
2397
|
+
\****************************************************************************************************/
|
|
2398
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2399
|
+
|
|
2400
|
+
"use strict";
|
|
2401
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* harmony import */ var _PreviewAudioFile_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PreviewAudioFile.scss */ \"./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewAudioFile/PreviewAudioFile.scss\");\n/* harmony import */ var _svgs_Icons_Media_AudioFile__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../svgs/Icons/Media/AudioFile */ \"./src/Presentation/components/UI/svgs/Icons/Media/AudioFile/index.tsx\");\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\n\n\n\n// eslint-disable-next-line react/function-component-definition\nvar PreviewAudioFile = function (_a) {\n var fileName = _a.fileName;\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ className: \"preview-audio-file-container\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ className: \"preview-audio-file-container--placeholder\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { className: \"preview-audio-file-container--placeholder__bg\" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"preview-audio-file-container--placeholder__icon\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Media_AudioFile__WEBPACK_IMPORTED_MODULE_2__[\"default\"], { width: \"16\", height: \"16\", applyZoom: true, color: \"var(--caption)\" }) }))] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"preview-audio-file-container--audio-mp-3\" }, { children: fileName }))] })));\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (PreviewAudioFile);\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewAudioFile/PreviewAudioFile.tsx?");
|
|
2402
|
+
|
|
2403
|
+
/***/ }),
|
|
2404
|
+
|
|
2405
|
+
/***/ "./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDefaultFile/PreviewDefaultFile.tsx":
|
|
2406
|
+
/*!********************************************************************************************************!*\
|
|
2407
|
+
!*** ./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDefaultFile/PreviewDefaultFile.tsx ***!
|
|
2408
|
+
\********************************************************************************************************/
|
|
2409
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2410
|
+
|
|
2411
|
+
"use strict";
|
|
2412
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* harmony import */ var _PreviewDefaultFile_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PreviewDefaultFile.scss */ \"./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDefaultFile/PreviewDefaultFile.scss\");\n/* harmony import */ var _svgs_Icons_Media_TextDocument__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../svgs/Icons/Media/TextDocument */ \"./src/Presentation/components/UI/svgs/Icons/Media/TextDocument/index.tsx\");\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\n\n\n\n// eslint-disable-next-line react/function-component-definition\nvar PreviewDefaultFile = function (_a) {\n var fileName = _a.fileName;\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ className: \"preview-default-file-container\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ className: \"preview-default-file-container--placeholder\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { className: \"preview-default-file-container--placeholder__bg\" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"preview-default-file-container--placeholder__icon\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Media_TextDocument__WEBPACK_IMPORTED_MODULE_2__[\"default\"], { width: \"16\", height: \"16\", applyZoom: true, color: \"var(--caption)\" }) }))] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"preview-default-file-container--default-file\" }, { children: fileName }))] })));\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (PreviewDefaultFile);\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDefaultFile/PreviewDefaultFile.tsx?");
|
|
2413
|
+
|
|
2414
|
+
/***/ }),
|
|
2415
|
+
|
|
2166
2416
|
/***/ "./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDialog.tsx":
|
|
2167
2417
|
/*!********************************************************************************!*\
|
|
2168
2418
|
!*** ./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDialog.tsx ***!
|
|
@@ -2170,7 +2420,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
2170
2420
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2171
2421
|
|
|
2172
2422
|
"use strict";
|
|
2173
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _PreviewDialog_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PreviewDialog.scss */ \"./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDialog.scss\");\n/* harmony import */ var _containers_ColumnContainer_ColumnContainer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../containers/ColumnContainer/ColumnContainer */ \"./src/Presentation/components/containers/ColumnContainer/ColumnContainer.tsx\");\n/* harmony import */ var _containers_RowCenterContainer_RowCenterContainer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../containers/RowCenterContainer/RowCenterContainer */ \"./src/Presentation/components/containers/RowCenterContainer/RowCenterContainer.tsx\");\n/* harmony import */ var _svgs_Icons_Contents_PublicChannel__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../svgs/Icons/Contents/PublicChannel */ \"./src/Presentation/components/UI/svgs/Icons/Contents/PublicChannel/index.tsx\");\n/* harmony import */ var _assets_ThemeScheme__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../assets/ThemeScheme */ \"./src/Presentation/assets/ThemeScheme.ts\");\n/* harmony import */ var _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../../Domain/entity/DialogTypes */ \"./src/Domain/entity/DialogTypes.ts\");\n/* harmony import */ var _svgs_Icons_Contents_User__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../svgs/Icons/Contents/User */ \"./src/Presentation/components/UI/svgs/Icons/Contents/User/index.tsx\");\n/* harmony import */ var _svgs_Icons_Contents_GroupChat__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../svgs/Icons/Contents/GroupChat */ \"./src/Presentation/components/UI/svgs/Icons/Contents/GroupChat/index.tsx\");\n/* harmony import */ var _containers_RowLeftContainer_RowLeftContainer__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../containers/RowLeftContainer/RowLeftContainer */ \"./src/Presentation/components/containers/RowLeftContainer/RowLeftContainer.tsx\");\n/* harmony import */ var _svgs_Icons_Toggle_NotifyOff__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../svgs/Icons/Toggle/NotifyOff */ \"./src/Presentation/components/UI/svgs/Icons/Toggle/NotifyOff/index.tsx\");\n/* harmony import */ var _svgs_Icons_Actions_EditDots__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../svgs/Icons/Actions/EditDots */ \"./src/Presentation/components/UI/svgs/Icons/Actions/EditDots/index.tsx\");\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\n\n/* eslint-disable @typescript-eslint/no-unsafe-call */\n\n\n\n\n\n\n\n\n\n\n\n\n// eslint-disable-next-line react/function-component-definition\nvar PreviewDialog = function (_a) {\n // const colorIcon = window\n // .getComputedStyle(document.documentElement)\n // .getPropertyValue('--color-icon')\n // .trim();\n var typeDialog = _a.typeDialog, dialogViewModel = _a.dialogViewModel, dialogAvatar = _a.dialogAvatar, title = _a.title, previewMessage = _a.previewMessage, unreadMessageCount = _a.unreadMessageCount, message_date_time_sent = _a.message_date_time_sent, _b = _a.theme, theme = _b === void 0 ? undefined : _b, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _c = _a.additionalSettings, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n additionalSettings = _c === void 0 ? undefined : _c;\n var colorIcon = (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.mainElements()\n : 'var(--main-elements)';\n var defaultLightTheme = {\n backgroundColorMainSection: (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.mainBackground()\n : 'var(--main-background)',\n backgroundColorAvatarSection: (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.disabledElements()\n : 'var(--disabled-elements)',\n colorAvatarIcon: (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.secondaryText()\n : 'var(--secondary-text)',\n fontColorMessage: (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.inputElements()\n : 'var(--input-elements)',\n fontColorTitle: (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.mainText()\n : 'var(--main-text)',\n divider: (theme === null || theme === void 0 ? void 0 : theme.colorTheme) ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.divider() : 'var(--divider)', // ThemeScheme.primary_50,\n };\n var darkDefaultTheme = {\n backgroundColorMainSection: (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.mainBackground()\n : 'var(--main-background)',\n backgroundColorAvatarSection: (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.disabledElements()\n : 'var(--disabled-elements)',\n colorAvatarIcon: (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.secondaryText()\n : 'var(--secondary-text)',\n fontColorMessage: (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.inputElements()\n : 'var(--input-elements)',\n fontColorTitle: (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.mainText()\n : 'var(--main-text)',\n divider: (theme === null || theme === void 0 ? void 0 : theme.colorTheme) ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.divider() : 'var(--divider)', // ThemeScheme.secondary_400, // 'var(--color-divider)'\n };\n var hoverTheme = darkDefaultTheme;\n if ((theme === null || theme === void 0 ? void 0 : theme.themeName) === 'light') {\n hoverTheme.backgroundColorMainSection = (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.chatInput()\n : 'var(--chat-input)'; // ThemeScheme.primary_a_200;\n hoverTheme.divider = (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.divider()\n : 'var(--divider)'; // ThemeScheme.primary_50;\n }\n else {\n hoverTheme.backgroundColorMainSection = (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.fieldBorder()\n : 'var(--field-border)'; // ThemeScheme.secondary_200;\n }\n var workTheme = (theme === null || theme === void 0 ? void 0 : theme.themeName) === 'light' ? defaultLightTheme : darkDefaultTheme;\n if (theme === null || theme === void 0 ? void 0 : theme.colorTheme) {\n workTheme.colorAvatarIcon = theme === null || theme === void 0 ? void 0 : theme.colorTheme.secondaryText();\n workTheme.backgroundColorAvatarSection =\n theme === null || theme === void 0 ? void 0 : theme.colorTheme.disabledElements();\n workTheme.backgroundColorMainSection = theme === null || theme === void 0 ? void 0 : theme.colorTheme.mainBackground();\n workTheme.fontColorMessage = theme === null || theme === void 0 ? void 0 : theme.colorTheme.inputElements();\n workTheme.fontColorTitle = theme === null || theme === void 0 ? void 0 : theme.colorTheme.mainText();\n workTheme.divider = theme === null || theme === void 0 ? void 0 : theme.colorTheme.divider();\n hoverTheme.backgroundColorMainSection = (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.fieldBorder()\n : 'var(--field-border)'; // ThemeScheme.secondary_200;\n }\n var avatarSectionStyles = {\n backgroundColor: \"\".concat(workTheme.backgroundColorAvatarSection),\n };\n var titleDialogStyles = (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? {\n border: \"1px solid \".concat(workTheme.divider),\n backgroundColor: \"\".concat(workTheme.backgroundColorMainSection),\n color: \"\".concat(workTheme.fontColorTitle),\n }\n : {};\n var messageDialogStyles = (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? { color: \"\".concat(workTheme.colorAvatarIcon) }\n : {};\n var publicIconTheme = {\n color: colorIcon || _assets_ThemeScheme__WEBPACK_IMPORTED_MODULE_6__[\"default\"].primary_400,\n width: '42',\n height: '42',\n };\n var itemTheme = {\n color: workTheme.colorAvatarIcon,\n width: '42',\n height: '42',\n };\n var previewDialogContainerStyles = [\n 'preview-dialog-container',\n theme && theme.selected ? 'preview-selected' : '',\n ].join(' ');\n var avatarWrapperStyles = [\n 'avatar-wrapper',\n typeDialog === _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_7__.DialogType[\"public\"] ? 'public_avatar' : '',\n ].join(' ');\n var textWrapperContainer = [\n unreadMessageCount && unreadMessageCount > 0\n ? 'preview-dialog-container__text-left'\n : 'preview-dialog-container__text',\n (previewMessage === null || previewMessage === void 0 ? void 0 : previewMessage.length) && (previewMessage === null || previewMessage === void 0 ? void 0 : previewMessage.length) > 40 ? 'ellipsis' : '',\n ].join(' ');\n var avatar;\n switch (typeDialog) {\n case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_7__.DialogType[\"public\"]:\n avatar = ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Contents_PublicChannel__WEBPACK_IMPORTED_MODULE_5__[\"default\"], { color: publicIconTheme.color, width: publicIconTheme.width, height: publicIconTheme.height }));\n break;\n case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_7__.DialogType.group:\n avatar = ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Contents_GroupChat__WEBPACK_IMPORTED_MODULE_9__[\"default\"], { color: itemTheme.color, width: itemTheme.width, height: itemTheme.height }));\n break;\n case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_7__.DialogType[\"private\"]:\n avatar = ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Contents_User__WEBPACK_IMPORTED_MODULE_8__[\"default\"], { color: itemTheme.color, width: itemTheme.width, height: itemTheme.height }));\n break;\n default:\n avatar = ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Contents_GroupChat__WEBPACK_IMPORTED_MODULE_9__[\"default\"], { color: itemTheme.color, width: itemTheme.width, height: itemTheme.height }));\n break;\n }\n avatar = dialogAvatar || avatar;\n var _d = react__WEBPACK_IMPORTED_MODULE_1___default().useState(false), haveHover = _d[0], setHaveHover = _d[1];\n var avatarSectionContainer = {\n flexBasis: '56px',\n minWidth: '56px',\n maxWidth: '56px',\n minHeight: '56px',\n maxHeight: '56px',\n };\n var titleContainer = {\n flexBasis: '150px',\n minHeight: '20px',\n maxHeight: '20px',\n maxWidth: '150px',\n minWidth: '150px',\n };\n var badgeContainer = {\n flexBasis: '18px',\n minHeight: '29px',\n maxHeight: '29px',\n maxWidth: '18px',\n minWidth: '18px',\n };\n var badgeItemStyle = {\n width: '19px',\n height: '20px',\n borderRadius: '50%',\n backgroundColor: \"\".concat(publicIconTheme.color ? publicIconTheme.color : 'blue'),\n color: 'white',\n fontSize: '12px',\n lineHeight: '16px',\n };\n var hoverItemStyle = {\n width: '19px',\n height: '20px',\n borderRadius: '50%',\n color: 'white',\n fontSize: '12px',\n lineHeight: '16px',\n };\n var messageMinContainer = {\n flexBasis: '182px',\n minHeight: '29px',\n maxHeight: '29px',\n maxWidth: '182px',\n minWidth: '182px',\n };\n var messageMaxContainer = {\n flexBasis: '182px',\n minHeight: '29px',\n maxHeight: '29px',\n maxWidth: '182px',\n minWidth: '182px',\n };\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ onMouseEnter: function () { return setHaveHover(true); }, onMouseLeave: function () { return setHaveHover(false); }, style: haveHover\n ? __assign(__assign({}, titleDialogStyles), { background: hoverTheme.backgroundColorMainSection, border: \"1px solid \".concat(hoverTheme.divider) }) : titleDialogStyles, className: previewDialogContainerStyles, onClick: function () {\n if (dialogViewModel && dialogViewModel.itemClickActionHandler) {\n var it_1 = dialogViewModel === null || dialogViewModel === void 0 ? void 0 : dialogViewModel.item;\n dialogViewModel.itemClickActionHandler(it_1);\n }\n }, onTouchStart: function () {\n if (dialogViewModel && dialogViewModel.itemTouchActionHandler) {\n var it_2 = dialogViewModel === null || dialogViewModel === void 0 ? void 0 : dialogViewModel.item;\n dialogViewModel.itemTouchActionHandler(it_2);\n }\n } }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_containers_RowCenterContainer_RowCenterContainer__WEBPACK_IMPORTED_MODULE_4__[\"default\"], { minWidthContainer: \"288px\", minHeightContainer: \"56px\", gapBetweenItem: \"16px\", LeftItem: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: avatarSectionStyles, className: avatarWrapperStyles }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: {\n margin: '0 auto',\n } }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: avatar }) })) })), LeftContainerSize: avatarSectionContainer, CenterItem: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_containers_ColumnContainer_ColumnContainer__WEBPACK_IMPORTED_MODULE_3__[\"default\"], __assign({ gapBetweenItem: \"3px\", maxWidth: \"213px\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_containers_RowLeftContainer_RowLeftContainer__WEBPACK_IMPORTED_MODULE_10__[\"default\"], { RightItem: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: { textAlign: 'right' } }, { children: !haveHover ? message_date_time_sent : '' })), CenterContainerSize: titleContainer, CenterItem: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ className: \"row-left-layout-main-container\" }, { children: [typeDialog === _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_7__.DialogType[\"public\"] && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Contents_PublicChannel__WEBPACK_IMPORTED_MODULE_5__[\"default\"], { color: publicIconTheme.color, width: \"20px\", height: \"20px\", applyZoom: true }) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"preview-dialog-container__text-title\" }, { children: title })), (theme === null || theme === void 0 ? void 0 : theme.muted) && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Toggle_NotifyOff__WEBPACK_IMPORTED_MODULE_11__[\"default\"], { color: publicIconTheme.color, width: \"20px\", height: \"20px\", applyZoom: true }) }))] })) }), haveHover ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_containers_RowLeftContainer_RowLeftContainer__WEBPACK_IMPORTED_MODULE_10__[\"default\"], { gapBetweenItem: \"7px\", RightContainerSize: badgeContainer, RightItem: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: hoverItemStyle }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Actions_EditDots__WEBPACK_IMPORTED_MODULE_12__[\"default\"], { color: (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.mainElements()\n : 'var(--main-elements)' }) })) }), CenterContainerSize: messageMinContainer, CenterItem: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"preview-dialog-container__text-left\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"span\", __assign({ className: \"preview-dialog-container__text-concat\" }, { children: previewMessage })) })) })) : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_containers_RowLeftContainer_RowLeftContainer__WEBPACK_IMPORTED_MODULE_10__[\"default\"], { gapBetweenItem: \"7px\", RightContainerSize: badgeContainer, RightItem: unreadMessageCount && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"badge-text-style\", style: badgeItemStyle }, { children: unreadMessageCount &&\n unreadMessageCount.toString().length > 1\n ? '9+'\n : unreadMessageCount })) })), CenterContainerSize: unreadMessageCount && unreadMessageCount > 0\n ? messageMinContainer\n : messageMaxContainer, CenterItem: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: messageDialogStyles, className: textWrapperContainer }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"span\", __assign({ className: \"preview-dialog-container__text-concat\" }, { children: previewMessage })) })) }))] })), CenterContainerSize: {\n flexBasis: '50px',\n minHeight: '50px',\n maxHeight: '50px',\n } }) })));\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (PreviewDialog);\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDialog.tsx?");
|
|
2423
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _PreviewDialog_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./PreviewDialog.scss */ \"./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDialog.scss\");\n/* harmony import */ var _containers_ColumnContainer_ColumnContainer__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../containers/ColumnContainer/ColumnContainer */ \"./src/Presentation/components/containers/ColumnContainer/ColumnContainer.tsx\");\n/* harmony import */ var _containers_RowCenterContainer_RowCenterContainer__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../../containers/RowCenterContainer/RowCenterContainer */ \"./src/Presentation/components/containers/RowCenterContainer/RowCenterContainer.tsx\");\n/* harmony import */ var _svgs_Icons_Contents_PublicChannel__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../svgs/Icons/Contents/PublicChannel */ \"./src/Presentation/components/UI/svgs/Icons/Contents/PublicChannel/index.tsx\");\n/* harmony import */ var _assets_ThemeScheme__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../../assets/ThemeScheme */ \"./src/Presentation/assets/ThemeScheme.ts\");\n/* harmony import */ var _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../../../Domain/entity/DialogTypes */ \"./src/Domain/entity/DialogTypes.ts\");\n/* harmony import */ var _svgs_Icons_Contents_User__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../svgs/Icons/Contents/User */ \"./src/Presentation/components/UI/svgs/Icons/Contents/User/index.tsx\");\n/* harmony import */ var _svgs_Icons_Contents_GroupChat__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../svgs/Icons/Contents/GroupChat */ \"./src/Presentation/components/UI/svgs/Icons/Contents/GroupChat/index.tsx\");\n/* harmony import */ var _containers_RowLeftContainer_RowLeftContainer__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../../containers/RowLeftContainer/RowLeftContainer */ \"./src/Presentation/components/containers/RowLeftContainer/RowLeftContainer.tsx\");\n/* harmony import */ var _svgs_Icons_Toggle_NotifyOff__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../svgs/Icons/Toggle/NotifyOff */ \"./src/Presentation/components/UI/svgs/Icons/Toggle/NotifyOff/index.tsx\");\n/* harmony import */ var _svgs_Icons_Actions_EditDots__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../svgs/Icons/Actions/EditDots */ \"./src/Presentation/components/UI/svgs/Icons/Actions/EditDots/index.tsx\");\n/* harmony import */ var _PreviewImageFile_PreviewImageFile__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./PreviewImageFile/PreviewImageFile */ \"./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewImageFile/PreviewImageFile.tsx\");\n/* harmony import */ var _PreviewAudioFile_PreviewAudioFile__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./PreviewAudioFile/PreviewAudioFile */ \"./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewAudioFile/PreviewAudioFile.tsx\");\n/* harmony import */ var _PreviewVideoFile_PreviewVideoFile__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./PreviewVideoFile/PreviewVideoFile */ \"./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewVideoFile/PreviewVideoFile.tsx\");\n/* harmony import */ var _PreviewDefaultFile_PreviewDefaultFile__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./PreviewDefaultFile/PreviewDefaultFile */ \"./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDefaultFile/PreviewDefaultFile.tsx\");\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\n\n/* eslint-disable @typescript-eslint/no-unsafe-call */\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n// eslint-disable-next-line react/function-component-definition\nvar PreviewDialog = function (_a) {\n // const colorIcon = window\n // .getComputedStyle(document.documentElement)\n // .getPropertyValue('--color-icon')\n // .trim();\n var typeDialog = _a.typeDialog, dialogViewModel = _a.dialogViewModel, dialogAvatar = _a.dialogAvatar, title = _a.title, previewMessage = _a.previewMessage, unreadMessageCount = _a.unreadMessageCount, message_date_time_sent = _a.message_date_time_sent, _b = _a.theme, theme = _b === void 0 ? undefined : _b, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _c = _a.additionalSettings, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n additionalSettings = _c === void 0 ? undefined : _c;\n var colorIcon = (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.mainElements()\n : 'var(--main-elements)';\n var defaultLightTheme = {\n backgroundColorMainSection: (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.mainBackground()\n : 'var(--main-background)',\n backgroundColorAvatarSection: (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.disabledElements()\n : 'var(--disabled-elements)',\n colorAvatarIcon: (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.secondaryText()\n : 'var(--secondary-text)',\n fontColorMessage: (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.inputElements()\n : 'var(--input-elements)',\n fontColorTitle: (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.mainText()\n : 'var(--main-text)',\n divider: (theme === null || theme === void 0 ? void 0 : theme.colorTheme) ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.divider() : 'var(--divider)', // ThemeScheme.primary_50,\n };\n var darkDefaultTheme = {\n backgroundColorMainSection: (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.mainBackground()\n : 'var(--main-background)',\n backgroundColorAvatarSection: (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.disabledElements()\n : 'var(--disabled-elements)',\n colorAvatarIcon: (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.secondaryText()\n : 'var(--secondary-text)',\n fontColorMessage: (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.inputElements()\n : 'var(--input-elements)',\n fontColorTitle: (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.mainText()\n : 'var(--main-text)',\n divider: (theme === null || theme === void 0 ? void 0 : theme.colorTheme) ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.divider() : 'var(--divider)', // ThemeScheme.secondary_400, // 'var(--color-divider)'\n };\n var hoverTheme = darkDefaultTheme;\n if ((theme === null || theme === void 0 ? void 0 : theme.themeName) === 'light') {\n hoverTheme.backgroundColorMainSection = (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.chatInput()\n : 'var(--chat-input)'; // ThemeScheme.primary_a_200;\n hoverTheme.divider = (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.divider()\n : 'var(--divider)'; // ThemeScheme.primary_50;\n }\n else {\n hoverTheme.backgroundColorMainSection = (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.fieldBorder()\n : 'var(--field-border)'; // ThemeScheme.secondary_200;\n }\n var workTheme = (theme === null || theme === void 0 ? void 0 : theme.themeName) === 'light' ? defaultLightTheme : darkDefaultTheme;\n if (theme === null || theme === void 0 ? void 0 : theme.colorTheme) {\n workTheme.colorAvatarIcon = theme === null || theme === void 0 ? void 0 : theme.colorTheme.secondaryText();\n workTheme.backgroundColorAvatarSection =\n theme === null || theme === void 0 ? void 0 : theme.colorTheme.disabledElements();\n workTheme.backgroundColorMainSection = theme === null || theme === void 0 ? void 0 : theme.colorTheme.mainBackground();\n workTheme.fontColorMessage = theme === null || theme === void 0 ? void 0 : theme.colorTheme.inputElements();\n workTheme.fontColorTitle = theme === null || theme === void 0 ? void 0 : theme.colorTheme.mainText();\n workTheme.divider = theme === null || theme === void 0 ? void 0 : theme.colorTheme.divider();\n hoverTheme.backgroundColorMainSection = (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.fieldBorder()\n : 'var(--field-border)'; // ThemeScheme.secondary_200;\n }\n var avatarSectionStyles = {\n backgroundColor: \"\".concat(workTheme.backgroundColorAvatarSection),\n };\n var titleDialogStyles = (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? {\n border: \"1px solid \".concat(workTheme.divider),\n backgroundColor: \"\".concat(workTheme.backgroundColorMainSection),\n color: \"\".concat(workTheme.fontColorTitle),\n }\n : {};\n var messageDialogStyles = (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? { color: \"\".concat(workTheme.colorAvatarIcon) }\n : {};\n var publicIconTheme = {\n color: colorIcon || _assets_ThemeScheme__WEBPACK_IMPORTED_MODULE_6__[\"default\"].primary_400,\n width: '42',\n height: '42',\n };\n var itemTheme = {\n color: workTheme.colorAvatarIcon,\n width: '42',\n height: '42',\n };\n var previewDialogContainerStyles = [\n 'preview-dialog-container',\n theme && theme.selected ? 'preview-selected' : '',\n ].join(' ');\n var avatarWrapperStyles = [\n 'avatar-wrapper',\n typeDialog === _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_7__.DialogType[\"public\"] ? 'public_avatar' : '',\n ].join(' ');\n var textWrapperContainer = [\n unreadMessageCount && unreadMessageCount > 0\n ? 'preview-dialog-container__text-left'\n : 'preview-dialog-container__text',\n (previewMessage === null || previewMessage === void 0 ? void 0 : previewMessage.length) && (previewMessage === null || previewMessage === void 0 ? void 0 : previewMessage.length) > 40 ? 'ellipsis' : '',\n ].join(' ');\n var avatar;\n switch (typeDialog) {\n case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_7__.DialogType[\"public\"]:\n avatar = ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Contents_PublicChannel__WEBPACK_IMPORTED_MODULE_5__[\"default\"], { color: publicIconTheme.color, width: publicIconTheme.width, height: publicIconTheme.height }));\n break;\n case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_7__.DialogType.group:\n avatar = ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Contents_GroupChat__WEBPACK_IMPORTED_MODULE_9__[\"default\"], { color: itemTheme.color, width: itemTheme.width, height: itemTheme.height }));\n break;\n case _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_7__.DialogType[\"private\"]:\n avatar = ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Contents_User__WEBPACK_IMPORTED_MODULE_8__[\"default\"], { color: itemTheme.color, width: itemTheme.width, height: itemTheme.height }));\n break;\n default:\n avatar = ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Contents_GroupChat__WEBPACK_IMPORTED_MODULE_9__[\"default\"], { color: itemTheme.color, width: itemTheme.width, height: itemTheme.height }));\n break;\n }\n avatar = dialogAvatar || avatar;\n var _d = react__WEBPACK_IMPORTED_MODULE_1___default().useState(false), haveHover = _d[0], setHaveHover = _d[1];\n var avatarSectionContainer = {\n flexBasis: '56px',\n minWidth: '56px',\n maxWidth: '56px',\n minHeight: '56px',\n maxHeight: '56px',\n };\n var titleContainer = {\n flexBasis: '150px',\n minHeight: '20px',\n maxHeight: '20px',\n maxWidth: '150px',\n minWidth: '150px',\n };\n var badgeContainer = {\n flexBasis: '18px',\n minHeight: '29px',\n maxHeight: '29px',\n maxWidth: '18px',\n minWidth: '18px',\n };\n var badgeItemStyle = {\n width: '19px',\n height: '20px',\n borderRadius: '50%',\n backgroundColor: \"\".concat(publicIconTheme.color ? publicIconTheme.color : 'blue'),\n color: 'white',\n fontSize: '12px',\n lineHeight: '16px',\n };\n var hoverItemStyle = {\n width: '19px',\n height: '20px',\n borderRadius: '50%',\n color: 'white',\n fontSize: '12px',\n lineHeight: '16px',\n };\n var messageMinContainer = {\n flexBasis: '182px',\n minHeight: '29px',\n maxHeight: '29px',\n maxWidth: '182px',\n minWidth: '182px',\n };\n var messageMaxContainer = {\n flexBasis: '182px',\n minHeight: '29px',\n maxHeight: '29px',\n maxWidth: '182px',\n minWidth: '182px',\n };\n var getMessageParts = function (message) {\n if (message.includes('MediaContentEntity') ||\n message.includes('[Attachment]')) {\n var messageParts = message.split('|');\n // val messageBody = \"${MediaContentEntity::class.java.simpleName}|$fileName|$uid|$fileMimeType\"\n // 0, 1, 2, 3\n return messageParts;\n }\n return [];\n };\n var getPreviewMessage = function (message) {\n var messageParts = getMessageParts(message);\n if (messageParts && messageParts.length > 0) {\n var fileName = messageParts[1];\n var fileUid = messageParts[2];\n var fileUrl = fileUid && QB.content.privateUrl(fileUid);\n var result = (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: message });\n if (messageParts[3].includes('audio')) {\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_PreviewAudioFile_PreviewAudioFile__WEBPACK_IMPORTED_MODULE_14__[\"default\"], { fileName: fileName });\n }\n if (messageParts[3].includes('video')) {\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_PreviewVideoFile_PreviewVideoFile__WEBPACK_IMPORTED_MODULE_15__[\"default\"], { fileName: fileName });\n }\n if (messageParts[3].includes('image')) {\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_PreviewImageFile_PreviewImageFile__WEBPACK_IMPORTED_MODULE_13__[\"default\"], { fileName: fileName, imgUrl: fileUrl });\n }\n if (fileName.length > 0 && fileName.includes('.')) {\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_PreviewDefaultFile_PreviewDefaultFile__WEBPACK_IMPORTED_MODULE_16__[\"default\"], { fileName: fileName });\n }\n return result;\n }\n return (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: message });\n };\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ onMouseEnter: function () { return setHaveHover(true); }, onMouseLeave: function () { return setHaveHover(false); }, style: haveHover\n ? __assign(__assign({}, titleDialogStyles), { background: hoverTheme.backgroundColorMainSection, border: \"1px solid \".concat(hoverTheme.divider) }) : titleDialogStyles, className: previewDialogContainerStyles, onClick: function () {\n if (dialogViewModel && dialogViewModel.itemClickActionHandler) {\n var it_1 = dialogViewModel === null || dialogViewModel === void 0 ? void 0 : dialogViewModel.item;\n dialogViewModel.itemClickActionHandler(it_1);\n }\n }, onTouchStart: function () {\n if (dialogViewModel && dialogViewModel.itemTouchActionHandler) {\n var it_2 = dialogViewModel === null || dialogViewModel === void 0 ? void 0 : dialogViewModel.item;\n dialogViewModel.itemTouchActionHandler(it_2);\n }\n } }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_containers_RowCenterContainer_RowCenterContainer__WEBPACK_IMPORTED_MODULE_4__[\"default\"], { minWidthContainer: \"288px\", minHeightContainer: \"56px\", gapBetweenItem: \"16px\", LeftItem: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: avatarSectionStyles, className: avatarWrapperStyles }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: {\n margin: '0 auto',\n } }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: avatar }) })) })), LeftContainerSize: avatarSectionContainer, CenterItem: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(_containers_ColumnContainer_ColumnContainer__WEBPACK_IMPORTED_MODULE_3__[\"default\"], __assign({ gapBetweenItem: \"3px\", maxWidth: \"213px\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_containers_RowLeftContainer_RowLeftContainer__WEBPACK_IMPORTED_MODULE_10__[\"default\"], { RightItem: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: { textAlign: 'right' } }, { children: !haveHover ? message_date_time_sent : '' })), CenterContainerSize: titleContainer, CenterItem: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ className: \"row-left-layout-main-container\" }, { children: [typeDialog === _Domain_entity_DialogTypes__WEBPACK_IMPORTED_MODULE_7__.DialogType[\"public\"] && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Contents_PublicChannel__WEBPACK_IMPORTED_MODULE_5__[\"default\"], { color: publicIconTheme.color, width: \"20px\", height: \"20px\", applyZoom: true }) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"preview-dialog-container__text-title\" }, { children: title })), (theme === null || theme === void 0 ? void 0 : theme.muted) && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Toggle_NotifyOff__WEBPACK_IMPORTED_MODULE_11__[\"default\"], { color: publicIconTheme.color, width: \"20px\", height: \"20px\", applyZoom: true }) }))] })) }), haveHover ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_containers_RowLeftContainer_RowLeftContainer__WEBPACK_IMPORTED_MODULE_10__[\"default\"], { gapBetweenItem: \"7px\", RightContainerSize: badgeContainer, RightItem: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: hoverItemStyle }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Actions_EditDots__WEBPACK_IMPORTED_MODULE_12__[\"default\"], { color: (theme === null || theme === void 0 ? void 0 : theme.colorTheme)\n ? theme === null || theme === void 0 ? void 0 : theme.colorTheme.mainElements()\n : 'var(--main-elements)' }) })) }), CenterContainerSize: messageMinContainer, CenterItem: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"preview-dialog-container__text-left\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"span\", __assign({ className: \"preview-dialog-container__text-concat\" }, { children: getPreviewMessage(previewMessage || '') })) })) })) : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_containers_RowLeftContainer_RowLeftContainer__WEBPACK_IMPORTED_MODULE_10__[\"default\"], { gapBetweenItem: \"7px\", RightContainerSize: badgeContainer, RightItem: unreadMessageCount && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"badge-text-style\", style: badgeItemStyle }, { children: unreadMessageCount &&\n unreadMessageCount.toString().length > 1\n ? '9+'\n : unreadMessageCount })) })), CenterContainerSize: unreadMessageCount && unreadMessageCount > 0\n ? messageMinContainer\n : messageMaxContainer, CenterItem: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ style: messageDialogStyles, className: textWrapperContainer }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"span\", __assign({ className: \"preview-dialog-container__text-concat\" }, { children: getPreviewMessage(previewMessage || '') })) })) }))] })), CenterContainerSize: {\n flexBasis: '50px',\n minHeight: '50px',\n maxHeight: '50px',\n } }) })));\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (PreviewDialog);\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewDialog.tsx?");
|
|
2174
2424
|
|
|
2175
2425
|
/***/ }),
|
|
2176
2426
|
|
|
@@ -2185,6 +2435,28 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _Vie
|
|
|
2185
2435
|
|
|
2186
2436
|
/***/ }),
|
|
2187
2437
|
|
|
2438
|
+
/***/ "./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewImageFile/PreviewImageFile.tsx":
|
|
2439
|
+
/*!****************************************************************************************************!*\
|
|
2440
|
+
!*** ./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewImageFile/PreviewImageFile.tsx ***!
|
|
2441
|
+
\****************************************************************************************************/
|
|
2442
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2443
|
+
|
|
2444
|
+
"use strict";
|
|
2445
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* harmony import */ var _PreviewImageFile_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PreviewImageFile.scss */ \"./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewImageFile/PreviewImageFile.scss\");\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\n\n\n// eslint-disable-next-line react/function-component-definition\nvar PreviewImageFile = function (_a) {\n var fileName = _a.fileName, imgUrl = _a.imgUrl;\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ className: \"preview-image-file-container\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"preview-image-file-container--placeholder\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"img\", { className: \"preview-image-file-container--placeholder__bg\", src: imgUrl }) })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"preview-image-file-container--travel-img\" }, { children: fileName }))] })));\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (PreviewImageFile);\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewImageFile/PreviewImageFile.tsx?");
|
|
2446
|
+
|
|
2447
|
+
/***/ }),
|
|
2448
|
+
|
|
2449
|
+
/***/ "./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewVideoFile/PreviewVideoFile.tsx":
|
|
2450
|
+
/*!****************************************************************************************************!*\
|
|
2451
|
+
!*** ./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewVideoFile/PreviewVideoFile.tsx ***!
|
|
2452
|
+
\****************************************************************************************************/
|
|
2453
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2454
|
+
|
|
2455
|
+
"use strict";
|
|
2456
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* harmony import */ var _PreviewVideoFile_scss__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./PreviewVideoFile.scss */ \"./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewVideoFile/PreviewVideoFile.scss\");\n/* harmony import */ var _svgs_Icons_Toggle_ImagePlay__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../svgs/Icons/Toggle/ImagePlay */ \"./src/Presentation/components/UI/svgs/Icons/Toggle/ImagePlay/index.tsx\");\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\n\n\n\n// eslint-disable-next-line react/function-component-definition\nvar PreviewVideoFile = function (_a) {\n var fileName = _a.fileName;\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ className: \"preview-video-file-container\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ className: \"preview-video-file-container--placeholder\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { className: \"preview-video-file-container--placeholder__bg\" }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"preview-video-file-container--placeholder__icon\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_svgs_Icons_Toggle_ImagePlay__WEBPACK_IMPORTED_MODULE_2__[\"default\"], { width: \"16\", height: \"16\", applyZoom: true, color: \"var(--caption)\" }) }))] })), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", __assign({ className: \"preview-video-file-container--video-mp-4\" }, { children: fileName }))] })));\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (PreviewVideoFile);\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/Dialogs/PreviewDialog/PreviewVideoFile/PreviewVideoFile.tsx?");
|
|
2457
|
+
|
|
2458
|
+
/***/ }),
|
|
2459
|
+
|
|
2188
2460
|
/***/ "./src/Presentation/components/UI/Dialogs/YesNoQuestion/YesNoQuestion.tsx":
|
|
2189
2461
|
/*!********************************************************************************!*\
|
|
2190
2462
|
!*** ./src/Presentation/components/UI/Dialogs/YesNoQuestion/YesNoQuestion.tsx ***!
|
|
@@ -2262,6 +2534,17 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var reac
|
|
|
2262
2534
|
|
|
2263
2535
|
/***/ }),
|
|
2264
2536
|
|
|
2537
|
+
/***/ "./src/Presentation/components/UI/svgs/Icons/AIWidgets/BotIcon/BotIcon.tsx":
|
|
2538
|
+
/*!*********************************************************************************!*\
|
|
2539
|
+
!*** ./src/Presentation/components/UI/svgs/Icons/AIWidgets/BotIcon/BotIcon.tsx ***!
|
|
2540
|
+
\*********************************************************************************/
|
|
2541
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2542
|
+
|
|
2543
|
+
"use strict";
|
|
2544
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\n\nfunction BotIcon(theme) {\n if (theme === void 0) { theme = undefined; }\n return !(theme === null || theme === void 0 ? void 0 : theme.applyZoom) ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"svg\", __assign({ xmlns: \"http://www.w3.org/2000/svg\", width: theme && theme.width ? theme.width : '24', height: theme && theme.height ? theme.height : '25', viewBox: \"0 0 24 25\", fill: \"none\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", { d: \"M16.1339 5.61003H12.9186V4.69137C12.9186 4.44772 12.8219 4.21406 12.6496 4.04177C12.4773 3.86949 12.2436 3.77271 12 3.77271C11.7563 3.77271 11.5227 3.86949 11.3504 4.04177C11.1781 4.21406 11.0813 4.44772 11.0813 4.69137V5.61003H7.86601C6.64779 5.61003 5.47946 6.09396 4.61805 6.95537C3.75664 7.81678 3.27271 8.98511 3.27271 10.2033V16.6339C3.27271 17.8522 3.75664 19.0205 4.61805 19.8819C5.47946 20.7433 6.64779 21.2272 7.86601 21.2272H16.1339C16.7371 21.2272 17.3344 21.1084 17.8917 20.8776C18.449 20.6468 18.9554 20.3084 19.3819 19.8819C19.8084 19.4554 20.1468 18.949 20.3776 18.3917C20.6084 17.8344 20.7272 17.2371 20.7272 16.6339V10.2033C20.7272 9.60013 20.6084 9.00283 20.3776 8.44555C20.1468 7.88826 19.8084 7.3819 19.3819 6.95537C18.9554 6.52884 18.449 6.1905 17.8917 5.95967C17.3344 5.72883 16.7371 5.61003 16.1339 5.61003ZM18.8899 16.6339C18.8899 17.3649 18.5996 18.0659 18.0827 18.5827C17.5659 19.0996 16.8649 19.3899 16.1339 19.3899H7.86601C7.13507 19.3899 6.43408 19.0996 5.91723 18.5827C5.40039 18.0659 5.11003 17.3649 5.11003 16.6339V10.2033C5.11003 9.47239 5.40039 8.7714 5.91723 8.25455C6.43408 7.73771 7.13507 7.44735 7.86601 7.44735H16.1339C16.8649 7.44735 17.5659 7.73771 18.0827 8.25455C18.5996 8.7714 18.8899 9.47239 18.8899 10.2033V16.6339Z\", fill: theme && theme.color ? theme.color : 'var(--color-icon)' }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", { d: \"M14.7559 10.2034C14.5123 10.2034 14.2786 10.3002 14.1063 10.4724C13.9341 10.6447 13.8373 10.8784 13.8373 11.122V12.9594C13.8373 13.203 13.9341 13.4367 14.1063 13.6089C14.2786 13.7812 14.5123 13.878 14.7559 13.878C14.9996 13.878 15.2332 13.7812 15.4055 13.6089C15.5778 13.4367 15.6746 13.203 15.6746 12.9594V11.122C15.6746 10.8784 15.5778 10.6447 15.4055 10.4724C15.2332 10.3002 14.9996 10.2034 14.7559 10.2034Z\", fill: theme && theme.color ? theme.color : 'var(--color-icon)' }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", { d: \"M9.24398 10.2034C9.00034 10.2034 8.76668 10.3002 8.59439 10.4724C8.42211 10.6447 8.32532 10.8784 8.32532 11.122V12.9594C8.32532 13.203 8.42211 13.4367 8.59439 13.6089C8.76668 13.7812 9.00034 13.878 9.24398 13.878C9.48763 13.878 9.72129 13.7812 9.89358 13.6089C10.0659 13.4367 10.1626 13.203 10.1626 12.9594V11.122C10.1626 10.8784 10.0659 10.6447 9.89358 10.4724C9.72129 10.3002 9.48763 10.2034 9.24398 10.2034Z\", fill: theme && theme.color ? theme.color : 'var(--color-icon)' })] }))) : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"svg\", __assign({ xmlns: \"http://www.w3.org/2000/svg\", width: theme && theme.width ? theme.width : '24', height: theme && theme.height ? theme.height : '25', viewBox: \"0 0 24 25\", fill: \"none\" }, { children: [(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", { d: \"M16.1339 5.61003H12.9186V4.69137C12.9186 4.44772 12.8219 4.21406 12.6496 4.04177C12.4773 3.86949 12.2436 3.77271 12 3.77271C11.7563 3.77271 11.5227 3.86949 11.3504 4.04177C11.1781 4.21406 11.0813 4.44772 11.0813 4.69137V5.61003H7.86601C6.64779 5.61003 5.47946 6.09396 4.61805 6.95537C3.75664 7.81678 3.27271 8.98511 3.27271 10.2033V16.6339C3.27271 17.8522 3.75664 19.0205 4.61805 19.8819C5.47946 20.7433 6.64779 21.2272 7.86601 21.2272H16.1339C16.7371 21.2272 17.3344 21.1084 17.8917 20.8776C18.449 20.6468 18.9554 20.3084 19.3819 19.8819C19.8084 19.4554 20.1468 18.949 20.3776 18.3917C20.6084 17.8344 20.7272 17.2371 20.7272 16.6339V10.2033C20.7272 9.60013 20.6084 9.00283 20.3776 8.44555C20.1468 7.88826 19.8084 7.3819 19.3819 6.95537C18.9554 6.52884 18.449 6.1905 17.8917 5.95967C17.3344 5.72883 16.7371 5.61003 16.1339 5.61003ZM18.8899 16.6339C18.8899 17.3649 18.5996 18.0659 18.0827 18.5827C17.5659 19.0996 16.8649 19.3899 16.1339 19.3899H7.86601C7.13507 19.3899 6.43408 19.0996 5.91723 18.5827C5.40039 18.0659 5.11003 17.3649 5.11003 16.6339V10.2033C5.11003 9.47239 5.40039 8.7714 5.91723 8.25455C6.43408 7.73771 7.13507 7.44735 7.86601 7.44735H16.1339C16.8649 7.44735 17.5659 7.73771 18.0827 8.25455C18.5996 8.7714 18.8899 9.47239 18.8899 10.2033V16.6339Z\", fill: theme && theme.color ? theme.color : 'var(--color-icon)' }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", { d: \"M14.7559 10.2034C14.5123 10.2034 14.2786 10.3002 14.1063 10.4724C13.9341 10.6447 13.8373 10.8784 13.8373 11.122V12.9594C13.8373 13.203 13.9341 13.4367 14.1063 13.6089C14.2786 13.7812 14.5123 13.878 14.7559 13.878C14.9996 13.878 15.2332 13.7812 15.4055 13.6089C15.5778 13.4367 15.6746 13.203 15.6746 12.9594V11.122C15.6746 10.8784 15.5778 10.6447 15.4055 10.4724C15.2332 10.3002 14.9996 10.2034 14.7559 10.2034Z\", fill: theme && theme.color ? theme.color : 'var(--color-icon)' }), (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", { d: \"M9.24398 10.2034C9.00034 10.2034 8.76668 10.3002 8.59439 10.4724C8.42211 10.6447 8.32532 10.8784 8.32532 11.122V12.9594C8.32532 13.203 8.42211 13.4367 8.59439 13.6089C8.76668 13.7812 9.00034 13.878 9.24398 13.878C9.48763 13.878 9.72129 13.7812 9.89358 13.6089C10.0659 13.4367 10.1626 13.203 10.1626 12.9594V11.122C10.1626 10.8784 10.0659 10.6447 9.89358 10.4724C9.72129 10.3002 9.48763 10.2034 9.24398 10.2034Z\", fill: theme && theme.color ? theme.color : 'var(--color-icon)' })] })));\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (BotIcon);\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/svgs/Icons/AIWidgets/BotIcon/BotIcon.tsx?");
|
|
2545
|
+
|
|
2546
|
+
/***/ }),
|
|
2547
|
+
|
|
2265
2548
|
/***/ "./src/Presentation/components/UI/svgs/Icons/AIWidgets/HammerIcon/index.tsx":
|
|
2266
2549
|
/*!**********************************************************************************!*\
|
|
2267
2550
|
!*** ./src/Presentation/components/UI/svgs/Icons/AIWidgets/HammerIcon/index.tsx ***!
|
|
@@ -2372,17 +2655,6 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var reac
|
|
|
2372
2655
|
|
|
2373
2656
|
/***/ }),
|
|
2374
2657
|
|
|
2375
|
-
/***/ "./src/Presentation/components/UI/svgs/Icons/Actions/AssistAnswer/index.tsx":
|
|
2376
|
-
/*!**********************************************************************************!*\
|
|
2377
|
-
!*** ./src/Presentation/components/UI/svgs/Icons/Actions/AssistAnswer/index.tsx ***!
|
|
2378
|
-
\**********************************************************************************/
|
|
2379
|
-
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2380
|
-
|
|
2381
|
-
"use strict";
|
|
2382
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\n\nfunction AssitAnswerIcon(theme) {\n if (theme === void 0) { theme = undefined; }\n return !(theme === null || theme === void 0 ? void 0 : theme.applyZoom) ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"svg\", __assign({ \n // style={{\n // padding: '5px 3px 5px 3px',\n // alignSelf: 'stretch',\n // flex: '1',\n // position: 'relative',\n // overflow: 'visible',\n // }}\n width: theme && theme.width ? theme.width : '44', height: theme && theme.height ? theme.height : '44', viewBox: \"0 0 44 44\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", { id: \"AssistAnswer\", fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M15.7687 4.60889C17.85 4.60889 19.5373 6.27566 19.5373 8.33173V15.7774C19.5373 17.5695 18.2893 19.3012 15.7932 20.9725C16.3014 18.7501 16.1432 17.6388 15.3186 17.6388H8.23152C6.15018 17.6388 4.46292 15.9721 4.46292 13.916V8.33173C4.46292 6.27566 6.15018 4.60889 8.23152 4.60889H15.7687ZM15.7687 8.33173H8.23152C7.71118 8.33173 7.28937 8.74842 7.28937 9.26244V12.0546C7.28937 12.5686 7.71118 12.9853 8.23152 12.9853H15.7687C16.289 12.9853 16.7109 12.5686 16.7109 12.0546V9.26244C16.7109 8.74842 16.289 8.33173 15.7687 8.33173ZM10.1158 9.26244C10.6361 9.26244 11.058 9.67913 11.058 10.1932V11.1239C11.058 11.6379 10.6361 12.0546 10.1158 12.0546C9.59548 12.0546 9.17366 11.6379 9.17366 11.1239V10.1932C9.17366 9.67913 9.59548 9.26244 10.1158 9.26244ZM13.8844 9.26244C14.4047 9.26244 14.8266 9.67913 14.8266 10.1932V11.1239C14.8266 11.6379 14.4047 12.0546 13.8844 12.0546C13.3641 12.0546 12.9423 11.6379 12.9423 11.1239V10.1932C12.9423 9.67913 13.3641 9.26244 13.8844 9.26244ZM2.57862 8.33173H3.52077V13.916H2.57862C2.05829 13.916 1.63647 13.4993 1.63647 12.9853V9.26244C1.63647 8.74842 2.05829 8.33173 2.57862 8.33173ZM20.4794 8.33173H21.4216C21.9419 8.33173 22.3637 8.74842 22.3637 9.26244V12.9853C22.3637 13.4993 21.9419 13.916 21.4216 13.916H20.4794V8.33173Z\", fill: theme && theme.color ? theme.color : 'var(--color-icon)' }) }))) : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"svg\", __assign({ \n // style={{\n // padding: '5px 3px 5px 3px',\n // alignSelf: 'stretch',\n // flex: '1',\n // position: 'relative',\n // overflow: 'visible',\n // }}\n width: theme && theme.width ? theme.width : '24', height: theme && theme.height ? theme.height : '24', viewBox: \"0 0 24 24\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", { id: \"AssistAnswer\", fillRule: \"evenodd\", clipRule: \"evenodd\", d: \"M15.7687 4.60889C17.85 4.60889 19.5373 6.27566 19.5373 8.33173V15.7774C19.5373 17.5695 18.2893 19.3012 15.7932 20.9725C16.3014 18.7501 16.1432 17.6388 15.3186 17.6388H8.23152C6.15018 17.6388 4.46292 15.9721 4.46292 13.916V8.33173C4.46292 6.27566 6.15018 4.60889 8.23152 4.60889H15.7687ZM15.7687 8.33173H8.23152C7.71118 8.33173 7.28937 8.74842 7.28937 9.26244V12.0546C7.28937 12.5686 7.71118 12.9853 8.23152 12.9853H15.7687C16.289 12.9853 16.7109 12.5686 16.7109 12.0546V9.26244C16.7109 8.74842 16.289 8.33173 15.7687 8.33173ZM10.1158 9.26244C10.6361 9.26244 11.058 9.67913 11.058 10.1932V11.1239C11.058 11.6379 10.6361 12.0546 10.1158 12.0546C9.59548 12.0546 9.17366 11.6379 9.17366 11.1239V10.1932C9.17366 9.67913 9.59548 9.26244 10.1158 9.26244ZM13.8844 9.26244C14.4047 9.26244 14.8266 9.67913 14.8266 10.1932V11.1239C14.8266 11.6379 14.4047 12.0546 13.8844 12.0546C13.3641 12.0546 12.9423 11.6379 12.9423 11.1239V10.1932C12.9423 9.67913 13.3641 9.26244 13.8844 9.26244ZM2.57862 8.33173H3.52077V13.916H2.57862C2.05829 13.916 1.63647 13.4993 1.63647 12.9853V9.26244C1.63647 8.74842 2.05829 8.33173 2.57862 8.33173ZM20.4794 8.33173H21.4216C21.9419 8.33173 22.3637 8.74842 22.3637 9.26244V12.9853C22.3637 13.4993 21.9419 13.916 21.4216 13.916H20.4794V8.33173Z\", fill: theme && theme.color ? theme.color : 'var(--color-icon)' }) })));\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (AssitAnswerIcon);\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/svgs/Icons/Actions/AssistAnswer/index.tsx?");
|
|
2383
|
-
|
|
2384
|
-
/***/ }),
|
|
2385
|
-
|
|
2386
2658
|
/***/ "./src/Presentation/components/UI/svgs/Icons/Actions/EditDots/index.tsx":
|
|
2387
2659
|
/*!******************************************************************************!*\
|
|
2388
2660
|
!*** ./src/Presentation/components/UI/svgs/Icons/Actions/EditDots/index.tsx ***!
|
|
@@ -2537,6 +2809,17 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var reac
|
|
|
2537
2809
|
|
|
2538
2810
|
/***/ }),
|
|
2539
2811
|
|
|
2812
|
+
/***/ "./src/Presentation/components/UI/svgs/Icons/Media/TextDocument/index.tsx":
|
|
2813
|
+
/*!********************************************************************************!*\
|
|
2814
|
+
!*** ./src/Presentation/components/UI/svgs/Icons/Media/TextDocument/index.tsx ***!
|
|
2815
|
+
\********************************************************************************/
|
|
2816
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2817
|
+
|
|
2818
|
+
"use strict";
|
|
2819
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\n\nfunction TextDocument(theme) {\n if (theme === void 0) { theme = undefined; }\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"svg\", __assign({ width: theme && theme.width ? theme.width : '44', height: theme && theme.height ? theme.height : '44', viewBox: \"0 0 44 44\", fill: \"none\", xmlns: \"http://www.w3.org/2000/svg\" }, { children: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"path\", { d: \"M25.6668 3.66675H11.0002C8.9835 3.66675 7.35183 5.31675 7.35183 7.33341L7.3335 36.6667C7.3335 38.6834 8.96516 40.3334 10.9818 40.3334H33.0002C35.0168 40.3334 36.6668 38.6834 36.6668 36.6667V14.6667L25.6668 3.66675ZM29.3335 33.0001H14.6668V29.3334H29.3335V33.0001ZM29.3335 25.6667H14.6668V22.0001H29.3335V25.6667ZM23.8335 16.5001V6.41675L33.9168 16.5001H23.8335Z\", id: \"TextDocument\", fill: theme && theme.color ? theme.color : 'var(--color-icon)' }) })));\n}\n/* harmony default export */ __webpack_exports__[\"default\"] = (TextDocument);\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/UI/svgs/Icons/Media/TextDocument/index.tsx?");
|
|
2820
|
+
|
|
2821
|
+
/***/ }),
|
|
2822
|
+
|
|
2540
2823
|
/***/ "./src/Presentation/components/UI/svgs/Icons/Media/Translate/index.tsx":
|
|
2541
2824
|
/*!*****************************************************************************!*\
|
|
2542
2825
|
!*** ./src/Presentation/components/UI/svgs/Icons/Media/Translate/index.tsx ***!
|
|
@@ -2764,7 +3047,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var reac
|
|
|
2764
3047
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2765
3048
|
|
|
2766
3049
|
"use strict";
|
|
2767
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _providers_QuickBloxUIKitProvider_useQbInitializedDataContext__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../providers/QuickBloxUIKitProvider/useQbInitializedDataContext */ \"./src/Presentation/components/providers/QuickBloxUIKitProvider/useQbInitializedDataContext.ts\");\n/* harmony import */ var _Views_Dialogs_Dialogs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../Views/Dialogs/Dialogs */ \"./src/Presentation/Views/Dialogs/Dialogs.tsx\");\n/* harmony import */ var _UI_Dialogs_DialogInformation_DialogInformation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../UI/Dialogs/DialogInformation/DialogInformation */ \"./src/Presentation/components/UI/Dialogs/DialogInformation/DialogInformation.tsx\");\n/* harmony import */ var _DesktopLayout__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./DesktopLayout */ \"./src/Presentation/components/layouts/Desktop/DesktopLayout.tsx\");\n/* harmony import */ var _UI_Dialogs_MessagesView_MessagesView__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../UI/Dialogs/MessagesView/MessagesView */ \"./src/Presentation/components/UI/Dialogs/MessagesView/MessagesView.tsx\");\n/* harmony import */ var _Views_Dialogs_useDialogsViewModel__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../Views/Dialogs/useDialogsViewModel */ \"./src/Presentation/Views/Dialogs/useDialogsViewModel.ts\");\n/* harmony import */ var _Domain_repository_Pagination__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../Domain/repository/Pagination */ \"./src/Domain/repository/Pagination.ts\");\n/* harmony import */ var _UI_Dialogs_MessagesView_AIWidgets_UseDefaultAIAssistAnswerWidget__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../UI/Dialogs/MessagesView/AIWidgets/UseDefaultAIAssistAnswerWidget */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAIAssistAnswerWidget.tsx\");\n/* harmony import */ var _UI_Dialogs_MessagesView_AIWidgets_UseDefaultAITranslateWidget__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../UI/Dialogs/MessagesView/AIWidgets/UseDefaultAITranslateWidget */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAITranslateWidget.tsx\");\n/* harmony import */ var _UI_Dialogs_MessagesView_AIWidgets_UseDefaultAIRephraseMessageWidget__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../UI/Dialogs/MessagesView/AIWidgets/UseDefaultAIRephraseMessageWidget */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAIRephraseMessageWidget.tsx\");\n/* harmony import */ var _Data_DefaultConfigurations__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../../Data/DefaultConfigurations */ \"./src/Data/DefaultConfigurations.ts\");\n/* harmony import */ var _UI_Dialogs_MessagesView_AIWidgets_UseDefaultAIAssistAnswerWidgetWithProxy__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../UI/Dialogs/MessagesView/AIWidgets/UseDefaultAIAssistAnswerWidgetWithProxy */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAIAssistAnswerWidgetWithProxy.tsx\");\n/* harmony import */ var _UI_Dialogs_MessagesView_AIWidgets_UseDefaultAITranslateWidgetWithProxy__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../UI/Dialogs/MessagesView/AIWidgets/UseDefaultAITranslateWidgetWithProxy */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAITranslateWidgetWithProxy.tsx\");\n/* harmony import */ var _UI_Dialogs_MessagesView_AIWidgets_UseDefaultAIRephraseMessageWidgetWithProxy__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../UI/Dialogs/MessagesView/AIWidgets/UseDefaultAIRephraseMessageWidgetWithProxy */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAIRephraseMessageWidgetWithProxy.tsx\");\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar QuickBloxUIKitDesktopLayout = function (_a) {\n var _b, _c, _d;\n var _e = _a.theme, theme = _e === void 0 ? undefined : _e, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _f = _a.AITranslate, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n AITranslate = _f === void 0 ? undefined : _f, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _g = _a.AIRephrase, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n AIRephrase = _g === void 0 ? undefined : _g, _h = _a.AIAssist, AIAssist = _h === void 0 ? undefined : _h;\n console.log('create QuickBloxUIKitDesktopLayout');\n var _j = react__WEBPACK_IMPORTED_MODULE_1___default().useState(), selectedDialog = _j[0], setSelectedDialog = _j[1];\n var currentContext = (0,_providers_QuickBloxUIKitProvider_useQbInitializedDataContext__WEBPACK_IMPORTED_MODULE_2__[\"default\"])();\n var QBConfig = currentContext.InitParams.qbConfig ||\n _Data_DefaultConfigurations__WEBPACK_IMPORTED_MODULE_12__.DefaultConfigurations.getDefaultQBConfig();\n // const eventMessaging = useEventMessagesRepository();\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n var userName = (_b = currentContext.storage.REMOTE_DATA_SOURCE.authInformation) === null || _b === void 0 ? void 0 : _b.userName;\n var userId = (_c = currentContext.storage.REMOTE_DATA_SOURCE.authInformation) === null || _c === void 0 ? void 0 : _c.userId;\n var sessionToken = (_d = currentContext.storage.REMOTE_DATA_SOURCE.authInformation) === null || _d === void 0 ? void 0 : _d.sessionToken;\n var dialogsViewModel = (0,_Views_Dialogs_useDialogsViewModel__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(currentContext);\n var defaultAIEditMessageWidget = AIRephrase === null || AIRephrase === void 0 ? void 0 : AIRephrase.AIWidget; // useDefaultTextInputWidget();\n var defaultAITranslateWidget = AITranslate === null || AITranslate === void 0 ? void 0 : AITranslate.AIWidget;\n var defaultAIAnswerToMessageWidget = AIAssist === null || AIAssist === void 0 ? void 0 : AIAssist.AIWidget;\n var getAIAssistAnswer = function () {\n if ((AIAssist === null || AIAssist === void 0 ? void 0 : AIAssist.enabled) && !(AIAssist === null || AIAssist === void 0 ? void 0 : AIAssist.default)) {\n defaultAIAnswerToMessageWidget = AIAssist.AIWidget;\n }\n else if ((AIAssist === null || AIAssist === void 0 ? void 0 : AIAssist.enabled) ||\n QBConfig.configAIApi.AIAnswerAssistWidgetConfig.useDefault) {\n if (!QBConfig.configAIApi.AIAnswerAssistWidgetConfig.useDefault ||\n (AIAssist && !(AIAssist === null || AIAssist === void 0 ? void 0 : AIAssist.default))) {\n defaultAIAnswerToMessageWidget = undefined;\n }\n else {\n var apiKey = QBConfig.configAIApi.AIAnswerAssistWidgetConfig.apiKey;\n var token = '';\n var proxyConfig = QBConfig.configAIApi.AIAnswerAssistWidgetConfig.proxyConfig ||\n _Data_DefaultConfigurations__WEBPACK_IMPORTED_MODULE_12__.DefaultConfigurations.getDefaultProxyConfig();\n if (apiKey) {\n token = apiKey;\n defaultAIAnswerToMessageWidget = (0,_UI_Dialogs_MessagesView_AIWidgets_UseDefaultAIAssistAnswerWidget__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(__assign(__assign({}, proxyConfig), { apiKeyOrSessionToken: token }));\n }\n else {\n token =\n QBConfig.configAIApi.AIAnswerAssistWidgetConfig.proxyConfig\n .sessionToken ||\n sessionToken ||\n '';\n defaultAIAnswerToMessageWidget =\n (0,_UI_Dialogs_MessagesView_AIWidgets_UseDefaultAIAssistAnswerWidgetWithProxy__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(__assign(__assign({}, proxyConfig), { apiKeyOrSessionToken: token }));\n }\n }\n }\n };\n var getAITranslate = function () {\n if ((AITranslate === null || AITranslate === void 0 ? void 0 : AITranslate.enabled) && !(AITranslate === null || AITranslate === void 0 ? void 0 : AITranslate.default)) {\n defaultAITranslateWidget = AITranslate.AIWidget;\n }\n else if ((AITranslate === null || AITranslate === void 0 ? void 0 : AITranslate.enabled) ||\n QBConfig.configAIApi.AITranslateWidgetConfig.useDefault) {\n if (!QBConfig.configAIApi.AITranslateWidgetConfig.useDefault ||\n (AITranslate && !(AITranslate === null || AITranslate === void 0 ? void 0 : AITranslate.default))) {\n defaultAITranslateWidget = undefined;\n }\n else {\n var apiKey = QBConfig.configAIApi.AITranslateWidgetConfig.apiKey;\n var token = '';\n var proxyConfig = QBConfig.configAIApi.AITranslateWidgetConfig.proxyConfig ||\n _Data_DefaultConfigurations__WEBPACK_IMPORTED_MODULE_12__.DefaultConfigurations.getDefaultProxyConfig();\n if (apiKey) {\n token = apiKey;\n defaultAITranslateWidget = (0,_UI_Dialogs_MessagesView_AIWidgets_UseDefaultAITranslateWidget__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(__assign(__assign({}, proxyConfig), { apiKeyOrSessionToken: token }));\n }\n else {\n token =\n QBConfig.configAIApi.AITranslateWidgetConfig.proxyConfig\n .sessionToken ||\n sessionToken ||\n '';\n defaultAITranslateWidget = (0,_UI_Dialogs_MessagesView_AIWidgets_UseDefaultAITranslateWidgetWithProxy__WEBPACK_IMPORTED_MODULE_14__[\"default\"])(__assign(__assign({}, proxyConfig), { apiKeyOrSessionToken: token }));\n }\n }\n }\n };\n var getAIRephrase = function () {\n if ((AIRephrase === null || AIRephrase === void 0 ? void 0 : AIRephrase.enabled) && !(AIRephrase === null || AIRephrase === void 0 ? void 0 : AIRephrase.default)) {\n defaultAIEditMessageWidget = AIRephrase.AIWidget;\n }\n else if ((AIRephrase === null || AIRephrase === void 0 ? void 0 : AIRephrase.enabled) ||\n QBConfig.configAIApi.AIRephraseWidgetConfig.useDefault) {\n if (!QBConfig.configAIApi.AIRephraseWidgetConfig.useDefault ||\n (AIRephrase && !(AIRephrase === null || AIRephrase === void 0 ? void 0 : AIRephrase.default))) {\n defaultAIEditMessageWidget = undefined;\n }\n else {\n var apiKey = QBConfig.configAIApi.AIRephraseWidgetConfig.apiKey;\n var token = '';\n var proxyConfig = QBConfig.configAIApi.AIRephraseWidgetConfig.proxyConfig ||\n _Data_DefaultConfigurations__WEBPACK_IMPORTED_MODULE_12__.DefaultConfigurations.getDefaultProxyConfig();\n if (apiKey) {\n token = apiKey;\n defaultAIEditMessageWidget = (0,_UI_Dialogs_MessagesView_AIWidgets_UseDefaultAIRephraseMessageWidget__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(__assign(__assign({}, proxyConfig), { apiKeyOrSessionToken: token }));\n }\n else {\n token =\n QBConfig.configAIApi.AIRephraseWidgetConfig.proxyConfig\n .sessionToken ||\n sessionToken ||\n '';\n defaultAIEditMessageWidget =\n (0,_UI_Dialogs_MessagesView_AIWidgets_UseDefaultAIRephraseMessageWidgetWithProxy__WEBPACK_IMPORTED_MODULE_15__[\"default\"])(__assign(__assign({}, proxyConfig), { apiKeyOrSessionToken: token }));\n }\n }\n }\n };\n getAITranslate();\n getAIRephrase();\n getAIAssistAnswer();\n var selectDialogActions = function (item) {\n if (!dialogsViewModel.loading) {\n setSelectedDialog(item);\n }\n };\n // const subscribeToDialogEventsUseCase: SubscribeToDialogEventsUseCase =\n // new SubscribeToDialogEventsUseCase(eventMessaging, 'TestStage');\n // инициализация СДК и загрузка тестовых данных, запуск пинга - может не быть\n // todo: добавить метод в контекст\n var isAuthProcessed = function () {\n console.log('call isAuthProcessed');\n var result = currentContext.storage.REMOTE_DATA_SOURCE.needInit === false &&\n currentContext.storage.REMOTE_DATA_SOURCE.authProcessed &&\n currentContext.storage.CONNECTION_REPOSITORY.needInit === false;\n console.log(\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n \"initialValue.REMOTE_DATA_SOURCE_MOCK.needInit: \".concat(currentContext.storage.REMOTE_DATA_SOURCE.needInit));\n console.log(\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n \"initialValue.REMOTE_DATA_SOURCE_MOCK.authProcessed: \".concat(currentContext.storage.REMOTE_DATA_SOURCE.authProcessed));\n console.log(\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n \"initialValue.CONNECTION_REPOSITORY.needInit: \".concat(currentContext.storage.CONNECTION_REPOSITORY.needInit));\n return result;\n };\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n console.log('TestStage: GET DATA ');\n console.log(\"auth data: \".concat(JSON.stringify(currentContext.InitParams.loginData), \" at \").concat(new Date().toLocaleTimeString()));\n if (isAuthProcessed()) {\n console.log('auth is completed, CAN GET DATA');\n var pagination = new _Domain_repository_Pagination__WEBPACK_IMPORTED_MODULE_8__.Pagination();\n dialogsViewModel === null || dialogsViewModel === void 0 ? void 0 : dialogsViewModel.getDialogs(pagination);\n }\n return function () {\n console.log('TestStage: USE EFFECT release');\n dialogsViewModel.release();\n };\n }, []); // сейчас это выполняется один раз при старте, а нужно каждый раз при смене пользователя\n // const dialogsEventHandler = (dialogInfo: DialogEventInfo) => {\n // console.log('call dialogsEventHandler in QuickBloxUIKitDesktopLayout');\n // if (dialogInfo.eventMessageType === EventMessageType.SystemMessage) {\n // switch (dialogInfo.notificationTypes) {\n // case NotificationTypes.DELETE_LEAVE_DIALOG: {\n // if (\n // dialogInfo.messageInfo &&\n // dialogInfo.messageInfo.sender_id === userId\n // ) {\n // setSelectedDialog(undefined);\n // }\n //\n // break;\n // }\n // default: {\n // const pagination: Pagination = new Pagination();\n //\n // dialogsViewModel?.getDialogs(pagination);\n // break;\n // }\n // }\n // }\n // };\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n console.log('TestStage: GET DATA AFTER User data has CHANGED');\n console.log(\"auth is \".concat(JSON.stringify(currentContext.InitParams.loginData), \" at \").concat(new Date().toLocaleTimeString()));\n if (isAuthProcessed()) {\n console.log('auth is completed, FETCH DATA');\n var pagination = new _Domain_repository_Pagination__WEBPACK_IMPORTED_MODULE_8__.Pagination();\n dialogsViewModel === null || dialogsViewModel === void 0 ? void 0 : dialogsViewModel.getDialogs(pagination);\n //\n // console.log('auth is completed, subscribe');\n //\n // subscribeToDialogEventsUseCase\n // .execute(dialogsEventHandler)\n // .catch((reason) => {\n // console.log(stringifyError(reason));\n // });\n // //\n // console.log('subscribe is completed, go');\n }\n }, [currentContext.InitParams]);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n var _a;\n console.log(\"TestStage: selectedDialog: \".concat(((_a = selectedDialog === null || selectedDialog === void 0 ? void 0 : selectedDialog.entity) === null || _a === void 0 ? void 0 : _a.name) || 'Dialog Name is empty'));\n if (selectedDialog && selectedDialog.entity) {\n dialogsViewModel.entity = selectedDialog.entity;\n }\n }, [selectedDialog]);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n var _a;\n console.log(\"Clear selected dialog: \".concat(((_a = selectedDialog === null || selectedDialog === void 0 ? void 0 : selectedDialog.entity) === null || _a === void 0 ? void 0 : _a.name) || 'Dialog Name is empty'));\n if (!dialogsViewModel.entity) {\n setSelectedDialog(undefined);\n }\n }, [dialogsViewModel.entity]);\n var _k = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(true), needDialogInformation = _k[0], setNeedDialogInformation = _k[1];\n var informationCloseHandler = function () {\n setNeedDialogInformation(false);\n };\n var informationOpenHandler = function () {\n setNeedDialogInformation(true);\n };\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_DesktopLayout__WEBPACK_IMPORTED_MODULE_5__[\"default\"], { theme: theme, dialogsView: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Views_Dialogs_Dialogs__WEBPACK_IMPORTED_MODULE_3__[\"default\"]\n // subHeaderContent={<CompanyLogo />}\n // upHeaderContent={<CompanyLogo />}\n , { \n // subHeaderContent={<CompanyLogo />}\n // upHeaderContent={<CompanyLogo />}\n dialogsViewModel: dialogsViewModel, onDialogSelectHandler: selectDialogActions, additionalSettings: {\n withoutHeader: false,\n themeHeader: theme,\n themePreview: theme,\n useSubHeader: false,\n useUpHeader: false,\n } }), dialogMessagesView: selectedDialog && selectedDialog.entity && dialogsViewModel.entity ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UI_Dialogs_MessagesView_MessagesView__WEBPACK_IMPORTED_MODULE_6__[\"default\"]\n // subHeaderContent={<CompanyLogo />}\n // upHeaderContent={<CompanyLogo />}\n , { \n // subHeaderContent={<CompanyLogo />}\n // upHeaderContent={<CompanyLogo />}\n dialogsViewModel: dialogsViewModel, onDialogInformationHandler: informationOpenHandler, maxWidthToResize: selectedDialog && needDialogInformation ? undefined : '1040px', AIRephrase: defaultAIEditMessageWidget, AITranslate: defaultAITranslateWidget, AIAssist: defaultAIAnswerToMessageWidget, theme: theme }) // 1 Get Messages + 1 Get User by Id\n ) : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ style: {\n minHeight: '799px',\n minWidth: '1040px',\n border: '1px solid var(--divider)',\n margin: '0 auto',\n } }, { children: [\"You login as \", userName, \"(\", userId, \"). Select chat to start conversation.\"] }))), dialogInfoView: \n // 1 Get User by 1 + Get user by name\n (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: selectedDialog && needDialogInformation && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UI_Dialogs_DialogInformation_DialogInformation__WEBPACK_IMPORTED_MODULE_4__[\"default\"]\n // subHeaderContent={<CompanyLogo />}\n // upHeaderContent={<CompanyLogo />}\n , { \n // subHeaderContent={<CompanyLogo />}\n // upHeaderContent={<CompanyLogo />}\n dialog: selectedDialog.entity, dialogViewModel: dialogsViewModel, onCloseDialogInformationHandler: informationCloseHandler })) }) }));\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (QuickBloxUIKitDesktopLayout);\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/layouts/Desktop/QuickBloxUIKitDesktopLayout.tsx?");
|
|
3050
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react/jsx-runtime */ \"./node_modules/react/jsx-runtime.js\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _providers_QuickBloxUIKitProvider_useQbInitializedDataContext__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../providers/QuickBloxUIKitProvider/useQbInitializedDataContext */ \"./src/Presentation/components/providers/QuickBloxUIKitProvider/useQbInitializedDataContext.ts\");\n/* harmony import */ var _Views_Dialogs_Dialogs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../../Views/Dialogs/Dialogs */ \"./src/Presentation/Views/Dialogs/Dialogs.tsx\");\n/* harmony import */ var _UI_Dialogs_DialogInformation_DialogInformation__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../UI/Dialogs/DialogInformation/DialogInformation */ \"./src/Presentation/components/UI/Dialogs/DialogInformation/DialogInformation.tsx\");\n/* harmony import */ var _DesktopLayout__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./DesktopLayout */ \"./src/Presentation/components/layouts/Desktop/DesktopLayout.tsx\");\n/* harmony import */ var _UI_Dialogs_MessagesView_MessagesView__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../UI/Dialogs/MessagesView/MessagesView */ \"./src/Presentation/components/UI/Dialogs/MessagesView/MessagesView.tsx\");\n/* harmony import */ var _Views_Dialogs_useDialogsViewModel__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../../Views/Dialogs/useDialogsViewModel */ \"./src/Presentation/Views/Dialogs/useDialogsViewModel.ts\");\n/* harmony import */ var _Domain_repository_Pagination__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../../../Domain/repository/Pagination */ \"./src/Domain/repository/Pagination.ts\");\n/* harmony import */ var _UI_Dialogs_MessagesView_AIWidgets_UseDefaultAIAssistAnswerWidget__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../UI/Dialogs/MessagesView/AIWidgets/UseDefaultAIAssistAnswerWidget */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAIAssistAnswerWidget.tsx\");\n/* harmony import */ var _UI_Dialogs_MessagesView_AIWidgets_UseDefaultAITranslateWidget__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../UI/Dialogs/MessagesView/AIWidgets/UseDefaultAITranslateWidget */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAITranslateWidget.tsx\");\n/* harmony import */ var _UI_Dialogs_MessagesView_AIWidgets_UseDefaultAIRephraseMessageWidget__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../UI/Dialogs/MessagesView/AIWidgets/UseDefaultAIRephraseMessageWidget */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAIRephraseMessageWidget.tsx\");\n/* harmony import */ var _Data_DefaultConfigurations__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../../../Data/DefaultConfigurations */ \"./src/Data/DefaultConfigurations.ts\");\n/* harmony import */ var _UI_Dialogs_MessagesView_AIWidgets_UseDefaultAIAssistAnswerWidgetWithProxy__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../UI/Dialogs/MessagesView/AIWidgets/UseDefaultAIAssistAnswerWidgetWithProxy */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAIAssistAnswerWidgetWithProxy.tsx\");\n/* harmony import */ var _UI_Dialogs_MessagesView_AIWidgets_UseDefaultAITranslateWidgetWithProxy__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../UI/Dialogs/MessagesView/AIWidgets/UseDefaultAITranslateWidgetWithProxy */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAITranslateWidgetWithProxy.tsx\");\n/* harmony import */ var _UI_Dialogs_MessagesView_AIWidgets_UseDefaultAIRephraseMessageWidgetWithProxy__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../UI/Dialogs/MessagesView/AIWidgets/UseDefaultAIRephraseMessageWidgetWithProxy */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/UseDefaultAIRephraseMessageWidgetWithProxy.tsx\");\nvar __assign = (undefined && undefined.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nvar QuickBloxUIKitDesktopLayout = function (_a) {\n var _b, _c, _d;\n var _e = _a.theme, theme = _e === void 0 ? undefined : _e, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _f = _a.AITranslate, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n AITranslate = _f === void 0 ? undefined : _f, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n _g = _a.AIRephrase, \n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n AIRephrase = _g === void 0 ? undefined : _g, _h = _a.AIAssist, AIAssist = _h === void 0 ? undefined : _h;\n console.log('create QuickBloxUIKitDesktopLayout');\n var _j = react__WEBPACK_IMPORTED_MODULE_1___default().useState(), selectedDialog = _j[0], setSelectedDialog = _j[1];\n var currentContext = (0,_providers_QuickBloxUIKitProvider_useQbInitializedDataContext__WEBPACK_IMPORTED_MODULE_2__[\"default\"])();\n var QBConfig = currentContext.InitParams.qbConfig ||\n _Data_DefaultConfigurations__WEBPACK_IMPORTED_MODULE_12__.DefaultConfigurations.getDefaultQBConfig();\n // const eventMessaging = useEventMessagesRepository();\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n var userName = (_b = currentContext.storage.REMOTE_DATA_SOURCE.authInformation) === null || _b === void 0 ? void 0 : _b.userName;\n var userId = (_c = currentContext.storage.REMOTE_DATA_SOURCE.authInformation) === null || _c === void 0 ? void 0 : _c.userId;\n var sessionToken = (_d = currentContext.storage.REMOTE_DATA_SOURCE.authInformation) === null || _d === void 0 ? void 0 : _d.sessionToken;\n var dialogsViewModel = (0,_Views_Dialogs_useDialogsViewModel__WEBPACK_IMPORTED_MODULE_7__[\"default\"])(currentContext);\n var defaultAIEditMessageWidget = AIRephrase === null || AIRephrase === void 0 ? void 0 : AIRephrase.AIWidget; // useDefaultTextInputWidget();\n var defaultAITranslateWidget = AITranslate === null || AITranslate === void 0 ? void 0 : AITranslate.AIWidget;\n var defaultAIAnswerToMessageWidget = AIAssist === null || AIAssist === void 0 ? void 0 : AIAssist.AIWidget;\n var getAIAssistAnswer = function () {\n if ((AIAssist === null || AIAssist === void 0 ? void 0 : AIAssist.enabled) && !(AIAssist === null || AIAssist === void 0 ? void 0 : AIAssist.default)) {\n defaultAIAnswerToMessageWidget = AIAssist.AIWidget;\n }\n else if ((AIAssist === null || AIAssist === void 0 ? void 0 : AIAssist.enabled) ||\n QBConfig.configAIApi.AIAnswerAssistWidgetConfig.useDefault) {\n if (!QBConfig.configAIApi.AIAnswerAssistWidgetConfig.useDefault ||\n (AIAssist && !(AIAssist === null || AIAssist === void 0 ? void 0 : AIAssist.default))) {\n defaultAIAnswerToMessageWidget = undefined;\n }\n else {\n var apiKey = QBConfig.configAIApi.AIAnswerAssistWidgetConfig.apiKey;\n var token = '';\n var proxyConfig = QBConfig.configAIApi.AIAnswerAssistWidgetConfig.proxyConfig ||\n _Data_DefaultConfigurations__WEBPACK_IMPORTED_MODULE_12__.DefaultConfigurations.getDefaultProxyConfig();\n if (apiKey) {\n token = apiKey;\n defaultAIAnswerToMessageWidget = (0,_UI_Dialogs_MessagesView_AIWidgets_UseDefaultAIAssistAnswerWidget__WEBPACK_IMPORTED_MODULE_9__[\"default\"])(__assign(__assign({}, proxyConfig), { apiKeyOrSessionToken: token }));\n }\n else {\n token = sessionToken || '';\n defaultAIAnswerToMessageWidget =\n (0,_UI_Dialogs_MessagesView_AIWidgets_UseDefaultAIAssistAnswerWidgetWithProxy__WEBPACK_IMPORTED_MODULE_13__[\"default\"])(__assign(__assign({}, proxyConfig), { apiKeyOrSessionToken: token }));\n }\n }\n }\n };\n var getAITranslate = function () {\n if ((AITranslate === null || AITranslate === void 0 ? void 0 : AITranslate.enabled) && !(AITranslate === null || AITranslate === void 0 ? void 0 : AITranslate.default)) {\n defaultAITranslateWidget = AITranslate.AIWidget;\n }\n else if ((AITranslate === null || AITranslate === void 0 ? void 0 : AITranslate.enabled) ||\n QBConfig.configAIApi.AITranslateWidgetConfig.useDefault) {\n if (!QBConfig.configAIApi.AITranslateWidgetConfig.useDefault ||\n (AITranslate && !(AITranslate === null || AITranslate === void 0 ? void 0 : AITranslate.default))) {\n defaultAITranslateWidget = undefined;\n }\n else {\n var apiKey = QBConfig.configAIApi.AITranslateWidgetConfig.apiKey;\n var token = '';\n var proxyConfig = QBConfig.configAIApi.AITranslateWidgetConfig.proxyConfig ||\n _Data_DefaultConfigurations__WEBPACK_IMPORTED_MODULE_12__.DefaultConfigurations.getDefaultProxyConfig();\n if (apiKey) {\n token = apiKey;\n defaultAITranslateWidget = (0,_UI_Dialogs_MessagesView_AIWidgets_UseDefaultAITranslateWidget__WEBPACK_IMPORTED_MODULE_10__[\"default\"])(__assign(__assign({}, proxyConfig), { apiKeyOrSessionToken: token }));\n }\n else {\n token = sessionToken || '';\n defaultAITranslateWidget = (0,_UI_Dialogs_MessagesView_AIWidgets_UseDefaultAITranslateWidgetWithProxy__WEBPACK_IMPORTED_MODULE_14__[\"default\"])(__assign(__assign({}, proxyConfig), { apiKeyOrSessionToken: token }));\n }\n }\n }\n };\n var getAIRephrase = function () {\n if ((AIRephrase === null || AIRephrase === void 0 ? void 0 : AIRephrase.enabled) && !(AIRephrase === null || AIRephrase === void 0 ? void 0 : AIRephrase.default)) {\n defaultAIEditMessageWidget = AIRephrase.AIWidget;\n }\n else if ((AIRephrase === null || AIRephrase === void 0 ? void 0 : AIRephrase.enabled) ||\n QBConfig.configAIApi.AIRephraseWidgetConfig.useDefault) {\n if (!QBConfig.configAIApi.AIRephraseWidgetConfig.useDefault ||\n (AIRephrase && !(AIRephrase === null || AIRephrase === void 0 ? void 0 : AIRephrase.default))) {\n defaultAIEditMessageWidget = undefined;\n }\n else {\n var apiKey = QBConfig.configAIApi.AIRephraseWidgetConfig.apiKey;\n var token = '';\n var proxyConfig = QBConfig.configAIApi.AIRephraseWidgetConfig.proxyConfig ||\n _Data_DefaultConfigurations__WEBPACK_IMPORTED_MODULE_12__.DefaultConfigurations.getDefaultProxyConfig();\n if (apiKey) {\n token = apiKey;\n defaultAIEditMessageWidget = (0,_UI_Dialogs_MessagesView_AIWidgets_UseDefaultAIRephraseMessageWidget__WEBPACK_IMPORTED_MODULE_11__[\"default\"])(__assign(__assign({}, proxyConfig), { apiKeyOrSessionToken: token }));\n }\n else {\n token = sessionToken || '';\n defaultAIEditMessageWidget =\n (0,_UI_Dialogs_MessagesView_AIWidgets_UseDefaultAIRephraseMessageWidgetWithProxy__WEBPACK_IMPORTED_MODULE_15__[\"default\"])(__assign(__assign({}, proxyConfig), { apiKeyOrSessionToken: token }));\n }\n }\n }\n };\n getAITranslate();\n getAIRephrase();\n getAIAssistAnswer();\n var selectDialogActions = function (item) {\n if (!dialogsViewModel.loading) {\n setSelectedDialog(item);\n }\n };\n // const subscribeToDialogEventsUseCase: SubscribeToDialogEventsUseCase =\n // new SubscribeToDialogEventsUseCase(eventMessaging, 'TestStage');\n // инициализация СДК и загрузка тестовых данных, запуск пинга - может не быть\n // todo: добавить метод в контекст\n var isAuthProcessed = function () {\n console.log('call isAuthProcessed');\n var result = currentContext.storage.REMOTE_DATA_SOURCE.needInit === false &&\n currentContext.storage.REMOTE_DATA_SOURCE.authProcessed &&\n currentContext.storage.CONNECTION_REPOSITORY.needInit === false;\n console.log(\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n \"initialValue.REMOTE_DATA_SOURCE_MOCK.needInit: \".concat(currentContext.storage.REMOTE_DATA_SOURCE.needInit));\n console.log(\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n \"initialValue.REMOTE_DATA_SOURCE_MOCK.authProcessed: \".concat(currentContext.storage.REMOTE_DATA_SOURCE.authProcessed));\n console.log(\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n \"initialValue.CONNECTION_REPOSITORY.needInit: \".concat(currentContext.storage.CONNECTION_REPOSITORY.needInit));\n return result;\n };\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n console.log('TestStage: GET DATA ');\n console.log(\"auth data: \".concat(JSON.stringify(currentContext.InitParams.loginData), \" at \").concat(new Date().toLocaleTimeString()));\n if (isAuthProcessed()) {\n console.log('auth is completed, CAN GET DATA');\n var pagination = new _Domain_repository_Pagination__WEBPACK_IMPORTED_MODULE_8__.Pagination();\n dialogsViewModel === null || dialogsViewModel === void 0 ? void 0 : dialogsViewModel.getDialogs(pagination);\n }\n return function () {\n console.log('TestStage: USE EFFECT release');\n dialogsViewModel.release();\n };\n }, []); // сейчас это выполняется один раз при старте, а нужно каждый раз при смене пользователя\n // const dialogsEventHandler = (dialogInfo: DialogEventInfo) => {\n // console.log('call dialogsEventHandler in QuickBloxUIKitDesktopLayout');\n // if (dialogInfo.eventMessageType === EventMessageType.SystemMessage) {\n // switch (dialogInfo.notificationTypes) {\n // case NotificationTypes.DELETE_LEAVE_DIALOG: {\n // if (\n // dialogInfo.messageInfo &&\n // dialogInfo.messageInfo.sender_id === userId\n // ) {\n // setSelectedDialog(undefined);\n // }\n //\n // break;\n // }\n // default: {\n // const pagination: Pagination = new Pagination();\n //\n // dialogsViewModel?.getDialogs(pagination);\n // break;\n // }\n // }\n // }\n // };\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n console.log('TestStage: GET DATA AFTER User data has CHANGED');\n console.log(\"auth is \".concat(JSON.stringify(currentContext.InitParams.loginData), \" at \").concat(new Date().toLocaleTimeString()));\n if (isAuthProcessed()) {\n console.log('auth is completed, FETCH DATA');\n var pagination = new _Domain_repository_Pagination__WEBPACK_IMPORTED_MODULE_8__.Pagination();\n dialogsViewModel === null || dialogsViewModel === void 0 ? void 0 : dialogsViewModel.getDialogs(pagination);\n //\n // console.log('auth is completed, subscribe');\n //\n // subscribeToDialogEventsUseCase\n // .execute(dialogsEventHandler)\n // .catch((reason) => {\n // console.log(stringifyError(reason));\n // });\n // //\n // console.log('subscribe is completed, go');\n }\n }, [currentContext.InitParams]);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n var _a;\n console.log(\"TestStage: selectedDialog: \".concat(((_a = selectedDialog === null || selectedDialog === void 0 ? void 0 : selectedDialog.entity) === null || _a === void 0 ? void 0 : _a.name) || 'Dialog Name is empty'));\n if (selectedDialog && selectedDialog.entity) {\n dialogsViewModel.entity = selectedDialog.entity;\n }\n }, [selectedDialog]);\n (0,react__WEBPACK_IMPORTED_MODULE_1__.useEffect)(function () {\n var _a;\n console.log(\"Clear selected dialog: \".concat(((_a = selectedDialog === null || selectedDialog === void 0 ? void 0 : selectedDialog.entity) === null || _a === void 0 ? void 0 : _a.name) || 'Dialog Name is empty'));\n if (!dialogsViewModel.entity) {\n setSelectedDialog(undefined);\n }\n }, [dialogsViewModel.entity]);\n var _k = (0,react__WEBPACK_IMPORTED_MODULE_1__.useState)(true), needDialogInformation = _k[0], setNeedDialogInformation = _k[1];\n var informationCloseHandler = function () {\n setNeedDialogInformation(false);\n };\n var informationOpenHandler = function () {\n setNeedDialogInformation(true);\n };\n return ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_DesktopLayout__WEBPACK_IMPORTED_MODULE_5__[\"default\"], { theme: theme, dialogsView: (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_Views_Dialogs_Dialogs__WEBPACK_IMPORTED_MODULE_3__[\"default\"]\n // subHeaderContent={<CompanyLogo />}\n // upHeaderContent={<CompanyLogo />}\n , { \n // subHeaderContent={<CompanyLogo />}\n // upHeaderContent={<CompanyLogo />}\n dialogsViewModel: dialogsViewModel, onDialogSelectHandler: selectDialogActions, additionalSettings: {\n withoutHeader: false,\n themeHeader: theme,\n themePreview: theme,\n useSubHeader: false,\n useUpHeader: false,\n } }), dialogMessagesView: selectedDialog && selectedDialog.entity && dialogsViewModel.entity ? ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UI_Dialogs_MessagesView_MessagesView__WEBPACK_IMPORTED_MODULE_6__[\"default\"]\n // subHeaderContent={<CompanyLogo />}\n // upHeaderContent={<CompanyLogo />}\n , { \n // subHeaderContent={<CompanyLogo />}\n // upHeaderContent={<CompanyLogo />}\n dialogsViewModel: dialogsViewModel, onDialogInformationHandler: informationOpenHandler, maxWidthToResize: selectedDialog && needDialogInformation ? undefined : '1040px', AIRephrase: defaultAIEditMessageWidget, AITranslate: defaultAITranslateWidget, AIAssist: defaultAIAnswerToMessageWidget, theme: theme }) // 1 Get Messages + 1 Get User by Id\n ) : ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsxs)(\"div\", __assign({ style: {\n minHeight: '799px',\n minWidth: '1040px',\n border: '1px solid var(--divider)',\n margin: '0 auto',\n } }, { children: [\"You login as \", userName, \"(\", userId, \"). Select chat to start conversation.\"] }))), dialogInfoView: \n // 1 Get User by 1 + Get user by name\n (0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(\"div\", { children: selectedDialog && needDialogInformation && ((0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__.jsx)(_UI_Dialogs_DialogInformation_DialogInformation__WEBPACK_IMPORTED_MODULE_4__[\"default\"]\n // subHeaderContent={<CompanyLogo />}\n // upHeaderContent={<CompanyLogo />}\n , { \n // subHeaderContent={<CompanyLogo />}\n // upHeaderContent={<CompanyLogo />}\n dialog: selectedDialog.entity, dialogViewModel: dialogsViewModel, onCloseDialogInformationHandler: informationCloseHandler })) }) }));\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (QuickBloxUIKitDesktopLayout);\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/layouts/Desktop/QuickBloxUIKitDesktopLayout.tsx?");
|
|
2768
3051
|
|
|
2769
3052
|
/***/ }),
|
|
2770
3053
|
|
|
@@ -2841,7 +3124,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var reac
|
|
|
2841
3124
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2842
3125
|
|
|
2843
3126
|
"use strict";
|
|
2844
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _QuickBloxUIKitProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./QuickBloxUIKitProvider */ \"./src/Presentation/components/providers/QuickBloxUIKitProvider/QuickBloxUIKitProvider.tsx\");\n\n\nvar useQbInitializedDataContext = function () {\n var currentQbDataContext = react__WEBPACK_IMPORTED_MODULE_0___default().useContext(_QuickBloxUIKitProvider__WEBPACK_IMPORTED_MODULE_1__.qbDataContext);\n console.log(\
|
|
3127
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ \"react\");\n/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _QuickBloxUIKitProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./QuickBloxUIKitProvider */ \"./src/Presentation/components/providers/QuickBloxUIKitProvider/QuickBloxUIKitProvider.tsx\");\n\n\nvar useQbInitializedDataContext = function () {\n var currentQbDataContext = react__WEBPACK_IMPORTED_MODULE_0___default().useContext(_QuickBloxUIKitProvider__WEBPACK_IMPORTED_MODULE_1__.qbDataContext);\n // console.log(\n // `call useQbDataContext with init param: ${JSON.stringify(\n // currentQbDataContext.InitParams,\n // // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n // )}`,\n // );\n // todo: throw exception if we have not enough data to start session or login\n // let QuickBloxVersion = '';\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n if (!window.QB) {\n throw new Error('HAVE NO SDK');\n }\n // else {\n // QuickBloxVersion = `Have SDK lib: version ${QB.version} build ${QB.buildNumber}`;\n // console.log(QuickBloxVersion);\n // }\n if (!currentQbDataContext) {\n throw new Error('HAVE NO DATA CONTEXT');\n }\n if (!currentQbDataContext.InitParams) {\n throw new Error('HAVE NO INIT SDK DATA');\n }\n // проверять был ли обработан логин\n // если сведения для логина - ник, пароль или токен сессии\n // console.log(\n // 'data context: update init param: ',\n // JSON.stringify(currentQbDataContext.InitParams),\n // );\n if (currentQbDataContext.InitParams.accountData.appId &&\n currentQbDataContext.InitParams.accountData.accountKey &&\n currentQbDataContext.InitParams.accountData.accountKey.length > 0) {\n if (currentQbDataContext.InitParams.accountData.sessionToken &&\n currentQbDataContext.InitParams.accountData.sessionToken.length > 0) {\n /* empty */\n }\n else if (currentQbDataContext.InitParams.accountData.authSecret &&\n currentQbDataContext.InitParams.accountData.authSecret.length > 0) {\n // проверить был ли проинициализирован репозиторий этими данными\n // и залогинен юзер\n // QBInit({\n // appIdOrToken: currentQbDataContext.QBInitParams.accountData.appId,\n // authKeyOrAppId: currentQbDataContext.QBInitParams.accountData.authKey,\n // authSecret: currentQbDataContext.QBInitParams.accountData.authSecret,\n // accountKey: currentQbDataContext.QBInitParams.accountData.accountKey,\n // });\n // if (\n // currentQbDataContext.InitParams.loginData &&\n // currentQbDataContext.InitParams.loginData.login &&\n // currentQbDataContext.InitParams.loginData.login.length > 0 &&\n // currentQbDataContext.InitParams.loginData.password &&\n // currentQbDataContext.InitParams.loginData.password.length > 0\n // ) {\n // QuickBloxVersion = `Init SDK was success: version ${QB.version} build ${QB.buildNumber}`;\n // console.log(QuickBloxVersion);\n // console.log('all data to auth is collected');\n // // currentQbDataContext.updateAuthProcessedStatus(true);\n // } else {\n // throw new Error('HAVE NO AUTH USER DATA: login or password');\n // }\n }\n else {\n throw new Error('HAVE NO AUTH USER or WRONG authSecret');\n }\n }\n else {\n throw new Error('HAVE NO APPID OR ACCOUNT KEY');\n }\n return currentQbDataContext;\n};\n/* harmony default export */ __webpack_exports__[\"default\"] = (useQbInitializedDataContext);\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/Presentation/components/providers/QuickBloxUIKitProvider/useQbInitializedDataContext.ts?");
|
|
2845
3128
|
|
|
2846
3129
|
/***/ }),
|
|
2847
3130
|
|
|
@@ -2863,7 +3146,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var reac
|
|
|
2863
3146
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2864
3147
|
|
|
2865
3148
|
"use strict";
|
|
2866
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"QBConfig\": function() { return /* binding */ QBConfig; }\n/* harmony export */ });\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar QBConfig = {\n credentials: {\n appId: -1,\n accountKey: '',\n authKey: '',\n authSecret: '',\n sessionToken: '',\n },\n configAIApi: {\n AIAnswerAssistWidgetConfig: {\n apiKey: '',\n useDefault: true,\n proxyConfig: {\n api: 'v1/chat/completions',\n servername: 'http://localhost',\n port: '3011',\n sessionToken: '',\n },\n },\n AITranslateWidgetConfig: {\n apiKey: '',\n useDefault: true,\n defaultLanguage: 'English',\n languages: [\n 'English',\n 'Spanish',\n 'French',\n 'Portuguese',\n 'German',\n 'Ukrainian',\n ],\n proxyConfig: {\n api: 'v1/chat/completions',\n servername: 'http://localhost',\n port: '3011',\n sessionToken: '',\n },\n },\n AIRephraseWidgetConfig: {\n apiKey: '',\n useDefault: true,\n defaultTone: 'Professional',\n proxyConfig: {\n api: 'v1/chat/completions',\n servername: 'http://localhost',\n port: '3011',\n sessionToken: '',\n },\n },\n },\n appConfig: {\n maxFileSize: 10 * 1024 * 1024,\n sessionTimeOut: 122,\n chatProtocol: {\n active: 2,\n },\n debug: true,\n endpoints: {\n api: 'api.quickblox.com',\n chat: 'chat.quickblox.com',\n },\n on: {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/require-await\n sessionExpired: function (handleResponse, retry) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n console.log(\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n \"QBconfig sessionExpired handle: \".concat(handleResponse, \" \").concat(retry));\n return [2 /*return*/];\n });\n });\n },\n },\n streamManagement: {\n enable: true,\n },\n },\n};\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/QBconfig.ts?");
|
|
3149
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"QBConfig\": function() { return /* binding */ QBConfig; }\n/* harmony export */ });\nvar __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (undefined && undefined.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar QBConfig = {\n credentials: {\n appId: -1,\n accountKey: '',\n authKey: '',\n authSecret: '',\n sessionToken: '',\n },\n configAIApi: {\n AIAnswerAssistWidgetConfig: {\n organizationName: 'Quickblox',\n openAIModel: 'gpt-3.5-turbo',\n apiKey: '',\n maxTokens: 3584,\n useDefault: true,\n proxyConfig: {\n api: 'v1/chat/completions',\n servername: 'https://api.openai.com/',\n port: '',\n },\n },\n AITranslateWidgetConfig: {\n organizationName: 'Quickblox',\n openAIModel: 'gpt-3.5-turbo',\n apiKey: '',\n maxTokens: 3584,\n useDefault: true,\n defaultLanguage: '',\n languages: [\n 'English',\n 'Spanish',\n 'French',\n 'Portuguese',\n 'German',\n 'Ukrainian',\n ],\n proxyConfig: {\n api: 'v1/chat/completions',\n servername: 'https://api.openai.com/',\n port: '',\n },\n // proxyConfig: {\n // api: 'v1/chat/completions',\n // servername: 'http://localhost',\n // port: '3012',\n // },\n },\n AIRephraseWidgetConfig: {\n organizationName: 'Quickblox',\n openAIModel: 'gpt-3.5-turbo',\n apiKey: '',\n maxTokens: 3584,\n useDefault: true,\n defaultTone: 'Professional',\n Tones: [\n {\n name: 'Professional Tone',\n description: 'This would edit messages to sound more formal, using technical vocabulary, clear sentence structures, and maintaining a respectful tone. It would avoid colloquial language and ensure appropriate salutations and sign-offs',\n iconEmoji: '👔',\n },\n {\n name: 'Friendly Tone',\n description: 'This would adjust messages to reflect a casual, friendly tone. It would incorporate casual language, use emoticons, exclamation points, and other informalities to make the message seem more friendly and approachable.',\n iconEmoji: '🤝',\n },\n {\n name: 'Encouraging Tone',\n description: 'This tone would be useful for motivation and encouragement. It would include positive words, affirmations, and express support and belief in the recipient.',\n iconEmoji: '💪',\n },\n {\n name: 'Empathetic Tone',\n description: 'This tone would be utilized to display understanding and empathy. It would involve softer language, acknowledging feelings, and demonstrating compassion and support.',\n iconEmoji: '🤲',\n },\n {\n name: 'Neutral Tone',\n description: 'For times when you want to maintain an even, unbiased, and objective tone. It would avoid extreme language and emotive words, opting for clear, straightforward communication.',\n iconEmoji: '😐',\n },\n {\n name: 'Assertive Tone',\n description: 'This tone is beneficial for making clear points, standing ground, or in negotiations. It uses direct language, is confident, and does not mince words.',\n iconEmoji: '🔨',\n },\n {\n name: 'Instructive Tone',\n description: 'This tone would be useful for tutorials, guides, or other teaching and training materials. It is clear, concise, and walks the reader through steps or processes in a logical manner.',\n iconEmoji: '📖',\n },\n {\n name: 'Persuasive Tone',\n description: 'This tone can be used when trying to convince someone or argue a point. It uses persuasive language, powerful words, and logical reasoning.',\n iconEmoji: '☝️',\n },\n {\n name: 'Sarcastic/Ironic Tone',\n description: 'This tone can make the communication more humorous or show an ironic stance. It is harder to implement as it requires the AI to understand nuanced language and may not always be taken as intended by the reader.',\n iconEmoji: '😏',\n },\n {\n name: 'Poetic Tone',\n description: 'This would add an artistic touch to messages, using figurative language, rhymes, and rhythm to create a more expressive text.',\n iconEmoji: '🎭',\n },\n ],\n proxyConfig: {\n api: 'v1/chat/completions',\n servername: 'https://api.openai.com/',\n port: '',\n },\n },\n },\n appConfig: {\n maxFileSize: 10 * 1024 * 1024,\n sessionTimeOut: 122,\n chatProtocol: {\n active: 2,\n },\n debug: true,\n endpoints: {\n api: 'api.quickblox.com',\n chat: 'chat.quickblox.com',\n },\n on: {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/require-await\n sessionExpired: function (handleResponse, retry) {\n return __awaiter(this, void 0, void 0, function () {\n return __generator(this, function (_a) {\n console.log(\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n \"QBconfig sessionExpired handle: \".concat(handleResponse, \" \").concat(retry));\n return [2 /*return*/];\n });\n });\n },\n },\n streamManagement: {\n enable: true,\n },\n },\n // credentials: {\n // appId: -1,\n // accountKey: '',\n // authKey: '',\n // authSecret: '',\n // sessionToken: '',\n // },\n // configAIApi: {\n // AIAnswerAssistWidgetConfig: {\n // apiKey: '',\n // useDefault: true,\n // proxyConfig: {\n // api: 'v1/chat/completions',\n // servername: 'http://localhost',\n // port: '3011',\n // sessionToken: '',\n // },\n // },\n // AITranslateWidgetConfig: {\n // apiKey: '',\n // useDefault: true,\n // defaultLanguage: 'English',\n // languages: [\n // 'English',\n // 'Spanish',\n // 'French',\n // 'Portuguese',\n // 'German',\n // 'Ukrainian',\n // ],\n // proxyConfig: {\n // api: 'v1/chat/completions',\n // servername: 'http://localhost',\n // port: '3011',\n // sessionToken: '',\n // },\n // },\n // AIRephraseWidgetConfig: {\n // apiKey: '',\n // useDefault: true,\n // defaultTone: 'Professional',\n // proxyConfig: {\n // api: 'v1/chat/completions',\n // servername: 'http://localhost',\n // port: '3011',\n // sessionToken: '',\n // },\n // },\n // },\n // appConfig: {\n // maxFileSize: 10 * 1024 * 1024,\n // sessionTimeOut: 122,\n // chatProtocol: {\n // active: 2,\n // },\n // debug: true,\n // endpoints: {\n // api: 'api.quickblox.com',\n // chat: 'chat.quickblox.com',\n // },\n // on: {\n // // eslint-disable-next-line @typescript-eslint/no-unused-vars,@typescript-eslint/require-await\n // async sessionExpired(handleResponse: any, retry: any) {\n // console.log(\n // // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n // `QBconfig sessionExpired handle: ${handleResponse} ${retry}`,\n // );\n // },\n // },\n // streamManagement: {\n // enable: true,\n // },\n // },\n};\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/QBconfig.ts?");
|
|
2867
3150
|
|
|
2868
3151
|
/***/ }),
|
|
2869
3152
|
|
|
@@ -2918,7 +3201,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
|
|
|
2918
3201
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
2919
3202
|
|
|
2920
3203
|
"use strict";
|
|
2921
|
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"completeSentence\": function() { return /* binding */ completeSentence; },\n/* harmony export */ \"loopToLimitTokens\": function() { return /* binding */ loopToLimitTokens; },\n/* harmony export */ \"tokenCounter\": function() { return /* binding */ tokenCounter; }\n/* harmony export */ });\n// import { encode } from 'gpt-3-encoder';\nvar __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nvar completeSentence = function (text) {\n return (text === null || text === void 0 ? void 0 : text.replace(/([^.!?;]+)[^.!?;]*$/, ' ...')) || '';\n};\n// export const tokenCounter = (text?: string) => (text ? encode(text).length : 0);\nvar tokenCounter = function (text) { return (text ? text.length / 4 : 0); };\nvar loopToLimitTokens = function (limit, data, getValue, tokens) {\n if (getValue === void 0) { getValue = function (item) {\n return typeof item === 'string' ? item : String(item);\n }; }\n if (tokens === void 0) { tokens = 0; }\n if (!data.length) {\n return [];\n }\n var firstItem = data[0], lastItems = data.slice(1);\n var itemValue = getValue(firstItem);\n var itemTokens = tokenCounter(itemValue);\n var amountTokens = tokens + itemTokens;\n if (amountTokens <= limit) {\n var nextData = loopToLimitTokens(limit, lastItems, getValue, amountTokens);\n return itemTokens === 0 ? nextData : __spreadArray([firstItem], nextData, true);\n }\n return [];\n};\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/utils/utils.ts?");
|
|
3204
|
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ \"AIUtils\": function() { return /* binding */ AIUtils; },\n/* harmony export */ \"completeSentence\": function() { return /* binding */ completeSentence; },\n/* harmony export */ \"loopToLimitTokens\": function() { return /* binding */ loopToLimitTokens; },\n/* harmony export */ \"tokenCounter\": function() { return /* binding */ tokenCounter; }\n/* harmony export */ });\n/* harmony import */ var _Presentation_components_UI_Dialogs_MessagesView_AIWidgets_Tone__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../Presentation/components/UI/Dialogs/MessagesView/AIWidgets/Tone */ \"./src/Presentation/components/UI/Dialogs/MessagesView/AIWidgets/Tone.ts\");\n// import { encode } from 'gpt-3-encoder';\nvar __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\n\nvar completeSentence = function (text) {\n return (text === null || text === void 0 ? void 0 : text.replace(/([^.!?;]+)[^.!?;]*$/, ' ...')) || '';\n};\n// export const tokenCounter = (text?: string) => (text ? encode(text).length : 0);\nvar tokenCounter = function (text) { return (text ? text.length / 4 : 0); };\nvar loopToLimitTokens = function (limit, data, getValue, tokens) {\n if (getValue === void 0) { getValue = function (item) {\n return typeof item === 'string' ? item : String(item);\n }; }\n if (tokens === void 0) { tokens = 0; }\n if (!data.length) {\n return [];\n }\n var firstItem = data[0], lastItems = data.slice(1);\n var itemValue = getValue(firstItem);\n var itemTokens = tokenCounter(itemValue);\n var amountTokens = tokens + itemTokens;\n if (amountTokens <= limit) {\n var nextData = loopToLimitTokens(limit, lastItems, getValue, amountTokens);\n return itemTokens === 0 ? nextData : __spreadArray([firstItem], nextData, true);\n }\n return [];\n};\nvar AIUtils = /** @class */ (function () {\n function AIUtils() {\n }\n AIUtils.createTranslatePrompt = function (textToSend, language) {\n var prompt = \"Please, translate the next text in english and give me just only translated text. Text to translate is: \\\"\".concat(textToSend, \"\\\"\");\n if (language) {\n prompt = \"Please, translate the next text in \".concat(language, \" and give me just only translated text. Text to translate is: \\\"\").concat(textToSend, \"\\\"\");\n }\n return prompt;\n };\n AIUtils.createAnswerAssistPrompt = function (textToSend) {\n var prompt = \"You are a customer support chat operator. Your goal is to provide helpful and informative responses to customer inquiries. Give a response to the next user's query, considering the entire conversation context, and use grammar and vocabulary at the A2-B2 level. Answer in the format of simple sentences. Do not include question in answer. Please, provide answer for this issue:\\\"\".concat(textToSend, \"\\\"\");\n return prompt;\n };\n AIUtils.createRephrasePrompt = function (textToSend, tone) {\n var prompt = \"Analyze the entire context of our conversation \\u2013 all the messages \\u2013 and create a brief summary of our discussion. Based on this analysis, rephrase the following text in a style and tone that is typical for most of the dialogue messages. Provide only the rephrased text in as the message text to rephrase and nothing more.Give me only rephrase text in brackets and nothing more. Here is the message text to rephrase:\\\"\".concat(textToSend, \"\\\"\");\n if (tone) {\n prompt = \"Analyze the entire context of our conversation \\u2013 all the messages \\u2013 and create a brief summary of our discussion. Based on this analysis, rephrase the following text in a \".concat((0,_Presentation_components_UI_Dialogs_MessagesView_AIWidgets_Tone__WEBPACK_IMPORTED_MODULE_0__.toneToString)(tone), \" style. Provide only the rephrased text in the same language as the message text to rephrase and nothing more.Give me only rephrase text in brackets and nothing more. Here is the message text to rephrase:\\\"\").concat(textToSend, \"\\\"\");\n }\n return prompt;\n };\n AIUtils.messageEntitiesToIChatMessageCollection = function (messageEntities, currentUserId, MAX_TOKENS) {\n if (MAX_TOKENS === void 0) { MAX_TOKENS = 3584; }\n var items = messageEntities.filter(function (it) {\n return !it.notification_type ||\n (it.notification_type && it.notification_type.length === 0);\n });\n var messages = loopToLimitTokens(MAX_TOKENS, items, function (_a) {\n var message = _a.message;\n return message || '';\n }).reverse();\n var chatCompletionMessages = messages.map(function (_a) {\n var message = _a.message, sender_id = _a.sender_id;\n return ({\n role: sender_id === currentUserId ? 'user' : 'assistant',\n content: message,\n });\n });\n //\n return chatCompletionMessages;\n };\n return AIUtils;\n}());\n\n\n\n//# sourceURL=webpack://quickblox-react-ui-kit/./src/utils/utils.ts?");
|
|
2922
3205
|
|
|
2923
3206
|
/***/ }),
|
|
2924
3207
|
|