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.
Files changed (314) hide show
  1. package/es2015/jodit.css +1 -1
  2. package/es2015/jodit.fat.min.js +3 -3
  3. package/es2015/jodit.js +2 -2
  4. package/es2015/jodit.min.js +2 -2
  5. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  6. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  7. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  8. package/es2015/plugins/autocomplete/autocomplete.js +1 -1
  9. package/es2015/plugins/autocomplete/autocomplete.min.js +1 -1
  10. package/es2015/plugins/backup/backup.css +1 -1
  11. package/es2015/plugins/backup/backup.js +1 -1
  12. package/es2015/plugins/backup/backup.min.js +1 -1
  13. package/es2015/plugins/button-generator/button-generator.css +1 -1
  14. package/es2015/plugins/button-generator/button-generator.js +1 -1
  15. package/es2015/plugins/button-generator/button-generator.min.js +1 -1
  16. package/es2015/plugins/change-case/change-case.js +1 -1
  17. package/es2015/plugins/change-case/change-case.min.js +1 -1
  18. package/es2015/plugins/color-picker/color-picker.css +1 -1
  19. package/es2015/plugins/color-picker/color-picker.js +1 -1
  20. package/es2015/plugins/color-picker/color-picker.min.js +1 -1
  21. package/es2015/plugins/emoji/emoji.css +1 -1
  22. package/es2015/plugins/emoji/emoji.js +1 -1
  23. package/es2015/plugins/emoji/emoji.min.js +1 -1
  24. package/es2015/plugins/export-docs/export-docs.js +1 -1
  25. package/es2015/plugins/export-docs/export-docs.min.js +1 -1
  26. package/es2015/plugins/finder/finder.css +1 -1
  27. package/es2015/plugins/finder/finder.js +1 -1
  28. package/es2015/plugins/finder/finder.min.js +1 -1
  29. package/es2015/plugins/google-maps/google-maps.css +1 -1
  30. package/es2015/plugins/google-maps/google-maps.js +1 -1
  31. package/es2015/plugins/google-maps/google-maps.min.js +1 -1
  32. package/es2015/plugins/google-search/google-search.js +1 -1
  33. package/es2015/plugins/google-search/google-search.min.js +1 -1
  34. package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
  35. package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
  36. package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
  37. package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
  38. package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
  39. package/es2015/plugins/keyboard/keyboard.css +1 -1
  40. package/es2015/plugins/keyboard/keyboard.js +1 -1
  41. package/es2015/plugins/keyboard/keyboard.min.js +1 -1
  42. package/es2015/plugins/mobile-view/mobile-view.js +1 -1
  43. package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
  44. package/es2015/plugins/page-break/page-break.js +1 -1
  45. package/es2015/plugins/page-break/page-break.min.js +1 -1
  46. package/es2015/plugins/paste-code/paste-code.css +1 -1
  47. package/es2015/plugins/paste-code/paste-code.js +1 -1
  48. package/es2015/plugins/paste-code/paste-code.min.js +1 -1
  49. package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
  50. package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
  51. package/es2015/plugins/show-blocks/show-blocks.js +1 -1
  52. package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
  53. package/es2015/plugins/style/style.css +1 -1
  54. package/es2015/plugins/style/style.js +1 -1
  55. package/es2015/plugins/style/style.min.js +1 -1
  56. package/es2015/plugins/templates/templates.css +1 -1
  57. package/es2015/plugins/templates/templates.js +1 -1
  58. package/es2015/plugins/templates/templates.min.js +1 -1
  59. package/es2015/plugins/todo-list/todo-list.css +1 -1
  60. package/es2015/plugins/todo-list/todo-list.js +1 -1
  61. package/es2015/plugins/todo-list/todo-list.min.js +1 -1
  62. package/es2015/plugins/translate/translate.css +1 -1
  63. package/es2015/plugins/translate/translate.js +96 -21
  64. package/es2015/plugins/translate/translate.min.js +2 -2
  65. package/es2015/plugins/tune-block/tune-block.css +1 -1
  66. package/es2015/plugins/tune-block/tune-block.js +1 -1
  67. package/es2015/plugins/tune-block/tune-block.min.js +1 -1
  68. package/es2018/jodit.fat.min.js +5 -5
  69. package/es2018/jodit.min.js +2 -2
  70. package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  71. package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
  72. package/es2018/plugins/backup/backup.min.js +1 -1
  73. package/es2018/plugins/button-generator/button-generator.min.js +1 -1
  74. package/es2018/plugins/change-case/change-case.min.js +1 -1
  75. package/es2018/plugins/color-picker/color-picker.min.js +1 -1
  76. package/es2018/plugins/emoji/emoji.min.js +1 -1
  77. package/es2018/plugins/export-docs/export-docs.min.js +1 -1
  78. package/es2018/plugins/finder/finder.min.js +1 -1
  79. package/es2018/plugins/google-maps/google-maps.min.js +1 -1
  80. package/es2018/plugins/google-search/google-search.min.js +1 -1
  81. package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
  82. package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
  83. package/es2018/plugins/keyboard/keyboard.min.js +1 -1
  84. package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
  85. package/es2018/plugins/page-break/page-break.min.js +1 -1
  86. package/es2018/plugins/paste-code/paste-code.min.js +1 -1
  87. package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
  88. package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
  89. package/es2018/plugins/style/style.min.js +1 -1
  90. package/es2018/plugins/templates/templates.min.js +1 -1
  91. package/es2018/plugins/todo-list/todo-list.min.js +1 -1
  92. package/es2018/plugins/translate/translate.min.js +2 -2
  93. package/es2018/plugins/tune-block/tune-block.min.js +1 -1
  94. package/es2021/jodit.css +1 -1
  95. package/es2021/jodit.fat.min.js +5 -5
  96. package/es2021/jodit.js +2 -2
  97. package/es2021/jodit.min.js +2 -2
  98. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  99. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  100. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  101. package/es2021/plugins/autocomplete/autocomplete.js +1 -1
  102. package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
  103. package/es2021/plugins/backup/backup.css +1 -1
  104. package/es2021/plugins/backup/backup.js +1 -1
  105. package/es2021/plugins/backup/backup.min.js +1 -1
  106. package/es2021/plugins/button-generator/button-generator.css +1 -1
  107. package/es2021/plugins/button-generator/button-generator.js +1 -1
  108. package/es2021/plugins/button-generator/button-generator.min.js +1 -1
  109. package/es2021/plugins/change-case/change-case.js +1 -1
  110. package/es2021/plugins/change-case/change-case.min.js +1 -1
  111. package/es2021/plugins/color-picker/color-picker.css +1 -1
  112. package/es2021/plugins/color-picker/color-picker.js +1 -1
  113. package/es2021/plugins/color-picker/color-picker.min.js +1 -1
  114. package/es2021/plugins/emoji/emoji.css +1 -1
  115. package/es2021/plugins/emoji/emoji.js +1 -1
  116. package/es2021/plugins/emoji/emoji.min.js +1 -1
  117. package/es2021/plugins/export-docs/export-docs.js +1 -1
  118. package/es2021/plugins/export-docs/export-docs.min.js +1 -1
  119. package/es2021/plugins/finder/finder.css +1 -1
  120. package/es2021/plugins/finder/finder.js +1 -1
  121. package/es2021/plugins/finder/finder.min.js +1 -1
  122. package/es2021/plugins/google-maps/google-maps.css +1 -1
  123. package/es2021/plugins/google-maps/google-maps.js +1 -1
  124. package/es2021/plugins/google-maps/google-maps.min.js +1 -1
  125. package/es2021/plugins/google-search/google-search.js +1 -1
  126. package/es2021/plugins/google-search/google-search.min.js +1 -1
  127. package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
  128. package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
  129. package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
  130. package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
  131. package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
  132. package/es2021/plugins/keyboard/keyboard.css +1 -1
  133. package/es2021/plugins/keyboard/keyboard.js +1 -1
  134. package/es2021/plugins/keyboard/keyboard.min.js +1 -1
  135. package/es2021/plugins/mobile-view/mobile-view.js +1 -1
  136. package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
  137. package/es2021/plugins/page-break/page-break.js +1 -1
  138. package/es2021/plugins/page-break/page-break.min.js +1 -1
  139. package/es2021/plugins/paste-code/paste-code.css +1 -1
  140. package/es2021/plugins/paste-code/paste-code.js +1 -1
  141. package/es2021/plugins/paste-code/paste-code.min.js +1 -1
  142. package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
  143. package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
  144. package/es2021/plugins/show-blocks/show-blocks.js +1 -1
  145. package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
  146. package/es2021/plugins/style/style.css +1 -1
  147. package/es2021/plugins/style/style.js +1 -1
  148. package/es2021/plugins/style/style.min.js +1 -1
  149. package/es2021/plugins/templates/templates.css +1 -1
  150. package/es2021/plugins/templates/templates.js +1 -1
  151. package/es2021/plugins/templates/templates.min.js +1 -1
  152. package/es2021/plugins/todo-list/todo-list.css +1 -1
  153. package/es2021/plugins/todo-list/todo-list.js +1 -1
  154. package/es2021/plugins/todo-list/todo-list.min.js +1 -1
  155. package/es2021/plugins/translate/translate.css +1 -1
  156. package/es2021/plugins/translate/translate.js +96 -21
  157. package/es2021/plugins/translate/translate.min.js +4 -4
  158. package/es2021/plugins/tune-block/tune-block.css +1 -1
  159. package/es2021/plugins/tune-block/tune-block.js +1 -1
  160. package/es2021/plugins/tune-block/tune-block.min.js +1 -1
  161. package/es2021.en/jodit.css +1 -1
  162. package/es2021.en/jodit.fat.min.js +3 -3
  163. package/es2021.en/jodit.js +2 -2
  164. package/es2021.en/jodit.min.js +2 -2
  165. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  166. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  167. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  168. package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
  169. package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
  170. package/es2021.en/plugins/backup/backup.css +1 -1
  171. package/es2021.en/plugins/backup/backup.js +1 -1
  172. package/es2021.en/plugins/backup/backup.min.js +1 -1
  173. package/es2021.en/plugins/button-generator/button-generator.css +1 -1
  174. package/es2021.en/plugins/button-generator/button-generator.js +1 -1
  175. package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
  176. package/es2021.en/plugins/change-case/change-case.js +1 -1
  177. package/es2021.en/plugins/change-case/change-case.min.js +1 -1
  178. package/es2021.en/plugins/color-picker/color-picker.css +1 -1
  179. package/es2021.en/plugins/color-picker/color-picker.js +1 -1
  180. package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
  181. package/es2021.en/plugins/emoji/emoji.css +1 -1
  182. package/es2021.en/plugins/emoji/emoji.js +1 -1
  183. package/es2021.en/plugins/emoji/emoji.min.js +1 -1
  184. package/es2021.en/plugins/export-docs/export-docs.js +1 -1
  185. package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
  186. package/es2021.en/plugins/finder/finder.css +1 -1
  187. package/es2021.en/plugins/finder/finder.js +1 -1
  188. package/es2021.en/plugins/finder/finder.min.js +1 -1
  189. package/es2021.en/plugins/google-maps/google-maps.css +1 -1
  190. package/es2021.en/plugins/google-maps/google-maps.js +1 -1
  191. package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
  192. package/es2021.en/plugins/google-search/google-search.js +1 -1
  193. package/es2021.en/plugins/google-search/google-search.min.js +1 -1
  194. package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
  195. package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
  196. package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
  197. package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
  198. package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
  199. package/es2021.en/plugins/keyboard/keyboard.css +1 -1
  200. package/es2021.en/plugins/keyboard/keyboard.js +1 -1
  201. package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
  202. package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
  203. package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
  204. package/es2021.en/plugins/page-break/page-break.js +1 -1
  205. package/es2021.en/plugins/page-break/page-break.min.js +1 -1
  206. package/es2021.en/plugins/paste-code/paste-code.css +1 -1
  207. package/es2021.en/plugins/paste-code/paste-code.js +1 -1
  208. package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
  209. package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
  210. package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
  211. package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
  212. package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
  213. package/es2021.en/plugins/style/style.css +1 -1
  214. package/es2021.en/plugins/style/style.js +1 -1
  215. package/es2021.en/plugins/style/style.min.js +1 -1
  216. package/es2021.en/plugins/templates/templates.css +1 -1
  217. package/es2021.en/plugins/templates/templates.js +1 -1
  218. package/es2021.en/plugins/templates/templates.min.js +1 -1
  219. package/es2021.en/plugins/todo-list/todo-list.css +1 -1
  220. package/es2021.en/plugins/todo-list/todo-list.js +1 -1
  221. package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
  222. package/es2021.en/plugins/translate/translate.css +1 -1
  223. package/es2021.en/plugins/translate/translate.js +96 -21
  224. package/es2021.en/plugins/translate/translate.min.js +4 -4
  225. package/es2021.en/plugins/tune-block/tune-block.css +1 -1
  226. package/es2021.en/plugins/tune-block/tune-block.js +1 -1
  227. package/es2021.en/plugins/tune-block/tune-block.min.js +1 -1
  228. package/es5/jodit.css +2 -2
  229. package/es5/jodit.fat.min.js +2 -2
  230. package/es5/jodit.js +2 -2
  231. package/es5/jodit.min.css +2 -2
  232. package/es5/jodit.min.js +2 -2
  233. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  234. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  235. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  236. package/es5/plugins/autocomplete/autocomplete.js +1 -1
  237. package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
  238. package/es5/plugins/backup/backup.css +1 -1
  239. package/es5/plugins/backup/backup.js +1 -1
  240. package/es5/plugins/backup/backup.min.js +1 -1
  241. package/es5/plugins/button-generator/button-generator.css +1 -1
  242. package/es5/plugins/button-generator/button-generator.js +1 -1
  243. package/es5/plugins/button-generator/button-generator.min.js +1 -1
  244. package/es5/plugins/change-case/change-case.js +1 -1
  245. package/es5/plugins/change-case/change-case.min.js +1 -1
  246. package/es5/plugins/color-picker/color-picker.css +1 -1
  247. package/es5/plugins/color-picker/color-picker.js +1 -1
  248. package/es5/plugins/color-picker/color-picker.min.js +1 -1
  249. package/es5/plugins/emoji/emoji.css +1 -1
  250. package/es5/plugins/emoji/emoji.js +1 -1
  251. package/es5/plugins/emoji/emoji.min.js +1 -1
  252. package/es5/plugins/export-docs/export-docs.js +1 -1
  253. package/es5/plugins/export-docs/export-docs.min.js +1 -1
  254. package/es5/plugins/finder/finder.css +1 -1
  255. package/es5/plugins/finder/finder.js +1 -1
  256. package/es5/plugins/finder/finder.min.js +1 -1
  257. package/es5/plugins/google-maps/google-maps.css +1 -1
  258. package/es5/plugins/google-maps/google-maps.js +1 -1
  259. package/es5/plugins/google-maps/google-maps.min.js +1 -1
  260. package/es5/plugins/google-search/google-search.js +1 -1
  261. package/es5/plugins/google-search/google-search.min.js +1 -1
  262. package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
  263. package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
  264. package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
  265. package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
  266. package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
  267. package/es5/plugins/keyboard/keyboard.css +1 -1
  268. package/es5/plugins/keyboard/keyboard.js +1 -1
  269. package/es5/plugins/keyboard/keyboard.min.js +1 -1
  270. package/es5/plugins/mobile-view/mobile-view.js +1 -1
  271. package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
  272. package/es5/plugins/page-break/page-break.js +1 -1
  273. package/es5/plugins/page-break/page-break.min.js +1 -1
  274. package/es5/plugins/paste-code/paste-code.css +1 -1
  275. package/es5/plugins/paste-code/paste-code.js +1 -1
  276. package/es5/plugins/paste-code/paste-code.min.js +1 -1
  277. package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
  278. package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
  279. package/es5/plugins/show-blocks/show-blocks.js +1 -1
  280. package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
  281. package/es5/plugins/style/style.css +1 -1
  282. package/es5/plugins/style/style.js +1 -1
  283. package/es5/plugins/style/style.min.js +1 -1
  284. package/es5/plugins/templates/templates.css +1 -1
  285. package/es5/plugins/templates/templates.js +1 -1
  286. package/es5/plugins/templates/templates.min.js +1 -1
  287. package/es5/plugins/todo-list/todo-list.css +1 -1
  288. package/es5/plugins/todo-list/todo-list.js +1 -1
  289. package/es5/plugins/todo-list/todo-list.min.js +1 -1
  290. package/es5/plugins/translate/translate.css +1 -1
  291. package/es5/plugins/translate/translate.js +118 -21
  292. package/es5/plugins/translate/translate.min.js +2 -2
  293. package/es5/plugins/tune-block/tune-block.css +1 -1
  294. package/es5/plugins/tune-block/tune-block.js +1 -1
  295. package/es5/plugins/tune-block/tune-block.min.js +1 -1
  296. package/es5/polyfills.fat.min.js +1 -1
  297. package/es5/polyfills.js +1 -1
  298. package/es5/polyfills.min.js +1 -1
  299. package/esm/config.d.ts +3 -1
  300. package/esm/plugins/translate/config.d.ts +3 -2
  301. package/esm/plugins/translate/config.js +1 -1
  302. package/esm/plugins/translate/interface.d.ts +8 -0
  303. package/esm/plugins/translate/providers/cloud/cloud.d.ts +14 -0
  304. package/esm/plugins/translate/providers/cloud/cloud.js +1 -0
  305. package/esm/plugins/translate/providers/google/google.js +1 -1
  306. package/esm/plugins/translate/providers/languages.d.ts +1 -0
  307. package/esm/plugins/translate/providers/languages.js +1 -1
  308. package/esm/plugins/translate/translate.js +1 -1
  309. package/package.json +1 -1
  310. package/types/config.d.ts +3 -1
  311. package/types/plugins/translate/config.d.ts +3 -2
  312. package/types/plugins/translate/interface.d.ts +8 -0
  313. package/types/plugins/translate/providers/cloud/cloud.d.ts +14 -0
  314. 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.24
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
- return this.__fetch('translate', {
211
+ const data = {
142
212
  q,
143
- source,
144
213
  target,
145
214
  format: 'html'
146
- }).then((resp)=>{
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 _providers_google_google__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(27834);
450
- /* harmony import */ var _ui_settings_settings__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(33124);
451
- /* harmony import */ var _replace_text_fragments__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(73534);
452
- /* harmony import */ var jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(65478);
453
- /* harmony import */ var jodit_esm_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(23282);
454
- /* harmony import */ var jodit_esm_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(70799);
455
- /* harmony import */ var jodit_esm_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(38837);
456
- /* harmony import */ var jodit_esm_core_helpers_utils_default_language__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(96325);
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,jodit_esm_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_9__.isString)(provider)) {
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 _providers_google_google__WEBPACK_IMPORTED_MODULE_4__.GoogleTranslateProvider(this.j);
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,jodit_esm_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_10__.assert)((0,jodit_esm_core_helpers_checker_is_function__WEBPACK_IMPORTED_MODULE_8__.isFunction)(provider), 'Provider must be a function');
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 _ui_settings_settings__WEBPACK_IMPORTED_MODULE_5__.UITranslateSettings(dlg, this.state, {
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,_replace_text_fragments__WEBPACK_IMPORTED_MODULE_6__.getSelectionFragments)(jodit).filter((fragment)=>fragment.text.trim().length > 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' ? language : this.state.sourceLang;
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,jodit_esm_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_9__.isString)(error) ? error : error.message);
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
- jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_7__.persistent
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.24
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){return this.__fetch("translate",{q:t,source:e,target:a,format:"html"}).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={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(27834),o=a(33124),l=a(73534),c=a(65478),u=a(23282),h=a(70799),d=a(38837),g=a(96325),p=a(50911),m=a(10830),_=a(2692);class v extends p.Plugin{__getProvider(){let{provider:t}=this.jodit.options.translate;if((0,h.isString)(t))if("google"===t)return new r.GoogleTranslateProvider(this.j);else throw Error("Unknown provider");return(0,d.assert)((0,u.isFunction)(t),"Provider must be a function"),t(this.jodit)}afterInit(t){let e=(0,g.defaultLanguage)(t.o.language,_.JoditPro.defaultOptions.language),a=(0,g.defaultLanguage)(t.o.language,e),s=this.__getProvider();t.registerCommand("translateOptions",{exec:()=>(0,n._)(function*(){let e=this.state,a=t.dlg();a.setHeader("Translate options");let n=yield s.supportedLanguages(),i="source"in n?n.source.langs:n.langs,r="target"in n?n.target.langs:n.langs,l=new o.UITranslateSettings(a,this.state,{sourceList:i,targetList:r,onChange(t){e=t}});a.setContent(l),a.setFooter([(0,m.Button)(t,"cancel","Cancel").onAction(()=>a.close()),(0,m.Button)(t,"ok","Save","primary").onAction(()=>{this.state=e,a.close()})]),l.bindDestruct(a),a.setSize(500,400).open(!0)}).call(this),hotkeys:t.o.translate.hotkeys.translateOptions}).registerCommand("translate",{exec:()=>{let e=(0,l.getSelectionFragments)(t).filter(t=>t.text.trim().length>0);if(!e.length)return void t.message.error("Select text for translate");let n=this.state.sourceLang&&"auto"!==this.state.sourceLang?this.state.sourceLang:a,i=this.state.targetLang;return Promise.all(e.map(e=>{s.translate(e.text,n,i).then(t=>{e.replace(t.text)}).catch(e=>{t.message.error((0,h.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)([c.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}'>
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='&'>
@@ -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.24
4
+ * Version: v4.11.26
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -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.24
4
+ * Version: v4.11.26
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
@@ -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.24
4
+ * Version: v4.11.26
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */