jodit-pro 4.18.7 → 4.18.9

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 (388) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/README.md +2 -0
  3. package/config.js +1 -0
  4. package/es2015/jodit.css +2 -2
  5. package/es2015/jodit.fat.min.css +1 -1
  6. package/es2015/jodit.fat.min.js +41 -26
  7. package/es2015/jodit.js +1117 -197
  8. package/es2015/jodit.min.css +1 -1
  9. package/es2015/jodit.min.js +11 -11
  10. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  11. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  12. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  13. package/es2015/plugins/autocomplete/autocomplete.css +1 -1
  14. package/es2015/plugins/autocomplete/autocomplete.js +1 -1
  15. package/es2015/plugins/autocomplete/autocomplete.min.js +1 -1
  16. package/es2015/plugins/backup/backup.css +1 -1
  17. package/es2015/plugins/backup/backup.js +1 -1
  18. package/es2015/plugins/backup/backup.min.js +1 -1
  19. package/es2015/plugins/button-generator/button-generator.css +1 -1
  20. package/es2015/plugins/button-generator/button-generator.js +1 -1
  21. package/es2015/plugins/button-generator/button-generator.min.js +1 -1
  22. package/es2015/plugins/change-case/change-case.js +1 -1
  23. package/es2015/plugins/change-case/change-case.min.js +1 -1
  24. package/es2015/plugins/chart/chart.css +3 -3
  25. package/es2015/plugins/chart/chart.js +1 -1
  26. package/es2015/plugins/chart/chart.min.css +1 -1
  27. package/es2015/plugins/chart/chart.min.js +1 -1
  28. package/es2015/plugins/color-picker/color-picker.css +1 -1
  29. package/es2015/plugins/color-picker/color-picker.js +1 -1
  30. package/es2015/plugins/color-picker/color-picker.min.js +1 -1
  31. package/es2015/plugins/emoji/emoji.css +1 -1
  32. package/es2015/plugins/emoji/emoji.js +1 -1
  33. package/es2015/plugins/emoji/emoji.min.js +1 -1
  34. package/es2015/plugins/export-docs/export-docs.js +1 -1
  35. package/es2015/plugins/export-docs/export-docs.min.js +1 -1
  36. package/es2015/plugins/finder/finder.css +1 -1
  37. package/es2015/plugins/finder/finder.js +1 -1
  38. package/es2015/plugins/finder/finder.min.js +1 -1
  39. package/es2015/plugins/google-maps/google-maps.css +1 -1
  40. package/es2015/plugins/google-maps/google-maps.js +1 -1
  41. package/es2015/plugins/google-maps/google-maps.min.js +1 -1
  42. package/es2015/plugins/google-search/google-search.js +1 -1
  43. package/es2015/plugins/google-search/google-search.min.js +1 -1
  44. package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
  45. package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
  46. package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
  47. package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
  48. package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
  49. package/es2015/plugins/image-editor-pro/image-editor-pro.css +1 -1
  50. package/es2015/plugins/image-editor-pro/image-editor-pro.js +1 -1
  51. package/es2015/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  52. package/es2015/plugins/keyboard/keyboard.css +1 -1
  53. package/es2015/plugins/keyboard/keyboard.js +1 -1
  54. package/es2015/plugins/keyboard/keyboard.min.js +1 -1
  55. package/es2015/plugins/math/math.css +196 -0
  56. package/es2015/plugins/math/math.js +1472 -0
  57. package/es2015/plugins/math/math.min.css +1 -0
  58. package/es2015/plugins/math/math.min.js +23 -0
  59. package/es2015/plugins/mobile-view/mobile-view.js +1 -1
  60. package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
  61. package/es2015/plugins/page-break/page-break.js +1 -1
  62. package/es2015/plugins/page-break/page-break.min.js +1 -1
  63. package/es2015/plugins/paste-code/paste-code.css +1 -1
  64. package/es2015/plugins/paste-code/paste-code.js +1 -1
  65. package/es2015/plugins/paste-code/paste-code.min.js +1 -1
  66. package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
  67. package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
  68. package/es2015/plugins/show-blocks/show-blocks.js +1 -1
  69. package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
  70. package/es2015/plugins/style/style.css +1 -1
  71. package/es2015/plugins/style/style.js +1 -1
  72. package/es2015/plugins/style/style.min.js +1 -1
  73. package/es2015/plugins/templates/templates.css +1 -1
  74. package/es2015/plugins/templates/templates.js +1 -1
  75. package/es2015/plugins/templates/templates.min.js +1 -1
  76. package/es2015/plugins/todo-list/todo-list.css +1 -1
  77. package/es2015/plugins/todo-list/todo-list.js +1 -1
  78. package/es2015/plugins/todo-list/todo-list.min.js +1 -1
  79. package/es2015/plugins/translate/translate.css +1 -1
  80. package/es2015/plugins/translate/translate.js +1 -1
  81. package/es2015/plugins/translate/translate.min.js +1 -1
  82. package/es2015/plugins/tune-block/tune-block.css +1 -1
  83. package/es2015/plugins/tune-block/tune-block.js +1 -1
  84. package/es2015/plugins/tune-block/tune-block.min.js +1 -1
  85. package/es2018/jodit.fat.min.css +1 -1
  86. package/es2018/jodit.fat.min.js +57 -42
  87. package/es2018/jodit.min.css +1 -1
  88. package/es2018/jodit.min.js +21 -21
  89. package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  90. package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
  91. package/es2018/plugins/backup/backup.min.js +1 -1
  92. package/es2018/plugins/button-generator/button-generator.min.js +1 -1
  93. package/es2018/plugins/change-case/change-case.min.js +1 -1
  94. package/es2018/plugins/chart/chart.min.css +1 -1
  95. package/es2018/plugins/chart/chart.min.js +1 -1
  96. package/es2018/plugins/color-picker/color-picker.min.js +1 -1
  97. package/es2018/plugins/emoji/emoji.min.js +1 -1
  98. package/es2018/plugins/export-docs/export-docs.min.js +1 -1
  99. package/es2018/plugins/finder/finder.min.js +1 -1
  100. package/es2018/plugins/google-maps/google-maps.min.js +1 -1
  101. package/es2018/plugins/google-search/google-search.min.js +1 -1
  102. package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
  103. package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
  104. package/es2018/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  105. package/es2018/plugins/keyboard/keyboard.min.js +1 -1
  106. package/es2018/plugins/math/math.min.css +1 -0
  107. package/es2018/plugins/math/math.min.js +23 -0
  108. package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
  109. package/es2018/plugins/page-break/page-break.min.js +1 -1
  110. package/es2018/plugins/paste-code/paste-code.min.js +1 -1
  111. package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
  112. package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
  113. package/es2018/plugins/style/style.min.js +1 -1
  114. package/es2018/plugins/templates/templates.min.js +1 -1
  115. package/es2018/plugins/todo-list/todo-list.min.js +1 -1
  116. package/es2018/plugins/translate/translate.min.js +1 -1
  117. package/es2018/plugins/tune-block/tune-block.min.js +1 -1
  118. package/es2021/jodit.css +2 -2
  119. package/es2021/jodit.fat.min.css +1 -1
  120. package/es2021/jodit.fat.min.js +69 -54
  121. package/es2021/jodit.js +1092 -197
  122. package/es2021/jodit.min.css +1 -1
  123. package/es2021/jodit.min.js +14 -14
  124. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  125. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  126. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  127. package/es2021/plugins/autocomplete/autocomplete.css +1 -1
  128. package/es2021/plugins/autocomplete/autocomplete.js +1 -1
  129. package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
  130. package/es2021/plugins/backup/backup.css +1 -1
  131. package/es2021/plugins/backup/backup.js +1 -1
  132. package/es2021/plugins/backup/backup.min.js +1 -1
  133. package/es2021/plugins/button-generator/button-generator.css +1 -1
  134. package/es2021/plugins/button-generator/button-generator.js +1 -1
  135. package/es2021/plugins/button-generator/button-generator.min.js +1 -1
  136. package/es2021/plugins/change-case/change-case.js +1 -1
  137. package/es2021/plugins/change-case/change-case.min.js +1 -1
  138. package/es2021/plugins/chart/chart.css +3 -3
  139. package/es2021/plugins/chart/chart.js +1 -1
  140. package/es2021/plugins/chart/chart.min.css +1 -1
  141. package/es2021/plugins/chart/chart.min.js +1 -1
  142. package/es2021/plugins/color-picker/color-picker.css +1 -1
  143. package/es2021/plugins/color-picker/color-picker.js +1 -1
  144. package/es2021/plugins/color-picker/color-picker.min.js +1 -1
  145. package/es2021/plugins/emoji/emoji.css +1 -1
  146. package/es2021/plugins/emoji/emoji.js +1 -1
  147. package/es2021/plugins/emoji/emoji.min.js +1 -1
  148. package/es2021/plugins/export-docs/export-docs.js +1 -1
  149. package/es2021/plugins/export-docs/export-docs.min.js +1 -1
  150. package/es2021/plugins/finder/finder.css +1 -1
  151. package/es2021/plugins/finder/finder.js +1 -1
  152. package/es2021/plugins/finder/finder.min.js +1 -1
  153. package/es2021/plugins/google-maps/google-maps.css +1 -1
  154. package/es2021/plugins/google-maps/google-maps.js +1 -1
  155. package/es2021/plugins/google-maps/google-maps.min.js +1 -1
  156. package/es2021/plugins/google-search/google-search.js +1 -1
  157. package/es2021/plugins/google-search/google-search.min.js +1 -1
  158. package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
  159. package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
  160. package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
  161. package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
  162. package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
  163. package/es2021/plugins/image-editor-pro/image-editor-pro.css +1 -1
  164. package/es2021/plugins/image-editor-pro/image-editor-pro.js +1 -1
  165. package/es2021/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  166. package/es2021/plugins/keyboard/keyboard.css +1 -1
  167. package/es2021/plugins/keyboard/keyboard.js +1 -1
  168. package/es2021/plugins/keyboard/keyboard.min.js +1 -1
  169. package/es2021/plugins/math/math.css +196 -0
  170. package/es2021/plugins/math/math.js +1414 -0
  171. package/es2021/plugins/math/math.min.css +1 -0
  172. package/es2021/plugins/math/math.min.js +23 -0
  173. package/es2021/plugins/mobile-view/mobile-view.js +1 -1
  174. package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
  175. package/es2021/plugins/page-break/page-break.js +1 -1
  176. package/es2021/plugins/page-break/page-break.min.js +1 -1
  177. package/es2021/plugins/paste-code/paste-code.css +1 -1
  178. package/es2021/plugins/paste-code/paste-code.js +1 -1
  179. package/es2021/plugins/paste-code/paste-code.min.js +1 -1
  180. package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
  181. package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
  182. package/es2021/plugins/show-blocks/show-blocks.js +1 -1
  183. package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
  184. package/es2021/plugins/style/style.css +1 -1
  185. package/es2021/plugins/style/style.js +1 -1
  186. package/es2021/plugins/style/style.min.js +1 -1
  187. package/es2021/plugins/templates/templates.css +1 -1
  188. package/es2021/plugins/templates/templates.js +1 -1
  189. package/es2021/plugins/templates/templates.min.js +1 -1
  190. package/es2021/plugins/todo-list/todo-list.css +1 -1
  191. package/es2021/plugins/todo-list/todo-list.js +1 -1
  192. package/es2021/plugins/todo-list/todo-list.min.js +1 -1
  193. package/es2021/plugins/translate/translate.css +1 -1
  194. package/es2021/plugins/translate/translate.js +1 -1
  195. package/es2021/plugins/translate/translate.min.js +1 -1
  196. package/es2021/plugins/tune-block/tune-block.css +1 -1
  197. package/es2021/plugins/tune-block/tune-block.js +1 -1
  198. package/es2021/plugins/tune-block/tune-block.min.js +1 -1
  199. package/es2021.en/jodit.css +2 -2
  200. package/es2021.en/jodit.fat.min.css +1 -1
  201. package/es2021.en/jodit.fat.min.js +69 -54
  202. package/es2021.en/jodit.js +1092 -197
  203. package/es2021.en/jodit.min.css +1 -1
  204. package/es2021.en/jodit.min.js +30 -30
  205. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  206. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  207. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  208. package/es2021.en/plugins/autocomplete/autocomplete.css +1 -1
  209. package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
  210. package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
  211. package/es2021.en/plugins/backup/backup.css +1 -1
  212. package/es2021.en/plugins/backup/backup.js +1 -1
  213. package/es2021.en/plugins/backup/backup.min.js +1 -1
  214. package/es2021.en/plugins/button-generator/button-generator.css +1 -1
  215. package/es2021.en/plugins/button-generator/button-generator.js +1 -1
  216. package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
  217. package/es2021.en/plugins/change-case/change-case.js +1 -1
  218. package/es2021.en/plugins/change-case/change-case.min.js +1 -1
  219. package/es2021.en/plugins/chart/chart.css +3 -3
  220. package/es2021.en/plugins/chart/chart.js +1 -1
  221. package/es2021.en/plugins/chart/chart.min.css +1 -1
  222. package/es2021.en/plugins/chart/chart.min.js +1 -1
  223. package/es2021.en/plugins/color-picker/color-picker.css +1 -1
  224. package/es2021.en/plugins/color-picker/color-picker.js +1 -1
  225. package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
  226. package/es2021.en/plugins/emoji/emoji.css +1 -1
  227. package/es2021.en/plugins/emoji/emoji.js +1 -1
  228. package/es2021.en/plugins/emoji/emoji.min.js +1 -1
  229. package/es2021.en/plugins/export-docs/export-docs.js +1 -1
  230. package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
  231. package/es2021.en/plugins/finder/finder.css +1 -1
  232. package/es2021.en/plugins/finder/finder.js +1 -1
  233. package/es2021.en/plugins/finder/finder.min.js +1 -1
  234. package/es2021.en/plugins/google-maps/google-maps.css +1 -1
  235. package/es2021.en/plugins/google-maps/google-maps.js +1 -1
  236. package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
  237. package/es2021.en/plugins/google-search/google-search.js +1 -1
  238. package/es2021.en/plugins/google-search/google-search.min.js +1 -1
  239. package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
  240. package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
  241. package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
  242. package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
  243. package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
  244. package/es2021.en/plugins/image-editor-pro/image-editor-pro.css +1 -1
  245. package/es2021.en/plugins/image-editor-pro/image-editor-pro.js +1 -1
  246. package/es2021.en/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  247. package/es2021.en/plugins/keyboard/keyboard.css +1 -1
  248. package/es2021.en/plugins/keyboard/keyboard.js +1 -1
  249. package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
  250. package/es2021.en/plugins/math/math.css +196 -0
  251. package/es2021.en/plugins/math/math.js +1414 -0
  252. package/es2021.en/plugins/math/math.min.css +1 -0
  253. package/es2021.en/plugins/math/math.min.js +23 -0
  254. package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
  255. package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
  256. package/es2021.en/plugins/page-break/page-break.js +1 -1
  257. package/es2021.en/plugins/page-break/page-break.min.js +1 -1
  258. package/es2021.en/plugins/paste-code/paste-code.css +1 -1
  259. package/es2021.en/plugins/paste-code/paste-code.js +1 -1
  260. package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
  261. package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
  262. package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
  263. package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
  264. package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
  265. package/es2021.en/plugins/style/style.css +1 -1
  266. package/es2021.en/plugins/style/style.js +1 -1
  267. package/es2021.en/plugins/style/style.min.js +1 -1
  268. package/es2021.en/plugins/templates/templates.css +1 -1
  269. package/es2021.en/plugins/templates/templates.js +1 -1
  270. package/es2021.en/plugins/templates/templates.min.js +1 -1
  271. package/es2021.en/plugins/todo-list/todo-list.css +1 -1
  272. package/es2021.en/plugins/todo-list/todo-list.js +1 -1
  273. package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
  274. package/es2021.en/plugins/translate/translate.css +1 -1
  275. package/es2021.en/plugins/translate/translate.js +1 -1
  276. package/es2021.en/plugins/translate/translate.min.js +1 -1
  277. package/es2021.en/plugins/tune-block/tune-block.css +1 -1
  278. package/es2021.en/plugins/tune-block/tune-block.js +1 -1
  279. package/es2021.en/plugins/tune-block/tune-block.min.js +1 -1
  280. package/es5/jodit.css +3 -3
  281. package/es5/jodit.fat.min.css +1 -1
  282. package/es5/jodit.fat.min.js +2 -2
  283. package/es5/jodit.js +1254 -207
  284. package/es5/jodit.min.css +3 -3
  285. package/es5/jodit.min.js +2 -2
  286. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  287. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +1 -1
  288. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +1 -1
  289. package/es5/plugins/autocomplete/autocomplete.css +1 -1
  290. package/es5/plugins/autocomplete/autocomplete.js +1 -1
  291. package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
  292. package/es5/plugins/backup/backup.css +1 -1
  293. package/es5/plugins/backup/backup.js +1 -1
  294. package/es5/plugins/backup/backup.min.js +1 -1
  295. package/es5/plugins/button-generator/button-generator.css +1 -1
  296. package/es5/plugins/button-generator/button-generator.js +1 -1
  297. package/es5/plugins/button-generator/button-generator.min.js +1 -1
  298. package/es5/plugins/change-case/change-case.js +1 -1
  299. package/es5/plugins/change-case/change-case.min.js +1 -1
  300. package/es5/plugins/chart/chart.css +3 -3
  301. package/es5/plugins/chart/chart.js +1 -1
  302. package/es5/plugins/chart/chart.min.css +1 -1
  303. package/es5/plugins/chart/chart.min.js +1 -1
  304. package/es5/plugins/color-picker/color-picker.css +1 -1
  305. package/es5/plugins/color-picker/color-picker.js +1 -1
  306. package/es5/plugins/color-picker/color-picker.min.js +1 -1
  307. package/es5/plugins/emoji/emoji.css +1 -1
  308. package/es5/plugins/emoji/emoji.js +1 -1
  309. package/es5/plugins/emoji/emoji.min.js +1 -1
  310. package/es5/plugins/export-docs/export-docs.js +1 -1
  311. package/es5/plugins/export-docs/export-docs.min.js +1 -1
  312. package/es5/plugins/finder/finder.css +1 -1
  313. package/es5/plugins/finder/finder.js +1 -1
  314. package/es5/plugins/finder/finder.min.js +1 -1
  315. package/es5/plugins/google-maps/google-maps.css +1 -1
  316. package/es5/plugins/google-maps/google-maps.js +1 -1
  317. package/es5/plugins/google-maps/google-maps.min.js +1 -1
  318. package/es5/plugins/google-search/google-search.js +1 -1
  319. package/es5/plugins/google-search/google-search.min.js +1 -1
  320. package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
  321. package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
  322. package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
  323. package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
  324. package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
  325. package/es5/plugins/image-editor-pro/image-editor-pro.css +1 -1
  326. package/es5/plugins/image-editor-pro/image-editor-pro.js +1 -1
  327. package/es5/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  328. package/es5/plugins/keyboard/keyboard.css +1 -1
  329. package/es5/plugins/keyboard/keyboard.js +1 -1
  330. package/es5/plugins/keyboard/keyboard.min.js +1 -1
  331. package/es5/plugins/math/math.css +196 -0
  332. package/es5/plugins/math/math.js +1624 -0
  333. package/es5/plugins/math/math.min.css +1 -0
  334. package/es5/plugins/math/math.min.js +8 -0
  335. package/es5/plugins/mobile-view/mobile-view.js +1 -1
  336. package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
  337. package/es5/plugins/page-break/page-break.js +1 -1
  338. package/es5/plugins/page-break/page-break.min.js +1 -1
  339. package/es5/plugins/paste-code/paste-code.css +1 -1
  340. package/es5/plugins/paste-code/paste-code.js +1 -1
  341. package/es5/plugins/paste-code/paste-code.min.js +1 -1
  342. package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
  343. package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
  344. package/es5/plugins/show-blocks/show-blocks.js +1 -1
  345. package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
  346. package/es5/plugins/style/style.css +1 -1
  347. package/es5/plugins/style/style.js +1 -1
  348. package/es5/plugins/style/style.min.js +1 -1
  349. package/es5/plugins/templates/templates.css +1 -1
  350. package/es5/plugins/templates/templates.js +1 -1
  351. package/es5/plugins/templates/templates.min.js +1 -1
  352. package/es5/plugins/todo-list/todo-list.css +1 -1
  353. package/es5/plugins/todo-list/todo-list.js +1 -1
  354. package/es5/plugins/todo-list/todo-list.min.js +1 -1
  355. package/es5/plugins/translate/translate.css +1 -1
  356. package/es5/plugins/translate/translate.js +1 -1
  357. package/es5/plugins/translate/translate.min.js +1 -1
  358. package/es5/plugins/tune-block/tune-block.css +1 -1
  359. package/es5/plugins/tune-block/tune-block.js +1 -1
  360. package/es5/plugins/tune-block/tune-block.min.js +1 -1
  361. package/es5/polyfills.fat.min.js +1 -1
  362. package/es5/polyfills.js +1 -1
  363. package/es5/polyfills.min.js +1 -1
  364. package/esm/config.d.ts +30 -0
  365. package/esm/plugins/all.js +1 -1
  366. package/esm/plugins/math/assets/math-block.svg.js +1 -0
  367. package/esm/plugins/math/assets/math-inline.svg.js +1 -0
  368. package/esm/plugins/math/assets/math.svg.js +1 -0
  369. package/esm/plugins/math/config.d.ts +34 -0
  370. package/esm/plugins/math/config.js +1 -0
  371. package/esm/plugins/math/helpers.d.ts +33 -0
  372. package/esm/plugins/math/helpers.js +1 -0
  373. package/esm/plugins/math/interface.d.ts +45 -0
  374. package/esm/plugins/math/interface.js +0 -0
  375. package/esm/plugins/math/math.d.ts +66 -0
  376. package/esm/plugins/math/math.js +1 -0
  377. package/esm/plugins/math/mathjax.d.ts +17 -0
  378. package/esm/plugins/math/mathjax.js +1 -0
  379. package/esm/plugins/math/ui/editor/editor.d.ts +56 -0
  380. package/esm/plugins/math/ui/editor/editor.js +16 -0
  381. package/package.json +1 -1
  382. package/types/config.d.ts +30 -0
  383. package/types/plugins/math/config.d.ts +34 -0
  384. package/types/plugins/math/helpers.d.ts +33 -0
  385. package/types/plugins/math/interface.d.ts +45 -0
  386. package/types/plugins/math/math.d.ts +66 -0
  387. package/types/plugins/math/mathjax.d.ts +17 -0
  388. package/types/plugins/math/ui/editor/editor.d.ts +56 -0
@@ -0,0 +1,1624 @@
1
+ /*!
2
+ * jodit-pro - PRO Version of Jodit Editor
3
+ * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
+ * Version: v4.18.9
5
+ * Url: https://xdsoft.net/jodit/pro/
6
+ * License(s): SEE LICENSE IN LICENSE.md
7
+ */
8
+
9
+ (function webpackUniversalModuleDefinition(root, factory) {
10
+ if(typeof exports === 'object' && typeof module === 'object')
11
+ module.exports = factory();
12
+ else if(typeof define === 'function' && define.amd)
13
+ define([], factory);
14
+ else {
15
+ var a = factory();
16
+ for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
17
+ }
18
+ })(self, function() {
19
+ return (self["webpackChunkjodit_pro"] = self["webpackChunkjodit_pro"] || []).push([[680],{
20
+
21
+ /***/ 49417:
22
+ /***/ (function(module) {
23
+
24
+ module.exports = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"> <g fill=\"none\"> <path d=\"M3 4h18M3 20h18M7 9.5l5 5M12 9.5l-5 5M15 10.5h4M15 13.5h4\"/> </g> </svg>"
25
+
26
+ /***/ }),
27
+
28
+ /***/ 92201:
29
+ /***/ (function(module) {
30
+
31
+ module.exports = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"> <g fill=\"none\"> <path d=\"M3 12h4M17 12h4M9 9.5l4 5M13 9.5l-4 5\"/> </g> </svg>"
32
+
33
+ /***/ }),
34
+
35
+ /***/ 25733:
36
+ /***/ (function(module) {
37
+
38
+ module.exports = "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"> <g fill=\"none\"> <path d=\"M4 8l6 8M10 8l-6 8M14 9.5h6M14 14.5h6\"/> </g> </svg>"
39
+
40
+ /***/ }),
41
+
42
+ /***/ 65664:
43
+ /***/ (function(__unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__) {
44
+
45
+ "use strict";
46
+ /* harmony import */ var _swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(94899);
47
+ /* harmony import */ var _assets_math_svg__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(25733);
48
+ /* harmony import */ var _assets_math_svg__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_assets_math_svg__WEBPACK_IMPORTED_MODULE_1__);
49
+ /* harmony import */ var _assets_math_block_svg__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(49417);
50
+ /* harmony import */ var _assets_math_block_svg__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_assets_math_block_svg__WEBPACK_IMPORTED_MODULE_2__);
51
+ /* harmony import */ var _assets_math_inline_svg__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(92201);
52
+ /* harmony import */ var _assets_math_inline_svg__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_assets_math_inline_svg__WEBPACK_IMPORTED_MODULE_3__);
53
+ /* harmony import */ var jodit_esm_config__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6441);
54
+ /* harmony import */ var jodit_esm_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(12153);
55
+ /*!
56
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
57
+ * See LICENSE.md in the project root for license information.
58
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
59
+ */
60
+
61
+
62
+
63
+
64
+
65
+ jodit_esm_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.math = {
66
+ className: 'jodit-math',
67
+ mathJaxUrl: 'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-svg.js',
68
+ defaultFormat: 'latex',
69
+ defaultDisplay: 'block',
70
+ defaultBackground: '',
71
+ defaultTextColor: '',
72
+ defaultBorderColor: '',
73
+ defaultAlign: 'center',
74
+ defaultWrap: false,
75
+ allowChangeBackground: true,
76
+ allowChangeTextColor: true,
77
+ allowChangeBorderColor: true,
78
+ allowChangeAlign: true,
79
+ allowChangeWrap: true,
80
+ symbols: [
81
+ {
82
+ label: '½',
83
+ latex: '\\frac{1}{2}',
84
+ mathml: '<mfrac><mn>1</mn><mn>2</mn></mfrac>'
85
+ },
86
+ {
87
+ label: '√',
88
+ latex: '\\sqrt{x}',
89
+ mathml: '<msqrt><mi>x</mi></msqrt>'
90
+ },
91
+ {
92
+ label: 'ⁿ√',
93
+ latex: '\\sqrt[n]{x}',
94
+ mathml: '<mroot><mi>x</mi><mi>n</mi></mroot>'
95
+ },
96
+ {
97
+ label: 'x²',
98
+ latex: 'x^{2}',
99
+ mathml: '<msup><mi>x</mi><mn>2</mn></msup>'
100
+ },
101
+ {
102
+ label: 'xₙ',
103
+ latex: 'x_{n}',
104
+ mathml: '<msub><mi>x</mi><mi>n</mi></msub>'
105
+ },
106
+ {
107
+ label: 'x̄',
108
+ latex: '\\bar{x}',
109
+ mathml: '<mover><mi>x</mi><mo>¯</mo></mover>'
110
+ },
111
+ {
112
+ label: 'vec',
113
+ latex: '\\vec{x}',
114
+ mathml: '<mover><mi>x</mi><mo>→</mo></mover>'
115
+ },
116
+ {
117
+ label: 'ẋ',
118
+ latex: '\\dot{x}',
119
+ mathml: '<mover><mi>x</mi><mo>˙</mo></mover>'
120
+ },
121
+ {
122
+ label: '|x|',
123
+ latex: '\\left| x \\right|',
124
+ mathml: '<mrow><mo>|</mo><mi>x</mi><mo>|</mo></mrow>'
125
+ },
126
+ {
127
+ label: '( )',
128
+ latex: '\\left( x \\right)',
129
+ mathml: '<mrow><mo>(</mo><mi>x</mi><mo>)</mo></mrow>'
130
+ },
131
+ {
132
+ label: 'Σ',
133
+ latex: '\\sum_{i=1}^{n}',
134
+ mathml: '<munderover><mo>∑</mo><mrow><mi>i</mi><mo>=</mo><mn>1</mn></mrow><mi>n</mi></munderover>'
135
+ },
136
+ {
137
+ label: '∏',
138
+ latex: '\\prod_{i=1}^{n}',
139
+ mathml: '<munderover><mo>∏</mo><mrow><mi>i</mi><mo>=</mo><mn>1</mn></mrow><mi>n</mi></munderover>'
140
+ },
141
+ {
142
+ label: '∫',
143
+ latex: '\\int_{a}^{b}',
144
+ mathml: '<msubsup><mo>∫</mo><mi>a</mi><mi>b</mi></msubsup>'
145
+ },
146
+ {
147
+ label: '∮',
148
+ latex: '\\oint',
149
+ mathml: '<mo>∮</mo>'
150
+ },
151
+ {
152
+ label: 'lim',
153
+ latex: '\\lim_{x \\to \\infty}',
154
+ mathml: '<munder><mo>lim</mo><mrow><mi>x</mi><mo>→</mo><mi>∞</mi></mrow></munder>'
155
+ },
156
+ {
157
+ label: '∂',
158
+ latex: '\\partial',
159
+ mathml: '<mo>∂</mo>'
160
+ },
161
+ {
162
+ label: '∇',
163
+ latex: '\\nabla',
164
+ mathml: '<mo>∇</mo>'
165
+ },
166
+ {
167
+ label: '∞',
168
+ latex: '\\infty',
169
+ mathml: '<mi>∞</mi>'
170
+ },
171
+ {
172
+ label: '±',
173
+ latex: '\\pm',
174
+ mathml: '<mo>±</mo>'
175
+ },
176
+ {
177
+ label: '×',
178
+ latex: '\\times',
179
+ mathml: '<mo>×</mo>'
180
+ },
181
+ {
182
+ label: '·',
183
+ latex: '\\cdot',
184
+ mathml: '<mo>·</mo>'
185
+ },
186
+ {
187
+ label: '÷',
188
+ latex: '\\div',
189
+ mathml: '<mo>÷</mo>'
190
+ },
191
+ {
192
+ label: '≠',
193
+ latex: '\\neq',
194
+ mathml: '<mo>≠</mo>'
195
+ },
196
+ {
197
+ label: '≤',
198
+ latex: '\\leq',
199
+ mathml: '<mo>≤</mo>'
200
+ },
201
+ {
202
+ label: '≥',
203
+ latex: '\\geq',
204
+ mathml: '<mo>≥</mo>'
205
+ },
206
+ {
207
+ label: '≈',
208
+ latex: '\\approx',
209
+ mathml: '<mo>≈</mo>'
210
+ },
211
+ {
212
+ label: '≡',
213
+ latex: '\\equiv',
214
+ mathml: '<mo>≡</mo>'
215
+ },
216
+ {
217
+ label: '∝',
218
+ latex: '\\propto',
219
+ mathml: '<mo>∝</mo>'
220
+ },
221
+ {
222
+ label: '→',
223
+ latex: '\\to',
224
+ mathml: '<mo>→</mo>'
225
+ },
226
+ {
227
+ label: '⇒',
228
+ latex: '\\Rightarrow',
229
+ mathml: '<mo>⇒</mo>'
230
+ },
231
+ {
232
+ label: '°',
233
+ latex: '^{\\circ}',
234
+ mathml: '<mo>°</mo>'
235
+ },
236
+ {
237
+ label: '∈',
238
+ latex: '\\in',
239
+ mathml: '<mo>∈</mo>'
240
+ },
241
+ {
242
+ label: '∉',
243
+ latex: '\\notin',
244
+ mathml: '<mo>∉</mo>'
245
+ },
246
+ {
247
+ label: '⊂',
248
+ latex: '\\subset',
249
+ mathml: '<mo>⊂</mo>'
250
+ },
251
+ {
252
+ label: '∪',
253
+ latex: '\\cup',
254
+ mathml: '<mo>∪</mo>'
255
+ },
256
+ {
257
+ label: '∩',
258
+ latex: '\\cap',
259
+ mathml: '<mo>∩</mo>'
260
+ },
261
+ {
262
+ label: '∀',
263
+ latex: '\\forall',
264
+ mathml: '<mo>∀</mo>'
265
+ },
266
+ {
267
+ label: '∃',
268
+ latex: '\\exists',
269
+ mathml: '<mo>∃</mo>'
270
+ },
271
+ {
272
+ label: '∅',
273
+ latex: '\\emptyset',
274
+ mathml: '<mi>∅</mi>'
275
+ },
276
+ {
277
+ label: 'π',
278
+ latex: '\\pi',
279
+ mathml: '<mi>π</mi>'
280
+ },
281
+ {
282
+ label: 'θ',
283
+ latex: '\\theta',
284
+ mathml: '<mi>θ</mi>'
285
+ },
286
+ {
287
+ label: 'α',
288
+ latex: '\\alpha',
289
+ mathml: '<mi>α</mi>'
290
+ },
291
+ {
292
+ label: 'β',
293
+ latex: '\\beta',
294
+ mathml: '<mi>β</mi>'
295
+ },
296
+ {
297
+ label: 'γ',
298
+ latex: '\\gamma',
299
+ mathml: '<mi>γ</mi>'
300
+ },
301
+ {
302
+ label: 'λ',
303
+ latex: '\\lambda',
304
+ mathml: '<mi>λ</mi>'
305
+ },
306
+ {
307
+ label: 'μ',
308
+ latex: '\\mu',
309
+ mathml: '<mi>μ</mi>'
310
+ },
311
+ {
312
+ label: 'σ',
313
+ latex: '\\sigma',
314
+ mathml: '<mi>σ</mi>'
315
+ },
316
+ {
317
+ label: 'φ',
318
+ latex: '\\varphi',
319
+ mathml: '<mi>φ</mi>'
320
+ },
321
+ {
322
+ label: 'ω',
323
+ latex: '\\omega',
324
+ mathml: '<mi>ω</mi>'
325
+ },
326
+ {
327
+ label: 'Δ',
328
+ latex: '\\Delta',
329
+ mathml: '<mi>Δ</mi>'
330
+ },
331
+ {
332
+ label: 'Ω',
333
+ latex: '\\Omega',
334
+ mathml: '<mi>Ω</mi>'
335
+ },
336
+ {
337
+ label: 'ħ',
338
+ latex: '\\hbar',
339
+ mathml: '<mi>ℏ</mi>'
340
+ },
341
+ {
342
+ label: '[ ]',
343
+ latex: '\\begin{bmatrix} a & b \\\\ c & d \\end{bmatrix}',
344
+ mathml: '<mrow><mo>[</mo><mtable><mtr><mtd><mi>a</mi></mtd><mtd><mi>b</mi></mtd></mtr><mtr><mtd><mi>c</mi></mtd><mtd><mi>d</mi></mtd></mtr></mtable><mo>]</mo></mrow>'
345
+ }
346
+ ],
347
+ templates: [
348
+ {
349
+ title: 'Quadratic formula',
350
+ latex: 'x = \\frac{-b \\pm \\sqrt{b^2 - 4ac}}{2a}',
351
+ mathml: '<mi>x</mi><mo>=</mo><mfrac><mrow><mo>−</mo><mi>b</mi><mo>±</mo><msqrt><msup><mi>b</mi><mn>2</mn></msup><mo>−</mo><mn>4</mn><mi>a</mi><mi>c</mi></msqrt></mrow><mrow><mn>2</mn><mi>a</mi></mrow></mfrac>'
352
+ },
353
+ {
354
+ title: 'Pythagorean theorem',
355
+ latex: 'a^2 + b^2 = c^2',
356
+ mathml: '<msup><mi>a</mi><mn>2</mn></msup><mo>+</mo><msup><mi>b</mi><mn>2</mn></msup><mo>=</mo><msup><mi>c</mi><mn>2</mn></msup>'
357
+ },
358
+ {
359
+ title: "Euler's identity",
360
+ latex: 'e^{i\\pi} + 1 = 0',
361
+ mathml: '<msup><mi>e</mi><mrow><mi>i</mi><mi>π</mi></mrow></msup><mo>+</mo><mn>1</mn><mo>=</mo><mn>0</mn>'
362
+ },
363
+ {
364
+ title: 'Mass–energy equivalence',
365
+ latex: 'E = mc^2',
366
+ mathml: '<mi>E</mi><mo>=</mo><mi>m</mi><msup><mi>c</mi><mn>2</mn></msup>'
367
+ },
368
+ {
369
+ title: 'Derivative',
370
+ latex: "f'(x) = \\lim_{h \\to 0} \\frac{f(x+h) - f(x)}{h}",
371
+ mathml: '<msup><mi>f</mi><mo>′</mo></msup><mo>(</mo><mi>x</mi><mo>)</mo><mo>=</mo><munder><mo>lim</mo><mrow><mi>h</mi><mo>→</mo><mn>0</mn></mrow></munder><mfrac><mrow><mi>f</mi><mo>(</mo><mi>x</mi><mo>+</mo><mi>h</mi><mo>)</mo><mo>−</mo><mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo></mrow><mi>h</mi></mfrac>'
372
+ },
373
+ {
374
+ title: 'Gaussian integral',
375
+ latex: '\\int_{-\\infty}^{\\infty} e^{-x^2}\\,dx = \\sqrt{\\pi}',
376
+ mathml: '<msubsup><mo>∫</mo><mrow><mo>−</mo><mi>∞</mi></mrow><mi>∞</mi></msubsup><msup><mi>e</mi><mrow><mo>−</mo><msup><mi>x</mi><mn>2</mn></msup></mrow></msup><mi>d</mi><mi>x</mi><mo>=</mo><msqrt><mi>π</mi></msqrt>'
377
+ },
378
+ {
379
+ title: 'Sum of the first n integers',
380
+ latex: '\\sum_{k=1}^{n} k = \\frac{n(n+1)}{2}',
381
+ mathml: '<munderover><mo>∑</mo><mrow><mi>k</mi><mo>=</mo><mn>1</mn></mrow><mi>n</mi></munderover><mi>k</mi><mo>=</mo><mfrac><mrow><mi>n</mi><mo>(</mo><mi>n</mi><mo>+</mo><mn>1</mn><mo>)</mo></mrow><mn>2</mn></mfrac>'
382
+ },
383
+ {
384
+ title: 'Binomial theorem',
385
+ latex: '(a+b)^n = \\sum_{k=0}^{n} \\binom{n}{k} a^{n-k} b^{k}',
386
+ mathml: '<msup><mrow><mo>(</mo><mi>a</mi><mo>+</mo><mi>b</mi><mo>)</mo></mrow><mi>n</mi></msup><mo>=</mo><munderover><mo>∑</mo><mrow><mi>k</mi><mo>=</mo><mn>0</mn></mrow><mi>n</mi></munderover><mrow><mo>(</mo><mfrac linethickness="0"><mi>n</mi><mi>k</mi></mfrac><mo>)</mo></mrow><msup><mi>a</mi><mrow><mi>n</mi><mo>−</mo><mi>k</mi></mrow></msup><msup><mi>b</mi><mi>k</mi></msup>'
387
+ },
388
+ {
389
+ title: 'Normal distribution',
390
+ latex: 'f(x) = \\frac{1}{\\sigma\\sqrt{2\\pi}} e^{-\\frac{(x-\\mu)^2}{2\\sigma^2}}',
391
+ mathml: '<mi>f</mi><mo>(</mo><mi>x</mi><mo>)</mo><mo>=</mo><mfrac><mn>1</mn><mrow><mi>σ</mi><msqrt><mn>2</mn><mi>π</mi></msqrt></mrow></mfrac><msup><mi>e</mi><mrow><mo>−</mo><mfrac><msup><mrow><mo>(</mo><mi>x</mi><mo>−</mo><mi>μ</mi><mo>)</mo></mrow><mn>2</mn></msup><mrow><mn>2</mn><msup><mi>σ</mi><mn>2</mn></msup></mrow></mfrac></mrow></msup>'
392
+ },
393
+ {
394
+ title: 'Matrix 2×2',
395
+ latex: '\\begin{pmatrix} a & b \\\\ c & d \\end{pmatrix}',
396
+ mathml: '<mrow><mo>(</mo><mtable><mtr><mtd><mi>a</mi></mtd><mtd><mi>b</mi></mtd></mtr><mtr><mtd><mi>c</mi></mtd><mtd><mi>d</mi></mtd></mtr></mtable><mo>)</mo></mrow>'
397
+ }
398
+ ],
399
+ popup: [
400
+ 'mathEdit',
401
+ 'mathRemove'
402
+ ],
403
+ dialog: {
404
+ width: 620,
405
+ height: 700
406
+ }
407
+ };
408
+ jodit_esm_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.math = {
409
+ tooltip: 'Insert equation',
410
+ icon: 'math',
411
+ list: {
412
+ block: 'Block equation',
413
+ inline: 'Inline equation'
414
+ },
415
+ childTemplate: function childTemplate(editor, key, value) {
416
+ return '<span class="jodit-math-list-item">'.concat(jodit_esm_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__.Icon.get(key === 'block' ? 'math-block' : 'math-inline'), "<span>").concat(editor.i18n(value), "</span></span>");
417
+ },
418
+ isActive: function isActive(editor) {
419
+ return Boolean(editor.e.fire('isMathEditorOpened'));
420
+ },
421
+ exec: function exec(editor) {
422
+ editor.e.fire('openMathEditor');
423
+ },
424
+ childExec: function childExec(editor, target, param) {
425
+ var control = param.control;
426
+ var _control_args;
427
+ var display = String(((_control_args = control.args) === null || _control_args === void 0 ? void 0 : _control_args[0]) || 'block');
428
+ editor.e.fire('openMathEditor', null, display);
429
+ }
430
+ };
431
+ jodit_esm_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.mathEdit = {
432
+ tooltip: 'Edit equation',
433
+ icon: 'pencil',
434
+ exec: function exec(editor, target) {
435
+ editor.e.fire('openMathEditor', target);
436
+ }
437
+ };
438
+ jodit_esm_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.controls.mathRemove = {
439
+ tooltip: 'Delete equation',
440
+ icon: 'bin',
441
+ exec: function exec(editor, target) {
442
+ editor.e.fire('removeMath', target);
443
+ }
444
+ };
445
+ // Block formulas are figures so the core resizer can resize them.
446
+ jodit_esm_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.allowResizeTags = new Set((0,_swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_0__._)(jodit_esm_config__WEBPACK_IMPORTED_MODULE_4__.Config.prototype.allowResizeTags).concat([
447
+ 'figure'
448
+ ]));
449
+ jodit_esm_core_ui_icon__WEBPACK_IMPORTED_MODULE_5__.Icon.set('math', (_assets_math_svg__WEBPACK_IMPORTED_MODULE_1___default())).set('math-block', (_assets_math_block_svg__WEBPACK_IMPORTED_MODULE_2___default())).set('math-inline', (_assets_math_inline_svg__WEBPACK_IMPORTED_MODULE_3___default()));
450
+
451
+
452
+ /***/ }),
453
+
454
+ /***/ 84853:
455
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
456
+
457
+ "use strict";
458
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
459
+ /* harmony export */ FORMAT_TITLES: function() { return /* binding */ FORMAT_TITLES; },
460
+ /* harmony export */ MATH_ATTR: function() { return /* binding */ MATH_ATTR; },
461
+ /* harmony export */ applyMathData: function() { return /* binding */ applyMathData; },
462
+ /* harmony export */ createMath: function() { return /* binding */ createMath; },
463
+ /* harmony export */ decorateMath: function() { return /* binding */ decorateMath; },
464
+ /* harmony export */ defaultMathData: function() { return /* binding */ defaultMathData; },
465
+ /* harmony export */ findMath: function() { return /* binding */ findMath; },
466
+ /* harmony export */ isMathDisplay: function() { return /* binding */ isMathDisplay; },
467
+ /* harmony export */ isMathElement: function() { return /* binding */ isMathElement; },
468
+ /* harmony export */ mathStyle: function() { return /* binding */ mathStyle; },
469
+ /* harmony export */ mathTag: function() { return /* binding */ mathTag; },
470
+ /* harmony export */ pixels: function() { return /* binding */ pixels; },
471
+ /* harmony export */ readMathData: function() { return /* binding */ readMathData; },
472
+ /* harmony export */ wrapMathML: function() { return /* binding */ wrapMathML; }
473
+ /* harmony export */ });
474
+ /* unused harmony exports MATHML_NS, isMathFormat, isMathAlign, normalizeMathData */
475
+ /* harmony import */ var jodit_esm_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2748);
476
+ /* harmony import */ var jodit_esm_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(70799);
477
+ /* harmony import */ var jodit_esm_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(29960);
478
+ /*!
479
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
480
+ * See LICENSE.md in the project root for license information.
481
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
482
+ */
483
+
484
+
485
+ var MATH_ATTR = 'data-jodit-math';
486
+ var MATHML_NS = 'http://www.w3.org/1998/Math/MathML';
487
+ var FORMAT_TITLES = {
488
+ latex: 'LaTeX',
489
+ mathml: 'MathML'
490
+ };
491
+ function isMathFormat(value) {
492
+ return value === 'latex' || value === 'mathml';
493
+ }
494
+ function isMathDisplay(value) {
495
+ return value === 'block' || value === 'inline';
496
+ }
497
+ function isMathAlign(value) {
498
+ return value === 'left' || value === 'center' || value === 'right';
499
+ }
500
+ function normalizeMathData(raw, defaults) {
501
+ return {
502
+ format: isMathFormat(raw.format) ? raw.format : defaults.format,
503
+ display: isMathDisplay(raw.display) ? raw.display : defaults.display,
504
+ source: (0,jodit_esm_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_1__.isString)(raw.source) ? raw.source : defaults.source,
505
+ background: (0,jodit_esm_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_1__.isString)(raw.background) ? raw.background : defaults.background,
506
+ textColor: (0,jodit_esm_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_1__.isString)(raw.textColor) ? raw.textColor : defaults.textColor,
507
+ borderColor: (0,jodit_esm_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_1__.isString)(raw.borderColor) ? raw.borderColor : defaults.borderColor,
508
+ align: isMathAlign(raw.align) ? raw.align : defaults.align,
509
+ wrap: typeof raw.wrap === 'boolean' ? raw.wrap : defaults.wrap,
510
+ width: Number(raw.width) > 0 ? Math.round(Number(raw.width)) : undefined
511
+ };
512
+ }
513
+ function defaultMathData(jodit, display) {
514
+ var math = jodit.o.math;
515
+ return {
516
+ format: math.defaultFormat,
517
+ display: display !== null && display !== void 0 ? display : math.defaultDisplay,
518
+ source: '',
519
+ background: math.defaultBackground,
520
+ textColor: math.defaultTextColor,
521
+ borderColor: math.defaultBorderColor,
522
+ align: math.defaultAlign,
523
+ wrap: math.defaultWrap
524
+ };
525
+ }
526
+ /**
527
+ * Inline style of the formula element: colors and alignment live on the
528
+ * element itself so they survive outside the editor. The SVG uses
529
+ * `currentColor`, so `color` paints the formula.
530
+ */ function mathStyle(data) {
531
+ var rules = [];
532
+ var boxed = Boolean(data.background || data.borderColor);
533
+ if (data.display === 'block') {
534
+ var align = data.align || 'center';
535
+ rules.push('display: block', data.width ? "width: ".concat(data.width, "px") : 'width: fit-content', 'max-width: 100%', 'text-align: center');
536
+ // With wrapping on, a left or right formula floats and the text flows
537
+ // around it, as with images; otherwise it is a block at that edge.
538
+ if (align !== 'center' && data.wrap) {
539
+ rules.push("float: ".concat(align), align === 'left' ? 'margin: 0.5em 1.5em 0.5em 0' : 'margin: 0.5em 0 0.5em 1.5em');
540
+ } else {
541
+ var margins = {
542
+ left: '1em auto 1em 0',
543
+ center: '1em auto',
544
+ right: '1em 0 1em auto'
545
+ };
546
+ rules.push("margin: ".concat(margins[align]));
547
+ }
548
+ } else if (boxed) {
549
+ rules.push('display: inline-block');
550
+ }
551
+ if (data.background) {
552
+ rules.push("background: ".concat(data.background));
553
+ }
554
+ if (data.textColor) {
555
+ rules.push("color: ".concat(data.textColor));
556
+ }
557
+ if (data.borderColor) {
558
+ rules.push("border: 1px solid ".concat(data.borderColor));
559
+ }
560
+ if (boxed) {
561
+ rules.push(data.display === 'block' ? 'padding: 12px 16px' : 'padding: 2px 6px', 'border-radius: 6px');
562
+ }
563
+ return rules.join('; ');
564
+ }
565
+ /**
566
+ * MathJax expects a `<math>` root; bare MathML children are wrapped into one.
567
+ */ function wrapMathML(source, display) {
568
+ var trimmed = source.trim();
569
+ if (/^<math[\s>]/i.test(trimmed)) {
570
+ return trimmed;
571
+ }
572
+ return '<math xmlns="'.concat(MATHML_NS, '" display="').concat(display, '">').concat(trimmed, "</math>");
573
+ }
574
+ function isMathElement(node, className) {
575
+ return jodit_esm_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isHTMLElement(node) && (node.hasAttribute(MATH_ATTR) || node.classList.contains(className));
576
+ }
577
+ function findMath(jodit, node) {
578
+ return jodit_esm_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.closest(node, function(n) {
579
+ return isMathElement(n, jodit.o.math.className);
580
+ }, jodit.editor);
581
+ }
582
+ function readMathData(jodit, element) {
583
+ var json = (0,jodit_esm_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__.attr)(element, MATH_ATTR);
584
+ if (!json) {
585
+ return null;
586
+ }
587
+ try {
588
+ return normalizeMathData(JSON.parse(json), defaultMathData(jodit));
589
+ } catch (unused) {
590
+ return null;
591
+ }
592
+ }
593
+ function decorateMath(jodit, element) {
594
+ var className = jodit.o.math.className;
595
+ var block = !jodit_esm_core_dom_dom__WEBPACK_IMPORTED_MODULE_0__.Dom.isTag(element, 'span');
596
+ (0,jodit_esm_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__.attr)(element, {
597
+ class: block ? "".concat(className, " ").concat(className, "_block") : className,
598
+ contenteditable: false
599
+ });
600
+ }
601
+ function applyMathData(jodit, element, data, svg) {
602
+ decorateMath(jodit, element);
603
+ (0,jodit_esm_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__.attr)(element, MATH_ATTR, JSON.stringify(data));
604
+ (0,jodit_esm_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__.attr)(element, 'style', mathStyle(data) || null);
605
+ element.innerHTML = svg;
606
+ // A resized block formula fills its figure; the SVG keeps its ratio
607
+ // because only the width is set and the viewBox provides the height.
608
+ var root = element.querySelector('svg');
609
+ if (root && data.display === 'block' && data.width) {
610
+ (0,jodit_esm_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__.attr)(root, {
611
+ width: '100%',
612
+ height: null
613
+ });
614
+ root.style.verticalAlign = '';
615
+ }
616
+ }
617
+ function pixels(value) {
618
+ return /^\d+(\.\d+)?px$/.test(value) ? Math.round(parseFloat(value)) : 0;
619
+ }
620
+ function mathTag(display) {
621
+ return display === 'block' ? 'figure' : 'span';
622
+ }
623
+ function createMath(jodit, data, svg) {
624
+ var element = jodit.createInside.element(mathTag(data.display));
625
+ applyMathData(jodit, element, data, svg);
626
+ return element;
627
+ }
628
+
629
+
630
+ /***/ }),
631
+
632
+ /***/ 90484:
633
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
634
+
635
+ "use strict";
636
+ __webpack_require__.r(__webpack_exports__);
637
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
638
+ /* harmony export */ MathPlugin: function() { return /* binding */ MathPlugin; }
639
+ /* harmony export */ });
640
+ /* harmony import */ var _swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80294);
641
+ /* harmony import */ var _swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20616);
642
+ /* harmony import */ var _swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(67709);
643
+ /* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(82749);
644
+ /* harmony import */ var _swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(18766);
645
+ /* harmony import */ var _swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(56075);
646
+ /* harmony import */ var _swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(11886);
647
+ /* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(31635);
648
+ /* harmony import */ var _swc_helpers_wrap_native_super__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(23078);
649
+ /* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(65664);
650
+ /* harmony import */ var _ui_editor_editor__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(69428);
651
+ /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(84853);
652
+ /* harmony import */ var _mathjax__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(17517);
653
+ /* harmony import */ var jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(65478);
654
+ /* harmony import */ var jodit_esm_core_dom_dom__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(2748);
655
+ /* harmony import */ var jodit_esm_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(4510);
656
+ /* harmony import */ var jodit_esm_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(70799);
657
+ /* harmony import */ var jodit_esm_core_helpers_size_position__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(5700);
658
+ /* harmony import */ var jodit_esm_core_plugin__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(50911);
659
+ /* harmony import */ var jodit_esm_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(10830);
660
+ /* harmony import */ var jodit_esm_core_ui_popup_popup__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(56917);
661
+ /* harmony import */ var jodit_esm_modules_dialog_dialog__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(78584);
662
+ /* harmony import */ var jodit_esm_modules_toolbar_factory__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(21491);
663
+ /* harmony import */ var jodit_pro_jodit_pro__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(2692);
664
+ /*!
665
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
666
+ * See LICENSE.md in the project root for license information.
667
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
668
+ */
669
+
670
+
671
+
672
+
673
+
674
+
675
+
676
+
677
+
678
+
679
+
680
+
681
+
682
+
683
+
684
+
685
+
686
+
687
+
688
+
689
+
690
+
691
+
692
+
693
+ /**
694
+ * Inserts LaTeX / MathML formulas rendered by MathJax as standalone SVG,
695
+ * either as a block or inline, and lets the user edit or remove them.
696
+ */ var MathPlugin = /*#__PURE__*/ function(Plugin) {
697
+ "use strict";
698
+ (0,_swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__._)(MathPlugin, Plugin);
699
+ function MathPlugin() {
700
+ (0,_swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_1__._)(this, MathPlugin);
701
+ var _this;
702
+ _this = (0,_swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__._)(this, MathPlugin, arguments), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "buttons", [
703
+ {
704
+ name: 'math',
705
+ group: 'insert'
706
+ }
707
+ ]), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__dialog", null), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__editor", null), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__saveButton", null), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__popup", null), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__toolbar", null), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "__target", null);
708
+ return _this;
709
+ }
710
+ ;(0,_swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__._)(MathPlugin, [
711
+ {
712
+ key: "afterInit",
713
+ value: function afterInit(jodit) {
714
+ var _this = this;
715
+ jodit.e.on('openMathEditor', this.openEditor).on('removeMath', this.removeMath).on('isMathEditorOpened', function() {
716
+ var _this___dialog;
717
+ return Boolean((_this___dialog = _this.__dialog) === null || _this___dialog === void 0 ? void 0 : _this___dialog.isOpened);
718
+ });
719
+ jodit.registerCommand('insertMath', function(_c, _v, display) {
720
+ _this.openEditor(null, display);
721
+ return false;
722
+ });
723
+ this.__decorateAll();
724
+ }
725
+ },
726
+ {
727
+ key: "beforeDestruct",
728
+ value: function beforeDestruct() {
729
+ var _this___popup, _this___dialog;
730
+ this.closePopup();
731
+ (_this___popup = this.__popup) === null || _this___popup === void 0 ? void 0 : _this___popup.destruct();
732
+ (_this___dialog = this.__dialog) === null || _this___dialog === void 0 ? void 0 : _this___dialog.destruct();
733
+ }
734
+ },
735
+ {
736
+ key: "openEditor",
737
+ value: /**
738
+ * Opens the editor dialog for a new formula or for an existing one.
739
+ */ function openEditor(target, display) {
740
+ var _this = this;
741
+ var element = (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.findMath)(this.j, target !== null && target !== void 0 ? target : null);
742
+ var data = element && (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.readMathData)(this.j, element) || (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.defaultMathData)(this.j, (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.isMathDisplay)(display) ? display : undefined);
743
+ this.closePopup();
744
+ this.j.s.save();
745
+ // Start fetching MathJax now so the first preview does not wait for
746
+ // the CDN once the user begins typing.
747
+ (0,_mathjax__WEBPACK_IMPORTED_MODULE_12__.loadMathJax)(this.j).catch(function() {
748
+ return null;
749
+ });
750
+ var dialog = this.__getDialog();
751
+ var editor = this.__editor;
752
+ if (!editor) {
753
+ return;
754
+ }
755
+ editor.setData(data);
756
+ var save = (0,jodit_esm_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_19__.Button)(dialog, 'ok', 'Save', 'primary').onAction(function() {
757
+ return _this.__submit(element);
758
+ });
759
+ this.__saveButton = save;
760
+ save.setState({
761
+ disabled: !data.source
762
+ });
763
+ var left = [
764
+ (0,jodit_esm_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_19__.Button)(dialog, 'cancel', 'Cancel', 'default').onAction(function() {
765
+ return dialog.close();
766
+ })
767
+ ];
768
+ if (element) {
769
+ left.unshift((0,jodit_esm_core_ui_button_button_button__WEBPACK_IMPORTED_MODULE_19__.Button)(dialog, 'bin', '', 'default').onAction(function() {
770
+ dialog.close();
771
+ _this.removeMath(element);
772
+ }));
773
+ }
774
+ dialog.setHeader(this.j.i18n(element ? 'Edit equation' : 'Insert equation')).setFooter([
775
+ left,
776
+ save
777
+ ]).open();
778
+ editor.focus();
779
+ }
780
+ },
781
+ {
782
+ key: "removeMath",
783
+ value: /**
784
+ * Removes the formula that owns the given node.
785
+ */ function removeMath(target) {
786
+ var element = (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.findMath)(this.j, target !== null && target !== void 0 ? target : this.__target);
787
+ this.closePopup();
788
+ if (element) {
789
+ this.j.s.setCursorAfter(element);
790
+ jodit_esm_core_dom_dom__WEBPACK_IMPORTED_MODULE_14__.Dom.safeRemove(element);
791
+ this.j.synchronizeValues();
792
+ }
793
+ }
794
+ },
795
+ {
796
+ key: "__submit",
797
+ value: function __submit(element) {
798
+ var _this = this;
799
+ var editor = this.__editor;
800
+ var dialog = this.__dialog;
801
+ if (!editor || !dialog) {
802
+ return;
803
+ }
804
+ var data = editor.getData();
805
+ if (!data.source) {
806
+ return;
807
+ }
808
+ ;(0,_mathjax__WEBPACK_IMPORTED_MODULE_12__.renderMath)(this.j, data).then(function(result) {
809
+ if (result.error) {
810
+ throw new Error(result.error);
811
+ }
812
+ dialog.close();
813
+ _this.__save(element, data, result.svg);
814
+ }).catch(function(e) {
815
+ _this.j.message.error(e.message);
816
+ });
817
+ }
818
+ },
819
+ {
820
+ key: "__save",
821
+ value: function __save(element, data, svg) {
822
+ if (element && !jodit_esm_core_dom_dom__WEBPACK_IMPORTED_MODULE_14__.Dom.isTag(element, (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.mathTag)(data.display))) {
823
+ element = jodit_esm_core_dom_dom__WEBPACK_IMPORTED_MODULE_14__.Dom.replace(element, (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.mathTag)(data.display), this.j.createInside);
824
+ }
825
+ if (element) {
826
+ (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.applyMathData)(this.j, element, data, svg);
827
+ } else {
828
+ element = (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.createMath)(this.j, data, svg);
829
+ this.j.s.restore();
830
+ this.__insert(element, data.display);
831
+ }
832
+ this.j.s.setCursorAfter(element);
833
+ this.j.synchronizeValues();
834
+ }
835
+ },
836
+ {
837
+ key: "__insert",
838
+ value: /**
839
+ * A block formula must not stay inside a paragraph, an inline one is
840
+ * inserted at the caret.
841
+ */ function __insert(element, display) {
842
+ this.j.s.insertNode(element, false, false);
843
+ if (display !== 'block') {
844
+ return;
845
+ }
846
+ var parent = element.parentElement;
847
+ while(parent && parent !== this.j.editor){
848
+ jodit_esm_core_dom_dom__WEBPACK_IMPORTED_MODULE_14__.Dom.after(parent, element);
849
+ if (jodit_esm_core_dom_dom__WEBPACK_IMPORTED_MODULE_14__.Dom.isBlock(parent)) {
850
+ if (jodit_esm_core_dom_dom__WEBPACK_IMPORTED_MODULE_14__.Dom.isEmpty(parent)) {
851
+ jodit_esm_core_dom_dom__WEBPACK_IMPORTED_MODULE_14__.Dom.safeRemove(parent);
852
+ }
853
+ break;
854
+ }
855
+ parent = element.parentElement;
856
+ }
857
+ }
858
+ },
859
+ {
860
+ key: "__getDialog",
861
+ value: function __getDialog() {
862
+ var _this = this;
863
+ if (!this.__dialog) {
864
+ var dialog = this.j.o.math.dialog;
865
+ this.__dialog = new jodit_esm_modules_dialog_dialog__WEBPACK_IMPORTED_MODULE_21__.Dialog({
866
+ language: this.j.o.language,
867
+ theme: this.j.o.theme,
868
+ shadowRoot: this.j.o.shadowRoot,
869
+ events: this.j.o.events
870
+ });
871
+ this.__editor = new _ui_editor_editor__WEBPACK_IMPORTED_MODULE_10__.UIMathEditor(this.j, {
872
+ onSubmit: function onSubmit() {
873
+ var _this___saveButton;
874
+ (_this___saveButton = _this.__saveButton) === null || _this___saveButton === void 0 ? void 0 : _this___saveButton.container.click();
875
+ },
876
+ onChange: function onChange(data) {
877
+ var _this___saveButton;
878
+ (_this___saveButton = _this.__saveButton) === null || _this___saveButton === void 0 ? void 0 : _this___saveButton.setState({
879
+ disabled: !data.source
880
+ });
881
+ }
882
+ });
883
+ this.__dialog.setContent(this.__editor).setSize(dialog.width, dialog.height);
884
+ this.__dialog.e.on('beforeClose', function() {
885
+ _this.j.s.restore();
886
+ });
887
+ }
888
+ return this.__dialog;
889
+ }
890
+ },
891
+ {
892
+ key: "onClick",
893
+ value: function onClick(e) {
894
+ var element = (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.findMath)(this.j, e.target);
895
+ if (element) {
896
+ this.openPopup(element);
897
+ } else {
898
+ this.closePopup();
899
+ }
900
+ }
901
+ },
902
+ {
903
+ key: "onDblClick",
904
+ value: function onDblClick(e) {
905
+ var element = (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.findMath)(this.j, e.target);
906
+ if (element) {
907
+ this.openEditor(element);
908
+ }
909
+ }
910
+ },
911
+ {
912
+ key: "onOutsideClick",
913
+ value: function onOutsideClick() {
914
+ this.closePopup();
915
+ }
916
+ },
917
+ {
918
+ /**
919
+ * Shows the contextual popup (edit / delete) at the formula.
920
+ */ key: "openPopup",
921
+ value: function openPopup(element) {
922
+ var _this = this;
923
+ if (this.j.o.readonly || !this.j.o.math.popup.length) {
924
+ return;
925
+ }
926
+ if (!this.__popup) {
927
+ this.__popup = new jodit_esm_core_ui_popup_popup__WEBPACK_IMPORTED_MODULE_20__.Popup(this.j, false);
928
+ this.__toolbar = (0,jodit_esm_modules_toolbar_factory__WEBPACK_IMPORTED_MODULE_22__.makeCollection)(this.j, this.__popup);
929
+ }
930
+ var popup = this.__popup;
931
+ var toolbar = this.__toolbar;
932
+ if (!toolbar) {
933
+ return;
934
+ }
935
+ this.__target = element;
936
+ toolbar.build(this.j.o.math.popup, element);
937
+ popup.setContent(toolbar.container);
938
+ if (popup.isOpened) {
939
+ popup.updatePosition();
940
+ } else {
941
+ popup.open(function() {
942
+ return (0,jodit_esm_core_helpers_size_position__WEBPACK_IMPORTED_MODULE_17__.position)(element, _this.j);
943
+ });
944
+ }
945
+ }
946
+ },
947
+ {
948
+ key: "closePopup",
949
+ value: function closePopup() {
950
+ var _this___popup;
951
+ this.__target = null;
952
+ (_this___popup = this.__popup) === null || _this___popup === void 0 ? void 0 : _this___popup.close();
953
+ }
954
+ },
955
+ {
956
+ key: "onBeforeSetValue",
957
+ value: /**
958
+ * An inline formula that carries data but no SVG is an empty `<span>`,
959
+ * which the core cleaner drops before MathJax can fill it. The source is
960
+ * written into such elements as a placeholder; the render replaces it.
961
+ */ function onBeforeSetValue(value) {
962
+ var _this = this;
963
+ if (!(0,jodit_esm_core_helpers_checker_is_string__WEBPACK_IMPORTED_MODULE_16__.isString)(value) || !value.includes(_helpers__WEBPACK_IMPORTED_MODULE_11__.MATH_ATTR)) {
964
+ return;
965
+ }
966
+ var box = this.j.c.div();
967
+ box.innerHTML = value;
968
+ var changed = false;
969
+ (0,jodit_esm_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_15__.toArray)(box.querySelectorAll("[".concat(_helpers__WEBPACK_IMPORTED_MODULE_11__.MATH_ATTR, "]"))).forEach(function(element) {
970
+ var data = (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.readMathData)(_this.j, element);
971
+ if (data && !element.querySelector('svg') && !element.textContent) {
972
+ element.textContent = data.source;
973
+ changed = true;
974
+ }
975
+ });
976
+ return changed ? box.innerHTML : undefined;
977
+ }
978
+ },
979
+ {
980
+ key: "onChange",
981
+ value: /**
982
+ * Decorates formulas that arrived with the value and renders the ones
983
+ * that carry data but no SVG yet.
984
+ */ function onChange() {
985
+ this.__decorateAll();
986
+ if (this.__target && !this.j.editor.contains(this.__target)) {
987
+ this.closePopup();
988
+ }
989
+ }
990
+ },
991
+ {
992
+ key: "__decorateAll",
993
+ value: function __decorateAll() {
994
+ var _this = this;
995
+ var changed = false;
996
+ (0,jodit_esm_core_helpers_array_to_array__WEBPACK_IMPORTED_MODULE_15__.toArray)(this.j.editor.querySelectorAll("[".concat(_helpers__WEBPACK_IMPORTED_MODULE_11__.MATH_ATTR, "]"))).forEach(function(element) {
997
+ if (!(0,_helpers__WEBPACK_IMPORTED_MODULE_11__.isMathElement)(element, _this.j.o.math.className)) {
998
+ return;
999
+ }
1000
+ ;(0,_helpers__WEBPACK_IMPORTED_MODULE_11__.decorateMath)(_this.j, element);
1001
+ if (!element.querySelector('svg')) {
1002
+ _this.__renderMissing(element);
1003
+ } else {
1004
+ changed = _this.__syncResized(element) || changed;
1005
+ }
1006
+ });
1007
+ if (changed) {
1008
+ this.j.synchronizeValues();
1009
+ }
1010
+ }
1011
+ },
1012
+ {
1013
+ key: "__syncResized",
1014
+ value: /**
1015
+ * The core resizer sets a pixel box on the figure; the width goes into
1016
+ * the data and the explicit height is dropped so the SVG keeps its ratio.
1017
+ */ function __syncResized(element) {
1018
+ var data = (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.readMathData)(this.j, element);
1019
+ if (!data || data.display !== 'block') {
1020
+ return false;
1021
+ }
1022
+ var width = (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.pixels)(element.style.width);
1023
+ var height = (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.pixels)(element.style.height);
1024
+ if ((!width || width === data.width) && !height) {
1025
+ return false;
1026
+ }
1027
+ var svg = element.querySelector('svg');
1028
+ if (!svg) {
1029
+ return false;
1030
+ }
1031
+ ;(0,_helpers__WEBPACK_IMPORTED_MODULE_11__.applyMathData)(this.j, element, (0,_swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_6__._)((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_5__._)({}, data), {
1032
+ width: width || data.width
1033
+ }), svg.outerHTML);
1034
+ return true;
1035
+ }
1036
+ },
1037
+ {
1038
+ key: "__renderMissing",
1039
+ value: function __renderMissing(element) {
1040
+ var _this = this;
1041
+ var data = (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.readMathData)(this.j, element);
1042
+ if (!data || !data.source) {
1043
+ return;
1044
+ }
1045
+ ;(0,_mathjax__WEBPACK_IMPORTED_MODULE_12__.renderMath)(this.j, data).then(function(result) {
1046
+ if (_this.j.editor.contains(element)) {
1047
+ (0,_helpers__WEBPACK_IMPORTED_MODULE_11__.applyMathData)(_this.j, element, data, result.svg);
1048
+ _this.j.synchronizeValues();
1049
+ }
1050
+ }).catch(function() {
1051
+ return null;
1052
+ });
1053
+ }
1054
+ }
1055
+ ]);
1056
+ return MathPlugin;
1057
+ }((0,_swc_helpers_wrap_native_super__WEBPACK_IMPORTED_MODULE_8__._)(jodit_esm_core_plugin__WEBPACK_IMPORTED_MODULE_18__.Plugin));
1058
+ (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(MathPlugin, "requires", [
1059
+ 'license'
1060
+ ]);
1061
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
1062
+ jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_13__.autobind
1063
+ ], MathPlugin.prototype, "openEditor", null);
1064
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
1065
+ jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_13__.autobind
1066
+ ], MathPlugin.prototype, "removeMath", null);
1067
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
1068
+ (0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_13__.watch)(':click')
1069
+ ], MathPlugin.prototype, "onClick", null);
1070
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
1071
+ (0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_13__.watch)(':dblclick')
1072
+ ], MathPlugin.prototype, "onDblClick", null);
1073
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
1074
+ (0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_13__.watch)(':outsideClick')
1075
+ ], MathPlugin.prototype, "onOutsideClick", null);
1076
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
1077
+ (0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_13__.watch)(':beforeSetValueToEditor')
1078
+ ], MathPlugin.prototype, "onBeforeSetValue", null);
1079
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_7__.__decorate)([
1080
+ (0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_13__.watch)([
1081
+ ':change',
1082
+ ':afterSetMode'
1083
+ ]),
1084
+ (0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_13__.debounce)()
1085
+ ], MathPlugin.prototype, "onChange", null);
1086
+ jodit_pro_jodit_pro__WEBPACK_IMPORTED_MODULE_23__.JoditPro.plugins.add('math', MathPlugin);
1087
+
1088
+
1089
+ /***/ }),
1090
+
1091
+ /***/ 17517:
1092
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1093
+
1094
+ "use strict";
1095
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1096
+ /* harmony export */ loadMathJax: function() { return /* binding */ loadMathJax; },
1097
+ /* harmony export */ renderMath: function() { return /* binding */ renderMath; }
1098
+ /* harmony export */ });
1099
+ /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(84853);
1100
+ /* harmony import */ var jodit_esm_core_helpers_utils_append_script__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(63799);
1101
+ /* harmony import */ var jodit_esm_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(29960);
1102
+ /*!
1103
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
1104
+ * See LICENSE.md in the project root for license information.
1105
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
1106
+ */
1107
+
1108
+
1109
+ /**
1110
+ * Resolves the MathJax instance of the owner window, loading it from
1111
+ * `math.mathJaxUrl` on first use. A MathJax that the host page already
1112
+ * loaded is reused as is.
1113
+ */ function loadMathJax(jodit) {
1114
+ var _win_MathJax;
1115
+ var win = jodit.ow;
1116
+ if ((_win_MathJax = win.MathJax) === null || _win_MathJax === void 0 ? void 0 : _win_MathJax.tex2svg) {
1117
+ return Promise.resolve(win.MathJax);
1118
+ }
1119
+ if (!win.MathJax) {
1120
+ win.MathJax = {
1121
+ svg: {
1122
+ fontCache: 'local'
1123
+ },
1124
+ startup: {
1125
+ typeset: false
1126
+ }
1127
+ };
1128
+ }
1129
+ return (0,jodit_esm_core_helpers_utils_append_script__WEBPACK_IMPORTED_MODULE_1__.appendScriptAsync)(jodit, jodit.o.math.mathJaxUrl).then(function() {
1130
+ var _win_MathJax_startup, _win_MathJax;
1131
+ return (_win_MathJax = win.MathJax) === null || _win_MathJax === void 0 ? void 0 : (_win_MathJax_startup = _win_MathJax.startup) === null || _win_MathJax_startup === void 0 ? void 0 : _win_MathJax_startup.promise;
1132
+ }).then(function() {
1133
+ var _win_MathJax;
1134
+ if (!((_win_MathJax = win.MathJax) === null || _win_MathJax === void 0 ? void 0 : _win_MathJax.tex2svg)) {
1135
+ throw new Error('MathJax did not initialize');
1136
+ }
1137
+ return win.MathJax;
1138
+ });
1139
+ }
1140
+ /**
1141
+ * Renders the formula to a standalone SVG string.
1142
+ */ function renderMath(jodit, data) {
1143
+ return loadMathJax(jodit).then(function(mathJax) {
1144
+ var _mathJax_texReset;
1145
+ var display = data.display === 'block';
1146
+ (_mathJax_texReset = mathJax.texReset) === null || _mathJax_texReset === void 0 ? void 0 : _mathJax_texReset.call(mathJax);
1147
+ var container = data.format === 'mathml' ? mathJax.mathml2svg((0,_helpers__WEBPACK_IMPORTED_MODULE_0__.wrapMathML)(data.source, data.display), {
1148
+ display: display
1149
+ }) : mathJax.tex2svg(data.source, {
1150
+ display: display
1151
+ });
1152
+ var svg = container.querySelector('svg');
1153
+ if (!svg) {
1154
+ throw new Error('MathJax did not return an SVG');
1155
+ }
1156
+ var errorNode = svg.querySelector('[data-mjx-error]');
1157
+ var error = errorNode ? (0,jodit_esm_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__.attr)(errorNode, 'data-mjx-error') || 'Syntax error' : undefined;
1158
+ (0,jodit_esm_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_2__.attr)(svg, {
1159
+ role: 'img',
1160
+ 'aria-label': data.source,
1161
+ focusable: null
1162
+ });
1163
+ return {
1164
+ svg: svg.outerHTML,
1165
+ error: error
1166
+ };
1167
+ });
1168
+ }
1169
+
1170
+
1171
+ /***/ }),
1172
+
1173
+ /***/ 69428:
1174
+ /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
1175
+
1176
+ "use strict";
1177
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1178
+ /* harmony export */ UIMathEditor: function() { return /* binding */ UIMathEditor; }
1179
+ /* harmony export */ });
1180
+ /* harmony import */ var _swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(80294);
1181
+ /* harmony import */ var _swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(20616);
1182
+ /* harmony import */ var _swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(67709);
1183
+ /* harmony import */ var _swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(82749);
1184
+ /* harmony import */ var _swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(18766);
1185
+ /* harmony import */ var _swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(56075);
1186
+ /* harmony import */ var _swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(11886);
1187
+ /* harmony import */ var _swc_helpers_sliced_to_array__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(43284);
1188
+ /* harmony import */ var _swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(94899);
1189
+ /* harmony import */ var _swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(31635);
1190
+ /* harmony import */ var _helpers__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(84853);
1191
+ /* harmony import */ var _mathjax__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(17517);
1192
+ /* harmony import */ var jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(65478);
1193
+ /* harmony import */ var jodit_esm_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(38837);
1194
+ /* harmony import */ var jodit_esm_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(29960);
1195
+ /* harmony import */ var jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(67510);
1196
+ /*!
1197
+ * Jodit Editor PRO (https://xdsoft.net/jodit/)
1198
+ * See LICENSE.md in the project root for license information.
1199
+ * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net/jodit/pro/
1200
+ */
1201
+
1202
+
1203
+
1204
+
1205
+
1206
+
1207
+
1208
+
1209
+
1210
+
1211
+
1212
+
1213
+
1214
+
1215
+
1216
+
1217
+ var FORMATS = [
1218
+ 'latex',
1219
+ 'mathml'
1220
+ ];
1221
+ var PLACEHOLDERS = {
1222
+ latex: 'e.g. x^2 + y^2 = r^2',
1223
+ mathml: 'e.g. <msup><mi>x</mi><mn>2</mn></msup>'
1224
+ };
1225
+ var UIMathEditor = /*#__PURE__*/ function(UIElement) {
1226
+ "use strict";
1227
+ (0,_swc_helpers_inherits__WEBPACK_IMPORTED_MODULE_4__._)(UIMathEditor, UIElement);
1228
+ function UIMathEditor(jodit, handlers) {
1229
+ (0,_swc_helpers_class_call_check__WEBPACK_IMPORTED_MODULE_1__._)(this, UIMathEditor);
1230
+ var _this;
1231
+ _this = (0,_swc_helpers_call_super__WEBPACK_IMPORTED_MODULE_0__._)(this, UIMathEditor, [
1232
+ jodit
1233
+ ]), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "handlers", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "state", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "tabs", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "source", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "templates", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "colorInputs", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "alignButtons", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "alignBox", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "wrapButton", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "drafts", void 0), (0,_swc_helpers_define_property__WEBPACK_IMPORTED_MODULE_3__._)(_this, "renderId", void 0), _this.handlers = handlers, _this.tabs = {}, _this.templates = null, _this.colorInputs = {}, _this.alignButtons = {}, _this.alignBox = null, _this.wrapButton = null, _this.drafts = {
1234
+ latex: '',
1235
+ mathml: ''
1236
+ }, _this.renderId = 0;
1237
+ var tabs = _this.getElm('tabs');
1238
+ (0,jodit_esm_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_13__.assert)(tabs != null, 'tabs element does not exist');
1239
+ FORMATS.forEach(function(format) {
1240
+ var button = (0,jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_15__.Button)(jodit, '', _helpers__WEBPACK_IMPORTED_MODULE_10__.FORMAT_TITLES[format]).onAction(function() {
1241
+ return _this.setFormat(format);
1242
+ });
1243
+ (0,jodit_esm_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_14__.attr)(button.container, 'data-format', format);
1244
+ _this.tabs[format] = button;
1245
+ tabs.appendChild(button.container);
1246
+ });
1247
+ var templates = _this.getElm('templates');
1248
+ (0,jodit_esm_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_13__.assert)(templates != null, 'templates element does not exist');
1249
+ if (jodit.o.math.templates.length) {
1250
+ _this.templates = new jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_15__.UISelect(jodit, {
1251
+ name: 'template',
1252
+ options: [
1253
+ {
1254
+ value: '',
1255
+ text: jodit.i18n('Templates')
1256
+ }
1257
+ ].concat((0,_swc_helpers_to_consumable_array__WEBPACK_IMPORTED_MODULE_8__._)(jodit.o.math.templates.map(function(template, index) {
1258
+ return {
1259
+ value: String(index),
1260
+ text: jodit.i18n(template.title)
1261
+ };
1262
+ }))),
1263
+ onChange: function onChange(value) {
1264
+ return _this.applyTemplate(value);
1265
+ }
1266
+ });
1267
+ templates.appendChild(_this.templates.container);
1268
+ }
1269
+ var symbols = _this.getElm('symbols');
1270
+ (0,jodit_esm_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_13__.assert)(symbols != null, 'symbols element does not exist');
1271
+ jodit.o.math.symbols.forEach(function(symbol) {
1272
+ var button = (0,jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_15__.Button)(jodit, '', symbol.label).onAction(function() {
1273
+ return _this.insertSymbol(_this.state.format === 'mathml' ? symbol.mathml : symbol.latex);
1274
+ });
1275
+ button.container.classList.add(_this.getFullElName('symbol'));
1276
+ (0,jodit_esm_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_14__.attr)(button.container, 'title', symbol.latex);
1277
+ symbols.appendChild(button.container);
1278
+ });
1279
+ _this.source = new jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_15__.UITextArea(jodit, {
1280
+ name: 'source',
1281
+ label: _helpers__WEBPACK_IMPORTED_MODULE_10__.FORMAT_TITLES.latex,
1282
+ placeholder: PLACEHOLDERS.latex,
1283
+ resizable: true,
1284
+ size: 4,
1285
+ onChange: function onChange(value) {
1286
+ _this.state.source = value;
1287
+ _this.drafts[_this.state.format] = value;
1288
+ _this.handlers.onChange(_this.getData());
1289
+ _this.refresh();
1290
+ }
1291
+ });
1292
+ jodit.e.on(_this.source.nativeInput, 'keydown', function(e) {
1293
+ if (e.key === 'Enter' && (e.ctrlKey || e.metaKey)) {
1294
+ e.preventDefault();
1295
+ _this.handlers.onSubmit();
1296
+ }
1297
+ });
1298
+ var source = _this.getElm('source');
1299
+ (0,jodit_esm_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_13__.assert)(source != null, 'source element does not exist');
1300
+ source.appendChild(_this.source.container);
1301
+ _this.buildAppearance();
1302
+ return _this;
1303
+ }
1304
+ ;(0,_swc_helpers_create_class__WEBPACK_IMPORTED_MODULE_2__._)(UIMathEditor, [
1305
+ {
1306
+ key: "className",
1307
+ value: function className() {
1308
+ return 'UIMathEditor';
1309
+ }
1310
+ },
1311
+ {
1312
+ key: "render",
1313
+ value: function render() {
1314
+ return '<div>\n <div class="&__head">\n <div class="&__tabs"></div>\n <div class="&__templates"></div>\n </div>\n <div class="&__symbols"></div>\n <div class="&__source"></div>\n <div class="&__preview-title">~Preview~</div>\n <div class="&__preview">\n <div class="&__appearance"></div>\n <div class="&__canvas">\n <span class="&__placeholder">~Your equation will render here~</span>\n </div>\n </div>\n <div class="&__error"></div>\n </div>';
1315
+ }
1316
+ },
1317
+ {
1318
+ key: "buildAppearance",
1319
+ value: /**
1320
+ * Color swatches and the alignment switch shown in the preview corner.
1321
+ */ function buildAppearance() {
1322
+ var _this = this;
1323
+ var j = this.j;
1324
+ var math = j.o.math;
1325
+ var box = this.getElm('appearance');
1326
+ (0,jodit_esm_core_helpers_utils_assert__WEBPACK_IMPORTED_MODULE_13__.assert)(box != null, 'appearance element does not exist');
1327
+ var fields = [
1328
+ [
1329
+ 'background',
1330
+ 'Background',
1331
+ math.allowChangeBackground
1332
+ ],
1333
+ [
1334
+ 'textColor',
1335
+ 'Text',
1336
+ math.allowChangeTextColor
1337
+ ],
1338
+ [
1339
+ 'borderColor',
1340
+ 'Border',
1341
+ math.allowChangeBorderColor
1342
+ ]
1343
+ ];
1344
+ fields.forEach(function(param) {
1345
+ var _param = (0,_swc_helpers_sliced_to_array__WEBPACK_IMPORTED_MODULE_7__._)(param, 3), name = _param[0], label = _param[1], allowed = _param[2];
1346
+ if (allowed) {
1347
+ box.appendChild(_this.colorField(name, label));
1348
+ }
1349
+ });
1350
+ if (math.allowChangeAlign) {
1351
+ this.alignBox = j.c.div(this.getFullElName('align'));
1352
+ [
1353
+ 'left',
1354
+ 'center',
1355
+ 'right'
1356
+ ].forEach(function(align) {
1357
+ var _this_alignBox;
1358
+ var button = (0,jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_15__.Button)(j, align, '', 'initial').onAction(function() {
1359
+ _this.state.align = align;
1360
+ _this.syncAppearance();
1361
+ _this.__render();
1362
+ });
1363
+ (0,jodit_esm_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_14__.attr)(button.container, 'data-align', align);
1364
+ _this.alignButtons[align] = button;
1365
+ (_this_alignBox = _this.alignBox) === null || _this_alignBox === void 0 ? void 0 : _this_alignBox.appendChild(button.container);
1366
+ });
1367
+ if (math.allowChangeWrap) {
1368
+ this.wrapButton = (0,jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_15__.Button)(j, '', 'Wrap text', 'initial').onAction(function() {
1369
+ _this.state.wrap = !_this.state.wrap;
1370
+ _this.syncAppearance();
1371
+ _this.__render();
1372
+ });
1373
+ (0,jodit_esm_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_14__.attr)(this.wrapButton.container, 'name', 'wrap');
1374
+ this.alignBox.appendChild(this.wrapButton.container);
1375
+ }
1376
+ box.appendChild(this.alignBox);
1377
+ }
1378
+ if (!box.childNodes.length) {
1379
+ box.remove();
1380
+ }
1381
+ }
1382
+ },
1383
+ {
1384
+ key: "colorField",
1385
+ value: function colorField(name, label) {
1386
+ var _this = this;
1387
+ var j = this.j;
1388
+ var input = j.c.element('input', {
1389
+ type: 'color',
1390
+ name: name,
1391
+ class: this.getFullElName('color-input')
1392
+ });
1393
+ j.e.on(input, 'input', function() {
1394
+ _this.state[name] = input.value;
1395
+ _this.syncAppearance();
1396
+ _this.__render();
1397
+ });
1398
+ var reset = j.c.element('button', {
1399
+ type: 'button',
1400
+ name: "".concat(name, "Reset"),
1401
+ title: j.i18n('None'),
1402
+ class: this.getFullElName('color-reset')
1403
+ });
1404
+ reset.textContent = '×';
1405
+ j.e.on(reset, 'click', function() {
1406
+ _this.state[name] = '';
1407
+ _this.syncAppearance();
1408
+ _this.__render();
1409
+ });
1410
+ this.colorInputs[name] = input;
1411
+ return j.c.element('label', {
1412
+ class: this.getFullElName('color-field')
1413
+ }, [
1414
+ input,
1415
+ j.c.span(this.getFullElName('color-label'), j.i18n(label)),
1416
+ reset
1417
+ ]);
1418
+ }
1419
+ },
1420
+ {
1421
+ key: "syncAppearance",
1422
+ value: /**
1423
+ * Mirrors the appearance part of the state into the controls.
1424
+ */ function syncAppearance() {
1425
+ var _this = this;
1426
+ Object.keys(this.colorInputs).forEach(function(name) {
1427
+ var input = _this.colorInputs[name];
1428
+ if (!input) {
1429
+ return;
1430
+ }
1431
+ var value = _this.state[name] || '';
1432
+ input.classList.toggle(_this.getFullElName('color-input', 'empty'), !value);
1433
+ if (value) {
1434
+ input.value = value;
1435
+ }
1436
+ });
1437
+ Object.keys(this.alignButtons).forEach(function(align) {
1438
+ var _this_alignButtons_align;
1439
+ (_this_alignButtons_align = _this.alignButtons[align]) === null || _this_alignButtons_align === void 0 ? void 0 : _this_alignButtons_align.setState({
1440
+ variant: _this.state.align === align ? 'primary' : 'initial'
1441
+ });
1442
+ });
1443
+ if (this.alignBox) {
1444
+ this.alignBox.style.display = this.state.display === 'block' ? '' : 'none';
1445
+ }
1446
+ if (this.wrapButton) {
1447
+ var floating = this.state.align !== 'center';
1448
+ this.wrapButton.container.style.display = floating ? '' : 'none';
1449
+ this.wrapButton.setState({
1450
+ variant: this.state.wrap && floating ? 'primary' : 'initial'
1451
+ });
1452
+ }
1453
+ }
1454
+ },
1455
+ {
1456
+ /**
1457
+ * Loads a copy of the data into the form and renders the preview.
1458
+ */ key: "setData",
1459
+ value: function setData(data) {
1460
+ this.state = (0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_5__._)({}, data);
1461
+ this.drafts = {
1462
+ latex: '',
1463
+ mathml: ''
1464
+ };
1465
+ this.drafts[data.format] = data.source;
1466
+ this.syncAppearance();
1467
+ this.setFormat(data.format);
1468
+ }
1469
+ },
1470
+ {
1471
+ key: "getData",
1472
+ value: function getData() {
1473
+ return (0,_swc_helpers_object_spread_props__WEBPACK_IMPORTED_MODULE_6__._)((0,_swc_helpers_object_spread__WEBPACK_IMPORTED_MODULE_5__._)({}, this.state), {
1474
+ source: this.state.source.trim()
1475
+ });
1476
+ }
1477
+ },
1478
+ {
1479
+ key: "focus",
1480
+ value: function focus() {
1481
+ this.source.focus();
1482
+ }
1483
+ },
1484
+ {
1485
+ key: "setFormat",
1486
+ value: function setFormat(format) {
1487
+ var _this = this;
1488
+ this.state.format = format;
1489
+ this.state.source = this.drafts[format];
1490
+ FORMATS.forEach(function(f) {
1491
+ var _this_tabs_f, _this_tabs_f1;
1492
+ (_this_tabs_f = _this.tabs[f]) === null || _this_tabs_f === void 0 ? void 0 : _this_tabs_f.setMod('active', f === format);
1493
+ (_this_tabs_f1 = _this.tabs[f]) === null || _this_tabs_f1 === void 0 ? void 0 : _this_tabs_f1.setState({
1494
+ variant: f === format ? 'primary' : 'initial'
1495
+ });
1496
+ });
1497
+ this.source.state.label = _helpers__WEBPACK_IMPORTED_MODULE_10__.FORMAT_TITLES[format];
1498
+ this.source.state.placeholder = PLACEHOLDERS[format];
1499
+ this.source.value = this.state.source;
1500
+ this.handlers.onChange(this.getData());
1501
+ this.__render();
1502
+ }
1503
+ },
1504
+ {
1505
+ key: "applyTemplate",
1506
+ value: /**
1507
+ * Replaces the source with a predefined formula in the active format.
1508
+ */ function applyTemplate(value) {
1509
+ var template = this.j.o.math.templates[Number(value)];
1510
+ if (value === '' || !template || !this.templates) {
1511
+ return;
1512
+ }
1513
+ this.source.value = this.state.format === 'mathml' ? template.mathml : template.latex;
1514
+ this.templates.value = '';
1515
+ this.source.focus();
1516
+ }
1517
+ },
1518
+ {
1519
+ key: "insertSymbol",
1520
+ value: function insertSymbol(snippet) {
1521
+ var _input_selectionStart, _input_selectionEnd;
1522
+ var input = this.source.nativeInput;
1523
+ var start = (_input_selectionStart = input.selectionStart) !== null && _input_selectionStart !== void 0 ? _input_selectionStart : input.value.length;
1524
+ var end = (_input_selectionEnd = input.selectionEnd) !== null && _input_selectionEnd !== void 0 ? _input_selectionEnd : start;
1525
+ input.setRangeText(snippet, start, end, 'end');
1526
+ input.focus();
1527
+ // The native value already changed, so the input must announce it
1528
+ // itself for the state, the save button and the preview to follow.
1529
+ this.j.e.fire(input, 'input');
1530
+ }
1531
+ },
1532
+ {
1533
+ key: "refresh",
1534
+ value: function refresh() {
1535
+ this.__render();
1536
+ }
1537
+ },
1538
+ {
1539
+ key: "__render",
1540
+ value: function __render() {
1541
+ var _this = this;
1542
+ var preview = this.getElm('canvas');
1543
+ var error = this.getElm('error');
1544
+ var data = this.getData();
1545
+ var id = ++this.renderId;
1546
+ if (!preview || !error) {
1547
+ return;
1548
+ }
1549
+ error.textContent = '';
1550
+ (0,jodit_esm_core_helpers_utils_attr__WEBPACK_IMPORTED_MODULE_14__.attr)(preview, 'style', (0,_helpers__WEBPACK_IMPORTED_MODULE_10__.mathStyle)(data) || null);
1551
+ if (!data.source) {
1552
+ preview.innerHTML = '<span class="'.concat(this.getFullElName('placeholder'), '">').concat(this.j.i18n('Your equation will render here'), "</span>");
1553
+ return;
1554
+ }
1555
+ ;(0,_mathjax__WEBPACK_IMPORTED_MODULE_11__.renderMath)(this.j, data).then(function(result) {
1556
+ var _result_error;
1557
+ if (id !== _this.renderId) {
1558
+ return;
1559
+ }
1560
+ preview.innerHTML = result.svg;
1561
+ error.textContent = (_result_error = result.error) !== null && _result_error !== void 0 ? _result_error : '';
1562
+ }).catch(function(e) {
1563
+ if (id === _this.renderId) {
1564
+ error.textContent = e.message;
1565
+ }
1566
+ });
1567
+ }
1568
+ }
1569
+ ]);
1570
+ return UIMathEditor;
1571
+ }(jodit_esm_core_ui__WEBPACK_IMPORTED_MODULE_15__.UIElement);
1572
+ (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_9__.__decorate)([
1573
+ (0,jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_12__.debounce)(300)
1574
+ ], UIMathEditor.prototype, "refresh", null);
1575
+ UIMathEditor = (0,_swc_helpers_ts_decorate__WEBPACK_IMPORTED_MODULE_9__.__decorate)([
1576
+ jodit_esm_core_decorators__WEBPACK_IMPORTED_MODULE_12__.component
1577
+ ], UIMathEditor);
1578
+
1579
+
1580
+ /***/ }),
1581
+
1582
+ /***/ 11886:
1583
+ /***/ (function(__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) {
1584
+
1585
+ "use strict";
1586
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1587
+ /* harmony export */ _: function() { return /* binding */ _object_spread_props; }
1588
+ /* harmony export */ });
1589
+ function ownKeys(object, enumerableOnly) {
1590
+ var keys = Object.keys(object);
1591
+ if (Object.getOwnPropertySymbols) {
1592
+ var symbols = Object.getOwnPropertySymbols(object);
1593
+ if (enumerableOnly) {
1594
+ symbols = symbols.filter(function(sym) {
1595
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
1596
+ });
1597
+ }
1598
+ keys.push.apply(keys, symbols);
1599
+ }
1600
+ return keys;
1601
+ }
1602
+ function _object_spread_props(target, source) {
1603
+ source = source != null ? source : {};
1604
+ if (Object.getOwnPropertyDescriptors) Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
1605
+ else {
1606
+ ownKeys(Object(source)).forEach(function(key) {
1607
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1608
+ });
1609
+ }
1610
+ return target;
1611
+ }
1612
+
1613
+
1614
+
1615
+ /***/ })
1616
+
1617
+ },
1618
+ /******/ function(__webpack_require__) { // webpackRuntimeModules
1619
+ /******/ var __webpack_exec__ = function(moduleId) { return __webpack_require__(moduleId); }
1620
+ /******/ var __webpack_exports__ = (__webpack_exec__(90484));
1621
+ /******/ return __webpack_exports__;
1622
+ /******/ }
1623
+ ]);
1624
+ });