jodit-pro 4.11.24 → 4.11.26
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/es2015/jodit.css +1 -1
- package/es2015/jodit.fat.min.js +3 -3
- package/es2015/jodit.js +2 -2
- package/es2015/jodit.min.js +2 -2
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2015/plugins/autocomplete/autocomplete.js +1 -1
- package/es2015/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2015/plugins/backup/backup.css +1 -1
- package/es2015/plugins/backup/backup.js +1 -1
- package/es2015/plugins/backup/backup.min.js +1 -1
- package/es2015/plugins/button-generator/button-generator.css +1 -1
- package/es2015/plugins/button-generator/button-generator.js +1 -1
- package/es2015/plugins/button-generator/button-generator.min.js +1 -1
- package/es2015/plugins/change-case/change-case.js +1 -1
- package/es2015/plugins/change-case/change-case.min.js +1 -1
- package/es2015/plugins/color-picker/color-picker.css +1 -1
- package/es2015/plugins/color-picker/color-picker.js +1 -1
- package/es2015/plugins/color-picker/color-picker.min.js +1 -1
- package/es2015/plugins/emoji/emoji.css +1 -1
- package/es2015/plugins/emoji/emoji.js +1 -1
- package/es2015/plugins/emoji/emoji.min.js +1 -1
- package/es2015/plugins/export-docs/export-docs.js +1 -1
- package/es2015/plugins/export-docs/export-docs.min.js +1 -1
- package/es2015/plugins/finder/finder.css +1 -1
- package/es2015/plugins/finder/finder.js +1 -1
- package/es2015/plugins/finder/finder.min.js +1 -1
- package/es2015/plugins/google-maps/google-maps.css +1 -1
- package/es2015/plugins/google-maps/google-maps.js +1 -1
- package/es2015/plugins/google-maps/google-maps.min.js +1 -1
- package/es2015/plugins/google-search/google-search.js +1 -1
- package/es2015/plugins/google-search/google-search.min.js +1 -1
- package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2015/plugins/keyboard/keyboard.css +1 -1
- package/es2015/plugins/keyboard/keyboard.js +1 -1
- package/es2015/plugins/keyboard/keyboard.min.js +1 -1
- package/es2015/plugins/mobile-view/mobile-view.js +1 -1
- package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2015/plugins/page-break/page-break.js +1 -1
- package/es2015/plugins/page-break/page-break.min.js +1 -1
- package/es2015/plugins/paste-code/paste-code.css +1 -1
- package/es2015/plugins/paste-code/paste-code.js +1 -1
- package/es2015/plugins/paste-code/paste-code.min.js +1 -1
- package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2015/plugins/show-blocks/show-blocks.js +1 -1
- package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2015/plugins/style/style.css +1 -1
- package/es2015/plugins/style/style.js +1 -1
- package/es2015/plugins/style/style.min.js +1 -1
- package/es2015/plugins/templates/templates.css +1 -1
- package/es2015/plugins/templates/templates.js +1 -1
- package/es2015/plugins/templates/templates.min.js +1 -1
- package/es2015/plugins/todo-list/todo-list.css +1 -1
- package/es2015/plugins/todo-list/todo-list.js +1 -1
- package/es2015/plugins/todo-list/todo-list.min.js +1 -1
- package/es2015/plugins/translate/translate.css +1 -1
- package/es2015/plugins/translate/translate.js +96 -21
- package/es2015/plugins/translate/translate.min.js +2 -2
- package/es2015/plugins/tune-block/tune-block.css +1 -1
- package/es2015/plugins/tune-block/tune-block.js +1 -1
- package/es2015/plugins/tune-block/tune-block.min.js +1 -1
- package/es2018/jodit.fat.min.js +5 -5
- package/es2018/jodit.min.js +2 -2
- package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2018/plugins/backup/backup.min.js +1 -1
- package/es2018/plugins/button-generator/button-generator.min.js +1 -1
- package/es2018/plugins/change-case/change-case.min.js +1 -1
- package/es2018/plugins/color-picker/color-picker.min.js +1 -1
- package/es2018/plugins/emoji/emoji.min.js +1 -1
- package/es2018/plugins/export-docs/export-docs.min.js +1 -1
- package/es2018/plugins/finder/finder.min.js +1 -1
- package/es2018/plugins/google-maps/google-maps.min.js +1 -1
- package/es2018/plugins/google-search/google-search.min.js +1 -1
- package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2018/plugins/keyboard/keyboard.min.js +1 -1
- package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2018/plugins/page-break/page-break.min.js +1 -1
- package/es2018/plugins/paste-code/paste-code.min.js +1 -1
- package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2018/plugins/style/style.min.js +1 -1
- package/es2018/plugins/templates/templates.min.js +1 -1
- package/es2018/plugins/todo-list/todo-list.min.js +1 -1
- package/es2018/plugins/translate/translate.min.js +2 -2
- package/es2018/plugins/tune-block/tune-block.min.js +1 -1
- package/es2021/jodit.css +1 -1
- package/es2021/jodit.fat.min.js +5 -5
- package/es2021/jodit.js +2 -2
- package/es2021/jodit.min.js +2 -2
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2021/plugins/autocomplete/autocomplete.js +1 -1
- package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2021/plugins/backup/backup.css +1 -1
- package/es2021/plugins/backup/backup.js +1 -1
- package/es2021/plugins/backup/backup.min.js +1 -1
- package/es2021/plugins/button-generator/button-generator.css +1 -1
- package/es2021/plugins/button-generator/button-generator.js +1 -1
- package/es2021/plugins/button-generator/button-generator.min.js +1 -1
- package/es2021/plugins/change-case/change-case.js +1 -1
- package/es2021/plugins/change-case/change-case.min.js +1 -1
- package/es2021/plugins/color-picker/color-picker.css +1 -1
- package/es2021/plugins/color-picker/color-picker.js +1 -1
- package/es2021/plugins/color-picker/color-picker.min.js +1 -1
- package/es2021/plugins/emoji/emoji.css +1 -1
- package/es2021/plugins/emoji/emoji.js +1 -1
- package/es2021/plugins/emoji/emoji.min.js +1 -1
- package/es2021/plugins/export-docs/export-docs.js +1 -1
- package/es2021/plugins/export-docs/export-docs.min.js +1 -1
- package/es2021/plugins/finder/finder.css +1 -1
- package/es2021/plugins/finder/finder.js +1 -1
- package/es2021/plugins/finder/finder.min.js +1 -1
- package/es2021/plugins/google-maps/google-maps.css +1 -1
- package/es2021/plugins/google-maps/google-maps.js +1 -1
- package/es2021/plugins/google-maps/google-maps.min.js +1 -1
- package/es2021/plugins/google-search/google-search.js +1 -1
- package/es2021/plugins/google-search/google-search.min.js +1 -1
- package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2021/plugins/keyboard/keyboard.css +1 -1
- package/es2021/plugins/keyboard/keyboard.js +1 -1
- package/es2021/plugins/keyboard/keyboard.min.js +1 -1
- package/es2021/plugins/mobile-view/mobile-view.js +1 -1
- package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2021/plugins/page-break/page-break.js +1 -1
- package/es2021/plugins/page-break/page-break.min.js +1 -1
- package/es2021/plugins/paste-code/paste-code.css +1 -1
- package/es2021/plugins/paste-code/paste-code.js +1 -1
- package/es2021/plugins/paste-code/paste-code.min.js +1 -1
- package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2021/plugins/show-blocks/show-blocks.js +1 -1
- package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2021/plugins/style/style.css +1 -1
- package/es2021/plugins/style/style.js +1 -1
- package/es2021/plugins/style/style.min.js +1 -1
- package/es2021/plugins/templates/templates.css +1 -1
- package/es2021/plugins/templates/templates.js +1 -1
- package/es2021/plugins/templates/templates.min.js +1 -1
- package/es2021/plugins/todo-list/todo-list.css +1 -1
- package/es2021/plugins/todo-list/todo-list.js +1 -1
- package/es2021/plugins/todo-list/todo-list.min.js +1 -1
- package/es2021/plugins/translate/translate.css +1 -1
- package/es2021/plugins/translate/translate.js +96 -21
- package/es2021/plugins/translate/translate.min.js +4 -4
- package/es2021/plugins/tune-block/tune-block.css +1 -1
- package/es2021/plugins/tune-block/tune-block.js +1 -1
- package/es2021/plugins/tune-block/tune-block.min.js +1 -1
- package/es2021.en/jodit.css +1 -1
- package/es2021.en/jodit.fat.min.js +3 -3
- package/es2021.en/jodit.js +2 -2
- package/es2021.en/jodit.min.js +2 -2
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
- package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es2021.en/plugins/backup/backup.css +1 -1
- package/es2021.en/plugins/backup/backup.js +1 -1
- package/es2021.en/plugins/backup/backup.min.js +1 -1
- package/es2021.en/plugins/button-generator/button-generator.css +1 -1
- package/es2021.en/plugins/button-generator/button-generator.js +1 -1
- package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
- package/es2021.en/plugins/change-case/change-case.js +1 -1
- package/es2021.en/plugins/change-case/change-case.min.js +1 -1
- package/es2021.en/plugins/color-picker/color-picker.css +1 -1
- package/es2021.en/plugins/color-picker/color-picker.js +1 -1
- package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
- package/es2021.en/plugins/emoji/emoji.css +1 -1
- package/es2021.en/plugins/emoji/emoji.js +1 -1
- package/es2021.en/plugins/emoji/emoji.min.js +1 -1
- package/es2021.en/plugins/export-docs/export-docs.js +1 -1
- package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
- package/es2021.en/plugins/finder/finder.css +1 -1
- package/es2021.en/plugins/finder/finder.js +1 -1
- package/es2021.en/plugins/finder/finder.min.js +1 -1
- package/es2021.en/plugins/google-maps/google-maps.css +1 -1
- package/es2021.en/plugins/google-maps/google-maps.js +1 -1
- package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
- package/es2021.en/plugins/google-search/google-search.js +1 -1
- package/es2021.en/plugins/google-search/google-search.min.js +1 -1
- package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es2021.en/plugins/keyboard/keyboard.css +1 -1
- package/es2021.en/plugins/keyboard/keyboard.js +1 -1
- package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
- package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
- package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es2021.en/plugins/page-break/page-break.js +1 -1
- package/es2021.en/plugins/page-break/page-break.min.js +1 -1
- package/es2021.en/plugins/paste-code/paste-code.css +1 -1
- package/es2021.en/plugins/paste-code/paste-code.js +1 -1
- package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
- package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
- package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es2021.en/plugins/style/style.css +1 -1
- package/es2021.en/plugins/style/style.js +1 -1
- package/es2021.en/plugins/style/style.min.js +1 -1
- package/es2021.en/plugins/templates/templates.css +1 -1
- package/es2021.en/plugins/templates/templates.js +1 -1
- package/es2021.en/plugins/templates/templates.min.js +1 -1
- package/es2021.en/plugins/todo-list/todo-list.css +1 -1
- package/es2021.en/plugins/todo-list/todo-list.js +1 -1
- package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
- package/es2021.en/plugins/translate/translate.css +1 -1
- package/es2021.en/plugins/translate/translate.js +96 -21
- package/es2021.en/plugins/translate/translate.min.js +4 -4
- package/es2021.en/plugins/tune-block/tune-block.css +1 -1
- package/es2021.en/plugins/tune-block/tune-block.js +1 -1
- package/es2021.en/plugins/tune-block/tune-block.min.js +1 -1
- package/es5/jodit.css +2 -2
- package/es5/jodit.fat.min.js +2 -2
- package/es5/jodit.js +2 -2
- package/es5/jodit.min.css +2 -2
- package/es5/jodit.min.js +2 -2
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
- package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
- package/es5/plugins/autocomplete/autocomplete.js +1 -1
- package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
- package/es5/plugins/backup/backup.css +1 -1
- package/es5/plugins/backup/backup.js +1 -1
- package/es5/plugins/backup/backup.min.js +1 -1
- package/es5/plugins/button-generator/button-generator.css +1 -1
- package/es5/plugins/button-generator/button-generator.js +1 -1
- package/es5/plugins/button-generator/button-generator.min.js +1 -1
- package/es5/plugins/change-case/change-case.js +1 -1
- package/es5/plugins/change-case/change-case.min.js +1 -1
- package/es5/plugins/color-picker/color-picker.css +1 -1
- package/es5/plugins/color-picker/color-picker.js +1 -1
- package/es5/plugins/color-picker/color-picker.min.js +1 -1
- package/es5/plugins/emoji/emoji.css +1 -1
- package/es5/plugins/emoji/emoji.js +1 -1
- package/es5/plugins/emoji/emoji.min.js +1 -1
- package/es5/plugins/export-docs/export-docs.js +1 -1
- package/es5/plugins/export-docs/export-docs.min.js +1 -1
- package/es5/plugins/finder/finder.css +1 -1
- package/es5/plugins/finder/finder.js +1 -1
- package/es5/plugins/finder/finder.min.js +1 -1
- package/es5/plugins/google-maps/google-maps.css +1 -1
- package/es5/plugins/google-maps/google-maps.js +1 -1
- package/es5/plugins/google-maps/google-maps.min.js +1 -1
- package/es5/plugins/google-search/google-search.js +1 -1
- package/es5/plugins/google-search/google-search.min.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
- package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
- package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
- package/es5/plugins/keyboard/keyboard.css +1 -1
- package/es5/plugins/keyboard/keyboard.js +1 -1
- package/es5/plugins/keyboard/keyboard.min.js +1 -1
- package/es5/plugins/mobile-view/mobile-view.js +1 -1
- package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
- package/es5/plugins/page-break/page-break.js +1 -1
- package/es5/plugins/page-break/page-break.min.js +1 -1
- package/es5/plugins/paste-code/paste-code.css +1 -1
- package/es5/plugins/paste-code/paste-code.js +1 -1
- package/es5/plugins/paste-code/paste-code.min.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
- package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.js +1 -1
- package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
- package/es5/plugins/style/style.css +1 -1
- package/es5/plugins/style/style.js +1 -1
- package/es5/plugins/style/style.min.js +1 -1
- package/es5/plugins/templates/templates.css +1 -1
- package/es5/plugins/templates/templates.js +1 -1
- package/es5/plugins/templates/templates.min.js +1 -1
- package/es5/plugins/todo-list/todo-list.css +1 -1
- package/es5/plugins/todo-list/todo-list.js +1 -1
- package/es5/plugins/todo-list/todo-list.min.js +1 -1
- package/es5/plugins/translate/translate.css +1 -1
- package/es5/plugins/translate/translate.js +118 -21
- package/es5/plugins/translate/translate.min.js +2 -2
- package/es5/plugins/tune-block/tune-block.css +1 -1
- package/es5/plugins/tune-block/tune-block.js +1 -1
- package/es5/plugins/tune-block/tune-block.min.js +1 -1
- package/es5/polyfills.fat.min.js +1 -1
- package/es5/polyfills.js +1 -1
- package/es5/polyfills.min.js +1 -1
- package/esm/config.d.ts +3 -1
- package/esm/plugins/translate/config.d.ts +3 -2
- package/esm/plugins/translate/config.js +1 -1
- package/esm/plugins/translate/interface.d.ts +8 -0
- package/esm/plugins/translate/providers/cloud/cloud.d.ts +14 -0
- package/esm/plugins/translate/providers/cloud/cloud.js +1 -0
- package/esm/plugins/translate/providers/google/google.js +1 -1
- package/esm/plugins/translate/providers/languages.d.ts +1 -0
- package/esm/plugins/translate/providers/languages.js +1 -1
- package/esm/plugins/translate/translate.js +1 -1
- package/package.json +1 -1
- package/types/config.d.ts +3 -1
- package/types/plugins/translate/config.d.ts +3 -2
- package/types/plugins/translate/interface.d.ts +8 -0
- package/types/plugins/translate/providers/cloud/cloud.d.ts +14 -0
- package/types/plugins/translate/providers/languages.d.ts +1 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit-pro - PRO Version of Jodit Editor
|
|
3
3
|
* Author: Chupurnov Valerii <chupurnov@gmail.com>
|
|
4
|
-
* Version: v4.11.
|
|
4
|
+
* Version: v4.11.26
|
|
5
5
|
* Url: https://xdsoft.net/jodit/pro/
|
|
6
6
|
* License(s): SEE LICENSE IN LICENSE.md
|
|
7
7
|
*/
|
|
@@ -66,6 +66,10 @@ jodit_esm_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.translate = {
|
|
|
66
66
|
url: 'https://translation.googleapis.com/language/translate/v2',
|
|
67
67
|
key: ''
|
|
68
68
|
},
|
|
69
|
+
cloudProviderOptions: {
|
|
70
|
+
url: 'https://cloud.xdsoft.net',
|
|
71
|
+
key: ''
|
|
72
|
+
},
|
|
69
73
|
defaultSourceLang: '',
|
|
70
74
|
defaultTargetLang: 'de'
|
|
71
75
|
};
|
|
@@ -91,6 +95,72 @@ jodit_esm_config__WEBPACK_IMPORTED_MODULE_2__.Config.prototype.controls.translat
|
|
|
91
95
|
jodit_esm_core_ui_icon__WEBPACK_IMPORTED_MODULE_3__.Icon.set('translate', (_assets_translate_svg__WEBPACK_IMPORTED_MODULE_1___default())).set('translate-swap', (_assets_swap_svg__WEBPACK_IMPORTED_MODULE_0___default()));
|
|
92
96
|
|
|
93
97
|
|
|
98
|
+
/***/ }),
|
|
99
|
+
|
|
100
|
+
/***/ 50090:
|
|
101
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
102
|
+
|
|
103
|
+
"use strict";
|
|
104
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
105
|
+
/* harmony export */ CloudTranslateProvider: function() { return /* binding */ CloudTranslateProvider; }
|
|
106
|
+
/* harmony export */ });
|
|
107
|
+
/* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(82749);
|
|
108
|
+
/* harmony import */ var jodit_esm_core_constants__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(82758);
|
|
109
|
+
/* harmony import */ var jodit_esm_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(38837);
|
|
110
|
+
/* harmony import */ var jodit_pro_plugins_translate_providers_languages__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(80942);
|
|
111
|
+
/*!
|
|
112
|
+
* Jodit Editor PRO (https://xdsoft.net/jodit/)
|
|
113
|
+
* See LICENSE.md in the project root for license information.
|
|
114
|
+
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
115
|
+
*/
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
class CloudTranslateProvider {
|
|
120
|
+
__fetch(endpoint, data = {}) {
|
|
121
|
+
const opt = this.jodit.o.translate.cloudProviderOptions;
|
|
122
|
+
(0,jodit_esm_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_2__.assert)(opt, 'Set cloudProviderOptions');
|
|
123
|
+
return this.jodit.fetch(opt.url + endpoint + '?key=' + opt.key, {
|
|
124
|
+
method: 'POST',
|
|
125
|
+
data: data,
|
|
126
|
+
contentType: 'application/json; charset=utf-8',
|
|
127
|
+
withCredentials: false
|
|
128
|
+
}).then((resp)=>resp.json()).catch((resp)=>{
|
|
129
|
+
try {
|
|
130
|
+
this.jodit.message.error(resp.json().message);
|
|
131
|
+
} catch (e) {
|
|
132
|
+
if (!jodit_esm_core_constants__WEBPACK_IMPORTED_MODULE_1__.IS_PROD) {
|
|
133
|
+
console.error(e);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
translate(text, source, target) {
|
|
139
|
+
const body = {
|
|
140
|
+
text,
|
|
141
|
+
targetLanguageCode: target
|
|
142
|
+
};
|
|
143
|
+
if (source) {
|
|
144
|
+
body.sourceLanguageCode = source;
|
|
145
|
+
}
|
|
146
|
+
return this.__fetch('/v1/translate', body).then((resp)=>{
|
|
147
|
+
return {
|
|
148
|
+
text: resp.text
|
|
149
|
+
};
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
supportedLanguages() {
|
|
153
|
+
return Promise.resolve({
|
|
154
|
+
langs: jodit_pro_plugins_translate_providers_languages__WEBPACK_IMPORTED_MODULE_3__.languages
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
constructor(jodit){
|
|
158
|
+
(0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_0__._)(this, "jodit", void 0);
|
|
159
|
+
this.jodit = jodit;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
|
|
94
164
|
/***/ }),
|
|
95
165
|
|
|
96
166
|
/***/ 27834:
|
|
@@ -138,12 +208,15 @@ class GoogleTranslateProvider {
|
|
|
138
208
|
});
|
|
139
209
|
}
|
|
140
210
|
translate(q, source, target) {
|
|
141
|
-
|
|
211
|
+
const data = {
|
|
142
212
|
q,
|
|
143
|
-
source,
|
|
144
213
|
target,
|
|
145
214
|
format: 'html'
|
|
146
|
-
}
|
|
215
|
+
};
|
|
216
|
+
if (source) {
|
|
217
|
+
data.source = source;
|
|
218
|
+
}
|
|
219
|
+
return this.__fetch('translate', data).then((resp)=>{
|
|
147
220
|
return {
|
|
148
221
|
text: resp.data.translations[0].translatedText
|
|
149
222
|
};
|
|
@@ -175,6 +248,7 @@ class GoogleTranslateProvider {
|
|
|
175
248
|
* See LICENSE.md in the project root for license information.
|
|
176
249
|
* Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
|
|
177
250
|
*/ const languages = {
|
|
251
|
+
'Detect language': 'auto',
|
|
178
252
|
Afrikaans: 'af',
|
|
179
253
|
Albanian: 'sq',
|
|
180
254
|
Amharic: 'am',
|
|
@@ -446,14 +520,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
446
520
|
/* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(82749);
|
|
447
521
|
/* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(31635);
|
|
448
522
|
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(20104);
|
|
449
|
-
/* harmony import */ var
|
|
450
|
-
/* harmony import */ var
|
|
451
|
-
/* harmony import */ var
|
|
452
|
-
/* harmony import */ var
|
|
453
|
-
/* harmony import */ var
|
|
454
|
-
/* harmony import */ var
|
|
455
|
-
/* harmony import */ var
|
|
456
|
-
/* harmony import */ var
|
|
523
|
+
/* harmony import */ var _providers_cloud_cloud__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(50090);
|
|
524
|
+
/* harmony import */ var _providers_google_google__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(27834);
|
|
525
|
+
/* harmony import */ var _ui_settings_settings__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(33124);
|
|
526
|
+
/* harmony import */ var _replace_text_fragments__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(73534);
|
|
527
|
+
/* harmony import */ var jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(65478);
|
|
528
|
+
/* harmony import */ var jodit_esm_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(23282);
|
|
529
|
+
/* harmony import */ var jodit_esm_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(70799);
|
|
530
|
+
/* harmony import */ var jodit_esm_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(38837);
|
|
457
531
|
/* harmony import */ var jodit_esm_core_plugin__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(50911);
|
|
458
532
|
/* harmony import */ var jodit_esm_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(10830);
|
|
459
533
|
/* harmony import */ var jodit_pro_jodit_pro__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(2692);
|
|
@@ -479,19 +553,20 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
479
553
|
class Translate extends jodit_esm_core_plugin__WEBPACK_IMPORTED_MODULE_12__.Plugin {
|
|
480
554
|
__getProvider() {
|
|
481
555
|
const { provider } = this.jodit.options.translate;
|
|
482
|
-
if ((0,
|
|
556
|
+
if ((0,jodit_esm_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_10__.isString)(provider)) {
|
|
483
557
|
switch(provider){
|
|
484
558
|
case 'google':
|
|
485
|
-
return new
|
|
559
|
+
return new _providers_google_google__WEBPACK_IMPORTED_MODULE_5__.GoogleTranslateProvider(this.j);
|
|
560
|
+
case 'cloud':
|
|
561
|
+
return new _providers_cloud_cloud__WEBPACK_IMPORTED_MODULE_4__.CloudTranslateProvider(this.j);
|
|
486
562
|
default:
|
|
487
563
|
throw new Error('Unknown provider');
|
|
488
564
|
}
|
|
489
565
|
}
|
|
490
|
-
(0,
|
|
566
|
+
(0,jodit_esm_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_11__.assert)((0,jodit_esm_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_9__.isFunction)(provider), 'Provider must be a function');
|
|
491
567
|
return provider(this.jodit);
|
|
492
568
|
}
|
|
493
569
|
afterInit(jodit) {
|
|
494
|
-
const defaultLanguage = (0,jodit_esm_core_helpers_utils_default_language__WEBPACK_IMPORTED_MODULE_11__.defaultLanguage)(jodit.o.language, jodit_pro_jodit_pro__WEBPACK_IMPORTED_MODULE_14__.JoditPro.defaultOptions.language), language = (0,jodit_esm_core_helpers_utils_default_language__WEBPACK_IMPORTED_MODULE_11__.defaultLanguage)(jodit.o.language, defaultLanguage);
|
|
495
570
|
const provider = this.__getProvider();
|
|
496
571
|
jodit.registerCommand('translateOptions', {
|
|
497
572
|
exec: ()=>(0,_swc_helpers_async_to_generator__WEBPACK_IMPORTED_MODULE_0__._)(function*() {
|
|
@@ -501,7 +576,7 @@ class Translate extends jodit_esm_core_plugin__WEBPACK_IMPORTED_MODULE_12__.Plug
|
|
|
501
576
|
const langsList = yield provider.supportedLanguages();
|
|
502
577
|
const sourceLangs = 'source' in langsList ? langsList.source.langs : langsList.langs;
|
|
503
578
|
const targetLangs = 'target' in langsList ? langsList.target.langs : langsList.langs;
|
|
504
|
-
const settings = new
|
|
579
|
+
const settings = new _ui_settings_settings__WEBPACK_IMPORTED_MODULE_6__.UITranslateSettings(dlg, this.state, {
|
|
505
580
|
sourceList: sourceLangs,
|
|
506
581
|
targetList: targetLangs,
|
|
507
582
|
onChange (state) {
|
|
@@ -522,18 +597,18 @@ class Translate extends jodit_esm_core_plugin__WEBPACK_IMPORTED_MODULE_12__.Plug
|
|
|
522
597
|
hotkeys: jodit.o.translate.hotkeys.translateOptions
|
|
523
598
|
}).registerCommand('translate', {
|
|
524
599
|
exec: ()=>{
|
|
525
|
-
const selection = (0,
|
|
600
|
+
const selection = (0,_replace_text_fragments__WEBPACK_IMPORTED_MODULE_7__.getSelectionFragments)(jodit).filter((fragment)=>fragment.text.trim().length > 0);
|
|
526
601
|
if (!selection.length) {
|
|
527
602
|
jodit.message.error('Select text for translate');
|
|
528
603
|
return;
|
|
529
604
|
}
|
|
530
|
-
const source = !this.state.sourceLang || this.state.sourceLang === 'auto' ?
|
|
605
|
+
const source = !this.state.sourceLang || this.state.sourceLang === 'auto' ? '' : this.state.sourceLang;
|
|
531
606
|
const target = this.state.targetLang;
|
|
532
607
|
return Promise.all(selection.map((fragment)=>{
|
|
533
608
|
provider.translate(fragment.text, source, target).then((response)=>{
|
|
534
609
|
fragment.replace(response.text);
|
|
535
610
|
}).catch((error)=>{
|
|
536
|
-
jodit.message.error((0,
|
|
611
|
+
jodit.message.error((0,jodit_esm_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_10__.isString)(error) ? error : error.message);
|
|
537
612
|
});
|
|
538
613
|
})).then(()=>{
|
|
539
614
|
jodit.synchronizeValues();
|
|
@@ -559,7 +634,7 @@ class Translate extends jodit_esm_core_plugin__WEBPACK_IMPORTED_MODULE_12__.Plug
|
|
|
559
634
|
'license'
|
|
560
635
|
]);
|
|
561
636
|
(0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_2__.__decorate)([
|
|
562
|
-
|
|
637
|
+
jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_8__.persistent
|
|
563
638
|
], Translate.prototype, "state", void 0);
|
|
564
639
|
jodit_pro_jodit_pro__WEBPACK_IMPORTED_MODULE_14__.JoditPro.plugins.add('translate', Translate);
|
|
565
640
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* jodit-pro - PRO Version of Jodit Editor
|
|
3
3
|
* Author: Chupurnov Valerii <chupurnov@gmail.com>
|
|
4
|
-
* Version: v4.11.
|
|
4
|
+
* Version: v4.11.26
|
|
5
5
|
* Url: https://xdsoft.net/jodit/pro/
|
|
6
6
|
* License(s): SEE LICENSE IN LICENSE.md
|
|
7
7
|
*/
|
|
8
|
-
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var a=e();for(var n in a)("object"==typeof exports?exports:t)[n]=a[n]}}(self,function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[954],{74922:function(t){t.exports='<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"> <path d="M13.98 22L6 30l7.98 8v-6H28v-4H13.98v-6zM42 18l-7.98-8v6H20v4h14.02v6L42 18z"/> <path d="M0 0h48v48H0z" fill="none"/> </svg>'},34575:function(t){t.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> <path d="M4.545 6.714 4.11 8H3l1.862-5h1.284L8 8H6.833l-.435-1.286H4.545zm1.634-.736L5.5 3.956h-.049l-.679 2.022H6.18z"/> <path d="M0 2a2 2 0 0 1 2-2h7a2 2 0 0 1 2 2v3h3a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-3H2a2 2 0 0 1-2-2V2zm2-1a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H2zm7.138 9.995c.193.301.402.583.63.846-.748.575-1.673 1.001-2.768 1.292.178.217.451.635.555.867 1.125-.359 2.08-.844 2.886-1.494.777.665 1.739 1.165 2.93 1.472.133-.254.414-.673.629-.89-1.125-.253-2.057-.694-2.82-1.284.681-.747 1.222-1.651 1.621-2.757H14V8h-3v1.047h.765c-.318.844-.74 1.546-1.272 2.13a6.066 6.066 0 0 1-.415-.492 1.988 1.988 0 0 1-.94.31z"/> </svg>'},20104:function(t,e,a){"use strict";var n=a(74922),s=a.n(n),i=a(34575),r=a.n(i),o=a(6441),l=a(12153);o.Config.prototype.translate={hotkeys:{translateSelection:["ctrl+shift+o","cmd+shift+o"],translateOptions:["ctrl+shift+p","cmd+shift+p"]},provider:"google",googleProviderOptions:{url:"https://translation.googleapis.com/language/translate/v2",key:""},defaultSourceLang:"",defaultTargetLang:"de"},o.Config.prototype.controls.translate={translate:{tooltip:"Translate selected text",icon:"translate",command:"translate",exec(t){t.execCommand("translate")},list:["Options"],childExec(t,e,{control:a}){t.execCommand("translate"+a.name)},mods:{stroke:!1}}},l.Icon.set("translate",r()).set("translate-swap",s())},27834:function(t,e,a){"use strict";a.d(e,{GoogleTranslateProvider:function(){return c}});var n=a(82749),s=a(56075),i=a(11886),r=a(82758),o=a(38837),l=a(80942);class c{__fetch(t,e={}){let a=this.jodit.o.translate.googleProviderOptions;return(0,o.assert)(a,"Set googleProviderOptions"),this.jodit.fetch(a.url+"?key="+a.key,{method:"POST",data:(0,i._)((0,s._)({},e),{ui:this.jodit.o.language}),contentType:"application/json; charset=utf-8",withCredentials:!1}).then(t=>t.json()).catch(t=>{try{this.jodit.message.error(t.json().message)}catch(t){r.IS_PROD}})}translate(t,e,a){
|
|
8
|
+
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var a=e();for(var n in a)("object"==typeof exports?exports:t)[n]=a[n]}}(self,function(){return(self.webpackChunkjodit_pro=self.webpackChunkjodit_pro||[]).push([[954],{74922:function(t){t.exports='<svg viewBox="0 0 48 48" xmlns="http://www.w3.org/2000/svg"> <path d="M13.98 22L6 30l7.98 8v-6H28v-4H13.98v-6zM42 18l-7.98-8v6H20v4h14.02v6L42 18z"/> <path d="M0 0h48v48H0z" fill="none"/> </svg>'},34575:function(t){t.exports='<svg viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"> <path d="M4.545 6.714 4.11 8H3l1.862-5h1.284L8 8H6.833l-.435-1.286H4.545zm1.634-.736L5.5 3.956h-.049l-.679 2.022H6.18z"/> <path d="M0 2a2 2 0 0 1 2-2h7a2 2 0 0 1 2 2v3h3a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-3H2a2 2 0 0 1-2-2V2zm2-1a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H2zm7.138 9.995c.193.301.402.583.63.846-.748.575-1.673 1.001-2.768 1.292.178.217.451.635.555.867 1.125-.359 2.08-.844 2.886-1.494.777.665 1.739 1.165 2.93 1.472.133-.254.414-.673.629-.89-1.125-.253-2.057-.694-2.82-1.284.681-.747 1.222-1.651 1.621-2.757H14V8h-3v1.047h.765c-.318.844-.74 1.546-1.272 2.13a6.066 6.066 0 0 1-.415-.492 1.988 1.988 0 0 1-.94.31z"/> </svg>'},20104:function(t,e,a){"use strict";var n=a(74922),s=a.n(n),i=a(34575),r=a.n(i),o=a(6441),l=a(12153);o.Config.prototype.translate={hotkeys:{translateSelection:["ctrl+shift+o","cmd+shift+o"],translateOptions:["ctrl+shift+p","cmd+shift+p"]},provider:"google",googleProviderOptions:{url:"https://translation.googleapis.com/language/translate/v2",key:""},cloudProviderOptions:{url:"https://cloud.xdsoft.net",key:""},defaultSourceLang:"",defaultTargetLang:"de"},o.Config.prototype.controls.translate={translate:{tooltip:"Translate selected text",icon:"translate",command:"translate",exec(t){t.execCommand("translate")},list:["Options"],childExec(t,e,{control:a}){t.execCommand("translate"+a.name)},mods:{stroke:!1}}},l.Icon.set("translate",r()).set("translate-swap",s())},50090:function(t,e,a){"use strict";a.d(e,{CloudTranslateProvider:function(){return o}});var n=a(82749),s=a(82758),i=a(38837),r=a(80942);class o{__fetch(t,e={}){let a=this.jodit.o.translate.cloudProviderOptions;return(0,i.assert)(a,"Set cloudProviderOptions"),this.jodit.fetch(a.url+t+"?key="+a.key,{method:"POST",data:e,contentType:"application/json; charset=utf-8",withCredentials:!1}).then(t=>t.json()).catch(t=>{try{this.jodit.message.error(t.json().message)}catch(t){s.IS_PROD}})}translate(t,e,a){let n={text:t,targetLanguageCode:a};return e&&(n.sourceLanguageCode=e),this.__fetch("/v1/translate",n).then(t=>({text:t.text}))}supportedLanguages(){return Promise.resolve({langs:r.languages})}constructor(t){(0,n._)(this,"jodit",void 0),this.jodit=t}}},27834:function(t,e,a){"use strict";a.d(e,{GoogleTranslateProvider:function(){return c}});var n=a(82749),s=a(56075),i=a(11886),r=a(82758),o=a(38837),l=a(80942);class c{__fetch(t,e={}){let a=this.jodit.o.translate.googleProviderOptions;return(0,o.assert)(a,"Set googleProviderOptions"),this.jodit.fetch(a.url+"?key="+a.key,{method:"POST",data:(0,i._)((0,s._)({},e),{ui:this.jodit.o.language}),contentType:"application/json; charset=utf-8",withCredentials:!1}).then(t=>t.json()).catch(t=>{try{this.jodit.message.error(t.json().message)}catch(t){r.IS_PROD}})}translate(t,e,a){let n={q:t,target:a,format:"html"};return e&&(n.source=e),this.__fetch("translate",n).then(t=>({text:t.data.translations[0].translatedText}))}supportedLanguages(){return Promise.resolve({langs:l.languages})}constructor(t){(0,n._)(this,"jodit",void 0),this.jodit=t}}},80942:function(t,e,a){"use strict";a.d(e,{languages:function(){return n}});let n={"Detect language":"auto",Afrikaans:"af",Albanian:"sq",Amharic:"am",Arabic:"ar",Armenian:"hy","Assamese*":"as","Aymara*":"ay",Azerbaijani:"az","Bambara*":"bm",Basque:"eu",Belarusian:"be",Bengali:"bn","Bhojpuri*":"bho",Bosnian:"bs",Bulgarian:"bg",Catalan:"ca",Cebuano:"ceb","Chinese (Simplified)":"zh-CN","Chinese (Traditional)":"zh-TW",Corsican:"co",Croatian:"hr",Czech:"cs",Danish:"da","Dhivehi*":"dv","Dogri*":"doi",Dutch:"nl",English:"en",Esperanto:"eo",Estonian:"et","Ewe*":"ee","Filipino (Tagalog)":"fil",Finnish:"fi",French:"fr",Frisian:"fy",Galician:"gl",Georgian:"ka",German:"de",Greek:"el","Guarani*":"gn",Gujarati:"gu","Haitian Creole":"ht",Hausa:"ha",Hawaiian:"haw",Hebrew:"he",Hindi:"hi",Hmong:"hmn",Hungarian:"hu",Icelandic:"is",Igbo:"ig","Ilocano*":"ilo",Indonesian:"id",Irish:"ga",Italian:"it",Japanese:"ja",Kannada:"kn",Kazakh:"kk",Khmer:"km",Kinyarwanda:"rw","Konkani*":"gom",Korean:"ko","Krio*":"kri",Kurdish:"ku","Kurdish (Sorani)*":"ckb",Kyrgyz:"ky",Lao:"lo",Latin:"la",Latvian:"lv","Lingala*":"ln",Lithuanian:"lt","Luganda*":"lg",Luxembourgish:"lb",Macedonian:"mk","Maithili*":"mai",Malagasy:"mg",Malay:"ms",Malayalam:"ml",Maltese:"mt",Maori:"mi",Marathi:"mr","Meiteilon (Manipuri)*":"mni-Mtei",Mizo:"lus",Mongolian:"mn","Myanmar (Burmese)":"my",Nepali:"ne",Norwegian:"no","Nyanja (Chichewa)":"ny","Odia (Oriya)":"or","Oromo*":"om",Pashto:"ps",Persian:"fa",Polish:"pl",Portuguese:"pt",Punjabi:"pa","Quechua*":"qu",Romanian:"ro",Russian:"ru",Samoan:"sm","Sanskrit*":"sa","Scots Gaelic":"gd","Sepedi*":"nso",Serbian:"sr",Sesotho:"st",Shona:"sn",Sindhi:"sd","Sinhala (Sinhalese)":"si",Slovak:"sk",Slovenian:"sl",Somali:"so",Spanish:"es",Sundanese:"su",Swahili:"sw",Swedish:"sv","Tagalog (Filipino)":"tl",Tajik:"tg",Tamil:"ta",Tatar:"tt",Telugu:"te",Thai:"th","Tigrinya*":"ti","Tsonga*":"ts",Turkish:"tr",Turkmen:"tk","Twi (Akan)*":"ak",Ukrainian:"uk",Urdu:"ur",Uyghur:"ug",Uzbek:"uz",Vietnamese:"vi",Welsh:"cy",Xhosa:"xh",Yiddish:"yi",Yoruba:"yo",Zulu:"zu"}},73534:function(t,e,a){"use strict";a.d(e,{getSelectionFragments:function(){return s}});var n=a(2748);function s(t){let e=[],a=t.s.expandSelection().sel;if(!a||0===a.rangeCount||a.isCollapsed)return e;t.s.range.commonAncestorContainer.normalize();let s=t.s.range,{commonAncestorContainer:l,startContainer:c,endContainer:u,startOffset:h,endOffset:d}=s;if(c===u){if(n.Dom.isText(c))return[r(c,h,d)];if(d-h==1){let t=c.childNodes[h];return n.Dom.isText(t)?[r(t,0,t.nodeValue.length)]:[o(t)]}if(0===h&&c.childNodes.length===d)return[o(c)];for(let t=h;t<d;t++){let a=c.childNodes[t];n.Dom.isText(a)?e.push(r(a,0,a.nodeValue.length)):e.push(o(a))}return e}let g=new Set,p=t.ed.createTreeWalker(l,NodeFilter.SHOW_ALL,{acceptNode:t=>!s.intersectsNode(t)||n.Dom.closest(t,t=>t&&g.has(t),l)?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}),m=p.nextNode();for(;m;){if(n.Dom.isElement(m)&&i(s,m))g.add(m),e.push(o(m));else if(n.Dom.isText(m)&&i(s,m))e.push(r(m,0,m.nodeValue.length));else if(n.Dom.isText(m)){let t=0,a=m.nodeValue.length;m===c&&(t=h),m===u&&(a=d),e.push(r(m,t,a))}m=p.nextNode()}return e}let i=(t,e)=>{let a=document.createRange();try{a.selectNodeContents(e)}catch(t){a.selectNode(e)}return 0>=t.compareBoundaryPoints(Range.START_TO_START,a)&&t.compareBoundaryPoints(Range.END_TO_END,a)>=0};function r(t,e,a){return{text:t.nodeValue.slice(e,a),replace:n=>{t.nodeValue=t.nodeValue.slice(0,e)+n+t.nodeValue.slice(a)}}}function o(t){return{text:t.innerHTML,replace:e=>{t.innerHTML=e}}}},73098:function(t,e,a){"use strict";a.r(e),a.d(e,{Translate:function(){return v}});var n=a(77688),s=a(82749),i=a(31635);a(20104);var r=a(50090),o=a(27834),l=a(33124),c=a(73534),u=a(65478),h=a(23282),d=a(70799),g=a(38837),p=a(50911),m=a(10830),_=a(2692);class v extends p.Plugin{__getProvider(){let{provider:t}=this.jodit.options.translate;if((0,d.isString)(t))switch(t){case"google":return new o.GoogleTranslateProvider(this.j);case"cloud":return new r.CloudTranslateProvider(this.j);default:throw Error("Unknown provider")}return(0,g.assert)((0,h.isFunction)(t),"Provider must be a function"),t(this.jodit)}afterInit(t){let e=this.__getProvider();t.registerCommand("translateOptions",{exec:()=>(0,n._)(function*(){let a=this.state,n=t.dlg();n.setHeader("Translate options");let s=yield e.supportedLanguages(),i="source"in s?s.source.langs:s.langs,r="target"in s?s.target.langs:s.langs,o=new l.UITranslateSettings(n,this.state,{sourceList:i,targetList:r,onChange(t){a=t}});n.setContent(o),n.setFooter([(0,m.Button)(t,"cancel","Cancel").onAction(()=>n.close()),(0,m.Button)(t,"ok","Save","primary").onAction(()=>{this.state=a,n.close()})]),o.bindDestruct(n),n.setSize(500,400).open(!0)}).call(this),hotkeys:t.o.translate.hotkeys.translateOptions}).registerCommand("translate",{exec:()=>{let a=(0,c.getSelectionFragments)(t).filter(t=>t.text.trim().length>0);if(!a.length)return void t.message.error("Select text for translate");let n=this.state.sourceLang&&"auto"!==this.state.sourceLang?this.state.sourceLang:"",s=this.state.targetLang;return Promise.all(a.map(a=>{e.translate(a.text,n,s).then(t=>{a.replace(t.text)}).catch(e=>{t.message.error((0,d.isString)(e)?e:e.message)})})).then(()=>{t.synchronizeValues()})},hotkeys:t.o.translate.hotkeys.translateSelection})}beforeDestruct(t){}constructor(...t){super(...t),(0,s._)(this,"buttons",[{name:"translate.translate",group:"insert"}]),(0,s._)(this,"state",{sourceLang:this.jodit.o.translate.defaultSourceLang||"en",targetLang:this.jodit.o.translate.defaultTargetLang})}}(0,s._)(v,"requires",["license"]),(0,i.__decorate)([u.persistent],v.prototype,"state",void 0),_.JoditPro.plugins.add("translate",v)},67082:function(t,e,a){"use strict";a.d(e,{UITranslateList:function(){return d}});var n=a(82749),s=a(31635),i=a(82758),r=a(65478),o=a(2748),l=a(21537),c=a(29960),u=a(48538),h=a(80256);class d extends u.UIElement{className(){return"UITranslateList"}get items(){return this.getElms("item")}render(t){let e=[];return(Array.isArray(t.list)?t.list:Object.keys(t.list).map(e=>({title:e,code:t.list[e]}))).forEach(t=>{let a=t.code;e.push(`<a role='button' tabindex='0' class='&__item' data-lang='${a}'>
|
|
9
9
|
<span class='&__item-key'>${a}</span>
|
|
10
10
|
<span class='&__item-title'>${this.j.i18n(t.title)}</span>
|
|
11
11
|
</a>`)}),`<div class='&'>
|