jodit-pro 4.18.7 → 4.18.8

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