jodit-pro 4.15.1 → 4.15.2

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 (319) hide show
  1. package/es2015/jodit.css +1 -1
  2. package/es2015/jodit.fat.min.js +3 -3
  3. package/es2015/jodit.js +2 -2
  4. package/es2015/jodit.min.js +2 -2
  5. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  6. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.js +16 -3
  7. package/es2015/plugins/ai-assistant-pro/ai-assistant-pro.min.js +2 -2
  8. package/es2015/plugins/autocomplete/autocomplete.css +1 -1
  9. package/es2015/plugins/autocomplete/autocomplete.js +1 -1
  10. package/es2015/plugins/autocomplete/autocomplete.min.js +1 -1
  11. package/es2015/plugins/backup/backup.css +1 -1
  12. package/es2015/plugins/backup/backup.js +1 -1
  13. package/es2015/plugins/backup/backup.min.js +1 -1
  14. package/es2015/plugins/button-generator/button-generator.css +1 -1
  15. package/es2015/plugins/button-generator/button-generator.js +1 -1
  16. package/es2015/plugins/button-generator/button-generator.min.js +1 -1
  17. package/es2015/plugins/change-case/change-case.js +1 -1
  18. package/es2015/plugins/change-case/change-case.min.js +1 -1
  19. package/es2015/plugins/color-picker/color-picker.css +1 -1
  20. package/es2015/plugins/color-picker/color-picker.js +1 -1
  21. package/es2015/plugins/color-picker/color-picker.min.js +1 -1
  22. package/es2015/plugins/emoji/emoji.css +1 -1
  23. package/es2015/plugins/emoji/emoji.js +1 -1
  24. package/es2015/plugins/emoji/emoji.min.js +1 -1
  25. package/es2015/plugins/export-docs/export-docs.js +1 -1
  26. package/es2015/plugins/export-docs/export-docs.min.js +1 -1
  27. package/es2015/plugins/finder/finder.css +1 -1
  28. package/es2015/plugins/finder/finder.js +1 -1
  29. package/es2015/plugins/finder/finder.min.js +1 -1
  30. package/es2015/plugins/google-maps/google-maps.css +1 -1
  31. package/es2015/plugins/google-maps/google-maps.js +1 -1
  32. package/es2015/plugins/google-maps/google-maps.min.js +1 -1
  33. package/es2015/plugins/google-search/google-search.js +1 -1
  34. package/es2015/plugins/google-search/google-search.min.js +1 -1
  35. package/es2015/plugins/highlight-signature/highlight-signature.js +1 -1
  36. package/es2015/plugins/highlight-signature/highlight-signature.min.js +1 -1
  37. package/es2015/plugins/iframe-editor/iframe-editor.css +1 -1
  38. package/es2015/plugins/iframe-editor/iframe-editor.js +1 -1
  39. package/es2015/plugins/iframe-editor/iframe-editor.min.js +1 -1
  40. package/es2015/plugins/image-editor-pro/image-editor-pro.css +1 -1
  41. package/es2015/plugins/image-editor-pro/image-editor-pro.js +1 -1
  42. package/es2015/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  43. package/es2015/plugins/keyboard/keyboard.css +1 -1
  44. package/es2015/plugins/keyboard/keyboard.js +1 -1
  45. package/es2015/plugins/keyboard/keyboard.min.js +1 -1
  46. package/es2015/plugins/mobile-view/mobile-view.js +1 -1
  47. package/es2015/plugins/mobile-view/mobile-view.min.js +1 -1
  48. package/es2015/plugins/page-break/page-break.js +1 -1
  49. package/es2015/plugins/page-break/page-break.min.js +1 -1
  50. package/es2015/plugins/paste-code/paste-code.css +1 -1
  51. package/es2015/plugins/paste-code/paste-code.js +1 -1
  52. package/es2015/plugins/paste-code/paste-code.min.js +1 -1
  53. package/es2015/plugins/paste-from-word/paste-from-word.js +1 -1
  54. package/es2015/plugins/paste-from-word/paste-from-word.min.js +1 -1
  55. package/es2015/plugins/show-blocks/show-blocks.js +1 -1
  56. package/es2015/plugins/show-blocks/show-blocks.min.js +1 -1
  57. package/es2015/plugins/style/style.css +1 -1
  58. package/es2015/plugins/style/style.js +1 -1
  59. package/es2015/plugins/style/style.min.js +1 -1
  60. package/es2015/plugins/templates/templates.css +1 -1
  61. package/es2015/plugins/templates/templates.js +1 -1
  62. package/es2015/plugins/templates/templates.min.js +1 -1
  63. package/es2015/plugins/todo-list/todo-list.css +1 -1
  64. package/es2015/plugins/todo-list/todo-list.js +1 -1
  65. package/es2015/plugins/todo-list/todo-list.min.js +1 -1
  66. package/es2015/plugins/translate/translate.css +1 -1
  67. package/es2015/plugins/translate/translate.js +1 -1
  68. package/es2015/plugins/translate/translate.min.js +1 -1
  69. package/es2015/plugins/tune-block/tune-block.css +1 -1
  70. package/es2015/plugins/tune-block/tune-block.js +1 -1
  71. package/es2015/plugins/tune-block/tune-block.min.js +1 -1
  72. package/es2018/jodit.fat.min.js +3 -3
  73. package/es2018/jodit.min.js +2 -2
  74. package/es2018/plugins/ai-assistant-pro/ai-assistant-pro.min.js +2 -2
  75. package/es2018/plugins/autocomplete/autocomplete.min.js +1 -1
  76. package/es2018/plugins/backup/backup.min.js +1 -1
  77. package/es2018/plugins/button-generator/button-generator.min.js +1 -1
  78. package/es2018/plugins/change-case/change-case.min.js +1 -1
  79. package/es2018/plugins/color-picker/color-picker.min.js +1 -1
  80. package/es2018/plugins/emoji/emoji.min.js +1 -1
  81. package/es2018/plugins/export-docs/export-docs.min.js +1 -1
  82. package/es2018/plugins/finder/finder.min.js +1 -1
  83. package/es2018/plugins/google-maps/google-maps.min.js +1 -1
  84. package/es2018/plugins/google-search/google-search.min.js +1 -1
  85. package/es2018/plugins/highlight-signature/highlight-signature.min.js +1 -1
  86. package/es2018/plugins/iframe-editor/iframe-editor.min.js +1 -1
  87. package/es2018/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  88. package/es2018/plugins/keyboard/keyboard.min.js +1 -1
  89. package/es2018/plugins/mobile-view/mobile-view.min.js +1 -1
  90. package/es2018/plugins/page-break/page-break.min.js +1 -1
  91. package/es2018/plugins/paste-code/paste-code.min.js +1 -1
  92. package/es2018/plugins/paste-from-word/paste-from-word.min.js +1 -1
  93. package/es2018/plugins/show-blocks/show-blocks.min.js +1 -1
  94. package/es2018/plugins/style/style.min.js +1 -1
  95. package/es2018/plugins/templates/templates.min.js +1 -1
  96. package/es2018/plugins/todo-list/todo-list.min.js +1 -1
  97. package/es2018/plugins/translate/translate.min.js +1 -1
  98. package/es2018/plugins/tune-block/tune-block.min.js +1 -1
  99. package/es2021/jodit.css +1 -1
  100. package/es2021/jodit.fat.min.js +3 -3
  101. package/es2021/jodit.js +2 -2
  102. package/es2021/jodit.min.js +2 -2
  103. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  104. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.js +16 -3
  105. package/es2021/plugins/ai-assistant-pro/ai-assistant-pro.min.js +2 -2
  106. package/es2021/plugins/autocomplete/autocomplete.css +1 -1
  107. package/es2021/plugins/autocomplete/autocomplete.js +1 -1
  108. package/es2021/plugins/autocomplete/autocomplete.min.js +1 -1
  109. package/es2021/plugins/backup/backup.css +1 -1
  110. package/es2021/plugins/backup/backup.js +1 -1
  111. package/es2021/plugins/backup/backup.min.js +1 -1
  112. package/es2021/plugins/button-generator/button-generator.css +1 -1
  113. package/es2021/plugins/button-generator/button-generator.js +1 -1
  114. package/es2021/plugins/button-generator/button-generator.min.js +1 -1
  115. package/es2021/plugins/change-case/change-case.js +1 -1
  116. package/es2021/plugins/change-case/change-case.min.js +1 -1
  117. package/es2021/plugins/color-picker/color-picker.css +1 -1
  118. package/es2021/plugins/color-picker/color-picker.js +1 -1
  119. package/es2021/plugins/color-picker/color-picker.min.js +1 -1
  120. package/es2021/plugins/emoji/emoji.css +1 -1
  121. package/es2021/plugins/emoji/emoji.js +1 -1
  122. package/es2021/plugins/emoji/emoji.min.js +1 -1
  123. package/es2021/plugins/export-docs/export-docs.js +1 -1
  124. package/es2021/plugins/export-docs/export-docs.min.js +1 -1
  125. package/es2021/plugins/finder/finder.css +1 -1
  126. package/es2021/plugins/finder/finder.js +1 -1
  127. package/es2021/plugins/finder/finder.min.js +1 -1
  128. package/es2021/plugins/google-maps/google-maps.css +1 -1
  129. package/es2021/plugins/google-maps/google-maps.js +1 -1
  130. package/es2021/plugins/google-maps/google-maps.min.js +1 -1
  131. package/es2021/plugins/google-search/google-search.js +1 -1
  132. package/es2021/plugins/google-search/google-search.min.js +1 -1
  133. package/es2021/plugins/highlight-signature/highlight-signature.js +1 -1
  134. package/es2021/plugins/highlight-signature/highlight-signature.min.js +1 -1
  135. package/es2021/plugins/iframe-editor/iframe-editor.css +1 -1
  136. package/es2021/plugins/iframe-editor/iframe-editor.js +1 -1
  137. package/es2021/plugins/iframe-editor/iframe-editor.min.js +1 -1
  138. package/es2021/plugins/image-editor-pro/image-editor-pro.css +1 -1
  139. package/es2021/plugins/image-editor-pro/image-editor-pro.js +1 -1
  140. package/es2021/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  141. package/es2021/plugins/keyboard/keyboard.css +1 -1
  142. package/es2021/plugins/keyboard/keyboard.js +1 -1
  143. package/es2021/plugins/keyboard/keyboard.min.js +1 -1
  144. package/es2021/plugins/mobile-view/mobile-view.js +1 -1
  145. package/es2021/plugins/mobile-view/mobile-view.min.js +1 -1
  146. package/es2021/plugins/page-break/page-break.js +1 -1
  147. package/es2021/plugins/page-break/page-break.min.js +1 -1
  148. package/es2021/plugins/paste-code/paste-code.css +1 -1
  149. package/es2021/plugins/paste-code/paste-code.js +1 -1
  150. package/es2021/plugins/paste-code/paste-code.min.js +1 -1
  151. package/es2021/plugins/paste-from-word/paste-from-word.js +1 -1
  152. package/es2021/plugins/paste-from-word/paste-from-word.min.js +1 -1
  153. package/es2021/plugins/show-blocks/show-blocks.js +1 -1
  154. package/es2021/plugins/show-blocks/show-blocks.min.js +1 -1
  155. package/es2021/plugins/style/style.css +1 -1
  156. package/es2021/plugins/style/style.js +1 -1
  157. package/es2021/plugins/style/style.min.js +1 -1
  158. package/es2021/plugins/templates/templates.css +1 -1
  159. package/es2021/plugins/templates/templates.js +1 -1
  160. package/es2021/plugins/templates/templates.min.js +1 -1
  161. package/es2021/plugins/todo-list/todo-list.css +1 -1
  162. package/es2021/plugins/todo-list/todo-list.js +1 -1
  163. package/es2021/plugins/todo-list/todo-list.min.js +1 -1
  164. package/es2021/plugins/translate/translate.css +1 -1
  165. package/es2021/plugins/translate/translate.js +1 -1
  166. package/es2021/plugins/translate/translate.min.js +1 -1
  167. package/es2021/plugins/tune-block/tune-block.css +1 -1
  168. package/es2021/plugins/tune-block/tune-block.js +1 -1
  169. package/es2021/plugins/tune-block/tune-block.min.js +1 -1
  170. package/es2021.en/jodit.css +1 -1
  171. package/es2021.en/jodit.fat.min.js +3 -3
  172. package/es2021.en/jodit.js +2 -2
  173. package/es2021.en/jodit.min.js +2 -2
  174. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  175. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.js +16 -3
  176. package/es2021.en/plugins/ai-assistant-pro/ai-assistant-pro.min.js +2 -2
  177. package/es2021.en/plugins/autocomplete/autocomplete.css +1 -1
  178. package/es2021.en/plugins/autocomplete/autocomplete.js +1 -1
  179. package/es2021.en/plugins/autocomplete/autocomplete.min.js +1 -1
  180. package/es2021.en/plugins/backup/backup.css +1 -1
  181. package/es2021.en/plugins/backup/backup.js +1 -1
  182. package/es2021.en/plugins/backup/backup.min.js +1 -1
  183. package/es2021.en/plugins/button-generator/button-generator.css +1 -1
  184. package/es2021.en/plugins/button-generator/button-generator.js +1 -1
  185. package/es2021.en/plugins/button-generator/button-generator.min.js +1 -1
  186. package/es2021.en/plugins/change-case/change-case.js +1 -1
  187. package/es2021.en/plugins/change-case/change-case.min.js +1 -1
  188. package/es2021.en/plugins/color-picker/color-picker.css +1 -1
  189. package/es2021.en/plugins/color-picker/color-picker.js +1 -1
  190. package/es2021.en/plugins/color-picker/color-picker.min.js +1 -1
  191. package/es2021.en/plugins/emoji/emoji.css +1 -1
  192. package/es2021.en/plugins/emoji/emoji.js +1 -1
  193. package/es2021.en/plugins/emoji/emoji.min.js +1 -1
  194. package/es2021.en/plugins/export-docs/export-docs.js +1 -1
  195. package/es2021.en/plugins/export-docs/export-docs.min.js +1 -1
  196. package/es2021.en/plugins/finder/finder.css +1 -1
  197. package/es2021.en/plugins/finder/finder.js +1 -1
  198. package/es2021.en/plugins/finder/finder.min.js +1 -1
  199. package/es2021.en/plugins/google-maps/google-maps.css +1 -1
  200. package/es2021.en/plugins/google-maps/google-maps.js +1 -1
  201. package/es2021.en/plugins/google-maps/google-maps.min.js +1 -1
  202. package/es2021.en/plugins/google-search/google-search.js +1 -1
  203. package/es2021.en/plugins/google-search/google-search.min.js +1 -1
  204. package/es2021.en/plugins/highlight-signature/highlight-signature.js +1 -1
  205. package/es2021.en/plugins/highlight-signature/highlight-signature.min.js +1 -1
  206. package/es2021.en/plugins/iframe-editor/iframe-editor.css +1 -1
  207. package/es2021.en/plugins/iframe-editor/iframe-editor.js +1 -1
  208. package/es2021.en/plugins/iframe-editor/iframe-editor.min.js +1 -1
  209. package/es2021.en/plugins/image-editor-pro/image-editor-pro.css +1 -1
  210. package/es2021.en/plugins/image-editor-pro/image-editor-pro.js +1 -1
  211. package/es2021.en/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  212. package/es2021.en/plugins/keyboard/keyboard.css +1 -1
  213. package/es2021.en/plugins/keyboard/keyboard.js +1 -1
  214. package/es2021.en/plugins/keyboard/keyboard.min.js +1 -1
  215. package/es2021.en/plugins/mobile-view/mobile-view.js +1 -1
  216. package/es2021.en/plugins/mobile-view/mobile-view.min.js +1 -1
  217. package/es2021.en/plugins/page-break/page-break.js +1 -1
  218. package/es2021.en/plugins/page-break/page-break.min.js +1 -1
  219. package/es2021.en/plugins/paste-code/paste-code.css +1 -1
  220. package/es2021.en/plugins/paste-code/paste-code.js +1 -1
  221. package/es2021.en/plugins/paste-code/paste-code.min.js +1 -1
  222. package/es2021.en/plugins/paste-from-word/paste-from-word.js +1 -1
  223. package/es2021.en/plugins/paste-from-word/paste-from-word.min.js +1 -1
  224. package/es2021.en/plugins/show-blocks/show-blocks.js +1 -1
  225. package/es2021.en/plugins/show-blocks/show-blocks.min.js +1 -1
  226. package/es2021.en/plugins/style/style.css +1 -1
  227. package/es2021.en/plugins/style/style.js +1 -1
  228. package/es2021.en/plugins/style/style.min.js +1 -1
  229. package/es2021.en/plugins/templates/templates.css +1 -1
  230. package/es2021.en/plugins/templates/templates.js +1 -1
  231. package/es2021.en/plugins/templates/templates.min.js +1 -1
  232. package/es2021.en/plugins/todo-list/todo-list.css +1 -1
  233. package/es2021.en/plugins/todo-list/todo-list.js +1 -1
  234. package/es2021.en/plugins/todo-list/todo-list.min.js +1 -1
  235. package/es2021.en/plugins/translate/translate.css +1 -1
  236. package/es2021.en/plugins/translate/translate.js +1 -1
  237. package/es2021.en/plugins/translate/translate.min.js +1 -1
  238. package/es2021.en/plugins/tune-block/tune-block.css +1 -1
  239. package/es2021.en/plugins/tune-block/tune-block.js +1 -1
  240. package/es2021.en/plugins/tune-block/tune-block.min.js +1 -1
  241. package/es5/jodit.css +2 -2
  242. package/es5/jodit.fat.min.js +2 -2
  243. package/es5/jodit.js +2 -2
  244. package/es5/jodit.min.css +2 -2
  245. package/es5/jodit.min.js +2 -2
  246. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.css +1 -1
  247. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.js +18 -3
  248. package/es5/plugins/ai-assistant-pro/ai-assistant-pro.min.js +2 -2
  249. package/es5/plugins/autocomplete/autocomplete.css +1 -1
  250. package/es5/plugins/autocomplete/autocomplete.js +1 -1
  251. package/es5/plugins/autocomplete/autocomplete.min.js +1 -1
  252. package/es5/plugins/backup/backup.css +1 -1
  253. package/es5/plugins/backup/backup.js +1 -1
  254. package/es5/plugins/backup/backup.min.js +1 -1
  255. package/es5/plugins/button-generator/button-generator.css +1 -1
  256. package/es5/plugins/button-generator/button-generator.js +1 -1
  257. package/es5/plugins/button-generator/button-generator.min.js +1 -1
  258. package/es5/plugins/change-case/change-case.js +1 -1
  259. package/es5/plugins/change-case/change-case.min.js +1 -1
  260. package/es5/plugins/color-picker/color-picker.css +1 -1
  261. package/es5/plugins/color-picker/color-picker.js +1 -1
  262. package/es5/plugins/color-picker/color-picker.min.js +1 -1
  263. package/es5/plugins/emoji/emoji.css +1 -1
  264. package/es5/plugins/emoji/emoji.js +1 -1
  265. package/es5/plugins/emoji/emoji.min.js +1 -1
  266. package/es5/plugins/export-docs/export-docs.js +1 -1
  267. package/es5/plugins/export-docs/export-docs.min.js +1 -1
  268. package/es5/plugins/finder/finder.css +1 -1
  269. package/es5/plugins/finder/finder.js +1 -1
  270. package/es5/plugins/finder/finder.min.js +1 -1
  271. package/es5/plugins/google-maps/google-maps.css +1 -1
  272. package/es5/plugins/google-maps/google-maps.js +1 -1
  273. package/es5/plugins/google-maps/google-maps.min.js +1 -1
  274. package/es5/plugins/google-search/google-search.js +1 -1
  275. package/es5/plugins/google-search/google-search.min.js +1 -1
  276. package/es5/plugins/highlight-signature/highlight-signature.js +1 -1
  277. package/es5/plugins/highlight-signature/highlight-signature.min.js +1 -1
  278. package/es5/plugins/iframe-editor/iframe-editor.css +1 -1
  279. package/es5/plugins/iframe-editor/iframe-editor.js +1 -1
  280. package/es5/plugins/iframe-editor/iframe-editor.min.js +1 -1
  281. package/es5/plugins/image-editor-pro/image-editor-pro.css +1 -1
  282. package/es5/plugins/image-editor-pro/image-editor-pro.js +1 -1
  283. package/es5/plugins/image-editor-pro/image-editor-pro.min.js +1 -1
  284. package/es5/plugins/keyboard/keyboard.css +1 -1
  285. package/es5/plugins/keyboard/keyboard.js +1 -1
  286. package/es5/plugins/keyboard/keyboard.min.js +1 -1
  287. package/es5/plugins/mobile-view/mobile-view.js +1 -1
  288. package/es5/plugins/mobile-view/mobile-view.min.js +1 -1
  289. package/es5/plugins/page-break/page-break.js +1 -1
  290. package/es5/plugins/page-break/page-break.min.js +1 -1
  291. package/es5/plugins/paste-code/paste-code.css +1 -1
  292. package/es5/plugins/paste-code/paste-code.js +1 -1
  293. package/es5/plugins/paste-code/paste-code.min.js +1 -1
  294. package/es5/plugins/paste-from-word/paste-from-word.js +1 -1
  295. package/es5/plugins/paste-from-word/paste-from-word.min.js +1 -1
  296. package/es5/plugins/show-blocks/show-blocks.js +1 -1
  297. package/es5/plugins/show-blocks/show-blocks.min.js +1 -1
  298. package/es5/plugins/style/style.css +1 -1
  299. package/es5/plugins/style/style.js +1 -1
  300. package/es5/plugins/style/style.min.js +1 -1
  301. package/es5/plugins/templates/templates.css +1 -1
  302. package/es5/plugins/templates/templates.js +1 -1
  303. package/es5/plugins/templates/templates.min.js +1 -1
  304. package/es5/plugins/todo-list/todo-list.css +1 -1
  305. package/es5/plugins/todo-list/todo-list.js +1 -1
  306. package/es5/plugins/todo-list/todo-list.min.js +1 -1
  307. package/es5/plugins/translate/translate.css +1 -1
  308. package/es5/plugins/translate/translate.js +1 -1
  309. package/es5/plugins/translate/translate.min.js +1 -1
  310. package/es5/plugins/tune-block/tune-block.css +1 -1
  311. package/es5/plugins/tune-block/tune-block.js +1 -1
  312. package/es5/plugins/tune-block/tune-block.min.js +1 -1
  313. package/es5/polyfills.fat.min.js +1 -1
  314. package/es5/polyfills.js +1 -1
  315. package/es5/polyfills.min.js +1 -1
  316. package/esm/plugins/ai-assistant-pro/core/conversation.d.ts +1 -1
  317. package/esm/plugins/ai-assistant-pro/core/conversation.js +1 -1
  318. package/package.json +1 -1
  319. package/types/plugins/ai-assistant-pro/core/conversation.d.ts +1 -1
@@ -1,11 +1,11 @@
1
1
  /*!
2
2
  * jodit-pro - PRO Version of Jodit Editor
3
3
  * Author: Chupurnov Valerii <chupurnov@gmail.com>
4
- * Version: v4.15.1
4
+ * Version: v4.15.2
5
5
  * Url: https://xdsoft.net/jodit/pro/
6
6
  * License(s): SEE LICENSE IN LICENSE.md
7
7
  */
8
- !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var i=t();for(var n in i)("object"==typeof exports?exports:e)[n]=i[n]}}(self,function(){return function(){var e,t,i={94668:function(e){e.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="M13 3H5v18h14V9l-6-6Zm0 0v6h6M12 12v6m-3-3h6"/> </g> </svg>'},86428:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"> \x3c!-- Background rounded rect --\x3e <rect x="1" y="1" width="22" height="22" rx="3"/> \x3c!-- Letter A - outer shape --\x3e <polygon points="8,5 2,19 5,19 6.5,16 11.5,16 13,19 16,19 10,5" fill="white"/> \x3c!-- Letter A - inner triangle (hole) --\x3e <polygon points="9,9 7.5,13 10.5,13" fill="currentColor"/> \x3c!-- Letter I --\x3e <rect x="17" y="5" width="3" height="14" fill="white"/> </svg>'},75966:function(e){e.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 17 11-11 4 4L7 21Zm8-8 4 4M5 3v4M3 5h4M19 2v4m-2-2h4m-1 12v4m-2-2h4"/> </g> </svg>'},83207:function(e){e.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="m10 6 6 6-6 6"/> </g> </svg>'},99219:function(e){e.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 10 18-7-7 18-3-8-8-3Zm8 3L21 3"/> </g> </svg>'},63674:function(e){e.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="M12 2 4 5v7c0 5 8 10 8 10s8-5 8-10V5l-8-3Z"/> </g> </svg>'},4133:function(e){e.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="m13 2-9 12h6l-1 8 11-13h-7V2Z"/> </g> </svg>'},68583:function(e){e.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 4v6h6M3 10l4-4a8 8 0 1 1-1 12M12 8v5l3 2"/> </g> </svg>'},34586:function(e){e.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"> <rect x="2" y="5" width="20" height="13" rx="3"/><path d="m11 11 2 11 2-4 4-1-8-6"/> </g> </svg>'},91729:function(e){e.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="M2 19 8 5l6 14M4.5 13h7M21 12v7m0-5a3 3 0 1 0 0 3"/> </g> </svg>'},46995:function(e){e.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"> <circle cx="12" cy="12" r="9"/><path d="M8 9h0m8 0h0M8 15a5 5 0 0 0 8 0"/> </g> </svg>'},83556:function(e){e.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" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M12 5.5v6" fill="none" /> <path d="M9 9l3 3l3 -3" fill="none" /> <path d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4" fill="none" /> <path d="M2 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1" fill="none" /> <path d="M17 16.5a1.5 1.5 0 0 0 -3 0v3a1.5 1.5 0 0 0 3 0" fill="none" /> <path d="M9.5 15a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1 -3 0v-3a1.5 1.5 0 0 1 1.5 -1.5" fill="none" /> <path d="M19.5 15l3 6" fill="none" /> <path d="M19.5 21l3 -6" fill="none" /> </svg>'},4872:function(e){e.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" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M12 5.5v6" fill="none" /> <path d="M9 9l3 3l3 -3" fill="none" /> <path d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4" fill="none" /> <path d="M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6" fill="none" /> <path d="M17 18h2" fill="none" /> <path d="M20 15h-3v6" fill="none" /> <path d="M11 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1" fill="none" /> </svg>'},53121:function(e){e.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="M12 3H5v18h14v-7M12 12l9-9m-6 0h6v6"/> </g> </svg>'},7307:function(e){e.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="M12 21 3.5 12.5a5 5 0 0 1 7-7L12 7l1.5-1.5a5 5 0 0 1 7 7L12 21Z"/> </g> </svg>'},24928:function(e){e.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="m2 11 10-8 10 8M5 9v12h5v-7h4v7h5V9"/> </g> </svg>'},96910:function(e){e.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 7V4h6l3 3h9v14H3V7ZM12 11v7m-3.5-3.5h7"/> </g> </svg>'},81122:function(e){e.exports='<svg viewBox="0 0 83 84" fill="none" xmlns="http://www.w3.org/2000/svg"> <circle cx="40" cy="44" r="37" stroke="black" stroke-width="6"/> <path d="M40 4V44H79" stroke="black" stroke-width="5"/> <circle cx="40" cy="6" r="6" fill="#C8C8C8"/> <circle cx="40" cy="43" r="6" fill="#C8C8C8"/> <circle cx="77" cy="44" r="6" fill="#C8C8C8"/> </svg>'},49377:function(e){e.exports='<svg viewBox="0 0 76 76" xmlns="http://www.w3.org/2000/svg"> <path d="M38 6.90909C36.2517 6.90909 34.7591 7.58381 33.5221 8.93324C32.2852 10.2827 31.6667 11.911 31.6667 13.8182V20.7273H30.0833V15.7074C30.0833 13.9801 29.5556 12.5137 28.5 11.3082C27.4444 10.1027 26.125 9.5 24.5417 9.5C23.0243 9.5 21.7214 10.0938 20.6328 11.2813C19.5443 12.4688 19 13.8902 19 15.5455V38.7017L17.4167 37.0824V27.7983C17.4167 26.071 16.8889 24.6046 15.8333 23.3991C14.7778 22.1937 13.4583 21.5909 11.875 21.5909C10.3576 21.5909 9.05469 22.1847 7.96615 23.3722C6.8776 24.5597 6.33333 25.9811 6.33333 27.6364V39.7273C6.33333 41.4186 6.91059 42.8939 8.0651 44.1534L23.4036 60.1307C24.6901 61.5341 25.3333 63.3693 25.3333 65.6364C25.3333 66.572 25.6467 67.3816 26.2734 68.0653C26.9002 68.7491 27.6424 69.0909 28.5 69.0909H60.1667C61.0243 69.0909 61.7665 68.7491 62.3932 68.0653C63.02 67.3816 63.3333 66.572 63.3333 65.6364V64.2869C63.3333 62.8116 63.4983 61.4261 63.8281 60.1307L69.1719 36.5966C69.5017 35.3011 69.6667 33.9157 69.6667 32.4403V19.1619C69.6667 17.4347 69.1389 15.9683 68.0833 14.7628C67.0278 13.5573 65.7083 12.9545 64.125 12.9545C62.6076 12.9545 61.3047 13.5483 60.2161 14.7358C59.1276 15.9233 58.5833 17.3447 58.5833 19V20.7273H57V13.9801C57 12.5407 56.5877 11.2363 55.763 10.0668C54.9384 8.89725 53.8828 8.16856 52.5964 7.88068C52.1345 7.80871 51.7552 7.77273 51.4583 7.77273C49.941 7.77273 48.638 8.36648 47.5495 9.55398C46.4609 10.7415 45.9167 12.1629 45.9167 13.8182V20.7273H44.3333V14.142C44.3333 12.3068 43.7973 10.6965 42.7253 9.31108C41.6532 7.92566 40.2925 7.14299 38.6432 6.96307C38.4783 6.92708 38.2639 6.90909 38 6.90909ZM38 0C40.7708 0 43.2283 0.899621 45.3724 2.69886C47.2526 1.47538 49.2813 0.863636 51.4583 0.863636C53.4045 0.863636 55.2352 1.34943 56.9505 2.32102C58.6658 3.29261 60.0842 4.66004 61.2057 6.4233C62.0964 6.1714 63.0694 6.04545 64.125 6.04545C67.4236 6.04545 70.2274 7.33191 72.5365 9.90483C74.8455 12.4777 76 15.5634 76 19.1619V32.4403C76 34.2756 75.7856 36.2188 75.3568 38.2699L69.9635 61.804C69.7656 62.6676 69.6667 63.9451 69.6667 65.6364C69.6667 68.5152 68.7431 70.9621 66.8958 72.9773C65.0486 74.9924 62.8056 76 60.1667 76H28.5C25.7292 76 23.4531 74.9474 21.6719 72.8423C19.8906 70.7372 19 68.1733 19 65.1506L3.76042 49.1733C1.25347 46.5464 0 43.3977 0 39.7273V27.6364C0 24.0739 1.16276 21.0241 3.48828 18.4872C5.8138 15.9503 8.60938 14.6818 11.875 14.6818C12.2378 14.6818 12.5017 14.6998 12.6667 14.7358C12.8646 11.3172 14.1098 8.43845 16.4023 6.09943C18.6949 3.76042 21.408 2.59091 24.5417 2.59091C26.2569 2.59091 27.8733 2.96875 29.3906 3.72443C31.7656 1.24148 34.6354 0 38 0Z"/> </svg>'},46425:function(e){e.exports='<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"> <g> <path d="M23,13.6l5,5V4c0-0.6-0.4-1-1-1h-4V13.6z"/> <polygon points="12.4,3 16.7,7.3 19.7,10.3 21,11.6 21,3"/> <path d="M14.6,8l-5-5H5C4.4,3,4,3.4,4,4v14.6L14.6,8z"/> </g> <path d="M28.8,29.2L26,26.4c0.7-1,1-2.1,1-3.4c0-3.3-2.7-6-6-6s-6,2.7-6,6s2.7,6,6,6c1.2,0,2.4-0.4,3.4-1l2.8,2.8 c0.4,0.4,1.2,0.4,1.6,0C29.2,30.4,29.2,29.6,28.8,29.2z"/> <path d="M13,23c0-4.4,3.6-8,8-8c0.2,0,0.4,0,0.6,0l-0.3-0.3c0,0,0,0,0,0l-3-3L16,9.4l-12,12V26c0,0.6,0.4,1,1,1h9.1 C13.4,25.8,13,24.5,13,23z"/> </svg>'},86820:function(e){e.exports='<svg viewBox="0 0 88 88" fill="none" xmlns="http://www.w3.org/2000/svg"> <g> <path d="M44 0.513519C27.2931 0.513519 13.75 13.8981 13.75 30.4095C13.75 46.9208 44 87.4835 44 87.4835C44 87.4835 74.25 46.9208 74.25 30.4095C74.25 13.8981 60.7069 0.513519 44 0.513519ZM19.25 30.4095C19.25 16.921 30.3518 5.94914 44 5.94914C57.6482 5.94914 68.75 16.921 68.75 30.4095C68.75 39.8049 54.9945 62.4871 44 78.1329C33.0055 62.4871 19.25 39.8049 19.25 30.4095ZM44 16.8204C36.4052 16.8204 30.25 22.9035 30.25 30.4095C30.25 37.9154 36.4052 43.9985 44 43.9985C51.5948 43.9985 57.75 37.9154 57.75 30.4095C57.75 22.9035 51.5948 16.8204 44 16.8204ZM44 38.5629C39.4508 38.5629 35.75 34.9054 35.75 30.4095C35.75 25.9135 39.4508 22.256 44 22.256C48.5492 22.256 52.25 25.9135 52.25 30.4095C52.25 34.9054 48.5492 38.5629 44 38.5629Z" fill="#404040"/> </g> <defs> <rect width="88" height="86.97" fill="white" transform="translate(0 0.513519)"/> </defs> </svg>'},36576:function(e){e.exports='<svg viewBox="0 0 77 86" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M7 38.6056L33.1367 7.96263L69.5477 45.7058L36.2444 72.166L7 76.9673V38.6056Z" stroke="black" stroke-width="6"/> <circle cx="71" cy="45" r="6" fill="#C8C8C8"/> <circle cx="35" cy="73" r="6" fill="#C8C8C8"/> <circle cx="6" cy="79" r="6" fill="#C8C8C8"/> <circle cx="6" cy="39" r="6" fill="#C8C8C8"/> <circle cx="33" cy="6" r="6" fill="#C8C8C8"/> </svg>'},27622:function(e){e.exports='<svg width="72" height="86" viewBox="0 0 72 86" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M17.1832 79.1351L13.6833 45.0811L49.6832 58.4595L47.6832 5.35135" stroke="black" stroke-width="6"/> <circle cx="13" cy="44" r="6" fill="#C8C8C8"/> <circle cx="17" cy="77" r="6" fill="#C8C8C8"/> <circle cx="51" cy="59" r="6" fill="#C8C8C8"/> <circle cx="48" cy="6" r="6" fill="#C8C8C8"/> </svg>'},89687:function(e){e.exports='<svg viewBox="0 0 47 61" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M46.7671 7.12793H27.3433V61H19.416V7.12793H0.0336914V0.570312H46.7671V7.12793Z" fill="black"/> </svg>'},25088:function(e){e.exports='<svg width="11" height="15" viewBox="0 0 11 15" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M10.925 7.122V14H9.747L9.462 13.164C9.044 13.4933 8.55 13.7467 7.98 13.924C7.42267 14.1013 6.82733 14.19 6.194 14.19C5.054 14.19 4.066 13.9177 3.23 13.373C2.394 12.8157 1.75433 12.024 1.311 10.998C0.867667 9.972 0.646 8.756 0.646 7.35C0.646 5.96933 0.880333 4.766 1.349 3.74C1.83033 2.714 2.50167 1.92233 3.363 1.365C4.237 0.794999 5.25667 0.509999 6.422 0.509999C7.41 0.509999 8.284 0.693666 9.044 1.061C9.804 1.42833 10.3613 1.935 10.716 2.581L9.747 3.55C9.41767 3.03067 8.968 2.638 8.398 2.372C7.84067 2.09333 7.18833 1.954 6.441 1.954C5.17433 1.954 4.18633 2.429 3.477 3.379C2.76767 4.329 2.413 5.65267 2.413 7.35C2.413 9.07267 2.755 10.4153 3.439 11.378C4.13567 12.3407 5.10467 12.822 6.346 12.822C6.92867 12.822 7.46067 12.7397 7.942 12.575C8.436 12.4103 8.854 12.1697 9.196 11.853V8.414H6.023V7.122H10.925Z" fill="black"/> </svg>'},67008:function(e){e.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"> <rect x="2" y="3" width="20" height="18" rx="2"/><path d="M2 8h20m-13 4-3 3 3 3m6-6 3 3-3 3"/> </g> </svg>'},63643:function(e){e.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"> <rect x="2" y="5" width="20" height="14" rx="2"/><path d="M6 9h0m4 0h0m4 0h0m4 0h0M6 13h0m4 0h0m4 0h0m4 0h0M8 16h8"/> </g> </svg>'},27926:function(e){e.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="M9 5h12v14H9l-7-7 7-7Zm3 4 6 6m0-6-6 6"/> </g> </svg>'},10690:function(e){e.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 11 8-8 8 8h-5v6H9v-6H4ZM8 21h8"/> </g> </svg>'},91997:function(e){e.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="M5 12h0m7 0h0m7 0h0"/> </g> </svg>'},11699:function(e){e.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 11 8-8 8 8h-5v10H9V11H4Z"/> </g> </svg>'},98126:function(e){e.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 12h14m-4-4 4 4-4 4M21 5v14"/> </g> </svg>'},27222:function(e){e.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"> <rect x="6" y="2" width="12" height="20" rx="3"/><path d="M10 5h4M12 18h0"/> </g> </svg>'},17405:function(e){e.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="M5 8V3h14v5M5 16v5h14v-5M2 12h3m4 0h3m4 0h3m3 0h0"/> </g> </svg>'},75689:function(e){e.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"> <rect x="4" y="5" width="16" height="16" rx="2"/><rect x="9" y="3" width="6" height="4" rx="1"/><path d="m9 11-3 3 3 3m6-6 3 3-3 3"/> </g> </svg>'},78879:function(e){e.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 7V3h4m4 0h3m4 0h3v4m0 4v3m0 4v3h-4m-4 0h-3m-4 0H3v-4m0-4v-3M7 8h10M7 12h10M7 16h6"/> </g> </svg>'},78955:function(e){e.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"> <rect x="3" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><path d="M14 6h7m-7 4h4m-4 7h7m-7 4h4"/> </g> </svg>'},18993:function(e){e.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"> <rect x="3" y="3" width="18" height="18" rx="2"/><path d="M3 9h18M10 9v12M14 13h3m-3 4h3"/> </g> </svg>'},11373:function(e){e.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 6 2 2 3-4M12 6h9m-18 7 2 2 3-4m4 2h9M3 20h4m5 0h9"/> </g> </svg>'},74922:function(e){e.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 7h18m-4-4 4 4-4 4M21 17H3m4-4-4 4 4 4"/> </g> </svg>'},34575:function(e){e.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 5h11M8 3v2m4 0c-1 6-4 10-9 12M5 8c1 3 3 5 6 7m2 7 4-11 4 11m-6-4h4"/> </g> </svg>'},46146:function(e){"u">typeof self&&self,e.exports=function(){var e=[function(e,t,i){"use strict";var n=i(3);function o(e){return!0===n(e)&&"[object Object]"===Object.prototype.toString.call(e)}e.exports=function(e){var t,i;return!1!==o(e)&&"function"==typeof(t=e.constructor)&&!1!==o(i=t.prototype)&&!1!==i.hasOwnProperty("isPrototypeOf")}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=t.PALETTE_MATERIAL_CHROME=t.PALETTE_MATERIAL_500=t.COLOR_NAMES=t.getLuminance=t.intToRgb=t.rgbToInt=t.rgbToHsv=t.rgbToHsl=t.hslToRgb=t.rgbToHex=t.parseColor=t.parseColorToHsla=t.parseColorToHsl=t.parseColorToRgba=t.parseColorToRgb=t.from=t.createPicker=void 0;var n=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var i=[],n=!0,o=!1,r=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(i.push(s.value),!t||i.length!==t);n=!0);}catch(e){o=!0,r=e}finally{try{!n&&a.return&&a.return()}finally{if(o)throw r}}return i}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")},r=i(2),s=l(i(0)),a=l(i(4));function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function c(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}var d="u">typeof window&&window.navigator.userAgent.indexOf("Edge")>-1,h="u">typeof window&&window.navigator.userAgent.indexOf("rv:")>-1,p={id:null,attachTo:"body",showHSL:!0,showRGB:!0,showHEX:!0,showAlpha:!1,color:"#ff0000",palette:null,paletteEditable:!1,useAlphaInPalette:"auto",slBarSize:[232,150],hueBarSize:[150,11],alphaBarSize:[150,11]},f="COLOR",m="RGBA_USER",g="HSLA_USER";function b(e,t,i){return e?e instanceof HTMLElement?e:e instanceof NodeList?e[0]:"string"==typeof e?document.querySelector(e):e.jquery?e.get(0):i?t:null:t}function v(e){var t=e.getContext("2d"),i=+e.width,n=+e.height,s=t.createLinearGradient(1,1,1,n-1);return s.addColorStop(0,"white"),s.addColorStop(1,"black"),{setHue:function(e){var o=t.createLinearGradient(1,0,i-1,0);o.addColorStop(0,"hsla("+e+", 100%, 50%, 0)"),o.addColorStop(1,"hsla("+e+", 100%, 50%, 1)"),t.fillStyle=s,t.fillRect(0,0,i,n),t.fillStyle=o,t.globalCompositeOperation="multiply",t.fillRect(0,0,i,n),t.globalCompositeOperation="source-over"},grabColor:function(e,i){return t.getImageData(e,i,1,1).data},findColor:function(e,t,s){var a=o((0,r.rgbToHsv)(e,t,s),3);return[a[1]*i,n-a[2]*n]}}}function y(e,t,i){return null===e?t:/^\s*$/.test(e)?i:!!/true|yes|1/i.test(e)||!/false|no|0/i.test(e)&&t}function w(e,t,i){if(null===e)return t;if(/^\s*$/.test(e))return i;var n=e.split(",").map(Number);return 2===n.length&&n[0]&&n[1]?n:t}var _=function(){function e(t,i){if(u(this,e),i?(t=b(t),this.options=Object.assign({},p,i)):t&&(0,s.default)(t)?(this.options=Object.assign({},p,t),t=b(this.options.attachTo)):(this.options=Object.assign({},p),t=b((0,r.nvl)(t,this.options.attachTo))),!t)throw Error("Container not found: "+this.options.attachTo);!function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"acp-";if(t.hasAttribute(i+"show-hsl")&&(e.showHSL=y(t.getAttribute(i+"show-hsl"),p.showHSL,!0)),t.hasAttribute(i+"show-rgb")&&(e.showRGB=y(t.getAttribute(i+"show-rgb"),p.showRGB,!0)),t.hasAttribute(i+"show-hex")&&(e.showHEX=y(t.getAttribute(i+"show-hex"),p.showHEX,!0)),t.hasAttribute(i+"show-alpha")&&(e.showAlpha=y(t.getAttribute(i+"show-alpha"),p.showAlpha,!0)),t.hasAttribute(i+"palette-editable")&&(e.paletteEditable=y(t.getAttribute(i+"palette-editable"),p.paletteEditable,!0)),t.hasAttribute(i+"sl-bar-size")&&(e.slBarSize=w(t.getAttribute(i+"sl-bar-size"),p.slBarSize,[232,150])),t.hasAttribute(i+"hue-bar-size")&&(e.hueBarSize=w(t.getAttribute(i+"hue-bar-size"),p.hueBarSize,[150,11]),e.alphaBarSize=e.hueBarSize),t.hasAttribute(i+"palette")){var n=t.getAttribute(i+"palette");switch(n){case"PALETTE_MATERIAL_500":e.palette=r.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":case"":e.palette=r.PALETTE_MATERIAL_CHROME;break;default:e.palette=n.split(/[;|]/)}}t.hasAttribute(i+"color")&&(e.color=t.getAttribute(i+"color"))}(this.options,t),this.H=0,this.S=0,this.L=0,this.R=0,this.G=0,this.B=0,this.A=1,this.palette={},this.element=document.createElement("div"),this.options.id&&(this.element.id=this.options.id),this.element.className="a-color-picker",this.element.innerHTML=a.default,t.appendChild(this.element);var n=this.element.querySelector(".a-color-picker-h");this.setupHueCanvas(n),this.hueBarHelper=v(n),this.huePointer=this.element.querySelector(".a-color-picker-h+.a-color-picker-dot");var o=this.element.querySelector(".a-color-picker-sl");this.setupSlCanvas(o),this.slBarHelper=v(o),this.slPointer=this.element.querySelector(".a-color-picker-sl+.a-color-picker-dot"),this.preview=this.element.querySelector(".a-color-picker-preview"),this.setupClipboard(this.preview.querySelector(".a-color-picker-clipbaord")),this.options.showHSL?(this.setupInput(this.inputH=this.element.querySelector(".a-color-picker-hsl>input[nameref=H]")),this.setupInput(this.inputS=this.element.querySelector(".a-color-picker-hsl>input[nameref=S]")),this.setupInput(this.inputL=this.element.querySelector(".a-color-picker-hsl>input[nameref=L]"))):this.element.querySelector(".a-color-picker-hsl").remove(),this.options.showRGB?(this.setupInput(this.inputR=this.element.querySelector(".a-color-picker-rgb>input[nameref=R]")),this.setupInput(this.inputG=this.element.querySelector(".a-color-picker-rgb>input[nameref=G]")),this.setupInput(this.inputB=this.element.querySelector(".a-color-picker-rgb>input[nameref=B]"))):this.element.querySelector(".a-color-picker-rgb").remove(),this.options.showHEX?this.setupInput(this.inputRGBHEX=this.element.querySelector("input[nameref=RGBHEX]")):this.element.querySelector(".a-color-picker-rgbhex").remove(),this.options.paletteEditable||this.options.palette&&this.options.palette.length>0?this.setPalette(this.paletteRow=this.element.querySelector(".a-color-picker-palette")):(this.paletteRow=this.element.querySelector(".a-color-picker-palette"),this.paletteRow.remove()),this.options.showAlpha?(this.setupAlphaCanvas(this.element.querySelector(".a-color-picker-a")),this.alphaPointer=this.element.querySelector(".a-color-picker-a+.a-color-picker-dot")):this.element.querySelector(".a-color-picker-alpha").remove(),this.element.style.width=this.options.slBarSize[0]+"px",this.onValueChanged(f,this.options.color)}return n(e,[{key:"setupHueCanvas",value:function(e){var t=this;e.width=this.options.hueBarSize[0],e.height=this.options.hueBarSize[1];for(var i=e.getContext("2d"),n=i.createLinearGradient(0,0,this.options.hueBarSize[0],0),o=0;o<=1;o+=1/360)n.addColorStop(o,"hsl("+360*o+", 100%, 50%)");i.fillStyle=n,i.fillRect(0,0,this.options.hueBarSize[0],this.options.hueBarSize[1]);var s=function(i){var n=(0,r.limit)(i.clientX-e.getBoundingClientRect().left,0,t.options.hueBarSize[0]),o=Math.round(360*n/t.options.hueBarSize[0]);t.huePointer.style.left=n-7+"px",t.onValueChanged("H",o)},a=function e(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",e)};e.addEventListener("mousedown",function(e){s(e),document.addEventListener("mousemove",s),document.addEventListener("mouseup",a)})}},{key:"setupSlCanvas",value:function(e){var t=this;e.width=this.options.slBarSize[0],e.height=this.options.slBarSize[1];var i=function(i){var n=(0,r.limit)(i.clientX-e.getBoundingClientRect().left,0,t.options.slBarSize[0]-1),o=(0,r.limit)(i.clientY-e.getBoundingClientRect().top,0,t.options.slBarSize[1]-1),s=t.slBarHelper.grabColor(n,o);t.slPointer.style.left=n-7+"px",t.slPointer.style.top=o-7+"px",t.onValueChanged("RGB",s)},n=function e(){document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",e)};e.addEventListener("mousedown",function(e){i(e),document.addEventListener("mousemove",i),document.addEventListener("mouseup",n)})}},{key:"setupAlphaCanvas",value:function(e){var t=this;e.width=this.options.alphaBarSize[0],e.height=this.options.alphaBarSize[1];var i=e.getContext("2d"),n=i.createLinearGradient(0,0,e.width-1,0);n.addColorStop(0,"hsla(0, 0%, 50%, 0)"),n.addColorStop(1,"hsla(0, 0%, 50%, 1)"),i.fillStyle=n,i.fillRect(0,0,this.options.alphaBarSize[0],this.options.alphaBarSize[1]);var o=function(i){var n=(0,r.limit)(i.clientX-e.getBoundingClientRect().left,0,t.options.alphaBarSize[0]),o=+(n/t.options.alphaBarSize[0]).toFixed(2);t.alphaPointer.style.left=n-7+"px",t.onValueChanged("ALPHA",o)},s=function e(){document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",e)};e.addEventListener("mousedown",function(e){o(e),document.addEventListener("mousemove",o),document.addEventListener("mouseup",s)})}},{key:"setupInput",value:function(e){var t=this,i=+e.min,n=+e.max,o=e.getAttribute("nameref");e.hasAttribute("select-on-focus")&&e.addEventListener("focus",function(){e.select()}),"text"===e.type?e.addEventListener("change",function(){t.onValueChanged(o,e.value)}):((d||h)&&e.addEventListener("keydown",function(s){"Up"===s.key?(e.value=(0,r.limit)(+e.value+1,i,n),t.onValueChanged(o,e.value),s.returnValue=!1):"Down"===s.key&&(e.value=(0,r.limit)(e.value-1,i,n),t.onValueChanged(o,e.value),s.returnValue=!1)}),e.addEventListener("change",function(){var s=+e.value;t.onValueChanged(o,(0,r.limit)(s,i,n))}))}},{key:"setupClipboard",value:function(e){var t=this;e.title="click to copy",e.addEventListener("click",function(){e.value=(0,r.parseColor)([t.R,t.G,t.B,t.A],"hexcss4"),e.select(),document.execCommand("copy")})}},{key:"setPalette",value:function(e){var t=this,i="auto"===this.options.useAlphaInPalette?this.options.showAlpha:this.options.useAlphaInPalette,n=null;switch(this.options.palette){case"PALETTE_MATERIAL_500":n=r.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":n=r.PALETTE_MATERIAL_CHROME;break;default:n=(0,r.ensureArray)(this.options.palette)}if(this.options.paletteEditable||n.length>0){var o=function(i,n,o){var r=e.querySelector('.a-color-picker-palette-color[data-color="'+i+'"]')||document.createElement("div");r.className="a-color-picker-palette-color",r.style.backgroundColor=i,r.setAttribute("data-color",i),r.title=i,e.insertBefore(r,n),t.palette[i]=!0,o&&t.onPaletteColorAdd(i)},s=function(i,n){i?(e.removeChild(i),t.palette[i.getAttribute("data-color")]=!1,n&&t.onPaletteColorRemove(i.getAttribute("data-color"))):(e.querySelectorAll(".a-color-picker-palette-color[data-color]").forEach(function(t){e.removeChild(t)}),Object.keys(t.palette).forEach(function(e){t.palette[e]=!1}),n&&t.onPaletteColorRemove())};if(n.map(function(e){return(0,r.parseColor)(e,i?"rgbcss4":"hex")}).filter(function(e){return!!e}).forEach(function(e){return o(e)}),this.options.paletteEditable){var a=document.createElement("div");a.className="a-color-picker-palette-color a-color-picker-palette-add",a.innerHTML="+",e.appendChild(a),e.addEventListener("click",function(e){/a-color-picker-palette-add/.test(e.target.className)?e.shiftKey?s(null,!0):o(i?(0,r.parseColor)([t.R,t.G,t.B,t.A],"rgbcss4"):(0,r.rgbToHex)(t.R,t.G,t.B),e.target,!0):/a-color-picker-palette-color/.test(e.target.className)&&(e.shiftKey?s(e.target,!0):t.onValueChanged(f,e.target.getAttribute("data-color")))})}else e.addEventListener("click",function(e){/a-color-picker-palette-color/.test(e.target.className)&&t.onValueChanged(f,e.target.getAttribute("data-color"))})}else e.style.display="none"}},{key:"updatePalette",value:function(e){this.paletteRow.innerHTML="",this.palette={},this.paletteRow.parentElement||this.element.appendChild(this.paletteRow),this.options.palette=e,this.setPalette(this.paletteRow)}},{key:"onValueChanged",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{silent:!1};switch(e){case"H":this.H=t;var n=o((0,r.hslToRgb)(this.H,this.S,this.L),3);this.R=n[0],this.G=n[1],this.B=n[2],this.slBarHelper.setHue(t),this.updatePointerH(this.H),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"S":this.S=t;var s=o((0,r.hslToRgb)(this.H,this.S,this.L),3);this.R=s[0],this.G=s[1],this.B=s[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"L":this.L=t;var a=o((0,r.hslToRgb)(this.H,this.S,this.L),3);this.R=a[0],this.G=a[1],this.B=a[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"R":this.R=t;var l=o((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=l[0],this.S=l[1],this.L=l[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"G":this.G=t;var u=o((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=u[0],this.S=u[1],this.L=u[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"B":this.B=t;var c=o((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=c[0],this.S=c[1],this.L=c[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"RGB":var d=o(t,3);this.R=d[0],this.G=d[1],this.B=d[2];var h=o((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=h[0],this.S=h[1],this.L=h[2],this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case m:var p=o(t,4);this.R=p[0],this.G=p[1],this.B=p[2],this.A=p[3];var b=o((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=b[0],this.S=b[1],this.L=b[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case g:var v=o(t,4);this.H=v[0],this.S=v[1],this.L=v[2],this.A=v[3];var y=o((0,r.hslToRgb)(this.H,this.S,this.L),3);this.R=y[0],this.G=y[1],this.B=y[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"RGBHEX":var w=o((0,r.cssColorToRgb)(t)||[this.R,this.G,this.B],3);this.R=w[0],this.G=w[1],this.B=w[2];var _=o((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=_[0],this.S=_[1],this.L=_[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B);break;case f:var C=o((0,r.parseColor)(t,"rgba")||[0,0,0,1],4);this.R=C[0],this.G=C[1],this.B=C[2],this.A=C[3];var k=o((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=k[0],this.S=k[1],this.L=k[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"ALPHA":this.A=t}1===this.A?this.preview.style.backgroundColor="rgb("+this.R+","+this.G+","+this.B+")":this.preview.style.backgroundColor="rgba("+this.R+","+this.G+","+this.B+","+this.A+")",i&&i.silent||this.onchange&&this.onchange(this.preview.style.backgroundColor)}},{key:"onPaletteColorAdd",value:function(e){this.oncoloradd&&this.oncoloradd(e)}},{key:"onPaletteColorRemove",value:function(e){this.oncolorremove&&this.oncolorremove(e)}},{key:"updateInputHSL",value:function(e,t,i){this.options.showHSL&&(this.inputH.value=e,this.inputS.value=t,this.inputL.value=i)}},{key:"updateInputRGB",value:function(e,t,i){this.options.showRGB&&(this.inputR.value=e,this.inputG.value=t,this.inputB.value=i)}},{key:"updateInputRGBHEX",value:function(e,t,i){this.options.showHEX&&(this.inputRGBHEX.value=(0,r.rgbToHex)(e,t,i))}},{key:"updatePointerH",value:function(e){var t=this.options.hueBarSize[0]*e/360;this.huePointer.style.left=t-7+"px"}},{key:"updatePointerSL",value:function(e,t,i){var n=o((0,r.hslToRgb)(e,t,i),3),s=n[0],a=n[1],l=n[2],u=o(this.slBarHelper.findColor(s,a,l),2),c=u[0],d=u[1];c>=0&&(this.slPointer.style.left=c-7+"px",this.slPointer.style.top=d-7+"px")}},{key:"updatePointerA",value:function(e){if(this.options.showAlpha){var t=this.options.alphaBarSize[0]*e;this.alphaPointer.style.left=t-7+"px"}}}]),e}(),C=function(){function e(t){u(this,e),this.name=t,this.listeners=[]}return n(e,[{key:"on",value:function(e){e&&this.listeners.push(e)}},{key:"off",value:function(e){this.listeners=e?this.listeners.filter(function(t){return t!==e}):[]}},{key:"emit",value:function(e,t){for(var i=this.listeners.slice(0),n=0;n<i.length;n++)i[n].apply(t,e)}}]),e}();function k(e,t){var i=new _(e,t),n={change:new C("change"),coloradd:new C("coloradd"),colorremove:new C("colorremove")},s=!0,a={},l={get element(){return i.element},get rgb(){return[i.R,i.G,i.B]},set rgb(e){var t=o(e,3),n=t[0],s=t[1],a=t[2],l=[(0,r.limit)(n,0,255),(0,r.limit)(s,0,255),(0,r.limit)(a,0,255)];n=l[0],s=l[1],a=l[2],i.onValueChanged(m,[n,s,a,1])},get hsl(){return[i.H,i.S,i.L]},set hsl(e){var t=o(e,3),n=t[0],s=t[1],a=t[2],l=[(0,r.limit)(n,0,360),(0,r.limit)(s,0,100),(0,r.limit)(a,0,100)];n=l[0],s=l[1],a=l[2],i.onValueChanged(g,[n,s,a,1])},get rgbhex(){return this.all.hex},get rgba(){return[i.R,i.G,i.B,i.A]},set rgba(e){var t=o(e,4),n=t[0],s=t[1],a=t[2],l=t[3],u=[(0,r.limit)(n,0,255),(0,r.limit)(s,0,255),(0,r.limit)(a,0,255),(0,r.limit)(l,0,1)];n=u[0],s=u[1],a=u[2],l=u[3],i.onValueChanged(m,[n,s,a,l])},get hsla(){return[i.H,i.S,i.L,i.A]},set hsla(e){var t=o(e,4),n=t[0],s=t[1],a=t[2],l=t[3],u=[(0,r.limit)(n,0,360),(0,r.limit)(s,0,100),(0,r.limit)(a,0,100),(0,r.limit)(l,0,1)];n=u[0],s=u[1],a=u[2],l=u[3],i.onValueChanged(g,[n,s,a,l])},get color(){return this.all.toString()},set color(e){i.onValueChanged(f,e)},setColor:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];i.onValueChanged(f,e,{silent:t})},get all(){if(s){var e=[i.R,i.G,i.B,i.A],t=i.A<1?"rgba("+i.R+","+i.G+","+i.B+","+i.A+")":r.rgbToHex.apply(void 0,e);(a=(0,r.parseColor)(e,a)).toString=function(){return t},s=!1}return Object.assign({},a)},get onchange(){return n.change&&n.change.listeners[0]},set onchange(e){this.off("change").on("change",e)},get oncoloradd(){return n.coloradd&&n.coloradd.listeners[0]},set oncoloradd(e){this.off("coloradd").on("coloradd",e)},get oncolorremove(){return n.colorremove&&n.colorremove.listeners[0]},set oncolorremove(e){this.off("colorremove").on("colorremove",e)},get palette(){return Object.keys(i.palette).filter(function(e){return i.palette[e]})},set palette(e){i.updatePalette(e)},show:function(){i.element.classList.remove("hidden")},hide:function(){i.element.classList.add("hidden")},toggle:function(){i.element.classList.toggle("hidden")},on:function(e,t){return e&&n[e]&&n[e].on(t),this},off:function(e,t){return e&&n[e]&&n[e].off(t),this},destroy:function(){n.change.off(),n.coloradd.off(),n.colorremove.off(),i.element.remove(),n=null,i=null}};return i.onchange=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];s=!0,n.change.emit([l].concat(t),l)},i.oncoloradd=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];n.coloradd.emit([l].concat(t),l)},i.oncolorremove=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];n.colorremove.emit([l].concat(t),l)},i.element.ctrl=l,l}if("u">typeof window&&!document.querySelector('head>style[data-source="a-color-picker"]')){var S=i(5).toString(),E=document.createElement("style");E.setAttribute("type","text/css"),E.setAttribute("data-source","a-color-picker"),E.innerHTML=S,document.querySelector("head").appendChild(E)}t.createPicker=k,t.from=function(e,t){var i=(e?Array.isArray(e)?e:e instanceof HTMLElement?[e]:e instanceof NodeList?[].concat(c(e)):"string"==typeof e?[].concat(c(document.querySelectorAll(e))):e.jquery?e.get():[]:[]).map(function(e,i){var n=k(e,t);return n.index=i,n});return i.on=function(e,t){return i.forEach(function(i){return i.on(e,t)}),this},i.off=function(e){return i.forEach(function(t){return t.off(e)}),this},i},t.parseColorToRgb=r.parseColorToRgb,t.parseColorToRgba=r.parseColorToRgba,t.parseColorToHsl=r.parseColorToHsl,t.parseColorToHsla=r.parseColorToHsla,t.parseColor=r.parseColor,t.rgbToHex=r.rgbToHex,t.hslToRgb=r.hslToRgb,t.rgbToHsl=r.rgbToHsl,t.rgbToHsv=r.rgbToHsv,t.rgbToInt=r.rgbToInt,t.intToRgb=r.intToRgb,t.getLuminance=r.getLuminance,t.COLOR_NAMES=r.COLOR_NAMES,t.PALETTE_MATERIAL_500=r.PALETTE_MATERIAL_500,t.PALETTE_MATERIAL_CHROME=r.PALETTE_MATERIAL_CHROME,t.VERSION="1.2.1"},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.nvl=t.ensureArray=t.limit=t.getLuminance=t.parseColor=t.parseColorToHsla=t.parseColorToHsl=t.cssHslaToHsla=t.cssHslToHsl=t.parseColorToRgba=t.parseColorToRgb=t.cssRgbaToRgba=t.cssRgbToRgb=t.cssColorToRgba=t.cssColorToRgb=t.intToRgb=t.rgbToInt=t.rgbToHsv=t.rgbToHsl=t.hslToRgb=t.rgbToHex=t.PALETTE_MATERIAL_CHROME=t.PALETTE_MATERIAL_500=t.COLOR_NAMES=void 0;var n,o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var i=[],n=!0,o=!1,r=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(i.push(s.value),!t||i.length!==t);n=!0);}catch(e){o=!0,r=e}finally{try{!n&&a.return&&a.return()}finally{if(o)throw r}}return i}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")},r=(n=i(0))&&n.__esModule?n:{default:n};function s(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}var a={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",darkgreen:"#006400",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4","indianred ":"#CD5C5C","indigo ":"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",lightgreen:"#90EE90",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"};function l(e,t,i){return isNaN(e*=1)||t>e?t:e>i?i:e}function u(e,t){return null==e?t:e}function c(e,t,i){var n=[l(e,0,255),l(t,0,255),l(i,0,255)];return"#"+("000000"+((e=n[0])<<16|(t=n[1])<<8|(i=n[2])).toString(16)).slice(-6)}function d(e,t,i){var n=void 0,o=void 0,r=void 0,s=[l(e,0,360)/360,l(t,0,100)/100,l(i,0,100)/100];if(e=s[0],i=s[2],0==(t=s[1]))n=o=r=i;else{var a=function(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e},u=i<.5?i*(1+t):i+t-i*t,c=2*i-u;n=a(c,u,e+1/3),o=a(c,u,e),r=a(c,u,e-1/3)}return[255*n,255*o,255*r].map(Math.round)}function h(e,t,i){var n=[l(e,0,255)/255,l(t,0,255)/255,l(i,0,255)/255],o=Math.max(e=n[0],t=n[1],i=n[2]),r=Math.min(e,t,i),s=void 0,a=void 0,u=(o+r)/2;if(o==r)s=a=0;else{var c=o-r;switch(a=u>.5?c/(2-o-r):c/(o+r),o){case e:s=(t-i)/c+6*(t<i);break;case t:s=(i-e)/c+2;break;case i:s=(e-t)/c+4}s/=6}return[360*s,100*a,100*u].map(Math.round)}function p(e,t,i){return e<<16|t<<8|i}function f(e){if(e){var t=a[e.toString().toLowerCase()],i=o(/^\s*#?((([0-9A-F])([0-9A-F])([0-9A-F]))|(([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})))\s*$/i.exec(t||e)||[],10),n=i[3],r=i[4],s=i[5],l=i[7],u=i[8],c=i[9];if(void 0!==n)return[parseInt(n+n,16),parseInt(r+r,16),parseInt(s+s,16)];if(void 0!==l)return[parseInt(l,16),parseInt(u,16),parseInt(c,16)]}}function m(e){if(e){var t=a[e.toString().toLowerCase()],i=o(/^\s*#?((([0-9A-F])([0-9A-F])([0-9A-F])([0-9A-F])?)|(([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})?))\s*$/i.exec(t||e)||[],12),n=i[3],r=i[4],s=i[5],l=i[6],u=i[8],c=i[9],d=i[10],h=i[11];if(void 0!==n)return[parseInt(n+n,16),parseInt(r+r,16),parseInt(s+s,16),l?+(parseInt(l+l,16)/255).toFixed(2):1];if(void 0!==u)return[parseInt(u,16),parseInt(c,16),parseInt(d,16),h?+(parseInt(h,16)/255).toFixed(2):1]}}function g(e){if(e){var t=o(/^rgb\((\d+)[\s,](\d+)[\s,](\d+)\)/i.exec(e)||[],4),i=t[0],n=t[1],r=t[2],s=t[3];return i?[l(n,0,255),l(r,0,255),l(s,0,255)]:void 0}}function b(e){if(e){var t=o(/^rgba?\((\d+)\s*[\s,]\s*(\d+)\s*[\s,]\s*(\d+)(\s*[\s,]\s*(\d*(.\d+)?))?\)/i.exec(e)||[],6),i=t[0],n=t[1],r=t[2],s=t[3],a=t[5];return i?[l(n,0,255),l(r,0,255),l(s,0,255),l(u(a,1),0,1)]:void 0}}function v(e){if(Array.isArray(e))return[l(e[0],0,255),l(e[1],0,255),l(e[2],0,255),l(u(e[3],1),0,1)];var t=m(e)||b(e);return t&&3===t.length&&t.push(1),t}function y(e){if(e){var t=o(/^hsl\((\d+)[\s,](\d+)[\s,](\d+)\)/i.exec(e)||[],4),i=t[0],n=t[1],r=t[2],s=t[3];return i?[l(n,0,360),l(r,0,100),l(s,0,100)]:void 0}}function w(e){if(e){var t=o(/^hsla?\((\d+)\s*[\s,]\s*(\d+)\s*[\s,]\s*(\d+)(\s*[\s,]\s*(\d*(.\d+)?))?\)/i.exec(e)||[],6),i=t[0],n=t[1],r=t[2],s=t[3],a=t[5];return i?[l(n,0,255),l(r,0,255),l(s,0,255),l(u(a,1),0,1)]:void 0}}function _(e){if(Array.isArray(e))return[l(e[0],0,360),l(e[1],0,100),l(e[2],0,100),l(u(e[3],1),0,1)];var t=w(e);return t&&3===t.length&&t.push(1),t}function C(e,t){switch(t){case"rgb":default:return e.slice(0,3);case"rgbcss":return"rgb("+e[0]+", "+e[1]+", "+e[2]+")";case"rgbcss4":return"rgb("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")";case"rgba":return e;case"rgbacss":return"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")";case"hsl":return h.apply(void 0,s(e));case"hslcss":return"hsl("+(e=h.apply(void 0,s(e)))[0]+", "+e[1]+", "+e[2]+")";case"hslcss4":var i=h.apply(void 0,s(e));return"hsl("+i[0]+", "+i[1]+", "+i[2]+", "+e[3]+")";case"hsla":return[].concat(s(h.apply(void 0,s(e))),[e[3]]);case"hslacss":var n=h.apply(void 0,s(e));return"hsla("+n[0]+", "+n[1]+", "+n[2]+", "+e[3]+")";case"hex":return c.apply(void 0,s(e));case"hexcss4":return c.apply(void 0,s(e))+("00"+parseInt(255*e[3]).toString(16)).slice(-2);case"int":return p.apply(void 0,s(e))}}t.COLOR_NAMES=a,t.PALETTE_MATERIAL_500=["#F44336","#E91E63","#E91E63","#9C27B0","#9C27B0","#673AB7","#673AB7","#3F51B5","#3F51B5","#2196F3","#2196F3","#03A9F4","#03A9F4","#00BCD4","#00BCD4","#009688","#009688","#4CAF50","#4CAF50","#8BC34A","#8BC34A","#CDDC39","#CDDC39","#FFEB3B","#FFEB3B","#FFC107","#FFC107","#FF9800","#FF9800","#FF5722","#FF5722","#795548","#795548","#9E9E9E","#9E9E9E","#607D8B","#607D8B"],t.PALETTE_MATERIAL_CHROME=["#f44336","#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4caf50","#8bc34a","#cddc39","#ffeb3b","#ffc107","#ff9800","#ff5722","#795548","#9e9e9e","#607d8b"],t.rgbToHex=c,t.hslToRgb=d,t.rgbToHsl=h,t.rgbToHsv=function(e,t,i){var n=[l(e,0,255)/255,l(t,0,255)/255,l(i,0,255)/255],o,r=Math.max(e=n[0],t=n[1],i=n[2]),s=Math.min(e,t,i),a=void 0,u=r-s;if(o=0===r?0:u/r,r==s)a=0;else{switch(r){case e:a=(t-i)/u+6*(t<i);break;case t:a=(i-e)/u+2;break;case i:a=(e-t)/u+4}a/=6}return[a,o,r]},t.rgbToInt=p,t.intToRgb=function(e){return[e>>16&255,e>>8&255,255&e]},t.cssColorToRgb=f,t.cssColorToRgba=m,t.cssRgbToRgb=g,t.cssRgbaToRgba=b,t.parseColorToRgb=function(e){return Array.isArray(e)?e=[l(e[0],0,255),l(e[1],0,255),l(e[2],0,255)]:f(e)||g(e)},t.parseColorToRgba=v,t.cssHslToHsl=y,t.cssHslaToHsla=w,t.parseColorToHsl=function(e){return Array.isArray(e)?e=[l(e[0],0,360),l(e[1],0,100),l(e[2],0,100)]:y(e)},t.parseColorToHsla=_,t.parseColor=function(e,t){if(t=t||"rgb",null!=e){var i=void 0;if((i=v(e))||(i=_(e))&&(i=[].concat(s(d.apply(void 0,s(i))),[i[3]])))return(0,r.default)(t)?["rgb","rgbcss","rgbcss4","rgba","rgbacss","hsl","hslcss","hslcss4","hsla","hslacss","hex","hexcss4","int"].reduce(function(e,t){return e[t]=C(i,t),e},t||{}):C(i,t.toString().toLowerCase())}},t.getLuminance=function(e,t,i){return .2126*(e=(e/=255)<.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t=(t/=255)<.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*((i/=255)<.03928?i/12.92:Math.pow((i+.055)/1.055,2.4))},t.limit=l,t.ensureArray=function(e){return e?Array.from(e):[]},t.nvl=u},function(e,t,i){"use strict";e.exports=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)}},function(e,t){e.exports='<div class="a-color-picker-row a-color-picker-stack a-color-picker-row-top"> <canvas class="a-color-picker-sl a-color-picker-transparent"></canvas> <div class=a-color-picker-dot></div> </div> <div class=a-color-picker-row> <div class="a-color-picker-stack a-color-picker-transparent a-color-picker-circle"> <div class=a-color-picker-preview> <input class=a-color-picker-clipbaord type=text> </div> </div> <div class=a-color-picker-column> <div class="a-color-picker-cell a-color-picker-stack"> <canvas class=a-color-picker-h></canvas> <div class=a-color-picker-dot></div> </div> <div class="a-color-picker-cell a-color-picker-alpha a-color-picker-stack" show-on-alpha> <canvas class="a-color-picker-a a-color-picker-transparent"></canvas> <div class=a-color-picker-dot></div> </div> </div> </div> <div class="a-color-picker-row a-color-picker-hsl" show-on-hsl> <label>H</label> <input nameref=H type=number maxlength=3 min=0 max=360 value=0> <label>S</label> <input nameref=S type=number maxlength=3 min=0 max=100 value=0> <label>L</label> <input nameref=L type=number maxlength=3 min=0 max=100 value=0> </div> <div class="a-color-picker-row a-color-picker-rgb" show-on-rgb> <label>R</label> <input nameref=R type=number maxlength=3 min=0 max=255 value=0> <label>G</label> <input nameref=G type=number maxlength=3 min=0 max=255 value=0> <label>B</label> <input nameref=B type=number maxlength=3 min=0 max=255 value=0> </div> <div class="a-color-picker-row a-color-picker-rgbhex a-color-picker-single-input" show-on-single-input> <label>HEX</label> <input nameref=RGBHEX type=text select-on-focus> </div> <div class="a-color-picker-row a-color-picker-palette"></div>'},function(e,t,i){var n=i(6);e.exports="string"==typeof n?n:n.toString()},function(e,t,i){(e.exports=i(7)(!1)).push([e.i,"/*!\n * a-color-picker\n * https://github.com/narsenico/a-color-picker\n *\n * Copyright (c) 2017-2018, Gianfranco Caldi.\n * Released under the MIT License.\n */.a-color-picker{background-color:#fff;padding:0;display:inline-flex;flex-direction:column;user-select:none;width:232px;font:400 10px Helvetica,Arial,sans-serif;border-radius:3px;box-shadow:0 0 0 1px rgba(0,0,0,.05),0 2px 4px rgba(0,0,0,.25)}.a-color-picker,.a-color-picker-row,.a-color-picker input{box-sizing:border-box}.a-color-picker-row{padding:15px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;user-select:none}.a-color-picker-row-top{padding:0}.a-color-picker-row:not(:first-child){border-top:1px solid #f5f5f5}.a-color-picker-column{display:flex;flex-direction:column}.a-color-picker-cell{flex:1 1 auto;margin-bottom:4px}.a-color-picker-cell:last-child{margin-bottom:0}.a-color-picker-stack{position:relative}.a-color-picker-dot{position:absolute;width:14px;height:14px;top:0;left:0;background:#fff;pointer-events:none;border-radius:50px;z-index:1000;box-shadow:0 1px 2px rgba(0,0,0,.75)}.a-color-picker-a,.a-color-picker-h,.a-color-picker-sl{cursor:cell}.a-color-picker-a+.a-color-picker-dot,.a-color-picker-h+.a-color-picker-dot{top:-2px}.a-color-picker-a,.a-color-picker-h{border-radius:2px}.a-color-picker-preview{box-sizing:border-box;width:30px;height:30px;user-select:none;border-radius:15px}.a-color-picker-circle{border-radius:50px;border:1px solid #eee}.a-color-picker-hsl,.a-color-picker-rgb,.a-color-picker-single-input{justify-content:space-evenly}.a-color-picker-hsl>label,.a-color-picker-rgb>label,.a-color-picker-single-input>label{padding:0 8px;flex:0 0 auto;color:#969696}.a-color-picker-hsl>input,.a-color-picker-rgb>input,.a-color-picker-single-input>input{text-align:center;padding:2px 0;width:0;flex:1 1 auto;border:1px solid #e0e0e0;line-height:20px}.a-color-picker-hsl>input::-webkit-inner-spin-button,.a-color-picker-rgb>input::-webkit-inner-spin-button,.a-color-picker-single-input>input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.a-color-picker-hsl>input:focus,.a-color-picker-rgb>input:focus,.a-color-picker-single-input>input:focus{border-color:#04a9f4;outline:none}.a-color-picker-transparent{background-image:linear-gradient(-45deg,#cdcdcd 25%,transparent 0),linear-gradient(45deg,#cdcdcd 25%,transparent 0),linear-gradient(-45deg,transparent 75%,#cdcdcd 0),linear-gradient(45deg,transparent 75%,#cdcdcd 0);background-size:11px 11px;background-position:0 0,0 -5.5px,-5.5px 5.5px,5.5px 0}.a-color-picker-sl{border-radius:3px 3px 0 0}.a-color-picker.hide-alpha [show-on-alpha],.a-color-picker.hide-hsl [show-on-hsl],.a-color-picker.hide-rgb [show-on-rgb],.a-color-picker.hide-single-input [show-on-single-input]{display:none}.a-color-picker-clipbaord{width:100%;height:100%;opacity:0;cursor:pointer}.a-color-picker-palette{flex-flow:wrap;flex-direction:row;justify-content:flex-start;padding:10px}.a-color-picker-palette-color{width:15px;height:15px;flex:0 1 15px;margin:3px;box-sizing:border-box;cursor:pointer;border-radius:3px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1)}.a-color-picker-palette-add{text-align:center;line-height:13px;color:#607d8b}.a-color-picker.hidden{display:none}",""])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var i=function(e,t){var i=e[1]||"",n=e[3];if(!n)return i;if(t&&"function"==typeof btoa){var o="/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */";return[i].concat(n.sources.map(function(e){return"/*# sourceURL="+n.sourceRoot+e+" */"})).concat([o]).join("\n")}return[i].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+i+"}":i}).join("")},t.i=function(e,i){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},o=0;o<this.length;o++){var r=this[o][0];"number"==typeof r&&(n[r]=!0)}for(o=0;o<e.length;o++){var s=e[o];"number"==typeof s[0]&&n[s[0]]||(i&&!s[2]?s[2]=i:i&&(s[2]="("+s[2]+") and ("+i+")"),t.push(s))}},t}}],t={};function i(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t||4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)i.d(n,o,(function(t){return e[t]}).bind(null,o));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=1)}()},6441:function(e,t,i){"use strict";i.d(t,{Config:function(){return r}});var n=i(82758);let o={};class r{static get defaultOptions(){return r.__defaultOptions||(r.__defaultOptions=new r),r.__defaultOptions}constructor(){this.cache=!0,this.defaultTimeout=100,this.namespace="",this.safeMode=!1,this.width="auto",this.height="auto",this.safePluginsList=["about","enter","backspace","size","bold","hotkeys"],this.license="",this.preset="custom",this.presets={inline:{inline:!0,toolbar:!1,toolbarInline:!0,toolbarInlineForSelection:!0,showXPathInStatusbar:!1,showCharsCounter:!1,showWordsCounter:!1,showPlaceholder:!1}},this.ownerDocument=n.globalDocument,this.ownerWindow=n.globalWindow,this.shadowRoot=null,this.nonce="",this.zIndex=0,this.readonly=!1,this.disabled=!1,this.activeButtonsInReadOnly=["source","fullsize","print","about","dots","selectall"],this.allowCommandsInReadOnly=["selectall","preview","print"],this.toolbarButtonSize="middle",this.allowTabNavigation=!1,this.inline=!1,this.theme="default",this.saveModeInStorage=!1,this.asyncStorage={},this.editorClassName=!1,this.className=!1,this.style=!1,this.containerStyle=!1,this.styleValues={},this.triggerChangeEvent=!0,this.direction="",this.language="auto",this.debugLanguage=!1,this.i18n=!1,this.tabIndex=-1,this.toolbar=!0,this.statusbar=!0,this.showTooltip=!0,this.showTooltipDelay=200,this.useNativeTooltip=!1,this.defaultActionOnPaste=n.INSERT_AS_HTML,this.enter=n.PARAGRAPH,this.iframe=!1,this.editHTMLDocumentMode=!1,this.enterBlock="br"!==this.enter?this.enter:n.PARAGRAPH,this.defaultMode=n.MODE_WYSIWYG,this.useSplitMode=!1,this.colors={greyscale:["#000000","#434343","#666666","#999999","#B7B7B7","#CCCCCC","#D9D9D9","#EFEFEF","#F3F3F3","#FFFFFF"],palette:["#980000","#FF0000","#FF9900","#FFFF00","#00F0F0","#00FFFF","#4A86E8","#0000FF","#9900FF","#FF00FF"],full:["#E6B8AF","#F4CCCC","#FCE5CD","#FFF2CC","#D9EAD3","#D0E0E3","#C9DAF8","#CFE2F3","#D9D2E9","#EAD1DC","#DD7E6B","#EA9999","#F9CB9C","#FFE599","#B6D7A8","#A2C4C9","#A4C2F4","#9FC5E8","#B4A7D6","#D5A6BD","#CC4125","#E06666","#F6B26B","#FFD966","#93C47D","#76A5AF","#6D9EEB","#6FA8DC","#8E7CC3","#C27BA0","#A61C00","#CC0000","#E69138","#F1C232","#6AA84F","#45818E","#3C78D8","#3D85C6","#674EA7","#A64D79","#85200C","#990000","#B45F06","#BF9000","#38761D","#134F5C","#1155CC","#0B5394","#351C75","#733554","#5B0F00","#660000","#783F04","#7F6000","#274E13","#0C343D","#1C4587","#073763","#20124D","#4C1130"]},this.colorPickerDefaultTab="background",this.imageDefaultWidth=300,this.removeButtons=[],this.disablePlugins=[],this.extraPlugins=[],this.extraButtons=[],this.extraIcons={},this.createAttributes={table:{style:"border-collapse:collapse;width: 100%;"}},this.sizeLG=900,this.sizeMD=700,this.sizeSM=400,this.buttons=[{group:"font-style",buttons:[]},{group:"list",buttons:[]},{group:"font",buttons:[]},"---",{group:"script",buttons:[]},{group:"media",buttons:[]},"\n",{group:"state",buttons:[]},{group:"clipboard",buttons:[]},{group:"insert",buttons:[]},{group:"indent",buttons:[]},{group:"color",buttons:[]},{group:"form",buttons:[]},"---",{group:"history",buttons:[]},{group:"search",buttons:[]},{group:"source",buttons:[]},{group:"other",buttons:[]},{group:"info",buttons:[]}],this.events={},this.textIcons=!1,this.popupRoot=null,this.showBrowserColorPicker=!0,Object.assign(this,o)}}o=r.prototype,r.prototype.controls={}},26992:function(e,t,i){"use strict";i.d(t,{Async:function(){return f}});var n=i(82758),o=i(91898),r=i(12045),s=i(23282),a=i(84767),l=i(72430),u=i(14773),c=i(70799),d=i(86068),h=i(38837),p=i(93661);class f{delay(e){return this.promise(t=>this.setTimeout(t,e))}setTimeout(e,t,...i){if(this.isDestructed)return 0;let n={};(0,d.isVoid)(t)&&(t=0),(0,a.isNumber)(t)||(t=(n=t).timeout||0),n.label&&this.clearLabel(n.label);let r=(0,o.setTimeout)(e,t,...i),s=n.label||r;return this.timers.set(s,r),this.__callbacks.set(s,e),r}updateTimeout(e,t){if((0,h.assert)(e&&this.timers.has(e),"Label does not exist"),!e||!this.timers.has(e))return null;let i=this.__callbacks.get(e);return(0,h.assert)((0,s.isFunction)(i),"Callback is not a function"),this.setTimeout(i,{label:e,timeout:t})}clearLabel(e){e&&this.timers.has(e)&&((0,o.clearTimeout)(this.timers.get(e)),this.timers.delete(e),this.__callbacks.delete(e))}clearTimeout(e){if((0,c.isString)(e))return this.clearLabel(e);(0,o.clearTimeout)(e),this.timers.delete(e),this.__callbacks.delete(e)}debounce(e,t,i=!1){let n=0,a=!1,c=[],d=(...t)=>{if(!a){n=0;let i=e(...t);if(a=!0,c.length){let e=()=>{c.forEach(e=>e()),c.length=0};(0,u.isPromise)(i)?i.finally(e):e()}}},h=(...r)=>{a=!1,t?(!n&&i&&d(...r),(0,o.clearTimeout)(n),n=this.setTimeout(()=>d(...r),(0,s.isFunction)(t)?t():t),this.timers.set(e,n)):d(...r)};return(0,l.isPlainObject)(t)&&t.promisify?(...e)=>{let t=this.promise(e=>{c.push(e)}).catch(e=>{if((0,r.isAbortError)(e))return null;throw e});return h(...e),t}:h}microDebounce(e,t=!1){let i,n=!1,o=!0;return(...r)=>{if(i=r,n){o=!0;return}o=!0,t&&(o=!1,e(...i)),n=!0,this.__queueMicrotaskNative(()=>{n=!1,!this.isDestructed&&o&&e(...i)})}}throttle(e,t,i=!1){let n=null,o,r,a;return(...i)=>{(o=!0,a=i,t)?n||(r=()=>{o?(e(...a),o=!1,n=this.setTimeout(r,(0,s.isFunction)(t)?t():t),this.timers.set(r,n)):n=null})():e(...a)}}promise(e){let t=()=>{},i=new Promise((i,n)=>{t=()=>n((0,p.abort)("Abort async")),this.promisesRejections.add(t),e(i,n)});return!i.finally&&"u">typeof process&&!n.IS_ES_NEXT&&(i.finally=e=>(i.then(e).catch(e),i)),i.finally(()=>{this.promisesRejections.delete(t)}).catch(()=>null),i.rejectCallback=t,i}promiseState(e){if(e.status)return e.status;if(!Promise.race)return new Promise(t=>{e.then(e=>(t("fulfilled"),e),e=>{throw t("rejected"),e}),this.setTimeout(()=>{t("pending")},100)});let t={};return Promise.race([e,t]).then(e=>e===t?"pending":"fulfilled",()=>"rejected")}requestIdleCallback(e,t={timeout:100}){let i=this.__requestIdleCallbackNative(e,t);return this.__requestsIdle.add(i),i}requestIdlePromise(e){return this.promise(t=>{let i=this.requestIdleCallback(()=>t(i),e)})}schedulerPostTask(e,t={delay:0,priority:"user-visible"}){let i=new AbortController;if(t.signal&&t.signal.addEventListener("abort",()=>i.abort()),this.__controllers.add(i),void 0!==globalThis.scheduler){var n,o;let r=globalThis.scheduler.postTask(e,(n=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{},n=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(i).filter(function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable}))),n.forEach(function(t){var n;n=i[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},t),o=o={signal:i.signal},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t.push.apply(t,i)}return t})(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}),n));return r.finally(()=>{this.__controllers.delete(i)}).catch(()=>null),r}return this.promise((n,o)=>{let r=this.setTimeout(()=>{try{n(e())}catch(e){o(e)}this.__controllers.delete(i)},t.delay||1);i.signal.addEventListener("abort",()=>{this.clearTimeout(r),this.__controllers.delete(i),o((0,p.abort)())})})}schedulerYield(){return this.schedulerPostTask(()=>{},{priority:"user-visible"})}cancelIdleCallback(e){return this.__requestsIdle.delete(e),this.__cancelIdleCallbackNative(e)}requestAnimationFrame(e){let t=requestAnimationFrame(e);return this.__requestsRaf.add(t),t}cancelAnimationFrame(e){this.__requestsRaf.delete(e),cancelAnimationFrame(e)}clear(){this.__requestsIdle.forEach(e=>this.cancelIdleCallback(e)),this.__requestsRaf.forEach(e=>this.cancelAnimationFrame(e)),this.__controllers.forEach(e=>e.abort()),this.timers.forEach(e=>(0,o.clearTimeout)(this.timers.get(e))),this.timers.clear(),this.promisesRejections.forEach(e=>e()),this.promisesRejections.clear()}destruct(){this.clear(),this.isDestructed=!0}constructor(){var e,t,i,n,o;this.timers=new Map,this.__callbacks=new Map,this.__queueMicrotaskNative=null!=(e=null==queueMicrotask?void 0:queueMicrotask.bind(window))?e:Promise.resolve().then.bind(Promise.resolve()),this.promisesRejections=new Set,this.__requestsIdle=new Set,this.__controllers=new Set,this.__requestsRaf=new Set,this.__requestIdleCallbackNative=null!=(i=null==(t=window.requestIdleCallback)?void 0:t.bind(window))?i:(e,t)=>{var i;let n=Date.now();return this.setTimeout(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-n))})},null!=(i=null==t?void 0:t.timeout)?i:1)},this.__cancelIdleCallbackNative=null!=(o=null==(n=window.cancelIdleCallback)?void 0:n.bind(window))?o:e=>{this.clearTimeout(e)},this.isDestructed=!1}}},8884:function(e,t,i){"use strict";i.d(t,{Async:function(){return n.Async}});var n=i(26992)},4012:function(e,t,i){"use strict";i.d(t,{Component:function(){return l}});var n=i(8884),o=i(78213),r=i(580),s=i(21537);let a=new Map;class l{get componentName(){return this.__componentName||(this.__componentName="jodit-"+(0,s.kebabCase)(((0,s.isFunction)(this.className)?this.className():"")||(0,s.getClassName)(this))),this.__componentName}getFullElName(e,t,i){let n=[this.componentName];return e&&(e=e.replace(/[^a-z0-9-]/gi,"-"),n.push(`__${e}`)),t&&(n.push("_",t),n.push("_",(0,s.isVoid)(i)?"true":i.toString())),n.join("")}get ownerDocument(){return this.ow.document}get od(){return this.ownerDocument}get ow(){return this.ownerWindow}get(e,t){return(0,s.get)(e,t||this)}get isReady(){return this.componentStatus===o.STATUSES.ready}get isDestructed(){return this.componentStatus===o.STATUSES.destructed}get isInDestruct(){return o.STATUSES.beforeDestruct===this.componentStatus||o.STATUSES.destructed===this.componentStatus}bindDestruct(e){return e.hookStatus(o.STATUSES.beforeDestruct,()=>!this.isInDestruct&&this.destruct()),this}destruct(){this.setStatus(o.STATUSES.destructed),this.async&&(this.async.destruct(),this.async=void 0),a.get(this)&&a.delete(this),this.ownerWindow=void 0}get componentStatus(){return this.__componentStatus}set componentStatus(e){this.setStatus(e)}setStatus(e){return this.setStatusComponent(e,this)}setStatusComponent(e,t){if(e===this.__componentStatus)return;t===this&&(this.__componentStatus=e);let i=Object.getPrototypeOf(this);i&&(0,s.isFunction)(i.setStatusComponent)&&i.setStatusComponent(e,t);let n=a.get(this),o=null==n?void 0:n[e];o&&o.length&&o.forEach(e=>e(t))}hookStatus(e,t){let i=a.get(this);i||(i={},a.set(this,i)),i[e]||(i[e]=[]),i[e].push(t)}static isInstanceOf(e,t){return e instanceof t}constructor(){this.async=new n.Async,this.ownerWindow=window,this.__componentStatus=o.STATUSES.beforeInit,this.uid="jodit-uid-"+(0,r.uniqueUid)()}}l.STATUSES=o.STATUSES},91907:function(e,t,i){"use strict";i.d(t,{Component:function(){return n.Component},STATUSES:function(){return o.STATUSES},ViewComponent:function(){return r.ViewComponent}});var n=i(4012),o=i(78213),r=i(80480)},78213:function(e,t,i){"use strict";i.d(t,["STATUSES",0,{beforeInit:"beforeInit",ready:"ready",beforeDestruct:"beforeDestruct",destructed:"destructed"}])},80480:function(e,t,i){"use strict";i.d(t,{ViewComponent:function(){return o}});var n=i(4012);class o extends n.Component{get j(){return this.jodit}get defaultTimeout(){return this.j.defaultTimeout}i18n(e,...t){return this.j.i18n(e,...t)}setParentView(e){return this.jodit=e,e.ow&&(this.ownerWindow=e.ow),e.components.add(this),this}destruct(){return this.j.components.delete(this),super.destruct()}constructor(e){super(),this.setParentView(e)}}},82758:function(e,t,i){"use strict";i.r(t),i.d(t,{IS_TEST:function(){return n}});let n=!1,o="u">typeof window?window:void 0,r="u">typeof document?document:void 0,s=new Set(["ul","ol"]),a=["img","video","svg","iframe","script","input","textarea","link","jodit","jodit-media"],l=new Set([...a,"br","hr"]),u=new Set(a),c="Meta",d="Backspace",h="Enter",p="Escape",f="ArrowLeft",m="ArrowUp",g="ArrowRight",b="ArrowDown",v="Delete",y=[c,d,v,m,b,g,f,h,p,"F3","Tab"],w="u">typeof navigator&&(-1!==navigator.userAgent.indexOf("MSIE")||/rv:11.0/i.test(navigator.userAgent)),_=void 0!==o&&/Mac|iPod|iPhone|iPad/.test(o.navigator.platform),C=e=>{let t=e.split("/");return/\.js/.test(t[t.length-1])?{basePath:t.slice(0,t.length-1).join("/")+"/",isMin:!0}:{basePath:e,isMin:!0}},{basePath:k,isMin:S}=(()=>{if("u"<typeof document)return{basePath:"",isMin:!0};let e=r.currentScript;if(e)return C(e.src);let t=r.querySelectorAll("script[src]");return t&&t.length?C(t[t.length-1].src):C(o.location.href)})(),E=new Set(["touchstart","touchend","scroll","mousewheel","mousemove","touchmove"]);i.d(t,["ACCURACY",0,10,"APP_VERSION",0,"4.15.1","BASE_PATH",0,k,"BASE_PATH_IS_MIN",0,S,"BR",0,"br","CLIPBOARD_ID",0,"clipboard","COMMAND_KEYS",0,y,"EMULATE_DBLCLICK_TIMEOUT",0,300,"ES",0,"es2015","FAT_MODE",0,!0,"HOMEPAGE",0,"https://xdsoft.net/jodit/pro/","INSEPARABLE_TAGS",0,l,"INSERT_AS_HTML",0,"insert_as_html","INSERT_AS_TEXT",0,"insert_as_text","INSERT_CLEAR_HTML",0,"insert_clear_html","INSERT_ONLY_TEXT",0,"insert_only_text","INVISIBLE_SPACE",0,"\uFEFF","INVISIBLE_SPACE_REG_EXP",0,()=>/[\uFEFF]/g,"INVISIBLE_SPACE_REG_EXP_END",0,()=>/[\uFEFF]+$/g,"INVISIBLE_SPACE_REG_EXP_START",0,()=>/^[\uFEFF]+/g,"IS_BLOCK",0,/^(ADDRESS|ARTICLE|ASIDE|BLOCKQUOTE|CANVAS|DD|DFN|DIV|DL|DT|FIELDSET|FIGCAPTION|FIGURE|FOOTER|FORM|H[1-6]|HEADER|HGROUP|HR|LI|MAIN|NAV|NOSCRIPT|OUTPUT|P|PRE|RUBY|SCRIPT|STYLE|OBJECT|OL|SECTION|IFRAME|JODIT|JODIT-MEDIA|UL|TR|TD|TH|TBODY|THEAD|TFOOT|TABLE|BODY|HTML|VIDEO)$/i,"IS_ES_MODERN",0,!0,"IS_ES_NEXT",0,!1,"IS_IE",0,w,"IS_INLINE",0,/^(STRONG|SPAN|I|EM|B|SUP|SUB|A|U)$/i,"IS_MAC",0,_,"IS_PROD",0,!0,"KEY_ALIASES",0,{add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:_?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:"space",spacebar:"space",up:"arrowup",win:"meta",windows:"meta"},"KEY_ALT",0,"Alt","KEY_BACKSPACE",0,d,"KEY_DELETE",0,v,"KEY_DOWN",0,b,"KEY_ENTER",0,h,"KEY_ESC",0,p,"KEY_F3",0,"F3","KEY_LEFT",0,f,"KEY_META",0,c,"KEY_RIGHT",0,g,"KEY_SPACE",0,"Space","KEY_TAB",0,"Tab","KEY_UP",0,m,"LIST_TAGS",0,s,"MARKER_CLASS",0,"jodit-selection_marker","MODE_SOURCE",0,2,"MODE_SPLIT",0,3,"MODE_WYSIWYG",0,1,"NBSP_SPACE",0,"\xa0","NEARBY",0,5,"NO_EMPTY_TAGS",0,u,"PARAGRAPH",0,"p","PASSIVE_EVENTS",0,E,"SAFE_COUNT_CHANGE_CALL",0,10,"SET_TEST",0,()=>n=!0,"SOURCE_CONSUMER",0,"source-consumer","SPACE_REG_EXP",0,()=>/[\s\n\t\r\uFEFF\u200b]+/g,"SPACE_REG_EXP_END",0,()=>/[\s\n\t\r\uFEFF\u200b]+$/g,"SPACE_REG_EXP_START",0,()=>/^[\s\n\t\r\uFEFF\u200b]+/g,"TEMP_ATTR",0,"data-jodit-temp","TEXT_HTML",0,w?"html":"text/html","TEXT_PLAIN",0,w?"text":"text/plain","TEXT_RTF",0,w?"rtf":"text/rtf","TOKENS",0,{},"globalDocument",0,r,"globalWindow",0,o,"lang",0,{}])},20218:function(e,t,i){"use strict";i.d(t,{Create:function(){return a}});var n=i(82758),o=i(2748),r=i(21537),s=i(38837);class a{get doc(){return(0,r.isFunction)(this.document)?this.document():this.document}element(e,t,i){let n=this.doc.createElement(e.toLowerCase());return this.applyCreateAttributes(n),t&&((0,r.isPlainObject)(t)?(0,r.attr)(n,t):i=t),i&&(0,r.asArray)(i).forEach(e=>o.Dom.append(n,(0,r.isString)(e)?this.fromHTML(e):e)),n}div(e,t,i){let n=this.element("div",t,i);return e&&(n.className=e),n}sandbox(){var e;let t=this.element("iframe",{sandbox:"allow-same-origin"});o.Dom.append(this.doc.body,t);let i=null==(e=t.contentWindow)?void 0:e.document;if((0,s.assert)(i,"iframe.contentWindow.document"),!i)throw Error("Iframe error");return i.open(),i.write("<!DOCTYPE html><html><head></head><body></body></html>"),i.close(),[i.body,t]}span(e,t,i){let n=this.element("span",t,i);return e&&(n.className=e),n}a(e,t,i){let n=this.element("a",t,i);return e&&(n.className=e),n}text(e){return this.doc.createTextNode(e)}fake(){return this.text(n.INVISIBLE_SPACE)}fragment(){return this.doc.createDocumentFragment()}fromHTML(e,t){let i=this.div();i.innerHTML=e.toString();let n=i.firstChild===i.lastChild&&i.firstChild?i.firstChild:i;if(o.Dom.safeRemove(n),t){let e=(0,r.refs)(n);Object.keys(t).forEach(i=>{let n=e[i];n&&!1===t[i]&&o.Dom.hide(n)})}return n}applyCreateAttributes(e){if(this.createAttributes){let t=this.createAttributes;if(t&&t[e.tagName.toLowerCase()]){let i=t[e.tagName.toLowerCase()];(0,r.isFunction)(i)?i(e):(0,r.isPlainObject)(i)&&(0,r.attr)(e,i)}}}constructor(e,t){this.document=e,this.createAttributes=t}}},12060:function(e,t,i){"use strict";i.d(t,{Create:function(){return n.Create}});var n=i(20218)},45219:function(e,t,i){"use strict";i.d(t,{autobind:function(){return o}});var n=i(23282);function o(e,t,i){if(!(0,n.isFunction)(i.value))throw TypeError(`@autobind can only be applied to methods, but "${t}" is not a function`);let o=i.value;return{configurable:!0,get(){let e=o.bind(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e}}}},33433:function(e,t,i){"use strict";i.d(t,{cache:function(){return l},cacheHTML:function(){return u},cached:function(){return a}});var n=i(78213),o=i(2748),r=i(27613),s=i(82760);function a(e,t){let i=Object.getOwnPropertyDescriptor(e,t);return!i||(0,r.isFunction)(i.get)?null:i.value}function l(e,t,i){let n=i.get;if(!n)throw(0,s.error)("Getter property descriptor expected");i.get=function(){let e=n.call(this);return e&&!0===e.noCache||Object.defineProperty(this,t,{configurable:i.configurable,enumerable:i.enumerable,writable:!1,value:e}),e}}function u(e,t,i){let a=i.value;if(!(0,r.isFunction)(a))throw(0,s.error)("Handler must be a Function");let l=!0,u=new WeakMap;i.value=function(...e){var t;let i,n=null!=(i=this.od)?i:document,r=u.get(n);if(l&&(null==r?void 0:r.has(this.constructor)))return null==(t=r.get(this.constructor))?void 0:t.cloneNode(!0);let s=a.apply(this,e);return l&&o.Dom.isElement(s)&&(r?r.set(this.constructor,s):u.set(n,new WeakMap([[this.constructor,s]]))),l?s.cloneNode(!0):s},e.hookStatus(n.STATUSES.ready,e=>{l=!!((0,r.isViewObject)(e)?e:e.jodit).options.cache})}},87325:function(e,t,i){"use strict";i.d(t,{component:function(){return s},getComponentClass:function(){return a}});var n=i(82758),o=i(80568);let r=new Map;function s(e){class t extends e{constructor(...e){super(...e),this.constructor===t&&(this instanceof t||Object.setPrototypeOf(this,t.prototype),this.setStatus("ready"))}}let i=(0,o.getClassName)(e.prototype);if(r.has(i)&&!n.IS_PROD)throw Error(`Component with name "${i}" is already registered`);return r.set(i,t),t}function a(e){return r.get(e)}},81577:function(e,t,i){"use strict";i.d(t,{debounce:function(){return a},throttle:function(){return l}});var n=i(91907),o=i(27613),r=i(38837),s=i(89890);function a(e,t=!1,i="debounce"){return(a,l)=>{let u=a[l];if(!(0,o.isFunction)(u))throw(0,s.error)("Handler must be a Function");return a.hookStatus(n.STATUSES.ready,n=>{let{async:s}=n;(0,r.assert)(null!=s,`Component ${n.componentName||n.constructor.name} should have "async:IAsync" field`);let a=(0,o.isFunction)(e)?e(n):e,u=(0,o.isNumber)(a)||(0,o.isPlainObject)(a)?a:n.defaultTimeout;Object.defineProperty(n,l,{configurable:!0,value:s[i](n[l].bind(n),u,t)})}),{configurable:!0,get(){return u.bind(this)}}}}function l(e,t=!1){return a(e,t,"throttle")}},55153:function(e,t,i){"use strict";i.d(t,{derive:function(){return o}});var n=i(23282);function o(...e){return t=>{let i=t.prototype;for(let t=0;t<e.length;t++){let o=e[t],r=Object.getOwnPropertyNames(o.prototype);for(let e=0;e<r.length;e++){let t=r[e],s=Object.getOwnPropertyDescriptor(o.prototype,t);null!=s&&(0,n.isFunction)(s.value)&&!(0,n.isFunction)(i[t])&&Object.defineProperty(i,t,{enumerable:!0,configurable:!0,writable:!0,value:function(...e){return s.value.call(this,...e)}})}}}}},97357:function(e,t,i){"use strict";i.d(t,{hook:function(){return r}});var n=i(23282),o=i(89890);function r(e){return(t,i)=>{if(!(0,n.isFunction)(t[i]))throw(0,o.error)("Handler must be a Function");t.hookStatus(e,e=>{e[i].call(e)})}}},78927:function(e,t,i){"use strict";i.d(t,{idle:function(){return s}});var n=i(91907),o=i(23282),r=i(89890);function s(){return(e,t)=>{if(!(0,o.isFunction)(e[t]))throw(0,r.error)("Handler must be a Function");e.hookStatus(n.STATUSES.ready,e=>{let{async:i}=e,n=e[t];e[t]=(...t)=>i.requestIdleCallback(n.bind(e,...t))})}}},65478:function(e,t,i){"use strict";i.r(t),i.d(t,{autobind:function(){return n.autobind},cache:function(){return o.cache},cacheHTML:function(){return o.cacheHTML},cached:function(){return o.cached},component:function(){return r.component},debounce:function(){return s.debounce},derive:function(){return a.derive},getComponentClass:function(){return r.getComponentClass},hook:function(){return l.hook},idle:function(){return u.idle},nonenumerable:function(){return c.nonenumerable},persistent:function(){return d.persistent},throttle:function(){return s.throttle},wait:function(){return h.wait},watch:function(){return p.watch}});var n=i(45219),o=i(33433),r=i(87325),s=i(81577),a=i(55153),l=i(97357),u=i(78927),c=i(31589),d=i(53213),h=i(13525),p=i(37133)},31589:function(e,t,i){"use strict";i.d(t,["nonenumerable",0,(e,t)=>{!1!==(Object.getOwnPropertyDescriptor(e,t)||{}).enumerable&&Object.defineProperty(e,t,{enumerable:!1,set(e){Object.defineProperty(this,t,{enumerable:!1,writable:!0,value:e})}})}])},53213:function(e,t,i){"use strict";i.d(t,{persistent:function(){return r}});var n=i(78213),o=i(39955);function r(e,t){e.hookStatus(n.STATUSES.ready,e=>{let i=(0,o.isViewObject)(e)?e:e.jodit,n=`${i.options.namespace}${e.componentName}_prop_${t}`,r=e[t];Object.defineProperty(e,t,{get(){var e;return null!=(e=i.storage.get(n))?e:r},set(e){i.storage.set(n,e)}})})}},13525:function(e,t,i){"use strict";i.d(t,{wait:function(){return s}});var n=i(78213),o=i(23282),r=i(89890);function s(e){return(t,i)=>{let s=t[i];if(!(0,o.isFunction)(s))throw(0,r.error)("Handler must be a Function");t.hookStatus(n.STATUSES.ready,t=>{let{async:n}=t,o=t[i],r=0;Object.defineProperty(t,i,{configurable:!0,value:function i(...s){n.clearTimeout(r),e(t)?o.apply(t,s):r=n.setTimeout(()=>i(...s),10)}})})}}},37133:function(e,t,i){"use strict";i.d(t,{watch:function(){return d}});var n=i(78213),o=i(73026),r=i(46559),s=i(23282),a=i(72430),l=i(39955),u=i(89890),c=i(37790);function d(e,t){return(i,d)=>{var h;if(!(0,s.isFunction)(i[d]))throw(0,u.error)("Handler must be a Function");let p=null==(h=null==t?void 0:t.immediately)||h,f=null==t?void 0:t.context,m=t=>{let n=(0,l.isViewObject)(t)?t:t.jodit,u=(e,...i)=>{if(!t.isInDestruct)return t[d](e,...i)};p||(u=t.async.microDebounce(u,!0)),(0,r.splitArray)(e).forEach(e=>{if(/:/.test(e)){let[i,o]=e.split(":"),r=f;i.length&&(r=t.get(i)),(0,s.isFunction)(r)&&(r=r(t)),n.events.on(r||t,o,u),r||n.events.on(o,u),t.hookStatus("beforeDestruct",()=>{n.events.off(r||t,o,u).off(o,u)});return}let r=e.split("."),[l]=r,d=r.slice(1),h=t[l];(0,a.isPlainObject)(h)&&(0,o.observable)(h).on(`change.${d.join(".")}`,u);let p=(0,c.getPropertyDescriptor)(i,l);Object.defineProperty(t,l,{configurable:!0,set(e){let i=h;i!==e&&(h=e,p&&p.set&&p.set.call(t,e),(0,a.isPlainObject)(h)&&(h=(0,o.observable)(h)).on(`change.${d.join(".")}`,u),u(l,i,h))},get(){return p&&p.get?p.get.call(t):h}})})};(0,s.isFunction)(i.hookStatus)?i.hookStatus(n.STATUSES.ready,m):m(i)}}},2748:function(e,t,i){"use strict";i.d(t,{Dom:function(){return y}});var n=i(82758),o=i(4510),r=i(68345),s=i(23282),a=i(58487),l=i(42320),u=i(70799),c=i(86068),d=i(49055),h=i(38837),p=i(29960),f=i(41180),m=i(86583),g=i(89890),b=i(37790);let v=RegExp(`<([a-z]+)[^>]+${n.TEMP_ATTR}[^>]*>(.+?)</\\1>`,"gi");class y{static detach(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}static wrapNextInline(e,t,i){let n,o,r=e;i.s.save();do o=!1,(n=r.nextSibling)&&!y.isBlock(n)&&!y.isTag(n,"br")&&(o=!0,r=n);while(o);return y.__wrapElements(t,i,e,r)}static __wrapElements(e,t,i,n){let o=(0,u.isString)(e)?t.createInside.element(e):e;i.parentNode&&i.parentNode.insertBefore(o,i);let r=i;for(;r&&(r=i.nextSibling,o.appendChild(i),i!==n&&r);)i=r;return t.s.restore(),o}static wrapInline(e,t,i){let n,o,r=e,s=e;i.s.save();do o=!1,(n=r.previousSibling)&&!y.isBlock(n)&&(o=!0,r=n);while(o);do o=!1,(n=s.nextSibling)&&!y.isBlock(n)&&(o=!0,s=n);while(o);return y.__wrapElements(t,i,r,s)}static wrap(e,t,i){let n=(0,u.isString)(t)?i.element(t):t;if(y.isNode(e)){if(!e.parentNode)throw(0,g.error)("Element should be in DOM");e.parentNode.insertBefore(n,e),n.appendChild(e)}else{let t=e.extractContents();e.insertNode(n),n.appendChild(t)}return n}static unwrap(e){let t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);y.safeRemove(e)}}static between(e,t,i){let n=e;for(;n&&n!==t&&!(e!==n&&i(n));){let e=n.firstChild||n.nextSibling;if(!e){for(;n&&!n.nextSibling;)if((n=n.parentNode)===t)return;e=null==n?void 0:n.nextSibling}n=e}}static replace(e,t,i,n=!1,r=!1){let s;if((0,a.isHTML)(t)&&((0,h.assert)(i,"Need create instance for new tag"),t=i.fromHTML(t)),(0,u.isString)(t)?((0,h.assert)(i,"Need create instance for new tag"),s=i.element(t)):s=t,!r)for(;e.firstChild;)s.appendChild(e.firstChild);return n&&y.isElement(e)&&y.isElement(s)&&(0,o.toArray)(e.attributes).forEach(e=>{s.setAttribute(e.name,e.value)}),e.parentNode&&e.parentNode.replaceChild(s,e),s}static isEmptyTextNode(e){return y.isText(e)&&(!e.nodeValue||0===e.nodeValue.replace(n.INVISIBLE_SPACE_REG_EXP(),"").trim().length)}static isEmptyContent(e){return y.each(e,e=>y.isEmptyTextNode(e))}static isContentEditable(e,t){return y.isNode(e)&&!y.closest(e,e=>y.isElement(e)&&"false"===e.getAttribute("contenteditable"),t)}static isEmpty(e,t=n.NO_EMPTY_TAGS){let i;if(!e)return!0;i=(0,s.isFunction)(t)?t:e=>t.has(e.nodeName.toLowerCase());let o=e=>null==e.nodeValue||0===(0,d.trim)(e.nodeValue).length;return y.isText(e)?o(e):!(y.isElement(e)&&i(e))&&y.each(e,e=>{if(y.isText(e)&&!o(e)||y.isElement(e)&&i(e))return!1})}static isNode(e){return!!(e&&(0,u.isString)(e.nodeName)&&"number"==typeof e.nodeType&&e.childNodes&&(0,s.isFunction)(e.appendChild))}static isCell(e){return y.isNode(e)&&("TD"===e.nodeName||"TH"===e.nodeName)}static isList(e){return y.isTag(e,n.LIST_TAGS)}static isLeaf(e){return y.isTag(e,"li")}static isImage(e){return y.isNode(e)&&/^(img|svg|picture|canvas)$/i.test(e.nodeName)}static isBlock(e){return!(0,c.isVoid)(e)&&"object"==typeof e&&y.isNode(e)&&n.IS_BLOCK.test(e.nodeName)}static isText(e){return!!(e&&e.nodeType===Node.TEXT_NODE)}static isComment(e){return!!(e&&e.nodeType===Node.COMMENT_NODE)}static isElement(e){return!!y.isNode(e)&&e.nodeType===Node.ELEMENT_NODE}static isFragment(e){return!!y.isNode(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}static isHTMLElement(e){var t;if(!y.isNode(e))return!1;let i=null==(t=e.ownerDocument)?void 0:t.defaultView;return e instanceof(i?i.HTMLElement:HTMLElement)}static isInlineBlock(e){return y.isElement(e)&&!/^(BR|HR)$/i.test(e.tagName)&&-1!==["inline","inline-block"].indexOf((0,f.css)(e,"display").toString())}static canSplitBlock(e){return!(0,c.isVoid)(e)&&y.isHTMLElement(e)&&y.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&void 0!==e.style&&!/^(fixed|absolute)/i.test(e.style.position)}static first(e,t){return y.__deepMost(e,t,!1)}static last(e,t){return y.__deepMost(e,t,!0)}static __deepMost(e,t,i){let n=i?"lastChild":"firstChild",o=i?"previousSibling":"nextSibling",r=null==e?void 0:e[n];if(!r)return null;do{if(t(r))return r;let i=r[n]||r[o];if(!i&&r.parentNode!==e){do r=r.parentNode;while(r&&!r[o]&&r.parentNode!==e);i=null==r?void 0:r[o]}r=i}while(r);return null}static prev(e,t,i,n=!0){return y.find(e,t,i,!1,n)}static next(e,t,i,n=!0){return y.find(e,t,i,!0,n)}static prevWithClass(e,t){return y.__siblingWithClass(e,t,!0)}static nextWithClass(e,t){return y.__siblingWithClass(e,t,!1)}static __siblingWithClass(e,t,i){let n=e=>y.isElement(e)&&e.classList.contains(t),o=e.parentNode;return i?y.prev(e,n,o):y.next(e,n,o)}static find(e,t,i,n=!0,o=!0){let r=this.nextGen(e,i,n,o),s=r.next();for(;!s.done;){if(t(s.value))return s.value;s=r.next()}return null}static*nextGen(e,t,i=!0,n=!0){let o=[],r=e;do{let t=i?r.nextSibling:r.previousSibling;for(;t;)o.push(t),t=i?t.nextSibling:t.previousSibling;o.reverse(),yield*this.runInStack(e,o,i,n),r=r.parentNode}while(r&&r!==t);return null}static each(e,t,i=!0){let n=this.eachGen(e,i),o=n.next();for(;!o.done;){if(!1===t(o.value))return!1;o=n.next()}return!0}static eachGen(e,t=!0){return this.runInStack(e,[e],t)}static*runInStack(e,t,i,n=!0){for(;t.length;){let o=t.pop();if(n){let e=i?o.lastChild:o.firstChild;for(;e;)t.push(e),e=i?e.previousSibling:e.nextSibling}e!==o&&(yield o)}}static findWithCurrent(e,t,i,n="nextSibling",o="firstChild"){let r=e;do{if(t(r))return r||null;if(o&&r&&r[o]){let e=y.findWithCurrent(r[o],t,r,n,o);if(e)return e}for(;r&&!r[n]&&r!==i;)r=r.parentNode;r&&r[n]&&r!==i&&(r=r[n])}while(r&&r!==i);return null}static findSibling(e,t=!0,i=e=>!y.isEmptyTextNode(e)){let n=y.sibling(e,t);for(;n&&!i(n);)n=y.sibling(n,t);return n&&i(n)?n:null}static findNotEmptySibling(e,t){return y.findSibling(e,t,e=>{var t;return!y.isEmptyTextNode(e)&&!!(!y.isText(e)||(null==(t=e.nodeValue)?void 0:t.length)&&(0,d.trim)(e.nodeValue))})}static findNotEmptyNeighbor(e,t,i){return(0,b.call)(t?y.prev:y.next,e,e=>!!(e&&(!(y.isText(e)||y.isComment(e))||(0,d.trim)((null==e?void 0:e.nodeValue)||"").length)),i)}static sibling(e,t){return t?e.previousSibling:e.nextSibling}static up(e,t,i,n=!1){let o=e;if(!o)return null;do{if(t(o))return o;if(o===i||!o.parentNode)break;o=o.parentNode}while(o&&o!==i);return o===i&&n&&t(o)?o:null}static closest(e,t,i){let n,o=e=>e.toLowerCase();if((0,s.isFunction)(t))n=t;else if((0,r.isArray)(t)||(0,l.isSet)(t)){let e=(0,l.isSet)(t)?t:new Set(t.map(o));n=t=>!!(t&&e.has(o(t.nodeName)))}else n=e=>!!(e&&o(t)===o(e.nodeName));return y.up(e,n,i)}static furthest(e,t,i){let n=null,o=null==e?void 0:e.parentElement;for(;o&&o!==i;)t(o)&&(n=o),o=null==o?void 0:o.parentElement;return n}static appendChildFirst(e,t){e.firstChild!==t&&y.prepend(e,t)}static after(e,t){var i;null==(i=e.parentNode)||i.insertBefore(t,e.nextSibling)}static before(e,t){var i;null==(i=e.parentNode)||i.insertBefore(t,e)}static prepend(e,t){e.insertBefore(t,e.firstChild)}static append(e,t){(0,r.isArray)(t)?t.forEach(t=>{this.append(e,t)}):e.appendChild(t)}static moveContent(e,t,i=!1,r=()=>!0){let s=(e.ownerDocument||n.globalDocument).createDocumentFragment();(0,o.toArray)(e.childNodes).filter(e=>!!r(e)||(y.safeRemove(e),!1)).forEach(e=>{s.appendChild(e)}),t.insertBefore(s,i?t.firstChild:null)}static isOrContains(e,t,i=!1){return e===t?!i:!!(t&&e&&this.up(t,t=>t===e,e,!0))}static safeRemove(...e){e.forEach(e=>y.isNode(e)&&e.parentNode&&e.parentNode.removeChild(e))}static safeInsertNode(e,t){e.collapsed||e.deleteContents();let i=y.isFragment(t)?t.lastChild:t;e.startContainer===e.endContainer&&e.collapsed&&y.isTag(e.startContainer,n.INSEPARABLE_TAGS)?y.after(e.startContainer,t):(e.insertNode(t),i&&e.setStartBefore(i)),e.collapse(!0),[t.nextSibling,t.previousSibling].forEach(e=>y.isText(e)&&!e.nodeValue&&y.safeRemove(e))}static hide(e){e&&((0,m.dataBind)(e,"__old_display",e.style.getPropertyValue("display")),e.style.setProperty("display","none"))}static show(e){if(!e)return;let t=(0,m.dataBind)(e,"__old_display");"none"===e.style.getPropertyValue("display")&&e.style.setProperty("display",t||null)}static isTag(e,t){if(Array.isArray(t))throw TypeError("Dom.isTag does not support array");if(!this.isElement(e))return!1;let i=e.tagName.toLowerCase();return t instanceof Set?t.has(i)||t.has(e.tagName.toUpperCase()):i===t||e.tagName.toUpperCase()===t}static markTemporary(e,t){return t&&(0,p.attr)(e,t),(0,p.attr)(e,n.TEMP_ATTR,!0),e}static isTemporary(e){return!!y.isElement(e)&&(y.isMarker(e)||"true"===(0,p.attr)(e,n.TEMP_ATTR))}static isMarker(e){return y.isNode(e)&&y.isTag(e,"span")&&e.hasAttribute("data-"+n.MARKER_CLASS)}static replaceTemporaryFromString(e){return e.replace(v,"$2")}static temporaryList(e){let t=[];return y.each(e,e=>{y.isHTMLElement(e)&&e.hasAttribute(n.TEMP_ATTR)&&t.push(e)}),t}constructor(){throw Error("Dom is static module")}}},22732:function(e,t,i){"use strict";i.d(t,{Dom:function(){return n.Dom},LazyWalker:function(){return o.LazyWalker}});var n=i(2748),o=i(70071)},70071:function(e,t,i){"use strict";i.d(t,{LazyWalker:function(){return s}});var n=i(45219),o=i(2748),r=i(72757);class s extends r.Eventify{setWork(e){return this.isWorked?this.break():this.stop(),this.workNodes=o.Dom.eachGen(e,!this.options.reverse),this.isFinished=!1,this.hadAffect=!1,this._requestStarting(),this}_requestStarting(){this.__schedulerController=new AbortController,this.async.schedulerPostTask(this.__workPerform,{delay:this.options.timeout,signal:this.__schedulerController.signal}).catch(()=>null)}break(e){this.isWorked&&(this.stop(),this.emit("break",e))}end(){this.isWorked&&(this.stop(),this.emit("end",this.hadAffect),this.hadAffect=!1)}stop(){var e;this.isWorked=!1,this.isFinished=!0,this.workNodes=null,null==(e=this.__schedulerController)||e.abort(),this.__schedulerController=null}destruct(){super.destruct(),this.stop()}__workPerform(){var e;if(this.workNodes){this.isWorked=!0;let t=0,i=null!=(e=this.options.timeoutChunkSize)?e:50;for(;!this.isFinished&&t<i;){let e=this.workNodes.next();if(t+=1,this.visitNode(e.value)&&(this.hadAffect=!0),e.done)return void this.end()}}else this.end();this.isFinished||this._requestStarting()}visitNode(e){var t;return!!e&&(void 0===this.options.whatToShow||e.nodeType===this.options.whatToShow)&&null!=(t=this.emit("visit",e))&&t}constructor(e,t={}){super(),this.async=e,this.options=t,this.workNodes=null,this.hadAffect=!1,this.isWorked=!1,this.isFinished=!1,this.__schedulerController=null}}!function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([n.autobind],s.prototype,"__workPerform",null)},98220:function(e,t,i){"use strict";i.d(t,{EventEmitter:function(){return c}});var n=i(82758),o=i(46559),r=i(68345),s=i(23282),a=i(70799),l=i(89890),u=i(15738);class c{mute(e){return this.__mutedEvents.add(null!=e?e:"*"),this}isMuted(e){return!!(e&&this.__mutedEvents.has(e))||this.__mutedEvents.has("*")}unmute(e){return this.__mutedEvents.delete(null!=e?e:"*"),this}__eachEvent(e,t){(0,o.splitArray)(e).map(e=>e.trim()).forEach(e=>{let i=e.split("."),n=i[1]||u.defaultNameSpace;t.call(this,i[0],n)})}__getStore(e){if(!e)throw(0,l.error)("Need subject");if(void 0===e[this.__key]){let t=new u.EventHandlersStore;Object.defineProperty(e,this.__key,{enumerable:!1,configurable:!0,writable:!0,value:t})}return e[this.__key]}__removeStoreFromSubject(e){void 0!==e[this.__key]&&delete e[this.__key]}__triggerNativeEvent(e,t){let i=this.__doc.createEvent("HTMLEvents");(0,a.isString)(t)?i.initEvent(t,!0,!0):(i.initEvent(t.type,t.bubbles,t.cancelable),["screenX","screenY","clientX","clientY","target","srcElement","currentTarget","timeStamp","which","keyCode"].forEach(e=>{Object.defineProperty(i,e,{value:t[e],enumerable:!0})}),Object.defineProperty(i,"originalEvent",{value:t,enumerable:!0})),e.dispatchEvent(i)}get current(){return this.currents[this.currents.length-1]}on(e,t,i,o){let u,c,h,p;if((0,a.isString)(e)||(0,a.isStringArray)(e)?(u=this,c=e,h=t,p=i):(u=e,c=t,h=i,p=o),!((0,a.isString)(c)||(0,a.isStringArray)(c))||0===c.length)throw(0,l.error)("Need events names");if(!(0,s.isFunction)(h))throw(0,l.error)("Need event handler");if((0,r.isArray)(u))return u.forEach(e=>{this.on(e,c,h,p)}),this;let f=u,m=this.__getStore(f),g=this,b=function(e,...t){if(!g.isMuted(e))return h&&h.call(this,...t)};return d(f)&&(b=function(e){if(!g.isMuted(e.type)&&(g.__prepareEvent(e),h&&!1===h.call(this,e)))return e.preventDefault(),e.stopImmediatePropagation(),!1}),this.__eachEvent(c,(e,t)=>{var i,o;if(0===e.length)throw(0,l.error)("Need event name");if(!1===m.indexOf(e,t,h)){let r={event:e,originalCallback:h,syntheticCallback:b};if(m.set(e,t,r,null==p?void 0:p.top),d(f)){let t=n.PASSIVE_EVENTS.has(e)?{passive:!0,capture:null!=(i=null==p?void 0:p.capture)&&i}:null!=(o=null==p?void 0:p.capture)&&o;b.options=t,f.addEventListener(e,b,t),this.__memoryDOMSubjectToHandler(f,b)}}}),this}__memoryDOMSubjectToHandler(e,t){let i=this.__domEventsMap.get(e)||new Set;i.add(t),this.__domEventsMap.set(e,i)}__unmemoryDOMSubjectToHandler(e,t){let i=this.__domEventsMap,n=i.get(e)||new Set;n.delete(t),n.size?i.set(e,n):i.delete(e)}one(e,t,i,n){let o,r,s,l;(0,a.isString)(e)||(0,a.isStringArray)(e)?(o=this,r=e,s=t,l=i):(o=e,r=t,s=i,l=n);let u=(...e)=>(this.off(o,r,u),s(...e));return this.on(o,r,u,l),this}off(e,t,i){let n,o,l;if((0,a.isString)(e)||(0,a.isStringArray)(e)?(n=this,o=e,l=t):(n=e,o=t,l=i),(0,r.isArray)(n))return n.forEach(e=>{this.off(e,o,l)}),this;let c=n,h=this.__getStore(c);if(!((0,a.isString)(o)||(0,a.isStringArray)(o))||0===o.length)return h.namespaces().forEach(e=>{this.off(c,"."+e)}),this.__removeStoreFromSubject(c),this;let p=e=>{var t;d(c)&&(c.removeEventListener(e.event,e.syntheticCallback,null!=(t=e.syntheticCallback.options)&&t),this.__unmemoryDOMSubjectToHandler(c,e.syntheticCallback))},f=(e,t)=>{if(""===e)return void h.events(t).forEach(e=>{""!==e&&f(e,t)});let i=h.get(e,t);if(i&&i.length)if((0,s.isFunction)(l)){let n=h.indexOf(e,t,l);!1!==n&&(p(i[n]),i.splice(n,1),i.length||h.clearEvents(t,e))}else i.forEach(p),i.length=0,h.clearEvents(t,e)};return this.__eachEvent(o,(e,t)=>{t===u.defaultNameSpace?h.namespaces().forEach(t=>{f(e,t)}):f(e,t)}),h.isEmpty()&&this.__removeStoreFromSubject(c),this}stopPropagation(e,t){let i=(0,a.isString)(e)?this:e,n=(0,a.isString)(e)?e:t;if("string"!=typeof n)throw(0,l.error)("Need event names");let o=this.__getStore(i);this.__eachEvent(n,(e,t)=>{let n=o.get(e,t);n&&this.__stopped.push(n),t===u.defaultNameSpace&&o.namespaces(!0).forEach(t=>this.stopPropagation(i,e+"."+t))})}__removeStop(e){if(e){let t=this.__stopped.indexOf(e);-1!==t&&this.__stopped.splice(0,t+1)}}__isStopped(e){return void 0!==e&&-1!==this.__stopped.indexOf(e)}fire(e,t,...i){let n,o,r=(0,a.isString)(e)?this:e,s=(0,a.isString)(e)?e:t,c=(0,a.isString)(e)?[t,...i]:i;if(!d(r)&&!(0,a.isString)(s))throw(0,l.error)("Need events names");let h=this.__getStore(r);return!(0,a.isString)(s)&&d(r)?this.__triggerNativeEvent(r,t):this.__eachEvent(s,(e,t)=>{if(d(r))this.__triggerNativeEvent(r,e);else{let i=h.get(e,t);if(i)try{[...i].every(t=>!this.__isStopped(i)&&(this.currents.push(e),o=t.syntheticCallback.call(r,e,...c),this.currents.pop(),void 0!==o&&(n=o),!0))}finally{this.__removeStop(i)}t!==u.defaultNameSpace||d(r)||h.namespaces().filter(e=>e!==t).forEach(t=>{let i=this.fire.apply(this,[r,e+"."+t,...c]);void 0!==i&&(n=i)})}}),n}destruct(){this.__isDestructed||(this.__isDestructed=!0,this.__domEventsMap.forEach((e,t)=>{this.off(t)}),this.__domEventsMap.clear(),this.__mutedEvents.clear(),this.currents.length=0,this.__stopped.length=0,this.off(this),this.__getStore(this).clear(),this.__removeStoreFromSubject(this))}constructor(e){this.__domEventsMap=new Map,this.__mutedEvents=new Set,this.__key="__JoditEventEmitterNamespaces",this.__doc=n.globalDocument,this.__prepareEvent=e=>{!e.cancelBubble&&(e.composed&&(0,s.isFunction)(e.composedPath)&&e.composedPath()[0]&&Object.defineProperty(e,"target",{value:e.composedPath()[0],configurable:!0,enumerable:!0}),e.type.match(/^touch/)&&e.changedTouches&&e.changedTouches.length&&["clientX","clientY","pageX","pageY"].forEach(t=>{Object.defineProperty(e,t,{value:e.changedTouches[0][t],configurable:!0,enumerable:!0})}),e.originalEvent||(e.originalEvent=e),"paste"===e.type&&void 0===e.clipboardData&&this.__doc.defaultView.clipboardData&&Object.defineProperty(e,"clipboardData",{get:()=>this.__doc.defaultView.clipboardData,configurable:!0,enumerable:!0}))},this.currents=[],this.__stopped=[],this.__isDestructed=!1,e&&(this.__doc=e),this.__key+=new Date().getTime()}}function d(e){return e&&(0,s.isFunction)(e.addEventListener)}},72757:function(e,t,i){"use strict";i.d(t,{Eventify:function(){return n}});class n{on(e,t){var i;return this.__map.has(e)||this.__map.set(e,new Set),null==(i=this.__map.get(e))||i.add(t),this}off(e,t){var i;return this.__map.has(e)&&(null==(i=this.__map.get(e))||i.delete(t)),this}destruct(){this.__map.clear()}emit(e,...t){var i;let n;return this.__map.has(e)&&(null==(i=this.__map.get(e))||i.forEach(e=>{n=e(...t)})),n}constructor(){this.__map=new Map}}},57012:function(e,t,i){"use strict";let n=new(i(98220)).EventEmitter;i.d(t,["eventEmitter",0,n])},3827:function(e,t,i){"use strict";i.d(t,{EventEmitter:function(){return n.EventEmitter},EventHandlersStore:function(){return s.EventHandlersStore},Eventify:function(){return o.Eventify},defaultNameSpace:function(){return s.defaultNameSpace},observable:function(){return r.observable}});var n=i(98220),o=i(72757),r=i(73026),s=i(15738)},73026:function(e,t,i){"use strict";i.d(t,{observable:function(){return u}});var n=i(68345),o=i(59292),r=i(72430),s=i(37790);let a=Symbol("observable-object");function l(e){return void 0!==e[a]}function u(e){if(l(e))return e;let t={},i={},u=(t,o)=>((0,n.isArray)(t)?t.map(e=>u(e,o)):(i[t]||(i[t]=[]),i[t].push(o)),e),c=(o,...r)=>{if((0,n.isArray)(o))return void o.map(e=>c(e,...r));try{!t[o]&&i[o]&&(t[o]=!0,i[o].forEach(t=>t.call(e,...r)))}finally{t[o]=!1}},d=(t,i=[])=>{let n={};l(t)||(Object.defineProperty(t,a,{enumerable:!1,value:!0}),Object.keys(t).forEach(a=>{let l=i.concat(a).filter(e=>e.length);n[a]=t[a];let u=(0,s.getPropertyDescriptor)(t,a);Object.defineProperty(t,a,{set:t=>{let i=n[a];if(!(0,o.isFastEqual)(n[a],t)){c(["beforeChange",`beforeChange.${l.join(".")}`],a,t),(0,r.isPlainObject)(t)&&d(t,l),u&&u.set?u.set.call(e,t):n[a]=t;let o=[];c(["change",...l.reduce((e,t)=>(o.push(t),e.push(`change.${o.join(".")}`),e),[])],l.join("."),i,(null==t?void 0:t.valueOf)?t.valueOf():t)}},get:()=>u&&u.get?u.get.call(e):n[a],enumerable:!0,configurable:!0}),(0,r.isPlainObject)(n[a])&&d(n[a],l)}),Object.defineProperty(e,"on",{value:u}))};return d(e),e}},15738:function(e,t,i){"use strict";i.d(t,{EventHandlersStore:function(){return s}});var n=i(4510),o=i(38837);let r="JoditEventDefaultNamespace";class s{get(e,t){if(this.__store.has(t)){let i=this.__store.get(t);return(0,o.assert)(i,"-"),i[e]}}indexOf(e,t,i){let n=this.get(e,t);if(n){for(let e=0;e<n.length;e+=1)if(n[e].originalCallback===i)return e}return!1}namespaces(e=!1){let t=(0,n.toArray)(this.__store.keys());return e?t.filter(e=>e!==r):t}events(e){let t=this.__store.get(e);return t?Object.keys(t):[]}set(e,t,i,n=!1){let o=this.__store.get(t);o||(o={},this.__store.set(t,o)),void 0===o[e]&&(o[e]=[]),n?o[e].unshift(i):o[e].push(i)}clear(){this.__store.clear()}clearEvents(e,t){let i=this.__store.get(e);i&&i[t]&&(delete i[t],Object.keys(i).length||this.__store.delete(e))}isEmpty(){return 0===this.__store.size}constructor(){this.__store=new Map}}i.d(t,["defaultNameSpace",0,r])},580:function(e,t,i){"use strict";i.d(t,{getContainer:function(){return y},getPopupViewRoot:function(){return w},uniqueUid:function(){return g}});var n=i(19306),o=i(70799),r=i(39955),s=i(12475),a=i(29960),l=i(41180),u=i(80568),c=i(41876),d=i(57012),h=i(82758),p=i(22732);let f=1,m=new Set;function g(){function e(){return Math.round(f+=10*(Math.random()+1)).toString(16)}let t=e();for(;m.has(t);)t=e();return m.add(t),t}let b=new c.PluginSystem({getContainer:y}),v=new WeakMap;function y(e,t,i="div",l=!1){let c,d=(0,o.isString)(t)?t:t?(0,u.getClassName)(t.prototype):"jodit-utils",h=v.get(e)||{},f=d+i,m=(0,r.isViewObject)(e)?e:e.j;if(!h[f]){let t=m.c;if(c=w(m.o,m.container,e.od.body),l&&(0,n.isJoditObject)(e)&&e.od!==e.ed){t=e.createInside;let o="style"===i?e.ed.head:e.ed.body;c=(0,n.isJoditObject)(e)&&e.o.shadowRoot?e.o.shadowRoot:o}let o=t.element(i,{className:`jodit jodit-${(0,s.kebabCase)(d)}-container jodit-box`});m.o.nonce&&("style"===i||"script"===i)&&(0,a.attr)(o,"nonce",m.o.nonce),o.classList.add(`jodit_theme_${m.o.theme||"default"}`),p.Dom.append(c,o),h[f]=o,e.hookStatus("beforeDestruct",()=>{m.events.off(o),p.Dom.safeRemove(o),delete h[f],Object.keys(h).length&&v.delete(e)}),v.set(e,h),m.events.fire("getContainer",o)}return h[f].classList.remove("jodit_theme_default","jodit_theme_dark"),h[f].classList.add(`jodit_theme_${m.o.theme||"default"}`),h[f]}function w(e,t,i){var n,o,r;return null!=(r=null!=(o=null!=(n=e.popupRoot)?n:e.shadowRoot)?o:p.Dom.closest(t,e=>p.Dom.isHTMLElement(e)&&(p.Dom.isTag(e,"dialog")||["fixed","absolute"].includes((0,l.css)(e,"position"))),i))?r:i}let _=d.eventEmitter;i.d(t,["eventEmitter",0,_,"extendLang",0,e=>{Object.keys(e).forEach(t=>{h.lang[t]?Object.assign(h.lang[t],e[t]):h.lang[t]=e[t]})},"instances",0,{},"modules",0,{},"pluginSystem",0,b])},29999:function(e,t,i){"use strict";var n=i(68345);i.d(t,["asArray",0,e=>(0,n.isArray)(e)?e:[e]])},76855:function(e,t,i){"use strict";i.d(t,{asArray:function(){return n.asArray},splitArray:function(){return o.splitArray},toArray:function(){return r.toArray}});var n=i(29999),o=i(46559),r=i(4510)},46559:function(e,t,i){"use strict";function n(e){return Array.isArray(e)?e:e.split(/[,\s]+/)}i.d(t,{splitArray:function(){return n}})},4510:function(e,t,i){"use strict";var n=i(70722),o=i(58844);i.d(t,["toArray",0,function(...e){var t;return((0,n.isNativeFunction)(Array.from)?Array.from:null!=(t=(0,o.reset)("Array.from"))?t:Array.from).apply(Array,e)}])},91898:function(e,t,i){"use strict";i.d(t,{clearTimeout:function(){return n.clearTimeout},setTimeout:function(){return n.setTimeout}});var n=i(13252)},13252:function(e,t,i){"use strict";i.d(t,{clearTimeout:function(){return r},setTimeout:function(){return o}});var n=i(82758);function o(e,t,...i){return t?n.globalWindow.setTimeout(e,t,...i):(e.call(null,...i),0)}function r(e){n.globalWindow.clearTimeout(e)}},54765:function(e,t,i){"use strict";i.d(t,{hasBrowserColorPicker:function(){return o}});var n=i(82758);function o(){let e;try{let t=n.globalDocument.createElement("input");t.type="color",t.value="!",e="color"===t.type&&"!"!==t.value}catch(t){e=!1}return e}},27613:function(e,t,i){"use strict";i.d(t,{hasBrowserColorPicker:function(){return n.hasBrowserColorPicker},hasContainer:function(){return d.hasContainer},isAbortError:function(){return o.isAbortError},isArray:function(){return r.isArray},isBoolean:function(){return s.isBoolean},isDestructable:function(){return d.isDestructable},isEqual:function(){return a.isEqual},isFastEqual:function(){return a.isFastEqual},isFunction:function(){return l.isFunction},isHTML:function(){return u.isHTML},isHtmlFromWord:function(){return c.isHtmlFromWord},isInitable:function(){return d.isInitable},isInt:function(){return h.isInt},isJoditObject:function(){return p.isJoditObject},isLicense:function(){return f.isLicense},isMarker:function(){return m.isMarker},isNativeFunction:function(){return g.isNativeFunction},isNumber:function(){return b.isNumber},isNumeric:function(){return v.isNumeric},isPlainObject:function(){return y.isPlainObject},isPromise:function(){return w.isPromise},isSet:function(){return _.isSet},isString:function(){return C.isString},isStringArray:function(){return C.isStringArray},isURL:function(){return k.isURL},isValidName:function(){return S.isValidName},isViewObject:function(){return E.isViewObject},isVoid:function(){return x.isVoid},isWindow:function(){return F.isWindow}});var n=i(54765),o=i(12045),r=i(68345),s=i(87612),a=i(59292),l=i(23282),u=i(58487),c=i(29673),d=i(60132),h=i(72913),p=i(19306),f=i(45603),m=i(78116),g=i(70722),b=i(84767),v=i(29807),y=i(72430),w=i(14773),_=i(42320),C=i(70799),k=i(26049),S=i(37508),E=i(39955),x=i(86068),F=i(52742)},12045:function(e,t,i){"use strict";function n(e){return!!e&&e instanceof DOMException&&"AbortError"===e.name}i.d(t,{isAbortError:function(){return n}})},68345:function(e,t,i){"use strict";function n(e){return Array.isArray(e)}i.d(t,{isArray:function(){return n}})},87612:function(e,t,i){"use strict";function n(e){return"boolean"==typeof e}i.d(t,{isBoolean:function(){return n}})},59292:function(e,t,i){"use strict";i.d(t,{isEqual:function(){return o},isFastEqual:function(){return r}});var n=i(67462);function o(e,t){return e===t||(0,n.stringify)(e)===(0,n.stringify)(t)}function r(e,t){return e===t}},23282:function(e,t,i){"use strict";function n(e){return"function"==typeof e}i.d(t,{isFunction:function(){return n}})},29673:function(e,t,i){"use strict";function n(e){return -1!==e.search(/<meta.*?Microsoft Excel\s[\d].*?>/)||-1!==e.search(/<meta.*?Microsoft Word\s[\d].*?>/)||-1!==e.search(/<meta[^>]*?ProgId[^>]*?(Word|Excel)\./i)||-1!==e.search(/<meta[^>]*?(LibreOffice|OpenOffice)/i)||-1!==e.search(/urn:schemas-microsoft-com:office:(word|excel)/)||-1!==e.search(/<\w[^>]*\sclass=("|')?Mso/)||-1!==e.search(/style='[^']*mso-/)||-1!==e.search(/style="[^"]*mso-/)&&-1!==e.search(/<font/)}i.d(t,{isHtmlFromWord:function(){return n}})},58487:function(e,t,i){"use strict";var n=i(70799);i.d(t,["isHTML",0,e=>(0,n.isString)(e)&&/<([A-Za-z][A-Za-z0-9]*)\b[^>]*>(.*?)<\/\1>/m.test(e.replace(/[\r\n]/g,""))])},60132:function(e,t,i){"use strict";i.d(t,{hasContainer:function(){return l},isDestructable:function(){return a},isInitable:function(){return s}});var n=i(2748),o=i(23282),r=i(86068);function s(e){return!(0,r.isVoid)(e)&&(0,o.isFunction)(e.init)}function a(e){return!(0,r.isVoid)(e)&&(0,o.isFunction)(e.destruct)}function l(e){return!(0,r.isVoid)(e)&&n.Dom.isElement(e.container)}},72913:function(e,t,i){"use strict";i.d(t,{isInt:function(){return r}});var n=i(29807),o=i(70799);function r(e){return(0,o.isString)(e)&&(0,n.isNumeric)(e)&&(e=parseFloat(e)),"number"==typeof e&&Number.isFinite(e)&&!(e%1)}},19306:function(e,t,i){"use strict";i.d(t,{isJoditObject:function(){return o}});var n=i(23282);function o(e){return!!(e&&e instanceof Object&&(0,n.isFunction)(e.constructor)&&("u">typeof Jodit&&e instanceof Jodit||e.isJodit))}},45603:function(e,t,i){"use strict";var n=i(70799);i.d(t,["isLicense",0,e=>(0,n.isString)(e)&&23===e.length&&/^[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}$/i.test(e)])},78116:function(e,t,i){"use strict";i.d(t,{isMarker:function(){return o}});var n=i(2748);function o(e){return n.Dom.isMarker(e)}},70722:function(e,t,i){"use strict";function n(e){return!!e&&"function"===(typeof e).toLowerCase()&&(e===Function.prototype||/^\s*function\s*(\b[a-z$_][a-z0-9$_]*\b)*\s*\((|([a-z$_][a-z0-9$_]*)(\s*,[a-z$_][a-z0-9$_]*)*)\)\s*{\s*\[native code]\s*}\s*$/i.test(String(e)))}i.d(t,{isNativeFunction:function(){return n}})},84767:function(e,t,i){"use strict";function n(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}i.d(t,{isNumber:function(){return n}})},29807:function(e,t,i){"use strict";i.d(t,{isNumeric:function(){return o}});var n=i(70799);function o(e){if((0,n.isString)(e)){if(!e.match(/^([+-])?[0-9]+(\.?)([0-9]+)?(e[0-9]+)?$/))return!1;e=parseFloat(e)}return"number"==typeof e&&!isNaN(e)&&isFinite(e)}},72430:function(e,t,i){"use strict";i.d(t,{isPlainObject:function(){return o}});var n=i(52742);function o(e){return!(!e||"object"!=typeof e||e.nodeType||(0,n.isWindow)(e))&&!(e.constructor&&!({}).hasOwnProperty.call(e.constructor.prototype,"isPrototypeOf"))}},14773:function(e,t,i){"use strict";function n(e){return e&&"function"==typeof e.then}i.d(t,{isPromise:function(){return n}})},42320:function(e,t,i){"use strict";i.d(t,{isSet:function(){return o}});var n=i(23282);function o(e){return!!e&&(0,n.isFunction)(e.has)&&(0,n.isFunction)(e.add)&&(0,n.isFunction)(e.delete)}},70799:function(e,t,i){"use strict";i.d(t,{isString:function(){return o},isStringArray:function(){return r}});var n=i(68345);function o(e){return"string"==typeof e}function r(e){return(0,n.isArray)(e)&&o(e[0])}},26049:function(e,t,i){"use strict";i.d(t,{isURL:function(){return o}});var n=i(82758);function o(e){if(e.includes(" "))return!1;if("u">typeof URL)try{let t=new URL(e);return["https:","http:","ftp:","file:","rtmp:"].includes(t.protocol)}catch(e){return!1}let t=n.globalDocument.createElement("a");return t.href=e,!!t.hostname}},37508:function(e,t,i){"use strict";function n(e){return!!e.length&&!/[^0-9A-Za-zа-яА-ЯЁё\w\-_. ]/.test(e)&&e.trim().length>0}i.d(t,{isValidName:function(){return n}})},39955:function(e,t,i){"use strict";i.d(t,{isViewObject:function(){return o}});var n=i(23282);function o(e){return!!(e&&e instanceof Object&&(0,n.isFunction)(e.constructor)&&e.isView)}},86068:function(e,t,i){"use strict";function n(e){return null==e}i.d(t,{isVoid:function(){return n}})},52742:function(e,t,i){"use strict";function n(e){return null!=e&&e===e.window}i.d(t,{isWindow:function(){return n}})},35278:function(e,t,i){"use strict";i.d(t,["colorToHex",0,e=>{if("rgba(0, 0, 0, 0)"===e||""===e)return!1;if(!e)return"#000000";if("#"===e.substr(0,1))return e;let t=/([\s\n\t\r]*?)rgb\((\d+), (\d+), (\d+)\)/.exec(e)||/([\s\n\t\r]*?)rgba\((\d+), (\d+), (\d+), ([\d.]+)\)/.exec(e);if(!t)return"#000000";let i=parseInt(t[2],10),n=parseInt(t[3],10),o=(parseInt(t[4],10)|n<<8|i<<16).toString(16).toUpperCase();for(;o.length<6;)o="0"+o;return t[1]+"#"+o}])},32574:function(e,t,i){"use strict";i.d(t,{applyStyles:function(){return c}});var n=i(82758),o=i(2748),r=i(49055),s=i(29960),a=i(41180),l=i(76078);function u(e){return e.replace(/mso-[a-z-]+:[\s]*[^;]+;/gi,"").replace(/mso-[a-z-]+:[\s]*[^";']+$/gi,"").replace(/border[a-z-]*:[\s]*[^;]+;/gi,"").replace(/([0-9.]+)(pt|cm)/gi,(e,t,i)=>{switch(i.toLowerCase()){case"pt":return(1.328*parseFloat(t)).toFixed(0)+"px";case"cm":return(.02645833*parseFloat(t)).toFixed(0)+"px"}return e})}function c(e){let t=/<html(?:\s[^>]*)?>/i.exec(e);if(!t)return e;let i=(e=e.substring(t.index)).toLowerCase().lastIndexOf("</html>");-1!==i&&(e=e.substring(0,i+7));let c=n.globalDocument.createElement("iframe");(0,a.css)(c,"display","none"),o.Dom.append(n.globalDocument.body,c);let d="";try{let t=c.contentDocument||(c.contentWindow?c.contentWindow.document:null);if(t){t.open(),t.write(e),t.close(),o.Dom.each(t.body,e=>{o.Dom.isElement(e)&&/mso-list:\s*ignore/i.test((0,s.attr)(e,"style")||"")&&o.Dom.safeRemove(e)});try{for(let e=0;e<t.styleSheets.length;e+=1){let i=t.styleSheets[e].cssRules;for(let e=0;e<i.length;e+=1)""!==i[e].selectorText&&(0,l.$$)(i[e].selectorText,t.body).forEach(t=>{t.style.cssText=u(i[e].style.cssText+";"+t.style.cssText)})}}catch(e){if(!n.IS_PROD)throw e}o.Dom.each(t.body,e=>{if(o.Dom.isElement(e)){let t=(0,s.attr)(e,"style");t&&(e.style.cssText=u(t)),(0,s.attr)(e,"style")||(0,s.attr)(e,"style",null)}}),d=t.firstChild?(0,r.trim)(t.body.innerHTML):""}}catch(e){}finally{o.Dom.safeRemove(c)}return d&&(e=d),(0,r.trim)(e.replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/<!--[^>]*>/g,""))}},53212:function(e,t,i){"use strict";i.d(t,{cleanFromWord:function(){return l}});var n=i(82758),o=i(2748),r=i(4510),s=i(49055),a=i(29960);function l(e){-1!==e.indexOf("<html ")&&(e=(e=e.substring(e.indexOf("<html "),e.length)).substring(0,e.lastIndexOf("</html>")+7));let t="";try{let i=n.globalDocument.createElement("div");i.innerHTML=e;let s=[];i.firstChild&&o.Dom.each(i,e=>{if(e)switch(e.nodeType){case Node.ELEMENT_NODE:switch(e.nodeName){case"STYLE":case"LINK":case"META":s.push(e);break;case"W:SDT":case"W:SDTPR":case"FONT":o.Dom.unwrap(e);break;default:if(/mso-list:\s*ignore/i.test((0,a.attr)(e,"style")||"")){s.push(e);break}(0,r.toArray)(e.attributes).forEach(t=>{-1===["src","href","rel","content"].indexOf(t.name.toLowerCase())&&(0,a.attrRaw)(e,t.name,null)})}break;case Node.TEXT_NODE:break;default:s.push(e)}}),o.Dom.safeRemove.apply(null,s),t=i.innerHTML}catch(e){}return t&&(e=t),(e=e.split(/(\n)/).filter(s.trim).join("\n")).replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/<!--[^>]*>/g,"")}},53326:function(e,t,i){"use strict";i.d(t,{htmlspecialchars:function(){return o}});var n=i(82758);function o(e){let t=n.globalDocument.createElement("div");return t.textContent=e,t.innerHTML}},75275:function(e,t,i){"use strict";i.d(t,{applyStyles:function(){return n.applyStyles},cleanFromWord:function(){return o.cleanFromWord},htmlspecialchars:function(){return r.htmlspecialchars},nl2br:function(){return s.nl2br},safeHTML:function(){return a.safeHTML},sanitizeHTMLElement:function(){return a.sanitizeHTMLElement},stripTags:function(){return l.stripTags}});var n=i(32574),o=i(53212),r=i(53326),s=i(45971),a=i(86518),l=i(91003)},45971:function(e,t,i){"use strict";function n(e){return e.replace(/\r\n|\r|\n/g,"<br/>")}i.d(t,{nl2br:function(){return n}})},86518:function(e,t,i){"use strict";i.d(t,{safeHTML:function(){return l},sanitizeHTMLElement:function(){return h}});var n=i(2748),o=i(43555),r=i(29960);let s=new Set(["foreignobject","annotation-xml","desc","title"]),a=e=>!!(e&&/^(math|svg)$/i.test(e.nodeName));function l(e,t){var i;if(!n.Dom.isElement(e)&&!n.Dom.isFragment(e))return;let l=[];for(let t of(n.Dom.each(e,e=>{n.Dom.isElement(e)&&n.Dom.up(e.parentNode,a)&&l.push(e)}),l))n.Dom.isOrContains(e,t)&&function(e){if("http://www.w3.org/1999/xhtml"!==e.namespaceURI||null==n.Dom.up(e,a))return!1;for(let t=e.parentElement;t;t=t.parentElement){let e=t.nodeName.toLowerCase();if("math"===e||"svg"===e)break;if(s.has(e))return!1}return!0}(t)&&n.Dom.safeRemove(t);let u=null!=(i=t.removeEventAttributes)?i:t.removeOnError,c=e=>{if(n.Dom.isElement(e)&&(u&&function(e){if(!n.Dom.isElement(e))return;let t=[];for(let i=0;i<e.attributes.length;i++)e.attributes[i].name.toLowerCase().startsWith("on")&&t.push(e.attributes[i].name);for(let i of t)(0,r.attrRaw)(e,i,null)}(e),h(e,t),t.safeLinksTarget&&"A"===e.nodeName&&"_blank"===(0,o.attr)(e,"target"))){let t=((0,o.attr)(e,"rel")||"").split(/\s+/).filter(Boolean);t.includes("noopener")||t.push("noopener"),t.includes("noreferrer")||t.push("noreferrer"),(0,o.attr)(e,"rel",t.join(" "))}};c(e),n.Dom.each(e,c)}let u=["src","data","action","formaction","poster","background","xlink:href"],c=new Set(["iframe","frame","object","embed"]);function d(e,t){let i=e.replace(/[\u0000-\u0020]+/g,"").toLowerCase();return!!(/^(?:javascript|vbscript|livescript|mocha):/.test(i)||/^data:(?:text\/html|application\/xhtml)/.test(i))||/^data:image\/svg/.test(i)&&c.has(t)}function h(e,{safeJavaScriptLink:t,removeOnError:i}={safeJavaScriptLink:!0,removeOnError:!0}){if(!n.Dom.isElement(e))return!1;let s=!1;i&&e.hasAttribute("onerror")&&((0,o.attr)(e,"onerror",null),s=!0);let a=e.nodeName.toLowerCase(),l=(0,o.attr)(e,"href");if(t&&l&&d(l,a)){let t="u">typeof location?location.protocol:"http:";(0,o.attr)(e,"href",t+"//"+l),s=!0}if(t)for(let t of(e.hasAttribute("srcdoc")&&((0,o.attr)(e,"srcdoc",null),s=!0),u)){let i=(0,r.attrRaw)(e,t);i&&d(i,a)&&((0,o.attr)(e,t,null),s=!0)}return s}},91003:function(e,t,i){"use strict";i.d(t,{stripTags:function(){return function e(t,i=document,u=null,c=!1){let d=i.createElement("div");(0,o.isString)(t)?d.innerHTML=t:n.Dom.append(d,t);let h=[];return n.Dom.each(d,e=>{n.Dom.isElement(e)&&h.push(e)}),h.forEach(t=>{if(!t.parentNode)return;if(u&&n.Dom.isTag(t,u)){let o=t.nodeName.toLowerCase(),r=n.Dom.isTag(t,l)?`%%%jodit-single-${o}%%%`:`%%%jodit-${o}%%%${e(t.innerHTML,i,u,c)}%%%/jodit-${o}%%%`;n.Dom.before(t,i.createTextNode(r)),n.Dom.safeRemove(t);return}if(n.Dom.isTag(t,a))return void n.Dom.safeRemove(t);if(!n.Dom.isTag(t,s))return;let o=t.nextSibling;!(n.Dom.isText(o)&&/^\s/.test(o.nodeValue||""))&&o&&n.Dom.before(o,i.createTextNode(c?"%%%jodit-single-br%%%":" "))}),(0,r.trim)(d.innerText).replace(/%%%(\/)?jodit(-single)?-([\w\n]+)%%%/g,(e,t,i,n)=>`<${t?"/":""}${n}>`)}}});var n=i(2748),o=i(70799),r=i(49055);let s=new Set(["div","p","br","h1","h2","h3","h4","h5","h6","hr"]),a=new Set(["script","style"]),l=new Set(["br","hr","input"])},21537:function(e,t,i){"use strict";i.r(t),i.d(t,{$$:function(){return d.$$},CamelCaseToKebabCase:function(){return c.CamelCaseToKebabCase},ConfigDeepFlatten:function(){return d.ConfigDeepFlatten},ConfigFlatten:function(){return d.ConfigFlatten},ConfigMerge:function(){return d.ConfigMerge},ConfigProto:function(){return d.ConfigProto},ConnectionError:function(){return d.ConnectionError},LimitedStack:function(){return d.LimitedStack},NUMBER_FIELDS_REG:function(){return l.NUMBER_FIELDS_REG},OptionsError:function(){return d.OptionsError},UNSAFE_PROTO_KEYS:function(){return d.UNSAFE_PROTO_KEYS},abort:function(){return d.abort},alignElement:function(){return d.alignElement},alreadyLoadedList:function(){return d.alreadyLoadedList},appendScriptAsync:function(){return d.appendScriptAsync},appendStyleAsync:function(){return d.appendStyleAsync},applyStyles:function(){return a.applyStyles},asArray:function(){return n.asArray},assert:function(){return d.assert},attr:function(){return d.attr},attrRaw:function(){return d.attrRaw},browser:function(){return d.browser},buildQuery:function(){return d.buildQuery},call:function(){return d.call},callPromise:function(){return d.callPromise},callThis:function(){return d.callThis},camelCase:function(){return c.camelCase},cleanFromWord:function(){return a.cleanFromWord},clearAlign:function(){return d.clearAlign},clearCenterAlign:function(){return d.clearCenterAlign},clearTimeout:function(){return o.clearTimeout},cns:function(){return d.cns},colorToHex:function(){return s.colorToHex},completeUrl:function(){return d.completeUrl},connection:function(){return d.connection},convertMediaUrlToVideoEmbed:function(){return d.convertMediaUrlToVideoEmbed},css:function(){return d.css},cssInline:function(){return d.cssInline},cssPath:function(){return d.cssPath},ctrlKey:function(){return d.ctrlKey},dataBind:function(){return d.dataBind},defaultLanguage:function(){return d.defaultLanguage},error:function(){return d.error},fastClone:function(){return d.fastClone},fuzzySearchIndex:function(){return c.fuzzySearchIndex},get:function(){return d.get},getClassName:function(){return d.getClassName},getContentWidth:function(){return u.getContentWidth},getDataTransfer:function(){return d.getDataTransfer},getFixedPositionOffset:function(){return u.getFixedPositionOffset},getPropertyDescriptor:function(){return d.getPropertyDescriptor},getScrollParent:function(){return u.getScrollParent},getXPathByElement:function(){return d.getXPathByElement},hAlignElement:function(){return d.hAlignElement},hasBrowserColorPicker:function(){return r.hasBrowserColorPicker},hasContainer:function(){return r.hasContainer},htmlspecialchars:function(){return a.htmlspecialchars},humanSizeToBytes:function(){return d.humanSizeToBytes},i18n:function(){return c.i18n},inView:function(){return d.inView},innerWidth:function(){return u.innerWidth},isAbortError:function(){return r.isAbortError},isArray:function(){return r.isArray},isAtom:function(){return d.isAtom},isBoolean:function(){return r.isBoolean},isDestructable:function(){return r.isDestructable},isEqual:function(){return r.isEqual},isFastEqual:function(){return r.isFastEqual},isFunction:function(){return r.isFunction},isHTML:function(){return r.isHTML},isHtmlFromWord:function(){return r.isHtmlFromWord},isInitable:function(){return r.isInitable},isInt:function(){return r.isInt},isJoditObject:function(){return r.isJoditObject},isLicense:function(){return r.isLicense},isMarker:function(){return r.isMarker},isNativeFunction:function(){return r.isNativeFunction},isNumber:function(){return r.isNumber},isNumeric:function(){return r.isNumeric},isPlainObject:function(){return r.isPlainObject},isPromise:function(){return r.isPromise},isSet:function(){return r.isSet},isString:function(){return r.isString},isStringArray:function(){return r.isStringArray},isURL:function(){return r.isURL},isUnsafeProtoKey:function(){return d.isUnsafeProtoKey},isValidName:function(){return r.isValidName},isViewObject:function(){return r.isViewObject},isVoid:function(){return r.isVoid},isWindow:function(){return r.isWindow},kebabCase:function(){return c.kebabCase},keepNames:function(){return d.keepNames},keys:function(){return d.keys},loadImage:function(){return d.loadImage},loadNext:function(){return d.loadNext},loadNextStyle:function(){return d.loadNextStyle},markAsAtomic:function(){return d.markAsAtomic},markDeprecated:function(){return d.markDeprecated},markOwner:function(){return d.markOwner},memorizeExec:function(){return d.memorizeExec},nl2br:function(){return a.nl2br},normalizeColor:function(){return l.normalizeColor},normalizeCssNumericValue:function(){return l.normalizeCssNumericValue},normalizeCssValue:function(){return l.normalizeCssValue},normalizeKeyAliases:function(){return l.normalizeKeyAliases},normalizeLicense:function(){return l.normalizeLicense},normalizePath:function(){return l.normalizePath},normalizeRelativePath:function(){return l.normalizeRelativePath},normalizeSize:function(){return l.normalizeSize},normalizeUrl:function(){return l.normalizeUrl},offset:function(){return u.offset},options:function(){return d.options},parseQuery:function(){return d.parseQuery},position:function(){return u.position},previewBox:function(){return d.previewBox},refs:function(){return d.refs},reset:function(){return d.reset},resolveElement:function(){return d.resolveElement},safeHTML:function(){return a.safeHTML},sanitizeHTMLElement:function(){return a.sanitizeHTMLElement},scrollIntoViewIfNeeded:function(){return d.scrollIntoViewIfNeeded},set:function(){return d.set},setTimeout:function(){return o.setTimeout},size:function(){return u.size},splitArray:function(){return n.splitArray},sprintf:function(){return c.sprintf},stringify:function(){return c.stringify},stripTags:function(){return a.stripTags},toArray:function(){return n.toArray},trim:function(){return c.trim},trimChars:function(){return c.trimChars},trimInv:function(){return c.trimInv},ucfirst:function(){return c.ucfirst}});var n=i(76855),o=i(91898),r=i(27613),s=i(35278),a=i(75275),l=i(71521),u=i(56175),c=i(59007),d=i(43555)},71521:function(e,t,i){"use strict";i.d(t,{NUMBER_FIELDS_REG:function(){return o.NUMBER_FIELDS_REG},normalizeColor:function(){return n.normalizeColor},normalizeCssNumericValue:function(){return o.normalizeCssNumericValue},normalizeCssValue:function(){return o.normalizeCssValue},normalizeKeyAliases:function(){return r.normalizeKeyAliases},normalizeLicense:function(){return s.normalizeLicense},normalizePath:function(){return a.normalizePath},normalizeRelativePath:function(){return l.normalizeRelativePath},normalizeSize:function(){return u.normalizeSize},normalizeUrl:function(){return c.normalizeUrl}});var n=i(21224),o=i(3760),r=i(49033),s=i(12972),a=i(9992),l=i(70091),u=i(46334),c=i(37406)},21224:function(e,t,i){"use strict";var n=i(35278),o=i(49055);i.d(t,["normalizeColor",0,e=>{let t=["#"],i=(0,n.colorToHex)(e);if(!i)return!1;if(3===(i=(i=(0,o.trim)(i.toUpperCase())).substring(1)).length){for(let e=0;e<3;e+=1)t.push(i[e]),t.push(i[e]);return t.join("")}return i.length>6&&(i=i.slice(0,6)),"#"+i}])},3760:function(e,t,i){"use strict";i.d(t,{normalizeCssNumericValue:function(){return l},normalizeCssValue:function(){return u}});var n=i(29807),o=i(86068),r=i(35278),s=i(12475);let a=/^(left|top|bottom|right|width|min|max|height|margin|padding|fontsize|font-size)/i;function l(e,t){return!(0,o.isVoid)(t)&&a.test(e)&&(0,n.isNumeric)(t.toString())?parseInt(t.toString(),10)+"px":t}function u(e,t){if("font-weight"===(0,s.kebabCase)(e)){switch(t.toString().toLowerCase()){case"700":case"bold":return 700;case"400":case"normal":return 400;case"900":case"heavy":return 900}return(0,n.isNumeric)(t)?Number(t):t}return/color/i.test(e)&&/^rgb/i.test(t.toString())&&(0,r.colorToHex)(t.toString())||t}i.d(t,["NUMBER_FIELDS_REG",0,a])},49033:function(e,t,i){"use strict";i.d(t,{normalizeKeyAliases:function(){return r}});var n=i(82758),o=i(49055);function r(e){let t={},i={meta:1,ctrl:2,control:2,alt:3,shift:4,space:5};return e.replace(/\+\+/g,"+add").split(/[\s]*\+[\s]*/).map(e=>(0,o.trim)(e.toLowerCase())).map(e=>n.KEY_ALIASES[e]||e).sort((e,t)=>i[e]&&!i[t]?-1:!i[e]&&i[t]?1:i[e]&&i[t]?i[e]-i[t]:e>t?1:-1).filter(e=>!t[e]&&""!==e&&(t[e]=!0)).join("+")}},12972:function(e,t,i){"use strict";i.d(t,["normalizeLicense",0,(e,t=8)=>{let i=[];for(;e.length;)i.push(e.substr(0,t)),e=e.substr(t);return i[1]=i[1].replace(/./g,"*"),i[2]=i[2].replace(/./g,"*"),i.join("-")}])},9992:function(e,t,i){"use strict";var n=i(49055);i.d(t,["normalizePath",0,(...e)=>e.filter(e=>(0,n.trim)(e).length).map((t,i)=>(t=t.replace(/([^:])[\\/]+/g,"$1/"),i&&(t=t.replace(/^\//,"")),i!==e.length-1&&(t=t.replace(/\/$/,"")),t)).join("/")])},70091:function(e,t,i){"use strict";i.d(t,["normalizeRelativePath",0,e=>e.split("/").reduce((e,t)=>{switch(t){case"":case".":break;case"..":e.pop();break;default:e.push(t)}return e},[]).join("/")+(e.endsWith("/")?"/":"")])},46334:function(e,t,i){"use strict";i.d(t,["normalizeSize",0,(e,t)=>/^[0-9]+$/.test(e.toString())?e+t:e.toString()])},37406:function(e,t,i){"use strict";i.d(t,["normalizeUrl",0,(...e)=>e.filter(e=>e.length).map(e=>e.replace(/\/$/,"")).join("/").replace(/([^:])[\\/]+/g,"$1/")])},44506:function(e,t,i){"use strict";i.d(t,["getContentWidth",0,(e,t)=>{let i=t.getComputedStyle(e);return e.offsetWidth-parseInt(i.getPropertyValue("padding-left")||"0",10)-parseInt(i.getPropertyValue("padding-right")||"0",10)}])},35224:function(e,t,i){"use strict";function n(e){var t,i;let n=null==(t=e.ownerDocument)?void 0:t.defaultView,o=e.parentElement;for(;n&&o;){if(""!==(i=n.getComputedStyle(o)).transform&&"none"!==i.transform||""!==i.perspective&&"none"!==i.perspective||""!==i.filter&&"none"!==i.filter||"transform"===i.willChange||"perspective"===i.willChange||"filter"===i.willChange||"paint"===i.contain||"layout"===i.contain||"strict"===i.contain||"content"===i.contain){let e=o.getBoundingClientRect();return{x:e.left,y:e.top}}o=o.parentElement}return{x:0,y:0}}i.d(t,{getFixedPositionOffset:function(){return n}})},16442:function(e,t,i){"use strict";i.d(t,{getScrollParent:function(){return function e(t){if(!t)return null;let i=o.Dom.isHTMLElement(t),s=i&&(0,r.css)(t,"overflowY");return i&&"visible"!==s&&"hidden"!==s&&t.scrollHeight>=t.clientHeight?t:e(t.parentNode)||n.globalDocument.scrollingElement||n.globalDocument.body}}});var n=i(82758),o=i(2748),r=i(43555)},56175:function(e,t,i){"use strict";i.d(t,{getContentWidth:function(){return n.getContentWidth},getFixedPositionOffset:function(){return o.getFixedPositionOffset},getScrollParent:function(){return r.getScrollParent},innerWidth:function(){return s.innerWidth},offset:function(){return l.offset},position:function(){return u.position},size:function(){return a.size}});var n=i(44506),o=i(35224),r=i(16442),s=i(81630),a=i(21496),l=i(81284),u=i(5700)},81630:function(e,t,i){"use strict";i.d(t,["innerWidth",0,(e,t)=>{let i=t.getComputedStyle(e);return e.clientWidth-(parseFloat(i.paddingLeft||"0")+parseFloat(i.paddingRight||"0"))}])},21496:function(e,t,i){"use strict";i.d(t,{size:function(){return o}});var n=i(27613);function o(e){return(0,n.isString)(e)||(0,n.isArray)(e)?e.length:(0,n.isPlainObject)(e)?Object.keys(e).length:0}},81284:function(e,t,i){"use strict";let n=(e,t,i,o=!1)=>{let r,s,a;try{r=e.getBoundingClientRect()}catch(e){r={top:0,bottom:0,left:0,right:0,width:0,height:0}}let l=i.body,u=i.documentElement||{clientTop:0,clientLeft:0,scrollTop:0,scrollLeft:0},c=i.defaultView||i.parentWindow,d=c.pageYOffset||u.scrollTop||l.scrollTop,h=c.pageXOffset||u.scrollLeft||l.scrollLeft,p=u.clientTop||l.clientTop||0,f=u.clientLeft||l.clientLeft||0,m=t.iframe;if(!o&&t&&t.options&&t.o.iframe&&m){let{top:e,left:i}=n(m,t,t.od,!0);s=r.top+e,a=r.left+i}else s=r.top+d-p,a=r.left+h-f;return{top:Math.round(s),left:Math.round(a),width:r.width,height:r.height}};i.d(t,["offset",0,n])},5700:function(e,t,i){"use strict";i.d(t,{position:function(){return function e(t,i,o=!1){var r,s;let a=t.getBoundingClientRect(),l=a.left,u=a.top;if((0,n.isJoditObject)(i)&&i.iframe&&i.ed.body.contains(t)&&!o){let{left:t,top:n}=e(i.iframe,i,!0);l+=t,u+=n}return{left:Math.round(l),top:Math.round(u),width:Math.round(null!=(r=t.offsetWidth)?r:a.width),height:Math.round(null!=(s=t.offsetHeight)?s:a.height)}}}});var n=i(19306)},87058:function(e,t,i){"use strict";i.d(t,["camelCase",0,e=>e.replace(/([-_])(.)/g,(e,t,i)=>i.toUpperCase())])},67477:function(e,t,i){"use strict";i.d(t,{fuzzySearchIndex:function(){return o}});var n=i(82758);function o(e,t,i=0,r=1){let s=0,a,l=-1,u=0,c=0;for(a=i;s<e.length&&a<t.length;)e[s].toLowerCase()===t[a].toLowerCase()?(s++,u++,c=0,-1===l&&(l=a)):s>0&&(c>=r&&t[a]!==n.INVISIBLE_SPACE?(s=0,l=-1,u=0,c=0,a--):(c++,u++)),a++;return s===e.length?[l,u]:[-1,0]}},56967:function(e,t,i){"use strict";i.d(t,{i18n:function(){return u}});var n=i(82758),o=i(70799),r=i(36409),s=i(43555),a=i(6441);let l=(e,t)=>{if(!t||!t.length)return e;let i=/%([sd])/g,n=i.exec(e),o=e,r=0;for(;n&&void 0!==t[r];)o=o.replace(n[0],t[r].toString()),r+=1,n=i.exec(e);return o};function u(e,t,i){if(!(0,o.isString)(e))throw(0,s.error)("i18n: Need string in first argument");if(!e.length)return e;let u=!!(null==i?void 0:i.debugLanguage),c={},d=e=>t&&t.length?l(e,t):e,h=(0,s.defaultLanguage)(a.Config.defaultOptions.language,a.Config.defaultOptions.language),p=(0,s.defaultLanguage)(null==i?void 0:i.language,h),f=t=>{if(!t)return;if((0,o.isString)(t[e]))return d(t[e]);let i=e.toLowerCase();if((0,o.isString)(t[i]))return d(t[i]);let n=(0,r.ucfirst)(e);if((0,o.isString)(t[n]))return d(t[n])};void 0!==n.lang[p]?c=n.lang[p]:u||(c=void 0!==n.lang[h]?n.lang[h]:n.lang.en);let m=null==i?void 0:i.i18n;if(m&&m[p]){let e=f(m[p]);if(e)return e}return f(c)||(!u&&n.lang.en&&(0,o.isString)(n.lang.en[e])&&n.lang.en[e]?d(n.lang.en[e]):u?"{"+e+"}":(n.IS_PROD,d(e)))}i.d(t,["sprintf",0,l])},59007:function(e,t,i){"use strict";i.d(t,{CamelCaseToKebabCase:function(){return s.CamelCaseToKebabCase},camelCase:function(){return n.camelCase},fuzzySearchIndex:function(){return o.fuzzySearchIndex},i18n:function(){return r.i18n},kebabCase:function(){return s.kebabCase},sprintf:function(){return r.sprintf},stringify:function(){return a.stringify},trim:function(){return l.trim},trimChars:function(){return l.trimChars},trimInv:function(){return l.trimInv},ucfirst:function(){return u.ucfirst}});var n=i(87058),o=i(67477),r=i(56967),s=i(12475),a=i(67462),l=i(49055),u=i(36409)},12475:function(e,t,i){"use strict";i.d(t,["CamelCaseToKebabCase",0,e=>e.replace(/([A-Z])([A-Z])([a-z])/g,"$1-$2$3").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),"kebabCase",0,e=>e.replace(/([A-Z])([A-Z])([a-z])/g,"$1-$2$3").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()])},67462:function(e,t,i){"use strict";function n(e,t={}){if("object"!=typeof e)return String(e);let i=new Set(t.excludeKeys),o=new WeakMap;return JSON.stringify(e,(e,t)=>{if(!i.has(e)){if("object"==typeof t&&null!=t){if(o.get(t))return"[refObject]";o.set(t,!0)}return t}},t.prettify)}i.d(t,{stringify:function(){return n}})},49055:function(e,t,i){"use strict";i.d(t,{trim:function(){return o},trimChars:function(){return r},trimInv:function(){return s}});var n=i(82758);function o(e){return e.replace((0,n.SPACE_REG_EXP_END)(),"").replace((0,n.SPACE_REG_EXP_START)(),"")}function r(e,t){return e.replace(RegExp(`[${t}]+$`),"").replace(RegExp(`^[${t}]+`),"")}function s(e){return e.replace((0,n.INVISIBLE_SPACE_REG_EXP_END)(),"").replace((0,n.INVISIBLE_SPACE_REG_EXP_START)(),"")}},36409:function(e,t,i){"use strict";function n(e){return e.length?e[0].toUpperCase()+e.substring(1):""}i.d(t,{ucfirst:function(){return n}})},25726:function(e,t,i){"use strict";i.d(t,{alignElement:function(){return u},clearAlign:function(){return a},hAlignElement:function(){return s}});var n=i(22732),o=i(29960),r=i(41180);function s(e,t){t&&"normal"!==t?"center"!==t?((0,r.css)(e,"float",t),(0,r.clearCenterAlign)(e)):(0,r.css)(e,{float:"",display:"block",marginLeft:"auto",marginRight:"auto"}):((0,r.css)(e,"float")&&-1!==["right","left"].indexOf((0,r.css)(e,"float").toString().toLowerCase())&&(0,r.css)(e,"float",""),(0,r.clearCenterAlign)(e))}function a(e){n.Dom.each(e,e=>{n.Dom.isHTMLElement(e)&&(0,r.cssInline)(e,"textAlign")&&((0,r.css)(e,"textAlign",""),((0,o.attr)(e,"style")||"").trim().length||(0,o.attr)(e,"style",null))})}let l=new Map([["justifyfull","justify"],["justifyright","right"],["justifyleft","left"],["justifycenter","center"]]);function u(e,t){if(n.Dom.isNode(t)&&n.Dom.isElement(t)){a(t);let i=l.get(e.toLowerCase());i&&(0,r.css)(t,"textAlign",i)}}},63799:function(e,t,i){"use strict";i.d(t,{loadNext:function(){return function e(t,i,n=0){return(0,o.isString)(i[n])?u(t,i[n]).then(()=>e(t,i,n+1)):Promise.resolve()}},loadNextStyle:function(){return function e(t,i,n=0){return(0,o.isString)(i[n])?c(t,i[n]).then(()=>e(t,i,n+1)):Promise.resolve()}}});var n=i(2748),o=i(70799),r=i(29960),s=i(66292);let a=new Map,l=e=>(t,i)=>{if(a.has(i))return a.get(i);let n=e(t,i);return a.set(i,n),n},u=l((e,t)=>e.async.promise((i,o)=>{if(e.isInDestruct)return o();let a=e.c.element("script",{type:"text/javascript",crossorigin:"anonymous",referrerpolicy:"no-referrer",async:!0,src:(0,s.completeUrl)(t)});e.o.nonce&&(0,r.attr)(a,"nonce",e.o.nonce),e.e.one(a,"error",o).one(a,"load",i),n.Dom.append(e.od.body,a)})),c=l((e,t)=>e.async.promise((i,o)=>{if(e.isInDestruct)return o();let a=e.c.element("link",{rel:"stylesheet",media:"all",crossorigin:"anonymous"});e.o.nonce&&(0,r.attr)(a,"nonce",e.o.nonce),e.isInDestruct||e.e.on(a,"load",()=>i(a)).on(a,"error",o),(0,r.attr)(a,"href",(0,s.completeUrl)(t)),e.o.shadowRoot?n.Dom.append(e.o.shadowRoot,a):n.Dom.append(e.od.body,a)}));i.d(t,["alreadyLoadedList",0,a,"appendScriptAsync",0,u,"appendStyleAsync",0,c])},38837:function(e,t,i){"use strict";i.d(t,{assert:function(){return o}});class n extends Error{constructor(e){super(e),this.name="AssertionError"}}function o(e,t){if(!e)throw new n(`Assertion failed: ${t}`)}},29960:function(e,t,i){"use strict";i.d(t,{attr:function(){return function e(t,i,l){if(!t||!(0,n.isFunction)(t.getAttribute))return null;if(!(0,r.isString)(i))return Object.keys(i).forEach(n=>{let r=i[n];(0,o.isPlainObject)(r)&&"style"===n?(0,a.css)(t,r):("className"===n&&(n="class"),e(t,n,r))}),null;let u=(0,s.CamelCaseToKebabCase)(i);if(/^-/.test(u)){let i=e(t,`data${u}`);if(i)return i;u=u.substr(1)}if(void 0!==l)if(null==l)t.hasAttribute(u)&&t.removeAttribute(u);else{let e=l.toString();return"IMG"===t.nodeName&&("width"===u||"height"===u)&&(e=e.replace("px","")),t.setAttribute(u,e),e}return t.getAttribute(u)}},attrRaw:function(){return l}});var n=i(23282),o=i(72430),r=i(70799),s=i(12475),a=i(41180);function l(e,t,i){if(void 0===i)return e.getAttribute(t);if(null==i){e.hasAttribute(t)&&e.removeAttribute(t);return}e.setAttribute(t,i)}},97639:function(e,t,i){"use strict";i.d(t,["browser",0,e=>{let t=navigator.userAgent.toLowerCase(),i=/(firefox)[\s/]([\w.]+)/.exec(t)||/(chrome)[\s/]([\w.]+)/.exec(t)||/(webkit)[\s/]([\w.]+)/.exec(t)||/(opera)(?:.*version)[\s/]([\w.]+)/.exec(t)||/(msie)[\s]([\w.]+)/.exec(t)||/(trident)\/([\w.]+)/.exec(t)||0>t.indexOf("compatible")||[];return"version"===e?i[2]:"webkit"===e?"chrome"===i[1]||"webkit"===i[1]:"ff"===e?"firefox"===i[1]:"msie"===e?"trident"===i[1]||"msie"===i[1]:i[1]===e}])},44710:function(e,t,i){"use strict";var n=i(72430);let o=(e,t)=>{let i=[],r=encodeURIComponent;for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s)){let a=t?t+"["+s+"]":s,l=e[s];i.push((0,n.isPlainObject)(l)?o(l,a):r(a)+"="+r(l))}return i.join("&")};i.d(t,["buildQuery",0,o])},66292:function(e,t,i){"use strict";var n=i(82758);i.d(t,["completeUrl",0,e=>("file:"===n.globalWindow.location.protocol&&/^\/\//.test(e)&&(e="https:"+e),e)])},68934:function(e,t,i){"use strict";i.d(t,{ConfigDeepFlatten:function(){return function e(t){return(0,c.keys)(t,!1).reduce((i,n)=>(i[n]=(0,o.isPlainObject)(t[n])?e(t[n]):t[n],i),{})}},ConfigFlatten:function(){return d},ConfigMerge:function(){return function e(t,i){Object.keys(i).forEach(n=>{if((0,u.isUnsafeProtoKey)(n))return;let r=i[n],s=t[n];(0,o.isPlainObject)(r)&&(0,o.isPlainObject)(s)&&!(0,l.isAtom)(r)?e(s,r):t[n]=r})}},ConfigProto:function(){return function e(t,i,c=0){if(Object.getPrototypeOf(t)!==Object.prototype)return t;let d=a.Config.defaultOptions;if((0,r.isString)(t.preset)){if(void 0!==d.presets[t.preset]){let e=d.presets[t.preset];Object.keys(e).forEach(i=>{(0,s.isVoid)(t[i])&&(t[i]=e[i])})}delete t.preset}let h={};return Object.keys(t).forEach(r=>{if((0,u.isUnsafeProtoKey)(r))return;let s=t[r],a=i?i[r]:null;if((0,o.isPlainObject)(s)&&(0,o.isPlainObject)(a)&&!(0,l.isAtom)(s)){h[r]=e(s,a,c+1);return}if(0!==c&&(0,n.isArray)(s)&&!(0,l.isAtom)(s)&&(0,n.isArray)(a)){h[r]=[...s,...a.slice(s.length)];return}h[r]=s}),Object.setPrototypeOf(h,i),h}}});var n=i(68345),o=i(72430),r=i(70799),s=i(86068),a=i(6441),l=i(97735),u=i(69175),c=i(37790);function d(e){return(0,c.keys)(e,!1).reduce((t,i)=>(t[i]=e[i],t),{})}},55877:function(e,t,i){"use strict";var n=i(82758),o=i(26049),r=i(82501);i.d(t,["convertMediaUrlToVideoEmbed",0,(e,{width:t=400,height:i=345}={})=>{if(!(0,o.isURL)(e))return e;let s=n.globalDocument.createElement("a");s.href=e,t||(t=400),i||(i=345);let a=s.protocol||"";switch(s.hostname){case"www.vimeo.com":case"vimeo.com":{let n=s.pathname.split("/").filter(Boolean),o=n.findIndex(e=>/^\d+$/.test(e));if(-1===o)return e;let r=n[o],l=n[o+1];return l&&0===o&&(r+="/"+l),'<iframe width="'+t+'" height="'+i+'" src="'+a+"//player.vimeo.com/video/"+r+'" frameborder="0" allowfullscreen></iframe>'}case"youtube.com":case"www.youtube.com":case"m.youtube.com":case"music.youtube.com":case"youtu.be":case"www.youtu.be":{let n=(s.search?(0,r.parseQuery)(s.search):{}).v||s.pathname.substring(1);return(n=n.replace(/^(watch|embed|shorts|live|v)\//,"").replace(/\/$/,""))?'<iframe width="'+t+'" height="'+i+'" src="'+a+"//www.youtube.com/embed/"+n+'" frameborder="0" allowfullscreen></iframe>':e}}return e}])},41180:function(e,t,i){"use strict";i.d(t,{css:function(){return l},cssInline:function(){return u}});var n=i(87612),o=i(72430),r=i(3760),s=i(87058),a=i(12475);function l(e,t,i,u=!1){if((0,n.isBoolean)(i)&&(u=i,i=void 0),(0,o.isPlainObject)(t)||void 0!==i){let n=(e,t,i)=>{void 0!==(i=(0,r.normalizeCssNumericValue)(t,i))&&(null==i||l(e,t,!0)!==(0,r.normalizeCssValue)(t,i))&&(e.style[t]=i)};if((0,o.isPlainObject)(t)){let i=Object.keys(t);for(let o=0;o<i.length;o+=1)n(e,(0,s.camelCase)(i[o]),t[i[o]])}else n(e,(0,s.camelCase)(t),i);return""}let c=(0,a.kebabCase)(t),d=e.ownerDocument||document,h=!!d&&(d.defaultView||d.parentWindow),p=e.style[t],f="";return void 0!==p&&""!==p?f=p:h&&!u&&(f=h.getComputedStyle(e).getPropertyValue(c)),r.NUMBER_FIELDS_REG.test(t)&&/^[-+]?[0-9.]+px$/.test(f.toString())&&(f=parseInt(f.toString(),10)),(0,r.normalizeCssValue)(t,f)}function u(e,t){return e.style.getPropertyValue((0,a.kebabCase)(t))}i.d(t,["clearCenterAlign",0,e=>{"block"===l(e,"display")&&l(e,"display","");let{style:t}=e;"auto"===t.marginLeft&&"auto"===t.marginRight&&(t.marginLeft="",t.marginRight="")}])},15456:function(e,t,i){"use strict";i.d(t,["ctrlKey",0,e=>{if("u">typeof navigator&&-1!==navigator.userAgent.indexOf("Mac OS X")){if(e.metaKey&&!e.altKey)return!0}else if(e.ctrlKey&&!e.altKey)return!0;return!1}])},86583:function(e,t,i){"use strict";var n=i(39955);let o=new WeakMap;i.d(t,["dataBind",0,(e,t,i)=>{let r=o.get(e);if(!r){r={},o.set(e,r);let t=null;(0,n.isViewObject)(e.j)&&(t=e.j.e),(0,n.isViewObject)(e)&&(t=e.e),t&&t.on("beforeDestruct",()=>{o.delete(e)})}return void 0===i?r[t]:(r[t]=i,i)}])},96325:function(e,t,i){"use strict";var n=i(82758),o=i(70799);i.d(t,["defaultLanguage",0,(e,t="en")=>"auto"!==e&&(0,o.isString)(e)?e:n.globalDocument.documentElement&&n.globalDocument.documentElement.lang?n.globalDocument.documentElement.lang:navigator.language?navigator.language.substring(0,2):t])},82760:function(e,t,i){"use strict";i.d(t,{connection:function(){return r},error:function(){return o},options:function(){return s}});var n=i(32880);function o(e){return TypeError(e)}function r(e){return new n.ConnectionError(e)}function s(e){return new n.OptionsError(e)}},93661:function(e,t,i){"use strict";function n(e="Aborted"){return new DOMException(e,"AbortError")}i.d(t,{abort:function(){return n}})},86397:function(e,t,i){"use strict";i.d(t,{ConnectionError:function(){return n}});class n extends Error{constructor(e){super(e),Object.setPrototypeOf(this,n.prototype)}}},32880:function(e,t,i){"use strict";i.d(t,{ConnectionError:function(){return o.ConnectionError},OptionsError:function(){return r.OptionsError},abort:function(){return n.abort}});var n=i(93661),o=i(86397),r=i(57865)},57865:function(e,t,i){"use strict";i.d(t,{OptionsError:function(){return n}});class n extends TypeError{constructor(e){super(e),Object.setPrototypeOf(this,n.prototype)}}},89890:function(e,t,i){"use strict";i.d(t,{ConnectionError:function(){return o.ConnectionError},OptionsError:function(){return o.OptionsError},abort:function(){return o.abort},connection:function(){return n.connection},error:function(){return n.error},options:function(){return n.options}});var n=i(82760),o=i(32880)},97735:function(e,t,i){"use strict";i.d(t,{fastClone:function(){return s},isAtom:function(){return o},markAsAtomic:function(){return r}});var n=i(67462);function o(e){return e&&e.isAtom}function r(e){return Object.defineProperty(e,"isAtom",{enumerable:!1,value:!0,configurable:!1}),e}function s(e){return JSON.parse((0,n.stringify)(e))}},80568:function(e,t,i){"use strict";var n=i(23282);let o=new Map;i.d(t,["getClassName",0,e=>{var t;if((0,n.isFunction)(e.className))return e.className();let i=(null==(t=e.constructor)?void 0:t.originalConstructor)||e.constructor;if(o.has(i))return o.get(i);if(i.name)return i.name;let r=new RegExp(/^\s*function\s*(\S*)\s*\(/),s=i.toString().match(r);return s?s[1]:""},"keepNames",0,o])},94643:function(e,t,i){"use strict";i.d(t,{get:function(){return r}});var n=i(70799),o=i(86068);function r(e,t){if(!(0,n.isString)(e)||!e.length)return null;let i=e.split("."),r=t;try{for(let e of i){if((0,o.isVoid)(r[e]))return null;r=r[e]}}catch(e){return null}return(0,o.isVoid)(r)?null:r}},38420:function(e,t,i){"use strict";i.d(t,["humanSizeToBytes",0,e=>{if(/^[0-9.]+$/.test(e.toString()))return parseFloat(e);let t=e.substr(-2,2).toUpperCase(),i=["KB","MB","GB","TB"],n=parseFloat(e.substr(0,e.length-2));return -1!==i.indexOf(t)?n*Math.pow(1024,i.indexOf(t)+1):parseInt(e,10)}])},43555:function(e,t,i){"use strict";i.d(t,{$$:function(){return F.$$},ConfigDeepFlatten:function(){return c.ConfigDeepFlatten},ConfigFlatten:function(){return c.ConfigFlatten},ConfigMerge:function(){return c.ConfigMerge},ConfigProto:function(){return c.ConfigProto},ConnectionError:function(){return g.ConnectionError},LimitedStack:function(){return D.LimitedStack},OptionsError:function(){return g.OptionsError},UNSAFE_PROTO_KEYS:function(){return _.UNSAFE_PROTO_KEYS},abort:function(){return g.abort},alignElement:function(){return n.alignElement},alreadyLoadedList:function(){return o.alreadyLoadedList},appendScriptAsync:function(){return o.appendScriptAsync},appendStyleAsync:function(){return o.appendStyleAsync},assert:function(){return r.assert},attr:function(){return s.attr},attrRaw:function(){return s.attrRaw},browser:function(){return a.browser},buildQuery:function(){return l.buildQuery},call:function(){return I.call},callPromise:function(){return I.callPromise},callThis:function(){return I.callThis},clearAlign:function(){return n.clearAlign},clearCenterAlign:function(){return h.clearCenterAlign},cns:function(){return C.cns},completeUrl:function(){return u.completeUrl},connection:function(){return g.connection},convertMediaUrlToVideoEmbed:function(){return d.convertMediaUrlToVideoEmbed},css:function(){return h.css},cssInline:function(){return h.cssInline},cssPath:function(){return F.cssPath},ctrlKey:function(){return p.ctrlKey},dataBind:function(){return f.dataBind},defaultLanguage:function(){return m.defaultLanguage},error:function(){return g.error},fastClone:function(){return b.fastClone},get:function(){return v.get},getClassName:function(){return y.getClassName},getDataTransfer:function(){return I.getDataTransfer},getPropertyDescriptor:function(){return I.getPropertyDescriptor},getXPathByElement:function(){return F.getXPathByElement},hAlignElement:function(){return n.hAlignElement},humanSizeToBytes:function(){return w.humanSizeToBytes},inView:function(){return x.inView},isAtom:function(){return b.isAtom},isUnsafeProtoKey:function(){return _.isUnsafeProtoKey},keepNames:function(){return y.keepNames},keys:function(){return I.keys},loadImage:function(){return I.loadImage},loadNext:function(){return o.loadNext},loadNextStyle:function(){return o.loadNextStyle},markAsAtomic:function(){return b.markAsAtomic},markDeprecated:function(){return C.markDeprecated},markOwner:function(){return I.markOwner},memorizeExec:function(){return I.memorizeExec},options:function(){return g.options},parseQuery:function(){return k.parseQuery},previewBox:function(){return S.previewBox},refs:function(){return F.refs},reset:function(){return E.reset},resolveElement:function(){return F.resolveElement},scrollIntoViewIfNeeded:function(){return x.scrollIntoViewIfNeeded},set:function(){return A.set}});var n=i(25726),o=i(63799),r=i(38837),s=i(29960),a=i(97639),l=i(44710),u=i(66292),c=i(68934),d=i(55877),h=i(41180),p=i(15456),f=i(86583),m=i(96325),g=i(89890),b=i(97735),v=i(94643),y=i(80568),w=i(38420),_=i(69175),C=i(95942),k=i(82501),S=i(11628),E=i(58844),x=i(26395),F=i(76078),A=i(3703),D=i(50535),I=i(37790)},69175:function(e,t,i){"use strict";i.d(t,{isUnsafeProtoKey:function(){return o}});let n=["__proto__","constructor","prototype"];function o(e){return -1!==n.indexOf(e)}i.d(t,["UNSAFE_PROTO_KEYS",0,n])},95942:function(e,t,i){"use strict";i.d(t,{markDeprecated:function(){return o}});let n=console;function o(e,t=[""],i=null){return(...o)=>(n.warn(`Method "${t[0]}" deprecated.`+(t[1]?` Use "${t[1]}" instead`:"")),e.call(i,...o))}i.d(t,["cns",0,n])},82501:function(e,t,i){"use strict";i.d(t,["parseQuery",0,e=>{let t={},i=e.substring(1).split("&");for(let e=0;e<i.length;e+=1){let n=i[e].split("=");t[decodeURIComponent(n[0])]=decodeURIComponent(n[1]||"")}return t}])},11628:function(e,t,i){"use strict";i.d(t,{previewBox:function(){return a}});var n=i(2748),o=i(70799),r=i(29960),s=i(41180);function a(e,t,i="px",l=null){let u=[],c=function(e,t){let i=[],o=[];n.Dom.each(e.editor,e=>{n.Dom.isTag(e,"img")&&o.push(e)});try{o.forEach(o=>{let s=[(0,r.attr)(o,"width"),(0,r.attr)(o,"height"),(0,r.attr)(o,"src")];(0,r.attr)(o,{width:o.offsetWidth+t,height:o.offsetHeight+t});let a=e.createInside.a();n.Dom.append(e.ed.body,a),(0,r.attr)(a,"href",(0,r.attr)(o,"src")||""),(0,r.attr)(o,"src",a.href),n.Dom.safeRemove(a),i.push(()=>{(0,r.attr)(o,{src:s[2],width:s[0]||null,height:s[1]||null})})})}catch(e){throw i.forEach(e=>e()),i.length=0,e}return i}(e,i);try{let a=e.e.fire("beforePreviewBox",t,i);if(null!=a)return a;let c=e.c.div("jodit__preview-box jodit-context");l&&n.Dom.append(l,c),(0,s.css)(c,{position:"relative",padding:16});let d=e.value||`<div style='position: absolute;left:50%;top:50%;transform: translateX(-50%) translateY(-50%);color:#ccc;'>${e.i18n("Empty")}</div>`;if(e.iframe){let t=e.create.element("iframe");(0,s.css)(t,{minWidth:800,minHeight:600,border:0}),n.Dom.append(c,t);let i=t.contentWindow;if(i&&(e.e.fire("generateDocumentStructure.iframe",i.document,e),c=i.document.body,"function"==typeof ResizeObserver)){let n=!1,o=i.document.body,r=new ResizeObserver(e.async.debounce(()=>{r.unobserve(o),(0,s.css)(t,"height",o.offsetHeight+20),e.async.requestAnimationFrame(()=>{n||r.observe(o)})},100)),a=()=>{n=!0,r.unobserve(o),r.disconnect(),e.e.off("beforeDestruct",a)};u.push(a),e.e.on("beforeDestruct",a)}}else(0,s.css)(c,{minWidth:1024,minHeight:600,border:0});let h=(t,i)=>{let s=(0,o.isString)(i)?e.c.div():i;(0,o.isString)(i)&&(s.innerHTML=i);for(let e=0;e<s.childNodes.length;e+=1){let i=s.childNodes[e];if(n.Dom.isElement(i)){let e=t.ownerDocument.createElement(i.nodeName);for(let t=0;t<i.attributes.length;t+=1)(0,r.attr)(e,i.attributes[t].name,i.attributes[t].value);0===i.childNodes.length||n.Dom.isTag(i,"table")?"SCRIPT"===i.nodeName?i.textContent&&(e.textContent=i.textContent):i.innerHTML&&(e.innerHTML=i.innerHTML):h(e,i);try{n.Dom.append(t,e)}catch(e){}}else try{n.Dom.append(t,i.cloneNode(!0))}catch(e){}}};return h(c,d),e.e.fire("afterPreviewBox",c),[c,()=>{u.forEach(e=>e())}]}finally{c.forEach(e=>e())}}},58844:function(e,t,i){"use strict";i.d(t,{reset:function(){return a}});var n=i(82758),o=i(23282),r=i(94643);let s={};function a(e){var t,i;if(!(e in s)){let i=n.globalDocument.createElement("iframe");try{if(i.src="about:blank",n.globalDocument.body.appendChild(i),!i.contentWindow)return null;let t=(0,r.get)(e,i.contentWindow),a=(0,r.get)(e.split(".").slice(0,-1).join("."),i.contentWindow);(0,o.isFunction)(t)&&(s[e]=t.bind(a))}catch(e){if(!n.IS_PROD)throw e}finally{null==(t=i.parentNode)||t.removeChild(i)}}return null!=(i=s[e])?i:null}},26395:function(e,t,i){"use strict";i.d(t,{inView:function(){return o},scrollIntoViewIfNeeded:function(){return r}});var n=i(2748);function o(e,t,i){let n=e.getBoundingClientRect(),o=e,r=n.top,s=n.height;for(;o&&o!==t&&o.parentNode;)if(r+s>(n=(o=o.parentNode).getBoundingClientRect()).bottom+1&&r>n.top||r+s<=n.top)return!1;return(r+s<=(i.documentElement&&i.documentElement.clientHeight||0)+1||r<=0)&&r+s>=0}function r(e,t,i){if(n.Dom.isHTMLElement(e)&&!o(e,t,i)){if(t.clientHeight!==t.scrollHeight){let i=e.offsetTop+e.offsetHeight-t.clientHeight;t.scrollTop=t.scrollTop<i?i:e.offsetTop}o(e,t,i)||e.scrollIntoView({block:"nearest"})}}},76078:function(e,t,i){"use strict";i.d(t,{$$:function(){return d},resolveElement:function(){return p}});var n=i(82758),o=i(2748),r=i(4510),s=i(70799),a=i(87058),l=i(29960),u=i(89890);let c=1;function d(e,t){let i;if(!n.IS_ES_NEXT&&/:scope/.test(e)&&n.IS_IE&&!(t&&t.nodeType===Node.DOCUMENT_NODE)){let n=t.id,o=n||"_selector_id_"+String(Math.random()).slice(2)+ ++c;e=e.replace(/:scope/g,"#"+o),n||t.setAttribute("id",o),i=t.parentNode.querySelectorAll(e),n||t.removeAttribute("id")}else i=t.querySelectorAll(e);return[].slice.call(i)}let h=(e,t)=>{if(!e||e.nodeType!==Node.ELEMENT_NODE||!e.parentNode||t===e)return"";if(e.id)return"//*[@id='"+e.id+"']";let i=[].filter.call(e.parentNode.childNodes,t=>t.nodeName===e.nodeName);return h(e.parentNode,t)+"/"+e.nodeName.toLowerCase()+(i.length>1?"["+((0,r.toArray)(i).indexOf(e)+1)+"]":"")};function p(e,t){let i=e;if((0,s.isString)(e))try{i=t.querySelector(e)}catch(t){throw(0,u.error)('String "'+e+'" should be valid HTML selector')}if(!i||"object"!=typeof i||!o.Dom.isElement(i)||!i.cloneNode)throw(0,u.error)('Element "'+e+'" should be string or HTMLElement instance');return i}i.d(t,["cssPath",0,e=>{if(!o.Dom.isElement(e))return null;let t=[],i=e;for(;i&&i.nodeType===Node.ELEMENT_NODE;){let e=i.nodeName.toLowerCase();if(i.id){e+="#"+i.id,t.unshift(e);break}{let t=i,n=1;do(t=t.previousElementSibling)&&t.nodeName.toLowerCase()===e&&n++;while(t);e+=":nth-of-type("+n+")"}t.unshift(e),i=i.parentNode}return t.join(" > ")},"getXPathByElement",0,h,"refs",0,e=>{"container"in e&&(e=e.container);let t={};return o.Dom.each(e,e=>{if(o.Dom.isElement(e)&&(e.hasAttribute("ref")||e.hasAttribute("data-ref"))){let i=(0,l.attr)(e,"-ref");i&&(0,s.isString)(i)&&(t[(0,a.camelCase)(i)]=e,t[i]=e)}}),t}])},3703:function(e,t,i){"use strict";i.d(t,{set:function(){return l}});var n=i(68345),o=i(29807),r=i(72430),s=i(70799),a=i(69175);function l(e,t,i){if(!(0,s.isString)(e)||!e.length)return;let l=e.split(".");if(l.some(a.isUnsafeProtoKey))return;let u=i;for(let e=0;e<l.length-1;e+=1){let t=l[e];(0,n.isArray)(u[t])||(0,r.isPlainObject)(u[t])||(u[t]=(0,o.isNumeric)(l[e+1])?[]:{}),u=u[t]}u&&(u[l[l.length-1]]=t)}},50535:function(e,t,i){"use strict";i.d(t,{LimitedStack:function(){return n}});class n{push(e){return this.stack.push(e),this.stack.length>this.limit&&this.stack.shift(),this}pop(){return this.stack.pop()}find(e){return this.stack.find(e)}constructor(e){this.limit=e,this.stack=[]}}},37790:function(e,t,i){"use strict";i.d(t,{call:function(){return a},callPromise:function(){return c},callThis:function(){return l},getPropertyDescriptor:function(){return d},markOwner:function(){return u}});var n=i(14773),o=i(86068),r=i(29960),s=i(86583);function a(e,...t){return e(...t)}function l(e,t,...i){return e.apply(t,i)}function u(e,t){(0,r.attr)(t,"data-editor_id",e.id),t.component||Object.defineProperty(t,"jodit",{value:e})}function c(e,t){return(0,n.isPromise)(e)?e.then(e=>e,()=>null).finally(t):null==t?void 0:t()}function d(e,t){let i;do i=Object.getOwnPropertyDescriptor(e,t),e=Object.getPrototypeOf(e);while(!i&&e);return i}i.d(t,["getDataTransfer",0,e=>{if(e.clipboardData)return e.clipboardData;try{return e.dataTransfer||new DataTransfer}catch(e){return null}},"keys",0,(e,t=!0)=>{if(t)return Object.keys(e);let i=[];for(let t in e)i.push(t);return i},"loadImage",0,(e,t)=>t.async.promise((i,n)=>{let o=new Image,r=()=>{t.e.off(o),null==n||n()},s=()=>{t.e.off(o),i(o)};t.e.one(o,"load",s).one(o,"error",r).one(o,"abort",r),o.src=e,o.complete&&s()}),"memorizeExec",0,(e,t,{control:i},n)=>{var r;let a=`button${i.command}`,l=null!=(r=i.args&&i.args[0])?r:(0,s.dataBind)(e,a);if((0,o.isVoid)(l))return!1;(0,s.dataBind)(e,a,l),n&&(l=n(l)),e.execCommand(i.command,!1,null!=l?l:void 0)}])},31359:function(e,t,i){"use strict";i.d(t,{init:function(){return s}});var n=i(82758),o=i(60132),r=i(14041);function s(e,t,i,s,a,l,u){if((0,o.isInitable)(s))try{s.init(e)}catch(e){if(!n.IS_PROD)throw e}a.set(t,s),l.delete(t),s.hasStyle&&(0,r.loadStyle)(e,t).catch(e=>{n.IS_PROD}),s.styles&&(u(e,t,"style").innerHTML=s.styles)}},14041:function(e,t,i){"use strict";i.d(t,{loadExtras:function(){return d},loadStyle:function(){return u}});var n=i(82758),o=i(12475),r=i(63799),s=i(89672);function a(e,t,i,n,o,r,s){try{var a=e[r](s),l=a.value}catch(e){i(e);return}a.done?t(l):Promise.resolve(l).then(n,o)}let l=new Set;function u(e,t){var i;return(i=function*(){let i=c(e,t,!1);if(!l.has(i))return l.add(i),(0,r.appendStyleAsync)(e,i)},function(){var e=this,t=arguments;return new Promise(function(n,o){var r=i.apply(e,t);function s(e){a(r,n,o,s,l,"next",e)}function l(e){a(r,n,o,s,l,"throw",e)}s(void 0)})})()}function c(e,t,i){t=(0,o.kebabCase)(t);let n=e.minified?".min":"";return e.basePath+"plugins/"+t+"/"+t+n+"."+(i?"js":"css")}function d(e,t,i,o){try{let n=i.filter(t=>!e.has((0,s.normalizeName)(t.name)));n.length&&n.map(e=>{let i=e.url||c(t,e.name,!0);return(0,r.appendScriptAsync)(t,i).then(o).catch(()=>null)})}catch(e){if(!n.IS_PROD)throw e}}},48591:function(e,t,i){"use strict";i.d(t,{makeInstance:function(){return r}});var n=i(82758),o=i(23282);function r(e,t){try{try{return(0,o.isFunction)(t)?new t(e):t}catch(i){if((0,o.isFunction)(t)&&!t.prototype)return t(e)}}catch(e){if(!n.IS_PROD)throw e}return null}},89672:function(e,t,i){"use strict";i.d(t,{normalizeName:function(){return o}});var n=i(12475);function o(e){return(0,n.kebabCase)(e).toLowerCase()}},50911:function(e,t,i){"use strict";i.d(t,{Plugin:function(){return n.Plugin}});var n=i(20356);i(41876)},41876:function(e,t,i){"use strict";i.d(t,{PluginSystem:function(){return p}});var n=i(82758),o=i(57012),r=i(46559),s=i(68345),a=i(60132),l=i(70799),u=i(31359),c=i(14041),d=i(48591),h=i(89672);class p{get size(){return this.__items.size}add(e,t){this.__items.set((0,h.normalizeName)(e),t),o.eventEmitter.fire(`plugin:${e}:ready`)}get(e){return this.__items.get((0,h.normalizeName)(e))}remove(e){this.__items.delete((0,h.normalizeName)(e))}__getFullPluginsList(e){let t=[];return this.__items.forEach((i,n)=>{(!e||e.has(n))&&t.push([n,i])}),t}__init(e){let{extraList:t,disableList:i,filter:o}={extraList:e.o.extraPlugins.map(e=>(0,l.isString)(e)?{name:e}:e),disableList:new Set((0,r.splitArray)(e.o.disablePlugins).map(h.normalizeName)),filter:e.o.safeMode?new Set(e.o.safePluginsList):null},p=new Map,f={},m=new Set;e.__plugins=f;let g=()=>{if(e.isInDestruct)return;let t=!1;this.__getFullPluginsList(o).forEach(([n,o])=>{if(i.has(n)||p.has(n))return;let r=null==o?void 0:o.requires;if(r&&(0,s.isArray)(r)&&r.length){if(r.some(e=>i.has(e)))return;if(!r.every(e=>p.has(e)))return void m.add(n)}t=!0;let a=(0,d.makeInstance)(e,o);if(!a){p.set(n,null),m.delete(n);return}(0,u.init)(e,n,o,a,p,m,this.opts.getContainer),f[n]=a}),t&&(e.e.fire("updatePlugins"),g())};t&&t.length&&(0,c.loadExtras)(this.__items,e,t,g),g(),e.e.on("beforeDestruct",()=>{Object.keys(f).forEach(t=>{let i=f[t];(0,a.isDestructable)(i)&&i.destruct(e),delete f[t]}),delete e.__plugins}),n.IS_PROD||m.size}wait(e){return new Promise(t=>{if(this.get(e))return t();let i=()=>{t(),o.eventEmitter.off(`plugin:${e}:ready`,i)};o.eventEmitter.on(`plugin:${e}:ready`,i)})}constructor(e){this.opts=e,this.__items=new Map}}},20356:function(e,t,i){"use strict";i.d(t,{Plugin:function(){return a}});var n=i(91907),o=i(65478),r=i(19306),s=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class a extends n.ViewComponent{className(){return"Plugin"}__afterPluginSystemInit(){let{j:e,buttons:t}=this;t&&(0,r.isJoditObject)(e)&&t.forEach(t=>{e.registerButton(t)})}__afterInit(){this.__inited=!0,this.setStatus(n.STATUSES.ready),this.afterInit(this.jodit)}init(e){this.jodit.isReady&&(this.afterInit(this.jodit),this.__afterPluginSystemInit(),this.jodit.e.fire("rebuildToolbar"))}__beforeDestruct(){var e;if(this.isInDestruct)return;let{j:t}=this;if(t.e.off("afterPluginSystemInit",this.__afterPluginSystemInit).off("afterInit",this.__afterInit).off("beforeDestruct",this.destruct),this.setStatus(n.STATUSES.beforeDestruct),!this.__inited)return super.destruct();(0,r.isJoditObject)(t)&&(null==(e=this.buttons)||e.forEach(e=>{null==t||t.unregisterButton(e)})),this.beforeDestruct(this.j),super.destruct()}constructor(e){super(e),this.buttons=[],this.hasStyle=!1,this.__inited=!1,e.e.on("afterPluginSystemInit",this.__afterPluginSystemInit).on("afterInit",this.__afterInit).on("beforeDestruct",this.__beforeDestruct)}}a.requires=[],s([o.autobind],a.prototype,"__afterPluginSystemInit",null),s([o.autobind],a.prototype,"__afterInit",null),s([o.autobind],a.prototype,"__beforeDestruct",null)},54079:function(e,t,i){"use strict";i.d(t,{Ajax:function(){return p}});var n=i(8884),o=i(82758),r=i(45219),s=i(21537),a=i(89890),l=i(6441);i(57459);var u=i(98582);function c(e){var t,i;function n(t,i){try{var r=e[t](i),s=r.value,a=s instanceof h;Promise.resolve(a?s.v:s).then(function(i){if(a){var l="return"===t?"return":"next";if(!s.k||i.done)return n(l,i);i=e[l](i).value}o(r.done?"return":"normal",i)},function(e){n("throw",e)})}catch(e){o("throw",e)}}function o(e,o){switch(e){case"return":t.resolve({value:o,done:!0});break;case"throw":t.reject(o);break;default:t.resolve({value:o,done:!1})}(t=t.next)?n(t.key,t.arg):i=null}this._invoke=function(e,o){return new Promise(function(r,s){var a={key:e,arg:o,resolve:r,reject:s,next:null};i?i=i.next=a:(t=i=a,n(e,o))})},"function"!=typeof e.return&&(this.return=void 0)}function d(e,t,i,n,o,r,s){try{var a=e[r](s),l=a.value}catch(e){i(e);return}a.done?t(l):Promise.resolve(l).then(n,o)}function h(e,t){this.v=e,this.k=t}c.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},c.prototype.next=function(e){return this._invoke("next",e)},c.prototype.throw=function(e){return this._invoke("throw",e)},c.prototype.return=function(e){return this._invoke("return",e)};class p{className(){return"Ajax"}__buildParams(e,t){return(0,s.isPlainObject)(e)&&this.options.contentType&&this.options.contentType.includes("application/json")?JSON.stringify(e):(0,s.isFunction)(this.o.queryBuild)?this.o.queryBuild.call(this,e,t):(0,s.isString)(e)||e instanceof o.globalWindow.FormData||"object"==typeof e&&null!=e&&(0,s.isFunction)(e.append)?e:(0,s.buildQuery)(e)}get o(){return this.options}abort(){if(this.__isFulfilled)return this;try{this.__isFulfilled=!0,this.xhr.abort()}catch(e){}return this}send(){this.__activated=!0;let{xhr:e,o:t}=this,i=this.prepareRequest();return this.__async.promise((n,o)=>{var r;return(r=function*(){var r;let l=()=>{this.__isFulfilled=!0,o(a.connection("Connection error"))},c=()=>{this.__isFulfilled=!0,n(new u.Response(i,e.status,e.statusText,!e.responseType?e.responseText:e.response))};e.onload=c,e.onabort=()=>{this.__isFulfilled=!0,o(a.abort("Abort connection"))},e.onerror=l,e.ontimeout=l,t.responseType&&(e.responseType=t.responseType),e.onprogress=e=>{var t,i;let n=0;e.lengthComputable&&(n=e.loaded/e.total*100),null==(i=(t=this.options).onProgress)||i.call(t,n)},e.onreadystatechange=()=>{var i,n;null==(n=(i=this.options).onProgress)||n.call(i,10),e.readyState===XMLHttpRequest.DONE&&(t.successStatuses.includes(e.status)?c():e.statusText&&(this.__isFulfilled=!0,o(a.connection(e.statusText))))},e.withCredentials=null!=(r=t.withCredentials)&&r;let{url:d,data:h,method:p}=i;e.open(p,d,!0),t.contentType&&e.setRequestHeader&&e.setRequestHeader("Content-type",t.contentType);let{headers:f}=t;(0,s.isFunction)(f)&&(f=yield f.call(this)),f&&e.setRequestHeader&&Object.keys(f).forEach(t=>{e.setRequestHeader(t,f[t])}),this.__async.setTimeout(()=>{e.send(h?this.__buildParams(h):void 0)},0)},function(){var e=this,t=arguments;return new Promise(function(i,n){var o=r.apply(e,t);function s(e){d(o,i,n,s,a,"next",e)}function a(e){d(o,i,n,s,a,"throw",e)}s(void 0)})}).call(this)})}stream(){var e;return(e=function*(){var e,t;this.__activated=!0;let{xhr:i,o:n}=this,o=this.prepareRequest(),r=0,l="",u=[],c=null,d=!1,p=null,f=()=>{if(c){let e=c;c=null,e()}},m=e=>{var t;let n=i.responseText;l+=n.substring(r),r=n.length;let o=l.split("\n\n");for(let i of(l=e?"":null!=(t=o.pop())?t:"",o)){let e=i.trim();if(!e)continue;let t=[];for(let i of e.split("\n"))i.startsWith("data: ")?t.push(i.slice(6)):i.startsWith("data:")&&t.push(i.slice(5));t.length&&u.push(t.join("\n"))}f()};i.onprogress=()=>m(!1),i.onload=()=>{m(!0),d=!0,this.__isFulfilled=!0,f()},i.onerror=()=>{p=a.connection("Connection error"),d=!0,this.__isFulfilled=!0,f()},i.onabort=()=>{p=a.abort("Abort connection"),d=!0,this.__isFulfilled=!0,f()},i.withCredentials=null!=(e=n.withCredentials)&&e;let{url:g,data:b,method:v}=o;i.open(v,g,!0),n.contentType&&i.setRequestHeader&&i.setRequestHeader("Content-type",n.contentType);let{headers:y}=n;(0,s.isFunction)(y)&&(y=yield new h(y.call(this),0)),y&&i.setRequestHeader&&Object.keys(y).forEach(e=>{i.setRequestHeader(e,y[e])}),i.send(b?this.__buildParams(b):void 0);try{for(;;)if(u.length>0)yield u.shift();else if(d)break;else yield(t=new Promise(e=>{c=e}),new h(t,0))}finally{this.__isFulfilled||this.abort()}if(p)throw p},function(){return new c(e.apply(this,arguments))}).call(this)}prepareRequest(){if(!this.o.url)throw a.error("Need URL for AJAX request");let e=this.o.url,t=this.o.data,i=(this.o.method||"get").toLowerCase();if("get"===i&&t&&(0,s.isPlainObject)(t)){let i=e.indexOf("?");if(-1!==i){let n=(0,s.parseQuery)(e.substring(i));e=e.substring(0,i)+"?"+(0,s.buildQuery)(function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{},n=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(i).filter(function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable}))),n.forEach(function(t){var n;n=i[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},n,t))}else e+="?"+(0,s.buildQuery)(this.o.data)}let n={url:e,method:i,data:t};return p.log.splice(100),p.log.push(n),n}destruct(){this.__isDestructed||(this.__isDestructed=!0,this.__activated&&!this.__isFulfilled&&(this.abort(),this.__isFulfilled=!0),this.__async.destruct())}constructor(e,t=l.Config.prototype.defaultAjaxOptions){this.__async=new n.Async,this.__isFulfilled=!1,this.__activated=!1,this.__isDestructed=!1,this.options=(0,s.ConfigProto)(e||{},t),this.xhr=this.o.xhr?this.o.xhr():new XMLHttpRequest}}p.log=[],function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([r.autobind],p.prototype,"destruct",null)},57459:function(e,t,i){"use strict";i(6441).Config.prototype.defaultAjaxOptions={successStatuses:[200,201,202],method:"GET",url:"",data:null,contentType:"application/x-www-form-urlencoded; charset=UTF-8",headers:{"X-REQUESTED-WITH":"XMLHttpRequest"},withCredentials:!1,xhr(){return new XMLHttpRequest}}},41601:function(e,t,i){"use strict";i.d(t,{Ajax:function(){return n.Ajax},Response:function(){return o.Response}});var n=i(54079),o=i(98582)},98582:function(e,t,i){"use strict";function n(e,t,i,n,o,r,s){try{var a=e[r](s),l=a.value}catch(e){i(e);return}a.done?t(l):Promise.resolve(l).then(n,o)}function o(e){return function(){var t=this,i=arguments;return new Promise(function(o,r){var s=e.apply(t,i);function a(e){n(s,o,r,a,l,"next",e)}function l(e){n(s,o,r,a,l,"throw",e)}a(void 0)})}}i.d(t,{Response:function(){return r}});class r{get url(){return this.request.url}json(){return o(function*(){return JSON.parse(this.body)}).call(this)}text(){return Promise.resolve(this.body)}blob(){return o(function*(){return this.body}).call(this)}constructor(e,t,i,n){this.request=e,this.status=t,this.statusText=i,this.body=n}}},45124:function(e,t,i){"use strict";i.d(t,{cursorInTheEdgeOfString:function(){return s},findCorrectCurrentNode:function(){return a},moveNodeInsideStart:function(){return r.moveNodeInsideStart}});var n=i(82758),o=i(2748),r=i(26716);function s(e,t,i,o){var r;let s=(null==(r=e.nodeValue)?void 0:r.length)?e.nodeValue:"";if(o&&s.replace((0,n.INVISIBLE_SPACE_REG_EXP_END)(),"").length>t)return!0;let a=(0,n.INVISIBLE_SPACE_REG_EXP_START)().exec(s);return i&&(a&&a[0].length<t||!a&&t>0)}function a(e,t,i,n,r,s){if((e=t.startContainer.childNodes[t.startOffset])||(e=t.startContainer.childNodes[t.startOffset-1],i=!0),e&&n&&!o.Dom.isText(e)){if(!i&&o.Dom.isText(e.previousSibling))e=e.previousSibling;else if(r){let t=e=>i?e.lastChild:s(e),n=t(e);for(;n;){if(n&&o.Dom.isText(n)){e=n;break}n=t(n)}}}if(e&&!n&&!o.Dom.isText(e)){let t=e,i=e;do t=t.firstChild,i=i.lastChild;while(t&&i&&!o.Dom.isText(t));t===i&&t&&o.Dom.isText(t)&&(e=t)}return{node:e,rightMode:i}}i(43463)},26716:function(e,t,i){"use strict";i.d(t,{moveNodeInsideStart:function(){return r}});var n=i(82758),o=i(2748);function r(e,t,i){let r=o.Dom.findSibling(t,i),s=o.Dom.findSibling(t,!i);for(;o.Dom.isElement(r)&&!o.Dom.isTag(r,n.INSEPARABLE_TAGS)&&o.Dom.isContentEditable(r,e.editor)&&(!s||!o.Dom.closest(t,o.Dom.isElement,e.editor));)i||!r.firstChild?o.Dom.append(r,t):o.Dom.before(r.firstChild,t),r=o.Dom.sibling(t,i),s=o.Dom.sibling(t,!i)}},43463:function(e,t,i){"use strict";i.d(t,{moveTheNodeAlongTheEdgeOutward:function(){return o}});var n=i(2748);function o(e,t,i){let o=e;for(;o&&o!==i&&!(n.Dom.findSibling(o,t)||n.Dom.isBlock(o.parentElement));)(o=o.parentElement)&&o!==i&&(t?n.Dom.before(o,e):n.Dom.after(o,e))}},59242:function(e,t,i){"use strict";i.d(t,{CHANGE:function(){return"change"},CommitStyle:function(){return o.CommitStyle},REPLACE:function(){return r.REPLACE},Selection:function(){return n.Selection},UNWRAP:function(){return"unwrap"},WRAP:function(){return"wrap"}});var n=i(79348),o=i(25639),r=i(77361)},79348:function(e,t,i){"use strict";i.d(t,{Selection:function(){return p}});var n=i(82758),o=i(65478),r=i(2748),s=i(21537),a=i(27613),l=i(38837),u=i(43463),c=i(25639),d=i(45124),h=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class p{get j(){return this.jodit}errorNode(e){if(!r.Dom.isNode(e))throw(0,s.error)("Parameter node must be instance of Node")}get area(){return this.j.editor}get win(){return this.j.ew}get doc(){return this.j.ed}get sel(){return this.j.o.shadowRoot&&(0,a.isFunction)(this.j.o.shadowRoot.getSelection)?this.j.o.shadowRoot.getSelection():this.win.getSelection()}get range(){let e=this.sel;return e&&e.rangeCount?e.getRangeAt(0):this.createRange()}get isInsideArea(){let{sel:e}=this;if(!(null==e?void 0:e.rangeCount))return!1;for(let t=0;t<e.rangeCount;t+=1)if(!r.Dom.isOrContains(this.area,e.getRangeAt(t).commonAncestorContainer))return!1;return!0}createRange(e=!1){let t=this.doc.createRange();return e&&this.selectRange(t),t}remove(){let e=this.sel,t=this.current();if(e&&t)for(let t=0;t<e.rangeCount;t+=1){let i=e.getRangeAt(t);r.Dom.isOrContains(this.area,i.commonAncestorContainer)&&(i.deleteContents(),i.collapse(!0))}}clear(){var e,t;(null==(e=this.sel)?void 0:e.rangeCount)&&(null==(t=this.sel)||t.removeAllRanges())}removeNode(e){if(!r.Dom.isOrContains(this.j.editor,e,!0))throw(0,s.error)("Selection.removeNode can remove only editor's children");r.Dom.safeRemove(e),this.j.e.fire("afterRemoveNode",e)}insertCursorAtPoint(e,t){var i,n,o,s;try{let a=this.createRange(),l=null==(n=(i=this.doc).caretPositionFromPoint)?void 0:n.call(i,e,t),u=l?null:null==(s=(o=this.doc).caretRangeFromPoint)?void 0:s.call(o,e,t);if(l)a.setStart(l.offsetNode,l.offset);else{if(!u)return!1;a.setStart(u.startContainer,u.startOffset)}if(!r.Dom.isOrContains(this.area,a.startContainer))return!1;return a.collapse(!0),this.removeMarkers(),this.selectRange(a),!0}catch(e){}return!1}get hasMarkers(){return!!this.markers.length}get markers(){return(0,s.$$)("span[data-"+n.MARKER_CLASS+"]",this.area)}removeMarkers(){r.Dom.safeRemove(...this.markers)}marker(e=!1,t){let i=null;t&&(i=t.cloneRange()).collapse(e);let o=this.j.createInside.span();return o.id=n.MARKER_CLASS+"_"+Number(new Date)+"_"+String(Math.random()).slice(2),(0,s.css)(o,{lineHeight:"0",display:"none"}),r.Dom.markTemporary(o),(0,s.attr)(o,"data-"+n.MARKER_CLASS,e?"start":"end"),r.Dom.append(o,this.j.createInside.text(n.INVISIBLE_SPACE)),i&&r.Dom.isOrContains(this.area,e?i.startContainer:i.endContainer)&&i.insertNode(o),o}restore(){var e,t;let i=this.markers,o=new Map(i.map(e=>[e.id,e])),a=[],l=!1;for(let u=0;u<i.length;u+=1){let c=i[u];if("start"!==(0,s.attr)(c,"data-"+n.MARKER_CLASS))continue;l||(l="true"===(0,s.attr)(c,"data-selection-backward"));let d=(0,s.attr)(c,"data-selection-end"),h=d?o.get(d):void 0;!d&&i[u+1]&&"end"===(0,s.attr)(i[u+1],"data-"+n.MARKER_CLASS)&&(h=i[u+1]);let p=this.createRange();if(h)p.setStartAfter(c),p.setEndBefore(h);else{let i=c.previousSibling;r.Dom.isText(i)?p.setStart(i,null!=(t=null==(e=i.nodeValue)?void 0:e.length)?t:0):p.setStartBefore(c),p.collapse(!0)}a.push(p)}r.Dom.safeRemove(...i),a.length&&this.__selectRanges(a,l)}__isBackward(){let e=this.sel;return!!(e&&1===e.rangeCount&&!e.isCollapsed&&e.anchorNode===e.getRangeAt(0).endContainer&&e.anchorOffset===e.getRangeAt(0).endOffset)}__ranges(){let e=this.sel;return e?Array.from({length:e.rangeCount},(t,i)=>e.getRangeAt(i).cloneRange()):[]}fakes(){if(!this.isInsideArea)return[];let e=this.__isBackward(),t=this.__ranges(),i=t.map(e=>{let t=e.collapsed,i=e.cloneRange();i.collapse(!0);let n=this.j.createInside.fake();r.Dom.safeInsertNode(i,n),e.setStartBefore(n);let o=[n];if(t)e.collapse(!0);else{let t=e.cloneRange();t.collapse(!1);let i=this.j.createInside.fake();r.Dom.safeInsertNode(t,i),e.setEndAfter(i),o.push(i)}return o});return this.__fakeSelections.set(i[0][0],{pairs:i,backward:e}),this.__selectRanges(t,e),i[0]}restoreFakes(e){var t,i,n;if(!e.length)return;let o=this.__fakeSelections.get(e[0]);if(this.__fakeSelections.delete(e[0]),this.j.isInDestruct)return;let s=[];for(let a of null!=(t=null==o?void 0:o.pairs)?t:[e]){let e=a.filter(e=>e.isConnected&&r.Dom.isOrContains(this.area,e,!0));if(!e.length)continue;let[t,o]=e,l=this.createRange();for(let s of(l.setStartAfter(t),o?l.setEndBefore(o):l.collapse(!0),e))(null==(i=s.parentNode)?void 0:i.firstChild)!==(null==(n=s.parentNode)?void 0:n.lastChild)&&r.Dom.safeRemove(s);s.push(l)}s.length&&this.__selectRanges(s,null==o?void 0:o.backward)}save(e=!1){if(this.hasMarkers)return[];let t=this.sel;if(!t||!t.rangeCount)return[];let i=this.__isBackward(),n=[],o=t.rangeCount,a=[];for(let e=0;o>e;e+=1)if(a[e]=t.getRangeAt(e),!r.Dom.isOrContains(this.area,a[e].commonAncestorContainer))return[];for(let e=0;o>e;e+=1)if(a[e].collapsed){let t=this.marker(!0,a[e]);n[e]={startId:t.id,collapsed:!0,startMarker:t.outerHTML}}else{let t=this.marker(!0,a[e]),r=this.marker(!1,a[e]);o>1&&(0,s.attr)(t,"data-selection-end",r.id),i&&(0,s.attr)(t,"data-selection-backward","true"),n[e]={startId:t.id,endId:r.id,collapsed:!1,startMarker:t.outerHTML,endMarker:r.outerHTML}}if(!e){t.removeAllRanges();for(let e=o-1;e>=0;--e){let i=this.area.querySelector("#"+n[e].startId);if(i){if(n[e].collapsed)a[e].setStartAfter(i),a[e].collapse(!0);else if(a[e].setStartBefore(i),n[e].endId){let t=this.area.querySelector("#"+n[e].endId);t&&a[e].setEndAfter(t)}try{t.addRange(a[e].cloneRange())}catch(e){}}}}return n}focus(e={preventScroll:!0}){var t,i;if(!this.isFocused()){let n=(0,s.getScrollParent)(this.j.container),o=null==n?void 0:n.scrollTop;this.j.iframe&&"complete"===this.doc.readyState&&this.j.iframe.focus(e),this.win.focus(),this.area.focus(e),o&&(null==n?void 0:n.scrollTo)&&n.scrollTo(0,o);let a=this.sel,l=(null==a?void 0:a.rangeCount)?null==a?void 0:a.getRangeAt(0):null;if(!l||!r.Dom.isOrContains(this.area,l.startContainer)){let e=this.createRange();e.setStart(this.area,0),e.collapse(!0),this.selectRange(e,!1)}return this.j.editorIsActive||null==(i=null==(t=this.j)?void 0:t.events)||i.fire("focus"),!0}return!1}isCollapsed(){let e=this.sel;for(let t=0;e&&t<e.rangeCount;t+=1)if(!e.getRangeAt(t).collapsed)return!1;return!0}isFocused(){return this.doc.hasFocus&&this.doc.hasFocus()&&this.area===this.doc.activeElement}current(e=!0){if(this.j.getRealMode()!==n.MODE_WYSIWYG)return null;let t=this.sel;if(!t||0===t.rangeCount)return null;let i=t.getRangeAt(0),o=i.startContainer,s=!1;if(!r.Dom.isOrContains(this.area,o))return null;if(r.Dom.isTag(o,"br")&&t.isCollapsed)return o;if(!r.Dom.isText(o)){let n=(0,d.findCorrectCurrentNode)(o,i,s,t.isCollapsed,e,e=>s?e.lastChild:e.firstChild);o=n.node,s=n.rightMode}return o&&r.Dom.isOrContains(this.area,o)?o:null}insertNode(e,t=!0,i=!0){this.errorNode(e),this.j.e.fire("safeHTML",e);let n=r.Dom.isFragment(e)?e.lastChild:e;if(!n||this.j.isInDestruct)return;!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore());let o=this.sel;this.j.history.snapshot.transaction(()=>{if(this.isCollapsed()||this.j.execCommand("Delete"),this.j.e.fire("beforeInsertNode",e),!(n=r.Dom.isFragment(e)?e.lastChild:e)||this.j.isInDestruct)return;if(o&&o.rangeCount){let t=o.getRangeAt(0),{firstChild:i}=e;r.Dom.isOrContains(this.area,t.commonAncestorContainer)?r.Dom.safeInsertNode(t,e):r.Dom.append(this.area,e),[()=>null==i?void 0:i.previousSibling,()=>null==i?void 0:i.previousSibling,()=>{var e;return null==(e=null==i?void 0:i.previousSibling)?void 0:e.lastChild}].forEach(e=>{let t=e();t&&r.Dom.isEmptyTextNode(t)&&r.Dom.safeRemove(t)})}else r.Dom.append(this.area,e);let i=e=>{if(r.Dom.isBlock(e)){let t=e.lastChild;if(t)return i(t)}this.setCursorAfter(e)};t&&(r.Dom.isFragment(e)?n&&i(n):i(e)),this.j.o.scrollToPastedContent&&(0,s.scrollIntoViewIfNeeded)(null!=n?n:e,this.j.editor,this.doc)}),i&&this.j.events&&this.j.__imdSynchronizeValues(),this.j.events&&this.j.e.fire("afterInsertNode",r.Dom.isFragment(e)?n:e)}insertHTML(e,t=!0){if(""===e)return;let i=this.j.createInside.div(),n=this.j.createInside.fragment();!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore()),r.Dom.isNode(e)?r.Dom.append(i,e):i.innerHTML=e.toString(),!this.j.isEditorMode()&&!1===this.j.e.fire("insertHTML",i.innerHTML)||i.lastChild&&(r.Dom.moveContent(i,n),this.insertNode(n,t,!1),this.j.__imdSynchronizeValues())}insertImage(e,t=null,i=null){let n=(0,a.isString)(e)?this.j.createInside.element("img"):e;if((0,a.isString)(e)&&(0,s.attr)(n,"src",e),null!=i){let e=i.toString();e&&"auto"!==e&&0>String(e).indexOf("px")&&0>String(e).indexOf("%")&&(e+="px"),(0,s.attr)(n,"width",e)}t&&"object"==typeof t&&(0,s.css)(n,t);let o=()=>{(n.naturalHeight<n.offsetHeight||n.naturalWidth<n.offsetWidth)&&(0,s.css)(n,{width:"",height:""}),n.removeEventListener("load",o)};this.j.e.on(n,"load",o),n.complete&&o(),this.insertNode(n),this.j.e.fire("afterInsertImage",n)}eachSelection(e){let t=new Set;for(let i of this.__ranges())r.Dom.isOrContains(this.area,i.commonAncestorContainer)&&this.__eachRange(i,i=>{t.has(i)||(t.add(i),e(i))})}__eachRange(e,t){var i;let o=e.commonAncestorContainer;r.Dom.isHTMLElement(o)||(o=o.parentElement);let l=[],u=e.startOffset,c=o.childNodes.length,d=e.startContainer===this.area?o.childNodes[u<c?u:c-1]:e.startContainer,h=e.endContainer===this.area?o.childNodes[e.endOffset-1]:e.endContainer;r.Dom.isText(d)&&d===e.startContainer&&e.startOffset===(null==(i=d.nodeValue)?void 0:i.length)&&d.nextSibling&&(d=d.nextSibling),r.Dom.isText(h)&&h===e.endContainer&&0===e.endOffset&&h.previousSibling&&(h=h.previousSibling);let p=e=>{!e||e===o||r.Dom.isEmptyTextNode(e)||(0,a.isMarker)(e)||l.push(e)};p(d),d!==h&&r.Dom.isOrContains(o,d,!0)&&r.Dom.find(d,e=>(p(e),e===h||e&&e.contains&&e.contains(h)),o,!0,!1);let f=e=>{if(r.Dom.isOrContains(this.j.editor,e,!0)){if(e.nodeName.match(/^(UL|OL)$/))return(0,s.toArray)(e.childNodes).forEach(f);if(r.Dom.isTag(e,"li"))if(e.firstChild)e=e.firstChild;else{let t=this.j.createInside.text(n.INVISIBLE_SPACE);r.Dom.append(e,t),e=t}t(e)}};0===l.length&&(r.Dom.isEmptyTextNode(d)&&l.push(d),(null==d?void 0:d.firstChild)&&l.push(d.firstChild)),l.forEach(f)}cursorInTheEdge(e,t,i=null){let n=!e,o=this.sel,s=(null==o?void 0:o.rangeCount)?o.getRangeAt(0):null;if(!s)return null;let a=e?s.startContainer:s.endContainer,l=e?s.startOffset:s.endOffset;if(null!=i||(i=a),!r.Dom.isOrContains(t,a)||!r.Dom.isOrContains(t,i))return null;let u=e=>!!(e&&!r.Dom.isTag(e,"br")&&!r.Dom.isEmptyTextNode(e)&&!r.Dom.isTemporary(e)&&!(r.Dom.isElement(e)&&!0===this.j.e.fire("isInvisibleForCursor",e)));if(r.Dom.isText(a)){if((0,d.cursorInTheEdgeOfString)(a,l,e,n))return!1}else{let e=a.childNodes,t=n?e.length:l;for(let i=n?l:0;t>i;i+=1)if(u(e[i]))return!1}let c=i;for(;c&&c!==t;){let t=r.Dom.sibling(c,e);if(!t){c=c.parentNode;continue}if(u(c=t))return!1}return!0}cursorOnTheLeft(e,t){return this.cursorInTheEdge(!0,e,t)}cursorOnTheRight(e,t){return this.cursorInTheEdge(!1,e,t)}setCursorAfter(e){return this.setCursorNearWith(e,!1)}setCursorBefore(e){return this.setCursorNearWith(e,!0)}setCursorNearWith(e,t){var i,n;if(this.errorNode(e),!r.Dom.isOrContains(this.area,e,!0))throw(0,s.error)("Node element must be in editor");let o=this.createRange(),a=null;return r.Dom.isText(e)?t?o.setStart(e,0):o.setEnd(e,null!=(n=null==(i=e.nodeValue)?void 0:i.length)?n:0):(a=this.j.createInside.fake(),t?o.setStartBefore(e):o.setEndAfter(e),o.collapse(t),r.Dom.safeInsertNode(o,a),o.selectNode(a)),o.collapse(t),this.selectRange(o),a}setCursorIn(e,t=!1){if(this.errorNode(e),!r.Dom.up(e,e=>e===this.area||e&&e.parentNode===this.area,this.area))throw(0,s.error)("Node element must be in editor");let i=this.createRange(),o=e,a=e;do{if(r.Dom.isText(o)||r.Dom.isTag(o,n.INSEPARABLE_TAGS))break;a=o,o=t?o.firstChild:o.lastChild}while(o);if(!o){let e=this.j.createInside.text(n.INVISIBLE_SPACE);r.Dom.isTag(a,n.INSEPARABLE_TAGS)?o=a:(r.Dom.append(a,e),a=e)}let l=o||a;return r.Dom.isTag(l,n.INSEPARABLE_TAGS)?t||r.Dom.isTag(l,"br")?i.setStartBefore(l):i.setEndAfter(l):i.selectNodeContents(l),i.collapse(t),this.selectRange(i),a}selectRange(e,t=!0){return this.__selectRanges([e],!1,t)}__selectRanges(e,t=!1,i=!0){let n=this.sel;if(i&&!this.isFocused()&&"focus"!==this.j.e.current&&this.focus(),n&&(n.removeAllRanges(),e.forEach(e=>n.addRange(e)),t&&1===e.length)){let t=e[0];n.setBaseAndExtent(t.endContainer,t.endOffset,t.startContainer,t.startOffset)}return this.j.e.fire("changeSelection"),this}select(e,t=!1){if(this.errorNode(e),!r.Dom.up(e,e=>e===this.area||e&&e.parentNode===this.area,this.area))throw(0,s.error)("Node element must be in editor");let i=this.createRange();return i[t||e===this.area?"selectNodeContents":"selectNode"](e),this.selectRange(i)}get html(){let e=this.sel;if(e&&e.rangeCount>0){let e=this.j.createInside.div();return this.__ranges().forEach(t=>r.Dom.append(e,t.cloneContents())),e.innerHTML}return""}__wrapSelectionFragments(e){this.__splitSelectionBoundaries(e);let t=e.commonAncestorContainer;return(r.Dom.isText(t)&&(t=t.parentNode),t)?this.__wrapSelectionRuns(this.__collectContainedNodes(t,e)):[]}__splitSelectionBoundaries(e){var t,i,n,o;let{endContainer:s,endOffset:a}=e;r.Dom.isText(s)&&a>0&&a<(null!=(i=null==(t=s.nodeValue)?void 0:t.length)?i:0)&&s.splitText(a);let{startContainer:l,startOffset:u}=e;if(r.Dom.isText(l)&&u>0&&u<(null!=(o=null==(n=l.nodeValue)?void 0:n.length)?o:0)){let t=l.splitText(u);e.setStart(t,0)}this.__normalizeRangeBoundary(e,!0),this.__normalizeRangeBoundary(e,!1)}__normalizeRangeBoundary(e,t){var i,n;let o=t?e.startContainer:e.endContainer;if(!r.Dom.isText(o))return;let s=t?e.startOffset:e.endOffset,a=null!=(n=null==(i=o.nodeValue)?void 0:i.length)?n:0;0===s?t?e.setStartBefore(o):e.setEndBefore(o):s>=a&&(t?e.setStartAfter(o):e.setEndAfter(o))}__collectContainedNodes(e,t,i=this.createRange()){let n=[];return(0,s.toArray)(e.childNodes).forEach(e=>{this.__isFullyContained(t,e,i)?n.push(e):e.childNodes.length&&t.intersectsNode(e)&&n.push(...this.__collectContainedNodes(e,t,i))}),n}__isFullyContained(e,t,i){return i.selectNode(t),0>=e.compareBoundaryPoints(Range.START_TO_START,i)&&e.compareBoundaryPoints(Range.END_TO_END,i)>=0}__wrapSelectionRuns(e){let t=[],i=[],n=()=>{i.length&&(t.push(this.__wrapRunInFont(i)),i=[])};return e.forEach(e=>{r.Dom.isElement(e)&&this.__isOrContainsBlock(e)?(n(),t.push(...this.__wrapSelectionRuns((0,s.toArray)(e.childNodes)))):(i.length&&i[i.length-1].parentNode!==e.parentNode&&n(),i.push(e))}),n(),t}__isOrContainsBlock(e){return!!r.Dom.isBlock(e)||(0,s.toArray)(e.childNodes).some(e=>this.__isOrContainsBlock(e))}__wrapRunInFont(e){let t=this.j.createInside.element("font"),[i]=e;return r.Dom.before(i,t),e.forEach(e=>r.Dom.append(t,e)),t}*wrapInTagGen(e){var t;if((null==(t=this.sel)?void 0:t.rangeCount)&&!this.isInsideArea)return;if(this.isCollapsed()){let t=this.jodit.createInside.element("font",n.INVISIBLE_SPACE);this.insertNode(t,!1,!1),e&&e[0]&&r.Dom.append(t,e[0]);try{yield t}finally{r.Dom.unwrap(t)}return}let i=this.__ranges().flatMap(e=>this.__wrapSelectionFragments(e));try{for(let e of i){if(this.j.isInDestruct||!r.Dom.isOrContains(this.area,e,!0))continue;let{firstChild:t,lastChild:i}=e;if(t&&t===i&&(0,a.isMarker)(t)){r.Dom.unwrap(e);continue}t&&(0,a.isMarker)(t)&&r.Dom.before(e,t),i&&(0,a.isMarker)(i)&&r.Dom.after(e,i),yield e,r.Dom.unwrap(e)}}finally{i.forEach(e=>r.Dom.unwrap(e))}}wrapInTag(e){let t=[];for(let i of this.wrapInTagGen())try{if(i.firstChild&&i.firstChild===i.lastChild&&(0,a.isMarker)(i.firstChild))continue;(0,a.isFunction)(e)?e(i):t.push(r.Dom.replace(i,e,this.j.createInside))}finally{let e=i.parentNode;e&&(r.Dom.unwrap(i),r.Dom.isEmpty(e)&&r.Dom.unwrap(e))}return t}commitStyle(e){(0,l.assert)((0,s.size)(e)>0,"Need to pass at least one option"),new c.CommitStyle(e).apply(this.j)}splitSelection(e,t){if(!this.isCollapsed()||!this.isInsideArea||!r.Dom.isOrContains(this.area,e,!0)||!r.Dom.isOrContains(e,this.range.startContainer)||t&&!r.Dom.isOrContains(e,t,!0))return null;let i=this.createRange(),o=this.range;i.setStartBefore(e);let s=this.cursorOnTheRight(e,t),a=this.cursorOnTheLeft(e,t),u=this.j.createInside.element("br"),c=this.j.createInside.fake(),d=c.cloneNode();try{if(s||a){t?r.Dom.before(t,u):r.Dom.safeInsertNode(o,u);let e=(e,t)=>{let i=t(e);for(;i;){let e=t(i);if(i&&(r.Dom.isTag(i,"br")||r.Dom.isEmptyTextNode(i)))r.Dom.safeRemove(i);else break;i=e}};e(u,e=>e.nextSibling),e(u,e=>e.previousSibling),r.Dom.after(u,d),r.Dom.before(u,c),s?(i.setEndBefore(u),o.setEndBefore(u)):(i.setEndAfter(u),o.setEndAfter(u))}else i.setEnd(o.startContainer,o.startOffset);let h=i.extractContents(),p=e=>r.Dom.each(e,e=>r.Dom.isEmptyTextNode(e)&&r.Dom.safeRemove(e));(0,l.assert)(e.parentNode,"Splitting fails");try{if(p(h),p(e),r.Dom.before(e,h),!t&&s&&(null==u?void 0:u.parentNode)){let e=this.createRange();e.setStartBefore(u),this.selectRange(e)}}catch(e){if(!n.IS_PROD)throw e}let f=e=>{let t=null==e?void 0:e.parentNode;t&&t.firstChild===t.lastChild&&r.Dom.append(t,u.cloneNode())};f(c),f(d)}finally{r.Dom.safeRemove(c),r.Dom.safeRemove(d)}return e.previousElementSibling}expandSelection(){if(this.isCollapsed()||!this.isInsideArea)return this;let e=this.__isBackward(),t=this.__ranges().map(e=>this.__expandRange(e));return this.__selectRanges(t,e),this}__expandRange(e){let t=e.cloneRange();if(!r.Dom.isOrContains(this.j.editor,e.commonAncestorContainer,!0))return e;let i=t=>{let i=this.j.createInside.fake(),n=e.cloneRange();return n.collapse(t),r.Dom.safeInsertNode(n,i),(0,u.moveTheNodeAlongTheEdgeOutward)(i,t,this.j.editor),i},n=i(!0),o=i(!1);t.setStartAfter(n),t.setEndBefore(o);let a=r.Dom.findSibling(n,!1),l=r.Dom.findSibling(o,!0);if(a!==l){let e=r.Dom.isElement(a)&&r.Dom.isOrContains(a,o),i=!e&&r.Dom.isElement(l)&&r.Dom.isOrContains(l,n);if(e||i){let i=e?a:l,s=i;for(;r.Dom.isElement(i);)(i=e?i.firstElementChild:i.lastElementChild)&&(e?r.Dom.isOrContains(i,o):r.Dom.isOrContains(i,n))&&(s=i);e?t.setStart(s,0):t.setEnd(s,s.childNodes.length)}}if(r.Dom.safeRemove(n,o),t.collapsed)throw(0,s.error)("Selection is collapsed");return t}constructor(e){this.jodit=e,this.__fakeSelections=new WeakMap,e.e.on("removeMarkers",()=>{this.removeMarkers()})}}h([o.autobind],p.prototype,"createRange",null),h([o.autobind],p.prototype,"focus",null),h([o.autobind],p.prototype,"setCursorAfter",null),h([o.autobind],p.prototype,"setCursorBefore",null),h([o.autobind],p.prototype,"setCursorIn",null)},32526:function(e,t,i){"use strict";i.d(t,{extractSelectedPart:function(){return s}});var n=i(2748),o=i(78116),r=i(37790);function s(e,t,i){let n=i.s.createRange(),r=(0,o.isMarker)(t.previousSibling)?t.previousSibling:t;n.setStartBefore(e),n.setEndBefore(r),a(e,n,!0);let s=(0,o.isMarker)(t.nextSibling)?t.nextSibling:t;n.setStartAfter(s),n.setEndAfter(e),a(e,n,!1)}function a(e,t,i){let o=t.extractContents();n.Dom.isEmpty(o)&&o.firstChild&&n.Dom.unwrap(o.firstChild),e.parentNode&&(0,r.call)(i?n.Dom.before:n.Dom.after,e,o)}},49996:function(e,t,i){"use strict";i.d(t,{FiniteStateMachine:function(){return s}});var n=i(82758),o=i(70799),r=i(38837);class s{setState(e){(0,r.assert)(!this.__previewsStates.has(e),"Circled states"),this.__previewsStates.add(e),this.__state=e}getState(){return this.__state}disableSilent(){this.silent=!1}dispatch(e,t){let i=this.transitions[this.getState()][e];if(i){let e=i.call(this,t);return(0,r.assert)(e&&e!==t,"Action should return new value"),(0,r.assert)((0,o.isString)(e.next),"Value should contain the next state"),(0,r.assert)(e.next!==this.getState(),"The new state should not be equal to the old one."),this.setState(e.next),n.IS_PROD||this.silent,e}throw Error(`invalid action: ${this.getState()}.${e.toString()}`)}constructor(e,t){this.transitions=t,this.silent=!0,this.__previewsStates=new Set,this.setState(e)}}},23738:function(e,t,i){"use strict";i.d(t,{getSuitChild:function(){return s}});var n=i(2748),o=i(29136),r=i(97380);function s(e,t){let{firstChild:i}=t;for(;i&&!(0,o.isNormalNode)(i);)if(!(i=i.nextSibling))return null;return i&&!n.Dom.next(i,o.isNormalNode,t)&&(0,r.isSuitElement)(e,i,!1)?i:null}},44602:function(e,t,i){"use strict";i.d(t,{getSuitParent:function(){return function e(t,i,s){var a;let{parentNode:l}=i;return l===s||!n.Dom.isHTMLElement(l)||n.Dom.next(i,o.isNormalNode,l)||n.Dom.prev(i,o.isNormalNode,l)?null:t.isElementCommit&&t.elementIsBlock&&!n.Dom.isBlock(l)?e(t,l,s):n.Dom.isTag(l,"li")&&!t.isElementCommit&&(null==(a=t.options.attributes)?void 0:a.style)||(0,r.isSuitElement)(t,l,!1)&&(!n.Dom.isBlock(l)||t.elementIsBlock)?l:t.isElementCommit&&!n.Dom.isBlock(l)?e(t,l,s):null}}});var n=i(2748),o=i(29136),r=i(97380)},22030:function(e,t,i){"use strict";i.d(t,{hasSameStyle:function(){return u},hasSameStyleKeys:function(){return c}});var n=i(82758),o=i(2748),r=i(86068),s=i(3760),a=i(38837),l=i(41180);function u(e,t){return!!(!o.Dom.isTag(e,"font")&&o.Dom.isHTMLElement(e)&&Object.keys(t).every(i=>{let n=(0,l.css)(e,i,!0);return""===n&&(""===t[i]||null==t[i])||!(0,r.isVoid)(n)&&""!==n&&!(0,r.isVoid)(t[i])&&(0,s.normalizeCssValue)(i,t[i]).toString().toLowerCase()===n.toString().toLowerCase()}))}if(n.globalDocument){let e=n.globalDocument.createElement("div");e.style.color="red",(0,a.assert)(u(e,{color:"red"}),"Style test"),(0,a.assert)(u(e,{fontSize:null}),"Style test"),(0,a.assert)(u(e,{fontSize:""}),"Style test")}function c(e,t){return!!(!o.Dom.isTag(e,"font")&&o.Dom.isHTMLElement(e)&&Object.keys(t).every(t=>""!==(0,l.css)(e,t,!0)))}if(n.globalDocument){let e=n.globalDocument.createElement("div");e.style.color="red",(0,a.assert)(c(e,{color:"red"}),"Style test"),(0,a.assert)(!c(e,{font:"Arial",color:"red"}),"Style test"),(0,a.assert)(!c(e,{border:"1px solid #ccc"}),"Style test")}},63687:function(e,t,i){"use strict";i.d(t,{FiniteStateMachine:function(){return o.FiniteStateMachine},WRAP_NODES:function(){return h.WRAP_NODES},extractSelectedPart:function(){return n.extractSelectedPart},getSuitChild:function(){return r.getSuitChild},getSuitParent:function(){return s.getSuitParent},isInsideInvisibleElement:function(){return a.isInsideInvisibleElement},suitableClosest:function(){return l.suitableClosest},toggleAttributes:function(){return c.toggleAttributes},toggleOrderedList:function(){return u.toggleOrderedList},unwrapChildren:function(){return d.unwrapChildren},wrap:function(){return h.wrap}});var n=i(32526),o=i(49996),r=i(23738),s=i(44602);i(22030);var a=i(64291);i(29136),i(94466);var l=i(97380),u=i(20199);i(82515);var c=i(44253),d=i(75882),h=i(19263);i(6980)},64291:function(e,t,i){"use strict";i.d(t,{isInsideInvisibleElement:function(){return o}});var n=i(2748);function o(e,t){return!!n.Dom.closest(e,["style","script"],t)}},29136:function(e,t,i){"use strict";i.d(t,{isNormalNode:function(){return r}});var n=i(2748),o=i(78116);function r(e){return!!(e&&!n.Dom.isEmptyTextNode(e)&&!n.Dom.isTemporary(e)&&!(0,o.isMarker)(e))}},94466:function(e,t,i){"use strict";i.d(t,{elementsEqualAttributes:function(){return u},isSameAttributes:function(){return l}});var n=i(21496),o=i(43555),r=i(38837),s=i(29960),a=i(22030);function l(e,t){return!(0,n.size)(t)||((0,r.assert)(t,"Attrs must be a non-empty object"),Object.keys(t).every(i=>{var n;if("class"===i||"className"===i)return(null!=(n=String(t[i]).match(/[^\t\n\f\r ]+/g))?n:[]).every(t=>e.classList.contains(t));if("style"===i)return(0,a.hasSameStyle)(e,t[i]);let r=t[i];return(0,o.attr)(e,i)===(null==r?r:String(r))}))}function u(e,t){return e.attributes.length===t.attributes.length&&Array.from(e.attributes).every(e=>(0,s.attrRaw)(t,e.name)===e.value)}},97380:function(e,t,i){"use strict";i.d(t,{isSuitElement:function(){return s},suitableClosest:function(){return a}});var n=i(2748),o=i(22030),r=i(29136);function s(e,t,i,a=!0){var l;if(!t||!(0,r.isNormalNode)(t))return!1;let{element:u,elementIsDefault:c,options:d}=e;if(n.Dom.isList(t)&&e.elementIsList)return!0;let h=n.Dom.isTag(t,u);return!!(h&&!(c&&i)||(null==(l=d.attributes)?void 0:l.style)&&(a?(0,o.hasSameStyle)(t,d.attributes.style):(0,o.hasSameStyleKeys)(t,d.attributes.style))&&!e.elementIsList)||!h&&!i&&c&&n.Dom.isInlineBlock(t)}function a(e,t,i){return n.Dom.closest(t,t=>s(e,t,!0,!1),i)}},20199:function(e,t,i){"use strict";i.d(t,{toggleOrderedList:function(){return u}});var n=i(2748),o=i(38837),r=i(32526),s=i(44253),a=i(77361),l=i(82515);function u(e,t,i,n){if(!t)return n;let o=t.parentElement;if(!o)return n;let r=i.e.fire(`${a._PREFIX}BeforeToggleList`,n,e,o);if(void 0!==r)return r;let u=i.e.fire.bind(i.e,`${a._PREFIX}AfterToggleList`);if("unwrap"!==n){let r="change"===(0,s.toggleAttributes)(e,t.parentElement,i,a.INITIAL,!0);if(n===a.REPLACE||r||o.tagName.toLowerCase()!==e.element){let n=c(a.REPLACE,o,t,i,e),r=(0,l.wrapList)(e,n,i);return u(a.REPLACE,r,e),a.REPLACE}}return u("unwrap",c("unwrap",o,t,i,e),e),"unwrap"}function c(e,t,i,s,l){let u=s.e.fire(`${a._PREFIX}BeforeUnwrapList`,e,t,l);return u?((0,o.assert)(n.Dom.isHTMLElement(u),`${a._PREFIX}BeforeUnwrapList hook must return HTMLElement`),u):((0,r.extractSelectedPart)(t,i,s),(0,o.assert)(n.Dom.isHTMLElement(i.parentElement),"Element should be inside the list"),n.Dom.unwrap(i.parentElement),e===a.REPLACE)?i:n.Dom.replace(i,"br"!==s.o.enter.toLowerCase()?s.o.enter:s.createInside.fragment(),s.createInside)}},82515:function(e,t,i){"use strict";i.d(t,{wrapList:function(){return a}});var n=i(2748),o=i(94466),r=i(44253),s=i(77361);function a(e,t,i){let a=i.e.fire(`${s._PREFIX}BeforeWrapList`,s.REPLACE,t,e),l=null!=a?a:n.Dom.replace(t,"li",i.createInside),u=l.previousElementSibling,c=l.nextElementSibling,d=n.Dom.isTag(u,e.element)?u:null;return null!=d||(d=n.Dom.isTag(c,e.element)?c:null),n.Dom.isList(d)&&(0,o.isSameAttributes)(d,e.options.attributes)||(d=i.createInside.element(e.element),(0,r.toggleAttributes)(e,d,i,s.INITIAL),n.Dom.before(l,d)),u===d?n.Dom.append(d,l):n.Dom.prepend(d,l),n.Dom.isTag(d.nextElementSibling,e.element)&&(0,o.elementsEqualAttributes)(d,d.nextElementSibling)&&(n.Dom.append(d,Array.from(d.nextElementSibling.childNodes)),n.Dom.safeRemove(d.nextElementSibling)),i.e.fire(`${s._PREFIX}AfterWrapList`,"wrap",d,e),d}},44253:function(e,t,i){"use strict";i.d(t,{toggleAttributes:function(){return f}});var n=i(82758),o=i(2748),r=i(580),s=i(27613),a=i(3760),l=i(21496),u=i(43555),c=i(41180),d=i(86583),h=i(77361);let p="toggleAttributes";function f(e,t,i,m,g=!1){var b;if(!g&&e.isApplied(t,p))return m;g||e.setApplied(t,p);let{attributes:v}=e.options;return v&&(0,l.size)(v)>0&&Object.keys(v).forEach(e=>{var p,f;let b=v[e];switch(e){case"style":p=m,(0,u.assert)((0,s.isPlainObject)(b)&&(0,l.size)(b),"Style must be an object"),Object.keys(b).forEach(e=>{let s=(0,c.cssInline)(t,e),l=b[e];if(""!==s||null!=l){let h,f,m,b;if(null==l||""===l){s&&(g||(0,c.css)(t,e,null),p="change");return}if(h=function(e){var t;if(void 0!==(0,d.dataBind)(e,"shadowRoot"))return(0,d.dataBind)(e,"shadowRoot");let i=(0,r.getContainer)(e),s=n.globalDocument.createElement("iframe");(0,c.css)(s,{width:0,height:0,position:"absolute",border:0}),(0,u.attr)(s,"src","about:blank"),o.Dom.append(i,s);let a=null==(t=s.contentWindow)?void 0:t.document,l=a?a.body:e.od.body;return(0,d.dataBind)(e,"shadowRoot",l),l}(i),f=i.create.element("div"),(0,c.css)(f,"color",(0,c.css)(i.editor,"color")),m=i.create.element(t.tagName.toLowerCase()),(0,u.attr)(m,"style",(0,u.attr)(t,"style")),o.Dom.append(f,m),o.Dom.append(h,f),b=(0,c.css)(m,e),o.Dom.safeRemove(f),b===(0,a.normalizeCssValue)(e,l)){if(!s)return;g||(0,c.css)(t,e,null),p="unset";return}p="change",g||(0,c.css)(t,e,l)}}),m=p;break;case"className":case"class":m=function(e,t,i,n,o){var r;(0,u.assert)((0,s.isString)(t),"Class name must be a string");let a=null!=(r=t.match(/[^\t\n\f\r ]+/g))?r:[];if(!a.length)return n;let l=e.e.fire.bind(e.e,`${h._PREFIX}AfterToggleAttribute`);return a.every(e=>i.classList.contains(e))?(n="unset",o||(i.classList.remove(...a),0===i.classList.length&&(0,u.attr)(i,"class",null),l(n,i,"class",(0,u.attr)(i,"class")))):(n="change",o||(i.classList.add(...a),l(n,i,"class",t))),n}(i,b,t,m,g);break;default:let y;f=m,(0,u.assert)((0,s.isString)(b)||(0,s.isNumber)(b)||(0,s.isBoolean)(b)||null==b,"Attribute value must be a string or number or boolean or null"),y=i.e.fire.bind(i.e,`${h._PREFIX}AfterToggleAttribute`),(0,u.attr)(t,e)===(null==b?b:String(b))?(g||(0,u.attr)(t,e,null),f="unset",g||y(f,t,e,b)):(f="change",g||((0,u.attr)(t,e,b),y(f,t,e,b))),m=f}}),!g&&(null==v?void 0:v.style)?(b=m,!(0,u.attr)(t,"style")&&((0,u.attr)(t,"style",null),t.attributes.length||t.tagName.toLowerCase()!==e.defaultTag||(o.Dom.unwrap(t),b="unwrap")),b):m}},75882:function(e,t,i){"use strict";i.d(t,{unwrapChildren:function(){return a}});var n=i(2748),o=i(43555),r=i(22030),s=i(97380);function a(e,t){var i;let a,l=[],u=[],c=null==(i=e.options.attributes)?void 0:i.style,d=Object.keys(null!=c?c:{}),h={};d.forEach(e=>{h[e]=null});let p=t=>{(0,o.css)(t,h),(0,o.attr)(t,"style")||(0,o.attr)(t,"style",null),!t.attributes.length&&n.Dom.isTag(t,e.element)&&l.push(t)};for(let i of n.Dom.eachGen(t))n.Dom.isContentEditable(i,t)&&((0,s.isSuitElement)(e,i,!0)&&(!c||(0,r.hasSameStyleKeys)(i,c))?(void 0===a&&(a=!0),c?u.push(()=>p(i)):l.push(i)):c&&n.Dom.isHTMLElement(i)&&d.some(e=>""!==(0,o.css)(i,e,!0))?(void 0===a&&(a=!1),u.push(()=>p(i))):n.Dom.isEmptyTextNode(i)||void 0!==a||(a=!1));return u.forEach(e=>e()),l.forEach(n.Dom.unwrap),!!a}},6980:function(e,t,i){"use strict";i.d(t,{wrapUnwrappedText:function(){return r}});var n=i(2748),o=i(78116);function r(e,t,i){let r=i.editor,s=i.createInside,a=(e,t="previousSibling")=>{let s=e,a=e;for(;a&&!(0,o.isMarker)(a)&&!n.Dom.isTag(a,i.o.enter)&&(s=a,a=a[t]?a[t]:a.parentNode&&!n.Dom.isBlock(a.parentNode)&&a.parentNode!==r?a.parentNode:null,!n.Dom.isBlock(a)););return s},l=a(t),u=a(t,"nextSibling"),c=i.s.createRange();c.setStartBefore(l),c.setEndAfter(u);let d=c.extractContents(),h=s.element(e.element);return n.Dom.append(h,d),n.Dom.safeInsertNode(c,h),e.elementIsBlock&&n.Dom.isEmpty(h)&&!n.Dom.isTag(h.firstElementChild,"br")&&n.Dom.append(h,s.element("br")),h}},19263:function(e,t,i){"use strict";i.d(t,{wrap:function(){return l}});var n=i(22732),o=i(29960),r=i(41180),s=i(82515),a=i(6980);function l(e,t,i){var l,c,d;let h=(l=e,c=t,d=i,l.elementIsBlock?n.Dom.up(c,e=>n.Dom.isBlock(e)&&!n.Dom.isTag(e,u)&&!Array.from(e.childNodes).some(e=>n.Dom.isBlock(e)),d.editor)||(0,a.wrapUnwrappedText)(l,c,d):((0,o.attr)(c,"size",null),c));if(e.elementIsList)return(0,s.wrapList)(e,h,i);let p=n.Dom.replace(h,e.element,i.createInside,!0);return e.elementIsBlock&&((0,r.css)(p,"fontSize",null),(0,r.css)(p,"fontWeight",null),(0,o.attr)(p,"style")||(0,o.attr)(p,"style",null)),p}let u=new Set(["td","th","tr","tbody","table","li","ul","ol"]);i.d(t,["WRAP_NODES",0,u])},83632:function(e,t,i){"use strict";i.d(t,{ApplyStyle:function(){return s}});var n=i(63687),o=i(77361),r=i(55307);function s(e,t){var i;let{s:s,editor:a}=e;null==(i=a.firstChild)||i.normalize();let l=s.fakes(),u=s.isCollapsed(),c=o.INITIAL;try{for(let i of s.wrapInTagGen(l)){let o={collapsed:u,mode:c,element:i,next:r.states.START,jodit:e,style:t},s=new n.FiniteStateMachine(r.states.START,r.transactions);for(;!e.isInDestruct&&s.getState()!==r.states.END;)o=s.dispatch("exec",o);c=o.mode}}finally{s.restoreFakes(l)}}},25639:function(e,t,i){"use strict";i.d(t,{CommitStyle:function(){return a}});var n=i(82758),o=i(87058),r=i(77361),s=i(83632);class a{isApplied(e,t){let i=this.__applyMap.get(e);return!!i&&!!i[t]}setApplied(e,t){var i;let n=null!=(i=this.__applyMap.get(e))?i:{};n[t]=!0,this.__applyMap.set(e,n)}get elementIsList(){return!!(this.options.element&&n.LIST_TAGS.has(this.options.element))}get element(){return this.options.element||this.defaultTag}get elementIsBlock(){return!!(this.options.element&&n.IS_BLOCK.test(this.options.element))}get isElementCommit(){return!!(this.options.element&&this.options.element!==this.options.defaultTag)}get defaultTag(){return this.options.defaultTag?this.options.defaultTag:this.elementIsBlock?"p":"span"}get elementIsDefault(){return this.element===this.defaultTag}apply(e){let{hooks:t}=this.options,i=t?Object.keys(t):[];try{i.forEach(i=>{e.e.on((0,o.camelCase)(r._PREFIX+"_"+i),t[i])}),(0,s.ApplyStyle)(e,this)}finally{i.forEach(i=>{e.e.off((0,o.camelCase)(r._PREFIX+"_"+i),t[i])}),this.__applyMap=new WeakMap}e.isInDestruct||(e.synchronizeValues(),e.e.fire("afterCommitStyle",this))}constructor(e){this.options=e,this.__applyMap=new WeakMap}}},77361:function(e,t,i){"use strict";i.d(t,["INITIAL",0,"initial","REPLACE",0,"replace","_PREFIX",0,"commitStyle"])},55307:function(e,t,i){"use strict";var n=i(82758),o=i(2748),r=i(38837),s=i(63687),a=i(77361);function l(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{},n=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(i).filter(function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable}))),n.forEach(function(t){var n;n=i[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function u(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t.push.apply(t,i)}return t})(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))}),e}let c={START:"START",ELEMENT:"ELEMENT",UNWRAP:"UNWRAP",UNWRAP_CHILDREN:"UNWRAP_CHILDREN",CHANGE:"CHANGE",REPLACE_DEFAULT:"REPLACE_DEFAULT",LIST:"LIST",TOGGLE_LIST:"TOGGLE_LIST",WRAP:"WRAP",EXTRACT:"EXTRACT",END:"END"},d={[c.START]:{exec(e){let{element:t,jodit:i,style:n,mode:r,collapsed:a}=e;if(!o.Dom.isContentEditable(t,i.editor)||(0,s.isInsideInvisibleElement)(t,i.editor)||!a&&o.Dom.isEmptyContent(t))return u(l({},e),{next:c.END});let d=(0,s.getSuitParent)(n,t,i.editor)||(0,s.getSuitChild)(n,t);if(d)return u(l({},e),{next:c.ELEMENT,element:d});let h=(0,s.suitableClosest)(n,t,i.editor);return n.elementIsList&&o.Dom.isList(h)?u(l({},e),{next:c.LIST}):h?u(l({},e),{next:c.EXTRACT}):u(l({},e),{next:"unwrap"!==r?c.UNWRAP_CHILDREN:c.END})}},[c.LIST]:{exec(e){let{element:t,jodit:i,mode:r}=e;if(r!==a.INITIAL&&"unwrap"!==r&&r!==a.REPLACE)return u(l({},e),{next:c.END});let s=o.Dom.closest(t,"li",i.editor);return s&&o.Dom.closest(t,n.LIST_TAGS,i.editor)?u(l({},e),{element:s,next:c.TOGGLE_LIST}):u(l({},e),{next:c.END})}},[c.TOGGLE_LIST]:{exec(e){return u(l({},e),{mode:(0,s.toggleOrderedList)(e.style,e.element,e.jodit,e.mode),next:c.END})}},[c.EXTRACT]:{exec(e){var t;let{element:i,jodit:n,style:a}=e,d=(0,s.suitableClosest)(a,i,n.editor);return((0,r.assert)(d,"This place should have an element"),!a.elementIsBlock&&(null==(t=a.options.attributes)?void 0:t.style)&&o.Dom.isBlock(d))?u(l({},e),{next:c.WRAP}):(a.elementIsBlock||(0,s.extractSelectedPart)(d,i,n),u(l({},e),{element:d,next:c.ELEMENT}))}},[c.UNWRAP_CHILDREN]:{exec(e){let{element:t,style:i}=e;return(0,s.unwrapChildren)(i,t)?u(l({},e),{mode:"unwrap",next:c.END}):u(l({},e),{next:c.WRAP})}},[c.WRAP]:{exec(e){let{element:t,jodit:i,style:n}=e,o=(0,s.wrap)(n,t,i);return u(l({},e),{next:n.elementIsList?c.END:c.CHANGE,mode:"wrap",element:o})}},[c.ELEMENT]:{exec(e){let{style:t,element:i,jodit:n}=e;return(0,s.toggleAttributes)(t,i,n,a.INITIAL,!0)!==a.INITIAL?u(l({},e),{next:c.CHANGE}):o.Dom.isTag(i,t.element)?u(l({},e),{next:c.UNWRAP}):u(l({},e),{next:c.END})}},[c.CHANGE]:{exec(e){let{style:t,element:i,jodit:n,mode:r}=e,a=(0,s.toggleAttributes)(t,i,n,e.mode);return"wrap"!==r&&"unset"===a&&!i.attributes.length&&o.Dom.isTag(i,t.element)?u(l({},e),{next:c.UNWRAP}):u(l({},e),{mode:a,next:c.END})}},[c.UNWRAP]:{exec(e){let{element:t,style:i,jodit:n}=e;if(t.attributes.length&&o.Dom.isTag(t,i.element))return u(l({},e),{next:c.REPLACE_DEFAULT});let r=t.parentElement;return i.elementIsBlock&&!i.elementIsDefault&&r&&r!==n.editor&&o.Dom.isBlock(r)&&!o.Dom.isTag(r,s.WRAP_NODES)?u(l({},e),{next:c.REPLACE_DEFAULT}):(o.Dom.unwrap(t),u(l({},e),{mode:"unwrap",next:c.END}))}},[c.REPLACE_DEFAULT]:{exec(e){return o.Dom.replace(e.element,e.style.defaultTag,e.jodit.createInside,!0),u(l({},e),{mode:a.REPLACE,next:c.END})}},[c.END]:{exec(e){return e}}};i.d(t,["states",0,c,"transactions",0,d])},97333:function(e,t,i){"use strict";i.d(t,{AsyncStorage:function(){return u}});var n=i(87058),o=i(2621),r=i(65638),s=i(21162);function a(e,t,i,n,o,r,s){try{var a=e[r](s),l=a.value}catch(e){i(e);return}a.done?t(l):Promise.resolve(l).then(n,o)}function l(e){return function(){var t=this,i=arguments;return new Promise(function(n,o){var r=e.apply(t,i);function s(e){a(r,n,o,s,l,"next",e)}function l(e){a(r,n,o,s,l,"throw",e)}s(void 0)})}}class u{set(e,t){return l(function*(){let i=yield this.provider;return yield i.set((0,n.camelCase)(this.prefix+e),t),this}).call(this)}delete(e){return l(function*(){let t=yield this.provider;return yield t.delete((0,n.camelCase)(this.prefix+e)),this}).call(this)}get(e){return l(function*(){return(yield this.provider).get((0,n.camelCase)(this.prefix+e))}).call(this)}exists(e){return l(function*(){return(yield this.provider).exists((0,n.camelCase)(this.prefix+e))}).call(this)}clear(){return l(function*(){let e=yield this.provider;return yield e.clear(),this}).call(this)}close(){return l(function*(){let e=yield this.provider;"close"in e&&"function"==typeof e.close&&(yield e.close())}).call(this)}static makeStorage(e=!1,t,i){let n,a=null==i?void 0:i.defaultProvider;return null!=a?new u(Promise.resolve(n="local"===a?(0,r.canUsePersistentStorage)("localStorage")?new r.LocalStorageProvider("Jodit_"+(t||"")):new s.MemoryStorageProvider:"memory"===a?new s.MemoryStorageProvider:a),t):("localStorage"===e||"sessionStorage"===e?(0,r.canUsePersistentStorage)(e)&&(n=new r.LocalStorageProvider("Jodit_"+(t||""),e)):("indexedDB"===e||!0===e)&&(n=(0,o.canUseIndexedDB)().then(e=>e?new o.IndexedDBProvider("Jodit_"+(t||""),"keyValueStore"):new s.MemoryStorageProvider)),n||(n=new s.MemoryStorageProvider),new u(Promise.resolve(n),t))}constructor(e,t){this.provider=e,this.prefix="Jodit_",t&&(this.prefix+=t)}}},2621:function(e,t,i){"use strict";i.d(t,{IndexedDBProvider:function(){return s},canUseIndexedDB:function(){return u},clearUseIndexedDBCache:function(){return l}});var n=i(82758);function o(e,t,i,n,o,r,s){try{var a=e[r](s),l=a.value}catch(e){i(e);return}a.done?t(l):Promise.resolve(l).then(n,o)}function r(e){return function(){var t=this,i=arguments;return new Promise(function(n,r){var s=e.apply(t,i);function a(e){o(s,n,r,a,l,"next",e)}function l(e){o(s,n,r,a,l,"throw",e)}a(void 0)})}}class s{getDB(){return this.dbPromise||(this.dbPromise=new Promise((e,t)=>{let i=indexedDB.open(this.dbName,this.DB_VERSION);i.onerror=()=>{t(i.error)},i.onsuccess=()=>{e(i.result)},i.onupgradeneeded=e=>{let t=e.target.result;t.objectStoreNames.contains(this.storeName)||t.createObjectStore(this.storeName)}})),this.dbPromise}performTransaction(e,t){return r(function*(){try{let i=(yield this.getDB()).transaction([this.storeName],e).objectStore(this.storeName),n=t(i);return new Promise((e,t)=>{n.onsuccess=()=>{e(n.result)},n.onerror=()=>{t(n.error)}})}catch(e){return Promise.reject(e)}}).call(this)}set(e,t){return r(function*(){try{yield this.performTransaction("readwrite",i=>i.put(t,e))}catch(e){n.IS_PROD}return this}).call(this)}delete(e){return r(function*(){try{yield this.performTransaction("readwrite",t=>t.delete(e))}catch(e){}return this}).call(this)}get(e){return r(function*(){try{return yield this.performTransaction("readonly",t=>t.get(e))}catch(e){return}}).call(this)}exists(e){return r(function*(){try{let t=yield this.performTransaction("readonly",t=>t.get(e));return void 0!==t}catch(e){return!1}}).call(this)}clear(){return r(function*(){try{yield this.performTransaction("readwrite",e=>e.clear())}catch(e){}return this}).call(this)}close(){return r(function*(){if(this.dbPromise){try{(yield this.dbPromise).close()}catch(e){}this.dbPromise=null}}).call(this)}keys(){return r(function*(){try{let e=yield this.performTransaction("readonly",e=>e.getAllKeys());return e&&"object"==typeof e&&"then"in e&&(e=yield e),e.map(e=>String(e))}catch(e){return[]}}).call(this)}values(){return r(function*(){try{let e=yield this.performTransaction("readonly",e=>e.getAll());return e&&"object"==typeof e&&"then"in e&&(e=yield e),e}catch(e){return[]}}).call(this)}entries(){return r(function*(){try{let[e,t]=yield Promise.all([this.keys(),this.values()]);return e.map((e,i)=>[e,t[i]])}catch(e){return[]}}).call(this)}constructor(e="JoditDB",t="keyValueStore"){this.dbName=e,this.dbPromise=null,this.DB_VERSION=1,this.storeName=t}}let a=null;function l(){a=null}function u(){return r(function*(){if(null!=a)return a;try{if("u"<typeof indexedDB)return a=!1,!1;let e="___Jodit___"+Math.random().toString(),t=indexedDB.open(e);return a=yield new Promise(i=>{t.onerror=()=>{i(!1)},t.onsuccess=()=>{indexedDB.deleteDatabase(e),i(!0)}})}catch(e){return a=!1,!1}})()}},65638:function(e,t,i){"use strict";i.d(t,{LocalStorageProvider:function(){return n}});class n{get storage(){return"sessionStorage"===this.strategy?sessionStorage:localStorage}set(e,t){try{let i=this.storage.getItem(this.rootKey),n=i?JSON.parse(i):{};n[e]=t,this.storage.setItem(this.rootKey,JSON.stringify(n))}catch(e){}return this}delete(e){try{let t=this.storage.getItem(this.rootKey);if(t){let i=JSON.parse(t);delete i[e],this.storage.setItem(this.rootKey,JSON.stringify(i))}}catch(e){}return this}get(e){try{let t=this.storage.getItem(this.rootKey),i=t?JSON.parse(t):{};return void 0!==i[e]?i[e]:void 0}catch(e){}}exists(e){return null!=this.get(e)}clear(){try{this.storage.removeItem(this.rootKey)}catch(e){}return this}constructor(e,t="localStorage"){this.rootKey=e,this.strategy=t}}i.d(t,["canUsePersistentStorage",0,(e="localStorage")=>{let t=new Map;if(t.has(e))return t.get(e);let i="___Jodit___"+Math.random().toString(),n="sessionStorage"===e?sessionStorage:localStorage;try{n.setItem(i,"1");let o="1"===n.getItem(i);return n.removeItem(i),t.set(e,o),o}catch(e){}return t.set(e,!1),!1}])},21162:function(e,t,i){"use strict";i.d(t,{MemoryStorageProvider:function(){return n}});class n{set(e,t){return this.data.set(e,t),this}delete(e){return this.data.delete(e),this}get(e){return this.data.get(e)}exists(e){return this.data.has(e)}clear(){return this.data.clear(),this}constructor(){this.data=new Map}}},12081:function(e,t,i){"use strict";i.d(t,{AsyncStorage:function(){return n.AsyncStorage},IndexedDBProvider:function(){return o.IndexedDBProvider},LocalStorageProvider:function(){return r.LocalStorageProvider},MemoryStorageProvider:function(){return s.MemoryStorageProvider},Storage:function(){return a.Storage},StorageKey:function(){return"Jodit_"},canUseIndexedDB:function(){return o.canUseIndexedDB},canUsePersistentStorage:function(){return r.canUsePersistentStorage},clearUseIndexedDBCache:function(){return o.clearUseIndexedDBCache}});var n=i(97333),o=i(2621),r=i(65638),s=i(21162),a=i(6700)},6700:function(e,t,i){"use strict";i.d(t,{Storage:function(){return a}});var n=i(87058),o=i(65638),r=i(21162);let s="Jodit_";class a{set(e,t){return this.provider.set((0,n.camelCase)(this.prefix+e),t),this}delete(e){return this.provider.delete((0,n.camelCase)(this.prefix+e)),this}get(e){return this.provider.get((0,n.camelCase)(this.prefix+e))}exists(e){return this.provider.exists((0,n.camelCase)(this.prefix+e))}clear(){return this.provider.clear(),this}static makeStorage(e=!1,t){let i;return"localStorage"===e||"sessionStorage"===e?(0,o.canUsePersistentStorage)(e)&&(i=new o.LocalStorageProvider(s+(t||""),e)):!0===e&&(0,o.canUsePersistentStorage)("localStorage")&&(i=new o.LocalStorageProvider(s+(t||""))),i||(i=new r.MemoryStorageProvider),new a(i,t)}constructor(e,t){this.provider=e,this.prefix=s,t&&(this.prefix+=t)}}},70231:function(e,t,i){"use strict";i.d(t,{Dlgs:function(){return a}});var n=i(580),o=i(27613),r=i(37790),s=i(638);class a{dlg(e){let t=(0,n.getPopupViewRoot)(this.o,this.container,this.od.body),i=new s.Dialog(function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{},n=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(i).filter(function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable}))),n.forEach(function(t){var n;n=i[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({language:this.o.language,shadowRoot:this.o.shadowRoot,popupRoot:t,ownerWindow:this.o.ownerWindow,defaultTimeout:this.o.defaultTimeout,direction:this.o.direction,theme:this.o.theme,globalFullSize:this.o.globalFullSize},e));return(0,r.markOwner)(this,i.container),i.parent=this,i.bindDestruct(this)}confirm(e,t,i){return e=l(e,this),t=l(t,this),s.Confirm.call(this.dlg({closeOnClickOverlay:!0}),e,t,i)}prompt(e,t,i,n,o){return e=l(e,this),t=l(t,this),n=l(n,this),s.Prompt.call(this.dlg({closeOnClickOverlay:!0}),e,t,i,n,o)}alert(e,t,i,n){return e=l(e,this),t=l(t,this),s.Alert.call(this.dlg({closeOnClickOverlay:!0}),e,t,i,n)}}function l(e,t){return(0,o.isString)(e)&&!(0,o.isHTML)(e)&&(e=t.i18n(e)),e}},14316:function(e,t,i){"use strict";i.d(t,{Elms:function(){return o}});var n=i(2748);class o{getElm(e){let t=this.getFullElName(e);return n.Dom.first(this.container,e=>n.Dom.isHTMLElement(e)&&e.classList.contains(t))}getElms(e){let t=this.getFullElName(e),i=[];return n.Dom.each(this.container,e=>{n.Dom.isHTMLElement(e)&&e.classList.contains(t)&&i.push(e)}),i}}},34176:function(e,t,i){"use strict";i.d(t,{Mods:function(){return o}});var n=i(86068);class o{afterSetMod(e,t){}setMod(e,t,i){e=e.toLowerCase();let o=this.mods[e];if(o===t)return this;let r=`${this.componentName}_${e}_`,s=(i||this.container).classList;return null!=o&&s.remove(`${r}${o.toString().toLowerCase()}`),(0,n.isVoid)(t)||""===t||s.add(`${r}${t.toString().toLowerCase()}`),this.mods[e]=t,this.afterSetMod(e,t),this}getMod(e){var t;return null!=(t=this.mods[e])?t:null}}},10830:function(e,t,i){"use strict";i.d(t,{Button:function(){return b},UIButton:function(){return g}});var n=i(78213),o=i(33433),r=i(87325),s=i(37133),a=i(2748),l=i(23282),u=i(70799),c=i(38837),d=i(29960),h=i(48538),p=i(12153),f=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let m=()=>({size:"middle",type:"button",role:"button",name:"",value:"",variant:"initial",disabled:!1,activated:!1,icon:{name:"empty",fill:"",iconURL:"",scale:void 0},tooltip:"",text:"",tabIndex:void 0}),g=class e extends h.UIElement{className(){return"UIButton"}setState(e){return Object.assign(this.state,e),this}get text(){let e=this.getElm("text");return(0,c.assert)(e,"Text element not found"),e}get icon(){let e=this.getElm("icon");return(0,c.assert)(e,"Icon element not found"),e}onChangeSize(){this.setMod("size",this.state.size)}onChangeType(){(0,d.attr)(this.container,"type",this.state.type)}onChangeRole(){(0,d.attr)(this.container,"role",this.state.role)}updateSize(){let e=(0,r.getComponentClass)("UIList"),t=this.closest(e);if(t){this.state.size=t.buttonSize;return}}onChangeStatus(){this.setMod("variant",this.state.variant)}onChangeText(){this.text.textContent=this.jodit.i18n(this.state.text),this.updateAriaLabel()}onChangeTextSetMode(){this.setMod("text-icons",!!this.state.text.trim().length)}onChangeDisabled(){(0,d.attr)(this.container,"disabled",this.state.disabled||null)}onChangeActivated(){(0,d.attr)(this.container,"aria-pressed",this.state.activated)}onChangeName(){this.container.classList.add(`${this.componentName}_${this.clearName(this.state.name)}`),this.name=this.state.name,(0,d.attr)(this.container,"data-ref",this.state.name),(0,d.attr)(this.container,"ref",this.state.name)}onChangeTooltip(){let e=this.state.tooltip?this.jodit.i18n(this.state.tooltip):null;this.get("j.o.useNativeTooltip")&&(0,d.attr)(this.container,"title",e),(0,d.attr)(this.container,"aria-label",e),this.updateAriaLabel()}updateAriaLabel(){let e=this.state.text.trim().length>0,t=this.state.tooltip?this.jodit.i18n(this.state.tooltip):null;(0,d.attr)(this.container,"aria-label",t),(0,d.attr)(this.button,"aria-label",e?null:t)}onChangeTabIndex(){(0,d.attr)(this.container,"tabindex",this.state.tabIndex)}onChangeIcon(){let e=this.get("j.o.textIcons");if(!0===e||(0,l.isFunction)(e)&&e(this.state.name))return;a.Dom.detach(this.icon);let t=p.Icon.makeIcon(this.j,this.state.icon);t&&a.Dom.append(this.icon,t)}focus(){this.container.focus()}isFocused(){let{activeElement:e}=this.od;return!!(e&&a.Dom.isOrContains(this.container,e))}createContainer(){let e=this.componentName,t=this.j.c.element("button",{class:e,type:"button",role:"button",ariaPressed:!1}),i=this.j.c.span(e+"__icon"),n=this.j.c.span(e+"__text");return a.Dom.append(t,i),a.Dom.append(t,n),t}destruct(){return this.j.e.off(this),this.j.e.off(this.container),super.destruct()}onAction(e){return this.actionHandlers.push(e),this}__onActionFire(e){e.buffer={actionTrigger:this},this.actionHandlers.forEach(t=>t.call(this,e)),this.j.e.fire(this,"click",e)}constructor(e,t){super(e),this.isButton=!0,this.state=m(),this.actionHandlers=[],this.button=this.container,this.updateSize(),this.onChangeSize(),this.onChangeStatus(),t&&this.hookStatus(n.STATUSES.ready,()=>{this.setState(t)})}};function b(e,t,i,n){let o=new g(e);return o.state.tabIndex=e.o.allowTabNavigation?0:-1,(0,u.isString)(t)?(o.state.icon.name=t,o.state.name=t,n&&(o.state.variant=n),i&&(o.state.text=i)):o.setState(t),o}f([o.cache],g.prototype,"text",null),f([o.cache],g.prototype,"icon",null),f([(0,s.watch)("state.size",{immediately:!1})],g.prototype,"onChangeSize",null),f([(0,s.watch)("state.type",{immediately:!1})],g.prototype,"onChangeType",null),f([(0,s.watch)("state.role",{immediately:!1})],g.prototype,"onChangeRole",null),f([(0,s.watch)("parentElement")],g.prototype,"updateSize",null),f([(0,s.watch)("state.variant",{immediately:!1})],g.prototype,"onChangeStatus",null),f([(0,s.watch)("state.text",{immediately:!1})],g.prototype,"onChangeText",null),f([(0,s.watch)("state.text",{immediately:!1})],g.prototype,"onChangeTextSetMode",null),f([(0,s.watch)("state.disabled")],g.prototype,"onChangeDisabled",null),f([(0,s.watch)("state.activated")],g.prototype,"onChangeActivated",null),f([(0,s.watch)("state.name",{immediately:!1})],g.prototype,"onChangeName",null),f([(0,s.watch)("state.tooltip",{immediately:!1})],g.prototype,"onChangeTooltip",null),f([(0,s.watch)("state.tabIndex",{immediately:!1})],g.prototype,"onChangeTabIndex",null),f([(0,s.watch)("state.icon",{immediately:!1})],g.prototype,"onChangeIcon",null),f([o.cacheHTML],g.prototype,"createContainer",null),f([(0,s.watch)("button:click")],g.prototype,"__onActionFire",null),g=f([r.component],g),i.d(t,["UIButtonState",0,m])},71916:function(e,t,i){"use strict";i.d(t,{UIButtonGroup:function(){return l}});var n=i(87325),o=i(2748),r=i(38837),s=i(10830),a=i(62405);let l=class e extends a.UIGroup{className(){return"UIButtonGroup"}render(e){return`<div>
8
+ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var i=t();for(var n in i)("object"==typeof exports?exports:e)[n]=i[n]}}(self,function(){return function(){var e,t,i={94668:function(e){e.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="M13 3H5v18h14V9l-6-6Zm0 0v6h6M12 12v6m-3-3h6"/> </g> </svg>'},86428:function(e){e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"> \x3c!-- Background rounded rect --\x3e <rect x="1" y="1" width="22" height="22" rx="3"/> \x3c!-- Letter A - outer shape --\x3e <polygon points="8,5 2,19 5,19 6.5,16 11.5,16 13,19 16,19 10,5" fill="white"/> \x3c!-- Letter A - inner triangle (hole) --\x3e <polygon points="9,9 7.5,13 10.5,13" fill="currentColor"/> \x3c!-- Letter I --\x3e <rect x="17" y="5" width="3" height="14" fill="white"/> </svg>'},75966:function(e){e.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 17 11-11 4 4L7 21Zm8-8 4 4M5 3v4M3 5h4M19 2v4m-2-2h4m-1 12v4m-2-2h4"/> </g> </svg>'},83207:function(e){e.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="m10 6 6 6-6 6"/> </g> </svg>'},99219:function(e){e.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 10 18-7-7 18-3-8-8-3Zm8 3L21 3"/> </g> </svg>'},63674:function(e){e.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="M12 2 4 5v7c0 5 8 10 8 10s8-5 8-10V5l-8-3Z"/> </g> </svg>'},4133:function(e){e.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="m13 2-9 12h6l-1 8 11-13h-7V2Z"/> </g> </svg>'},68583:function(e){e.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 4v6h6M3 10l4-4a8 8 0 1 1-1 12M12 8v5l3 2"/> </g> </svg>'},34586:function(e){e.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"> <rect x="2" y="5" width="20" height="13" rx="3"/><path d="m11 11 2 11 2-4 4-1-8-6"/> </g> </svg>'},91729:function(e){e.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="M2 19 8 5l6 14M4.5 13h7M21 12v7m0-5a3 3 0 1 0 0 3"/> </g> </svg>'},46995:function(e){e.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"> <circle cx="12" cy="12" r="9"/><path d="M8 9h0m8 0h0M8 15a5 5 0 0 0 8 0"/> </g> </svg>'},83556:function(e){e.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" stroke-linecap="round" stroke-linejoin="round"> <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M12 5.5v6" fill="none" /> <path d="M9 9l3 3l3 -3" fill="none" /> <path d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4" fill="none" /> <path d="M2 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1" fill="none" /> <path d="M17 16.5a1.5 1.5 0 0 0 -3 0v3a1.5 1.5 0 0 0 3 0" fill="none" /> <path d="M9.5 15a1.5 1.5 0 0 1 1.5 1.5v3a1.5 1.5 0 0 1 -3 0v-3a1.5 1.5 0 0 1 1.5 -1.5" fill="none" /> <path d="M19.5 15l3 6" fill="none" /> <path d="M19.5 21l3 -6" fill="none" /> </svg>'},4872:function(e){e.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" stroke-linecap="round" stroke-linejoin="round" > <path stroke="none" d="M0 0h24v24H0z" fill="none" /> <path d="M12 5.5v6" fill="none" /> <path d="M9 9l3 3l3 -3" fill="none" /> <path d="M5 12v-7a2 2 0 0 1 2 -2h7l5 5v4" fill="none" /> <path d="M5 18h1.5a1.5 1.5 0 0 0 0 -3h-1.5v6" fill="none" /> <path d="M17 18h2" fill="none" /> <path d="M20 15h-3v6" fill="none" /> <path d="M11 15v6h1a2 2 0 0 0 2 -2v-2a2 2 0 0 0 -2 -2h-1" fill="none" /> </svg>'},53121:function(e){e.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="M12 3H5v18h14v-7M12 12l9-9m-6 0h6v6"/> </g> </svg>'},7307:function(e){e.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="M12 21 3.5 12.5a5 5 0 0 1 7-7L12 7l1.5-1.5a5 5 0 0 1 7 7L12 21Z"/> </g> </svg>'},24928:function(e){e.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="m2 11 10-8 10 8M5 9v12h5v-7h4v7h5V9"/> </g> </svg>'},96910:function(e){e.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 7V4h6l3 3h9v14H3V7ZM12 11v7m-3.5-3.5h7"/> </g> </svg>'},81122:function(e){e.exports='<svg viewBox="0 0 83 84" fill="none" xmlns="http://www.w3.org/2000/svg"> <circle cx="40" cy="44" r="37" stroke="black" stroke-width="6"/> <path d="M40 4V44H79" stroke="black" stroke-width="5"/> <circle cx="40" cy="6" r="6" fill="#C8C8C8"/> <circle cx="40" cy="43" r="6" fill="#C8C8C8"/> <circle cx="77" cy="44" r="6" fill="#C8C8C8"/> </svg>'},49377:function(e){e.exports='<svg viewBox="0 0 76 76" xmlns="http://www.w3.org/2000/svg"> <path d="M38 6.90909C36.2517 6.90909 34.7591 7.58381 33.5221 8.93324C32.2852 10.2827 31.6667 11.911 31.6667 13.8182V20.7273H30.0833V15.7074C30.0833 13.9801 29.5556 12.5137 28.5 11.3082C27.4444 10.1027 26.125 9.5 24.5417 9.5C23.0243 9.5 21.7214 10.0938 20.6328 11.2813C19.5443 12.4688 19 13.8902 19 15.5455V38.7017L17.4167 37.0824V27.7983C17.4167 26.071 16.8889 24.6046 15.8333 23.3991C14.7778 22.1937 13.4583 21.5909 11.875 21.5909C10.3576 21.5909 9.05469 22.1847 7.96615 23.3722C6.8776 24.5597 6.33333 25.9811 6.33333 27.6364V39.7273C6.33333 41.4186 6.91059 42.8939 8.0651 44.1534L23.4036 60.1307C24.6901 61.5341 25.3333 63.3693 25.3333 65.6364C25.3333 66.572 25.6467 67.3816 26.2734 68.0653C26.9002 68.7491 27.6424 69.0909 28.5 69.0909H60.1667C61.0243 69.0909 61.7665 68.7491 62.3932 68.0653C63.02 67.3816 63.3333 66.572 63.3333 65.6364V64.2869C63.3333 62.8116 63.4983 61.4261 63.8281 60.1307L69.1719 36.5966C69.5017 35.3011 69.6667 33.9157 69.6667 32.4403V19.1619C69.6667 17.4347 69.1389 15.9683 68.0833 14.7628C67.0278 13.5573 65.7083 12.9545 64.125 12.9545C62.6076 12.9545 61.3047 13.5483 60.2161 14.7358C59.1276 15.9233 58.5833 17.3447 58.5833 19V20.7273H57V13.9801C57 12.5407 56.5877 11.2363 55.763 10.0668C54.9384 8.89725 53.8828 8.16856 52.5964 7.88068C52.1345 7.80871 51.7552 7.77273 51.4583 7.77273C49.941 7.77273 48.638 8.36648 47.5495 9.55398C46.4609 10.7415 45.9167 12.1629 45.9167 13.8182V20.7273H44.3333V14.142C44.3333 12.3068 43.7973 10.6965 42.7253 9.31108C41.6532 7.92566 40.2925 7.14299 38.6432 6.96307C38.4783 6.92708 38.2639 6.90909 38 6.90909ZM38 0C40.7708 0 43.2283 0.899621 45.3724 2.69886C47.2526 1.47538 49.2813 0.863636 51.4583 0.863636C53.4045 0.863636 55.2352 1.34943 56.9505 2.32102C58.6658 3.29261 60.0842 4.66004 61.2057 6.4233C62.0964 6.1714 63.0694 6.04545 64.125 6.04545C67.4236 6.04545 70.2274 7.33191 72.5365 9.90483C74.8455 12.4777 76 15.5634 76 19.1619V32.4403C76 34.2756 75.7856 36.2188 75.3568 38.2699L69.9635 61.804C69.7656 62.6676 69.6667 63.9451 69.6667 65.6364C69.6667 68.5152 68.7431 70.9621 66.8958 72.9773C65.0486 74.9924 62.8056 76 60.1667 76H28.5C25.7292 76 23.4531 74.9474 21.6719 72.8423C19.8906 70.7372 19 68.1733 19 65.1506L3.76042 49.1733C1.25347 46.5464 0 43.3977 0 39.7273V27.6364C0 24.0739 1.16276 21.0241 3.48828 18.4872C5.8138 15.9503 8.60938 14.6818 11.875 14.6818C12.2378 14.6818 12.5017 14.6998 12.6667 14.7358C12.8646 11.3172 14.1098 8.43845 16.4023 6.09943C18.6949 3.76042 21.408 2.59091 24.5417 2.59091C26.2569 2.59091 27.8733 2.96875 29.3906 3.72443C31.7656 1.24148 34.6354 0 38 0Z"/> </svg>'},46425:function(e){e.exports='<svg viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg"> <g> <path d="M23,13.6l5,5V4c0-0.6-0.4-1-1-1h-4V13.6z"/> <polygon points="12.4,3 16.7,7.3 19.7,10.3 21,11.6 21,3"/> <path d="M14.6,8l-5-5H5C4.4,3,4,3.4,4,4v14.6L14.6,8z"/> </g> <path d="M28.8,29.2L26,26.4c0.7-1,1-2.1,1-3.4c0-3.3-2.7-6-6-6s-6,2.7-6,6s2.7,6,6,6c1.2,0,2.4-0.4,3.4-1l2.8,2.8 c0.4,0.4,1.2,0.4,1.6,0C29.2,30.4,29.2,29.6,28.8,29.2z"/> <path d="M13,23c0-4.4,3.6-8,8-8c0.2,0,0.4,0,0.6,0l-0.3-0.3c0,0,0,0,0,0l-3-3L16,9.4l-12,12V26c0,0.6,0.4,1,1,1h9.1 C13.4,25.8,13,24.5,13,23z"/> </svg>'},86820:function(e){e.exports='<svg viewBox="0 0 88 88" fill="none" xmlns="http://www.w3.org/2000/svg"> <g> <path d="M44 0.513519C27.2931 0.513519 13.75 13.8981 13.75 30.4095C13.75 46.9208 44 87.4835 44 87.4835C44 87.4835 74.25 46.9208 74.25 30.4095C74.25 13.8981 60.7069 0.513519 44 0.513519ZM19.25 30.4095C19.25 16.921 30.3518 5.94914 44 5.94914C57.6482 5.94914 68.75 16.921 68.75 30.4095C68.75 39.8049 54.9945 62.4871 44 78.1329C33.0055 62.4871 19.25 39.8049 19.25 30.4095ZM44 16.8204C36.4052 16.8204 30.25 22.9035 30.25 30.4095C30.25 37.9154 36.4052 43.9985 44 43.9985C51.5948 43.9985 57.75 37.9154 57.75 30.4095C57.75 22.9035 51.5948 16.8204 44 16.8204ZM44 38.5629C39.4508 38.5629 35.75 34.9054 35.75 30.4095C35.75 25.9135 39.4508 22.256 44 22.256C48.5492 22.256 52.25 25.9135 52.25 30.4095C52.25 34.9054 48.5492 38.5629 44 38.5629Z" fill="#404040"/> </g> <defs> <rect width="88" height="86.97" fill="white" transform="translate(0 0.513519)"/> </defs> </svg>'},36576:function(e){e.exports='<svg viewBox="0 0 77 86" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M7 38.6056L33.1367 7.96263L69.5477 45.7058L36.2444 72.166L7 76.9673V38.6056Z" stroke="black" stroke-width="6"/> <circle cx="71" cy="45" r="6" fill="#C8C8C8"/> <circle cx="35" cy="73" r="6" fill="#C8C8C8"/> <circle cx="6" cy="79" r="6" fill="#C8C8C8"/> <circle cx="6" cy="39" r="6" fill="#C8C8C8"/> <circle cx="33" cy="6" r="6" fill="#C8C8C8"/> </svg>'},27622:function(e){e.exports='<svg width="72" height="86" viewBox="0 0 72 86" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M17.1832 79.1351L13.6833 45.0811L49.6832 58.4595L47.6832 5.35135" stroke="black" stroke-width="6"/> <circle cx="13" cy="44" r="6" fill="#C8C8C8"/> <circle cx="17" cy="77" r="6" fill="#C8C8C8"/> <circle cx="51" cy="59" r="6" fill="#C8C8C8"/> <circle cx="48" cy="6" r="6" fill="#C8C8C8"/> </svg>'},89687:function(e){e.exports='<svg viewBox="0 0 47 61" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M46.7671 7.12793H27.3433V61H19.416V7.12793H0.0336914V0.570312H46.7671V7.12793Z" fill="black"/> </svg>'},25088:function(e){e.exports='<svg width="11" height="15" viewBox="0 0 11 15" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M10.925 7.122V14H9.747L9.462 13.164C9.044 13.4933 8.55 13.7467 7.98 13.924C7.42267 14.1013 6.82733 14.19 6.194 14.19C5.054 14.19 4.066 13.9177 3.23 13.373C2.394 12.8157 1.75433 12.024 1.311 10.998C0.867667 9.972 0.646 8.756 0.646 7.35C0.646 5.96933 0.880333 4.766 1.349 3.74C1.83033 2.714 2.50167 1.92233 3.363 1.365C4.237 0.794999 5.25667 0.509999 6.422 0.509999C7.41 0.509999 8.284 0.693666 9.044 1.061C9.804 1.42833 10.3613 1.935 10.716 2.581L9.747 3.55C9.41767 3.03067 8.968 2.638 8.398 2.372C7.84067 2.09333 7.18833 1.954 6.441 1.954C5.17433 1.954 4.18633 2.429 3.477 3.379C2.76767 4.329 2.413 5.65267 2.413 7.35C2.413 9.07267 2.755 10.4153 3.439 11.378C4.13567 12.3407 5.10467 12.822 6.346 12.822C6.92867 12.822 7.46067 12.7397 7.942 12.575C8.436 12.4103 8.854 12.1697 9.196 11.853V8.414H6.023V7.122H10.925Z" fill="black"/> </svg>'},67008:function(e){e.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"> <rect x="2" y="3" width="20" height="18" rx="2"/><path d="M2 8h20m-13 4-3 3 3 3m6-6 3 3-3 3"/> </g> </svg>'},63643:function(e){e.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"> <rect x="2" y="5" width="20" height="14" rx="2"/><path d="M6 9h0m4 0h0m4 0h0m4 0h0M6 13h0m4 0h0m4 0h0m4 0h0M8 16h8"/> </g> </svg>'},27926:function(e){e.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="M9 5h12v14H9l-7-7 7-7Zm3 4 6 6m0-6-6 6"/> </g> </svg>'},10690:function(e){e.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 11 8-8 8 8h-5v6H9v-6H4ZM8 21h8"/> </g> </svg>'},91997:function(e){e.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="M5 12h0m7 0h0m7 0h0"/> </g> </svg>'},11699:function(e){e.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 11 8-8 8 8h-5v10H9V11H4Z"/> </g> </svg>'},98126:function(e){e.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 12h14m-4-4 4 4-4 4M21 5v14"/> </g> </svg>'},27222:function(e){e.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"> <rect x="6" y="2" width="12" height="20" rx="3"/><path d="M10 5h4M12 18h0"/> </g> </svg>'},17405:function(e){e.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="M5 8V3h14v5M5 16v5h14v-5M2 12h3m4 0h3m4 0h3m3 0h0"/> </g> </svg>'},75689:function(e){e.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"> <rect x="4" y="5" width="16" height="16" rx="2"/><rect x="9" y="3" width="6" height="4" rx="1"/><path d="m9 11-3 3 3 3m6-6 3 3-3 3"/> </g> </svg>'},78879:function(e){e.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 7V3h4m4 0h3m4 0h3v4m0 4v3m0 4v3h-4m-4 0h-3m-4 0H3v-4m0-4v-3M7 8h10M7 12h10M7 16h6"/> </g> </svg>'},78955:function(e){e.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"> <rect x="3" y="3" width="7" height="7" rx="1"/><rect x="3" y="14" width="7" height="7" rx="1"/><path d="M14 6h7m-7 4h4m-4 7h7m-7 4h4"/> </g> </svg>'},18993:function(e){e.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"> <rect x="3" y="3" width="18" height="18" rx="2"/><path d="M3 9h18M10 9v12M14 13h3m-3 4h3"/> </g> </svg>'},11373:function(e){e.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 6 2 2 3-4M12 6h9m-18 7 2 2 3-4m4 2h9M3 20h4m5 0h9"/> </g> </svg>'},74922:function(e){e.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 7h18m-4-4 4 4-4 4M21 17H3m4-4-4 4 4 4"/> </g> </svg>'},34575:function(e){e.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 5h11M8 3v2m4 0c-1 6-4 10-9 12M5 8c1 3 3 5 6 7m2 7 4-11 4 11m-6-4h4"/> </g> </svg>'},46146:function(e){"u">typeof self&&self,e.exports=function(){var e=[function(e,t,i){"use strict";var n=i(3);function o(e){return!0===n(e)&&"[object Object]"===Object.prototype.toString.call(e)}e.exports=function(e){var t,i;return!1!==o(e)&&"function"==typeof(t=e.constructor)&&!1!==o(i=t.prototype)&&!1!==i.hasOwnProperty("isPrototypeOf")}},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VERSION=t.PALETTE_MATERIAL_CHROME=t.PALETTE_MATERIAL_500=t.COLOR_NAMES=t.getLuminance=t.intToRgb=t.rgbToInt=t.rgbToHsv=t.rgbToHsl=t.hslToRgb=t.rgbToHex=t.parseColor=t.parseColorToHsla=t.parseColorToHsl=t.parseColorToRgba=t.parseColorToRgb=t.from=t.createPicker=void 0;var n=function(){function e(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,i,n){return i&&e(t.prototype,i),n&&e(t,n),t}}(),o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var i=[],n=!0,o=!1,r=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(i.push(s.value),!t||i.length!==t);n=!0);}catch(e){o=!0,r=e}finally{try{!n&&a.return&&a.return()}finally{if(o)throw r}}return i}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")},r=i(2),s=l(i(0)),a=l(i(4));function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}function c(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}var d="u">typeof window&&window.navigator.userAgent.indexOf("Edge")>-1,h="u">typeof window&&window.navigator.userAgent.indexOf("rv:")>-1,p={id:null,attachTo:"body",showHSL:!0,showRGB:!0,showHEX:!0,showAlpha:!1,color:"#ff0000",palette:null,paletteEditable:!1,useAlphaInPalette:"auto",slBarSize:[232,150],hueBarSize:[150,11],alphaBarSize:[150,11]},f="COLOR",m="RGBA_USER",g="HSLA_USER";function b(e,t,i){return e?e instanceof HTMLElement?e:e instanceof NodeList?e[0]:"string"==typeof e?document.querySelector(e):e.jquery?e.get(0):i?t:null:t}function v(e){var t=e.getContext("2d"),i=+e.width,n=+e.height,s=t.createLinearGradient(1,1,1,n-1);return s.addColorStop(0,"white"),s.addColorStop(1,"black"),{setHue:function(e){var o=t.createLinearGradient(1,0,i-1,0);o.addColorStop(0,"hsla("+e+", 100%, 50%, 0)"),o.addColorStop(1,"hsla("+e+", 100%, 50%, 1)"),t.fillStyle=s,t.fillRect(0,0,i,n),t.fillStyle=o,t.globalCompositeOperation="multiply",t.fillRect(0,0,i,n),t.globalCompositeOperation="source-over"},grabColor:function(e,i){return t.getImageData(e,i,1,1).data},findColor:function(e,t,s){var a=o((0,r.rgbToHsv)(e,t,s),3);return[a[1]*i,n-a[2]*n]}}}function y(e,t,i){return null===e?t:/^\s*$/.test(e)?i:!!/true|yes|1/i.test(e)||!/false|no|0/i.test(e)&&t}function w(e,t,i){if(null===e)return t;if(/^\s*$/.test(e))return i;var n=e.split(",").map(Number);return 2===n.length&&n[0]&&n[1]?n:t}var _=function(){function e(t,i){if(u(this,e),i?(t=b(t),this.options=Object.assign({},p,i)):t&&(0,s.default)(t)?(this.options=Object.assign({},p,t),t=b(this.options.attachTo)):(this.options=Object.assign({},p),t=b((0,r.nvl)(t,this.options.attachTo))),!t)throw Error("Container not found: "+this.options.attachTo);!function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"acp-";if(t.hasAttribute(i+"show-hsl")&&(e.showHSL=y(t.getAttribute(i+"show-hsl"),p.showHSL,!0)),t.hasAttribute(i+"show-rgb")&&(e.showRGB=y(t.getAttribute(i+"show-rgb"),p.showRGB,!0)),t.hasAttribute(i+"show-hex")&&(e.showHEX=y(t.getAttribute(i+"show-hex"),p.showHEX,!0)),t.hasAttribute(i+"show-alpha")&&(e.showAlpha=y(t.getAttribute(i+"show-alpha"),p.showAlpha,!0)),t.hasAttribute(i+"palette-editable")&&(e.paletteEditable=y(t.getAttribute(i+"palette-editable"),p.paletteEditable,!0)),t.hasAttribute(i+"sl-bar-size")&&(e.slBarSize=w(t.getAttribute(i+"sl-bar-size"),p.slBarSize,[232,150])),t.hasAttribute(i+"hue-bar-size")&&(e.hueBarSize=w(t.getAttribute(i+"hue-bar-size"),p.hueBarSize,[150,11]),e.alphaBarSize=e.hueBarSize),t.hasAttribute(i+"palette")){var n=t.getAttribute(i+"palette");switch(n){case"PALETTE_MATERIAL_500":e.palette=r.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":case"":e.palette=r.PALETTE_MATERIAL_CHROME;break;default:e.palette=n.split(/[;|]/)}}t.hasAttribute(i+"color")&&(e.color=t.getAttribute(i+"color"))}(this.options,t),this.H=0,this.S=0,this.L=0,this.R=0,this.G=0,this.B=0,this.A=1,this.palette={},this.element=document.createElement("div"),this.options.id&&(this.element.id=this.options.id),this.element.className="a-color-picker",this.element.innerHTML=a.default,t.appendChild(this.element);var n=this.element.querySelector(".a-color-picker-h");this.setupHueCanvas(n),this.hueBarHelper=v(n),this.huePointer=this.element.querySelector(".a-color-picker-h+.a-color-picker-dot");var o=this.element.querySelector(".a-color-picker-sl");this.setupSlCanvas(o),this.slBarHelper=v(o),this.slPointer=this.element.querySelector(".a-color-picker-sl+.a-color-picker-dot"),this.preview=this.element.querySelector(".a-color-picker-preview"),this.setupClipboard(this.preview.querySelector(".a-color-picker-clipbaord")),this.options.showHSL?(this.setupInput(this.inputH=this.element.querySelector(".a-color-picker-hsl>input[nameref=H]")),this.setupInput(this.inputS=this.element.querySelector(".a-color-picker-hsl>input[nameref=S]")),this.setupInput(this.inputL=this.element.querySelector(".a-color-picker-hsl>input[nameref=L]"))):this.element.querySelector(".a-color-picker-hsl").remove(),this.options.showRGB?(this.setupInput(this.inputR=this.element.querySelector(".a-color-picker-rgb>input[nameref=R]")),this.setupInput(this.inputG=this.element.querySelector(".a-color-picker-rgb>input[nameref=G]")),this.setupInput(this.inputB=this.element.querySelector(".a-color-picker-rgb>input[nameref=B]"))):this.element.querySelector(".a-color-picker-rgb").remove(),this.options.showHEX?this.setupInput(this.inputRGBHEX=this.element.querySelector("input[nameref=RGBHEX]")):this.element.querySelector(".a-color-picker-rgbhex").remove(),this.options.paletteEditable||this.options.palette&&this.options.palette.length>0?this.setPalette(this.paletteRow=this.element.querySelector(".a-color-picker-palette")):(this.paletteRow=this.element.querySelector(".a-color-picker-palette"),this.paletteRow.remove()),this.options.showAlpha?(this.setupAlphaCanvas(this.element.querySelector(".a-color-picker-a")),this.alphaPointer=this.element.querySelector(".a-color-picker-a+.a-color-picker-dot")):this.element.querySelector(".a-color-picker-alpha").remove(),this.element.style.width=this.options.slBarSize[0]+"px",this.onValueChanged(f,this.options.color)}return n(e,[{key:"setupHueCanvas",value:function(e){var t=this;e.width=this.options.hueBarSize[0],e.height=this.options.hueBarSize[1];for(var i=e.getContext("2d"),n=i.createLinearGradient(0,0,this.options.hueBarSize[0],0),o=0;o<=1;o+=1/360)n.addColorStop(o,"hsl("+360*o+", 100%, 50%)");i.fillStyle=n,i.fillRect(0,0,this.options.hueBarSize[0],this.options.hueBarSize[1]);var s=function(i){var n=(0,r.limit)(i.clientX-e.getBoundingClientRect().left,0,t.options.hueBarSize[0]),o=Math.round(360*n/t.options.hueBarSize[0]);t.huePointer.style.left=n-7+"px",t.onValueChanged("H",o)},a=function e(){document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",e)};e.addEventListener("mousedown",function(e){s(e),document.addEventListener("mousemove",s),document.addEventListener("mouseup",a)})}},{key:"setupSlCanvas",value:function(e){var t=this;e.width=this.options.slBarSize[0],e.height=this.options.slBarSize[1];var i=function(i){var n=(0,r.limit)(i.clientX-e.getBoundingClientRect().left,0,t.options.slBarSize[0]-1),o=(0,r.limit)(i.clientY-e.getBoundingClientRect().top,0,t.options.slBarSize[1]-1),s=t.slBarHelper.grabColor(n,o);t.slPointer.style.left=n-7+"px",t.slPointer.style.top=o-7+"px",t.onValueChanged("RGB",s)},n=function e(){document.removeEventListener("mousemove",i),document.removeEventListener("mouseup",e)};e.addEventListener("mousedown",function(e){i(e),document.addEventListener("mousemove",i),document.addEventListener("mouseup",n)})}},{key:"setupAlphaCanvas",value:function(e){var t=this;e.width=this.options.alphaBarSize[0],e.height=this.options.alphaBarSize[1];var i=e.getContext("2d"),n=i.createLinearGradient(0,0,e.width-1,0);n.addColorStop(0,"hsla(0, 0%, 50%, 0)"),n.addColorStop(1,"hsla(0, 0%, 50%, 1)"),i.fillStyle=n,i.fillRect(0,0,this.options.alphaBarSize[0],this.options.alphaBarSize[1]);var o=function(i){var n=(0,r.limit)(i.clientX-e.getBoundingClientRect().left,0,t.options.alphaBarSize[0]),o=+(n/t.options.alphaBarSize[0]).toFixed(2);t.alphaPointer.style.left=n-7+"px",t.onValueChanged("ALPHA",o)},s=function e(){document.removeEventListener("mousemove",o),document.removeEventListener("mouseup",e)};e.addEventListener("mousedown",function(e){o(e),document.addEventListener("mousemove",o),document.addEventListener("mouseup",s)})}},{key:"setupInput",value:function(e){var t=this,i=+e.min,n=+e.max,o=e.getAttribute("nameref");e.hasAttribute("select-on-focus")&&e.addEventListener("focus",function(){e.select()}),"text"===e.type?e.addEventListener("change",function(){t.onValueChanged(o,e.value)}):((d||h)&&e.addEventListener("keydown",function(s){"Up"===s.key?(e.value=(0,r.limit)(+e.value+1,i,n),t.onValueChanged(o,e.value),s.returnValue=!1):"Down"===s.key&&(e.value=(0,r.limit)(e.value-1,i,n),t.onValueChanged(o,e.value),s.returnValue=!1)}),e.addEventListener("change",function(){var s=+e.value;t.onValueChanged(o,(0,r.limit)(s,i,n))}))}},{key:"setupClipboard",value:function(e){var t=this;e.title="click to copy",e.addEventListener("click",function(){e.value=(0,r.parseColor)([t.R,t.G,t.B,t.A],"hexcss4"),e.select(),document.execCommand("copy")})}},{key:"setPalette",value:function(e){var t=this,i="auto"===this.options.useAlphaInPalette?this.options.showAlpha:this.options.useAlphaInPalette,n=null;switch(this.options.palette){case"PALETTE_MATERIAL_500":n=r.PALETTE_MATERIAL_500;break;case"PALETTE_MATERIAL_CHROME":n=r.PALETTE_MATERIAL_CHROME;break;default:n=(0,r.ensureArray)(this.options.palette)}if(this.options.paletteEditable||n.length>0){var o=function(i,n,o){var r=e.querySelector('.a-color-picker-palette-color[data-color="'+i+'"]')||document.createElement("div");r.className="a-color-picker-palette-color",r.style.backgroundColor=i,r.setAttribute("data-color",i),r.title=i,e.insertBefore(r,n),t.palette[i]=!0,o&&t.onPaletteColorAdd(i)},s=function(i,n){i?(e.removeChild(i),t.palette[i.getAttribute("data-color")]=!1,n&&t.onPaletteColorRemove(i.getAttribute("data-color"))):(e.querySelectorAll(".a-color-picker-palette-color[data-color]").forEach(function(t){e.removeChild(t)}),Object.keys(t.palette).forEach(function(e){t.palette[e]=!1}),n&&t.onPaletteColorRemove())};if(n.map(function(e){return(0,r.parseColor)(e,i?"rgbcss4":"hex")}).filter(function(e){return!!e}).forEach(function(e){return o(e)}),this.options.paletteEditable){var a=document.createElement("div");a.className="a-color-picker-palette-color a-color-picker-palette-add",a.innerHTML="+",e.appendChild(a),e.addEventListener("click",function(e){/a-color-picker-palette-add/.test(e.target.className)?e.shiftKey?s(null,!0):o(i?(0,r.parseColor)([t.R,t.G,t.B,t.A],"rgbcss4"):(0,r.rgbToHex)(t.R,t.G,t.B),e.target,!0):/a-color-picker-palette-color/.test(e.target.className)&&(e.shiftKey?s(e.target,!0):t.onValueChanged(f,e.target.getAttribute("data-color")))})}else e.addEventListener("click",function(e){/a-color-picker-palette-color/.test(e.target.className)&&t.onValueChanged(f,e.target.getAttribute("data-color"))})}else e.style.display="none"}},{key:"updatePalette",value:function(e){this.paletteRow.innerHTML="",this.palette={},this.paletteRow.parentElement||this.element.appendChild(this.paletteRow),this.options.palette=e,this.setPalette(this.paletteRow)}},{key:"onValueChanged",value:function(e,t){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{silent:!1};switch(e){case"H":this.H=t;var n=o((0,r.hslToRgb)(this.H,this.S,this.L),3);this.R=n[0],this.G=n[1],this.B=n[2],this.slBarHelper.setHue(t),this.updatePointerH(this.H),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"S":this.S=t;var s=o((0,r.hslToRgb)(this.H,this.S,this.L),3);this.R=s[0],this.G=s[1],this.B=s[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"L":this.L=t;var a=o((0,r.hslToRgb)(this.H,this.S,this.L),3);this.R=a[0],this.G=a[1],this.B=a[2],this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"R":this.R=t;var l=o((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=l[0],this.S=l[1],this.L=l[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"G":this.G=t;var u=o((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=u[0],this.S=u[1],this.L=u[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"B":this.B=t;var c=o((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=c[0],this.S=c[1],this.L=c[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGBHEX(this.R,this.G,this.B);break;case"RGB":var d=o(t,3);this.R=d[0],this.G=d[1],this.B=d[2];var h=o((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=h[0],this.S=h[1],this.L=h[2],this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B);break;case m:var p=o(t,4);this.R=p[0],this.G=p[1],this.B=p[2],this.A=p[3];var b=o((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=b[0],this.S=b[1],this.L=b[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case g:var v=o(t,4);this.H=v[0],this.S=v[1],this.L=v[2],this.A=v[3];var y=o((0,r.hslToRgb)(this.H,this.S,this.L),3);this.R=y[0],this.G=y[1],this.B=y[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"RGBHEX":var w=o((0,r.cssColorToRgb)(t)||[this.R,this.G,this.B],3);this.R=w[0],this.G=w[1],this.B=w[2];var _=o((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=_[0],this.S=_[1],this.L=_[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B);break;case f:var C=o((0,r.parseColor)(t,"rgba")||[0,0,0,1],4);this.R=C[0],this.G=C[1],this.B=C[2],this.A=C[3];var k=o((0,r.rgbToHsl)(this.R,this.G,this.B),3);this.H=k[0],this.S=k[1],this.L=k[2],this.slBarHelper.setHue(this.H),this.updatePointerH(this.H),this.updatePointerSL(this.H,this.S,this.L),this.updateInputHSL(this.H,this.S,this.L),this.updateInputRGB(this.R,this.G,this.B),this.updateInputRGBHEX(this.R,this.G,this.B),this.updatePointerA(this.A);break;case"ALPHA":this.A=t}1===this.A?this.preview.style.backgroundColor="rgb("+this.R+","+this.G+","+this.B+")":this.preview.style.backgroundColor="rgba("+this.R+","+this.G+","+this.B+","+this.A+")",i&&i.silent||this.onchange&&this.onchange(this.preview.style.backgroundColor)}},{key:"onPaletteColorAdd",value:function(e){this.oncoloradd&&this.oncoloradd(e)}},{key:"onPaletteColorRemove",value:function(e){this.oncolorremove&&this.oncolorremove(e)}},{key:"updateInputHSL",value:function(e,t,i){this.options.showHSL&&(this.inputH.value=e,this.inputS.value=t,this.inputL.value=i)}},{key:"updateInputRGB",value:function(e,t,i){this.options.showRGB&&(this.inputR.value=e,this.inputG.value=t,this.inputB.value=i)}},{key:"updateInputRGBHEX",value:function(e,t,i){this.options.showHEX&&(this.inputRGBHEX.value=(0,r.rgbToHex)(e,t,i))}},{key:"updatePointerH",value:function(e){var t=this.options.hueBarSize[0]*e/360;this.huePointer.style.left=t-7+"px"}},{key:"updatePointerSL",value:function(e,t,i){var n=o((0,r.hslToRgb)(e,t,i),3),s=n[0],a=n[1],l=n[2],u=o(this.slBarHelper.findColor(s,a,l),2),c=u[0],d=u[1];c>=0&&(this.slPointer.style.left=c-7+"px",this.slPointer.style.top=d-7+"px")}},{key:"updatePointerA",value:function(e){if(this.options.showAlpha){var t=this.options.alphaBarSize[0]*e;this.alphaPointer.style.left=t-7+"px"}}}]),e}(),C=function(){function e(t){u(this,e),this.name=t,this.listeners=[]}return n(e,[{key:"on",value:function(e){e&&this.listeners.push(e)}},{key:"off",value:function(e){this.listeners=e?this.listeners.filter(function(t){return t!==e}):[]}},{key:"emit",value:function(e,t){for(var i=this.listeners.slice(0),n=0;n<i.length;n++)i[n].apply(t,e)}}]),e}();function k(e,t){var i=new _(e,t),n={change:new C("change"),coloradd:new C("coloradd"),colorremove:new C("colorremove")},s=!0,a={},l={get element(){return i.element},get rgb(){return[i.R,i.G,i.B]},set rgb(e){var t=o(e,3),n=t[0],s=t[1],a=t[2],l=[(0,r.limit)(n,0,255),(0,r.limit)(s,0,255),(0,r.limit)(a,0,255)];n=l[0],s=l[1],a=l[2],i.onValueChanged(m,[n,s,a,1])},get hsl(){return[i.H,i.S,i.L]},set hsl(e){var t=o(e,3),n=t[0],s=t[1],a=t[2],l=[(0,r.limit)(n,0,360),(0,r.limit)(s,0,100),(0,r.limit)(a,0,100)];n=l[0],s=l[1],a=l[2],i.onValueChanged(g,[n,s,a,1])},get rgbhex(){return this.all.hex},get rgba(){return[i.R,i.G,i.B,i.A]},set rgba(e){var t=o(e,4),n=t[0],s=t[1],a=t[2],l=t[3],u=[(0,r.limit)(n,0,255),(0,r.limit)(s,0,255),(0,r.limit)(a,0,255),(0,r.limit)(l,0,1)];n=u[0],s=u[1],a=u[2],l=u[3],i.onValueChanged(m,[n,s,a,l])},get hsla(){return[i.H,i.S,i.L,i.A]},set hsla(e){var t=o(e,4),n=t[0],s=t[1],a=t[2],l=t[3],u=[(0,r.limit)(n,0,360),(0,r.limit)(s,0,100),(0,r.limit)(a,0,100),(0,r.limit)(l,0,1)];n=u[0],s=u[1],a=u[2],l=u[3],i.onValueChanged(g,[n,s,a,l])},get color(){return this.all.toString()},set color(e){i.onValueChanged(f,e)},setColor:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];i.onValueChanged(f,e,{silent:t})},get all(){if(s){var e=[i.R,i.G,i.B,i.A],t=i.A<1?"rgba("+i.R+","+i.G+","+i.B+","+i.A+")":r.rgbToHex.apply(void 0,e);(a=(0,r.parseColor)(e,a)).toString=function(){return t},s=!1}return Object.assign({},a)},get onchange(){return n.change&&n.change.listeners[0]},set onchange(e){this.off("change").on("change",e)},get oncoloradd(){return n.coloradd&&n.coloradd.listeners[0]},set oncoloradd(e){this.off("coloradd").on("coloradd",e)},get oncolorremove(){return n.colorremove&&n.colorremove.listeners[0]},set oncolorremove(e){this.off("colorremove").on("colorremove",e)},get palette(){return Object.keys(i.palette).filter(function(e){return i.palette[e]})},set palette(e){i.updatePalette(e)},show:function(){i.element.classList.remove("hidden")},hide:function(){i.element.classList.add("hidden")},toggle:function(){i.element.classList.toggle("hidden")},on:function(e,t){return e&&n[e]&&n[e].on(t),this},off:function(e,t){return e&&n[e]&&n[e].off(t),this},destroy:function(){n.change.off(),n.coloradd.off(),n.colorremove.off(),i.element.remove(),n=null,i=null}};return i.onchange=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];s=!0,n.change.emit([l].concat(t),l)},i.oncoloradd=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];n.coloradd.emit([l].concat(t),l)},i.oncolorremove=function(){for(var e=arguments.length,t=Array(e),i=0;i<e;i++)t[i]=arguments[i];n.colorremove.emit([l].concat(t),l)},i.element.ctrl=l,l}if("u">typeof window&&!document.querySelector('head>style[data-source="a-color-picker"]')){var S=i(5).toString(),E=document.createElement("style");E.setAttribute("type","text/css"),E.setAttribute("data-source","a-color-picker"),E.innerHTML=S,document.querySelector("head").appendChild(E)}t.createPicker=k,t.from=function(e,t){var i=(e?Array.isArray(e)?e:e instanceof HTMLElement?[e]:e instanceof NodeList?[].concat(c(e)):"string"==typeof e?[].concat(c(document.querySelectorAll(e))):e.jquery?e.get():[]:[]).map(function(e,i){var n=k(e,t);return n.index=i,n});return i.on=function(e,t){return i.forEach(function(i){return i.on(e,t)}),this},i.off=function(e){return i.forEach(function(t){return t.off(e)}),this},i},t.parseColorToRgb=r.parseColorToRgb,t.parseColorToRgba=r.parseColorToRgba,t.parseColorToHsl=r.parseColorToHsl,t.parseColorToHsla=r.parseColorToHsla,t.parseColor=r.parseColor,t.rgbToHex=r.rgbToHex,t.hslToRgb=r.hslToRgb,t.rgbToHsl=r.rgbToHsl,t.rgbToHsv=r.rgbToHsv,t.rgbToInt=r.rgbToInt,t.intToRgb=r.intToRgb,t.getLuminance=r.getLuminance,t.COLOR_NAMES=r.COLOR_NAMES,t.PALETTE_MATERIAL_500=r.PALETTE_MATERIAL_500,t.PALETTE_MATERIAL_CHROME=r.PALETTE_MATERIAL_CHROME,t.VERSION="1.2.1"},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.nvl=t.ensureArray=t.limit=t.getLuminance=t.parseColor=t.parseColorToHsla=t.parseColorToHsl=t.cssHslaToHsla=t.cssHslToHsl=t.parseColorToRgba=t.parseColorToRgb=t.cssRgbaToRgba=t.cssRgbToRgb=t.cssColorToRgba=t.cssColorToRgb=t.intToRgb=t.rgbToInt=t.rgbToHsv=t.rgbToHsl=t.hslToRgb=t.rgbToHex=t.PALETTE_MATERIAL_CHROME=t.PALETTE_MATERIAL_500=t.COLOR_NAMES=void 0;var n,o=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var i=[],n=!0,o=!1,r=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(i.push(s.value),!t||i.length!==t);n=!0);}catch(e){o=!0,r=e}finally{try{!n&&a.return&&a.return()}finally{if(o)throw r}}return i}(e,t);throw TypeError("Invalid attempt to destructure non-iterable instance")},r=(n=i(0))&&n.__esModule?n:{default:n};function s(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}var a={aliceblue:"#F0F8FF",antiquewhite:"#FAEBD7",aqua:"#00FFFF",aquamarine:"#7FFFD4",azure:"#F0FFFF",beige:"#F5F5DC",bisque:"#FFE4C4",black:"#000000",blanchedalmond:"#FFEBCD",blue:"#0000FF",blueviolet:"#8A2BE2",brown:"#A52A2A",burlywood:"#DEB887",cadetblue:"#5F9EA0",chartreuse:"#7FFF00",chocolate:"#D2691E",coral:"#FF7F50",cornflowerblue:"#6495ED",cornsilk:"#FFF8DC",crimson:"#DC143C",cyan:"#00FFFF",darkblue:"#00008B",darkcyan:"#008B8B",darkgoldenrod:"#B8860B",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",darkgreen:"#006400",darkkhaki:"#BDB76B",darkmagenta:"#8B008B",darkolivegreen:"#556B2F",darkorange:"#FF8C00",darkorchid:"#9932CC",darkred:"#8B0000",darksalmon:"#E9967A",darkseagreen:"#8FBC8F",darkslateblue:"#483D8B",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",darkturquoise:"#00CED1",darkviolet:"#9400D3",deeppink:"#FF1493",deepskyblue:"#00BFFF",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1E90FF",firebrick:"#B22222",floralwhite:"#FFFAF0",forestgreen:"#228B22",fuchsia:"#FF00FF",gainsboro:"#DCDCDC",ghostwhite:"#F8F8FF",gold:"#FFD700",goldenrod:"#DAA520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#ADFF2F",honeydew:"#F0FFF0",hotpink:"#FF69B4","indianred ":"#CD5C5C","indigo ":"#4B0082",ivory:"#FFFFF0",khaki:"#F0E68C",lavender:"#E6E6FA",lavenderblush:"#FFF0F5",lawngreen:"#7CFC00",lemonchiffon:"#FFFACD",lightblue:"#ADD8E6",lightcoral:"#F08080",lightcyan:"#E0FFFF",lightgoldenrodyellow:"#FAFAD2",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",lightgreen:"#90EE90",lightpink:"#FFB6C1",lightsalmon:"#FFA07A",lightseagreen:"#20B2AA",lightskyblue:"#87CEFA",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#B0C4DE",lightyellow:"#FFFFE0",lime:"#00FF00",limegreen:"#32CD32",linen:"#FAF0E6",magenta:"#FF00FF",maroon:"#800000",mediumaquamarine:"#66CDAA",mediumblue:"#0000CD",mediumorchid:"#BA55D3",mediumpurple:"#9370DB",mediumseagreen:"#3CB371",mediumslateblue:"#7B68EE",mediumspringgreen:"#00FA9A",mediumturquoise:"#48D1CC",mediumvioletred:"#C71585",midnightblue:"#191970",mintcream:"#F5FFFA",mistyrose:"#FFE4E1",moccasin:"#FFE4B5",navajowhite:"#FFDEAD",navy:"#000080",oldlace:"#FDF5E6",olive:"#808000",olivedrab:"#6B8E23",orange:"#FFA500",orangered:"#FF4500",orchid:"#DA70D6",palegoldenrod:"#EEE8AA",palegreen:"#98FB98",paleturquoise:"#AFEEEE",palevioletred:"#DB7093",papayawhip:"#FFEFD5",peachpuff:"#FFDAB9",peru:"#CD853F",pink:"#FFC0CB",plum:"#DDA0DD",powderblue:"#B0E0E6",purple:"#800080",rebeccapurple:"#663399",red:"#FF0000",rosybrown:"#BC8F8F",royalblue:"#4169E1",saddlebrown:"#8B4513",salmon:"#FA8072",sandybrown:"#F4A460",seagreen:"#2E8B57",seashell:"#FFF5EE",sienna:"#A0522D",silver:"#C0C0C0",skyblue:"#87CEEB",slateblue:"#6A5ACD",slategray:"#708090",slategrey:"#708090",snow:"#FFFAFA",springgreen:"#00FF7F",steelblue:"#4682B4",tan:"#D2B48C",teal:"#008080",thistle:"#D8BFD8",tomato:"#FF6347",turquoise:"#40E0D0",violet:"#EE82EE",wheat:"#F5DEB3",white:"#FFFFFF",whitesmoke:"#F5F5F5",yellow:"#FFFF00",yellowgreen:"#9ACD32"};function l(e,t,i){return isNaN(e*=1)||t>e?t:e>i?i:e}function u(e,t){return null==e?t:e}function c(e,t,i){var n=[l(e,0,255),l(t,0,255),l(i,0,255)];return"#"+("000000"+((e=n[0])<<16|(t=n[1])<<8|(i=n[2])).toString(16)).slice(-6)}function d(e,t,i){var n=void 0,o=void 0,r=void 0,s=[l(e,0,360)/360,l(t,0,100)/100,l(i,0,100)/100];if(e=s[0],i=s[2],0==(t=s[1]))n=o=r=i;else{var a=function(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+6*(t-e)*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e},u=i<.5?i*(1+t):i+t-i*t,c=2*i-u;n=a(c,u,e+1/3),o=a(c,u,e),r=a(c,u,e-1/3)}return[255*n,255*o,255*r].map(Math.round)}function h(e,t,i){var n=[l(e,0,255)/255,l(t,0,255)/255,l(i,0,255)/255],o=Math.max(e=n[0],t=n[1],i=n[2]),r=Math.min(e,t,i),s=void 0,a=void 0,u=(o+r)/2;if(o==r)s=a=0;else{var c=o-r;switch(a=u>.5?c/(2-o-r):c/(o+r),o){case e:s=(t-i)/c+6*(t<i);break;case t:s=(i-e)/c+2;break;case i:s=(e-t)/c+4}s/=6}return[360*s,100*a,100*u].map(Math.round)}function p(e,t,i){return e<<16|t<<8|i}function f(e){if(e){var t=a[e.toString().toLowerCase()],i=o(/^\s*#?((([0-9A-F])([0-9A-F])([0-9A-F]))|(([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})))\s*$/i.exec(t||e)||[],10),n=i[3],r=i[4],s=i[5],l=i[7],u=i[8],c=i[9];if(void 0!==n)return[parseInt(n+n,16),parseInt(r+r,16),parseInt(s+s,16)];if(void 0!==l)return[parseInt(l,16),parseInt(u,16),parseInt(c,16)]}}function m(e){if(e){var t=a[e.toString().toLowerCase()],i=o(/^\s*#?((([0-9A-F])([0-9A-F])([0-9A-F])([0-9A-F])?)|(([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})?))\s*$/i.exec(t||e)||[],12),n=i[3],r=i[4],s=i[5],l=i[6],u=i[8],c=i[9],d=i[10],h=i[11];if(void 0!==n)return[parseInt(n+n,16),parseInt(r+r,16),parseInt(s+s,16),l?+(parseInt(l+l,16)/255).toFixed(2):1];if(void 0!==u)return[parseInt(u,16),parseInt(c,16),parseInt(d,16),h?+(parseInt(h,16)/255).toFixed(2):1]}}function g(e){if(e){var t=o(/^rgb\((\d+)[\s,](\d+)[\s,](\d+)\)/i.exec(e)||[],4),i=t[0],n=t[1],r=t[2],s=t[3];return i?[l(n,0,255),l(r,0,255),l(s,0,255)]:void 0}}function b(e){if(e){var t=o(/^rgba?\((\d+)\s*[\s,]\s*(\d+)\s*[\s,]\s*(\d+)(\s*[\s,]\s*(\d*(.\d+)?))?\)/i.exec(e)||[],6),i=t[0],n=t[1],r=t[2],s=t[3],a=t[5];return i?[l(n,0,255),l(r,0,255),l(s,0,255),l(u(a,1),0,1)]:void 0}}function v(e){if(Array.isArray(e))return[l(e[0],0,255),l(e[1],0,255),l(e[2],0,255),l(u(e[3],1),0,1)];var t=m(e)||b(e);return t&&3===t.length&&t.push(1),t}function y(e){if(e){var t=o(/^hsl\((\d+)[\s,](\d+)[\s,](\d+)\)/i.exec(e)||[],4),i=t[0],n=t[1],r=t[2],s=t[3];return i?[l(n,0,360),l(r,0,100),l(s,0,100)]:void 0}}function w(e){if(e){var t=o(/^hsla?\((\d+)\s*[\s,]\s*(\d+)\s*[\s,]\s*(\d+)(\s*[\s,]\s*(\d*(.\d+)?))?\)/i.exec(e)||[],6),i=t[0],n=t[1],r=t[2],s=t[3],a=t[5];return i?[l(n,0,255),l(r,0,255),l(s,0,255),l(u(a,1),0,1)]:void 0}}function _(e){if(Array.isArray(e))return[l(e[0],0,360),l(e[1],0,100),l(e[2],0,100),l(u(e[3],1),0,1)];var t=w(e);return t&&3===t.length&&t.push(1),t}function C(e,t){switch(t){case"rgb":default:return e.slice(0,3);case"rgbcss":return"rgb("+e[0]+", "+e[1]+", "+e[2]+")";case"rgbcss4":return"rgb("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")";case"rgba":return e;case"rgbacss":return"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")";case"hsl":return h.apply(void 0,s(e));case"hslcss":return"hsl("+(e=h.apply(void 0,s(e)))[0]+", "+e[1]+", "+e[2]+")";case"hslcss4":var i=h.apply(void 0,s(e));return"hsl("+i[0]+", "+i[1]+", "+i[2]+", "+e[3]+")";case"hsla":return[].concat(s(h.apply(void 0,s(e))),[e[3]]);case"hslacss":var n=h.apply(void 0,s(e));return"hsla("+n[0]+", "+n[1]+", "+n[2]+", "+e[3]+")";case"hex":return c.apply(void 0,s(e));case"hexcss4":return c.apply(void 0,s(e))+("00"+parseInt(255*e[3]).toString(16)).slice(-2);case"int":return p.apply(void 0,s(e))}}t.COLOR_NAMES=a,t.PALETTE_MATERIAL_500=["#F44336","#E91E63","#E91E63","#9C27B0","#9C27B0","#673AB7","#673AB7","#3F51B5","#3F51B5","#2196F3","#2196F3","#03A9F4","#03A9F4","#00BCD4","#00BCD4","#009688","#009688","#4CAF50","#4CAF50","#8BC34A","#8BC34A","#CDDC39","#CDDC39","#FFEB3B","#FFEB3B","#FFC107","#FFC107","#FF9800","#FF9800","#FF5722","#FF5722","#795548","#795548","#9E9E9E","#9E9E9E","#607D8B","#607D8B"],t.PALETTE_MATERIAL_CHROME=["#f44336","#e91e63","#9c27b0","#673ab7","#3f51b5","#2196f3","#03a9f4","#00bcd4","#009688","#4caf50","#8bc34a","#cddc39","#ffeb3b","#ffc107","#ff9800","#ff5722","#795548","#9e9e9e","#607d8b"],t.rgbToHex=c,t.hslToRgb=d,t.rgbToHsl=h,t.rgbToHsv=function(e,t,i){var n=[l(e,0,255)/255,l(t,0,255)/255,l(i,0,255)/255],o,r=Math.max(e=n[0],t=n[1],i=n[2]),s=Math.min(e,t,i),a=void 0,u=r-s;if(o=0===r?0:u/r,r==s)a=0;else{switch(r){case e:a=(t-i)/u+6*(t<i);break;case t:a=(i-e)/u+2;break;case i:a=(e-t)/u+4}a/=6}return[a,o,r]},t.rgbToInt=p,t.intToRgb=function(e){return[e>>16&255,e>>8&255,255&e]},t.cssColorToRgb=f,t.cssColorToRgba=m,t.cssRgbToRgb=g,t.cssRgbaToRgba=b,t.parseColorToRgb=function(e){return Array.isArray(e)?e=[l(e[0],0,255),l(e[1],0,255),l(e[2],0,255)]:f(e)||g(e)},t.parseColorToRgba=v,t.cssHslToHsl=y,t.cssHslaToHsla=w,t.parseColorToHsl=function(e){return Array.isArray(e)?e=[l(e[0],0,360),l(e[1],0,100),l(e[2],0,100)]:y(e)},t.parseColorToHsla=_,t.parseColor=function(e,t){if(t=t||"rgb",null!=e){var i=void 0;if((i=v(e))||(i=_(e))&&(i=[].concat(s(d.apply(void 0,s(i))),[i[3]])))return(0,r.default)(t)?["rgb","rgbcss","rgbcss4","rgba","rgbacss","hsl","hslcss","hslcss4","hsla","hslacss","hex","hexcss4","int"].reduce(function(e,t){return e[t]=C(i,t),e},t||{}):C(i,t.toString().toLowerCase())}},t.getLuminance=function(e,t,i){return .2126*(e=(e/=255)<.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t=(t/=255)<.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*((i/=255)<.03928?i/12.92:Math.pow((i+.055)/1.055,2.4))},t.limit=l,t.ensureArray=function(e){return e?Array.from(e):[]},t.nvl=u},function(e,t,i){"use strict";e.exports=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)}},function(e,t){e.exports='<div class="a-color-picker-row a-color-picker-stack a-color-picker-row-top"> <canvas class="a-color-picker-sl a-color-picker-transparent"></canvas> <div class=a-color-picker-dot></div> </div> <div class=a-color-picker-row> <div class="a-color-picker-stack a-color-picker-transparent a-color-picker-circle"> <div class=a-color-picker-preview> <input class=a-color-picker-clipbaord type=text> </div> </div> <div class=a-color-picker-column> <div class="a-color-picker-cell a-color-picker-stack"> <canvas class=a-color-picker-h></canvas> <div class=a-color-picker-dot></div> </div> <div class="a-color-picker-cell a-color-picker-alpha a-color-picker-stack" show-on-alpha> <canvas class="a-color-picker-a a-color-picker-transparent"></canvas> <div class=a-color-picker-dot></div> </div> </div> </div> <div class="a-color-picker-row a-color-picker-hsl" show-on-hsl> <label>H</label> <input nameref=H type=number maxlength=3 min=0 max=360 value=0> <label>S</label> <input nameref=S type=number maxlength=3 min=0 max=100 value=0> <label>L</label> <input nameref=L type=number maxlength=3 min=0 max=100 value=0> </div> <div class="a-color-picker-row a-color-picker-rgb" show-on-rgb> <label>R</label> <input nameref=R type=number maxlength=3 min=0 max=255 value=0> <label>G</label> <input nameref=G type=number maxlength=3 min=0 max=255 value=0> <label>B</label> <input nameref=B type=number maxlength=3 min=0 max=255 value=0> </div> <div class="a-color-picker-row a-color-picker-rgbhex a-color-picker-single-input" show-on-single-input> <label>HEX</label> <input nameref=RGBHEX type=text select-on-focus> </div> <div class="a-color-picker-row a-color-picker-palette"></div>'},function(e,t,i){var n=i(6);e.exports="string"==typeof n?n:n.toString()},function(e,t,i){(e.exports=i(7)(!1)).push([e.i,"/*!\n * a-color-picker\n * https://github.com/narsenico/a-color-picker\n *\n * Copyright (c) 2017-2018, Gianfranco Caldi.\n * Released under the MIT License.\n */.a-color-picker{background-color:#fff;padding:0;display:inline-flex;flex-direction:column;user-select:none;width:232px;font:400 10px Helvetica,Arial,sans-serif;border-radius:3px;box-shadow:0 0 0 1px rgba(0,0,0,.05),0 2px 4px rgba(0,0,0,.25)}.a-color-picker,.a-color-picker-row,.a-color-picker input{box-sizing:border-box}.a-color-picker-row{padding:15px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;user-select:none}.a-color-picker-row-top{padding:0}.a-color-picker-row:not(:first-child){border-top:1px solid #f5f5f5}.a-color-picker-column{display:flex;flex-direction:column}.a-color-picker-cell{flex:1 1 auto;margin-bottom:4px}.a-color-picker-cell:last-child{margin-bottom:0}.a-color-picker-stack{position:relative}.a-color-picker-dot{position:absolute;width:14px;height:14px;top:0;left:0;background:#fff;pointer-events:none;border-radius:50px;z-index:1000;box-shadow:0 1px 2px rgba(0,0,0,.75)}.a-color-picker-a,.a-color-picker-h,.a-color-picker-sl{cursor:cell}.a-color-picker-a+.a-color-picker-dot,.a-color-picker-h+.a-color-picker-dot{top:-2px}.a-color-picker-a,.a-color-picker-h{border-radius:2px}.a-color-picker-preview{box-sizing:border-box;width:30px;height:30px;user-select:none;border-radius:15px}.a-color-picker-circle{border-radius:50px;border:1px solid #eee}.a-color-picker-hsl,.a-color-picker-rgb,.a-color-picker-single-input{justify-content:space-evenly}.a-color-picker-hsl>label,.a-color-picker-rgb>label,.a-color-picker-single-input>label{padding:0 8px;flex:0 0 auto;color:#969696}.a-color-picker-hsl>input,.a-color-picker-rgb>input,.a-color-picker-single-input>input{text-align:center;padding:2px 0;width:0;flex:1 1 auto;border:1px solid #e0e0e0;line-height:20px}.a-color-picker-hsl>input::-webkit-inner-spin-button,.a-color-picker-rgb>input::-webkit-inner-spin-button,.a-color-picker-single-input>input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.a-color-picker-hsl>input:focus,.a-color-picker-rgb>input:focus,.a-color-picker-single-input>input:focus{border-color:#04a9f4;outline:none}.a-color-picker-transparent{background-image:linear-gradient(-45deg,#cdcdcd 25%,transparent 0),linear-gradient(45deg,#cdcdcd 25%,transparent 0),linear-gradient(-45deg,transparent 75%,#cdcdcd 0),linear-gradient(45deg,transparent 75%,#cdcdcd 0);background-size:11px 11px;background-position:0 0,0 -5.5px,-5.5px 5.5px,5.5px 0}.a-color-picker-sl{border-radius:3px 3px 0 0}.a-color-picker.hide-alpha [show-on-alpha],.a-color-picker.hide-hsl [show-on-hsl],.a-color-picker.hide-rgb [show-on-rgb],.a-color-picker.hide-single-input [show-on-single-input]{display:none}.a-color-picker-clipbaord{width:100%;height:100%;opacity:0;cursor:pointer}.a-color-picker-palette{flex-flow:wrap;flex-direction:row;justify-content:flex-start;padding:10px}.a-color-picker-palette-color{width:15px;height:15px;flex:0 1 15px;margin:3px;box-sizing:border-box;cursor:pointer;border-radius:3px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.1)}.a-color-picker-palette-add{text-align:center;line-height:13px;color:#607d8b}.a-color-picker.hidden{display:none}",""])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var i=function(e,t){var i=e[1]||"",n=e[3];if(!n)return i;if(t&&"function"==typeof btoa){var o="/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */";return[i].concat(n.sources.map(function(e){return"/*# sourceURL="+n.sourceRoot+e+" */"})).concat([o]).join("\n")}return[i].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+i+"}":i}).join("")},t.i=function(e,i){"string"==typeof e&&(e=[[null,e,""]]);for(var n={},o=0;o<this.length;o++){var r=this[o][0];"number"==typeof r&&(n[r]=!0)}for(o=0;o<e.length;o++){var s=e[o];"number"==typeof s[0]&&n[s[0]]||(i&&!s[2]?s[2]=i:i&&(s[2]="("+s[2]+") and ("+i+")"),t.push(s))}},t}}],t={};function i(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,i),o.l=!0,o.exports}return i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t||4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)i.d(n,o,(function(t){return e[t]}).bind(null,o));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=1)}()},6441:function(e,t,i){"use strict";i.d(t,{Config:function(){return r}});var n=i(82758);let o={};class r{static get defaultOptions(){return r.__defaultOptions||(r.__defaultOptions=new r),r.__defaultOptions}constructor(){this.cache=!0,this.defaultTimeout=100,this.namespace="",this.safeMode=!1,this.width="auto",this.height="auto",this.safePluginsList=["about","enter","backspace","size","bold","hotkeys"],this.license="",this.preset="custom",this.presets={inline:{inline:!0,toolbar:!1,toolbarInline:!0,toolbarInlineForSelection:!0,showXPathInStatusbar:!1,showCharsCounter:!1,showWordsCounter:!1,showPlaceholder:!1}},this.ownerDocument=n.globalDocument,this.ownerWindow=n.globalWindow,this.shadowRoot=null,this.nonce="",this.zIndex=0,this.readonly=!1,this.disabled=!1,this.activeButtonsInReadOnly=["source","fullsize","print","about","dots","selectall"],this.allowCommandsInReadOnly=["selectall","preview","print"],this.toolbarButtonSize="middle",this.allowTabNavigation=!1,this.inline=!1,this.theme="default",this.saveModeInStorage=!1,this.asyncStorage={},this.editorClassName=!1,this.className=!1,this.style=!1,this.containerStyle=!1,this.styleValues={},this.triggerChangeEvent=!0,this.direction="",this.language="auto",this.debugLanguage=!1,this.i18n=!1,this.tabIndex=-1,this.toolbar=!0,this.statusbar=!0,this.showTooltip=!0,this.showTooltipDelay=200,this.useNativeTooltip=!1,this.defaultActionOnPaste=n.INSERT_AS_HTML,this.enter=n.PARAGRAPH,this.iframe=!1,this.editHTMLDocumentMode=!1,this.enterBlock="br"!==this.enter?this.enter:n.PARAGRAPH,this.defaultMode=n.MODE_WYSIWYG,this.useSplitMode=!1,this.colors={greyscale:["#000000","#434343","#666666","#999999","#B7B7B7","#CCCCCC","#D9D9D9","#EFEFEF","#F3F3F3","#FFFFFF"],palette:["#980000","#FF0000","#FF9900","#FFFF00","#00F0F0","#00FFFF","#4A86E8","#0000FF","#9900FF","#FF00FF"],full:["#E6B8AF","#F4CCCC","#FCE5CD","#FFF2CC","#D9EAD3","#D0E0E3","#C9DAF8","#CFE2F3","#D9D2E9","#EAD1DC","#DD7E6B","#EA9999","#F9CB9C","#FFE599","#B6D7A8","#A2C4C9","#A4C2F4","#9FC5E8","#B4A7D6","#D5A6BD","#CC4125","#E06666","#F6B26B","#FFD966","#93C47D","#76A5AF","#6D9EEB","#6FA8DC","#8E7CC3","#C27BA0","#A61C00","#CC0000","#E69138","#F1C232","#6AA84F","#45818E","#3C78D8","#3D85C6","#674EA7","#A64D79","#85200C","#990000","#B45F06","#BF9000","#38761D","#134F5C","#1155CC","#0B5394","#351C75","#733554","#5B0F00","#660000","#783F04","#7F6000","#274E13","#0C343D","#1C4587","#073763","#20124D","#4C1130"]},this.colorPickerDefaultTab="background",this.imageDefaultWidth=300,this.removeButtons=[],this.disablePlugins=[],this.extraPlugins=[],this.extraButtons=[],this.extraIcons={},this.createAttributes={table:{style:"border-collapse:collapse;width: 100%;"}},this.sizeLG=900,this.sizeMD=700,this.sizeSM=400,this.buttons=[{group:"font-style",buttons:[]},{group:"list",buttons:[]},{group:"font",buttons:[]},"---",{group:"script",buttons:[]},{group:"media",buttons:[]},"\n",{group:"state",buttons:[]},{group:"clipboard",buttons:[]},{group:"insert",buttons:[]},{group:"indent",buttons:[]},{group:"color",buttons:[]},{group:"form",buttons:[]},"---",{group:"history",buttons:[]},{group:"search",buttons:[]},{group:"source",buttons:[]},{group:"other",buttons:[]},{group:"info",buttons:[]}],this.events={},this.textIcons=!1,this.popupRoot=null,this.showBrowserColorPicker=!0,Object.assign(this,o)}}o=r.prototype,r.prototype.controls={}},26992:function(e,t,i){"use strict";i.d(t,{Async:function(){return f}});var n=i(82758),o=i(91898),r=i(12045),s=i(23282),a=i(84767),l=i(72430),u=i(14773),c=i(70799),d=i(86068),h=i(38837),p=i(93661);class f{delay(e){return this.promise(t=>this.setTimeout(t,e))}setTimeout(e,t,...i){if(this.isDestructed)return 0;let n={};(0,d.isVoid)(t)&&(t=0),(0,a.isNumber)(t)||(t=(n=t).timeout||0),n.label&&this.clearLabel(n.label);let r=(0,o.setTimeout)(e,t,...i),s=n.label||r;return this.timers.set(s,r),this.__callbacks.set(s,e),r}updateTimeout(e,t){if((0,h.assert)(e&&this.timers.has(e),"Label does not exist"),!e||!this.timers.has(e))return null;let i=this.__callbacks.get(e);return(0,h.assert)((0,s.isFunction)(i),"Callback is not a function"),this.setTimeout(i,{label:e,timeout:t})}clearLabel(e){e&&this.timers.has(e)&&((0,o.clearTimeout)(this.timers.get(e)),this.timers.delete(e),this.__callbacks.delete(e))}clearTimeout(e){if((0,c.isString)(e))return this.clearLabel(e);(0,o.clearTimeout)(e),this.timers.delete(e),this.__callbacks.delete(e)}debounce(e,t,i=!1){let n=0,a=!1,c=[],d=(...t)=>{if(!a){n=0;let i=e(...t);if(a=!0,c.length){let e=()=>{c.forEach(e=>e()),c.length=0};(0,u.isPromise)(i)?i.finally(e):e()}}},h=(...r)=>{a=!1,t?(!n&&i&&d(...r),(0,o.clearTimeout)(n),n=this.setTimeout(()=>d(...r),(0,s.isFunction)(t)?t():t),this.timers.set(e,n)):d(...r)};return(0,l.isPlainObject)(t)&&t.promisify?(...e)=>{let t=this.promise(e=>{c.push(e)}).catch(e=>{if((0,r.isAbortError)(e))return null;throw e});return h(...e),t}:h}microDebounce(e,t=!1){let i,n=!1,o=!0;return(...r)=>{if(i=r,n){o=!0;return}o=!0,t&&(o=!1,e(...i)),n=!0,this.__queueMicrotaskNative(()=>{n=!1,!this.isDestructed&&o&&e(...i)})}}throttle(e,t,i=!1){let n=null,o,r,a;return(...i)=>{(o=!0,a=i,t)?n||(r=()=>{o?(e(...a),o=!1,n=this.setTimeout(r,(0,s.isFunction)(t)?t():t),this.timers.set(r,n)):n=null})():e(...a)}}promise(e){let t=()=>{},i=new Promise((i,n)=>{t=()=>n((0,p.abort)("Abort async")),this.promisesRejections.add(t),e(i,n)});return!i.finally&&"u">typeof process&&!n.IS_ES_NEXT&&(i.finally=e=>(i.then(e).catch(e),i)),i.finally(()=>{this.promisesRejections.delete(t)}).catch(()=>null),i.rejectCallback=t,i}promiseState(e){if(e.status)return e.status;if(!Promise.race)return new Promise(t=>{e.then(e=>(t("fulfilled"),e),e=>{throw t("rejected"),e}),this.setTimeout(()=>{t("pending")},100)});let t={};return Promise.race([e,t]).then(e=>e===t?"pending":"fulfilled",()=>"rejected")}requestIdleCallback(e,t={timeout:100}){let i=this.__requestIdleCallbackNative(e,t);return this.__requestsIdle.add(i),i}requestIdlePromise(e){return this.promise(t=>{let i=this.requestIdleCallback(()=>t(i),e)})}schedulerPostTask(e,t={delay:0,priority:"user-visible"}){let i=new AbortController;if(t.signal&&t.signal.addEventListener("abort",()=>i.abort()),this.__controllers.add(i),void 0!==globalThis.scheduler){var n,o;let r=globalThis.scheduler.postTask(e,(n=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{},n=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(i).filter(function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable}))),n.forEach(function(t){var n;n=i[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},t),o=o={signal:i.signal},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t.push.apply(t,i)}return t})(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}),n));return r.finally(()=>{this.__controllers.delete(i)}).catch(()=>null),r}return this.promise((n,o)=>{let r=this.setTimeout(()=>{try{n(e())}catch(e){o(e)}this.__controllers.delete(i)},t.delay||1);i.signal.addEventListener("abort",()=>{this.clearTimeout(r),this.__controllers.delete(i),o((0,p.abort)())})})}schedulerYield(){return this.schedulerPostTask(()=>{},{priority:"user-visible"})}cancelIdleCallback(e){return this.__requestsIdle.delete(e),this.__cancelIdleCallbackNative(e)}requestAnimationFrame(e){let t=requestAnimationFrame(e);return this.__requestsRaf.add(t),t}cancelAnimationFrame(e){this.__requestsRaf.delete(e),cancelAnimationFrame(e)}clear(){this.__requestsIdle.forEach(e=>this.cancelIdleCallback(e)),this.__requestsRaf.forEach(e=>this.cancelAnimationFrame(e)),this.__controllers.forEach(e=>e.abort()),this.timers.forEach(e=>(0,o.clearTimeout)(this.timers.get(e))),this.timers.clear(),this.promisesRejections.forEach(e=>e()),this.promisesRejections.clear()}destruct(){this.clear(),this.isDestructed=!0}constructor(){var e,t,i,n,o;this.timers=new Map,this.__callbacks=new Map,this.__queueMicrotaskNative=null!=(e=null==queueMicrotask?void 0:queueMicrotask.bind(window))?e:Promise.resolve().then.bind(Promise.resolve()),this.promisesRejections=new Set,this.__requestsIdle=new Set,this.__controllers=new Set,this.__requestsRaf=new Set,this.__requestIdleCallbackNative=null!=(i=null==(t=window.requestIdleCallback)?void 0:t.bind(window))?i:(e,t)=>{var i;let n=Date.now();return this.setTimeout(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-n))})},null!=(i=null==t?void 0:t.timeout)?i:1)},this.__cancelIdleCallbackNative=null!=(o=null==(n=window.cancelIdleCallback)?void 0:n.bind(window))?o:e=>{this.clearTimeout(e)},this.isDestructed=!1}}},8884:function(e,t,i){"use strict";i.d(t,{Async:function(){return n.Async}});var n=i(26992)},4012:function(e,t,i){"use strict";i.d(t,{Component:function(){return l}});var n=i(8884),o=i(78213),r=i(580),s=i(21537);let a=new Map;class l{get componentName(){return this.__componentName||(this.__componentName="jodit-"+(0,s.kebabCase)(((0,s.isFunction)(this.className)?this.className():"")||(0,s.getClassName)(this))),this.__componentName}getFullElName(e,t,i){let n=[this.componentName];return e&&(e=e.replace(/[^a-z0-9-]/gi,"-"),n.push(`__${e}`)),t&&(n.push("_",t),n.push("_",(0,s.isVoid)(i)?"true":i.toString())),n.join("")}get ownerDocument(){return this.ow.document}get od(){return this.ownerDocument}get ow(){return this.ownerWindow}get(e,t){return(0,s.get)(e,t||this)}get isReady(){return this.componentStatus===o.STATUSES.ready}get isDestructed(){return this.componentStatus===o.STATUSES.destructed}get isInDestruct(){return o.STATUSES.beforeDestruct===this.componentStatus||o.STATUSES.destructed===this.componentStatus}bindDestruct(e){return e.hookStatus(o.STATUSES.beforeDestruct,()=>!this.isInDestruct&&this.destruct()),this}destruct(){this.setStatus(o.STATUSES.destructed),this.async&&(this.async.destruct(),this.async=void 0),a.get(this)&&a.delete(this),this.ownerWindow=void 0}get componentStatus(){return this.__componentStatus}set componentStatus(e){this.setStatus(e)}setStatus(e){return this.setStatusComponent(e,this)}setStatusComponent(e,t){if(e===this.__componentStatus)return;t===this&&(this.__componentStatus=e);let i=Object.getPrototypeOf(this);i&&(0,s.isFunction)(i.setStatusComponent)&&i.setStatusComponent(e,t);let n=a.get(this),o=null==n?void 0:n[e];o&&o.length&&o.forEach(e=>e(t))}hookStatus(e,t){let i=a.get(this);i||(i={},a.set(this,i)),i[e]||(i[e]=[]),i[e].push(t)}static isInstanceOf(e,t){return e instanceof t}constructor(){this.async=new n.Async,this.ownerWindow=window,this.__componentStatus=o.STATUSES.beforeInit,this.uid="jodit-uid-"+(0,r.uniqueUid)()}}l.STATUSES=o.STATUSES},91907:function(e,t,i){"use strict";i.d(t,{Component:function(){return n.Component},STATUSES:function(){return o.STATUSES},ViewComponent:function(){return r.ViewComponent}});var n=i(4012),o=i(78213),r=i(80480)},78213:function(e,t,i){"use strict";i.d(t,["STATUSES",0,{beforeInit:"beforeInit",ready:"ready",beforeDestruct:"beforeDestruct",destructed:"destructed"}])},80480:function(e,t,i){"use strict";i.d(t,{ViewComponent:function(){return o}});var n=i(4012);class o extends n.Component{get j(){return this.jodit}get defaultTimeout(){return this.j.defaultTimeout}i18n(e,...t){return this.j.i18n(e,...t)}setParentView(e){return this.jodit=e,e.ow&&(this.ownerWindow=e.ow),e.components.add(this),this}destruct(){return this.j.components.delete(this),super.destruct()}constructor(e){super(),this.setParentView(e)}}},82758:function(e,t,i){"use strict";i.r(t),i.d(t,{IS_TEST:function(){return n}});let n=!1,o="u">typeof window?window:void 0,r="u">typeof document?document:void 0,s=new Set(["ul","ol"]),a=["img","video","svg","iframe","script","input","textarea","link","jodit","jodit-media"],l=new Set([...a,"br","hr"]),u=new Set(a),c="Meta",d="Backspace",h="Enter",p="Escape",f="ArrowLeft",m="ArrowUp",g="ArrowRight",b="ArrowDown",v="Delete",y=[c,d,v,m,b,g,f,h,p,"F3","Tab"],w="u">typeof navigator&&(-1!==navigator.userAgent.indexOf("MSIE")||/rv:11.0/i.test(navigator.userAgent)),_=void 0!==o&&/Mac|iPod|iPhone|iPad/.test(o.navigator.platform),C=e=>{let t=e.split("/");return/\.js/.test(t[t.length-1])?{basePath:t.slice(0,t.length-1).join("/")+"/",isMin:!0}:{basePath:e,isMin:!0}},{basePath:k,isMin:S}=(()=>{if("u"<typeof document)return{basePath:"",isMin:!0};let e=r.currentScript;if(e)return C(e.src);let t=r.querySelectorAll("script[src]");return t&&t.length?C(t[t.length-1].src):C(o.location.href)})(),E=new Set(["touchstart","touchend","scroll","mousewheel","mousemove","touchmove"]);i.d(t,["ACCURACY",0,10,"APP_VERSION",0,"4.15.2","BASE_PATH",0,k,"BASE_PATH_IS_MIN",0,S,"BR",0,"br","CLIPBOARD_ID",0,"clipboard","COMMAND_KEYS",0,y,"EMULATE_DBLCLICK_TIMEOUT",0,300,"ES",0,"es2015","FAT_MODE",0,!0,"HOMEPAGE",0,"https://xdsoft.net/jodit/pro/","INSEPARABLE_TAGS",0,l,"INSERT_AS_HTML",0,"insert_as_html","INSERT_AS_TEXT",0,"insert_as_text","INSERT_CLEAR_HTML",0,"insert_clear_html","INSERT_ONLY_TEXT",0,"insert_only_text","INVISIBLE_SPACE",0,"\uFEFF","INVISIBLE_SPACE_REG_EXP",0,()=>/[\uFEFF]/g,"INVISIBLE_SPACE_REG_EXP_END",0,()=>/[\uFEFF]+$/g,"INVISIBLE_SPACE_REG_EXP_START",0,()=>/^[\uFEFF]+/g,"IS_BLOCK",0,/^(ADDRESS|ARTICLE|ASIDE|BLOCKQUOTE|CANVAS|DD|DFN|DIV|DL|DT|FIELDSET|FIGCAPTION|FIGURE|FOOTER|FORM|H[1-6]|HEADER|HGROUP|HR|LI|MAIN|NAV|NOSCRIPT|OUTPUT|P|PRE|RUBY|SCRIPT|STYLE|OBJECT|OL|SECTION|IFRAME|JODIT|JODIT-MEDIA|UL|TR|TD|TH|TBODY|THEAD|TFOOT|TABLE|BODY|HTML|VIDEO)$/i,"IS_ES_MODERN",0,!0,"IS_ES_NEXT",0,!1,"IS_IE",0,w,"IS_INLINE",0,/^(STRONG|SPAN|I|EM|B|SUP|SUB|A|U)$/i,"IS_MAC",0,_,"IS_PROD",0,!0,"KEY_ALIASES",0,{add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:_?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:"space",spacebar:"space",up:"arrowup",win:"meta",windows:"meta"},"KEY_ALT",0,"Alt","KEY_BACKSPACE",0,d,"KEY_DELETE",0,v,"KEY_DOWN",0,b,"KEY_ENTER",0,h,"KEY_ESC",0,p,"KEY_F3",0,"F3","KEY_LEFT",0,f,"KEY_META",0,c,"KEY_RIGHT",0,g,"KEY_SPACE",0,"Space","KEY_TAB",0,"Tab","KEY_UP",0,m,"LIST_TAGS",0,s,"MARKER_CLASS",0,"jodit-selection_marker","MODE_SOURCE",0,2,"MODE_SPLIT",0,3,"MODE_WYSIWYG",0,1,"NBSP_SPACE",0,"\xa0","NEARBY",0,5,"NO_EMPTY_TAGS",0,u,"PARAGRAPH",0,"p","PASSIVE_EVENTS",0,E,"SAFE_COUNT_CHANGE_CALL",0,10,"SET_TEST",0,()=>n=!0,"SOURCE_CONSUMER",0,"source-consumer","SPACE_REG_EXP",0,()=>/[\s\n\t\r\uFEFF\u200b]+/g,"SPACE_REG_EXP_END",0,()=>/[\s\n\t\r\uFEFF\u200b]+$/g,"SPACE_REG_EXP_START",0,()=>/^[\s\n\t\r\uFEFF\u200b]+/g,"TEMP_ATTR",0,"data-jodit-temp","TEXT_HTML",0,w?"html":"text/html","TEXT_PLAIN",0,w?"text":"text/plain","TEXT_RTF",0,w?"rtf":"text/rtf","TOKENS",0,{},"globalDocument",0,r,"globalWindow",0,o,"lang",0,{}])},20218:function(e,t,i){"use strict";i.d(t,{Create:function(){return a}});var n=i(82758),o=i(2748),r=i(21537),s=i(38837);class a{get doc(){return(0,r.isFunction)(this.document)?this.document():this.document}element(e,t,i){let n=this.doc.createElement(e.toLowerCase());return this.applyCreateAttributes(n),t&&((0,r.isPlainObject)(t)?(0,r.attr)(n,t):i=t),i&&(0,r.asArray)(i).forEach(e=>o.Dom.append(n,(0,r.isString)(e)?this.fromHTML(e):e)),n}div(e,t,i){let n=this.element("div",t,i);return e&&(n.className=e),n}sandbox(){var e;let t=this.element("iframe",{sandbox:"allow-same-origin"});o.Dom.append(this.doc.body,t);let i=null==(e=t.contentWindow)?void 0:e.document;if((0,s.assert)(i,"iframe.contentWindow.document"),!i)throw Error("Iframe error");return i.open(),i.write("<!DOCTYPE html><html><head></head><body></body></html>"),i.close(),[i.body,t]}span(e,t,i){let n=this.element("span",t,i);return e&&(n.className=e),n}a(e,t,i){let n=this.element("a",t,i);return e&&(n.className=e),n}text(e){return this.doc.createTextNode(e)}fake(){return this.text(n.INVISIBLE_SPACE)}fragment(){return this.doc.createDocumentFragment()}fromHTML(e,t){let i=this.div();i.innerHTML=e.toString();let n=i.firstChild===i.lastChild&&i.firstChild?i.firstChild:i;if(o.Dom.safeRemove(n),t){let e=(0,r.refs)(n);Object.keys(t).forEach(i=>{let n=e[i];n&&!1===t[i]&&o.Dom.hide(n)})}return n}applyCreateAttributes(e){if(this.createAttributes){let t=this.createAttributes;if(t&&t[e.tagName.toLowerCase()]){let i=t[e.tagName.toLowerCase()];(0,r.isFunction)(i)?i(e):(0,r.isPlainObject)(i)&&(0,r.attr)(e,i)}}}constructor(e,t){this.document=e,this.createAttributes=t}}},12060:function(e,t,i){"use strict";i.d(t,{Create:function(){return n.Create}});var n=i(20218)},45219:function(e,t,i){"use strict";i.d(t,{autobind:function(){return o}});var n=i(23282);function o(e,t,i){if(!(0,n.isFunction)(i.value))throw TypeError(`@autobind can only be applied to methods, but "${t}" is not a function`);let o=i.value;return{configurable:!0,get(){let e=o.bind(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e}}}},33433:function(e,t,i){"use strict";i.d(t,{cache:function(){return l},cacheHTML:function(){return u},cached:function(){return a}});var n=i(78213),o=i(2748),r=i(27613),s=i(82760);function a(e,t){let i=Object.getOwnPropertyDescriptor(e,t);return!i||(0,r.isFunction)(i.get)?null:i.value}function l(e,t,i){let n=i.get;if(!n)throw(0,s.error)("Getter property descriptor expected");i.get=function(){let e=n.call(this);return e&&!0===e.noCache||Object.defineProperty(this,t,{configurable:i.configurable,enumerable:i.enumerable,writable:!1,value:e}),e}}function u(e,t,i){let a=i.value;if(!(0,r.isFunction)(a))throw(0,s.error)("Handler must be a Function");let l=!0,u=new WeakMap;i.value=function(...e){var t;let i,n=null!=(i=this.od)?i:document,r=u.get(n);if(l&&(null==r?void 0:r.has(this.constructor)))return null==(t=r.get(this.constructor))?void 0:t.cloneNode(!0);let s=a.apply(this,e);return l&&o.Dom.isElement(s)&&(r?r.set(this.constructor,s):u.set(n,new WeakMap([[this.constructor,s]]))),l?s.cloneNode(!0):s},e.hookStatus(n.STATUSES.ready,e=>{l=!!((0,r.isViewObject)(e)?e:e.jodit).options.cache})}},87325:function(e,t,i){"use strict";i.d(t,{component:function(){return s},getComponentClass:function(){return a}});var n=i(82758),o=i(80568);let r=new Map;function s(e){class t extends e{constructor(...e){super(...e),this.constructor===t&&(this instanceof t||Object.setPrototypeOf(this,t.prototype),this.setStatus("ready"))}}let i=(0,o.getClassName)(e.prototype);if(r.has(i)&&!n.IS_PROD)throw Error(`Component with name "${i}" is already registered`);return r.set(i,t),t}function a(e){return r.get(e)}},81577:function(e,t,i){"use strict";i.d(t,{debounce:function(){return a},throttle:function(){return l}});var n=i(91907),o=i(27613),r=i(38837),s=i(89890);function a(e,t=!1,i="debounce"){return(a,l)=>{let u=a[l];if(!(0,o.isFunction)(u))throw(0,s.error)("Handler must be a Function");return a.hookStatus(n.STATUSES.ready,n=>{let{async:s}=n;(0,r.assert)(null!=s,`Component ${n.componentName||n.constructor.name} should have "async:IAsync" field`);let a=(0,o.isFunction)(e)?e(n):e,u=(0,o.isNumber)(a)||(0,o.isPlainObject)(a)?a:n.defaultTimeout;Object.defineProperty(n,l,{configurable:!0,value:s[i](n[l].bind(n),u,t)})}),{configurable:!0,get(){return u.bind(this)}}}}function l(e,t=!1){return a(e,t,"throttle")}},55153:function(e,t,i){"use strict";i.d(t,{derive:function(){return o}});var n=i(23282);function o(...e){return t=>{let i=t.prototype;for(let t=0;t<e.length;t++){let o=e[t],r=Object.getOwnPropertyNames(o.prototype);for(let e=0;e<r.length;e++){let t=r[e],s=Object.getOwnPropertyDescriptor(o.prototype,t);null!=s&&(0,n.isFunction)(s.value)&&!(0,n.isFunction)(i[t])&&Object.defineProperty(i,t,{enumerable:!0,configurable:!0,writable:!0,value:function(...e){return s.value.call(this,...e)}})}}}}},97357:function(e,t,i){"use strict";i.d(t,{hook:function(){return r}});var n=i(23282),o=i(89890);function r(e){return(t,i)=>{if(!(0,n.isFunction)(t[i]))throw(0,o.error)("Handler must be a Function");t.hookStatus(e,e=>{e[i].call(e)})}}},78927:function(e,t,i){"use strict";i.d(t,{idle:function(){return s}});var n=i(91907),o=i(23282),r=i(89890);function s(){return(e,t)=>{if(!(0,o.isFunction)(e[t]))throw(0,r.error)("Handler must be a Function");e.hookStatus(n.STATUSES.ready,e=>{let{async:i}=e,n=e[t];e[t]=(...t)=>i.requestIdleCallback(n.bind(e,...t))})}}},65478:function(e,t,i){"use strict";i.r(t),i.d(t,{autobind:function(){return n.autobind},cache:function(){return o.cache},cacheHTML:function(){return o.cacheHTML},cached:function(){return o.cached},component:function(){return r.component},debounce:function(){return s.debounce},derive:function(){return a.derive},getComponentClass:function(){return r.getComponentClass},hook:function(){return l.hook},idle:function(){return u.idle},nonenumerable:function(){return c.nonenumerable},persistent:function(){return d.persistent},throttle:function(){return s.throttle},wait:function(){return h.wait},watch:function(){return p.watch}});var n=i(45219),o=i(33433),r=i(87325),s=i(81577),a=i(55153),l=i(97357),u=i(78927),c=i(31589),d=i(53213),h=i(13525),p=i(37133)},31589:function(e,t,i){"use strict";i.d(t,["nonenumerable",0,(e,t)=>{!1!==(Object.getOwnPropertyDescriptor(e,t)||{}).enumerable&&Object.defineProperty(e,t,{enumerable:!1,set(e){Object.defineProperty(this,t,{enumerable:!1,writable:!0,value:e})}})}])},53213:function(e,t,i){"use strict";i.d(t,{persistent:function(){return r}});var n=i(78213),o=i(39955);function r(e,t){e.hookStatus(n.STATUSES.ready,e=>{let i=(0,o.isViewObject)(e)?e:e.jodit,n=`${i.options.namespace}${e.componentName}_prop_${t}`,r=e[t];Object.defineProperty(e,t,{get(){var e;return null!=(e=i.storage.get(n))?e:r},set(e){i.storage.set(n,e)}})})}},13525:function(e,t,i){"use strict";i.d(t,{wait:function(){return s}});var n=i(78213),o=i(23282),r=i(89890);function s(e){return(t,i)=>{let s=t[i];if(!(0,o.isFunction)(s))throw(0,r.error)("Handler must be a Function");t.hookStatus(n.STATUSES.ready,t=>{let{async:n}=t,o=t[i],r=0;Object.defineProperty(t,i,{configurable:!0,value:function i(...s){n.clearTimeout(r),e(t)?o.apply(t,s):r=n.setTimeout(()=>i(...s),10)}})})}}},37133:function(e,t,i){"use strict";i.d(t,{watch:function(){return d}});var n=i(78213),o=i(73026),r=i(46559),s=i(23282),a=i(72430),l=i(39955),u=i(89890),c=i(37790);function d(e,t){return(i,d)=>{var h;if(!(0,s.isFunction)(i[d]))throw(0,u.error)("Handler must be a Function");let p=null==(h=null==t?void 0:t.immediately)||h,f=null==t?void 0:t.context,m=t=>{let n=(0,l.isViewObject)(t)?t:t.jodit,u=(e,...i)=>{if(!t.isInDestruct)return t[d](e,...i)};p||(u=t.async.microDebounce(u,!0)),(0,r.splitArray)(e).forEach(e=>{if(/:/.test(e)){let[i,o]=e.split(":"),r=f;i.length&&(r=t.get(i)),(0,s.isFunction)(r)&&(r=r(t)),n.events.on(r||t,o,u),r||n.events.on(o,u),t.hookStatus("beforeDestruct",()=>{n.events.off(r||t,o,u).off(o,u)});return}let r=e.split("."),[l]=r,d=r.slice(1),h=t[l];(0,a.isPlainObject)(h)&&(0,o.observable)(h).on(`change.${d.join(".")}`,u);let p=(0,c.getPropertyDescriptor)(i,l);Object.defineProperty(t,l,{configurable:!0,set(e){let i=h;i!==e&&(h=e,p&&p.set&&p.set.call(t,e),(0,a.isPlainObject)(h)&&(h=(0,o.observable)(h)).on(`change.${d.join(".")}`,u),u(l,i,h))},get(){return p&&p.get?p.get.call(t):h}})})};(0,s.isFunction)(i.hookStatus)?i.hookStatus(n.STATUSES.ready,m):m(i)}}},2748:function(e,t,i){"use strict";i.d(t,{Dom:function(){return y}});var n=i(82758),o=i(4510),r=i(68345),s=i(23282),a=i(58487),l=i(42320),u=i(70799),c=i(86068),d=i(49055),h=i(38837),p=i(29960),f=i(41180),m=i(86583),g=i(89890),b=i(37790);let v=RegExp(`<([a-z]+)[^>]+${n.TEMP_ATTR}[^>]*>(.+?)</\\1>`,"gi");class y{static detach(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}static wrapNextInline(e,t,i){let n,o,r=e;i.s.save();do o=!1,(n=r.nextSibling)&&!y.isBlock(n)&&!y.isTag(n,"br")&&(o=!0,r=n);while(o);return y.__wrapElements(t,i,e,r)}static __wrapElements(e,t,i,n){let o=(0,u.isString)(e)?t.createInside.element(e):e;i.parentNode&&i.parentNode.insertBefore(o,i);let r=i;for(;r&&(r=i.nextSibling,o.appendChild(i),i!==n&&r);)i=r;return t.s.restore(),o}static wrapInline(e,t,i){let n,o,r=e,s=e;i.s.save();do o=!1,(n=r.previousSibling)&&!y.isBlock(n)&&(o=!0,r=n);while(o);do o=!1,(n=s.nextSibling)&&!y.isBlock(n)&&(o=!0,s=n);while(o);return y.__wrapElements(t,i,r,s)}static wrap(e,t,i){let n=(0,u.isString)(t)?i.element(t):t;if(y.isNode(e)){if(!e.parentNode)throw(0,g.error)("Element should be in DOM");e.parentNode.insertBefore(n,e),n.appendChild(e)}else{let t=e.extractContents();e.insertNode(n),n.appendChild(t)}return n}static unwrap(e){let t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);y.safeRemove(e)}}static between(e,t,i){let n=e;for(;n&&n!==t&&!(e!==n&&i(n));){let e=n.firstChild||n.nextSibling;if(!e){for(;n&&!n.nextSibling;)if((n=n.parentNode)===t)return;e=null==n?void 0:n.nextSibling}n=e}}static replace(e,t,i,n=!1,r=!1){let s;if((0,a.isHTML)(t)&&((0,h.assert)(i,"Need create instance for new tag"),t=i.fromHTML(t)),(0,u.isString)(t)?((0,h.assert)(i,"Need create instance for new tag"),s=i.element(t)):s=t,!r)for(;e.firstChild;)s.appendChild(e.firstChild);return n&&y.isElement(e)&&y.isElement(s)&&(0,o.toArray)(e.attributes).forEach(e=>{s.setAttribute(e.name,e.value)}),e.parentNode&&e.parentNode.replaceChild(s,e),s}static isEmptyTextNode(e){return y.isText(e)&&(!e.nodeValue||0===e.nodeValue.replace(n.INVISIBLE_SPACE_REG_EXP(),"").trim().length)}static isEmptyContent(e){return y.each(e,e=>y.isEmptyTextNode(e))}static isContentEditable(e,t){return y.isNode(e)&&!y.closest(e,e=>y.isElement(e)&&"false"===e.getAttribute("contenteditable"),t)}static isEmpty(e,t=n.NO_EMPTY_TAGS){let i;if(!e)return!0;i=(0,s.isFunction)(t)?t:e=>t.has(e.nodeName.toLowerCase());let o=e=>null==e.nodeValue||0===(0,d.trim)(e.nodeValue).length;return y.isText(e)?o(e):!(y.isElement(e)&&i(e))&&y.each(e,e=>{if(y.isText(e)&&!o(e)||y.isElement(e)&&i(e))return!1})}static isNode(e){return!!(e&&(0,u.isString)(e.nodeName)&&"number"==typeof e.nodeType&&e.childNodes&&(0,s.isFunction)(e.appendChild))}static isCell(e){return y.isNode(e)&&("TD"===e.nodeName||"TH"===e.nodeName)}static isList(e){return y.isTag(e,n.LIST_TAGS)}static isLeaf(e){return y.isTag(e,"li")}static isImage(e){return y.isNode(e)&&/^(img|svg|picture|canvas)$/i.test(e.nodeName)}static isBlock(e){return!(0,c.isVoid)(e)&&"object"==typeof e&&y.isNode(e)&&n.IS_BLOCK.test(e.nodeName)}static isText(e){return!!(e&&e.nodeType===Node.TEXT_NODE)}static isComment(e){return!!(e&&e.nodeType===Node.COMMENT_NODE)}static isElement(e){return!!y.isNode(e)&&e.nodeType===Node.ELEMENT_NODE}static isFragment(e){return!!y.isNode(e)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}static isHTMLElement(e){var t;if(!y.isNode(e))return!1;let i=null==(t=e.ownerDocument)?void 0:t.defaultView;return e instanceof(i?i.HTMLElement:HTMLElement)}static isInlineBlock(e){return y.isElement(e)&&!/^(BR|HR)$/i.test(e.tagName)&&-1!==["inline","inline-block"].indexOf((0,f.css)(e,"display").toString())}static canSplitBlock(e){return!(0,c.isVoid)(e)&&y.isHTMLElement(e)&&y.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&void 0!==e.style&&!/^(fixed|absolute)/i.test(e.style.position)}static first(e,t){return y.__deepMost(e,t,!1)}static last(e,t){return y.__deepMost(e,t,!0)}static __deepMost(e,t,i){let n=i?"lastChild":"firstChild",o=i?"previousSibling":"nextSibling",r=null==e?void 0:e[n];if(!r)return null;do{if(t(r))return r;let i=r[n]||r[o];if(!i&&r.parentNode!==e){do r=r.parentNode;while(r&&!r[o]&&r.parentNode!==e);i=null==r?void 0:r[o]}r=i}while(r);return null}static prev(e,t,i,n=!0){return y.find(e,t,i,!1,n)}static next(e,t,i,n=!0){return y.find(e,t,i,!0,n)}static prevWithClass(e,t){return y.__siblingWithClass(e,t,!0)}static nextWithClass(e,t){return y.__siblingWithClass(e,t,!1)}static __siblingWithClass(e,t,i){let n=e=>y.isElement(e)&&e.classList.contains(t),o=e.parentNode;return i?y.prev(e,n,o):y.next(e,n,o)}static find(e,t,i,n=!0,o=!0){let r=this.nextGen(e,i,n,o),s=r.next();for(;!s.done;){if(t(s.value))return s.value;s=r.next()}return null}static*nextGen(e,t,i=!0,n=!0){let o=[],r=e;do{let t=i?r.nextSibling:r.previousSibling;for(;t;)o.push(t),t=i?t.nextSibling:t.previousSibling;o.reverse(),yield*this.runInStack(e,o,i,n),r=r.parentNode}while(r&&r!==t);return null}static each(e,t,i=!0){let n=this.eachGen(e,i),o=n.next();for(;!o.done;){if(!1===t(o.value))return!1;o=n.next()}return!0}static eachGen(e,t=!0){return this.runInStack(e,[e],t)}static*runInStack(e,t,i,n=!0){for(;t.length;){let o=t.pop();if(n){let e=i?o.lastChild:o.firstChild;for(;e;)t.push(e),e=i?e.previousSibling:e.nextSibling}e!==o&&(yield o)}}static findWithCurrent(e,t,i,n="nextSibling",o="firstChild"){let r=e;do{if(t(r))return r||null;if(o&&r&&r[o]){let e=y.findWithCurrent(r[o],t,r,n,o);if(e)return e}for(;r&&!r[n]&&r!==i;)r=r.parentNode;r&&r[n]&&r!==i&&(r=r[n])}while(r&&r!==i);return null}static findSibling(e,t=!0,i=e=>!y.isEmptyTextNode(e)){let n=y.sibling(e,t);for(;n&&!i(n);)n=y.sibling(n,t);return n&&i(n)?n:null}static findNotEmptySibling(e,t){return y.findSibling(e,t,e=>{var t;return!y.isEmptyTextNode(e)&&!!(!y.isText(e)||(null==(t=e.nodeValue)?void 0:t.length)&&(0,d.trim)(e.nodeValue))})}static findNotEmptyNeighbor(e,t,i){return(0,b.call)(t?y.prev:y.next,e,e=>!!(e&&(!(y.isText(e)||y.isComment(e))||(0,d.trim)((null==e?void 0:e.nodeValue)||"").length)),i)}static sibling(e,t){return t?e.previousSibling:e.nextSibling}static up(e,t,i,n=!1){let o=e;if(!o)return null;do{if(t(o))return o;if(o===i||!o.parentNode)break;o=o.parentNode}while(o&&o!==i);return o===i&&n&&t(o)?o:null}static closest(e,t,i){let n,o=e=>e.toLowerCase();if((0,s.isFunction)(t))n=t;else if((0,r.isArray)(t)||(0,l.isSet)(t)){let e=(0,l.isSet)(t)?t:new Set(t.map(o));n=t=>!!(t&&e.has(o(t.nodeName)))}else n=e=>!!(e&&o(t)===o(e.nodeName));return y.up(e,n,i)}static furthest(e,t,i){let n=null,o=null==e?void 0:e.parentElement;for(;o&&o!==i;)t(o)&&(n=o),o=null==o?void 0:o.parentElement;return n}static appendChildFirst(e,t){e.firstChild!==t&&y.prepend(e,t)}static after(e,t){var i;null==(i=e.parentNode)||i.insertBefore(t,e.nextSibling)}static before(e,t){var i;null==(i=e.parentNode)||i.insertBefore(t,e)}static prepend(e,t){e.insertBefore(t,e.firstChild)}static append(e,t){(0,r.isArray)(t)?t.forEach(t=>{this.append(e,t)}):e.appendChild(t)}static moveContent(e,t,i=!1,r=()=>!0){let s=(e.ownerDocument||n.globalDocument).createDocumentFragment();(0,o.toArray)(e.childNodes).filter(e=>!!r(e)||(y.safeRemove(e),!1)).forEach(e=>{s.appendChild(e)}),t.insertBefore(s,i?t.firstChild:null)}static isOrContains(e,t,i=!1){return e===t?!i:!!(t&&e&&this.up(t,t=>t===e,e,!0))}static safeRemove(...e){e.forEach(e=>y.isNode(e)&&e.parentNode&&e.parentNode.removeChild(e))}static safeInsertNode(e,t){e.collapsed||e.deleteContents();let i=y.isFragment(t)?t.lastChild:t;e.startContainer===e.endContainer&&e.collapsed&&y.isTag(e.startContainer,n.INSEPARABLE_TAGS)?y.after(e.startContainer,t):(e.insertNode(t),i&&e.setStartBefore(i)),e.collapse(!0),[t.nextSibling,t.previousSibling].forEach(e=>y.isText(e)&&!e.nodeValue&&y.safeRemove(e))}static hide(e){e&&((0,m.dataBind)(e,"__old_display",e.style.getPropertyValue("display")),e.style.setProperty("display","none"))}static show(e){if(!e)return;let t=(0,m.dataBind)(e,"__old_display");"none"===e.style.getPropertyValue("display")&&e.style.setProperty("display",t||null)}static isTag(e,t){if(Array.isArray(t))throw TypeError("Dom.isTag does not support array");if(!this.isElement(e))return!1;let i=e.tagName.toLowerCase();return t instanceof Set?t.has(i)||t.has(e.tagName.toUpperCase()):i===t||e.tagName.toUpperCase()===t}static markTemporary(e,t){return t&&(0,p.attr)(e,t),(0,p.attr)(e,n.TEMP_ATTR,!0),e}static isTemporary(e){return!!y.isElement(e)&&(y.isMarker(e)||"true"===(0,p.attr)(e,n.TEMP_ATTR))}static isMarker(e){return y.isNode(e)&&y.isTag(e,"span")&&e.hasAttribute("data-"+n.MARKER_CLASS)}static replaceTemporaryFromString(e){return e.replace(v,"$2")}static temporaryList(e){let t=[];return y.each(e,e=>{y.isHTMLElement(e)&&e.hasAttribute(n.TEMP_ATTR)&&t.push(e)}),t}constructor(){throw Error("Dom is static module")}}},22732:function(e,t,i){"use strict";i.d(t,{Dom:function(){return n.Dom},LazyWalker:function(){return o.LazyWalker}});var n=i(2748),o=i(70071)},70071:function(e,t,i){"use strict";i.d(t,{LazyWalker:function(){return s}});var n=i(45219),o=i(2748),r=i(72757);class s extends r.Eventify{setWork(e){return this.isWorked?this.break():this.stop(),this.workNodes=o.Dom.eachGen(e,!this.options.reverse),this.isFinished=!1,this.hadAffect=!1,this._requestStarting(),this}_requestStarting(){this.__schedulerController=new AbortController,this.async.schedulerPostTask(this.__workPerform,{delay:this.options.timeout,signal:this.__schedulerController.signal}).catch(()=>null)}break(e){this.isWorked&&(this.stop(),this.emit("break",e))}end(){this.isWorked&&(this.stop(),this.emit("end",this.hadAffect),this.hadAffect=!1)}stop(){var e;this.isWorked=!1,this.isFinished=!0,this.workNodes=null,null==(e=this.__schedulerController)||e.abort(),this.__schedulerController=null}destruct(){super.destruct(),this.stop()}__workPerform(){var e;if(this.workNodes){this.isWorked=!0;let t=0,i=null!=(e=this.options.timeoutChunkSize)?e:50;for(;!this.isFinished&&t<i;){let e=this.workNodes.next();if(t+=1,this.visitNode(e.value)&&(this.hadAffect=!0),e.done)return void this.end()}}else this.end();this.isFinished||this._requestStarting()}visitNode(e){var t;return!!e&&(void 0===this.options.whatToShow||e.nodeType===this.options.whatToShow)&&null!=(t=this.emit("visit",e))&&t}constructor(e,t={}){super(),this.async=e,this.options=t,this.workNodes=null,this.hadAffect=!1,this.isWorked=!1,this.isFinished=!1,this.__schedulerController=null}}!function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([n.autobind],s.prototype,"__workPerform",null)},98220:function(e,t,i){"use strict";i.d(t,{EventEmitter:function(){return c}});var n=i(82758),o=i(46559),r=i(68345),s=i(23282),a=i(70799),l=i(89890),u=i(15738);class c{mute(e){return this.__mutedEvents.add(null!=e?e:"*"),this}isMuted(e){return!!(e&&this.__mutedEvents.has(e))||this.__mutedEvents.has("*")}unmute(e){return this.__mutedEvents.delete(null!=e?e:"*"),this}__eachEvent(e,t){(0,o.splitArray)(e).map(e=>e.trim()).forEach(e=>{let i=e.split("."),n=i[1]||u.defaultNameSpace;t.call(this,i[0],n)})}__getStore(e){if(!e)throw(0,l.error)("Need subject");if(void 0===e[this.__key]){let t=new u.EventHandlersStore;Object.defineProperty(e,this.__key,{enumerable:!1,configurable:!0,writable:!0,value:t})}return e[this.__key]}__removeStoreFromSubject(e){void 0!==e[this.__key]&&delete e[this.__key]}__triggerNativeEvent(e,t){let i=this.__doc.createEvent("HTMLEvents");(0,a.isString)(t)?i.initEvent(t,!0,!0):(i.initEvent(t.type,t.bubbles,t.cancelable),["screenX","screenY","clientX","clientY","target","srcElement","currentTarget","timeStamp","which","keyCode"].forEach(e=>{Object.defineProperty(i,e,{value:t[e],enumerable:!0})}),Object.defineProperty(i,"originalEvent",{value:t,enumerable:!0})),e.dispatchEvent(i)}get current(){return this.currents[this.currents.length-1]}on(e,t,i,o){let u,c,h,p;if((0,a.isString)(e)||(0,a.isStringArray)(e)?(u=this,c=e,h=t,p=i):(u=e,c=t,h=i,p=o),!((0,a.isString)(c)||(0,a.isStringArray)(c))||0===c.length)throw(0,l.error)("Need events names");if(!(0,s.isFunction)(h))throw(0,l.error)("Need event handler");if((0,r.isArray)(u))return u.forEach(e=>{this.on(e,c,h,p)}),this;let f=u,m=this.__getStore(f),g=this,b=function(e,...t){if(!g.isMuted(e))return h&&h.call(this,...t)};return d(f)&&(b=function(e){if(!g.isMuted(e.type)&&(g.__prepareEvent(e),h&&!1===h.call(this,e)))return e.preventDefault(),e.stopImmediatePropagation(),!1}),this.__eachEvent(c,(e,t)=>{var i,o;if(0===e.length)throw(0,l.error)("Need event name");if(!1===m.indexOf(e,t,h)){let r={event:e,originalCallback:h,syntheticCallback:b};if(m.set(e,t,r,null==p?void 0:p.top),d(f)){let t=n.PASSIVE_EVENTS.has(e)?{passive:!0,capture:null!=(i=null==p?void 0:p.capture)&&i}:null!=(o=null==p?void 0:p.capture)&&o;b.options=t,f.addEventListener(e,b,t),this.__memoryDOMSubjectToHandler(f,b)}}}),this}__memoryDOMSubjectToHandler(e,t){let i=this.__domEventsMap.get(e)||new Set;i.add(t),this.__domEventsMap.set(e,i)}__unmemoryDOMSubjectToHandler(e,t){let i=this.__domEventsMap,n=i.get(e)||new Set;n.delete(t),n.size?i.set(e,n):i.delete(e)}one(e,t,i,n){let o,r,s,l;(0,a.isString)(e)||(0,a.isStringArray)(e)?(o=this,r=e,s=t,l=i):(o=e,r=t,s=i,l=n);let u=(...e)=>(this.off(o,r,u),s(...e));return this.on(o,r,u,l),this}off(e,t,i){let n,o,l;if((0,a.isString)(e)||(0,a.isStringArray)(e)?(n=this,o=e,l=t):(n=e,o=t,l=i),(0,r.isArray)(n))return n.forEach(e=>{this.off(e,o,l)}),this;let c=n,h=this.__getStore(c);if(!((0,a.isString)(o)||(0,a.isStringArray)(o))||0===o.length)return h.namespaces().forEach(e=>{this.off(c,"."+e)}),this.__removeStoreFromSubject(c),this;let p=e=>{var t;d(c)&&(c.removeEventListener(e.event,e.syntheticCallback,null!=(t=e.syntheticCallback.options)&&t),this.__unmemoryDOMSubjectToHandler(c,e.syntheticCallback))},f=(e,t)=>{if(""===e)return void h.events(t).forEach(e=>{""!==e&&f(e,t)});let i=h.get(e,t);if(i&&i.length)if((0,s.isFunction)(l)){let n=h.indexOf(e,t,l);!1!==n&&(p(i[n]),i.splice(n,1),i.length||h.clearEvents(t,e))}else i.forEach(p),i.length=0,h.clearEvents(t,e)};return this.__eachEvent(o,(e,t)=>{t===u.defaultNameSpace?h.namespaces().forEach(t=>{f(e,t)}):f(e,t)}),h.isEmpty()&&this.__removeStoreFromSubject(c),this}stopPropagation(e,t){let i=(0,a.isString)(e)?this:e,n=(0,a.isString)(e)?e:t;if("string"!=typeof n)throw(0,l.error)("Need event names");let o=this.__getStore(i);this.__eachEvent(n,(e,t)=>{let n=o.get(e,t);n&&this.__stopped.push(n),t===u.defaultNameSpace&&o.namespaces(!0).forEach(t=>this.stopPropagation(i,e+"."+t))})}__removeStop(e){if(e){let t=this.__stopped.indexOf(e);-1!==t&&this.__stopped.splice(0,t+1)}}__isStopped(e){return void 0!==e&&-1!==this.__stopped.indexOf(e)}fire(e,t,...i){let n,o,r=(0,a.isString)(e)?this:e,s=(0,a.isString)(e)?e:t,c=(0,a.isString)(e)?[t,...i]:i;if(!d(r)&&!(0,a.isString)(s))throw(0,l.error)("Need events names");let h=this.__getStore(r);return!(0,a.isString)(s)&&d(r)?this.__triggerNativeEvent(r,t):this.__eachEvent(s,(e,t)=>{if(d(r))this.__triggerNativeEvent(r,e);else{let i=h.get(e,t);if(i)try{[...i].every(t=>!this.__isStopped(i)&&(this.currents.push(e),o=t.syntheticCallback.call(r,e,...c),this.currents.pop(),void 0!==o&&(n=o),!0))}finally{this.__removeStop(i)}t!==u.defaultNameSpace||d(r)||h.namespaces().filter(e=>e!==t).forEach(t=>{let i=this.fire.apply(this,[r,e+"."+t,...c]);void 0!==i&&(n=i)})}}),n}destruct(){this.__isDestructed||(this.__isDestructed=!0,this.__domEventsMap.forEach((e,t)=>{this.off(t)}),this.__domEventsMap.clear(),this.__mutedEvents.clear(),this.currents.length=0,this.__stopped.length=0,this.off(this),this.__getStore(this).clear(),this.__removeStoreFromSubject(this))}constructor(e){this.__domEventsMap=new Map,this.__mutedEvents=new Set,this.__key="__JoditEventEmitterNamespaces",this.__doc=n.globalDocument,this.__prepareEvent=e=>{!e.cancelBubble&&(e.composed&&(0,s.isFunction)(e.composedPath)&&e.composedPath()[0]&&Object.defineProperty(e,"target",{value:e.composedPath()[0],configurable:!0,enumerable:!0}),e.type.match(/^touch/)&&e.changedTouches&&e.changedTouches.length&&["clientX","clientY","pageX","pageY"].forEach(t=>{Object.defineProperty(e,t,{value:e.changedTouches[0][t],configurable:!0,enumerable:!0})}),e.originalEvent||(e.originalEvent=e),"paste"===e.type&&void 0===e.clipboardData&&this.__doc.defaultView.clipboardData&&Object.defineProperty(e,"clipboardData",{get:()=>this.__doc.defaultView.clipboardData,configurable:!0,enumerable:!0}))},this.currents=[],this.__stopped=[],this.__isDestructed=!1,e&&(this.__doc=e),this.__key+=new Date().getTime()}}function d(e){return e&&(0,s.isFunction)(e.addEventListener)}},72757:function(e,t,i){"use strict";i.d(t,{Eventify:function(){return n}});class n{on(e,t){var i;return this.__map.has(e)||this.__map.set(e,new Set),null==(i=this.__map.get(e))||i.add(t),this}off(e,t){var i;return this.__map.has(e)&&(null==(i=this.__map.get(e))||i.delete(t)),this}destruct(){this.__map.clear()}emit(e,...t){var i;let n;return this.__map.has(e)&&(null==(i=this.__map.get(e))||i.forEach(e=>{n=e(...t)})),n}constructor(){this.__map=new Map}}},57012:function(e,t,i){"use strict";let n=new(i(98220)).EventEmitter;i.d(t,["eventEmitter",0,n])},3827:function(e,t,i){"use strict";i.d(t,{EventEmitter:function(){return n.EventEmitter},EventHandlersStore:function(){return s.EventHandlersStore},Eventify:function(){return o.Eventify},defaultNameSpace:function(){return s.defaultNameSpace},observable:function(){return r.observable}});var n=i(98220),o=i(72757),r=i(73026),s=i(15738)},73026:function(e,t,i){"use strict";i.d(t,{observable:function(){return u}});var n=i(68345),o=i(59292),r=i(72430),s=i(37790);let a=Symbol("observable-object");function l(e){return void 0!==e[a]}function u(e){if(l(e))return e;let t={},i={},u=(t,o)=>((0,n.isArray)(t)?t.map(e=>u(e,o)):(i[t]||(i[t]=[]),i[t].push(o)),e),c=(o,...r)=>{if((0,n.isArray)(o))return void o.map(e=>c(e,...r));try{!t[o]&&i[o]&&(t[o]=!0,i[o].forEach(t=>t.call(e,...r)))}finally{t[o]=!1}},d=(t,i=[])=>{let n={};l(t)||(Object.defineProperty(t,a,{enumerable:!1,value:!0}),Object.keys(t).forEach(a=>{let l=i.concat(a).filter(e=>e.length);n[a]=t[a];let u=(0,s.getPropertyDescriptor)(t,a);Object.defineProperty(t,a,{set:t=>{let i=n[a];if(!(0,o.isFastEqual)(n[a],t)){c(["beforeChange",`beforeChange.${l.join(".")}`],a,t),(0,r.isPlainObject)(t)&&d(t,l),u&&u.set?u.set.call(e,t):n[a]=t;let o=[];c(["change",...l.reduce((e,t)=>(o.push(t),e.push(`change.${o.join(".")}`),e),[])],l.join("."),i,(null==t?void 0:t.valueOf)?t.valueOf():t)}},get:()=>u&&u.get?u.get.call(e):n[a],enumerable:!0,configurable:!0}),(0,r.isPlainObject)(n[a])&&d(n[a],l)}),Object.defineProperty(e,"on",{value:u}))};return d(e),e}},15738:function(e,t,i){"use strict";i.d(t,{EventHandlersStore:function(){return s}});var n=i(4510),o=i(38837);let r="JoditEventDefaultNamespace";class s{get(e,t){if(this.__store.has(t)){let i=this.__store.get(t);return(0,o.assert)(i,"-"),i[e]}}indexOf(e,t,i){let n=this.get(e,t);if(n){for(let e=0;e<n.length;e+=1)if(n[e].originalCallback===i)return e}return!1}namespaces(e=!1){let t=(0,n.toArray)(this.__store.keys());return e?t.filter(e=>e!==r):t}events(e){let t=this.__store.get(e);return t?Object.keys(t):[]}set(e,t,i,n=!1){let o=this.__store.get(t);o||(o={},this.__store.set(t,o)),void 0===o[e]&&(o[e]=[]),n?o[e].unshift(i):o[e].push(i)}clear(){this.__store.clear()}clearEvents(e,t){let i=this.__store.get(e);i&&i[t]&&(delete i[t],Object.keys(i).length||this.__store.delete(e))}isEmpty(){return 0===this.__store.size}constructor(){this.__store=new Map}}i.d(t,["defaultNameSpace",0,r])},580:function(e,t,i){"use strict";i.d(t,{getContainer:function(){return y},getPopupViewRoot:function(){return w},uniqueUid:function(){return g}});var n=i(19306),o=i(70799),r=i(39955),s=i(12475),a=i(29960),l=i(41180),u=i(80568),c=i(41876),d=i(57012),h=i(82758),p=i(22732);let f=1,m=new Set;function g(){function e(){return Math.round(f+=10*(Math.random()+1)).toString(16)}let t=e();for(;m.has(t);)t=e();return m.add(t),t}let b=new c.PluginSystem({getContainer:y}),v=new WeakMap;function y(e,t,i="div",l=!1){let c,d=(0,o.isString)(t)?t:t?(0,u.getClassName)(t.prototype):"jodit-utils",h=v.get(e)||{},f=d+i,m=(0,r.isViewObject)(e)?e:e.j;if(!h[f]){let t=m.c;if(c=w(m.o,m.container,e.od.body),l&&(0,n.isJoditObject)(e)&&e.od!==e.ed){t=e.createInside;let o="style"===i?e.ed.head:e.ed.body;c=(0,n.isJoditObject)(e)&&e.o.shadowRoot?e.o.shadowRoot:o}let o=t.element(i,{className:`jodit jodit-${(0,s.kebabCase)(d)}-container jodit-box`});m.o.nonce&&("style"===i||"script"===i)&&(0,a.attr)(o,"nonce",m.o.nonce),o.classList.add(`jodit_theme_${m.o.theme||"default"}`),p.Dom.append(c,o),h[f]=o,e.hookStatus("beforeDestruct",()=>{m.events.off(o),p.Dom.safeRemove(o),delete h[f],Object.keys(h).length&&v.delete(e)}),v.set(e,h),m.events.fire("getContainer",o)}return h[f].classList.remove("jodit_theme_default","jodit_theme_dark"),h[f].classList.add(`jodit_theme_${m.o.theme||"default"}`),h[f]}function w(e,t,i){var n,o,r;return null!=(r=null!=(o=null!=(n=e.popupRoot)?n:e.shadowRoot)?o:p.Dom.closest(t,e=>p.Dom.isHTMLElement(e)&&(p.Dom.isTag(e,"dialog")||["fixed","absolute"].includes((0,l.css)(e,"position"))),i))?r:i}let _=d.eventEmitter;i.d(t,["eventEmitter",0,_,"extendLang",0,e=>{Object.keys(e).forEach(t=>{h.lang[t]?Object.assign(h.lang[t],e[t]):h.lang[t]=e[t]})},"instances",0,{},"modules",0,{},"pluginSystem",0,b])},29999:function(e,t,i){"use strict";var n=i(68345);i.d(t,["asArray",0,e=>(0,n.isArray)(e)?e:[e]])},76855:function(e,t,i){"use strict";i.d(t,{asArray:function(){return n.asArray},splitArray:function(){return o.splitArray},toArray:function(){return r.toArray}});var n=i(29999),o=i(46559),r=i(4510)},46559:function(e,t,i){"use strict";function n(e){return Array.isArray(e)?e:e.split(/[,\s]+/)}i.d(t,{splitArray:function(){return n}})},4510:function(e,t,i){"use strict";var n=i(70722),o=i(58844);i.d(t,["toArray",0,function(...e){var t;return((0,n.isNativeFunction)(Array.from)?Array.from:null!=(t=(0,o.reset)("Array.from"))?t:Array.from).apply(Array,e)}])},91898:function(e,t,i){"use strict";i.d(t,{clearTimeout:function(){return n.clearTimeout},setTimeout:function(){return n.setTimeout}});var n=i(13252)},13252:function(e,t,i){"use strict";i.d(t,{clearTimeout:function(){return r},setTimeout:function(){return o}});var n=i(82758);function o(e,t,...i){return t?n.globalWindow.setTimeout(e,t,...i):(e.call(null,...i),0)}function r(e){n.globalWindow.clearTimeout(e)}},54765:function(e,t,i){"use strict";i.d(t,{hasBrowserColorPicker:function(){return o}});var n=i(82758);function o(){let e;try{let t=n.globalDocument.createElement("input");t.type="color",t.value="!",e="color"===t.type&&"!"!==t.value}catch(t){e=!1}return e}},27613:function(e,t,i){"use strict";i.d(t,{hasBrowserColorPicker:function(){return n.hasBrowserColorPicker},hasContainer:function(){return d.hasContainer},isAbortError:function(){return o.isAbortError},isArray:function(){return r.isArray},isBoolean:function(){return s.isBoolean},isDestructable:function(){return d.isDestructable},isEqual:function(){return a.isEqual},isFastEqual:function(){return a.isFastEqual},isFunction:function(){return l.isFunction},isHTML:function(){return u.isHTML},isHtmlFromWord:function(){return c.isHtmlFromWord},isInitable:function(){return d.isInitable},isInt:function(){return h.isInt},isJoditObject:function(){return p.isJoditObject},isLicense:function(){return f.isLicense},isMarker:function(){return m.isMarker},isNativeFunction:function(){return g.isNativeFunction},isNumber:function(){return b.isNumber},isNumeric:function(){return v.isNumeric},isPlainObject:function(){return y.isPlainObject},isPromise:function(){return w.isPromise},isSet:function(){return _.isSet},isString:function(){return C.isString},isStringArray:function(){return C.isStringArray},isURL:function(){return k.isURL},isValidName:function(){return S.isValidName},isViewObject:function(){return E.isViewObject},isVoid:function(){return x.isVoid},isWindow:function(){return F.isWindow}});var n=i(54765),o=i(12045),r=i(68345),s=i(87612),a=i(59292),l=i(23282),u=i(58487),c=i(29673),d=i(60132),h=i(72913),p=i(19306),f=i(45603),m=i(78116),g=i(70722),b=i(84767),v=i(29807),y=i(72430),w=i(14773),_=i(42320),C=i(70799),k=i(26049),S=i(37508),E=i(39955),x=i(86068),F=i(52742)},12045:function(e,t,i){"use strict";function n(e){return!!e&&e instanceof DOMException&&"AbortError"===e.name}i.d(t,{isAbortError:function(){return n}})},68345:function(e,t,i){"use strict";function n(e){return Array.isArray(e)}i.d(t,{isArray:function(){return n}})},87612:function(e,t,i){"use strict";function n(e){return"boolean"==typeof e}i.d(t,{isBoolean:function(){return n}})},59292:function(e,t,i){"use strict";i.d(t,{isEqual:function(){return o},isFastEqual:function(){return r}});var n=i(67462);function o(e,t){return e===t||(0,n.stringify)(e)===(0,n.stringify)(t)}function r(e,t){return e===t}},23282:function(e,t,i){"use strict";function n(e){return"function"==typeof e}i.d(t,{isFunction:function(){return n}})},29673:function(e,t,i){"use strict";function n(e){return -1!==e.search(/<meta.*?Microsoft Excel\s[\d].*?>/)||-1!==e.search(/<meta.*?Microsoft Word\s[\d].*?>/)||-1!==e.search(/<meta[^>]*?ProgId[^>]*?(Word|Excel)\./i)||-1!==e.search(/<meta[^>]*?(LibreOffice|OpenOffice)/i)||-1!==e.search(/urn:schemas-microsoft-com:office:(word|excel)/)||-1!==e.search(/<\w[^>]*\sclass=("|')?Mso/)||-1!==e.search(/style='[^']*mso-/)||-1!==e.search(/style="[^"]*mso-/)&&-1!==e.search(/<font/)}i.d(t,{isHtmlFromWord:function(){return n}})},58487:function(e,t,i){"use strict";var n=i(70799);i.d(t,["isHTML",0,e=>(0,n.isString)(e)&&/<([A-Za-z][A-Za-z0-9]*)\b[^>]*>(.*?)<\/\1>/m.test(e.replace(/[\r\n]/g,""))])},60132:function(e,t,i){"use strict";i.d(t,{hasContainer:function(){return l},isDestructable:function(){return a},isInitable:function(){return s}});var n=i(2748),o=i(23282),r=i(86068);function s(e){return!(0,r.isVoid)(e)&&(0,o.isFunction)(e.init)}function a(e){return!(0,r.isVoid)(e)&&(0,o.isFunction)(e.destruct)}function l(e){return!(0,r.isVoid)(e)&&n.Dom.isElement(e.container)}},72913:function(e,t,i){"use strict";i.d(t,{isInt:function(){return r}});var n=i(29807),o=i(70799);function r(e){return(0,o.isString)(e)&&(0,n.isNumeric)(e)&&(e=parseFloat(e)),"number"==typeof e&&Number.isFinite(e)&&!(e%1)}},19306:function(e,t,i){"use strict";i.d(t,{isJoditObject:function(){return o}});var n=i(23282);function o(e){return!!(e&&e instanceof Object&&(0,n.isFunction)(e.constructor)&&("u">typeof Jodit&&e instanceof Jodit||e.isJodit))}},45603:function(e,t,i){"use strict";var n=i(70799);i.d(t,["isLicense",0,e=>(0,n.isString)(e)&&23===e.length&&/^[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}$/i.test(e)])},78116:function(e,t,i){"use strict";i.d(t,{isMarker:function(){return o}});var n=i(2748);function o(e){return n.Dom.isMarker(e)}},70722:function(e,t,i){"use strict";function n(e){return!!e&&"function"===(typeof e).toLowerCase()&&(e===Function.prototype||/^\s*function\s*(\b[a-z$_][a-z0-9$_]*\b)*\s*\((|([a-z$_][a-z0-9$_]*)(\s*,[a-z$_][a-z0-9$_]*)*)\)\s*{\s*\[native code]\s*}\s*$/i.test(String(e)))}i.d(t,{isNativeFunction:function(){return n}})},84767:function(e,t,i){"use strict";function n(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}i.d(t,{isNumber:function(){return n}})},29807:function(e,t,i){"use strict";i.d(t,{isNumeric:function(){return o}});var n=i(70799);function o(e){if((0,n.isString)(e)){if(!e.match(/^([+-])?[0-9]+(\.?)([0-9]+)?(e[0-9]+)?$/))return!1;e=parseFloat(e)}return"number"==typeof e&&!isNaN(e)&&isFinite(e)}},72430:function(e,t,i){"use strict";i.d(t,{isPlainObject:function(){return o}});var n=i(52742);function o(e){return!(!e||"object"!=typeof e||e.nodeType||(0,n.isWindow)(e))&&!(e.constructor&&!({}).hasOwnProperty.call(e.constructor.prototype,"isPrototypeOf"))}},14773:function(e,t,i){"use strict";function n(e){return e&&"function"==typeof e.then}i.d(t,{isPromise:function(){return n}})},42320:function(e,t,i){"use strict";i.d(t,{isSet:function(){return o}});var n=i(23282);function o(e){return!!e&&(0,n.isFunction)(e.has)&&(0,n.isFunction)(e.add)&&(0,n.isFunction)(e.delete)}},70799:function(e,t,i){"use strict";i.d(t,{isString:function(){return o},isStringArray:function(){return r}});var n=i(68345);function o(e){return"string"==typeof e}function r(e){return(0,n.isArray)(e)&&o(e[0])}},26049:function(e,t,i){"use strict";i.d(t,{isURL:function(){return o}});var n=i(82758);function o(e){if(e.includes(" "))return!1;if("u">typeof URL)try{let t=new URL(e);return["https:","http:","ftp:","file:","rtmp:"].includes(t.protocol)}catch(e){return!1}let t=n.globalDocument.createElement("a");return t.href=e,!!t.hostname}},37508:function(e,t,i){"use strict";function n(e){return!!e.length&&!/[^0-9A-Za-zа-яА-ЯЁё\w\-_. ]/.test(e)&&e.trim().length>0}i.d(t,{isValidName:function(){return n}})},39955:function(e,t,i){"use strict";i.d(t,{isViewObject:function(){return o}});var n=i(23282);function o(e){return!!(e&&e instanceof Object&&(0,n.isFunction)(e.constructor)&&e.isView)}},86068:function(e,t,i){"use strict";function n(e){return null==e}i.d(t,{isVoid:function(){return n}})},52742:function(e,t,i){"use strict";function n(e){return null!=e&&e===e.window}i.d(t,{isWindow:function(){return n}})},35278:function(e,t,i){"use strict";i.d(t,["colorToHex",0,e=>{if("rgba(0, 0, 0, 0)"===e||""===e)return!1;if(!e)return"#000000";if("#"===e.substr(0,1))return e;let t=/([\s\n\t\r]*?)rgb\((\d+), (\d+), (\d+)\)/.exec(e)||/([\s\n\t\r]*?)rgba\((\d+), (\d+), (\d+), ([\d.]+)\)/.exec(e);if(!t)return"#000000";let i=parseInt(t[2],10),n=parseInt(t[3],10),o=(parseInt(t[4],10)|n<<8|i<<16).toString(16).toUpperCase();for(;o.length<6;)o="0"+o;return t[1]+"#"+o}])},32574:function(e,t,i){"use strict";i.d(t,{applyStyles:function(){return c}});var n=i(82758),o=i(2748),r=i(49055),s=i(29960),a=i(41180),l=i(76078);function u(e){return e.replace(/mso-[a-z-]+:[\s]*[^;]+;/gi,"").replace(/mso-[a-z-]+:[\s]*[^";']+$/gi,"").replace(/border[a-z-]*:[\s]*[^;]+;/gi,"").replace(/([0-9.]+)(pt|cm)/gi,(e,t,i)=>{switch(i.toLowerCase()){case"pt":return(1.328*parseFloat(t)).toFixed(0)+"px";case"cm":return(.02645833*parseFloat(t)).toFixed(0)+"px"}return e})}function c(e){let t=/<html(?:\s[^>]*)?>/i.exec(e);if(!t)return e;let i=(e=e.substring(t.index)).toLowerCase().lastIndexOf("</html>");-1!==i&&(e=e.substring(0,i+7));let c=n.globalDocument.createElement("iframe");(0,a.css)(c,"display","none"),o.Dom.append(n.globalDocument.body,c);let d="";try{let t=c.contentDocument||(c.contentWindow?c.contentWindow.document:null);if(t){t.open(),t.write(e),t.close(),o.Dom.each(t.body,e=>{o.Dom.isElement(e)&&/mso-list:\s*ignore/i.test((0,s.attr)(e,"style")||"")&&o.Dom.safeRemove(e)});try{for(let e=0;e<t.styleSheets.length;e+=1){let i=t.styleSheets[e].cssRules;for(let e=0;e<i.length;e+=1)""!==i[e].selectorText&&(0,l.$$)(i[e].selectorText,t.body).forEach(t=>{t.style.cssText=u(i[e].style.cssText+";"+t.style.cssText)})}}catch(e){if(!n.IS_PROD)throw e}o.Dom.each(t.body,e=>{if(o.Dom.isElement(e)){let t=(0,s.attr)(e,"style");t&&(e.style.cssText=u(t)),(0,s.attr)(e,"style")||(0,s.attr)(e,"style",null)}}),d=t.firstChild?(0,r.trim)(t.body.innerHTML):""}}catch(e){}finally{o.Dom.safeRemove(c)}return d&&(e=d),(0,r.trim)(e.replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/<!--[^>]*>/g,""))}},53212:function(e,t,i){"use strict";i.d(t,{cleanFromWord:function(){return l}});var n=i(82758),o=i(2748),r=i(4510),s=i(49055),a=i(29960);function l(e){-1!==e.indexOf("<html ")&&(e=(e=e.substring(e.indexOf("<html "),e.length)).substring(0,e.lastIndexOf("</html>")+7));let t="";try{let i=n.globalDocument.createElement("div");i.innerHTML=e;let s=[];i.firstChild&&o.Dom.each(i,e=>{if(e)switch(e.nodeType){case Node.ELEMENT_NODE:switch(e.nodeName){case"STYLE":case"LINK":case"META":s.push(e);break;case"W:SDT":case"W:SDTPR":case"FONT":o.Dom.unwrap(e);break;default:if(/mso-list:\s*ignore/i.test((0,a.attr)(e,"style")||"")){s.push(e);break}(0,r.toArray)(e.attributes).forEach(t=>{-1===["src","href","rel","content"].indexOf(t.name.toLowerCase())&&(0,a.attrRaw)(e,t.name,null)})}break;case Node.TEXT_NODE:break;default:s.push(e)}}),o.Dom.safeRemove.apply(null,s),t=i.innerHTML}catch(e){}return t&&(e=t),(e=e.split(/(\n)/).filter(s.trim).join("\n")).replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/<!--[^>]*>/g,"")}},53326:function(e,t,i){"use strict";i.d(t,{htmlspecialchars:function(){return o}});var n=i(82758);function o(e){let t=n.globalDocument.createElement("div");return t.textContent=e,t.innerHTML}},75275:function(e,t,i){"use strict";i.d(t,{applyStyles:function(){return n.applyStyles},cleanFromWord:function(){return o.cleanFromWord},htmlspecialchars:function(){return r.htmlspecialchars},nl2br:function(){return s.nl2br},safeHTML:function(){return a.safeHTML},sanitizeHTMLElement:function(){return a.sanitizeHTMLElement},stripTags:function(){return l.stripTags}});var n=i(32574),o=i(53212),r=i(53326),s=i(45971),a=i(86518),l=i(91003)},45971:function(e,t,i){"use strict";function n(e){return e.replace(/\r\n|\r|\n/g,"<br/>")}i.d(t,{nl2br:function(){return n}})},86518:function(e,t,i){"use strict";i.d(t,{safeHTML:function(){return l},sanitizeHTMLElement:function(){return h}});var n=i(2748),o=i(43555),r=i(29960);let s=new Set(["foreignobject","annotation-xml","desc","title"]),a=e=>!!(e&&/^(math|svg)$/i.test(e.nodeName));function l(e,t){var i;if(!n.Dom.isElement(e)&&!n.Dom.isFragment(e))return;let l=[];for(let t of(n.Dom.each(e,e=>{n.Dom.isElement(e)&&n.Dom.up(e.parentNode,a)&&l.push(e)}),l))n.Dom.isOrContains(e,t)&&function(e){if("http://www.w3.org/1999/xhtml"!==e.namespaceURI||null==n.Dom.up(e,a))return!1;for(let t=e.parentElement;t;t=t.parentElement){let e=t.nodeName.toLowerCase();if("math"===e||"svg"===e)break;if(s.has(e))return!1}return!0}(t)&&n.Dom.safeRemove(t);let u=null!=(i=t.removeEventAttributes)?i:t.removeOnError,c=e=>{if(n.Dom.isElement(e)&&(u&&function(e){if(!n.Dom.isElement(e))return;let t=[];for(let i=0;i<e.attributes.length;i++)e.attributes[i].name.toLowerCase().startsWith("on")&&t.push(e.attributes[i].name);for(let i of t)(0,r.attrRaw)(e,i,null)}(e),h(e,t),t.safeLinksTarget&&"A"===e.nodeName&&"_blank"===(0,o.attr)(e,"target"))){let t=((0,o.attr)(e,"rel")||"").split(/\s+/).filter(Boolean);t.includes("noopener")||t.push("noopener"),t.includes("noreferrer")||t.push("noreferrer"),(0,o.attr)(e,"rel",t.join(" "))}};c(e),n.Dom.each(e,c)}let u=["src","data","action","formaction","poster","background","xlink:href"],c=new Set(["iframe","frame","object","embed"]);function d(e,t){let i=e.replace(/[\u0000-\u0020]+/g,"").toLowerCase();return!!(/^(?:javascript|vbscript|livescript|mocha):/.test(i)||/^data:(?:text\/html|application\/xhtml)/.test(i))||/^data:image\/svg/.test(i)&&c.has(t)}function h(e,{safeJavaScriptLink:t,removeOnError:i}={safeJavaScriptLink:!0,removeOnError:!0}){if(!n.Dom.isElement(e))return!1;let s=!1;i&&e.hasAttribute("onerror")&&((0,o.attr)(e,"onerror",null),s=!0);let a=e.nodeName.toLowerCase(),l=(0,o.attr)(e,"href");if(t&&l&&d(l,a)){let t="u">typeof location?location.protocol:"http:";(0,o.attr)(e,"href",t+"//"+l),s=!0}if(t)for(let t of(e.hasAttribute("srcdoc")&&((0,o.attr)(e,"srcdoc",null),s=!0),u)){let i=(0,r.attrRaw)(e,t);i&&d(i,a)&&((0,o.attr)(e,t,null),s=!0)}return s}},91003:function(e,t,i){"use strict";i.d(t,{stripTags:function(){return function e(t,i=document,u=null,c=!1){let d=i.createElement("div");(0,o.isString)(t)?d.innerHTML=t:n.Dom.append(d,t);let h=[];return n.Dom.each(d,e=>{n.Dom.isElement(e)&&h.push(e)}),h.forEach(t=>{if(!t.parentNode)return;if(u&&n.Dom.isTag(t,u)){let o=t.nodeName.toLowerCase(),r=n.Dom.isTag(t,l)?`%%%jodit-single-${o}%%%`:`%%%jodit-${o}%%%${e(t.innerHTML,i,u,c)}%%%/jodit-${o}%%%`;n.Dom.before(t,i.createTextNode(r)),n.Dom.safeRemove(t);return}if(n.Dom.isTag(t,a))return void n.Dom.safeRemove(t);if(!n.Dom.isTag(t,s))return;let o=t.nextSibling;!(n.Dom.isText(o)&&/^\s/.test(o.nodeValue||""))&&o&&n.Dom.before(o,i.createTextNode(c?"%%%jodit-single-br%%%":" "))}),(0,r.trim)(d.innerText).replace(/%%%(\/)?jodit(-single)?-([\w\n]+)%%%/g,(e,t,i,n)=>`<${t?"/":""}${n}>`)}}});var n=i(2748),o=i(70799),r=i(49055);let s=new Set(["div","p","br","h1","h2","h3","h4","h5","h6","hr"]),a=new Set(["script","style"]),l=new Set(["br","hr","input"])},21537:function(e,t,i){"use strict";i.r(t),i.d(t,{$$:function(){return d.$$},CamelCaseToKebabCase:function(){return c.CamelCaseToKebabCase},ConfigDeepFlatten:function(){return d.ConfigDeepFlatten},ConfigFlatten:function(){return d.ConfigFlatten},ConfigMerge:function(){return d.ConfigMerge},ConfigProto:function(){return d.ConfigProto},ConnectionError:function(){return d.ConnectionError},LimitedStack:function(){return d.LimitedStack},NUMBER_FIELDS_REG:function(){return l.NUMBER_FIELDS_REG},OptionsError:function(){return d.OptionsError},UNSAFE_PROTO_KEYS:function(){return d.UNSAFE_PROTO_KEYS},abort:function(){return d.abort},alignElement:function(){return d.alignElement},alreadyLoadedList:function(){return d.alreadyLoadedList},appendScriptAsync:function(){return d.appendScriptAsync},appendStyleAsync:function(){return d.appendStyleAsync},applyStyles:function(){return a.applyStyles},asArray:function(){return n.asArray},assert:function(){return d.assert},attr:function(){return d.attr},attrRaw:function(){return d.attrRaw},browser:function(){return d.browser},buildQuery:function(){return d.buildQuery},call:function(){return d.call},callPromise:function(){return d.callPromise},callThis:function(){return d.callThis},camelCase:function(){return c.camelCase},cleanFromWord:function(){return a.cleanFromWord},clearAlign:function(){return d.clearAlign},clearCenterAlign:function(){return d.clearCenterAlign},clearTimeout:function(){return o.clearTimeout},cns:function(){return d.cns},colorToHex:function(){return s.colorToHex},completeUrl:function(){return d.completeUrl},connection:function(){return d.connection},convertMediaUrlToVideoEmbed:function(){return d.convertMediaUrlToVideoEmbed},css:function(){return d.css},cssInline:function(){return d.cssInline},cssPath:function(){return d.cssPath},ctrlKey:function(){return d.ctrlKey},dataBind:function(){return d.dataBind},defaultLanguage:function(){return d.defaultLanguage},error:function(){return d.error},fastClone:function(){return d.fastClone},fuzzySearchIndex:function(){return c.fuzzySearchIndex},get:function(){return d.get},getClassName:function(){return d.getClassName},getContentWidth:function(){return u.getContentWidth},getDataTransfer:function(){return d.getDataTransfer},getFixedPositionOffset:function(){return u.getFixedPositionOffset},getPropertyDescriptor:function(){return d.getPropertyDescriptor},getScrollParent:function(){return u.getScrollParent},getXPathByElement:function(){return d.getXPathByElement},hAlignElement:function(){return d.hAlignElement},hasBrowserColorPicker:function(){return r.hasBrowserColorPicker},hasContainer:function(){return r.hasContainer},htmlspecialchars:function(){return a.htmlspecialchars},humanSizeToBytes:function(){return d.humanSizeToBytes},i18n:function(){return c.i18n},inView:function(){return d.inView},innerWidth:function(){return u.innerWidth},isAbortError:function(){return r.isAbortError},isArray:function(){return r.isArray},isAtom:function(){return d.isAtom},isBoolean:function(){return r.isBoolean},isDestructable:function(){return r.isDestructable},isEqual:function(){return r.isEqual},isFastEqual:function(){return r.isFastEqual},isFunction:function(){return r.isFunction},isHTML:function(){return r.isHTML},isHtmlFromWord:function(){return r.isHtmlFromWord},isInitable:function(){return r.isInitable},isInt:function(){return r.isInt},isJoditObject:function(){return r.isJoditObject},isLicense:function(){return r.isLicense},isMarker:function(){return r.isMarker},isNativeFunction:function(){return r.isNativeFunction},isNumber:function(){return r.isNumber},isNumeric:function(){return r.isNumeric},isPlainObject:function(){return r.isPlainObject},isPromise:function(){return r.isPromise},isSet:function(){return r.isSet},isString:function(){return r.isString},isStringArray:function(){return r.isStringArray},isURL:function(){return r.isURL},isUnsafeProtoKey:function(){return d.isUnsafeProtoKey},isValidName:function(){return r.isValidName},isViewObject:function(){return r.isViewObject},isVoid:function(){return r.isVoid},isWindow:function(){return r.isWindow},kebabCase:function(){return c.kebabCase},keepNames:function(){return d.keepNames},keys:function(){return d.keys},loadImage:function(){return d.loadImage},loadNext:function(){return d.loadNext},loadNextStyle:function(){return d.loadNextStyle},markAsAtomic:function(){return d.markAsAtomic},markDeprecated:function(){return d.markDeprecated},markOwner:function(){return d.markOwner},memorizeExec:function(){return d.memorizeExec},nl2br:function(){return a.nl2br},normalizeColor:function(){return l.normalizeColor},normalizeCssNumericValue:function(){return l.normalizeCssNumericValue},normalizeCssValue:function(){return l.normalizeCssValue},normalizeKeyAliases:function(){return l.normalizeKeyAliases},normalizeLicense:function(){return l.normalizeLicense},normalizePath:function(){return l.normalizePath},normalizeRelativePath:function(){return l.normalizeRelativePath},normalizeSize:function(){return l.normalizeSize},normalizeUrl:function(){return l.normalizeUrl},offset:function(){return u.offset},options:function(){return d.options},parseQuery:function(){return d.parseQuery},position:function(){return u.position},previewBox:function(){return d.previewBox},refs:function(){return d.refs},reset:function(){return d.reset},resolveElement:function(){return d.resolveElement},safeHTML:function(){return a.safeHTML},sanitizeHTMLElement:function(){return a.sanitizeHTMLElement},scrollIntoViewIfNeeded:function(){return d.scrollIntoViewIfNeeded},set:function(){return d.set},setTimeout:function(){return o.setTimeout},size:function(){return u.size},splitArray:function(){return n.splitArray},sprintf:function(){return c.sprintf},stringify:function(){return c.stringify},stripTags:function(){return a.stripTags},toArray:function(){return n.toArray},trim:function(){return c.trim},trimChars:function(){return c.trimChars},trimInv:function(){return c.trimInv},ucfirst:function(){return c.ucfirst}});var n=i(76855),o=i(91898),r=i(27613),s=i(35278),a=i(75275),l=i(71521),u=i(56175),c=i(59007),d=i(43555)},71521:function(e,t,i){"use strict";i.d(t,{NUMBER_FIELDS_REG:function(){return o.NUMBER_FIELDS_REG},normalizeColor:function(){return n.normalizeColor},normalizeCssNumericValue:function(){return o.normalizeCssNumericValue},normalizeCssValue:function(){return o.normalizeCssValue},normalizeKeyAliases:function(){return r.normalizeKeyAliases},normalizeLicense:function(){return s.normalizeLicense},normalizePath:function(){return a.normalizePath},normalizeRelativePath:function(){return l.normalizeRelativePath},normalizeSize:function(){return u.normalizeSize},normalizeUrl:function(){return c.normalizeUrl}});var n=i(21224),o=i(3760),r=i(49033),s=i(12972),a=i(9992),l=i(70091),u=i(46334),c=i(37406)},21224:function(e,t,i){"use strict";var n=i(35278),o=i(49055);i.d(t,["normalizeColor",0,e=>{let t=["#"],i=(0,n.colorToHex)(e);if(!i)return!1;if(3===(i=(i=(0,o.trim)(i.toUpperCase())).substring(1)).length){for(let e=0;e<3;e+=1)t.push(i[e]),t.push(i[e]);return t.join("")}return i.length>6&&(i=i.slice(0,6)),"#"+i}])},3760:function(e,t,i){"use strict";i.d(t,{normalizeCssNumericValue:function(){return l},normalizeCssValue:function(){return u}});var n=i(29807),o=i(86068),r=i(35278),s=i(12475);let a=/^(left|top|bottom|right|width|min|max|height|margin|padding|fontsize|font-size)/i;function l(e,t){return!(0,o.isVoid)(t)&&a.test(e)&&(0,n.isNumeric)(t.toString())?parseInt(t.toString(),10)+"px":t}function u(e,t){if("font-weight"===(0,s.kebabCase)(e)){switch(t.toString().toLowerCase()){case"700":case"bold":return 700;case"400":case"normal":return 400;case"900":case"heavy":return 900}return(0,n.isNumeric)(t)?Number(t):t}return/color/i.test(e)&&/^rgb/i.test(t.toString())&&(0,r.colorToHex)(t.toString())||t}i.d(t,["NUMBER_FIELDS_REG",0,a])},49033:function(e,t,i){"use strict";i.d(t,{normalizeKeyAliases:function(){return r}});var n=i(82758),o=i(49055);function r(e){let t={},i={meta:1,ctrl:2,control:2,alt:3,shift:4,space:5};return e.replace(/\+\+/g,"+add").split(/[\s]*\+[\s]*/).map(e=>(0,o.trim)(e.toLowerCase())).map(e=>n.KEY_ALIASES[e]||e).sort((e,t)=>i[e]&&!i[t]?-1:!i[e]&&i[t]?1:i[e]&&i[t]?i[e]-i[t]:e>t?1:-1).filter(e=>!t[e]&&""!==e&&(t[e]=!0)).join("+")}},12972:function(e,t,i){"use strict";i.d(t,["normalizeLicense",0,(e,t=8)=>{let i=[];for(;e.length;)i.push(e.substr(0,t)),e=e.substr(t);return i[1]=i[1].replace(/./g,"*"),i[2]=i[2].replace(/./g,"*"),i.join("-")}])},9992:function(e,t,i){"use strict";var n=i(49055);i.d(t,["normalizePath",0,(...e)=>e.filter(e=>(0,n.trim)(e).length).map((t,i)=>(t=t.replace(/([^:])[\\/]+/g,"$1/"),i&&(t=t.replace(/^\//,"")),i!==e.length-1&&(t=t.replace(/\/$/,"")),t)).join("/")])},70091:function(e,t,i){"use strict";i.d(t,["normalizeRelativePath",0,e=>e.split("/").reduce((e,t)=>{switch(t){case"":case".":break;case"..":e.pop();break;default:e.push(t)}return e},[]).join("/")+(e.endsWith("/")?"/":"")])},46334:function(e,t,i){"use strict";i.d(t,["normalizeSize",0,(e,t)=>/^[0-9]+$/.test(e.toString())?e+t:e.toString()])},37406:function(e,t,i){"use strict";i.d(t,["normalizeUrl",0,(...e)=>e.filter(e=>e.length).map(e=>e.replace(/\/$/,"")).join("/").replace(/([^:])[\\/]+/g,"$1/")])},44506:function(e,t,i){"use strict";i.d(t,["getContentWidth",0,(e,t)=>{let i=t.getComputedStyle(e);return e.offsetWidth-parseInt(i.getPropertyValue("padding-left")||"0",10)-parseInt(i.getPropertyValue("padding-right")||"0",10)}])},35224:function(e,t,i){"use strict";function n(e){var t,i;let n=null==(t=e.ownerDocument)?void 0:t.defaultView,o=e.parentElement;for(;n&&o;){if(""!==(i=n.getComputedStyle(o)).transform&&"none"!==i.transform||""!==i.perspective&&"none"!==i.perspective||""!==i.filter&&"none"!==i.filter||"transform"===i.willChange||"perspective"===i.willChange||"filter"===i.willChange||"paint"===i.contain||"layout"===i.contain||"strict"===i.contain||"content"===i.contain){let e=o.getBoundingClientRect();return{x:e.left,y:e.top}}o=o.parentElement}return{x:0,y:0}}i.d(t,{getFixedPositionOffset:function(){return n}})},16442:function(e,t,i){"use strict";i.d(t,{getScrollParent:function(){return function e(t){if(!t)return null;let i=o.Dom.isHTMLElement(t),s=i&&(0,r.css)(t,"overflowY");return i&&"visible"!==s&&"hidden"!==s&&t.scrollHeight>=t.clientHeight?t:e(t.parentNode)||n.globalDocument.scrollingElement||n.globalDocument.body}}});var n=i(82758),o=i(2748),r=i(43555)},56175:function(e,t,i){"use strict";i.d(t,{getContentWidth:function(){return n.getContentWidth},getFixedPositionOffset:function(){return o.getFixedPositionOffset},getScrollParent:function(){return r.getScrollParent},innerWidth:function(){return s.innerWidth},offset:function(){return l.offset},position:function(){return u.position},size:function(){return a.size}});var n=i(44506),o=i(35224),r=i(16442),s=i(81630),a=i(21496),l=i(81284),u=i(5700)},81630:function(e,t,i){"use strict";i.d(t,["innerWidth",0,(e,t)=>{let i=t.getComputedStyle(e);return e.clientWidth-(parseFloat(i.paddingLeft||"0")+parseFloat(i.paddingRight||"0"))}])},21496:function(e,t,i){"use strict";i.d(t,{size:function(){return o}});var n=i(27613);function o(e){return(0,n.isString)(e)||(0,n.isArray)(e)?e.length:(0,n.isPlainObject)(e)?Object.keys(e).length:0}},81284:function(e,t,i){"use strict";let n=(e,t,i,o=!1)=>{let r,s,a;try{r=e.getBoundingClientRect()}catch(e){r={top:0,bottom:0,left:0,right:0,width:0,height:0}}let l=i.body,u=i.documentElement||{clientTop:0,clientLeft:0,scrollTop:0,scrollLeft:0},c=i.defaultView||i.parentWindow,d=c.pageYOffset||u.scrollTop||l.scrollTop,h=c.pageXOffset||u.scrollLeft||l.scrollLeft,p=u.clientTop||l.clientTop||0,f=u.clientLeft||l.clientLeft||0,m=t.iframe;if(!o&&t&&t.options&&t.o.iframe&&m){let{top:e,left:i}=n(m,t,t.od,!0);s=r.top+e,a=r.left+i}else s=r.top+d-p,a=r.left+h-f;return{top:Math.round(s),left:Math.round(a),width:r.width,height:r.height}};i.d(t,["offset",0,n])},5700:function(e,t,i){"use strict";i.d(t,{position:function(){return function e(t,i,o=!1){var r,s;let a=t.getBoundingClientRect(),l=a.left,u=a.top;if((0,n.isJoditObject)(i)&&i.iframe&&i.ed.body.contains(t)&&!o){let{left:t,top:n}=e(i.iframe,i,!0);l+=t,u+=n}return{left:Math.round(l),top:Math.round(u),width:Math.round(null!=(r=t.offsetWidth)?r:a.width),height:Math.round(null!=(s=t.offsetHeight)?s:a.height)}}}});var n=i(19306)},87058:function(e,t,i){"use strict";i.d(t,["camelCase",0,e=>e.replace(/([-_])(.)/g,(e,t,i)=>i.toUpperCase())])},67477:function(e,t,i){"use strict";i.d(t,{fuzzySearchIndex:function(){return o}});var n=i(82758);function o(e,t,i=0,r=1){let s=0,a,l=-1,u=0,c=0;for(a=i;s<e.length&&a<t.length;)e[s].toLowerCase()===t[a].toLowerCase()?(s++,u++,c=0,-1===l&&(l=a)):s>0&&(c>=r&&t[a]!==n.INVISIBLE_SPACE?(s=0,l=-1,u=0,c=0,a--):(c++,u++)),a++;return s===e.length?[l,u]:[-1,0]}},56967:function(e,t,i){"use strict";i.d(t,{i18n:function(){return u}});var n=i(82758),o=i(70799),r=i(36409),s=i(43555),a=i(6441);let l=(e,t)=>{if(!t||!t.length)return e;let i=/%([sd])/g,n=i.exec(e),o=e,r=0;for(;n&&void 0!==t[r];)o=o.replace(n[0],t[r].toString()),r+=1,n=i.exec(e);return o};function u(e,t,i){if(!(0,o.isString)(e))throw(0,s.error)("i18n: Need string in first argument");if(!e.length)return e;let u=!!(null==i?void 0:i.debugLanguage),c={},d=e=>t&&t.length?l(e,t):e,h=(0,s.defaultLanguage)(a.Config.defaultOptions.language,a.Config.defaultOptions.language),p=(0,s.defaultLanguage)(null==i?void 0:i.language,h),f=t=>{if(!t)return;if((0,o.isString)(t[e]))return d(t[e]);let i=e.toLowerCase();if((0,o.isString)(t[i]))return d(t[i]);let n=(0,r.ucfirst)(e);if((0,o.isString)(t[n]))return d(t[n])};void 0!==n.lang[p]?c=n.lang[p]:u||(c=void 0!==n.lang[h]?n.lang[h]:n.lang.en);let m=null==i?void 0:i.i18n;if(m&&m[p]){let e=f(m[p]);if(e)return e}return f(c)||(!u&&n.lang.en&&(0,o.isString)(n.lang.en[e])&&n.lang.en[e]?d(n.lang.en[e]):u?"{"+e+"}":(n.IS_PROD,d(e)))}i.d(t,["sprintf",0,l])},59007:function(e,t,i){"use strict";i.d(t,{CamelCaseToKebabCase:function(){return s.CamelCaseToKebabCase},camelCase:function(){return n.camelCase},fuzzySearchIndex:function(){return o.fuzzySearchIndex},i18n:function(){return r.i18n},kebabCase:function(){return s.kebabCase},sprintf:function(){return r.sprintf},stringify:function(){return a.stringify},trim:function(){return l.trim},trimChars:function(){return l.trimChars},trimInv:function(){return l.trimInv},ucfirst:function(){return u.ucfirst}});var n=i(87058),o=i(67477),r=i(56967),s=i(12475),a=i(67462),l=i(49055),u=i(36409)},12475:function(e,t,i){"use strict";i.d(t,["CamelCaseToKebabCase",0,e=>e.replace(/([A-Z])([A-Z])([a-z])/g,"$1-$2$3").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),"kebabCase",0,e=>e.replace(/([A-Z])([A-Z])([a-z])/g,"$1-$2$3").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()])},67462:function(e,t,i){"use strict";function n(e,t={}){if("object"!=typeof e)return String(e);let i=new Set(t.excludeKeys),o=new WeakMap;return JSON.stringify(e,(e,t)=>{if(!i.has(e)){if("object"==typeof t&&null!=t){if(o.get(t))return"[refObject]";o.set(t,!0)}return t}},t.prettify)}i.d(t,{stringify:function(){return n}})},49055:function(e,t,i){"use strict";i.d(t,{trim:function(){return o},trimChars:function(){return r},trimInv:function(){return s}});var n=i(82758);function o(e){return e.replace((0,n.SPACE_REG_EXP_END)(),"").replace((0,n.SPACE_REG_EXP_START)(),"")}function r(e,t){return e.replace(RegExp(`[${t}]+$`),"").replace(RegExp(`^[${t}]+`),"")}function s(e){return e.replace((0,n.INVISIBLE_SPACE_REG_EXP_END)(),"").replace((0,n.INVISIBLE_SPACE_REG_EXP_START)(),"")}},36409:function(e,t,i){"use strict";function n(e){return e.length?e[0].toUpperCase()+e.substring(1):""}i.d(t,{ucfirst:function(){return n}})},25726:function(e,t,i){"use strict";i.d(t,{alignElement:function(){return u},clearAlign:function(){return a},hAlignElement:function(){return s}});var n=i(22732),o=i(29960),r=i(41180);function s(e,t){t&&"normal"!==t?"center"!==t?((0,r.css)(e,"float",t),(0,r.clearCenterAlign)(e)):(0,r.css)(e,{float:"",display:"block",marginLeft:"auto",marginRight:"auto"}):((0,r.css)(e,"float")&&-1!==["right","left"].indexOf((0,r.css)(e,"float").toString().toLowerCase())&&(0,r.css)(e,"float",""),(0,r.clearCenterAlign)(e))}function a(e){n.Dom.each(e,e=>{n.Dom.isHTMLElement(e)&&(0,r.cssInline)(e,"textAlign")&&((0,r.css)(e,"textAlign",""),((0,o.attr)(e,"style")||"").trim().length||(0,o.attr)(e,"style",null))})}let l=new Map([["justifyfull","justify"],["justifyright","right"],["justifyleft","left"],["justifycenter","center"]]);function u(e,t){if(n.Dom.isNode(t)&&n.Dom.isElement(t)){a(t);let i=l.get(e.toLowerCase());i&&(0,r.css)(t,"textAlign",i)}}},63799:function(e,t,i){"use strict";i.d(t,{loadNext:function(){return function e(t,i,n=0){return(0,o.isString)(i[n])?u(t,i[n]).then(()=>e(t,i,n+1)):Promise.resolve()}},loadNextStyle:function(){return function e(t,i,n=0){return(0,o.isString)(i[n])?c(t,i[n]).then(()=>e(t,i,n+1)):Promise.resolve()}}});var n=i(2748),o=i(70799),r=i(29960),s=i(66292);let a=new Map,l=e=>(t,i)=>{if(a.has(i))return a.get(i);let n=e(t,i);return a.set(i,n),n},u=l((e,t)=>e.async.promise((i,o)=>{if(e.isInDestruct)return o();let a=e.c.element("script",{type:"text/javascript",crossorigin:"anonymous",referrerpolicy:"no-referrer",async:!0,src:(0,s.completeUrl)(t)});e.o.nonce&&(0,r.attr)(a,"nonce",e.o.nonce),e.e.one(a,"error",o).one(a,"load",i),n.Dom.append(e.od.body,a)})),c=l((e,t)=>e.async.promise((i,o)=>{if(e.isInDestruct)return o();let a=e.c.element("link",{rel:"stylesheet",media:"all",crossorigin:"anonymous"});e.o.nonce&&(0,r.attr)(a,"nonce",e.o.nonce),e.isInDestruct||e.e.on(a,"load",()=>i(a)).on(a,"error",o),(0,r.attr)(a,"href",(0,s.completeUrl)(t)),e.o.shadowRoot?n.Dom.append(e.o.shadowRoot,a):n.Dom.append(e.od.body,a)}));i.d(t,["alreadyLoadedList",0,a,"appendScriptAsync",0,u,"appendStyleAsync",0,c])},38837:function(e,t,i){"use strict";i.d(t,{assert:function(){return o}});class n extends Error{constructor(e){super(e),this.name="AssertionError"}}function o(e,t){if(!e)throw new n(`Assertion failed: ${t}`)}},29960:function(e,t,i){"use strict";i.d(t,{attr:function(){return function e(t,i,l){if(!t||!(0,n.isFunction)(t.getAttribute))return null;if(!(0,r.isString)(i))return Object.keys(i).forEach(n=>{let r=i[n];(0,o.isPlainObject)(r)&&"style"===n?(0,a.css)(t,r):("className"===n&&(n="class"),e(t,n,r))}),null;let u=(0,s.CamelCaseToKebabCase)(i);if(/^-/.test(u)){let i=e(t,`data${u}`);if(i)return i;u=u.substr(1)}if(void 0!==l)if(null==l)t.hasAttribute(u)&&t.removeAttribute(u);else{let e=l.toString();return"IMG"===t.nodeName&&("width"===u||"height"===u)&&(e=e.replace("px","")),t.setAttribute(u,e),e}return t.getAttribute(u)}},attrRaw:function(){return l}});var n=i(23282),o=i(72430),r=i(70799),s=i(12475),a=i(41180);function l(e,t,i){if(void 0===i)return e.getAttribute(t);if(null==i){e.hasAttribute(t)&&e.removeAttribute(t);return}e.setAttribute(t,i)}},97639:function(e,t,i){"use strict";i.d(t,["browser",0,e=>{let t=navigator.userAgent.toLowerCase(),i=/(firefox)[\s/]([\w.]+)/.exec(t)||/(chrome)[\s/]([\w.]+)/.exec(t)||/(webkit)[\s/]([\w.]+)/.exec(t)||/(opera)(?:.*version)[\s/]([\w.]+)/.exec(t)||/(msie)[\s]([\w.]+)/.exec(t)||/(trident)\/([\w.]+)/.exec(t)||0>t.indexOf("compatible")||[];return"version"===e?i[2]:"webkit"===e?"chrome"===i[1]||"webkit"===i[1]:"ff"===e?"firefox"===i[1]:"msie"===e?"trident"===i[1]||"msie"===i[1]:i[1]===e}])},44710:function(e,t,i){"use strict";var n=i(72430);let o=(e,t)=>{let i=[],r=encodeURIComponent;for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s)){let a=t?t+"["+s+"]":s,l=e[s];i.push((0,n.isPlainObject)(l)?o(l,a):r(a)+"="+r(l))}return i.join("&")};i.d(t,["buildQuery",0,o])},66292:function(e,t,i){"use strict";var n=i(82758);i.d(t,["completeUrl",0,e=>("file:"===n.globalWindow.location.protocol&&/^\/\//.test(e)&&(e="https:"+e),e)])},68934:function(e,t,i){"use strict";i.d(t,{ConfigDeepFlatten:function(){return function e(t){return(0,c.keys)(t,!1).reduce((i,n)=>(i[n]=(0,o.isPlainObject)(t[n])?e(t[n]):t[n],i),{})}},ConfigFlatten:function(){return d},ConfigMerge:function(){return function e(t,i){Object.keys(i).forEach(n=>{if((0,u.isUnsafeProtoKey)(n))return;let r=i[n],s=t[n];(0,o.isPlainObject)(r)&&(0,o.isPlainObject)(s)&&!(0,l.isAtom)(r)?e(s,r):t[n]=r})}},ConfigProto:function(){return function e(t,i,c=0){if(Object.getPrototypeOf(t)!==Object.prototype)return t;let d=a.Config.defaultOptions;if((0,r.isString)(t.preset)){if(void 0!==d.presets[t.preset]){let e=d.presets[t.preset];Object.keys(e).forEach(i=>{(0,s.isVoid)(t[i])&&(t[i]=e[i])})}delete t.preset}let h={};return Object.keys(t).forEach(r=>{if((0,u.isUnsafeProtoKey)(r))return;let s=t[r],a=i?i[r]:null;if((0,o.isPlainObject)(s)&&(0,o.isPlainObject)(a)&&!(0,l.isAtom)(s)){h[r]=e(s,a,c+1);return}if(0!==c&&(0,n.isArray)(s)&&!(0,l.isAtom)(s)&&(0,n.isArray)(a)){h[r]=[...s,...a.slice(s.length)];return}h[r]=s}),Object.setPrototypeOf(h,i),h}}});var n=i(68345),o=i(72430),r=i(70799),s=i(86068),a=i(6441),l=i(97735),u=i(69175),c=i(37790);function d(e){return(0,c.keys)(e,!1).reduce((t,i)=>(t[i]=e[i],t),{})}},55877:function(e,t,i){"use strict";var n=i(82758),o=i(26049),r=i(82501);i.d(t,["convertMediaUrlToVideoEmbed",0,(e,{width:t=400,height:i=345}={})=>{if(!(0,o.isURL)(e))return e;let s=n.globalDocument.createElement("a");s.href=e,t||(t=400),i||(i=345);let a=s.protocol||"";switch(s.hostname){case"www.vimeo.com":case"vimeo.com":{let n=s.pathname.split("/").filter(Boolean),o=n.findIndex(e=>/^\d+$/.test(e));if(-1===o)return e;let r=n[o],l=n[o+1];return l&&0===o&&(r+="/"+l),'<iframe width="'+t+'" height="'+i+'" src="'+a+"//player.vimeo.com/video/"+r+'" frameborder="0" allowfullscreen></iframe>'}case"youtube.com":case"www.youtube.com":case"m.youtube.com":case"music.youtube.com":case"youtu.be":case"www.youtu.be":{let n=(s.search?(0,r.parseQuery)(s.search):{}).v||s.pathname.substring(1);return(n=n.replace(/^(watch|embed|shorts|live|v)\//,"").replace(/\/$/,""))?'<iframe width="'+t+'" height="'+i+'" src="'+a+"//www.youtube.com/embed/"+n+'" frameborder="0" allowfullscreen></iframe>':e}}return e}])},41180:function(e,t,i){"use strict";i.d(t,{css:function(){return l},cssInline:function(){return u}});var n=i(87612),o=i(72430),r=i(3760),s=i(87058),a=i(12475);function l(e,t,i,u=!1){if((0,n.isBoolean)(i)&&(u=i,i=void 0),(0,o.isPlainObject)(t)||void 0!==i){let n=(e,t,i)=>{void 0!==(i=(0,r.normalizeCssNumericValue)(t,i))&&(null==i||l(e,t,!0)!==(0,r.normalizeCssValue)(t,i))&&(e.style[t]=i)};if((0,o.isPlainObject)(t)){let i=Object.keys(t);for(let o=0;o<i.length;o+=1)n(e,(0,s.camelCase)(i[o]),t[i[o]])}else n(e,(0,s.camelCase)(t),i);return""}let c=(0,a.kebabCase)(t),d=e.ownerDocument||document,h=!!d&&(d.defaultView||d.parentWindow),p=e.style[t],f="";return void 0!==p&&""!==p?f=p:h&&!u&&(f=h.getComputedStyle(e).getPropertyValue(c)),r.NUMBER_FIELDS_REG.test(t)&&/^[-+]?[0-9.]+px$/.test(f.toString())&&(f=parseInt(f.toString(),10)),(0,r.normalizeCssValue)(t,f)}function u(e,t){return e.style.getPropertyValue((0,a.kebabCase)(t))}i.d(t,["clearCenterAlign",0,e=>{"block"===l(e,"display")&&l(e,"display","");let{style:t}=e;"auto"===t.marginLeft&&"auto"===t.marginRight&&(t.marginLeft="",t.marginRight="")}])},15456:function(e,t,i){"use strict";i.d(t,["ctrlKey",0,e=>{if("u">typeof navigator&&-1!==navigator.userAgent.indexOf("Mac OS X")){if(e.metaKey&&!e.altKey)return!0}else if(e.ctrlKey&&!e.altKey)return!0;return!1}])},86583:function(e,t,i){"use strict";var n=i(39955);let o=new WeakMap;i.d(t,["dataBind",0,(e,t,i)=>{let r=o.get(e);if(!r){r={},o.set(e,r);let t=null;(0,n.isViewObject)(e.j)&&(t=e.j.e),(0,n.isViewObject)(e)&&(t=e.e),t&&t.on("beforeDestruct",()=>{o.delete(e)})}return void 0===i?r[t]:(r[t]=i,i)}])},96325:function(e,t,i){"use strict";var n=i(82758),o=i(70799);i.d(t,["defaultLanguage",0,(e,t="en")=>"auto"!==e&&(0,o.isString)(e)?e:n.globalDocument.documentElement&&n.globalDocument.documentElement.lang?n.globalDocument.documentElement.lang:navigator.language?navigator.language.substring(0,2):t])},82760:function(e,t,i){"use strict";i.d(t,{connection:function(){return r},error:function(){return o},options:function(){return s}});var n=i(32880);function o(e){return TypeError(e)}function r(e){return new n.ConnectionError(e)}function s(e){return new n.OptionsError(e)}},93661:function(e,t,i){"use strict";function n(e="Aborted"){return new DOMException(e,"AbortError")}i.d(t,{abort:function(){return n}})},86397:function(e,t,i){"use strict";i.d(t,{ConnectionError:function(){return n}});class n extends Error{constructor(e){super(e),Object.setPrototypeOf(this,n.prototype)}}},32880:function(e,t,i){"use strict";i.d(t,{ConnectionError:function(){return o.ConnectionError},OptionsError:function(){return r.OptionsError},abort:function(){return n.abort}});var n=i(93661),o=i(86397),r=i(57865)},57865:function(e,t,i){"use strict";i.d(t,{OptionsError:function(){return n}});class n extends TypeError{constructor(e){super(e),Object.setPrototypeOf(this,n.prototype)}}},89890:function(e,t,i){"use strict";i.d(t,{ConnectionError:function(){return o.ConnectionError},OptionsError:function(){return o.OptionsError},abort:function(){return o.abort},connection:function(){return n.connection},error:function(){return n.error},options:function(){return n.options}});var n=i(82760),o=i(32880)},97735:function(e,t,i){"use strict";i.d(t,{fastClone:function(){return s},isAtom:function(){return o},markAsAtomic:function(){return r}});var n=i(67462);function o(e){return e&&e.isAtom}function r(e){return Object.defineProperty(e,"isAtom",{enumerable:!1,value:!0,configurable:!1}),e}function s(e){return JSON.parse((0,n.stringify)(e))}},80568:function(e,t,i){"use strict";var n=i(23282);let o=new Map;i.d(t,["getClassName",0,e=>{var t;if((0,n.isFunction)(e.className))return e.className();let i=(null==(t=e.constructor)?void 0:t.originalConstructor)||e.constructor;if(o.has(i))return o.get(i);if(i.name)return i.name;let r=new RegExp(/^\s*function\s*(\S*)\s*\(/),s=i.toString().match(r);return s?s[1]:""},"keepNames",0,o])},94643:function(e,t,i){"use strict";i.d(t,{get:function(){return r}});var n=i(70799),o=i(86068);function r(e,t){if(!(0,n.isString)(e)||!e.length)return null;let i=e.split("."),r=t;try{for(let e of i){if((0,o.isVoid)(r[e]))return null;r=r[e]}}catch(e){return null}return(0,o.isVoid)(r)?null:r}},38420:function(e,t,i){"use strict";i.d(t,["humanSizeToBytes",0,e=>{if(/^[0-9.]+$/.test(e.toString()))return parseFloat(e);let t=e.substr(-2,2).toUpperCase(),i=["KB","MB","GB","TB"],n=parseFloat(e.substr(0,e.length-2));return -1!==i.indexOf(t)?n*Math.pow(1024,i.indexOf(t)+1):parseInt(e,10)}])},43555:function(e,t,i){"use strict";i.d(t,{$$:function(){return F.$$},ConfigDeepFlatten:function(){return c.ConfigDeepFlatten},ConfigFlatten:function(){return c.ConfigFlatten},ConfigMerge:function(){return c.ConfigMerge},ConfigProto:function(){return c.ConfigProto},ConnectionError:function(){return g.ConnectionError},LimitedStack:function(){return D.LimitedStack},OptionsError:function(){return g.OptionsError},UNSAFE_PROTO_KEYS:function(){return _.UNSAFE_PROTO_KEYS},abort:function(){return g.abort},alignElement:function(){return n.alignElement},alreadyLoadedList:function(){return o.alreadyLoadedList},appendScriptAsync:function(){return o.appendScriptAsync},appendStyleAsync:function(){return o.appendStyleAsync},assert:function(){return r.assert},attr:function(){return s.attr},attrRaw:function(){return s.attrRaw},browser:function(){return a.browser},buildQuery:function(){return l.buildQuery},call:function(){return I.call},callPromise:function(){return I.callPromise},callThis:function(){return I.callThis},clearAlign:function(){return n.clearAlign},clearCenterAlign:function(){return h.clearCenterAlign},cns:function(){return C.cns},completeUrl:function(){return u.completeUrl},connection:function(){return g.connection},convertMediaUrlToVideoEmbed:function(){return d.convertMediaUrlToVideoEmbed},css:function(){return h.css},cssInline:function(){return h.cssInline},cssPath:function(){return F.cssPath},ctrlKey:function(){return p.ctrlKey},dataBind:function(){return f.dataBind},defaultLanguage:function(){return m.defaultLanguage},error:function(){return g.error},fastClone:function(){return b.fastClone},get:function(){return v.get},getClassName:function(){return y.getClassName},getDataTransfer:function(){return I.getDataTransfer},getPropertyDescriptor:function(){return I.getPropertyDescriptor},getXPathByElement:function(){return F.getXPathByElement},hAlignElement:function(){return n.hAlignElement},humanSizeToBytes:function(){return w.humanSizeToBytes},inView:function(){return x.inView},isAtom:function(){return b.isAtom},isUnsafeProtoKey:function(){return _.isUnsafeProtoKey},keepNames:function(){return y.keepNames},keys:function(){return I.keys},loadImage:function(){return I.loadImage},loadNext:function(){return o.loadNext},loadNextStyle:function(){return o.loadNextStyle},markAsAtomic:function(){return b.markAsAtomic},markDeprecated:function(){return C.markDeprecated},markOwner:function(){return I.markOwner},memorizeExec:function(){return I.memorizeExec},options:function(){return g.options},parseQuery:function(){return k.parseQuery},previewBox:function(){return S.previewBox},refs:function(){return F.refs},reset:function(){return E.reset},resolveElement:function(){return F.resolveElement},scrollIntoViewIfNeeded:function(){return x.scrollIntoViewIfNeeded},set:function(){return A.set}});var n=i(25726),o=i(63799),r=i(38837),s=i(29960),a=i(97639),l=i(44710),u=i(66292),c=i(68934),d=i(55877),h=i(41180),p=i(15456),f=i(86583),m=i(96325),g=i(89890),b=i(97735),v=i(94643),y=i(80568),w=i(38420),_=i(69175),C=i(95942),k=i(82501),S=i(11628),E=i(58844),x=i(26395),F=i(76078),A=i(3703),D=i(50535),I=i(37790)},69175:function(e,t,i){"use strict";i.d(t,{isUnsafeProtoKey:function(){return o}});let n=["__proto__","constructor","prototype"];function o(e){return -1!==n.indexOf(e)}i.d(t,["UNSAFE_PROTO_KEYS",0,n])},95942:function(e,t,i){"use strict";i.d(t,{markDeprecated:function(){return o}});let n=console;function o(e,t=[""],i=null){return(...o)=>(n.warn(`Method "${t[0]}" deprecated.`+(t[1]?` Use "${t[1]}" instead`:"")),e.call(i,...o))}i.d(t,["cns",0,n])},82501:function(e,t,i){"use strict";i.d(t,["parseQuery",0,e=>{let t={},i=e.substring(1).split("&");for(let e=0;e<i.length;e+=1){let n=i[e].split("=");t[decodeURIComponent(n[0])]=decodeURIComponent(n[1]||"")}return t}])},11628:function(e,t,i){"use strict";i.d(t,{previewBox:function(){return a}});var n=i(2748),o=i(70799),r=i(29960),s=i(41180);function a(e,t,i="px",l=null){let u=[],c=function(e,t){let i=[],o=[];n.Dom.each(e.editor,e=>{n.Dom.isTag(e,"img")&&o.push(e)});try{o.forEach(o=>{let s=[(0,r.attr)(o,"width"),(0,r.attr)(o,"height"),(0,r.attr)(o,"src")];(0,r.attr)(o,{width:o.offsetWidth+t,height:o.offsetHeight+t});let a=e.createInside.a();n.Dom.append(e.ed.body,a),(0,r.attr)(a,"href",(0,r.attr)(o,"src")||""),(0,r.attr)(o,"src",a.href),n.Dom.safeRemove(a),i.push(()=>{(0,r.attr)(o,{src:s[2],width:s[0]||null,height:s[1]||null})})})}catch(e){throw i.forEach(e=>e()),i.length=0,e}return i}(e,i);try{let a=e.e.fire("beforePreviewBox",t,i);if(null!=a)return a;let c=e.c.div("jodit__preview-box jodit-context");l&&n.Dom.append(l,c),(0,s.css)(c,{position:"relative",padding:16});let d=e.value||`<div style='position: absolute;left:50%;top:50%;transform: translateX(-50%) translateY(-50%);color:#ccc;'>${e.i18n("Empty")}</div>`;if(e.iframe){let t=e.create.element("iframe");(0,s.css)(t,{minWidth:800,minHeight:600,border:0}),n.Dom.append(c,t);let i=t.contentWindow;if(i&&(e.e.fire("generateDocumentStructure.iframe",i.document,e),c=i.document.body,"function"==typeof ResizeObserver)){let n=!1,o=i.document.body,r=new ResizeObserver(e.async.debounce(()=>{r.unobserve(o),(0,s.css)(t,"height",o.offsetHeight+20),e.async.requestAnimationFrame(()=>{n||r.observe(o)})},100)),a=()=>{n=!0,r.unobserve(o),r.disconnect(),e.e.off("beforeDestruct",a)};u.push(a),e.e.on("beforeDestruct",a)}}else(0,s.css)(c,{minWidth:1024,minHeight:600,border:0});let h=(t,i)=>{let s=(0,o.isString)(i)?e.c.div():i;(0,o.isString)(i)&&(s.innerHTML=i);for(let e=0;e<s.childNodes.length;e+=1){let i=s.childNodes[e];if(n.Dom.isElement(i)){let e=t.ownerDocument.createElement(i.nodeName);for(let t=0;t<i.attributes.length;t+=1)(0,r.attr)(e,i.attributes[t].name,i.attributes[t].value);0===i.childNodes.length||n.Dom.isTag(i,"table")?"SCRIPT"===i.nodeName?i.textContent&&(e.textContent=i.textContent):i.innerHTML&&(e.innerHTML=i.innerHTML):h(e,i);try{n.Dom.append(t,e)}catch(e){}}else try{n.Dom.append(t,i.cloneNode(!0))}catch(e){}}};return h(c,d),e.e.fire("afterPreviewBox",c),[c,()=>{u.forEach(e=>e())}]}finally{c.forEach(e=>e())}}},58844:function(e,t,i){"use strict";i.d(t,{reset:function(){return a}});var n=i(82758),o=i(23282),r=i(94643);let s={};function a(e){var t,i;if(!(e in s)){let i=n.globalDocument.createElement("iframe");try{if(i.src="about:blank",n.globalDocument.body.appendChild(i),!i.contentWindow)return null;let t=(0,r.get)(e,i.contentWindow),a=(0,r.get)(e.split(".").slice(0,-1).join("."),i.contentWindow);(0,o.isFunction)(t)&&(s[e]=t.bind(a))}catch(e){if(!n.IS_PROD)throw e}finally{null==(t=i.parentNode)||t.removeChild(i)}}return null!=(i=s[e])?i:null}},26395:function(e,t,i){"use strict";i.d(t,{inView:function(){return o},scrollIntoViewIfNeeded:function(){return r}});var n=i(2748);function o(e,t,i){let n=e.getBoundingClientRect(),o=e,r=n.top,s=n.height;for(;o&&o!==t&&o.parentNode;)if(r+s>(n=(o=o.parentNode).getBoundingClientRect()).bottom+1&&r>n.top||r+s<=n.top)return!1;return(r+s<=(i.documentElement&&i.documentElement.clientHeight||0)+1||r<=0)&&r+s>=0}function r(e,t,i){if(n.Dom.isHTMLElement(e)&&!o(e,t,i)){if(t.clientHeight!==t.scrollHeight){let i=e.offsetTop+e.offsetHeight-t.clientHeight;t.scrollTop=t.scrollTop<i?i:e.offsetTop}o(e,t,i)||e.scrollIntoView({block:"nearest"})}}},76078:function(e,t,i){"use strict";i.d(t,{$$:function(){return d},resolveElement:function(){return p}});var n=i(82758),o=i(2748),r=i(4510),s=i(70799),a=i(87058),l=i(29960),u=i(89890);let c=1;function d(e,t){let i;if(!n.IS_ES_NEXT&&/:scope/.test(e)&&n.IS_IE&&!(t&&t.nodeType===Node.DOCUMENT_NODE)){let n=t.id,o=n||"_selector_id_"+String(Math.random()).slice(2)+ ++c;e=e.replace(/:scope/g,"#"+o),n||t.setAttribute("id",o),i=t.parentNode.querySelectorAll(e),n||t.removeAttribute("id")}else i=t.querySelectorAll(e);return[].slice.call(i)}let h=(e,t)=>{if(!e||e.nodeType!==Node.ELEMENT_NODE||!e.parentNode||t===e)return"";if(e.id)return"//*[@id='"+e.id+"']";let i=[].filter.call(e.parentNode.childNodes,t=>t.nodeName===e.nodeName);return h(e.parentNode,t)+"/"+e.nodeName.toLowerCase()+(i.length>1?"["+((0,r.toArray)(i).indexOf(e)+1)+"]":"")};function p(e,t){let i=e;if((0,s.isString)(e))try{i=t.querySelector(e)}catch(t){throw(0,u.error)('String "'+e+'" should be valid HTML selector')}if(!i||"object"!=typeof i||!o.Dom.isElement(i)||!i.cloneNode)throw(0,u.error)('Element "'+e+'" should be string or HTMLElement instance');return i}i.d(t,["cssPath",0,e=>{if(!o.Dom.isElement(e))return null;let t=[],i=e;for(;i&&i.nodeType===Node.ELEMENT_NODE;){let e=i.nodeName.toLowerCase();if(i.id){e+="#"+i.id,t.unshift(e);break}{let t=i,n=1;do(t=t.previousElementSibling)&&t.nodeName.toLowerCase()===e&&n++;while(t);e+=":nth-of-type("+n+")"}t.unshift(e),i=i.parentNode}return t.join(" > ")},"getXPathByElement",0,h,"refs",0,e=>{"container"in e&&(e=e.container);let t={};return o.Dom.each(e,e=>{if(o.Dom.isElement(e)&&(e.hasAttribute("ref")||e.hasAttribute("data-ref"))){let i=(0,l.attr)(e,"-ref");i&&(0,s.isString)(i)&&(t[(0,a.camelCase)(i)]=e,t[i]=e)}}),t}])},3703:function(e,t,i){"use strict";i.d(t,{set:function(){return l}});var n=i(68345),o=i(29807),r=i(72430),s=i(70799),a=i(69175);function l(e,t,i){if(!(0,s.isString)(e)||!e.length)return;let l=e.split(".");if(l.some(a.isUnsafeProtoKey))return;let u=i;for(let e=0;e<l.length-1;e+=1){let t=l[e];(0,n.isArray)(u[t])||(0,r.isPlainObject)(u[t])||(u[t]=(0,o.isNumeric)(l[e+1])?[]:{}),u=u[t]}u&&(u[l[l.length-1]]=t)}},50535:function(e,t,i){"use strict";i.d(t,{LimitedStack:function(){return n}});class n{push(e){return this.stack.push(e),this.stack.length>this.limit&&this.stack.shift(),this}pop(){return this.stack.pop()}find(e){return this.stack.find(e)}constructor(e){this.limit=e,this.stack=[]}}},37790:function(e,t,i){"use strict";i.d(t,{call:function(){return a},callPromise:function(){return c},callThis:function(){return l},getPropertyDescriptor:function(){return d},markOwner:function(){return u}});var n=i(14773),o=i(86068),r=i(29960),s=i(86583);function a(e,...t){return e(...t)}function l(e,t,...i){return e.apply(t,i)}function u(e,t){(0,r.attr)(t,"data-editor_id",e.id),t.component||Object.defineProperty(t,"jodit",{value:e})}function c(e,t){return(0,n.isPromise)(e)?e.then(e=>e,()=>null).finally(t):null==t?void 0:t()}function d(e,t){let i;do i=Object.getOwnPropertyDescriptor(e,t),e=Object.getPrototypeOf(e);while(!i&&e);return i}i.d(t,["getDataTransfer",0,e=>{if(e.clipboardData)return e.clipboardData;try{return e.dataTransfer||new DataTransfer}catch(e){return null}},"keys",0,(e,t=!0)=>{if(t)return Object.keys(e);let i=[];for(let t in e)i.push(t);return i},"loadImage",0,(e,t)=>t.async.promise((i,n)=>{let o=new Image,r=()=>{t.e.off(o),null==n||n()},s=()=>{t.e.off(o),i(o)};t.e.one(o,"load",s).one(o,"error",r).one(o,"abort",r),o.src=e,o.complete&&s()}),"memorizeExec",0,(e,t,{control:i},n)=>{var r;let a=`button${i.command}`,l=null!=(r=i.args&&i.args[0])?r:(0,s.dataBind)(e,a);if((0,o.isVoid)(l))return!1;(0,s.dataBind)(e,a,l),n&&(l=n(l)),e.execCommand(i.command,!1,null!=l?l:void 0)}])},31359:function(e,t,i){"use strict";i.d(t,{init:function(){return s}});var n=i(82758),o=i(60132),r=i(14041);function s(e,t,i,s,a,l,u){if((0,o.isInitable)(s))try{s.init(e)}catch(e){if(!n.IS_PROD)throw e}a.set(t,s),l.delete(t),s.hasStyle&&(0,r.loadStyle)(e,t).catch(e=>{n.IS_PROD}),s.styles&&(u(e,t,"style").innerHTML=s.styles)}},14041:function(e,t,i){"use strict";i.d(t,{loadExtras:function(){return d},loadStyle:function(){return u}});var n=i(82758),o=i(12475),r=i(63799),s=i(89672);function a(e,t,i,n,o,r,s){try{var a=e[r](s),l=a.value}catch(e){i(e);return}a.done?t(l):Promise.resolve(l).then(n,o)}let l=new Set;function u(e,t){var i;return(i=function*(){let i=c(e,t,!1);if(!l.has(i))return l.add(i),(0,r.appendStyleAsync)(e,i)},function(){var e=this,t=arguments;return new Promise(function(n,o){var r=i.apply(e,t);function s(e){a(r,n,o,s,l,"next",e)}function l(e){a(r,n,o,s,l,"throw",e)}s(void 0)})})()}function c(e,t,i){t=(0,o.kebabCase)(t);let n=e.minified?".min":"";return e.basePath+"plugins/"+t+"/"+t+n+"."+(i?"js":"css")}function d(e,t,i,o){try{let n=i.filter(t=>!e.has((0,s.normalizeName)(t.name)));n.length&&n.map(e=>{let i=e.url||c(t,e.name,!0);return(0,r.appendScriptAsync)(t,i).then(o).catch(()=>null)})}catch(e){if(!n.IS_PROD)throw e}}},48591:function(e,t,i){"use strict";i.d(t,{makeInstance:function(){return r}});var n=i(82758),o=i(23282);function r(e,t){try{try{return(0,o.isFunction)(t)?new t(e):t}catch(i){if((0,o.isFunction)(t)&&!t.prototype)return t(e)}}catch(e){if(!n.IS_PROD)throw e}return null}},89672:function(e,t,i){"use strict";i.d(t,{normalizeName:function(){return o}});var n=i(12475);function o(e){return(0,n.kebabCase)(e).toLowerCase()}},50911:function(e,t,i){"use strict";i.d(t,{Plugin:function(){return n.Plugin}});var n=i(20356);i(41876)},41876:function(e,t,i){"use strict";i.d(t,{PluginSystem:function(){return p}});var n=i(82758),o=i(57012),r=i(46559),s=i(68345),a=i(60132),l=i(70799),u=i(31359),c=i(14041),d=i(48591),h=i(89672);class p{get size(){return this.__items.size}add(e,t){this.__items.set((0,h.normalizeName)(e),t),o.eventEmitter.fire(`plugin:${e}:ready`)}get(e){return this.__items.get((0,h.normalizeName)(e))}remove(e){this.__items.delete((0,h.normalizeName)(e))}__getFullPluginsList(e){let t=[];return this.__items.forEach((i,n)=>{(!e||e.has(n))&&t.push([n,i])}),t}__init(e){let{extraList:t,disableList:i,filter:o}={extraList:e.o.extraPlugins.map(e=>(0,l.isString)(e)?{name:e}:e),disableList:new Set((0,r.splitArray)(e.o.disablePlugins).map(h.normalizeName)),filter:e.o.safeMode?new Set(e.o.safePluginsList):null},p=new Map,f={},m=new Set;e.__plugins=f;let g=()=>{if(e.isInDestruct)return;let t=!1;this.__getFullPluginsList(o).forEach(([n,o])=>{if(i.has(n)||p.has(n))return;let r=null==o?void 0:o.requires;if(r&&(0,s.isArray)(r)&&r.length){if(r.some(e=>i.has(e)))return;if(!r.every(e=>p.has(e)))return void m.add(n)}t=!0;let a=(0,d.makeInstance)(e,o);if(!a){p.set(n,null),m.delete(n);return}(0,u.init)(e,n,o,a,p,m,this.opts.getContainer),f[n]=a}),t&&(e.e.fire("updatePlugins"),g())};t&&t.length&&(0,c.loadExtras)(this.__items,e,t,g),g(),e.e.on("beforeDestruct",()=>{Object.keys(f).forEach(t=>{let i=f[t];(0,a.isDestructable)(i)&&i.destruct(e),delete f[t]}),delete e.__plugins}),n.IS_PROD||m.size}wait(e){return new Promise(t=>{if(this.get(e))return t();let i=()=>{t(),o.eventEmitter.off(`plugin:${e}:ready`,i)};o.eventEmitter.on(`plugin:${e}:ready`,i)})}constructor(e){this.opts=e,this.__items=new Map}}},20356:function(e,t,i){"use strict";i.d(t,{Plugin:function(){return a}});var n=i(91907),o=i(65478),r=i(19306),s=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class a extends n.ViewComponent{className(){return"Plugin"}__afterPluginSystemInit(){let{j:e,buttons:t}=this;t&&(0,r.isJoditObject)(e)&&t.forEach(t=>{e.registerButton(t)})}__afterInit(){this.__inited=!0,this.setStatus(n.STATUSES.ready),this.afterInit(this.jodit)}init(e){this.jodit.isReady&&(this.afterInit(this.jodit),this.__afterPluginSystemInit(),this.jodit.e.fire("rebuildToolbar"))}__beforeDestruct(){var e;if(this.isInDestruct)return;let{j:t}=this;if(t.e.off("afterPluginSystemInit",this.__afterPluginSystemInit).off("afterInit",this.__afterInit).off("beforeDestruct",this.destruct),this.setStatus(n.STATUSES.beforeDestruct),!this.__inited)return super.destruct();(0,r.isJoditObject)(t)&&(null==(e=this.buttons)||e.forEach(e=>{null==t||t.unregisterButton(e)})),this.beforeDestruct(this.j),super.destruct()}constructor(e){super(e),this.buttons=[],this.hasStyle=!1,this.__inited=!1,e.e.on("afterPluginSystemInit",this.__afterPluginSystemInit).on("afterInit",this.__afterInit).on("beforeDestruct",this.__beforeDestruct)}}a.requires=[],s([o.autobind],a.prototype,"__afterPluginSystemInit",null),s([o.autobind],a.prototype,"__afterInit",null),s([o.autobind],a.prototype,"__beforeDestruct",null)},54079:function(e,t,i){"use strict";i.d(t,{Ajax:function(){return p}});var n=i(8884),o=i(82758),r=i(45219),s=i(21537),a=i(89890),l=i(6441);i(57459);var u=i(98582);function c(e){var t,i;function n(t,i){try{var r=e[t](i),s=r.value,a=s instanceof h;Promise.resolve(a?s.v:s).then(function(i){if(a){var l="return"===t?"return":"next";if(!s.k||i.done)return n(l,i);i=e[l](i).value}o(r.done?"return":"normal",i)},function(e){n("throw",e)})}catch(e){o("throw",e)}}function o(e,o){switch(e){case"return":t.resolve({value:o,done:!0});break;case"throw":t.reject(o);break;default:t.resolve({value:o,done:!1})}(t=t.next)?n(t.key,t.arg):i=null}this._invoke=function(e,o){return new Promise(function(r,s){var a={key:e,arg:o,resolve:r,reject:s,next:null};i?i=i.next=a:(t=i=a,n(e,o))})},"function"!=typeof e.return&&(this.return=void 0)}function d(e,t,i,n,o,r,s){try{var a=e[r](s),l=a.value}catch(e){i(e);return}a.done?t(l):Promise.resolve(l).then(n,o)}function h(e,t){this.v=e,this.k=t}c.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},c.prototype.next=function(e){return this._invoke("next",e)},c.prototype.throw=function(e){return this._invoke("throw",e)},c.prototype.return=function(e){return this._invoke("return",e)};class p{className(){return"Ajax"}__buildParams(e,t){return(0,s.isPlainObject)(e)&&this.options.contentType&&this.options.contentType.includes("application/json")?JSON.stringify(e):(0,s.isFunction)(this.o.queryBuild)?this.o.queryBuild.call(this,e,t):(0,s.isString)(e)||e instanceof o.globalWindow.FormData||"object"==typeof e&&null!=e&&(0,s.isFunction)(e.append)?e:(0,s.buildQuery)(e)}get o(){return this.options}abort(){if(this.__isFulfilled)return this;try{this.__isFulfilled=!0,this.xhr.abort()}catch(e){}return this}send(){this.__activated=!0;let{xhr:e,o:t}=this,i=this.prepareRequest();return this.__async.promise((n,o)=>{var r;return(r=function*(){var r;let l=()=>{this.__isFulfilled=!0,o(a.connection("Connection error"))},c=()=>{this.__isFulfilled=!0,n(new u.Response(i,e.status,e.statusText,!e.responseType?e.responseText:e.response))};e.onload=c,e.onabort=()=>{this.__isFulfilled=!0,o(a.abort("Abort connection"))},e.onerror=l,e.ontimeout=l,t.responseType&&(e.responseType=t.responseType),e.onprogress=e=>{var t,i;let n=0;e.lengthComputable&&(n=e.loaded/e.total*100),null==(i=(t=this.options).onProgress)||i.call(t,n)},e.onreadystatechange=()=>{var i,n;null==(n=(i=this.options).onProgress)||n.call(i,10),e.readyState===XMLHttpRequest.DONE&&(t.successStatuses.includes(e.status)?c():e.statusText&&(this.__isFulfilled=!0,o(a.connection(e.statusText))))},e.withCredentials=null!=(r=t.withCredentials)&&r;let{url:d,data:h,method:p}=i;e.open(p,d,!0),t.contentType&&e.setRequestHeader&&e.setRequestHeader("Content-type",t.contentType);let{headers:f}=t;(0,s.isFunction)(f)&&(f=yield f.call(this)),f&&e.setRequestHeader&&Object.keys(f).forEach(t=>{e.setRequestHeader(t,f[t])}),this.__async.setTimeout(()=>{e.send(h?this.__buildParams(h):void 0)},0)},function(){var e=this,t=arguments;return new Promise(function(i,n){var o=r.apply(e,t);function s(e){d(o,i,n,s,a,"next",e)}function a(e){d(o,i,n,s,a,"throw",e)}s(void 0)})}).call(this)})}stream(){var e;return(e=function*(){var e,t;this.__activated=!0;let{xhr:i,o:n}=this,o=this.prepareRequest(),r=0,l="",u=[],c=null,d=!1,p=null,f=()=>{if(c){let e=c;c=null,e()}},m=e=>{var t;let n=i.responseText;l+=n.substring(r),r=n.length;let o=l.split("\n\n");for(let i of(l=e?"":null!=(t=o.pop())?t:"",o)){let e=i.trim();if(!e)continue;let t=[];for(let i of e.split("\n"))i.startsWith("data: ")?t.push(i.slice(6)):i.startsWith("data:")&&t.push(i.slice(5));t.length&&u.push(t.join("\n"))}f()};i.onprogress=()=>m(!1),i.onload=()=>{m(!0),d=!0,this.__isFulfilled=!0,f()},i.onerror=()=>{p=a.connection("Connection error"),d=!0,this.__isFulfilled=!0,f()},i.onabort=()=>{p=a.abort("Abort connection"),d=!0,this.__isFulfilled=!0,f()},i.withCredentials=null!=(e=n.withCredentials)&&e;let{url:g,data:b,method:v}=o;i.open(v,g,!0),n.contentType&&i.setRequestHeader&&i.setRequestHeader("Content-type",n.contentType);let{headers:y}=n;(0,s.isFunction)(y)&&(y=yield new h(y.call(this),0)),y&&i.setRequestHeader&&Object.keys(y).forEach(e=>{i.setRequestHeader(e,y[e])}),i.send(b?this.__buildParams(b):void 0);try{for(;;)if(u.length>0)yield u.shift();else if(d)break;else yield(t=new Promise(e=>{c=e}),new h(t,0))}finally{this.__isFulfilled||this.abort()}if(p)throw p},function(){return new c(e.apply(this,arguments))}).call(this)}prepareRequest(){if(!this.o.url)throw a.error("Need URL for AJAX request");let e=this.o.url,t=this.o.data,i=(this.o.method||"get").toLowerCase();if("get"===i&&t&&(0,s.isPlainObject)(t)){let i=e.indexOf("?");if(-1!==i){let n=(0,s.parseQuery)(e.substring(i));e=e.substring(0,i)+"?"+(0,s.buildQuery)(function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{},n=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(i).filter(function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable}))),n.forEach(function(t){var n;n=i[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({},n,t))}else e+="?"+(0,s.buildQuery)(this.o.data)}let n={url:e,method:i,data:t};return p.log.splice(100),p.log.push(n),n}destruct(){this.__isDestructed||(this.__isDestructed=!0,this.__activated&&!this.__isFulfilled&&(this.abort(),this.__isFulfilled=!0),this.__async.destruct())}constructor(e,t=l.Config.prototype.defaultAjaxOptions){this.__async=new n.Async,this.__isFulfilled=!1,this.__activated=!1,this.__isDestructed=!1,this.options=(0,s.ConfigProto)(e||{},t),this.xhr=this.o.xhr?this.o.xhr():new XMLHttpRequest}}p.log=[],function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);r>3&&s&&Object.defineProperty(t,i,s)}([r.autobind],p.prototype,"destruct",null)},57459:function(e,t,i){"use strict";i(6441).Config.prototype.defaultAjaxOptions={successStatuses:[200,201,202],method:"GET",url:"",data:null,contentType:"application/x-www-form-urlencoded; charset=UTF-8",headers:{"X-REQUESTED-WITH":"XMLHttpRequest"},withCredentials:!1,xhr(){return new XMLHttpRequest}}},41601:function(e,t,i){"use strict";i.d(t,{Ajax:function(){return n.Ajax},Response:function(){return o.Response}});var n=i(54079),o=i(98582)},98582:function(e,t,i){"use strict";function n(e,t,i,n,o,r,s){try{var a=e[r](s),l=a.value}catch(e){i(e);return}a.done?t(l):Promise.resolve(l).then(n,o)}function o(e){return function(){var t=this,i=arguments;return new Promise(function(o,r){var s=e.apply(t,i);function a(e){n(s,o,r,a,l,"next",e)}function l(e){n(s,o,r,a,l,"throw",e)}a(void 0)})}}i.d(t,{Response:function(){return r}});class r{get url(){return this.request.url}json(){return o(function*(){return JSON.parse(this.body)}).call(this)}text(){return Promise.resolve(this.body)}blob(){return o(function*(){return this.body}).call(this)}constructor(e,t,i,n){this.request=e,this.status=t,this.statusText=i,this.body=n}}},45124:function(e,t,i){"use strict";i.d(t,{cursorInTheEdgeOfString:function(){return s},findCorrectCurrentNode:function(){return a},moveNodeInsideStart:function(){return r.moveNodeInsideStart}});var n=i(82758),o=i(2748),r=i(26716);function s(e,t,i,o){var r;let s=(null==(r=e.nodeValue)?void 0:r.length)?e.nodeValue:"";if(o&&s.replace((0,n.INVISIBLE_SPACE_REG_EXP_END)(),"").length>t)return!0;let a=(0,n.INVISIBLE_SPACE_REG_EXP_START)().exec(s);return i&&(a&&a[0].length<t||!a&&t>0)}function a(e,t,i,n,r,s){if((e=t.startContainer.childNodes[t.startOffset])||(e=t.startContainer.childNodes[t.startOffset-1],i=!0),e&&n&&!o.Dom.isText(e)){if(!i&&o.Dom.isText(e.previousSibling))e=e.previousSibling;else if(r){let t=e=>i?e.lastChild:s(e),n=t(e);for(;n;){if(n&&o.Dom.isText(n)){e=n;break}n=t(n)}}}if(e&&!n&&!o.Dom.isText(e)){let t=e,i=e;do t=t.firstChild,i=i.lastChild;while(t&&i&&!o.Dom.isText(t));t===i&&t&&o.Dom.isText(t)&&(e=t)}return{node:e,rightMode:i}}i(43463)},26716:function(e,t,i){"use strict";i.d(t,{moveNodeInsideStart:function(){return r}});var n=i(82758),o=i(2748);function r(e,t,i){let r=o.Dom.findSibling(t,i),s=o.Dom.findSibling(t,!i);for(;o.Dom.isElement(r)&&!o.Dom.isTag(r,n.INSEPARABLE_TAGS)&&o.Dom.isContentEditable(r,e.editor)&&(!s||!o.Dom.closest(t,o.Dom.isElement,e.editor));)i||!r.firstChild?o.Dom.append(r,t):o.Dom.before(r.firstChild,t),r=o.Dom.sibling(t,i),s=o.Dom.sibling(t,!i)}},43463:function(e,t,i){"use strict";i.d(t,{moveTheNodeAlongTheEdgeOutward:function(){return o}});var n=i(2748);function o(e,t,i){let o=e;for(;o&&o!==i&&!(n.Dom.findSibling(o,t)||n.Dom.isBlock(o.parentElement));)(o=o.parentElement)&&o!==i&&(t?n.Dom.before(o,e):n.Dom.after(o,e))}},59242:function(e,t,i){"use strict";i.d(t,{CHANGE:function(){return"change"},CommitStyle:function(){return o.CommitStyle},REPLACE:function(){return r.REPLACE},Selection:function(){return n.Selection},UNWRAP:function(){return"unwrap"},WRAP:function(){return"wrap"}});var n=i(79348),o=i(25639),r=i(77361)},79348:function(e,t,i){"use strict";i.d(t,{Selection:function(){return p}});var n=i(82758),o=i(65478),r=i(2748),s=i(21537),a=i(27613),l=i(38837),u=i(43463),c=i(25639),d=i(45124),h=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class p{get j(){return this.jodit}errorNode(e){if(!r.Dom.isNode(e))throw(0,s.error)("Parameter node must be instance of Node")}get area(){return this.j.editor}get win(){return this.j.ew}get doc(){return this.j.ed}get sel(){return this.j.o.shadowRoot&&(0,a.isFunction)(this.j.o.shadowRoot.getSelection)?this.j.o.shadowRoot.getSelection():this.win.getSelection()}get range(){let e=this.sel;return e&&e.rangeCount?e.getRangeAt(0):this.createRange()}get isInsideArea(){let{sel:e}=this;if(!(null==e?void 0:e.rangeCount))return!1;for(let t=0;t<e.rangeCount;t+=1)if(!r.Dom.isOrContains(this.area,e.getRangeAt(t).commonAncestorContainer))return!1;return!0}createRange(e=!1){let t=this.doc.createRange();return e&&this.selectRange(t),t}remove(){let e=this.sel,t=this.current();if(e&&t)for(let t=0;t<e.rangeCount;t+=1){let i=e.getRangeAt(t);r.Dom.isOrContains(this.area,i.commonAncestorContainer)&&(i.deleteContents(),i.collapse(!0))}}clear(){var e,t;(null==(e=this.sel)?void 0:e.rangeCount)&&(null==(t=this.sel)||t.removeAllRanges())}removeNode(e){if(!r.Dom.isOrContains(this.j.editor,e,!0))throw(0,s.error)("Selection.removeNode can remove only editor's children");r.Dom.safeRemove(e),this.j.e.fire("afterRemoveNode",e)}insertCursorAtPoint(e,t){var i,n,o,s;try{let a=this.createRange(),l=null==(n=(i=this.doc).caretPositionFromPoint)?void 0:n.call(i,e,t),u=l?null:null==(s=(o=this.doc).caretRangeFromPoint)?void 0:s.call(o,e,t);if(l)a.setStart(l.offsetNode,l.offset);else{if(!u)return!1;a.setStart(u.startContainer,u.startOffset)}if(!r.Dom.isOrContains(this.area,a.startContainer))return!1;return a.collapse(!0),this.removeMarkers(),this.selectRange(a),!0}catch(e){}return!1}get hasMarkers(){return!!this.markers.length}get markers(){return(0,s.$$)("span[data-"+n.MARKER_CLASS+"]",this.area)}removeMarkers(){r.Dom.safeRemove(...this.markers)}marker(e=!1,t){let i=null;t&&(i=t.cloneRange()).collapse(e);let o=this.j.createInside.span();return o.id=n.MARKER_CLASS+"_"+Number(new Date)+"_"+String(Math.random()).slice(2),(0,s.css)(o,{lineHeight:"0",display:"none"}),r.Dom.markTemporary(o),(0,s.attr)(o,"data-"+n.MARKER_CLASS,e?"start":"end"),r.Dom.append(o,this.j.createInside.text(n.INVISIBLE_SPACE)),i&&r.Dom.isOrContains(this.area,e?i.startContainer:i.endContainer)&&i.insertNode(o),o}restore(){var e,t;let i=this.markers,o=new Map(i.map(e=>[e.id,e])),a=[],l=!1;for(let u=0;u<i.length;u+=1){let c=i[u];if("start"!==(0,s.attr)(c,"data-"+n.MARKER_CLASS))continue;l||(l="true"===(0,s.attr)(c,"data-selection-backward"));let d=(0,s.attr)(c,"data-selection-end"),h=d?o.get(d):void 0;!d&&i[u+1]&&"end"===(0,s.attr)(i[u+1],"data-"+n.MARKER_CLASS)&&(h=i[u+1]);let p=this.createRange();if(h)p.setStartAfter(c),p.setEndBefore(h);else{let i=c.previousSibling;r.Dom.isText(i)?p.setStart(i,null!=(t=null==(e=i.nodeValue)?void 0:e.length)?t:0):p.setStartBefore(c),p.collapse(!0)}a.push(p)}r.Dom.safeRemove(...i),a.length&&this.__selectRanges(a,l)}__isBackward(){let e=this.sel;return!!(e&&1===e.rangeCount&&!e.isCollapsed&&e.anchorNode===e.getRangeAt(0).endContainer&&e.anchorOffset===e.getRangeAt(0).endOffset)}__ranges(){let e=this.sel;return e?Array.from({length:e.rangeCount},(t,i)=>e.getRangeAt(i).cloneRange()):[]}fakes(){if(!this.isInsideArea)return[];let e=this.__isBackward(),t=this.__ranges(),i=t.map(e=>{let t=e.collapsed,i=e.cloneRange();i.collapse(!0);let n=this.j.createInside.fake();r.Dom.safeInsertNode(i,n),e.setStartBefore(n);let o=[n];if(t)e.collapse(!0);else{let t=e.cloneRange();t.collapse(!1);let i=this.j.createInside.fake();r.Dom.safeInsertNode(t,i),e.setEndAfter(i),o.push(i)}return o});return this.__fakeSelections.set(i[0][0],{pairs:i,backward:e}),this.__selectRanges(t,e),i[0]}restoreFakes(e){var t,i,n;if(!e.length)return;let o=this.__fakeSelections.get(e[0]);if(this.__fakeSelections.delete(e[0]),this.j.isInDestruct)return;let s=[];for(let a of null!=(t=null==o?void 0:o.pairs)?t:[e]){let e=a.filter(e=>e.isConnected&&r.Dom.isOrContains(this.area,e,!0));if(!e.length)continue;let[t,o]=e,l=this.createRange();for(let s of(l.setStartAfter(t),o?l.setEndBefore(o):l.collapse(!0),e))(null==(i=s.parentNode)?void 0:i.firstChild)!==(null==(n=s.parentNode)?void 0:n.lastChild)&&r.Dom.safeRemove(s);s.push(l)}s.length&&this.__selectRanges(s,null==o?void 0:o.backward)}save(e=!1){if(this.hasMarkers)return[];let t=this.sel;if(!t||!t.rangeCount)return[];let i=this.__isBackward(),n=[],o=t.rangeCount,a=[];for(let e=0;o>e;e+=1)if(a[e]=t.getRangeAt(e),!r.Dom.isOrContains(this.area,a[e].commonAncestorContainer))return[];for(let e=0;o>e;e+=1)if(a[e].collapsed){let t=this.marker(!0,a[e]);n[e]={startId:t.id,collapsed:!0,startMarker:t.outerHTML}}else{let t=this.marker(!0,a[e]),r=this.marker(!1,a[e]);o>1&&(0,s.attr)(t,"data-selection-end",r.id),i&&(0,s.attr)(t,"data-selection-backward","true"),n[e]={startId:t.id,endId:r.id,collapsed:!1,startMarker:t.outerHTML,endMarker:r.outerHTML}}if(!e){t.removeAllRanges();for(let e=o-1;e>=0;--e){let i=this.area.querySelector("#"+n[e].startId);if(i){if(n[e].collapsed)a[e].setStartAfter(i),a[e].collapse(!0);else if(a[e].setStartBefore(i),n[e].endId){let t=this.area.querySelector("#"+n[e].endId);t&&a[e].setEndAfter(t)}try{t.addRange(a[e].cloneRange())}catch(e){}}}}return n}focus(e={preventScroll:!0}){var t,i;if(!this.isFocused()){let n=(0,s.getScrollParent)(this.j.container),o=null==n?void 0:n.scrollTop;this.j.iframe&&"complete"===this.doc.readyState&&this.j.iframe.focus(e),this.win.focus(),this.area.focus(e),o&&(null==n?void 0:n.scrollTo)&&n.scrollTo(0,o);let a=this.sel,l=(null==a?void 0:a.rangeCount)?null==a?void 0:a.getRangeAt(0):null;if(!l||!r.Dom.isOrContains(this.area,l.startContainer)){let e=this.createRange();e.setStart(this.area,0),e.collapse(!0),this.selectRange(e,!1)}return this.j.editorIsActive||null==(i=null==(t=this.j)?void 0:t.events)||i.fire("focus"),!0}return!1}isCollapsed(){let e=this.sel;for(let t=0;e&&t<e.rangeCount;t+=1)if(!e.getRangeAt(t).collapsed)return!1;return!0}isFocused(){return this.doc.hasFocus&&this.doc.hasFocus()&&this.area===this.doc.activeElement}current(e=!0){if(this.j.getRealMode()!==n.MODE_WYSIWYG)return null;let t=this.sel;if(!t||0===t.rangeCount)return null;let i=t.getRangeAt(0),o=i.startContainer,s=!1;if(!r.Dom.isOrContains(this.area,o))return null;if(r.Dom.isTag(o,"br")&&t.isCollapsed)return o;if(!r.Dom.isText(o)){let n=(0,d.findCorrectCurrentNode)(o,i,s,t.isCollapsed,e,e=>s?e.lastChild:e.firstChild);o=n.node,s=n.rightMode}return o&&r.Dom.isOrContains(this.area,o)?o:null}insertNode(e,t=!0,i=!0){this.errorNode(e),this.j.e.fire("safeHTML",e);let n=r.Dom.isFragment(e)?e.lastChild:e;if(!n||this.j.isInDestruct)return;!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore());let o=this.sel;this.j.history.snapshot.transaction(()=>{if(this.isCollapsed()||this.j.execCommand("Delete"),this.j.e.fire("beforeInsertNode",e),!(n=r.Dom.isFragment(e)?e.lastChild:e)||this.j.isInDestruct)return;if(o&&o.rangeCount){let t=o.getRangeAt(0),{firstChild:i}=e;r.Dom.isOrContains(this.area,t.commonAncestorContainer)?r.Dom.safeInsertNode(t,e):r.Dom.append(this.area,e),[()=>null==i?void 0:i.previousSibling,()=>null==i?void 0:i.previousSibling,()=>{var e;return null==(e=null==i?void 0:i.previousSibling)?void 0:e.lastChild}].forEach(e=>{let t=e();t&&r.Dom.isEmptyTextNode(t)&&r.Dom.safeRemove(t)})}else r.Dom.append(this.area,e);let i=e=>{if(r.Dom.isBlock(e)){let t=e.lastChild;if(t)return i(t)}this.setCursorAfter(e)};t&&(r.Dom.isFragment(e)?n&&i(n):i(e)),this.j.o.scrollToPastedContent&&(0,s.scrollIntoViewIfNeeded)(null!=n?n:e,this.j.editor,this.doc)}),i&&this.j.events&&this.j.__imdSynchronizeValues(),this.j.events&&this.j.e.fire("afterInsertNode",r.Dom.isFragment(e)?n:e)}insertHTML(e,t=!0){if(""===e)return;let i=this.j.createInside.div(),n=this.j.createInside.fragment();!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore()),r.Dom.isNode(e)?r.Dom.append(i,e):i.innerHTML=e.toString(),!this.j.isEditorMode()&&!1===this.j.e.fire("insertHTML",i.innerHTML)||i.lastChild&&(r.Dom.moveContent(i,n),this.insertNode(n,t,!1),this.j.__imdSynchronizeValues())}insertImage(e,t=null,i=null){let n=(0,a.isString)(e)?this.j.createInside.element("img"):e;if((0,a.isString)(e)&&(0,s.attr)(n,"src",e),null!=i){let e=i.toString();e&&"auto"!==e&&0>String(e).indexOf("px")&&0>String(e).indexOf("%")&&(e+="px"),(0,s.attr)(n,"width",e)}t&&"object"==typeof t&&(0,s.css)(n,t);let o=()=>{(n.naturalHeight<n.offsetHeight||n.naturalWidth<n.offsetWidth)&&(0,s.css)(n,{width:"",height:""}),n.removeEventListener("load",o)};this.j.e.on(n,"load",o),n.complete&&o(),this.insertNode(n),this.j.e.fire("afterInsertImage",n)}eachSelection(e){let t=new Set;for(let i of this.__ranges())r.Dom.isOrContains(this.area,i.commonAncestorContainer)&&this.__eachRange(i,i=>{t.has(i)||(t.add(i),e(i))})}__eachRange(e,t){var i;let o=e.commonAncestorContainer;r.Dom.isHTMLElement(o)||(o=o.parentElement);let l=[],u=e.startOffset,c=o.childNodes.length,d=e.startContainer===this.area?o.childNodes[u<c?u:c-1]:e.startContainer,h=e.endContainer===this.area?o.childNodes[e.endOffset-1]:e.endContainer;r.Dom.isText(d)&&d===e.startContainer&&e.startOffset===(null==(i=d.nodeValue)?void 0:i.length)&&d.nextSibling&&(d=d.nextSibling),r.Dom.isText(h)&&h===e.endContainer&&0===e.endOffset&&h.previousSibling&&(h=h.previousSibling);let p=e=>{!e||e===o||r.Dom.isEmptyTextNode(e)||(0,a.isMarker)(e)||l.push(e)};p(d),d!==h&&r.Dom.isOrContains(o,d,!0)&&r.Dom.find(d,e=>(p(e),e===h||e&&e.contains&&e.contains(h)),o,!0,!1);let f=e=>{if(r.Dom.isOrContains(this.j.editor,e,!0)){if(e.nodeName.match(/^(UL|OL)$/))return(0,s.toArray)(e.childNodes).forEach(f);if(r.Dom.isTag(e,"li"))if(e.firstChild)e=e.firstChild;else{let t=this.j.createInside.text(n.INVISIBLE_SPACE);r.Dom.append(e,t),e=t}t(e)}};0===l.length&&(r.Dom.isEmptyTextNode(d)&&l.push(d),(null==d?void 0:d.firstChild)&&l.push(d.firstChild)),l.forEach(f)}cursorInTheEdge(e,t,i=null){let n=!e,o=this.sel,s=(null==o?void 0:o.rangeCount)?o.getRangeAt(0):null;if(!s)return null;let a=e?s.startContainer:s.endContainer,l=e?s.startOffset:s.endOffset;if(null!=i||(i=a),!r.Dom.isOrContains(t,a)||!r.Dom.isOrContains(t,i))return null;let u=e=>!!(e&&!r.Dom.isTag(e,"br")&&!r.Dom.isEmptyTextNode(e)&&!r.Dom.isTemporary(e)&&!(r.Dom.isElement(e)&&!0===this.j.e.fire("isInvisibleForCursor",e)));if(r.Dom.isText(a)){if((0,d.cursorInTheEdgeOfString)(a,l,e,n))return!1}else{let e=a.childNodes,t=n?e.length:l;for(let i=n?l:0;t>i;i+=1)if(u(e[i]))return!1}let c=i;for(;c&&c!==t;){let t=r.Dom.sibling(c,e);if(!t){c=c.parentNode;continue}if(u(c=t))return!1}return!0}cursorOnTheLeft(e,t){return this.cursorInTheEdge(!0,e,t)}cursorOnTheRight(e,t){return this.cursorInTheEdge(!1,e,t)}setCursorAfter(e){return this.setCursorNearWith(e,!1)}setCursorBefore(e){return this.setCursorNearWith(e,!0)}setCursorNearWith(e,t){var i,n;if(this.errorNode(e),!r.Dom.isOrContains(this.area,e,!0))throw(0,s.error)("Node element must be in editor");let o=this.createRange(),a=null;return r.Dom.isText(e)?t?o.setStart(e,0):o.setEnd(e,null!=(n=null==(i=e.nodeValue)?void 0:i.length)?n:0):(a=this.j.createInside.fake(),t?o.setStartBefore(e):o.setEndAfter(e),o.collapse(t),r.Dom.safeInsertNode(o,a),o.selectNode(a)),o.collapse(t),this.selectRange(o),a}setCursorIn(e,t=!1){if(this.errorNode(e),!r.Dom.up(e,e=>e===this.area||e&&e.parentNode===this.area,this.area))throw(0,s.error)("Node element must be in editor");let i=this.createRange(),o=e,a=e;do{if(r.Dom.isText(o)||r.Dom.isTag(o,n.INSEPARABLE_TAGS))break;a=o,o=t?o.firstChild:o.lastChild}while(o);if(!o){let e=this.j.createInside.text(n.INVISIBLE_SPACE);r.Dom.isTag(a,n.INSEPARABLE_TAGS)?o=a:(r.Dom.append(a,e),a=e)}let l=o||a;return r.Dom.isTag(l,n.INSEPARABLE_TAGS)?t||r.Dom.isTag(l,"br")?i.setStartBefore(l):i.setEndAfter(l):i.selectNodeContents(l),i.collapse(t),this.selectRange(i),a}selectRange(e,t=!0){return this.__selectRanges([e],!1,t)}__selectRanges(e,t=!1,i=!0){let n=this.sel;if(i&&!this.isFocused()&&"focus"!==this.j.e.current&&this.focus(),n&&(n.removeAllRanges(),e.forEach(e=>n.addRange(e)),t&&1===e.length)){let t=e[0];n.setBaseAndExtent(t.endContainer,t.endOffset,t.startContainer,t.startOffset)}return this.j.e.fire("changeSelection"),this}select(e,t=!1){if(this.errorNode(e),!r.Dom.up(e,e=>e===this.area||e&&e.parentNode===this.area,this.area))throw(0,s.error)("Node element must be in editor");let i=this.createRange();return i[t||e===this.area?"selectNodeContents":"selectNode"](e),this.selectRange(i)}get html(){let e=this.sel;if(e&&e.rangeCount>0){let e=this.j.createInside.div();return this.__ranges().forEach(t=>r.Dom.append(e,t.cloneContents())),e.innerHTML}return""}__wrapSelectionFragments(e){this.__splitSelectionBoundaries(e);let t=e.commonAncestorContainer;return(r.Dom.isText(t)&&(t=t.parentNode),t)?this.__wrapSelectionRuns(this.__collectContainedNodes(t,e)):[]}__splitSelectionBoundaries(e){var t,i,n,o;let{endContainer:s,endOffset:a}=e;r.Dom.isText(s)&&a>0&&a<(null!=(i=null==(t=s.nodeValue)?void 0:t.length)?i:0)&&s.splitText(a);let{startContainer:l,startOffset:u}=e;if(r.Dom.isText(l)&&u>0&&u<(null!=(o=null==(n=l.nodeValue)?void 0:n.length)?o:0)){let t=l.splitText(u);e.setStart(t,0)}this.__normalizeRangeBoundary(e,!0),this.__normalizeRangeBoundary(e,!1)}__normalizeRangeBoundary(e,t){var i,n;let o=t?e.startContainer:e.endContainer;if(!r.Dom.isText(o))return;let s=t?e.startOffset:e.endOffset,a=null!=(n=null==(i=o.nodeValue)?void 0:i.length)?n:0;0===s?t?e.setStartBefore(o):e.setEndBefore(o):s>=a&&(t?e.setStartAfter(o):e.setEndAfter(o))}__collectContainedNodes(e,t,i=this.createRange()){let n=[];return(0,s.toArray)(e.childNodes).forEach(e=>{this.__isFullyContained(t,e,i)?n.push(e):e.childNodes.length&&t.intersectsNode(e)&&n.push(...this.__collectContainedNodes(e,t,i))}),n}__isFullyContained(e,t,i){return i.selectNode(t),0>=e.compareBoundaryPoints(Range.START_TO_START,i)&&e.compareBoundaryPoints(Range.END_TO_END,i)>=0}__wrapSelectionRuns(e){let t=[],i=[],n=()=>{i.length&&(t.push(this.__wrapRunInFont(i)),i=[])};return e.forEach(e=>{r.Dom.isElement(e)&&this.__isOrContainsBlock(e)?(n(),t.push(...this.__wrapSelectionRuns((0,s.toArray)(e.childNodes)))):(i.length&&i[i.length-1].parentNode!==e.parentNode&&n(),i.push(e))}),n(),t}__isOrContainsBlock(e){return!!r.Dom.isBlock(e)||(0,s.toArray)(e.childNodes).some(e=>this.__isOrContainsBlock(e))}__wrapRunInFont(e){let t=this.j.createInside.element("font"),[i]=e;return r.Dom.before(i,t),e.forEach(e=>r.Dom.append(t,e)),t}*wrapInTagGen(e){var t;if((null==(t=this.sel)?void 0:t.rangeCount)&&!this.isInsideArea)return;if(this.isCollapsed()){let t=this.jodit.createInside.element("font",n.INVISIBLE_SPACE);this.insertNode(t,!1,!1),e&&e[0]&&r.Dom.append(t,e[0]);try{yield t}finally{r.Dom.unwrap(t)}return}let i=this.__ranges().flatMap(e=>this.__wrapSelectionFragments(e));try{for(let e of i){if(this.j.isInDestruct||!r.Dom.isOrContains(this.area,e,!0))continue;let{firstChild:t,lastChild:i}=e;if(t&&t===i&&(0,a.isMarker)(t)){r.Dom.unwrap(e);continue}t&&(0,a.isMarker)(t)&&r.Dom.before(e,t),i&&(0,a.isMarker)(i)&&r.Dom.after(e,i),yield e,r.Dom.unwrap(e)}}finally{i.forEach(e=>r.Dom.unwrap(e))}}wrapInTag(e){let t=[];for(let i of this.wrapInTagGen())try{if(i.firstChild&&i.firstChild===i.lastChild&&(0,a.isMarker)(i.firstChild))continue;(0,a.isFunction)(e)?e(i):t.push(r.Dom.replace(i,e,this.j.createInside))}finally{let e=i.parentNode;e&&(r.Dom.unwrap(i),r.Dom.isEmpty(e)&&r.Dom.unwrap(e))}return t}commitStyle(e){(0,l.assert)((0,s.size)(e)>0,"Need to pass at least one option"),new c.CommitStyle(e).apply(this.j)}splitSelection(e,t){if(!this.isCollapsed()||!this.isInsideArea||!r.Dom.isOrContains(this.area,e,!0)||!r.Dom.isOrContains(e,this.range.startContainer)||t&&!r.Dom.isOrContains(e,t,!0))return null;let i=this.createRange(),o=this.range;i.setStartBefore(e);let s=this.cursorOnTheRight(e,t),a=this.cursorOnTheLeft(e,t),u=this.j.createInside.element("br"),c=this.j.createInside.fake(),d=c.cloneNode();try{if(s||a){t?r.Dom.before(t,u):r.Dom.safeInsertNode(o,u);let e=(e,t)=>{let i=t(e);for(;i;){let e=t(i);if(i&&(r.Dom.isTag(i,"br")||r.Dom.isEmptyTextNode(i)))r.Dom.safeRemove(i);else break;i=e}};e(u,e=>e.nextSibling),e(u,e=>e.previousSibling),r.Dom.after(u,d),r.Dom.before(u,c),s?(i.setEndBefore(u),o.setEndBefore(u)):(i.setEndAfter(u),o.setEndAfter(u))}else i.setEnd(o.startContainer,o.startOffset);let h=i.extractContents(),p=e=>r.Dom.each(e,e=>r.Dom.isEmptyTextNode(e)&&r.Dom.safeRemove(e));(0,l.assert)(e.parentNode,"Splitting fails");try{if(p(h),p(e),r.Dom.before(e,h),!t&&s&&(null==u?void 0:u.parentNode)){let e=this.createRange();e.setStartBefore(u),this.selectRange(e)}}catch(e){if(!n.IS_PROD)throw e}let f=e=>{let t=null==e?void 0:e.parentNode;t&&t.firstChild===t.lastChild&&r.Dom.append(t,u.cloneNode())};f(c),f(d)}finally{r.Dom.safeRemove(c),r.Dom.safeRemove(d)}return e.previousElementSibling}expandSelection(){if(this.isCollapsed()||!this.isInsideArea)return this;let e=this.__isBackward(),t=this.__ranges().map(e=>this.__expandRange(e));return this.__selectRanges(t,e),this}__expandRange(e){let t=e.cloneRange();if(!r.Dom.isOrContains(this.j.editor,e.commonAncestorContainer,!0))return e;let i=t=>{let i=this.j.createInside.fake(),n=e.cloneRange();return n.collapse(t),r.Dom.safeInsertNode(n,i),(0,u.moveTheNodeAlongTheEdgeOutward)(i,t,this.j.editor),i},n=i(!0),o=i(!1);t.setStartAfter(n),t.setEndBefore(o);let a=r.Dom.findSibling(n,!1),l=r.Dom.findSibling(o,!0);if(a!==l){let e=r.Dom.isElement(a)&&r.Dom.isOrContains(a,o),i=!e&&r.Dom.isElement(l)&&r.Dom.isOrContains(l,n);if(e||i){let i=e?a:l,s=i;for(;r.Dom.isElement(i);)(i=e?i.firstElementChild:i.lastElementChild)&&(e?r.Dom.isOrContains(i,o):r.Dom.isOrContains(i,n))&&(s=i);e?t.setStart(s,0):t.setEnd(s,s.childNodes.length)}}if(r.Dom.safeRemove(n,o),t.collapsed)throw(0,s.error)("Selection is collapsed");return t}constructor(e){this.jodit=e,this.__fakeSelections=new WeakMap,e.e.on("removeMarkers",()=>{this.removeMarkers()})}}h([o.autobind],p.prototype,"createRange",null),h([o.autobind],p.prototype,"focus",null),h([o.autobind],p.prototype,"setCursorAfter",null),h([o.autobind],p.prototype,"setCursorBefore",null),h([o.autobind],p.prototype,"setCursorIn",null)},32526:function(e,t,i){"use strict";i.d(t,{extractSelectedPart:function(){return s}});var n=i(2748),o=i(78116),r=i(37790);function s(e,t,i){let n=i.s.createRange(),r=(0,o.isMarker)(t.previousSibling)?t.previousSibling:t;n.setStartBefore(e),n.setEndBefore(r),a(e,n,!0);let s=(0,o.isMarker)(t.nextSibling)?t.nextSibling:t;n.setStartAfter(s),n.setEndAfter(e),a(e,n,!1)}function a(e,t,i){let o=t.extractContents();n.Dom.isEmpty(o)&&o.firstChild&&n.Dom.unwrap(o.firstChild),e.parentNode&&(0,r.call)(i?n.Dom.before:n.Dom.after,e,o)}},49996:function(e,t,i){"use strict";i.d(t,{FiniteStateMachine:function(){return s}});var n=i(82758),o=i(70799),r=i(38837);class s{setState(e){(0,r.assert)(!this.__previewsStates.has(e),"Circled states"),this.__previewsStates.add(e),this.__state=e}getState(){return this.__state}disableSilent(){this.silent=!1}dispatch(e,t){let i=this.transitions[this.getState()][e];if(i){let e=i.call(this,t);return(0,r.assert)(e&&e!==t,"Action should return new value"),(0,r.assert)((0,o.isString)(e.next),"Value should contain the next state"),(0,r.assert)(e.next!==this.getState(),"The new state should not be equal to the old one."),this.setState(e.next),n.IS_PROD||this.silent,e}throw Error(`invalid action: ${this.getState()}.${e.toString()}`)}constructor(e,t){this.transitions=t,this.silent=!0,this.__previewsStates=new Set,this.setState(e)}}},23738:function(e,t,i){"use strict";i.d(t,{getSuitChild:function(){return s}});var n=i(2748),o=i(29136),r=i(97380);function s(e,t){let{firstChild:i}=t;for(;i&&!(0,o.isNormalNode)(i);)if(!(i=i.nextSibling))return null;return i&&!n.Dom.next(i,o.isNormalNode,t)&&(0,r.isSuitElement)(e,i,!1)?i:null}},44602:function(e,t,i){"use strict";i.d(t,{getSuitParent:function(){return function e(t,i,s){var a;let{parentNode:l}=i;return l===s||!n.Dom.isHTMLElement(l)||n.Dom.next(i,o.isNormalNode,l)||n.Dom.prev(i,o.isNormalNode,l)?null:t.isElementCommit&&t.elementIsBlock&&!n.Dom.isBlock(l)?e(t,l,s):n.Dom.isTag(l,"li")&&!t.isElementCommit&&(null==(a=t.options.attributes)?void 0:a.style)||(0,r.isSuitElement)(t,l,!1)&&(!n.Dom.isBlock(l)||t.elementIsBlock)?l:t.isElementCommit&&!n.Dom.isBlock(l)?e(t,l,s):null}}});var n=i(2748),o=i(29136),r=i(97380)},22030:function(e,t,i){"use strict";i.d(t,{hasSameStyle:function(){return u},hasSameStyleKeys:function(){return c}});var n=i(82758),o=i(2748),r=i(86068),s=i(3760),a=i(38837),l=i(41180);function u(e,t){return!!(!o.Dom.isTag(e,"font")&&o.Dom.isHTMLElement(e)&&Object.keys(t).every(i=>{let n=(0,l.css)(e,i,!0);return""===n&&(""===t[i]||null==t[i])||!(0,r.isVoid)(n)&&""!==n&&!(0,r.isVoid)(t[i])&&(0,s.normalizeCssValue)(i,t[i]).toString().toLowerCase()===n.toString().toLowerCase()}))}if(n.globalDocument){let e=n.globalDocument.createElement("div");e.style.color="red",(0,a.assert)(u(e,{color:"red"}),"Style test"),(0,a.assert)(u(e,{fontSize:null}),"Style test"),(0,a.assert)(u(e,{fontSize:""}),"Style test")}function c(e,t){return!!(!o.Dom.isTag(e,"font")&&o.Dom.isHTMLElement(e)&&Object.keys(t).every(t=>""!==(0,l.css)(e,t,!0)))}if(n.globalDocument){let e=n.globalDocument.createElement("div");e.style.color="red",(0,a.assert)(c(e,{color:"red"}),"Style test"),(0,a.assert)(!c(e,{font:"Arial",color:"red"}),"Style test"),(0,a.assert)(!c(e,{border:"1px solid #ccc"}),"Style test")}},63687:function(e,t,i){"use strict";i.d(t,{FiniteStateMachine:function(){return o.FiniteStateMachine},WRAP_NODES:function(){return h.WRAP_NODES},extractSelectedPart:function(){return n.extractSelectedPart},getSuitChild:function(){return r.getSuitChild},getSuitParent:function(){return s.getSuitParent},isInsideInvisibleElement:function(){return a.isInsideInvisibleElement},suitableClosest:function(){return l.suitableClosest},toggleAttributes:function(){return c.toggleAttributes},toggleOrderedList:function(){return u.toggleOrderedList},unwrapChildren:function(){return d.unwrapChildren},wrap:function(){return h.wrap}});var n=i(32526),o=i(49996),r=i(23738),s=i(44602);i(22030);var a=i(64291);i(29136),i(94466);var l=i(97380),u=i(20199);i(82515);var c=i(44253),d=i(75882),h=i(19263);i(6980)},64291:function(e,t,i){"use strict";i.d(t,{isInsideInvisibleElement:function(){return o}});var n=i(2748);function o(e,t){return!!n.Dom.closest(e,["style","script"],t)}},29136:function(e,t,i){"use strict";i.d(t,{isNormalNode:function(){return r}});var n=i(2748),o=i(78116);function r(e){return!!(e&&!n.Dom.isEmptyTextNode(e)&&!n.Dom.isTemporary(e)&&!(0,o.isMarker)(e))}},94466:function(e,t,i){"use strict";i.d(t,{elementsEqualAttributes:function(){return u},isSameAttributes:function(){return l}});var n=i(21496),o=i(43555),r=i(38837),s=i(29960),a=i(22030);function l(e,t){return!(0,n.size)(t)||((0,r.assert)(t,"Attrs must be a non-empty object"),Object.keys(t).every(i=>{var n;if("class"===i||"className"===i)return(null!=(n=String(t[i]).match(/[^\t\n\f\r ]+/g))?n:[]).every(t=>e.classList.contains(t));if("style"===i)return(0,a.hasSameStyle)(e,t[i]);let r=t[i];return(0,o.attr)(e,i)===(null==r?r:String(r))}))}function u(e,t){return e.attributes.length===t.attributes.length&&Array.from(e.attributes).every(e=>(0,s.attrRaw)(t,e.name)===e.value)}},97380:function(e,t,i){"use strict";i.d(t,{isSuitElement:function(){return s},suitableClosest:function(){return a}});var n=i(2748),o=i(22030),r=i(29136);function s(e,t,i,a=!0){var l;if(!t||!(0,r.isNormalNode)(t))return!1;let{element:u,elementIsDefault:c,options:d}=e;if(n.Dom.isList(t)&&e.elementIsList)return!0;let h=n.Dom.isTag(t,u);return!!(h&&!(c&&i)||(null==(l=d.attributes)?void 0:l.style)&&(a?(0,o.hasSameStyle)(t,d.attributes.style):(0,o.hasSameStyleKeys)(t,d.attributes.style))&&!e.elementIsList)||!h&&!i&&c&&n.Dom.isInlineBlock(t)}function a(e,t,i){return n.Dom.closest(t,t=>s(e,t,!0,!1),i)}},20199:function(e,t,i){"use strict";i.d(t,{toggleOrderedList:function(){return u}});var n=i(2748),o=i(38837),r=i(32526),s=i(44253),a=i(77361),l=i(82515);function u(e,t,i,n){if(!t)return n;let o=t.parentElement;if(!o)return n;let r=i.e.fire(`${a._PREFIX}BeforeToggleList`,n,e,o);if(void 0!==r)return r;let u=i.e.fire.bind(i.e,`${a._PREFIX}AfterToggleList`);if("unwrap"!==n){let r="change"===(0,s.toggleAttributes)(e,t.parentElement,i,a.INITIAL,!0);if(n===a.REPLACE||r||o.tagName.toLowerCase()!==e.element){let n=c(a.REPLACE,o,t,i,e),r=(0,l.wrapList)(e,n,i);return u(a.REPLACE,r,e),a.REPLACE}}return u("unwrap",c("unwrap",o,t,i,e),e),"unwrap"}function c(e,t,i,s,l){let u=s.e.fire(`${a._PREFIX}BeforeUnwrapList`,e,t,l);return u?((0,o.assert)(n.Dom.isHTMLElement(u),`${a._PREFIX}BeforeUnwrapList hook must return HTMLElement`),u):((0,r.extractSelectedPart)(t,i,s),(0,o.assert)(n.Dom.isHTMLElement(i.parentElement),"Element should be inside the list"),n.Dom.unwrap(i.parentElement),e===a.REPLACE)?i:n.Dom.replace(i,"br"!==s.o.enter.toLowerCase()?s.o.enter:s.createInside.fragment(),s.createInside)}},82515:function(e,t,i){"use strict";i.d(t,{wrapList:function(){return a}});var n=i(2748),o=i(94466),r=i(44253),s=i(77361);function a(e,t,i){let a=i.e.fire(`${s._PREFIX}BeforeWrapList`,s.REPLACE,t,e),l=null!=a?a:n.Dom.replace(t,"li",i.createInside),u=l.previousElementSibling,c=l.nextElementSibling,d=n.Dom.isTag(u,e.element)?u:null;return null!=d||(d=n.Dom.isTag(c,e.element)?c:null),n.Dom.isList(d)&&(0,o.isSameAttributes)(d,e.options.attributes)||(d=i.createInside.element(e.element),(0,r.toggleAttributes)(e,d,i,s.INITIAL),n.Dom.before(l,d)),u===d?n.Dom.append(d,l):n.Dom.prepend(d,l),n.Dom.isTag(d.nextElementSibling,e.element)&&(0,o.elementsEqualAttributes)(d,d.nextElementSibling)&&(n.Dom.append(d,Array.from(d.nextElementSibling.childNodes)),n.Dom.safeRemove(d.nextElementSibling)),i.e.fire(`${s._PREFIX}AfterWrapList`,"wrap",d,e),d}},44253:function(e,t,i){"use strict";i.d(t,{toggleAttributes:function(){return f}});var n=i(82758),o=i(2748),r=i(580),s=i(27613),a=i(3760),l=i(21496),u=i(43555),c=i(41180),d=i(86583),h=i(77361);let p="toggleAttributes";function f(e,t,i,m,g=!1){var b;if(!g&&e.isApplied(t,p))return m;g||e.setApplied(t,p);let{attributes:v}=e.options;return v&&(0,l.size)(v)>0&&Object.keys(v).forEach(e=>{var p,f;let b=v[e];switch(e){case"style":p=m,(0,u.assert)((0,s.isPlainObject)(b)&&(0,l.size)(b),"Style must be an object"),Object.keys(b).forEach(e=>{let s=(0,c.cssInline)(t,e),l=b[e];if(""!==s||null!=l){let h,f,m,b;if(null==l||""===l){s&&(g||(0,c.css)(t,e,null),p="change");return}if(h=function(e){var t;if(void 0!==(0,d.dataBind)(e,"shadowRoot"))return(0,d.dataBind)(e,"shadowRoot");let i=(0,r.getContainer)(e),s=n.globalDocument.createElement("iframe");(0,c.css)(s,{width:0,height:0,position:"absolute",border:0}),(0,u.attr)(s,"src","about:blank"),o.Dom.append(i,s);let a=null==(t=s.contentWindow)?void 0:t.document,l=a?a.body:e.od.body;return(0,d.dataBind)(e,"shadowRoot",l),l}(i),f=i.create.element("div"),(0,c.css)(f,"color",(0,c.css)(i.editor,"color")),m=i.create.element(t.tagName.toLowerCase()),(0,u.attr)(m,"style",(0,u.attr)(t,"style")),o.Dom.append(f,m),o.Dom.append(h,f),b=(0,c.css)(m,e),o.Dom.safeRemove(f),b===(0,a.normalizeCssValue)(e,l)){if(!s)return;g||(0,c.css)(t,e,null),p="unset";return}p="change",g||(0,c.css)(t,e,l)}}),m=p;break;case"className":case"class":m=function(e,t,i,n,o){var r;(0,u.assert)((0,s.isString)(t),"Class name must be a string");let a=null!=(r=t.match(/[^\t\n\f\r ]+/g))?r:[];if(!a.length)return n;let l=e.e.fire.bind(e.e,`${h._PREFIX}AfterToggleAttribute`);return a.every(e=>i.classList.contains(e))?(n="unset",o||(i.classList.remove(...a),0===i.classList.length&&(0,u.attr)(i,"class",null),l(n,i,"class",(0,u.attr)(i,"class")))):(n="change",o||(i.classList.add(...a),l(n,i,"class",t))),n}(i,b,t,m,g);break;default:let y;f=m,(0,u.assert)((0,s.isString)(b)||(0,s.isNumber)(b)||(0,s.isBoolean)(b)||null==b,"Attribute value must be a string or number or boolean or null"),y=i.e.fire.bind(i.e,`${h._PREFIX}AfterToggleAttribute`),(0,u.attr)(t,e)===(null==b?b:String(b))?(g||(0,u.attr)(t,e,null),f="unset",g||y(f,t,e,b)):(f="change",g||((0,u.attr)(t,e,b),y(f,t,e,b))),m=f}}),!g&&(null==v?void 0:v.style)?(b=m,!(0,u.attr)(t,"style")&&((0,u.attr)(t,"style",null),t.attributes.length||t.tagName.toLowerCase()!==e.defaultTag||(o.Dom.unwrap(t),b="unwrap")),b):m}},75882:function(e,t,i){"use strict";i.d(t,{unwrapChildren:function(){return a}});var n=i(2748),o=i(43555),r=i(22030),s=i(97380);function a(e,t){var i;let a,l=[],u=[],c=null==(i=e.options.attributes)?void 0:i.style,d=Object.keys(null!=c?c:{}),h={};d.forEach(e=>{h[e]=null});let p=t=>{(0,o.css)(t,h),(0,o.attr)(t,"style")||(0,o.attr)(t,"style",null),!t.attributes.length&&n.Dom.isTag(t,e.element)&&l.push(t)};for(let i of n.Dom.eachGen(t))n.Dom.isContentEditable(i,t)&&((0,s.isSuitElement)(e,i,!0)&&(!c||(0,r.hasSameStyleKeys)(i,c))?(void 0===a&&(a=!0),c?u.push(()=>p(i)):l.push(i)):c&&n.Dom.isHTMLElement(i)&&d.some(e=>""!==(0,o.css)(i,e,!0))?(void 0===a&&(a=!1),u.push(()=>p(i))):n.Dom.isEmptyTextNode(i)||void 0!==a||(a=!1));return u.forEach(e=>e()),l.forEach(n.Dom.unwrap),!!a}},6980:function(e,t,i){"use strict";i.d(t,{wrapUnwrappedText:function(){return r}});var n=i(2748),o=i(78116);function r(e,t,i){let r=i.editor,s=i.createInside,a=(e,t="previousSibling")=>{let s=e,a=e;for(;a&&!(0,o.isMarker)(a)&&!n.Dom.isTag(a,i.o.enter)&&(s=a,a=a[t]?a[t]:a.parentNode&&!n.Dom.isBlock(a.parentNode)&&a.parentNode!==r?a.parentNode:null,!n.Dom.isBlock(a)););return s},l=a(t),u=a(t,"nextSibling"),c=i.s.createRange();c.setStartBefore(l),c.setEndAfter(u);let d=c.extractContents(),h=s.element(e.element);return n.Dom.append(h,d),n.Dom.safeInsertNode(c,h),e.elementIsBlock&&n.Dom.isEmpty(h)&&!n.Dom.isTag(h.firstElementChild,"br")&&n.Dom.append(h,s.element("br")),h}},19263:function(e,t,i){"use strict";i.d(t,{wrap:function(){return l}});var n=i(22732),o=i(29960),r=i(41180),s=i(82515),a=i(6980);function l(e,t,i){var l,c,d;let h=(l=e,c=t,d=i,l.elementIsBlock?n.Dom.up(c,e=>n.Dom.isBlock(e)&&!n.Dom.isTag(e,u)&&!Array.from(e.childNodes).some(e=>n.Dom.isBlock(e)),d.editor)||(0,a.wrapUnwrappedText)(l,c,d):((0,o.attr)(c,"size",null),c));if(e.elementIsList)return(0,s.wrapList)(e,h,i);let p=n.Dom.replace(h,e.element,i.createInside,!0);return e.elementIsBlock&&((0,r.css)(p,"fontSize",null),(0,r.css)(p,"fontWeight",null),(0,o.attr)(p,"style")||(0,o.attr)(p,"style",null)),p}let u=new Set(["td","th","tr","tbody","table","li","ul","ol"]);i.d(t,["WRAP_NODES",0,u])},83632:function(e,t,i){"use strict";i.d(t,{ApplyStyle:function(){return s}});var n=i(63687),o=i(77361),r=i(55307);function s(e,t){var i;let{s:s,editor:a}=e;null==(i=a.firstChild)||i.normalize();let l=s.fakes(),u=s.isCollapsed(),c=o.INITIAL;try{for(let i of s.wrapInTagGen(l)){let o={collapsed:u,mode:c,element:i,next:r.states.START,jodit:e,style:t},s=new n.FiniteStateMachine(r.states.START,r.transactions);for(;!e.isInDestruct&&s.getState()!==r.states.END;)o=s.dispatch("exec",o);c=o.mode}}finally{s.restoreFakes(l)}}},25639:function(e,t,i){"use strict";i.d(t,{CommitStyle:function(){return a}});var n=i(82758),o=i(87058),r=i(77361),s=i(83632);class a{isApplied(e,t){let i=this.__applyMap.get(e);return!!i&&!!i[t]}setApplied(e,t){var i;let n=null!=(i=this.__applyMap.get(e))?i:{};n[t]=!0,this.__applyMap.set(e,n)}get elementIsList(){return!!(this.options.element&&n.LIST_TAGS.has(this.options.element))}get element(){return this.options.element||this.defaultTag}get elementIsBlock(){return!!(this.options.element&&n.IS_BLOCK.test(this.options.element))}get isElementCommit(){return!!(this.options.element&&this.options.element!==this.options.defaultTag)}get defaultTag(){return this.options.defaultTag?this.options.defaultTag:this.elementIsBlock?"p":"span"}get elementIsDefault(){return this.element===this.defaultTag}apply(e){let{hooks:t}=this.options,i=t?Object.keys(t):[];try{i.forEach(i=>{e.e.on((0,o.camelCase)(r._PREFIX+"_"+i),t[i])}),(0,s.ApplyStyle)(e,this)}finally{i.forEach(i=>{e.e.off((0,o.camelCase)(r._PREFIX+"_"+i),t[i])}),this.__applyMap=new WeakMap}e.isInDestruct||(e.synchronizeValues(),e.e.fire("afterCommitStyle",this))}constructor(e){this.options=e,this.__applyMap=new WeakMap}}},77361:function(e,t,i){"use strict";i.d(t,["INITIAL",0,"initial","REPLACE",0,"replace","_PREFIX",0,"commitStyle"])},55307:function(e,t,i){"use strict";var n=i(82758),o=i(2748),r=i(38837),s=i(63687),a=i(77361);function l(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{},n=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(i).filter(function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable}))),n.forEach(function(t){var n;n=i[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function u(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t.push.apply(t,i)}return t})(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))}),e}let c={START:"START",ELEMENT:"ELEMENT",UNWRAP:"UNWRAP",UNWRAP_CHILDREN:"UNWRAP_CHILDREN",CHANGE:"CHANGE",REPLACE_DEFAULT:"REPLACE_DEFAULT",LIST:"LIST",TOGGLE_LIST:"TOGGLE_LIST",WRAP:"WRAP",EXTRACT:"EXTRACT",END:"END"},d={[c.START]:{exec(e){let{element:t,jodit:i,style:n,mode:r,collapsed:a}=e;if(!o.Dom.isContentEditable(t,i.editor)||(0,s.isInsideInvisibleElement)(t,i.editor)||!a&&o.Dom.isEmptyContent(t))return u(l({},e),{next:c.END});let d=(0,s.getSuitParent)(n,t,i.editor)||(0,s.getSuitChild)(n,t);if(d)return u(l({},e),{next:c.ELEMENT,element:d});let h=(0,s.suitableClosest)(n,t,i.editor);return n.elementIsList&&o.Dom.isList(h)?u(l({},e),{next:c.LIST}):h?u(l({},e),{next:c.EXTRACT}):u(l({},e),{next:"unwrap"!==r?c.UNWRAP_CHILDREN:c.END})}},[c.LIST]:{exec(e){let{element:t,jodit:i,mode:r}=e;if(r!==a.INITIAL&&"unwrap"!==r&&r!==a.REPLACE)return u(l({},e),{next:c.END});let s=o.Dom.closest(t,"li",i.editor);return s&&o.Dom.closest(t,n.LIST_TAGS,i.editor)?u(l({},e),{element:s,next:c.TOGGLE_LIST}):u(l({},e),{next:c.END})}},[c.TOGGLE_LIST]:{exec(e){return u(l({},e),{mode:(0,s.toggleOrderedList)(e.style,e.element,e.jodit,e.mode),next:c.END})}},[c.EXTRACT]:{exec(e){var t;let{element:i,jodit:n,style:a}=e,d=(0,s.suitableClosest)(a,i,n.editor);return((0,r.assert)(d,"This place should have an element"),!a.elementIsBlock&&(null==(t=a.options.attributes)?void 0:t.style)&&o.Dom.isBlock(d))?u(l({},e),{next:c.WRAP}):(a.elementIsBlock||(0,s.extractSelectedPart)(d,i,n),u(l({},e),{element:d,next:c.ELEMENT}))}},[c.UNWRAP_CHILDREN]:{exec(e){let{element:t,style:i}=e;return(0,s.unwrapChildren)(i,t)?u(l({},e),{mode:"unwrap",next:c.END}):u(l({},e),{next:c.WRAP})}},[c.WRAP]:{exec(e){let{element:t,jodit:i,style:n}=e,o=(0,s.wrap)(n,t,i);return u(l({},e),{next:n.elementIsList?c.END:c.CHANGE,mode:"wrap",element:o})}},[c.ELEMENT]:{exec(e){let{style:t,element:i,jodit:n}=e;return(0,s.toggleAttributes)(t,i,n,a.INITIAL,!0)!==a.INITIAL?u(l({},e),{next:c.CHANGE}):o.Dom.isTag(i,t.element)?u(l({},e),{next:c.UNWRAP}):u(l({},e),{next:c.END})}},[c.CHANGE]:{exec(e){let{style:t,element:i,jodit:n,mode:r}=e,a=(0,s.toggleAttributes)(t,i,n,e.mode);return"wrap"!==r&&"unset"===a&&!i.attributes.length&&o.Dom.isTag(i,t.element)?u(l({},e),{next:c.UNWRAP}):u(l({},e),{mode:a,next:c.END})}},[c.UNWRAP]:{exec(e){let{element:t,style:i,jodit:n}=e;if(t.attributes.length&&o.Dom.isTag(t,i.element))return u(l({},e),{next:c.REPLACE_DEFAULT});let r=t.parentElement;return i.elementIsBlock&&!i.elementIsDefault&&r&&r!==n.editor&&o.Dom.isBlock(r)&&!o.Dom.isTag(r,s.WRAP_NODES)?u(l({},e),{next:c.REPLACE_DEFAULT}):(o.Dom.unwrap(t),u(l({},e),{mode:"unwrap",next:c.END}))}},[c.REPLACE_DEFAULT]:{exec(e){return o.Dom.replace(e.element,e.style.defaultTag,e.jodit.createInside,!0),u(l({},e),{mode:a.REPLACE,next:c.END})}},[c.END]:{exec(e){return e}}};i.d(t,["states",0,c,"transactions",0,d])},97333:function(e,t,i){"use strict";i.d(t,{AsyncStorage:function(){return u}});var n=i(87058),o=i(2621),r=i(65638),s=i(21162);function a(e,t,i,n,o,r,s){try{var a=e[r](s),l=a.value}catch(e){i(e);return}a.done?t(l):Promise.resolve(l).then(n,o)}function l(e){return function(){var t=this,i=arguments;return new Promise(function(n,o){var r=e.apply(t,i);function s(e){a(r,n,o,s,l,"next",e)}function l(e){a(r,n,o,s,l,"throw",e)}s(void 0)})}}class u{set(e,t){return l(function*(){let i=yield this.provider;return yield i.set((0,n.camelCase)(this.prefix+e),t),this}).call(this)}delete(e){return l(function*(){let t=yield this.provider;return yield t.delete((0,n.camelCase)(this.prefix+e)),this}).call(this)}get(e){return l(function*(){return(yield this.provider).get((0,n.camelCase)(this.prefix+e))}).call(this)}exists(e){return l(function*(){return(yield this.provider).exists((0,n.camelCase)(this.prefix+e))}).call(this)}clear(){return l(function*(){let e=yield this.provider;return yield e.clear(),this}).call(this)}close(){return l(function*(){let e=yield this.provider;"close"in e&&"function"==typeof e.close&&(yield e.close())}).call(this)}static makeStorage(e=!1,t,i){let n,a=null==i?void 0:i.defaultProvider;return null!=a?new u(Promise.resolve(n="local"===a?(0,r.canUsePersistentStorage)("localStorage")?new r.LocalStorageProvider("Jodit_"+(t||"")):new s.MemoryStorageProvider:"memory"===a?new s.MemoryStorageProvider:a),t):("localStorage"===e||"sessionStorage"===e?(0,r.canUsePersistentStorage)(e)&&(n=new r.LocalStorageProvider("Jodit_"+(t||""),e)):("indexedDB"===e||!0===e)&&(n=(0,o.canUseIndexedDB)().then(e=>e?new o.IndexedDBProvider("Jodit_"+(t||""),"keyValueStore"):new s.MemoryStorageProvider)),n||(n=new s.MemoryStorageProvider),new u(Promise.resolve(n),t))}constructor(e,t){this.provider=e,this.prefix="Jodit_",t&&(this.prefix+=t)}}},2621:function(e,t,i){"use strict";i.d(t,{IndexedDBProvider:function(){return s},canUseIndexedDB:function(){return u},clearUseIndexedDBCache:function(){return l}});var n=i(82758);function o(e,t,i,n,o,r,s){try{var a=e[r](s),l=a.value}catch(e){i(e);return}a.done?t(l):Promise.resolve(l).then(n,o)}function r(e){return function(){var t=this,i=arguments;return new Promise(function(n,r){var s=e.apply(t,i);function a(e){o(s,n,r,a,l,"next",e)}function l(e){o(s,n,r,a,l,"throw",e)}a(void 0)})}}class s{getDB(){return this.dbPromise||(this.dbPromise=new Promise((e,t)=>{let i=indexedDB.open(this.dbName,this.DB_VERSION);i.onerror=()=>{t(i.error)},i.onsuccess=()=>{e(i.result)},i.onupgradeneeded=e=>{let t=e.target.result;t.objectStoreNames.contains(this.storeName)||t.createObjectStore(this.storeName)}})),this.dbPromise}performTransaction(e,t){return r(function*(){try{let i=(yield this.getDB()).transaction([this.storeName],e).objectStore(this.storeName),n=t(i);return new Promise((e,t)=>{n.onsuccess=()=>{e(n.result)},n.onerror=()=>{t(n.error)}})}catch(e){return Promise.reject(e)}}).call(this)}set(e,t){return r(function*(){try{yield this.performTransaction("readwrite",i=>i.put(t,e))}catch(e){n.IS_PROD}return this}).call(this)}delete(e){return r(function*(){try{yield this.performTransaction("readwrite",t=>t.delete(e))}catch(e){}return this}).call(this)}get(e){return r(function*(){try{return yield this.performTransaction("readonly",t=>t.get(e))}catch(e){return}}).call(this)}exists(e){return r(function*(){try{let t=yield this.performTransaction("readonly",t=>t.get(e));return void 0!==t}catch(e){return!1}}).call(this)}clear(){return r(function*(){try{yield this.performTransaction("readwrite",e=>e.clear())}catch(e){}return this}).call(this)}close(){return r(function*(){if(this.dbPromise){try{(yield this.dbPromise).close()}catch(e){}this.dbPromise=null}}).call(this)}keys(){return r(function*(){try{let e=yield this.performTransaction("readonly",e=>e.getAllKeys());return e&&"object"==typeof e&&"then"in e&&(e=yield e),e.map(e=>String(e))}catch(e){return[]}}).call(this)}values(){return r(function*(){try{let e=yield this.performTransaction("readonly",e=>e.getAll());return e&&"object"==typeof e&&"then"in e&&(e=yield e),e}catch(e){return[]}}).call(this)}entries(){return r(function*(){try{let[e,t]=yield Promise.all([this.keys(),this.values()]);return e.map((e,i)=>[e,t[i]])}catch(e){return[]}}).call(this)}constructor(e="JoditDB",t="keyValueStore"){this.dbName=e,this.dbPromise=null,this.DB_VERSION=1,this.storeName=t}}let a=null;function l(){a=null}function u(){return r(function*(){if(null!=a)return a;try{if("u"<typeof indexedDB)return a=!1,!1;let e="___Jodit___"+Math.random().toString(),t=indexedDB.open(e);return a=yield new Promise(i=>{t.onerror=()=>{i(!1)},t.onsuccess=()=>{indexedDB.deleteDatabase(e),i(!0)}})}catch(e){return a=!1,!1}})()}},65638:function(e,t,i){"use strict";i.d(t,{LocalStorageProvider:function(){return n}});class n{get storage(){return"sessionStorage"===this.strategy?sessionStorage:localStorage}set(e,t){try{let i=this.storage.getItem(this.rootKey),n=i?JSON.parse(i):{};n[e]=t,this.storage.setItem(this.rootKey,JSON.stringify(n))}catch(e){}return this}delete(e){try{let t=this.storage.getItem(this.rootKey);if(t){let i=JSON.parse(t);delete i[e],this.storage.setItem(this.rootKey,JSON.stringify(i))}}catch(e){}return this}get(e){try{let t=this.storage.getItem(this.rootKey),i=t?JSON.parse(t):{};return void 0!==i[e]?i[e]:void 0}catch(e){}}exists(e){return null!=this.get(e)}clear(){try{this.storage.removeItem(this.rootKey)}catch(e){}return this}constructor(e,t="localStorage"){this.rootKey=e,this.strategy=t}}i.d(t,["canUsePersistentStorage",0,(e="localStorage")=>{let t=new Map;if(t.has(e))return t.get(e);let i="___Jodit___"+Math.random().toString(),n="sessionStorage"===e?sessionStorage:localStorage;try{n.setItem(i,"1");let o="1"===n.getItem(i);return n.removeItem(i),t.set(e,o),o}catch(e){}return t.set(e,!1),!1}])},21162:function(e,t,i){"use strict";i.d(t,{MemoryStorageProvider:function(){return n}});class n{set(e,t){return this.data.set(e,t),this}delete(e){return this.data.delete(e),this}get(e){return this.data.get(e)}exists(e){return this.data.has(e)}clear(){return this.data.clear(),this}constructor(){this.data=new Map}}},12081:function(e,t,i){"use strict";i.d(t,{AsyncStorage:function(){return n.AsyncStorage},IndexedDBProvider:function(){return o.IndexedDBProvider},LocalStorageProvider:function(){return r.LocalStorageProvider},MemoryStorageProvider:function(){return s.MemoryStorageProvider},Storage:function(){return a.Storage},StorageKey:function(){return"Jodit_"},canUseIndexedDB:function(){return o.canUseIndexedDB},canUsePersistentStorage:function(){return r.canUsePersistentStorage},clearUseIndexedDBCache:function(){return o.clearUseIndexedDBCache}});var n=i(97333),o=i(2621),r=i(65638),s=i(21162),a=i(6700)},6700:function(e,t,i){"use strict";i.d(t,{Storage:function(){return a}});var n=i(87058),o=i(65638),r=i(21162);let s="Jodit_";class a{set(e,t){return this.provider.set((0,n.camelCase)(this.prefix+e),t),this}delete(e){return this.provider.delete((0,n.camelCase)(this.prefix+e)),this}get(e){return this.provider.get((0,n.camelCase)(this.prefix+e))}exists(e){return this.provider.exists((0,n.camelCase)(this.prefix+e))}clear(){return this.provider.clear(),this}static makeStorage(e=!1,t){let i;return"localStorage"===e||"sessionStorage"===e?(0,o.canUsePersistentStorage)(e)&&(i=new o.LocalStorageProvider(s+(t||""),e)):!0===e&&(0,o.canUsePersistentStorage)("localStorage")&&(i=new o.LocalStorageProvider(s+(t||""))),i||(i=new r.MemoryStorageProvider),new a(i,t)}constructor(e,t){this.provider=e,this.prefix=s,t&&(this.prefix+=t)}}},70231:function(e,t,i){"use strict";i.d(t,{Dlgs:function(){return a}});var n=i(580),o=i(27613),r=i(37790),s=i(638);class a{dlg(e){let t=(0,n.getPopupViewRoot)(this.o,this.container,this.od.body),i=new s.Dialog(function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{},n=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(i).filter(function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable}))),n.forEach(function(t){var n;n=i[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({language:this.o.language,shadowRoot:this.o.shadowRoot,popupRoot:t,ownerWindow:this.o.ownerWindow,defaultTimeout:this.o.defaultTimeout,direction:this.o.direction,theme:this.o.theme,globalFullSize:this.o.globalFullSize},e));return(0,r.markOwner)(this,i.container),i.parent=this,i.bindDestruct(this)}confirm(e,t,i){return e=l(e,this),t=l(t,this),s.Confirm.call(this.dlg({closeOnClickOverlay:!0}),e,t,i)}prompt(e,t,i,n,o){return e=l(e,this),t=l(t,this),n=l(n,this),s.Prompt.call(this.dlg({closeOnClickOverlay:!0}),e,t,i,n,o)}alert(e,t,i,n){return e=l(e,this),t=l(t,this),s.Alert.call(this.dlg({closeOnClickOverlay:!0}),e,t,i,n)}}function l(e,t){return(0,o.isString)(e)&&!(0,o.isHTML)(e)&&(e=t.i18n(e)),e}},14316:function(e,t,i){"use strict";i.d(t,{Elms:function(){return o}});var n=i(2748);class o{getElm(e){let t=this.getFullElName(e);return n.Dom.first(this.container,e=>n.Dom.isHTMLElement(e)&&e.classList.contains(t))}getElms(e){let t=this.getFullElName(e),i=[];return n.Dom.each(this.container,e=>{n.Dom.isHTMLElement(e)&&e.classList.contains(t)&&i.push(e)}),i}}},34176:function(e,t,i){"use strict";i.d(t,{Mods:function(){return o}});var n=i(86068);class o{afterSetMod(e,t){}setMod(e,t,i){e=e.toLowerCase();let o=this.mods[e];if(o===t)return this;let r=`${this.componentName}_${e}_`,s=(i||this.container).classList;return null!=o&&s.remove(`${r}${o.toString().toLowerCase()}`),(0,n.isVoid)(t)||""===t||s.add(`${r}${t.toString().toLowerCase()}`),this.mods[e]=t,this.afterSetMod(e,t),this}getMod(e){var t;return null!=(t=this.mods[e])?t:null}}},10830:function(e,t,i){"use strict";i.d(t,{Button:function(){return b},UIButton:function(){return g}});var n=i(78213),o=i(33433),r=i(87325),s=i(37133),a=i(2748),l=i(23282),u=i(70799),c=i(38837),d=i(29960),h=i(48538),p=i(12153),f=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let m=()=>({size:"middle",type:"button",role:"button",name:"",value:"",variant:"initial",disabled:!1,activated:!1,icon:{name:"empty",fill:"",iconURL:"",scale:void 0},tooltip:"",text:"",tabIndex:void 0}),g=class e extends h.UIElement{className(){return"UIButton"}setState(e){return Object.assign(this.state,e),this}get text(){let e=this.getElm("text");return(0,c.assert)(e,"Text element not found"),e}get icon(){let e=this.getElm("icon");return(0,c.assert)(e,"Icon element not found"),e}onChangeSize(){this.setMod("size",this.state.size)}onChangeType(){(0,d.attr)(this.container,"type",this.state.type)}onChangeRole(){(0,d.attr)(this.container,"role",this.state.role)}updateSize(){let e=(0,r.getComponentClass)("UIList"),t=this.closest(e);if(t){this.state.size=t.buttonSize;return}}onChangeStatus(){this.setMod("variant",this.state.variant)}onChangeText(){this.text.textContent=this.jodit.i18n(this.state.text),this.updateAriaLabel()}onChangeTextSetMode(){this.setMod("text-icons",!!this.state.text.trim().length)}onChangeDisabled(){(0,d.attr)(this.container,"disabled",this.state.disabled||null)}onChangeActivated(){(0,d.attr)(this.container,"aria-pressed",this.state.activated)}onChangeName(){this.container.classList.add(`${this.componentName}_${this.clearName(this.state.name)}`),this.name=this.state.name,(0,d.attr)(this.container,"data-ref",this.state.name),(0,d.attr)(this.container,"ref",this.state.name)}onChangeTooltip(){let e=this.state.tooltip?this.jodit.i18n(this.state.tooltip):null;this.get("j.o.useNativeTooltip")&&(0,d.attr)(this.container,"title",e),(0,d.attr)(this.container,"aria-label",e),this.updateAriaLabel()}updateAriaLabel(){let e=this.state.text.trim().length>0,t=this.state.tooltip?this.jodit.i18n(this.state.tooltip):null;(0,d.attr)(this.container,"aria-label",t),(0,d.attr)(this.button,"aria-label",e?null:t)}onChangeTabIndex(){(0,d.attr)(this.container,"tabindex",this.state.tabIndex)}onChangeIcon(){let e=this.get("j.o.textIcons");if(!0===e||(0,l.isFunction)(e)&&e(this.state.name))return;a.Dom.detach(this.icon);let t=p.Icon.makeIcon(this.j,this.state.icon);t&&a.Dom.append(this.icon,t)}focus(){this.container.focus()}isFocused(){let{activeElement:e}=this.od;return!!(e&&a.Dom.isOrContains(this.container,e))}createContainer(){let e=this.componentName,t=this.j.c.element("button",{class:e,type:"button",role:"button",ariaPressed:!1}),i=this.j.c.span(e+"__icon"),n=this.j.c.span(e+"__text");return a.Dom.append(t,i),a.Dom.append(t,n),t}destruct(){return this.j.e.off(this),this.j.e.off(this.container),super.destruct()}onAction(e){return this.actionHandlers.push(e),this}__onActionFire(e){e.buffer={actionTrigger:this},this.actionHandlers.forEach(t=>t.call(this,e)),this.j.e.fire(this,"click",e)}constructor(e,t){super(e),this.isButton=!0,this.state=m(),this.actionHandlers=[],this.button=this.container,this.updateSize(),this.onChangeSize(),this.onChangeStatus(),t&&this.hookStatus(n.STATUSES.ready,()=>{this.setState(t)})}};function b(e,t,i,n){let o=new g(e);return o.state.tabIndex=e.o.allowTabNavigation?0:-1,(0,u.isString)(t)?(o.state.icon.name=t,o.state.name=t,n&&(o.state.variant=n),i&&(o.state.text=i)):o.setState(t),o}f([o.cache],g.prototype,"text",null),f([o.cache],g.prototype,"icon",null),f([(0,s.watch)("state.size",{immediately:!1})],g.prototype,"onChangeSize",null),f([(0,s.watch)("state.type",{immediately:!1})],g.prototype,"onChangeType",null),f([(0,s.watch)("state.role",{immediately:!1})],g.prototype,"onChangeRole",null),f([(0,s.watch)("parentElement")],g.prototype,"updateSize",null),f([(0,s.watch)("state.variant",{immediately:!1})],g.prototype,"onChangeStatus",null),f([(0,s.watch)("state.text",{immediately:!1})],g.prototype,"onChangeText",null),f([(0,s.watch)("state.text",{immediately:!1})],g.prototype,"onChangeTextSetMode",null),f([(0,s.watch)("state.disabled")],g.prototype,"onChangeDisabled",null),f([(0,s.watch)("state.activated")],g.prototype,"onChangeActivated",null),f([(0,s.watch)("state.name",{immediately:!1})],g.prototype,"onChangeName",null),f([(0,s.watch)("state.tooltip",{immediately:!1})],g.prototype,"onChangeTooltip",null),f([(0,s.watch)("state.tabIndex",{immediately:!1})],g.prototype,"onChangeTabIndex",null),f([(0,s.watch)("state.icon",{immediately:!1})],g.prototype,"onChangeIcon",null),f([o.cacheHTML],g.prototype,"createContainer",null),f([(0,s.watch)("button:click")],g.prototype,"__onActionFire",null),g=f([r.component],g),i.d(t,["UIButtonState",0,m])},71916:function(e,t,i){"use strict";i.d(t,{UIButtonGroup:function(){return l}});var n=i(87325),o=i(2748),r=i(38837),s=i(10830),a=i(62405);let l=class e extends a.UIGroup{className(){return"UIButtonGroup"}render(e){return`<div>
9
9
  <div class="&__label">~${e.label}~</div>
10
10
  <div class="&__options"></div>
11
11
  </div>`}appendChildToContainer(e){let t=this.getElm("options");(0,r.assert)(null!=t,"Options does not exist"),o.Dom.append(t,e)}select(e){var t,i;this.elements.forEach((t,i)=>{i===e||t.state.value===e?t.state.activated=!0:this.options.radio&&(t.state.activated=!1)});let n=this.elements.filter(e=>e.state.activated).map(e=>({text:e.state.text,value:e.state.value}));this.jodit.e.fire(this,"select",n),null==(i=(t=this.options).onChange)||i.call(t,n)}constructor(e,t={radio:!0}){var i,n;super(e,null==(i=t.options)?void 0:i.map(t=>{let i=new s.UIButton(e,{text:t.text,value:t.value,variant:"primary"});return i.onAction(()=>{this.select(t.value)}),i}),t),this.options=t,this.select(null!=(n=t.value)?n:0)}};l=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([n.component],l)},62843:function(e,t,i){"use strict";i.d(t,{Button:function(){return n.Button},UIButton:function(){return n.UIButton},UIButtonGroup:function(){return o.UIButtonGroup},UIButtonState:function(){return n.UIButtonState},UITooltip:function(){return r.UITooltip}});var n=i(10830),o=i(71916),r=i(57340)},57340:function(e,t,i){"use strict";i.d(t,{UITooltip:function(){return m}});var n,o=i(91907),r=i(65478),s=i(22732),a=i(580),l=i(35224),u=i(5700),c=i(43555),d=i(48538),h=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let p=["scroll.tooltip","joditCloseDialog","mouseleave.tooltip"],f=["escape.tooltip","change.tooltip","changePlace.tooltip","afterOpenPopup.tooltip","hidePopup.tooltip","beforePopupClose.tooltip","closeAllPopups.tooltip"],m=n=class e extends d.UIElement{className(){return"UITooltip"}render(){return'<div><div class="&__content"></div></div>'}__onAttach(e){s.Dom.append((0,a.getContainer)(this.j,n),this.container),this.__attachedContainers.add(e),this.__attachedContainers.add(this.j.container),this.j.e.on(e,"mouseenter.tooltip",this.__onMouseEnter,{capture:!0}).on(e,"mouseleave.tooltip",this.__onMouseLeave,{capture:!0}).on(this.j.container,"mouseleave.tooltip",this.__onMouseLeave,{capture:!0})}__addListenersOnEnter(){if(this.__listenClose)return;this.__listenClose=!0;let e=this.j;e.e.on(e.ow,p,this.__hide).on(f,this.__hide)}__removeListenersOnLeave(){if(!this.__listenClose)return;this.__listenClose=!1;let e=this.j;e.e.off(e.ow,p,this.__hide).off(f,this.__hide)}__onMouseLeave(e){this.__currentTarget===e.target&&(this.__hideDelay(),this.__currentTarget=null)}__onMouseEnter(e){if(!s.Dom.isHTMLElement(e.target))return;let t=(0,c.attr)(e.target,"aria-label");if(!t||(0,c.attr)(e.target,"disabled")||!e.target.className.includes("jodit"))return;this.__currentTarget=e.target;let i=e.target;this.__open(()=>{let e=(0,u.position)(i);return{x:e.left+e.width/2,y:e.top+e.height}},t)}__open(e,t){this.__addListenersOnEnter(),this.__isOpened=!0,this.j.async.clearTimeout(this.__hideTimeout),this.j.async.clearTimeout(this.__delayShowTimeout);let i=this.j.o.showTooltipDelay||this.j.defaultTimeout;i?this.__delayShowTimeout=this.j.async.setTimeout(()=>this.__show(e,t),i):this.__show(e,t)}__show(e,t){this.setMod("visible",!0),this.setMod("above",!1),this.getElm("content").innerHTML=t;let i=e(),n=(0,l.getFixedPositionOffset)(this.container);(0,c.css)(this.container,{left:i.x-n.x,top:i.y-n.y});let o=(0,u.position)(this.container),r=this.j.ow.innerHeight;if(o.top+o.height>r){let e=(0,u.position)(this.__currentTarget);this.setMod("above",!0),(0,c.css)(this.container,{top:e.top-o.height-n.y})}}__hide(){this.j.async.clearTimeout(this.__delayShowTimeout),this.j.async.clearTimeout(this.__hideTimeout),this.__removeListenersOnLeave(),this.__isOpened&&(this.__isOpened=!1,this.setMod("visible",!1),s.Dom.detach(this.getElm("content")),(0,c.css)(this.container,{left:-5e3}))}__hideDelay(){this.j.async.clearTimeout(this.__delayShowTimeout),this.j.async.clearTimeout(this.__hideTimeout),this.__isOpened&&(this.__hideTimeout=this.async.setTimeout(this.__hide,this.j.defaultTimeout))}destruct(){this.__attachedContainers.forEach(e=>{this.j.e.off(e,"mouseenter.tooltip",this.__onMouseEnter).off(e,"mouseleave.tooltip",this.__onMouseLeave)}),this.__hide(),super.destruct()}constructor(e){super(e),this.__isOpened=!1,this.__attachedContainers=new Set,this.__listenClose=!1,this.__currentTarget=null,this.__delayShowTimeout=0,this.__hideTimeout=0,e.o.textIcons||!e.o.showTooltip||e.o.useNativeTooltip||(this.j.e.on("getContainer",e=>{this.__onAttach(e)}),e.hookStatus(o.STATUSES.ready,()=>{this.__onAttach(this.j.container)}))}};h([r.autobind],m.prototype,"__onMouseLeave",null),h([r.autobind],m.prototype,"__onMouseEnter",null),h([r.autobind],m.prototype,"__hide",null),h([r.autobind],m.prototype,"__hideDelay",null),m=n=h([r.component],m)},48538:function(e,t,i){"use strict";i.d(t,{UIElement:function(){return h}});var n,o=i(91907),r=i(55153),s=i(2748),a=i(70799),l=i(29960),u=i(14316),c=i(34176),d=i(12153);let h=n=class e extends o.ViewComponent{getRole(){var e;return(null==(e=this.options)?void 0:e.role)||""}get parentElement(){return this.__parentElement}set parentElement(e){this.__parentElement=e,e&&e.hookStatus("beforeDestruct",()=>this.destruct()),this.updateParentElement(this)}bubble(e){let t=this.parentElement;for(;t;)e(t),t=t.parentElement;return this}updateParentElement(e){var t;return null==(t=this.__parentElement)||t.updateParentElement(e),this}get(e,t){return super.get(e,t)||this.getElm(e)}closest(e){let t="object"==typeof e?t=>t===e:t=>o.Component.isInstanceOf(t,e),i=this.__parentElement;for(;i;){if(t(i))return i;i=!i.parentElement&&i.container.parentElement?n.closestElement(i.container.parentElement,n):i.parentElement}return null}static closestElement(e,t){let i=s.Dom.up(e,e=>{if(e){let{component:i}=e;return i&&o.Component.isInstanceOf(i,t)}return!1});return i?null==i?void 0:i.component:null}update(){}appendTo(e){return s.Dom.append(e,this.container),this}clearName(e){return e.replace(/[^a-zA-Z0-9]/g,"_")}render(e){return this.j.c.div(this.componentName)}createContainer(e){let t=this.render(e);if((0,a.isString)(t)){let e=this.parseTemplate(t);return e.classList.add(this.componentName),e}return t}parseTemplate(e){return this.j.c.fromHTML(e.replace(/\*([^*]+?)\*/g,(e,t)=>d.Icon.get(t)||"").replace(/&_/g,this.componentName+"_").replace(/~([^~]+?)~/g,(e,t)=>this.i18n(t)))}destruct(){return s.Dom.safeRemove(this.container),this.parentElement=null,super.destruct()}constructor(e,t){super(e),this.name="",this.__parentElement=null,this.mods={},this.options=t,this.container=this.createContainer(t);let i=this.getRole();i&&(0,l.attr)(this.container,"role",i),Object.defineProperty(this.container,"component",{value:this,configurable:!0})}};h=n=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([(0,r.derive)(c.Mods,u.Elms)],h)},19070:function(e,t,i){"use strict";i.d(t,{UIBlock:function(){return s}});var n=i(87325),o=i(43555),r=i(62405);let s=class e extends r.UIGroup{className(){return"UIBlock"}constructor(e,t,i={align:"left"}){super(e,t),this.options=i,this.setMod("align",this.options.align||"left"),this.setMod("width",this.options.width||""),this.options.mod&&this.setMod(this.options.mod,!0),this.options.className&&this.container.classList.add(this.options.className),(0,o.attr)(this.container,"data-ref",i.ref),(0,o.attr)(this.container,"ref",i.ref)}};s=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([n.component],s)},86327:function(e,t,i){"use strict";i.d(t,{UIForm:function(){return u}});var n=i(4012),o=i(87325),r=i(43555),s=i(80256),a=i(12234),l=i(62405);let u=class e extends l.UIGroup{className(){return"UIForm"}submit(){this.j.e.fire(this.container,"submit")}validate(){for(let e of this.allChildren.filter(e=>n.Component.isInstanceOf(e,s.UIInput)))if(!e.validate())return!1;for(let e of this.allChildren.filter(e=>n.Component.isInstanceOf(e,a.UISelect)))if(!e.validate())return!1;return!0}onSubmit(e){return this.j.e.on(this.container,"submit",()=>{let t=this.allChildren.filter(e=>n.Component.isInstanceOf(e,s.UIInput));return!!this.validate()&&(e(t.reduce((e,t)=>(e[t.state.name]=t.value,e),{})),!1)}),this}createContainer(){let e=this.j.c.element("form");return e.classList.add(this.componentName),(0,r.attr)(e,"dir",this.j.o.direction||"auto"),(0,r.attr)(e,"novalidate",""),e}constructor(...e){var t,i;super(...e),(null==(t=this.options)?void 0:t.className)&&this.container.classList.add(null==(i=this.options)?void 0:i.className)}};u=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s}([o.component],u)},2525:function(e,t,i){"use strict";i.d(t,{UIBlock:function(){return n.UIBlock},UICheckbox:function(){return r.UICheckbox},UIFileInput:function(){return r.UIFileInput},UIForm:function(){return o.UIForm},UIInput:function(){return r.UIInput},UISelect:function(){return r.UISelect},UITextArea:function(){return r.UITextArea}});var n=i(19070),o=i(86327),r=i(8959)},85120:function(e,t,i){"use strict";i.d(t,{UITextArea:function(){return h}});var n,o,r,s=i(65478),a=i(87325),l=i(41180),u=i(80256);function c(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{},n=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(i).filter(function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable}))),n.forEach(function(t){var n;n=i[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}var d=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let h=r=class e extends u.UIInput{className(){return"UITextArea"}createNativeInput(e){return this.j.create.element("textarea")}onChangeStateSize(){let{size:e,resizable:t}=this.state;(0,l.css)(this.nativeInput,"resize",t?"auto":"none"),this.nativeInput.rows=null!=e?e:5}constructor(e,t){super(e,t),this.state=c({},r.defaultState),Object.assign(this.state,t),!1===this.state.resizable&&(0,l.css)(this.nativeInput,"resize","none")}};h.defaultState=(n=c({},u.UIInput.defaultState),o=o={size:5,resizable:!0},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(o)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t.push.apply(t,i)}return t})(Object(o)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(o,e))}),n),d([(0,s.watch)(["state.size","state.resizable"])],h.prototype,"onChangeStateSize",null),h=r=d([a.component],h)},17328:function(e,t,i){"use strict";i.d(t,{UICheckbox:function(){return c}});var n,o=i(65478),r=i(2748),s=i(80256);function a(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{},n=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(i).filter(function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable}))),n.forEach(function(t){var n;n=i[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}function l(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t.push.apply(t,i)}return t})(Object(t)).forEach(function(i){Object.defineProperty(e,i,Object.getOwnPropertyDescriptor(t,i))}),e}var u=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};let c=n=class e extends s.UIInput{className(){return"UICheckbox"}render(){return this.j.c.element("label",{className:this.componentName})}onChangeChecked(){this.value=this.state.checked.toString(),this.nativeInput.checked=this.state.checked,this.setMod("checked",this.state.checked)}onChangeNativeCheckBox(){this.state.checked=this.nativeInput.checked}onChangeSwitch(){this.setMod("switch",this.state.switch);let e=this.getElm("switch-slider");this.state.switch?(e||(e=this.j.c.div(this.getFullElName("switch-slider"))),r.Dom.after(this.nativeInput,e)):r.Dom.safeRemove(e)}constructor(e,t){super(e,l(a({},t),{type:"checkbox"})),this.state=a({},n.defaultState),Object.assign(this.state,t)}};c.defaultState=l(a({},s.UIInput.defaultState),{checked:!1,switch:!1}),u([(0,o.watch)("state.checked"),(0,o.hook)("ready")],c.prototype,"onChangeChecked",null),u([(0,o.watch)("nativeInput:change")],c.prototype,"onChangeNativeCheckBox",null),u([(0,o.watch)("state.switch"),(0,o.hook)("ready")],c.prototype,"onChangeSwitch",null),c=n=u([o.component],c)},4242:function(e,t,i){"use strict";i.d(t,{UIFileInput:function(){return l}});var n=i(87325),o=i(2748),r=i(10830),s=i(80256);function a(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{},n=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(i).filter(function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable}))),n.forEach(function(t){var n;n=i[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}let l=class e extends s.UIInput{className(){return"UIFileInput"}createContainer(e){this.button=new r.UIButton(this.j,{tooltip:e.tooltip,icon:{name:"plus"}});let{container:t}=this.button;this.nativeInput||(this.nativeInput=this.createNativeInput(e));let{nativeInput:i}=this;return i.classList.add(this.getFullElName("input")),t.classList.add(this.componentName),o.Dom.append(t,i),t}createNativeInput(e){return this.j.create.fromHTML(`<input
@@ -253,7 +253,7 @@
253
253
  tabindex="-1"
254
254
  >${e.o.specialCharacters[t]}</a>`);a.push(s),o.Dom.append(r,s),o.Dom.append(i,r)}o.Dom.append(r,i)}let l=this;return e.e.on(a,"focus",function(){i.innerHTML=this.innerHTML}).on(a,"mousedown",function(t){o.Dom.isTag(this,"a")&&(e.s.focus(),e.s.insertHTML(this.innerHTML),(null==t?void 0:t.shiftKey)||e.e.fire(this,"close_dialog"),t&&t.preventDefault(),t&&t.stopImmediatePropagation())}).on(a,"mouseenter",function(){o.Dom.isTag(this,"a")&&this.focus()}).on(a,"keydown",t=>{let i=t.target;if(o.Dom.isTag(i,"a")){let o,r=parseInt((0,s.attr)(i,"-index")||"0",10),u=parseInt((0,s.attr)(i,"data-index-j")||"0",10);switch(t.key){case n.KEY_UP:case n.KEY_DOWN:void 0===a[o=t.key===n.KEY_UP?r-l.__countInRow:r+l.__countInRow]&&(o=t.key===n.KEY_UP?Math.floor(a.length/l.__countInRow)*l.__countInRow+u:u)>a.length-1&&(o-=l.__countInRow),a[o]&&a[o].focus();break;case n.KEY_RIGHT:case n.KEY_LEFT:void 0===a[o=t.key===n.KEY_LEFT?r-1:r+1]&&(o=t.key===n.KEY_LEFT?a.length-1:0),a[o]&&a[o].focus();break;case n.KEY_ENTER:e.e.fire(i,"mousedown"),t.stopImmediatePropagation(),t.preventDefault()}}}),t})}beforeDestruct(e){e.e.off("generateSpecialCharactersTable.symbols")}constructor(e){super(e),this.buttons=[{name:"symbols",group:"insert"}],this.__countInRow=17,(0,r.extendLang)(l)}}r.pluginSystem.add("symbols",u)},5119:function(e,t){"use strict";t.default='<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 17v3h7v-3a7 7 0 1 1 4 0v3h7v-3"/> </g> </svg> '},47686:function(e,t,i){"use strict";i.d(t,{onTabInsideLi:function(){return n.onTabInsideLi}});var n=i(26658)},26658:function(e,t,i){"use strict";i.d(t,{onTabInsideLi:function(){return r}});var n=i(2748),o=i(38837);function r(e,t=!1){let i,s,a,l;if(!e.o.tab.tabInsideLiInsertNewList)return!1;let[u,c]=(i=e.createInside.fake(),s=e.createInside.fake(),(a=e.s.range.cloneRange()).collapse(!0),a.insertNode(i),(l=e.s.range.cloneRange()).collapse(!1),l.insertNode(s),[i,s]);try{let i,r,s,a,l,c=!!(i=n.Dom.closest(u,"li",e.editor))&&(!!t||!!n.Dom.isLeaf(i.previousElementSibling))&&(!t||!!n.Dom.closest(i,"li",e.editor))&&i;if(!c||!(r=n.Dom.closest(u,"li",e.editor))||r!==c&&!c.contains(r))return!1;let d=n.Dom.closest(c,["ol","ul"],e.editor);if(!d||t&&!n.Dom.closest(d,"li",e.editor))return!1;return t?function(e,t,i){let r=n.Dom.closest(t,"li",e.editor);(0,o.assert)(r,"tab parent li is null");let s=Array.from(t.children).filter(e=>n.Dom.isLeaf(e));n.Dom.after(r,i);let a=s.indexOf(i);if((0===a||1===s.length)&&n.Dom.safeRemove(t),a!==s.length-1){let e=t.cloneNode();n.Dom.append(i,e);for(let t=a+1;t<s.length;t+=1)n.Dom.append(e,s[t])}}(e,d,c):(s=c.previousElementSibling,(0,o.assert)(s,"tab previousElementSibling is null"),a=s.lastElementChild,l=n.Dom.isTag(a,d.tagName)?a:e.createInside.element(d.tagName,Array.from(d.attributes).reduce((e,t)=>(e[t.name]=t.value,e),{})),n.Dom.append(l,c),a!==l&&n.Dom.append(s,l)),!0}finally{let t=e.s.createRange();t.setStartAfter(u),t.setEndBefore(c),e.s.selectRange(t),n.Dom.safeRemove(u),n.Dom.safeRemove(c)}}},66288:function(e,t,i){"use strict";i(6441).Config.prototype.tab={tabInsideLiInsertNewList:!0}},767:function(e,t,i){"use strict";var n=i(82758),o=i(65478),r=i(580),s=i(50911);i(66288);var a=i(47686),l=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class u extends s.Plugin{afterInit(e){}__onTab(e){if(e.key===n.KEY_TAB&&this.__onShift(e.shiftKey))return!1}__onCommand(e){if(("indent"===e||"outdent"===e)&&this.__onShift("outdent"===e))return!1}__onShift(e){let t=(0,a.onTabInsideLi)(this.j,e);return t&&this.j.e.fire("afterTab",e),t}beforeDestruct(e){}}l([(0,o.watch)(":keydown.tab")],u.prototype,"__onTab",null),l([(0,o.watch)(":beforeCommand.tab")],u.prototype,"__onCommand",null),r.pluginSystem.add("tab",u)},72439:function(e,t,i){"use strict";var n=i(82758),o=i(2748),r=i(580),s=i(21537),a=i(76014);let l=new Set([n.KEY_TAB,n.KEY_LEFT,n.KEY_RIGHT,n.KEY_UP,n.KEY_DOWN]);r.pluginSystem.add("tableKeyboardNavigation",function(e){e.e.off(".tableKeyboardNavigation").on("keydown.tableKeyboardNavigation",t=>{let{key:i}=t,r=function(e,t){if(!l.has(t))return;let i=e.s.current();if(!i)return;let r=o.Dom.up(i,o.Dom.isCell,e.editor);if(!r)return;let{range:a}=e.s;if(t!==n.KEY_TAB&&i!==r){let e=t===n.KEY_RIGHT||t===n.KEY_DOWN,l=(0,s.call)(e?o.Dom.next:o.Dom.prev,i,e=>t===n.KEY_UP||t===n.KEY_DOWN?o.Dom.isTag(e,"br"):!!e,r);if(!e&&(l||t!==n.KEY_UP&&o.Dom.isText(i)&&0!==a.startOffset)||e&&(l||t!==n.KEY_DOWN&&o.Dom.isText(i)&&i.nodeValue&&a.startOffset!==i.nodeValue.length))return}return r}(e,i);if(!r)return;let u=e.getInstance(a.Table,e.o),c=o.Dom.closest(r,"table",e.editor),d=null,h=i===n.KEY_LEFT||t.shiftKey,p=()=>(0,s.call)(h?o.Dom.prev:o.Dom.next,r,o.Dom.isCell,c);switch(i){case n.KEY_TAB:case n.KEY_LEFT:(d=p())||(u.appendRow(c,!!h&&o.Dom.first(c,e=>o.Dom.isTag(e,"tr")),!h),d=p());break;case n.KEY_UP:case n.KEY_DOWN:{let e=u.formalMatrix(c),[t,o]=u.formalCoordinate(c,r);i===n.KEY_UP?void 0!==e[t-1]&&(d=e[t-1][o]):void 0!==e[t+1]&&(d=e[t+1][o])}}if(d){if(e.e.fire("hidePopup hideResizer"),d.firstChild)i===n.KEY_TAB?e.s.select(d,!0):e.s.setCursorIn(d,i===n.KEY_RIGHT||i===n.KEY_DOWN);else{let t=e.createInside.element("br");o.Dom.append(d,t),e.s.setCursorBefore(t)}return e.synchronizeValues(),!1}})})},40329:function(e,t,i){"use strict";var n=i(82758),o=i(22732),r=i(21537),s=i(43555),a=i(12153),l=i(6441),u=i(6091);l.Config.prototype.table={splitBlockOnInsertTable:!0,selectionCellStyle:"border: 1px double #1e88e5 !important;",useExtraClassesOptions:!1},a.Icon.set("table",u.default),l.Config.prototype.controls.table={data:{cols:10,rows:10,classList:{"table table-bordered":"Bootstrap Bordered","table table-striped":"Bootstrap Striped","table table-dark":"Bootstrap Dark"}},popup:(e,t,i,a)=>{let l;e.editor.normalize();let u=e.history.snapshot.make(),c=a.control,d=c.data&&c.data.rows?c.data.rows:10,h=c.data&&c.data.cols?c.data.cols:10,p=e.c.fromHTML('<form class="jodit-form jodit-form__inserter"><div class="jodit-form__table-creator-box"><div class="jodit-form__container"></div><div class="jodit-form__options">'+(()=>{if(!e.o.table.useExtraClassesOptions)return"";let t=[];if(c.data){let e=c.data.classList;Object.keys(e).forEach(i=>{t.push(`<label class="jodit_vertical_middle"><input class="jodit-checkbox" value="${i}" type="checkbox"/>${e[i]}</label>`)})}return t.join("")})()+'</div></div><label class="jodit-form__center"><span>1</span> &times; <span>1</span></label></form>'),[f,m]=(l=[],o.Dom.each(p,e=>{o.Dom.isTag(e,"span")&&l.push(e)}),l),g=o.Dom.first(p,e=>o.Dom.isHTMLElement(e)&&e.classList.contains("jodit-form__container")),b=o.Dom.first(p,e=>o.Dom.isHTMLElement(e)&&e.classList.contains("jodit-form__options")),v=[],y=d*h;(0,s.attr)(g,{role:"grid",ariaLabel:"Table size",ariaRowcount:d,ariaColcount:h});for(let t=0;t<y;t+=1)if(!v[t]){let i=Math.floor(t/h)+1,n=t%h+1;v.push(e.c.element("span",{dataIndex:t,role:"gridcell",tabindex:0===t?0:-1,ariaLabel:`${i} by ${n}`}))}let w=e=>{let t=parseInt((0,s.attr)(e,"-index")||"0",10),i=Math.ceil((t+1)/h),n=t%h+1;for(let e=0;e<v.length;e+=1)n>=e%h+1&&i>=Math.ceil((e+1)/h)?v[e].className="jodit_hovered":v[e].className="";m.textContent=n.toString(),f.textContent=i.toString()},_=t=>{let n=parseInt((0,s.attr)(t,"-index")||"0",10),a=Math.ceil((n+1)/h),l=n%h+1,c=e.createInside,d=c.element("tbody"),p=c.element("table");o.Dom.append(p,d);let f=null,m,g;for(let e=1;a>=e;e+=1){m=c.element("tr");for(let e=1;e<=l;e+=1)g=c.element("td"),f||(f=g),(0,r.css)(g,"width",(100/l).toFixed(4)+"%"),o.Dom.append(g,c.element("br")),o.Dom.append(m,c.text("\n")),o.Dom.append(m,c.text(" ")),o.Dom.append(m,g);o.Dom.append(d,c.text("\n")),o.Dom.append(d,m)}(0,r.$$)("input[type=checkbox]:checked",b).forEach(e=>{e.value.split(/[\s]+/).forEach(e=>{p.classList.add(e)})}),e.s.restore(),e.s.removeMarkers(),e.editor.normalize(),e.history.snapshot.restore(u);let v=o.Dom.furthest(e.s.current(),o.Dom.isBlock,e.editor);if(v&&o.Dom.isEmpty(v))o.Dom.replace(v,p,void 0,!1,!0);else if(v){let t=c.text("\n");if(e.o.table.splitBlockOnInsertTable){let i=e.s.range;i.collapse(!1),i.insertNode(t),i.collapse(!1),e.s.selectRange(i);let n=e.s.splitSelection(v,t);n?o.Dom.after(n,p):o.Dom.after(v,p)}else o.Dom.after(v,t),o.Dom.after(t,p)}else e.s.insertNode(p,!1);f&&(e.s.setCursorIn(f),(0,r.scrollIntoViewIfNeeded)(f,e.editor,e.ed)),i()};if(e.e.on(g,"mousemove",e=>{o.Dom.isTag(e.target,"span")&&w(e.target)}).on(g,"touchstart mousedown",e=>{o.Dom.isTag(e.target,"span")&&(e.preventDefault(),e.stopImmediatePropagation(),_(e.target))}).on(g,"keydown",e=>{let t;if(!o.Dom.isTag(e.target,"span"))return;if(e.key===n.KEY_ENTER){e.preventDefault(),e.stopImmediatePropagation(),_(e.target);return}if(e.key===n.KEY_ESC){e.preventDefault(),e.stopImmediatePropagation(),i();return}let r=parseInt((0,s.attr)(e.target,"-index")||"0",10),a=Math.floor(r/h),l=r%h;switch(e.key){case n.KEY_LEFT:t=l>0?r-1:r;break;case n.KEY_RIGHT:t=l<h-1?r+1:r;break;case n.KEY_UP:t=a>0?r-h:r;break;case n.KEY_DOWN:t=a<d-1?r+h:r;break;default:return}e.preventDefault(),e.stopImmediatePropagation(),t!==r&&(v[r].tabIndex=-1,v[t].tabIndex=0,v[t].focus(),w(v[t]))}),a&&a.parentElement){for(let t=0;t<d;t+=1){let i=e.c.div();(0,s.attr)(i,"role","row");for(let e=0;e<h;e+=1)o.Dom.append(i,v[t*h+e]);o.Dom.append(g,i)}v[0]&&(v[0].className="hovered")}return p},tooltip:"Insert table"}},43003:function(e,t,i){"use strict";var n=i(580);i(40329),n.pluginSystem.add("table",function(e){e.registerButton({name:"table",group:"insert"})})},6091:function(e,t){"use strict";t.default='<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"> <rect x="3" y="3" width="18" height="18" rx="2.5"/><path d="M3 9h18M3 15h18M9 3v18M15 3v18"/> </g> </svg> '},14984:function(e,t,i){"use strict";var n=i(21537),o=i(62843),r=i(2525),s=i(12153),a=i(6441),l=i(92762),u=i(37775);a.Config.prototype.video={parseUrlToVideoEmbed:n.convertMediaUrlToVideoEmbed,defaultWidth:400,defaultHeight:345},s.Icon.set("video",u.default),a.Config.prototype.controls.video={popup:(e,t,i)=>{let s=new r.UIForm(e,[new r.UIBlock(e,[new r.UIInput(e,{name:"url",required:!0,label:"URL",placeholder:"https://",validators:["url"]})]),new r.UIBlock(e,[(0,o.Button)(e,"","Insert","primary").onAction(()=>s.submit())])]),a=new r.UIForm(e,[new r.UIBlock(e,[new r.UITextArea(e,{name:"code",required:!0,label:"Embed code"})]),new r.UIBlock(e,[(0,o.Button)(e,"","Insert","primary").onAction(()=>a.submit())])]),u=[],c=t=>{e.s.restore(),e.s.insertHTML(t),i()};return e.s.save(),u.push({icon:"link",name:"Link",content:s.container},{icon:"source",name:"Code",content:a.container}),s.onSubmit(t=>{var i,o,r,s;c((0,n.call)(null!=(o=null==(i=e.o.video)?void 0:i.parseUrlToVideoEmbed)?o:n.convertMediaUrlToVideoEmbed,t.url,{width:null==(r=e.o.video)?void 0:r.defaultWidth,height:null==(s=e.o.video)?void 0:s.defaultHeight}))}),a.onSubmit(e=>{c(e.code)}),(0,l.TabsWidget)(e,u)},tags:["iframe"],tooltip:"Insert youtube/vimeo video"}},26551:function(e,t,i){"use strict";var n=i(580);i(14984),n.pluginSystem.add("video",function(e){e.registerButton({name:"video",group:"media"})})},37775:function(e,t){"use strict";t.default='<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"> <rect x="2" y="5" width="13" height="14" rx="2"/><path d="m15 10 7-4v12l-7-4"/> </g> </svg> '},96967:function(e,t,i){"use strict";i(6441).Config.prototype.wrapNodes={exclude:new Set(["hr","style","br"]),emptyBlockAfterInit:!0}},72253:function(e,t,i){"use strict";var n=i(65478),o=i(22732),r=i(580),s=i(70799),a=i(50911);i(96967);var l=function(e,t,i,n){var o,r=arguments.length,s=r<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,i):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,n);else for(var a=e.length-1;a>=0;a--)(o=e[a])&&(s=(r<3?o(s):r>3?o(t,i,s):o(t,i))||s);return r>3&&s&&Object.defineProperty(t,i,s),s};class u extends a.Plugin{afterInit(e){"br"!==e.o.enter.toLowerCase()&&e.e.on("drop.wtn focus.wtn keydown.wtn mousedown.wtn afterInit.wtn backSpaceAfterDelete.wtn",this.preprocessInput,{top:!0}).on("afterInit.wtn postProcessSetEditorValue.wtn afterCommitStyle.wtn backSpaceAfterDelete.wtn",this.postProcessSetEditorValue)}beforeDestruct(e){e.e.off(".wtn")}postProcessSetEditorValue(){let{jodit:e}=this;if(!e.isEditorMode())return;let t=e.editor.firstChild,i=!1;for(;t;){if(t=function(e,t){let i=e,n=e;do if(o.Dom.isElement(n)&&o.Dom.isLeaf(n)&&!o.Dom.isList(n.parentElement)){let e=o.Dom.findNotEmptySibling(n,!1);o.Dom.isTag(i,"ul")?o.Dom.append(i,n):i=o.Dom.wrap(n,"ul",t.createInside),n=e}else break;while(n);return i}(t,e),this.isSuitableStart(t)){i||e.s.save(),i=!0;let n=e.createInside.element(e.o.enter);for(o.Dom.before(t,n);t&&this.isSuitable(t);){let e=t.nextSibling;o.Dom.append(n,t),t=e}n.normalize(),t=n}t=t&&t.nextSibling}i&&(e.s.restore(),"afterInit"===e.e.current&&e.e.fire("internalChange"))}preprocessInput(){let{jodit:e}=this,t="afterInit"===e.e.current;if(!e.isEditorMode()||e.editor.firstChild||!e.o.wrapNodes.emptyBlockAfterInit&&t)return;let i=e.createInside.element(e.o.enter),n=e.createInside.element("br");o.Dom.append(i,n),o.Dom.append(e.editor,i),(e.s.isFocused()||"backSpaceAfterDelete"===e.e.current)&&e.s.setCursorBefore(n),e.e.fire("internalChange")}constructor(){super(...arguments),this.isSuitableStart=e=>{var t;return o.Dom.isText(e)&&(0,s.isString)(e.nodeValue)&&(/[^\s]/.test(e.nodeValue)||(null==(t=e.parentNode)?void 0:t.firstChild)===e&&this.isSuitable(e.nextSibling))||this.isNotWrapped(e)&&!o.Dom.isTemporary(e)},this.isSuitable=e=>o.Dom.isText(e)||this.isNotWrapped(e),this.isNotWrapped=e=>o.Dom.isElement(e)&&!(o.Dom.isBlock(e)||o.Dom.isTag(e,this.j.o.wrapNodes.exclude))}}l([n.autobind],u.prototype,"postProcessSetEditorValue",null),l([n.autobind],u.prototype,"preprocessInput",null),r.pluginSystem.add("wrapNodes",u)},86012:function(e,t,i){"use strict";i(6441).Config.prototype.showXPathInStatusbar=!0},83671:function(e,t,i){"use strict";var n=i(82758),o=i(22732),r=i(580),s=i(49055),a=i(29960),l=i(76078),u=i(50911),c=i(80870),d=i(21491);i(86012);class h extends u.Plugin{afterInit(){if(this.j.o.showXPathInStatusbar){this.container=this.j.c.div("jodit-xpath"),(0,a.attr)(this.container,"role","list");let e=()=>{this.j.o.showXPathInStatusbar&&this.container&&(this.j.statusbar.append(this.container),this.j.getRealMode()===n.MODE_WYSIWYG?this.calcPath():(this.container&&(this.container.innerHTML=n.INVISIBLE_SPACE),this.appendSelectAll()))};this.j.e.off(".xpath").on("pointerup.xpath change.xpath keydown.xpath changeSelection.xpath",this.calcPath).on("afterSetMode.xpath afterInit.xpath changePlace.xpath",e),e(),this.calcPath()}}beforeDestruct(){this.j&&this.j.events&&this.j.e.off(".xpath"),this.removeSelectAll(),this.menu&&this.menu.destruct(),o.Dom.safeRemove(this.container),delete this.menu,delete this.container}constructor(){super(...arguments),this.onContext=(e,t)=>(this.menu||(this.menu=new c.ContextMenu(this.j)),this.menu.show(t.clientX,t.clientY,[{icon:"bin",title:e===this.j.editor?"Clear":"Remove",exec:()=>{e!==this.j.editor?o.Dom.safeRemove(e):this.j.value="",this.j.synchronizeValues()}},{icon:"select-all",title:"Select",exec:()=>{this.j.s.select(e)}}]),!1),this.onSelectPath=(e,t)=>{this.j.s.focus();let i=(0,a.attr)(t.target,"-path")||"/";if("/"===i)return this.j.execCommand("selectall"),!1;try{let e=this.j.ed.evaluate(i,this.j.editor,null,XPathResult.ANY_TYPE,null).iterateNext();if(e)return this.j.s.select(e),!1}catch(e){}return this.j.s.select(e),!1},this.tpl=(e,t,i,n)=>{let o=this.j.c.fromHTML(`<span class="jodit-xpath__item"><a role="button" data-path="${t}" title="${n}" tabindex="-1"'>${(0,s.trim)(i)}</a></span>`),r=o.firstChild;return this.j.e.on(r,"click",this.onSelectPath.bind(this,e)).on(r,"contextmenu",this.onContext.bind(this,e)),o},this.removeSelectAll=()=>{this.selectAllButton&&(this.selectAllButton.destruct(),delete this.selectAllButton)},this.appendSelectAll=()=>{this.removeSelectAll(),this.selectAllButton=(0,d.makeButton)(this.j,function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{},n=Object.keys(i);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(i).filter(function(e){return Object.getOwnPropertyDescriptor(i,e).enumerable}))),n.forEach(function(t){var n;n=i[t],t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n})}return e}({name:"selectall"},this.j.o.controls.selectall)),this.selectAllButton.state.size="tiny",this.container&&o.Dom.prepend(this.container,this.selectAllButton.container)},this.calcPathImd=()=>{if(this.isDestructed)return;let e=this.j.s.current();if(this.container&&(this.container.innerHTML=n.INVISIBLE_SPACE),e){let t,i,n;o.Dom.up(e,e=>{e&&this.j.editor!==e&&!o.Dom.isText(e)&&!o.Dom.isComment(e)&&(t=e.nodeName.toLowerCase(),i=(0,l.getXPathByElement)(e,this.j.editor).replace(/^\//,""),n=this.tpl(e,i,t,this.j.i18n("Select %s",t)),this.container&&o.Dom.prepend(this.container,n))},this.j.editor)}this.appendSelectAll()},this.calcPath=this.j.async.debounce(this.calcPathImd,2*this.j.defaultTimeout,!0)}}r.pluginSystem.add("xpath",h)},78173:function(e,t){"use strict";t.default='<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="m6 10 6 6 6-6"/> </g> </svg> '},16260:function(e,t){"use strict";t.default='<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="m14 6-6 6 6 6"/> </g> </svg> '},37663:function(e,t){"use strict";t.default='<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="m10 6 6 6-6 6"/> </g> </svg> '},51036:function(e,t){"use strict";t.default='<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="m6 14 6-6 6 6"/> </g> </svg> '},31554:function(e,t){"use strict";t.default='<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 6h18M9 6V4h6v2M5 6l1 14h12l1-14M10 10v6m4-6v6"/> </g> </svg> '},18309:function(e,t){"use strict";t.default='<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="m6 6 12 12M18 6 6 18"/> </g> </svg> '},99762:function(e,t){"use strict";t.default='<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="M5.3333 5.3333h13.3334M2.6667 12h18.6666M5.3333 18.6667h13.3334" stroke-width="2.6667" stroke-linecap="butt"/> </g> </svg> '},7903:function(e,t){"use strict";t.default='<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="M20 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h9m-7 8 4 4L21 5"/> </g> </svg> '},58032:function(e,t){"use strict";t.default='<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 8 8 8 8-8"/> </g> </svg> '},52507:function(e,t){"use strict";t.default='<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"> <circle cx="12" cy="5" r="1"/><circle cx="12" cy="12" r="1"/><circle cx="12" cy="19" r="1"/> </g> </svg> '},1647:function(e,t){"use strict";t.default='<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="M12 3v13m-5-5 5 5 5-5M4 15v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4"/> </g> </svg> '},43478:function(e,t){"use strict";t.default='<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="M2 12s3.5-7 10-7 10 7 10 7-3.5 7-10 7S2 12 2 12Z"/><circle cx="12" cy="12" r="3"/> </g> </svg> '},60097:function(e,t){"use strict";t.default='<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="M14 3H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9l-6-6Zm0 0v6h6"/> </g> </svg> '},49155:function(e,t){"use strict";t.default='<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 7V6a2 2 0 0 1 2-2h4l2 3h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V7Z"/> </g> </svg> '},17555:function(e,t,i){"use strict";i.r(t),i.d(t,{angle_down:function(){return n.default},angle_left:function(){return o.default},angle_right:function(){return r.default},angle_up:function(){return s.default},bin:function(){return a.default},cancel:function(){return l.default},center:function(){return u.default},check:function(){return c.default},chevron:function(){return d.default},dots:function(){return h.default},download:function(){return p.default},eye:function(){return f.default},file:function(){return m.default},folder:function(){return g.default},info_circle:function(){return b.default},left:function(){return v.default},lock:function(){return y.default},ok:function(){return w.default},pencil:function(){return _.default},plus:function(){return C.default},resize_handler:function(){return k.default},right:function(){return S.default},save:function(){return E.default},settings:function(){return x.default},unlock:function(){return F.default},update:function(){return A.default},upload:function(){return D.default},valign:function(){return I.default}});var n=i(78173),o=i(16260),r=i(37663),s=i(51036),a=i(31554),l=i(18309),u=i(99762),c=i(7903),d=i(58032),h=i(52507),p=i(1647),f=i(43478),m=i(60097),g=i(49155),b=i(17176),v=i(57882),y=i(58908),w=i(24829),_=i(4038),C=i(45575),k=i(84858),S=i(445),E=i(36886),x=i(10766),F=i(33651),A=i(20362),D=i(12202),I=i(80152)},17176:function(e,t){"use strict";t.default='<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"> <circle cx="12" cy="12" r="9"/><path d="M12 11v6M12 7h.01"/> </g> </svg> '},57882:function(e,t){"use strict";t.default='<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="M2.6667 5.3333h18.6666M2.6667 12H16M2.6667 18.6667h18.6666" stroke-width="2.6667" stroke-linecap="butt"/> </g> </svg> '},58908:function(e,t){"use strict";t.default='<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"> <rect x="4" y="10" width="16" height="11" rx="2"/><path d="M8 10V7a4 4 0 0 1 8 0v3M12 14v3"/> </g> </svg> '},24829:function(e,t){"use strict";t.default='<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 12 5 5L20 6"/> </g> </svg> '},4038:function(e,t){"use strict";t.default='<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 15 11-11a2.8 2.8 0 0 1 4 4L8 19l-5 2 1-6Zm9-9 4 4"/> </g> </svg> '},45575:function(e,t){"use strict";t.default='<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="M12 5v14M5 12h14"/> </g> </svg> '},84858:function(e,t){"use strict";t.default='<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="m7 20 13-13m-6 13 6-6"/> </g> </svg> '},445:function(e,t){"use strict";t.default='<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="M2.6667 5.3333h18.6666M8 12h13.3333M2.6667 18.6667h18.6666" stroke-width="2.6667" stroke-linecap="butt"/> </g> </svg> '},36886:function(e,t){"use strict";t.default='<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="M5 3h12l4 4v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2ZM7 3v6h9V3M7 21v-7h10v7"/> </g> </svg> '},10766:function(e,t){"use strict";t.default='<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="m10 2-.5 2.5-2 1.2L5 5l-2 3.5 2 1.7v2.6l-2 1.7L5 18l2.5-.7 2 1.2L10 21h4l.5-2.5 2-1.2 2.5.7 2-3.5-2-1.7v-2.6l2-1.7L19 5l-2.5.7-2-1.2L14 2Z"/><circle cx="12" cy="11.5" r="3"/> </g> </svg> '},33651:function(e,t){"use strict";t.default='<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"> <rect x="4" y="10" width="16" height="11" rx="2"/><path d="M8 10V7a4 4 0 0 1 7.5-2M12 14v3"/> </g> </svg> '},20362:function(e,t){"use strict";t.default='<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="M20 9a8.5 8.5 0 1 0 .5 7M20 3v6h-6"/> </g> </svg> '},12202:function(e,t){"use strict";t.default='<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="M12 16V3m-5 5 5-5 5 5M4 15v4a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-4"/> </g> </svg> '},80152:function(e,t){"use strict";t.default='<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="M12 3v18M7 8l5-5 5 5M7 16l5 5 5-5"/> </g> </svg> '},62357:function(e,t,i){"use strict";i.d(t,{UIRange:function(){return c}});var n=i(82749),o=i(56075),r=i(11886),s=i(31635),a=i(65478),l=i(21537),u=i(67510);class c extends u.UIInput{className(){return"UIRange"}appendUIRange(){let e=this.j.create.div(this.getFullElName("slider"));this.container.appendChild(e);let t=this.j.create.div(this.getFullElName("handle"));e.appendChild(t);let i=this.j.create.div(this.getFullElName("log")),n=this.getElm("label");n&&n.appendChild(i)}onDragStart(e){this.startValue=parseFloat(this.value)||0,this.startX=e.clientX;let t=this.getElm("slider");(0,l.assert)(null!=t,"slider element does not exists"),this.width=t.offsetWidth,this.j.e.on(this.j.ow,"mousemove",this.onDrag)}onDrag(e){let{min:t,max:i,step:n=1}=this.state,o=(e.clientX-this.startX)/this.width*(this.state.max-this.state.min),r=this.startValue+o;r<t&&(r=t),r>i&&(r=i),r=Math.round(r/n)*n,this.value=r.toFixed(10)}onDragEnd(){this.j.e.off(this.j.ow,"mousemove",this.onDrag)}onChangeSelfValue(){let e=this.getElm("handle"),t=parseFloat(this.value)||0;(0,l.assert)(null!=e,"Handle element does not exist"),(0,l.css)(e,{left:(t-this.state.min)/(this.state.max-this.state.min)*100+"%"});let i=this.getElm("log");(0,l.assert)(null!=i,"log element does not exist"),i.innerText=t.toString()}destruct(){return this.onDragEnd(),super.destruct()}constructor(e,t){super(e,(0,r._)((0,o._)({},t),{type:"hidden"})),(0,n._)(this,"state",(0,r._)((0,o._)({},u.UIInput.defaultState),{min:0,max:100,step:1})),(0,n._)(this,"startValue",0),(0,n._)(this,"startX",0),(0,n._)(this,"width",100),Object.assign(this.state,t),this.appendUIRange(),this.onChangeSelfValue()}}(0,s.__decorate)([(0,a.watch)(["handle:mousedown","handle:touchstart"])],c.prototype,"onDragStart",null),(0,s.__decorate)([a.autobind],c.prototype,"onDrag",null),(0,s.__decorate)([(0,a.watch)(["j.ow:mouseup","j.ow:touchend"])],c.prototype,"onDragEnd",null),(0,s.__decorate)([(0,a.watch)(":change")],c.prototype,"onChangeSelfValue",null),c=(0,s.__decorate)([a.component],c)},31356:function(e,t,i){"use strict";i.d(t,{ListReconciler:function(){return n}});class n{static reconcile(e,t,i){let{getId:n,isEqual:o=(e,t)=>n(e)===n(t),preserveOrder:r=!0}=i,s=new Map,a=new Map;e.forEach((e,t)=>{let i=n(e);s.set(i,e),a.set(i,t)});let l=new Map,u=new Map;t.forEach((e,t)=>{let i=n(e);l.set(i,e),u.set(i,t)});let c=[],d=[],h=[],p=[];return t.forEach((e,t)=>{let i=n(e),l=s.get(i);l?!o(l,e)||r&&a.get(i)!==t?d.push({oldItem:l,newItem:e,index:r?t:a.get(i)}):p.push(l):c.push(e)}),e.forEach(e=>{let t=n(e);l.has(t)||h.push(e)}),{toCreate:c,toUpdate:d,toRemove:h,unchanged:p}}static applyResult(e,t,i={}){t.toRemove.forEach(t=>{let n=e.indexOf(t);if(-1!==n){var o;null==(o=i.onRemove)||o.call(i,t,n),e.splice(n,1)}}),t.toUpdate.forEach(({oldItem:t,newItem:n,index:o})=>{let r=e.indexOf(t);if(-1!==r){var s;null==(s=i.onUpdate)||s.call(i,t,n,o),e[r]=n}}),t.toCreate.forEach(t=>{var n;null==(n=i.onCreate)||n.call(i,t,e.length),e.push(t)})}}},2692:function(e,t,i){"use strict";i.d(t,{JoditPro:function(){return l}});var n=i(77688),o=i(82758),r=i(63799),s=i(41180),a=i(86019);class l extends a.Jodit{static make(e,t){return new this(e,t)}beforeInitHook(){if(o.IS_PROD&&!o.IS_TEST&&this.o.loadExternalConfig)return(0,r.appendScriptAsync)(this,this.basePath+"config.js")}afterInitHook(){(0,n._)(function*(){if((yield this.e.fire("checkReserve",location.host))!=="normal"){if(this.isInDestruct)return;let e=this.c.div("",'Trial version. Buy <a href="https://xdsoft.net/jodit/pro/">Jodit Pro</a>');o.IS_TEST||o.IS_PROD,(0,s.css)(e,{position:"absolute",color:"red",right:10,bottom:10}),this.addDisclaimer(e)}}).call(this).catch(()=>null),super.afterInitHook()}getVersion(){return"PRO "+o.APP_VERSION}}},41810:function(e,t,i){"use strict";var n=i(77688),o=i(82749),r=i(56075),s=i(11886),a=i(31635);i(66645);var l=i(86449),u=i(21020),c=i(46166),d=i(62895),h=i(55487),p=i(27769),f=i(58579),m=i(63805),g=i(82758),b=i(65478),v=i(580),y=i(21537),w=i(50911),_=i(2692),C=i(18549),k=i(54747);class S extends w.Plugin{get state(){return this.stateManager.state}get toolRegistry(){return new h.ToolRegistry(this.j)}get permissionManager(){return new u.PermissionManager(this.j,this.toolRegistry)}get apiClient(){return new l.APIClient(this.j,this.toolRegistry)}get storage(){let{storage:e,storageKey:t,maxConversations:i}=this.j.o.aiAssistantPro;if("string"==typeof e){let n=(0,d.createStorageProvider)(e,t);return new d.WebStorageConversationStorage(n,i)}return e}get stateManager(){return new c.StateManager(this.j)}get mainPanel(){return new p.UIMainPanel(this.j,this.stateManager.state,this.j.o.aiAssistantPro,e=>{let t=this.stateManager.getCurrentConversation();t&&this.stateManager.setCurrentConversation((0,r._)({},t,e))})}get dialog(){let e=this.j.dlg({resizable:this.j.o.aiAssistantPro.resizable,eventEmmiter:this.j.e});return e.e.on(e,"afterClose",()=>{this.j.e.fire("closeAIAssistantPro.ai-assistant-pro")}),e}setupTextAutocomplete(){let{textAutocompleteEnabled:e,textAutocompleteApiRequest:t,textAutocompleteMinQueryLength:i,textAutocompleteMaxSuggestions:o,textAutocompleteDebounceMs:a,textAutocompleteCacheTTL:l,textAutocompleteCacheMaxSize:u}=this.j.o.aiAssistantPro;if(!e||!t)return;this.j.o.autocomplete=(0,s._)((0,r._)({},this.j.o.autocomplete),{displayMode:"inline"});let c=this.textAutocompleteCache,d=null;this.textAutocompleteSource=e=>{if(e.length<i)return[];let r=`${e}:${o}`;if(l>0){let e=c.get(r);if(e&&Date.now()-e.ts<l)return e.data.map(e=>({value:e,title:e}))}d&&clearTimeout(d);let s=new AbortController;return new Promise(i=>{d=setTimeout(()=>(0,n._)(function*(){try{let n=yield t(e,o,s.signal);if(Array.isArray(n)){let e=n.slice(0,o);if(l>0){if(c.size>=u){let e=c.keys().next().value;null!=e&&c.delete(e)}c.set(r,{ts:Date.now(),data:e})}i(e.map(e=>({value:e,title:e})));return}i([])}catch(e){i([])}})(),a)})},this.j.e.fire("registerAutocompleteSource",this.textAutocompleteSource)}afterInit(){(0,v.extendLang)(m),this.setupEventListeners(),this.setupTextAutocomplete(),this.j.async.promise(e=>{let{initiallyOpened:t,persistOpenState:i}=this.j.o.aiAssistantPro,n=t;i?this.storage.getGlobalSettings().then(e=>{if((null==e?void 0:e.isOpen)!=null&&(n=e.isOpen),n)return this.openAssistant()}).catch(()=>null).finally(()=>e(void 0)):e(void 0)}).catch(()=>null)}__loadData(){return this.__initedPromise?this.__initedPromise:this.isDestructed?Promise.reject():(this.__initedPromise=this.j.async.promise(e=>{this.loadInitialData().then(e)}).catch(()=>null),this.__initedPromise)}loadInitialData(){return(0,n._)(function*(){this.mainPanel.setMod("ready",!0),yield(0,f.loadInitialData)(this.j,this.storage,this.stateManager),yield this.restorePendingToolCalls()}).call(this)}restorePendingToolCalls(){return(0,n._)(function*(){let e=this.stateManager.getCurrentConversation();if(!e)return;let t=(0,f.findMessagesWithPendingToolCalls)(e);if(0!==t.length)for(let e of t)yield this.handleToolCalls(e.id)}).call(this)}setupEventListeners(){this.j.e.on("selectConversation.ai-assistant-pro",e=>(0,n._)(function*(){try{yield this.__loadData(),yield(0,f.handleConversationSelect)(e,this.storage,this.stateManager)}catch(e){g.IS_PROD}}).call(this)),this.j.e.on("newConversation.ai-assistant-pro",()=>(0,n._)(function*(){yield this.__loadData();let e=(0,f.createNewConversation)(this.j,this.state.defaultModel,this.state.defaultTemperature);this.stateManager.setCurrentConversation(e)}).call(this)),this.j.e.on("deleteConversation.ai-assistant-pro",e=>(0,n._)(function*(){yield this.__loadData(),yield this.deleteConversation(e)}).call(this)),this.j.e.on("renameConversation.ai-assistant-pro",(e,t)=>(0,n._)(function*(){yield this.__loadData(),yield this.renameConversation(e,t)}).call(this)),this.j.e.on("backToList.ai-assistant-pro",()=>(0,n._)(function*(){yield this.__loadData(),yield(0,f.handleBackToList)(this.storage,this.stateManager)}).call(this)),this.j.e.on("removeContext.ai-assistant-pro",e=>(0,n._)(function*(){yield this.__loadData(),this.stateManager.removeSelectionContext(e)}).call(this)),this.j.e.on("approveToolCall.ai-assistant-pro",(e,t)=>(0,n._)(function*(){try{yield this.__loadData();let i=yield(0,f.handleToolApproval)(e,t,this.stateManager,this.permissionManager,this.storage);if(i){let e=this.stateManager.getCurrentConversation();if(!e)return;let t=e.messages.find(e=>{var t;return null==(t=e.toolCalls)?void 0:t.some(e=>e.id===i.id)});if(!t)return;yield this.executeToolCall(t.id,i)}}catch(e){if((0,y.isAbortError)(e))return;this.stateManager.setError(e instanceof Error?e.message:String(e))}}).call(this)),this.j.e.on("denyToolCall.ai-assistant-pro",e=>(0,n._)(function*(){yield this.__loadData(),yield(0,f.handleToolDenial)(this.j,e,this.stateManager,this.storage)}).call(this)),this.j.e.on("abortRequest.ai-assistant-pro",()=>(0,n._)(function*(){yield this.__loadData(),this.apiClient.abort(),this.stateManager.setLoading(!1)}).call(this))}__applyTheme(){(0,f.applyTheme)(this.j,this.stateManager.state.theme,this.stateManager.state.displayMode,this.mainPanel.container,this.dialog)}openAssistant(){return(0,n._)(function*(){if(this.stateManager.isOpen()){this.stateManager.close(),yield this.__closeInContainer();return}yield this.__loadData(),this.isDestructed||(this.stateManager.open(),yield this.__openInContainer(),this.j.o.aiAssistantPro.includeSelectionByDefault&&!this.j.s.isCollapsed()&&this.addCurrentSelectionToContext())}).call(this)}__openInContainer(){return(0,n._)(function*(){let{resizable:e,allowClose:t,flightPanelHeight:i}=this.j.o.aiAssistantPro,{displayMode:n="right",panelWidth:o,panelHeight:r}=this.stateManager.state;switch(this.__applyTheme(),this.mainPanel.setMod("displayMode",n),this.mainPanel.setMod("allowClose",t),this.mainPanel.setParentView("dialog"===n||"flight"===n?this.dialog:this.j),this.__openedMode=n,n){case"dialog":this.dialog.setSize(o,r).open().setContent(this.mainPanel.container);break;case"flight":C.UIFlightPosition.install(this.mainPanel,this.j.container,{panelHeight:i,containerClassName:this.getFullElName("flight-container")});break;default:e&&(k.UIResize.remove(this.mainPanel),k.UIResize.install(this.mainPanel,(0,f.invertMode)(n),{handleClassName:this.getFullElName("ai-assistent-resize-handle"),onResize:({newSize:e})=>{let t="left"===n||"right"===n?e:o,i="top"===n||"bottom"===n?e:r;return this.stateManager.state.panelWidth=t,this.stateManager.state.panelHeight=i,!0}})),this.j.currentPlace.slots[n].appendChild(this.mainPanel.container),(0,f.resizeInPanelView)(this.j,n,o,r)}}).call(this)}__onResizeInPanelView(){let{displayMode:e,panelWidth:t,panelHeight:i}=this.stateManager.state;(0,f.resizeInPanelView)(this.j,e,t,i)}__closeInContainer(){return(0,n._)(function*(){let{displayMode:e}=yield this.stateManager.state;switch(this.__openedMode!==e&&"dialog"===this.__openedMode&&this.dialog.close(),this.__openedMode!==e&&"flight"===this.__openedMode&&this.__closeFlightMode(),e){case"dialog":this.dialog.close();break;case"flight":this.__closeFlightMode();break;default:this.mainPanel.container.remove()}}).call(this)}__closeFlightMode(){C.UIFlightPosition.remove(this.mainPanel)}__onSavedStateChange(){var e;let t=this.stateManager.state;return this.storage.saveGlobalSettings((0,r._)({displayMode:t.displayMode,panelWidth:t.panelWidth,panelHeight:t.panelHeight,theme:t.theme,defaultModel:t.defaultModel,defaultTemperature:t.defaultTemperature,currentConversationId:null==(e=t.currentConversation)?void 0:e.id},this.j.o.aiAssistantPro.persistOpenState?{isOpen:t.isOpen}:{}))}closeAssistant(){return(0,n._)(function*(){this.stateManager.isOpen()&&(yield this.__loadData(),this.stateManager.close(),this.__closeInContainer())}).call(this)}addCurrentSelectionToContext(){return(0,n._)(function*(){yield this.__loadData();let e=(0,f.getCurrentSelectionContext)(this.j);e&&this.stateManager.addSelectionContext(e)}).call(this)}executeQuickCommand(e){return(0,n._)(function*(){let t,{quickCommandsSilentMode:i,quickCommandsDisplayMode:n}=this.j.o.aiAssistantPro,o=this.j.o.aiAssistant;if(o&&o[e]&&(0,y.isString)(o[e])&&(t=o[e]),!t)return void this.j.e.fire("error",`Command not found: ${e}`);let r=this.j.s.isCollapsed()?this.j.value:this.j.s.html;if(!r)return;let s=(null==o?void 0:o.aiCommonPrefixPrompt)||"",a=(null==o?void 0:o.aiCommonSuffixPrompt)||"",l=`${s}${t}${a}
255
255
 
256
- ${r}`.trim();i?yield this.__executeQuickCommandSilent(l,r):yield this.__executeQuickCommandWithPanel(l,n)}).call(this)}__executeQuickCommandSilent(e,t){return(0,n._)(function*(){yield this.__loadData(),this.j.progressbar.show().progress(100);try{let t=(0,f.createUserMessage)(e),i=(0,f.createNewConversation)(this.j,this.state.defaultModel,this.state.defaultTemperature,[t]),n=yield this.apiClient.sendRequest(i.id,i.messages,null,[],i.options);if("final"===n.mode){let e=n.response.content;e&&this.j.s.insertHTML(e)}}catch(e){(0,y.isAbortError)(e)||this.j.e.fire("error",e)}finally{this.j.progressbar.hide()}}).call(this)}__executeQuickCommandWithPanel(e,t){return(0,n._)(function*(){yield this.__loadData();let i=this.stateManager.state.displayMode;this.stateManager.state.displayMode=t;let n=(0,f.getCurrentSelectionContext)(this.j);n&&this.stateManager.addSelectionContext(n),this.stateManager.isOpen()||(yield this.openAssistant()),yield this.sendMessage(e),this.stateManager.state.displayMode=i}).call(this)}sendMessage(e){return(0,n._)(function*(){yield this.__loadData();let t=this.stateManager.getCurrentConversation(),i=this.stateManager.getEditingMessageId();if(i&&t){let e=t.messages.findIndex(e=>e.id===i);if(-1!==e){let i=t.messages.slice(0,e),n=(0,s._)((0,r._)({},t),{messages:i,updatedAt:Date.now()});this.stateManager.setCurrentConversation(n),yield this.storage.save(n),this.stateManager.clearEditingMessage(),t=n}}t||(t=(0,f.createNewConversation)(this.j,this.state.defaultModel,this.state.defaultTemperature),this.stateManager.setCurrentConversation(t));let n=null;e.trim()&&(n=(0,f.createUserMessage)(e),t.title||(t=(0,s._)((0,r._)({},t),{title:e})),t=(0,s._)((0,r._)({},t),{updated:Date.now(),messages:[...t.messages,n]})),this.stateManager.setCurrentConversation((0,r._)({},t)),n&&this.j.e.fire("messageSent.ai-assistant-pro",n),this.stateManager.setLoading(!0),this.stateManager.clearError();try{yield this.sendRequestToAI(0),this.stateManager.clearSelectionContexts()}catch(e){if((0,y.isAbortError)(e))return;this.stateManager.setError(e instanceof Error?e.message:String(e))}finally{this.stateManager.setLoading(!1)}}).call(this)}sendRequestToAI(e=0){return(0,n._)(function*(){let t,i,n=this.j.o.aiAssistantPro.maxRecursionToolCallDepth;if(e>=n)throw Error(`Max recursion depth ${n} reached for tool calls`);let o=this.stateManager.getCurrentConversation();if(!o)return;let s=(0,f.findParentMessageId)(o),[a]=yield Promise.all([this.apiClient.sendRequest(o.id,o.messages,s,this.stateManager.getSelectionContexts(),o.options),this.storage.save(o)]);if("stream"===a.mode){let e=yield(0,f.processStreamingResponse)(this.stateManager,a,o);t=e.aiMessage,i=e.index,o=e.conversation}else{let e=(0,f.processFinalResponse)(a,o);t=e.aiMessage,i=e.index,o=e.conversation}o=yield(0,f.processArtifacts)(this.j,t,o,i),this.j.e.fire("messageReceived.ai-assistant-pro",t),this.stateManager.setCurrentConversation((0,r._)({},o)),yield this.storage.save(o),yield this.handleToolCalls(t.id,e)}).call(this)}deleteConversation(e){return(0,n._)(function*(){yield this.__loadData(),yield(0,f.deleteConversationWithCleanup)(this.j,e,this.storage,this.stateManager,this.permissionManager)}).call(this)}renameConversation(e,t){return(0,n._)(function*(){var i;let n=yield this.storage.get(e);if(!n)return;let o=(0,s._)((0,r._)({},n),{title:t,updated:Date.now()});yield this.storage.save(o),(null==(i=this.state.currentConversation)?void 0:i.id)===e&&this.stateManager.setCurrentConversation(o);let a=yield this.storage.list();this.stateManager.setConversations(a)}).call(this)}searchConversations(e){return(0,n._)(function*(){yield this.__loadData(),yield(0,f.handleConversationSearch)(e,this.storage,this.stateManager)}).call(this)}handleToolCalls(e,t=0){return(0,n._)(function*(){let i=this.stateManager.getCurrentConversation();if(!i)return;let n=i.messages.find(t=>t.id===e);if(!n)return;let o=n.toolCalls;if(!o||0===o.length)return;let r=o.filter(e=>!(0,f.isTerminalToolCallStatus)(e.status));if(0===r.length)return;let{approved:s,needsPermission:a}=this.permissionManager.filterToolCalls(r,i.permissions);for(let i of(this.stateManager.setPendingToolCalls(a),s))yield this.executeToolCall(e,i,t)}).call(this)}executeToolCall(e,t,i=0){return(0,n._)(function*(){let n=this.stateManager.getCurrentConversation();if(!n)return;let o=yield(0,f.executeToolCall)(this.j,t,this.toolRegistry),a=n.messages.findIndex(t=>t.id===e);if(-1===a)return;let l=n.messages[a],u=n.messages.slice();u[a]=(0,f.updateToolCallInMessage)(l,o),n=(0,s._)((0,r._)({},n),{messages:u,updated:Date.now()}),this.stateManager.setCurrentConversation(n),(0,f.areAllToolCallsExecuted)(n)&&(yield this.sendRequestToAI(i+1))}).call(this)}copyMessage(e){return(0,n._)(function*(){let t=this.stateManager.getCurrentConversation();if(!t)return;let i=t.messages.find(t=>t.id===e);if(i)try{yield navigator.clipboard.writeText(i.content),this.j.message.success("Message copied to clipboard")}catch(e){this.j.e.fire("error",Error("Failed to copy message"))}}).call(this)}restartFromMessage(e){return(0,n._)(function*(){let t=this.stateManager.getCurrentConversation();if(!t)return;let i=t.messages.findIndex(t=>t.id===e);if(-1===i)return;let n=t.messages[i];if("user"!==n.role)return;yield this.__loadData();let o=t.messages.slice(0,i),a=(0,s._)((0,r._)({},t),{messages:o,updatedAt:Date.now()});this.stateManager.setCurrentConversation(a),yield this.storage.save(a),yield this.sendMessage(n.content)}).call(this)}editMessage(e){return(0,n._)(function*(){let t=this.stateManager.getCurrentConversation();if(!t)return;let i=t.messages.find(t=>t.id===e);i&&"user"===i.role&&(this.stateManager.setEditingMessageId(e),this.mainPanel.inputArea.setValue(i.content),this.mainPanel.inputArea.focus())}).call(this)}cancelEditMessage(){this.stateManager.isEditingMessage()&&(this.stateManager.clearEditingMessage(),this.mainPanel.inputArea.setValue(""))}deleteMessage(e){return(0,n._)(function*(){yield this.__loadData();let t=this.stateManager.getCurrentConversation();if(!t||-1===t.messages.findIndex(t=>t.id===e))return;let i=t.messages.filter(t=>t.id!==e),n=(0,s._)((0,r._)({},t),{messages:i,updatedAt:Date.now()});this.stateManager.setCurrentConversation(n),yield this.storage.save(n)}).call(this)}beforeDestruct(){var e,t,i,n,o,r,s,a;this.textAutocompleteSource&&(this.j.e.fire("unregisterAutocompleteSource",this.textAutocompleteSource),this.textAutocompleteSource=null),this.textAutocompleteCache.clear(),this.__closeFlightMode(),null==(e=(0,b.cached)(this,"toolRegistry"))||e.destruct(),null==(t=(0,b.cached)(this,"permissionManager"))||t.destruct(),null==(i=(0,b.cached)(this,"apiClient"))||i.destruct(),null==(n=(0,b.cached)(this,"stateManager"))||n.destruct(),null==(o=(0,b.cached)(this,"mainPanel"))||o.destruct(),null==(r=(0,b.cached)(this,"dialog"))||r.destruct(),null==(a=(0,b.cached)(this,"storage"))||null==(s=a.close)||s.call(a)}constructor(...e){super(...e),(0,o._)(this,"buttons",[{name:"aiAssistantPro",group:"insert"},{name:"aiCommandsPro",group:"insert"}]),(0,o._)(this,"textAutocompleteSource",null),(0,o._)(this,"textAutocompleteCache",new Map),(0,o._)(this,"__initedPromise",null),(0,o._)(this,"__openedMode",null)}}(0,o._)(S,"requires",["license","autocomplete"]),(0,a.__decorate)([b.cache],S.prototype,"toolRegistry",null),(0,a.__decorate)([b.cache],S.prototype,"permissionManager",null),(0,a.__decorate)([b.cache],S.prototype,"apiClient",null),(0,a.__decorate)([b.cache],S.prototype,"storage",null),(0,a.__decorate)([b.cache],S.prototype,"stateManager",null),(0,a.__decorate)([b.cache],S.prototype,"mainPanel",null),(0,a.__decorate)([b.cache],S.prototype,"dialog",null),(0,a.__decorate)([(0,b.watch)("state.theme")],S.prototype,"__applyTheme",null),(0,a.__decorate)([(0,b.watch)(":openAIAssistantPro.ai-assistant-pro")],S.prototype,"openAssistant",null),(0,a.__decorate)([(0,b.watch)([":resize","state.panelWidth","state.panelHeight"])],S.prototype,"__onResizeInPanelView",null),(0,a.__decorate)([(0,b.watch)(["state.isOpen","state.displayMode","state.panelWidth","state.panelHeight","state.theme","state.defaultModel","state.defaultTemperature","state.currentConversation"]),(0,b.debounce)()],S.prototype,"__onSavedStateChange",null),(0,a.__decorate)([(0,b.watch)(":closeAIAssistantPro.ai-assistant-pro")],S.prototype,"closeAssistant",null),(0,a.__decorate)([(0,b.watch)(":addContextToAIAssistant.ai-assistant-pro")],S.prototype,"addCurrentSelectionToContext",null),(0,a.__decorate)([(0,b.watch)(":executeQuickCommand.ai-assistant-pro")],S.prototype,"executeQuickCommand",null),(0,a.__decorate)([(0,b.watch)(":sendMessage.ai-assistant-pro")],S.prototype,"sendMessage",null),(0,a.__decorate)([(0,b.watch)(":searchConversations.ai-assistant-pro")],S.prototype,"searchConversations",null),(0,a.__decorate)([(0,b.watch)(":copyMessage.ai-assistant-pro")],S.prototype,"copyMessage",null),(0,a.__decorate)([(0,b.watch)(":restartFromMessage.ai-assistant-pro")],S.prototype,"restartFromMessage",null),(0,a.__decorate)([(0,b.watch)(":editMessage.ai-assistant-pro")],S.prototype,"editMessage",null),(0,a.__decorate)([(0,b.watch)(":cancelEditMessage.ai-assistant-pro")],S.prototype,"cancelEditMessage",null),(0,a.__decorate)([(0,b.watch)(":deleteMessage.ai-assistant-pro")],S.prototype,"deleteMessage",null),S=(0,a.__decorate)([b.component],S),_.JoditPro.plugins.add("aiAssistantPro",S)},66645:function(e,t,i){"use strict";var n,o=i(77688),r=i(56075),s=i(11886),a=i(47373),l=i(94668),u=i.n(l),c=i(86428),d=i.n(c),h=i(75966),p=i.n(h),f=i(83207),m=i.n(f),g=i(99219),b=i.n(g),v=i(63674),y=i.n(v),w=i(4133),_=i.n(w),C=i(94454),k=i(53835),S=i(6441),E=i(12153),x=i(31974),F=i(72573);E.Icon.set("ai-assistant-pro",d()).set("ai-commands-pro",p()).set("ai-add-context",u()).set("send",b()).set("tool-bolt",_()).set("chevron-right",m()).set("shield",y()),S.Config.prototype.aiAssistantPro={displayMode:"right",panelWidth:400,panelHeight:500,flightPanelHeight:250,dialogFullSize:!1,resizable:!0,apiMode:"incremental",apiRequest:null,maxRetries:3,requestTimeout:3e5,retryDelay:1e3,maxRecursionToolCallDepth:1e3,enabledTools:(0,k.getToolNames)(),customTools:[],toolPermissions:{},autoApproveTools:["readDocument","readBlocks","readSelection","insertHTML","addHTML"],alwaysDenyTools:[],defaultPermissionScope:"conversation",storage:"indexedDB",maxConversations:50,storageKey:"jodit-ai-assistant-pro",showConversationList:!0,enableMarkdown:!0,enableCodeHighlight:!0,maxMessageHeight:400,placeholderText:"Ask AI assistant...",sendShortcut:"Ctrl+Enter",showTimestamps:!0,formatTimestamp:(e,t)=>{let i=new Date(e),n=new Date().getTime()-i.getTime();return n<6e4?t("Just now"):n<36e5?t("%dm ago",Math.floor(n/6e4)):n<864e5?t("%dh ago",Math.floor(n/36e5)):i.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})},formatMessageContent:(e,t)=>F.marked.parse(e,{breaks:!0,gfm:!0}),showAvatars:!0,showTypingIndicator:!0,includeSelectionByDefault:!0,maxContextRanges:5,showContextPreview:!0,sendOnEnter:!0,instructions:void 0,includeEditorMetadata:!1,autoOpen:!0,rememberLastConversation:!0,autoFocusInput:!0,voiceInputEnabled:!1,closeAfterInsert:!1,enableSoundNotifications:!1,debug:!1,textAutocompleteEnabled:!1,textAutocompleteApiRequest:null,textAutocompleteMinQueryLength:3,textAutocompleteMaxSuggestions:3,textAutocompleteDebounceMs:500,textAutocompleteCacheTTL:3e4,textAutocompleteCacheMaxSize:50,quickCommandsSilentMode:!1,quickCommandsDisplayMode:"flight",showCopyMessageAction:!0,showRestartMessageAction:!0,showEditMessageAction:!0,showDeleteMessageAction:!0,dialogSettings:{},allowEditDialogSettings:!1,allowEditDisplayMode:!0,allowEditPanelWidth:!0,initiallyOpened:!1,allowClose:!0,persistOpenState:!0,theme:"parent",allowEditTheme:!0,uploadBase64Artifact(e,t){return(0,o._)(function*(){if("image"===e.type&&e.data&&"base64"===e.data.kind)try{let i=(0,a.base64ToFile)(e.data.base64,e.id,e.mimeType),n=yield t.uploader.upload([i]);return(0,s._)((0,r._)({},e),{data:{kind:"url",url:n.baseurl+n.files[0]},metadata:(0,s._)((0,r._)({},e.metadata),{filename:n.files[0]})})}catch(e){t.e.fire("error",e)}return e})()},getAIProviderOptions(e,t){return(0,C.getAIProviderOptions)(e,t)},registerAIProvider(e,t){(0,C.registerAIProvider)(e,t)}},S.Config.prototype.controls.aiAssistantPro={icon:"ai-assistant-pro",tooltip:"AI Assistant",hotkeys:["ctrl+shift+a","cmd+shift+a"],exec(e){e.e.fire("openAIAssistantPro.ai-assistant-pro")},isDisabled(e){return!e.o.aiAssistantPro.apiRequest},getLabel(e){return e.o.aiAssistantPro.apiRequest?"AI Assistant":"AI Assistant (not configured)"}},S.Config.prototype.controls.aiAddContext={icon:"ai-add-context",tooltip:"Add to AI Context",exec(e){e.e.fire("addContextToAIAssistant")},isDisabled(e){return!e.o.aiAssistantPro.apiRequest||e.s.isCollapsed()}},S.Config.prototype.controls.aiCommandsPro={icon:"ai-commands-pro",tooltip:"AI Commands",isDisabled(e){return!e.o.aiAssistantPro.apiRequest},list:x.aiAssitentCommands,exec(e,t,{control:i}){e.e.fire("executeQuickCommand.ai-assistant-pro",i.name)}};let A=(null==(n=S.Config.prototype.tuneBlock)?void 0:n.popup)||{},D={};["p","h1","h2","h3","h4","h5","h6","div","section","article","pre","blockquote","ul","ol","li","table","tr","td","th","img","figure"].forEach(e=>{let t=A[e]||["tune.up","tune.remove","tune.down"];D[e]=[...t,"|","aiAddContext"]}),S.Config.prototype.tuneBlock&&(S.Config.prototype.tuneBlock.popup=(0,r._)({},A,D))},6689:function(e,t,i){"use strict";i.d(t,{throwIfAborted:function(){return o}});var n=i(93661);function o(e){if(e.aborted)throw(0,n.abort)()}},61872:function(e,t,i){"use strict";i.d(t,{processArtifacts:function(){return c},processFinalResponse:function(){return u},processStreamingResponse:function(){return l}});var n=i(89929),o=i(77688),r=i(56075),s=i(11886),a=i(61558);function l(e,t,i){return(0,o._)(function*(){let o=(0,a.createAIMessage)(),l=-1;var u,c=!1,d=!1;try{for(var h,p=(0,n._)(t.stream);c=!(h=yield p.next()).done;c=!1){let t=h.value;switch(t.type){case"created":o=(0,s._)((0,r._)({},o),{id:t.response.responseId,content:""}),l=i.messages.length;break;case"text-delta":o=(0,s._)((0,r._)({},o),{content:o.content+t.delta});break;case"completed":o=(0,s._)((0,r._)({},o),{id:t.response.responseId,toolCalls:t.response.toolCalls||[],artifacts:t.response.artifacts||[]});break;case"error":{let e=(0,a.createErrorMessage)(t.error);o=(0,s._)((0,r._)({},o),{id:e.id,content:e.content})}}if(o.id){let t=i.messages.slice();t[l>=0?l:i.messages.length]=o,i=(0,s._)((0,r._)({},i),{messages:t,updated:Date.now()}),e.setCurrentConversation(i)}}}catch(e){d=!0,u=e}finally{try{c&&null!=p.return&&(yield p.return())}finally{if(d)throw u}}return{aiMessage:o,index:l,conversation:i}})()}function u(e,t){let i=(0,s._)((0,r._)({},(0,a.createAIMessage)()),{id:e.response.responseId,content:e.response.content,toolCalls:e.response.toolCalls||[],artifacts:e.response.artifacts||[]}),n=t.messages.slice();return n.push(i),{aiMessage:i,index:(t=(0,s._)((0,r._)({},t),{messages:n,updated:Date.now()})).messages.length-1,conversation:t}}function c(e,t,i,n){return(0,o._)(function*(){if(t.artifacts&&t.artifacts.length>0){let o=i.messages.slice();return o[n]=(0,s._)((0,r._)({},o[n]),{artifacts:yield(0,a.uploadArtifacts)(e,t.artifacts)}),(0,s._)((0,r._)({},i),{messages:o,updated:Date.now()})}return i})()}},49459:function(e,t,i){"use strict";function n(e,t,i={}){let o=e[t];if("string"!=typeof o||!i.allowEmpty&&""===o)throw Error(`Parameter "${t}" is required and must be a${i.allowEmpty?"":" non-empty"} string`);return o}i.d(t,{requireString:function(){return n}})},44526:function(e,t,i){"use strict";i.d(t,{resolveBlock:function(){return o}});var n=i(22732);function o(e,{selector:t,index:i,requireExactlyOne:r=!1}={}){let s=null!=t&&""!==t.trim(),a=null!=i;if(r&&s===a)throw Error("Either index or selector must be provided, but not both");if(!s&&!a)throw Error("Block identifier is required");if(s){if("string"!=typeof t)throw Error("Selector must be a string");let i=e.editor.querySelector(t);if(!i)throw Error(`No element found matching selector "${t}"`);if(!n.Dom.isElement(i))throw Error(`Selector "${t}" does not point to an element node`);return{element:i,identifier:`with selector "${t}"`}}if("number"!=typeof i)throw Error("Block index must be a number");let l=Array.from(e.editor.children);if(i<0||i>=l.length)throw Error(`Block index ${i} is out of range. Document has ${l.length} blocks`);let u=l[i];if(!n.Dom.isElement(u))throw Error(`Block at index ${i} is not a valid element`);return{element:u,identifier:`at index ${i}`}}},70308:function(e,t,i){"use strict";i.d(t,{areAllToolCallsExecuted:function(){return l},createNewConversation:function(){return o},findMessagesWithPendingToolCalls:function(){return u},findParentMessageId:function(){return r},isTerminalToolCallStatus:function(){return a}});var n=i(21064);function o(e,t,i,r=[]){let s=e.o.aiAssistantPro,a={id:(0,n.generateConversationId)(),created:Date.now(),updated:Date.now(),messages:r,permissions:[],options:{model:null!=t?t:s.defaultModel,temperature:null!=i?i:s.defaultTemperature}};return e.e.fire("conversationCreated.ai-assistant-pro",a),a}function r(e){for(let t=e.messages.length-1;t>=0;t--){let i=e.messages[t];if("assistant"===i.role&&!i.id.startsWith("error_"))return i.id}return null}let s=new Set(["executed","denied","error"]);function a(e){return s.has(e)}function l(e){let t=e.messages[e.messages.length-1];return!!(null==t?void 0:t.toolCalls)&&t.toolCalls.every(e=>a(e.status))}function u(e){return e.messages.filter(e=>e.toolCalls&&e.toolCalls.length>0&&e.toolCalls.some(e=>!a(e.status)))}},473:function(e,t,i){"use strict";i.d(t,{handleBackToList:function(){return d},handleConversationSearch:function(){return h},handleConversationSelect:function(){return c},handleToolApproval:function(){return l},handleToolDenial:function(){return u}});var n=i(77688),o=i(56075),r=i(11886),s=i(79078),a=i(82758);function l(e,t,i,s,a){return(0,n._)(function*(){let n=i.getPendingToolCalls().find(t=>t.id===e);if(!n)return null;let l=s.grantPermission(n.name,t),u=i.getCurrentConversation();return u&&(u.permissions.push(l),yield a.save(u)),i.removePendingToolCall(e),(0,r._)((0,o._)({},n),{status:"approved"})})()}function u(e,t,i,a){return(0,n._)(function*(){let n=i.getPendingToolCalls().find(e=>e.id===t);if(!n)return;let l=i.getCurrentConversation();if(!l)return;let u=l.messages.findIndex(e=>{var i;return null==(i=e.toolCalls)?void 0:i.find(e=>e.id===t)});if(-1===u)return;let c=l.messages[u],d=(0,r._)((0,o._)({},n),{result:{error:"Tool call denied by user."},status:"denied"}),h=(0,s.updateToolCallInMessage)(c,d),p=[...l.messages];p[u]=h,l=(0,r._)((0,o._)({},l),{messages:p,updated:Date.now()}),i.setCurrentConversation(l),yield a.save(l),e.e.fire("toolCallDenied.ai-assistant-pro",n),i.removePendingToolCall(t)})()}function c(e,t,i){return(0,n._)(function*(){try{i.setLoading(!0);let n=yield t.get(e);if(!n)throw Error("Conversation not found: "+e);i.setCurrentConversation((0,o._)({},n))}catch(e){a.IS_PROD}finally{i.setLoading(!1)}})()}function d(e,t){return(0,n._)(function*(){t.setView("conversationList");try{t.setLoading(!0);let i=yield e.list().catch(()=>[]);t.setConversations(i)}finally{t.setLoading(!1)}})()}function h(e,t,i){return(0,n._)(function*(){i.setLoading(!0);try{let n=yield t.list(e||void 0);i.setConversations(n),i.setView("conversationList")}finally{i.setLoading(!1)}})()}},58579:function(e,t,i){"use strict";i.d(t,{applyTheme:function(){return c.applyTheme},areAllToolCallsExecuted:function(){return o.areAllToolCallsExecuted},createNewConversation:function(){return o.createNewConversation},createUserMessage:function(){return s.createUserMessage},deleteConversationWithCleanup:function(){return u.deleteConversationWithCleanup},executeToolCall:function(){return d.executeToolCall},findMessagesWithPendingToolCalls:function(){return o.findMessagesWithPendingToolCalls},findParentMessageId:function(){return o.findParentMessageId},getCurrentSelectionContext:function(){return l.getCurrentSelectionContext},handleBackToList:function(){return r.handleBackToList},handleConversationSearch:function(){return r.handleConversationSearch},handleConversationSelect:function(){return r.handleConversationSelect},handleToolApproval:function(){return r.handleToolApproval},handleToolDenial:function(){return r.handleToolDenial},invertMode:function(){return a.invertMode},isTerminalToolCallStatus:function(){return o.isTerminalToolCallStatus},loadInitialData:function(){return u.loadInitialData},processArtifacts:function(){return n.processArtifacts},processFinalResponse:function(){return n.processFinalResponse},processStreamingResponse:function(){return n.processStreamingResponse},resizeInPanelView:function(){return a.resizeInPanelView},updateToolCallInMessage:function(){return d.updateToolCallInMessage}});var n=i(61872),o=i(70308),r=i(473),s=i(61558),a=i(71050),l=i(15927),u=i(56110),c=i(53014),d=i(79078)},61558:function(e,t,i){"use strict";i.d(t,{createAIMessage:function(){return s},createErrorMessage:function(){return a},createUserMessage:function(){return r},uploadArtifacts:function(){return l}});var n=i(77688),o=i(21064);function r(e){return{id:(0,o.generateMessageId)(),role:"user",content:e,timestamp:Date.now()}}function s(){return{id:"",role:"assistant",content:"",artifacts:[],timestamp:Date.now(),toolCalls:[]}}function a(e){return{id:"error_"+(0,o.generateMessageId)(),role:"assistant",content:`❌ Error: ${e.message}`,timestamp:Date.now(),toolCalls:[],artifacts:[]}}function l(e,t){return(0,n._)(function*(){if(!t||0===t.length)return t;let i=e.o.aiAssistantPro.uploadBase64Artifact;return i?Promise.all(t.map(t=>{var o;return(0,n._)(function*(){return null!=(o=i(t,e))?o:t})()})):t})()}},71050:function(e,t,i){"use strict";i.d(t,{invertMode:function(){return o},resizeInPanelView:function(){return r}});var n=i(41180);function o(e){switch(e){case"left":return"right";case"right":return"left";case"top":return"bottom";case"bottom":return"top"}}function r(e,t,i,r){var s,a,l,u;if("dialog"===t||"flight"===t)return;("left"===t||"right"===t)&&(null==(l=e.currentPlace.slots[o(t)])||l.style.setProperty(`--jd-slot-${o(t)}-width`,"auto"),null==(u=e.currentPlace.slots[t])||u.style.setProperty(`--jd-slot-${t}-width`,`${i}px`));let c=null!=(s=(0,n.css)(e.currentPlace.workplace,"height"))?s:0;null==(a=e.currentPlace.slots[t])||a.style.setProperty("min-height",`${Math.min(c,r)}px`)}},85696:function(e,t,i){"use strict";function n(e,t){let i=e.createInside.div();return i.innerHTML=t,o(e,i),i}function o(e,t){e.e.fire("safeHTML",t)}i.d(t,{createSanitizedContainer:function(){return n},sanitizeElement:function(){return o}})},15927:function(e,t,i){"use strict";function n(e){if(e.s.isCollapsed())return null;let t=e.s.html,i=e.s.range;return{html:t,rangeInfo:{startContainer:i.startContainer.nodeName,startOffset:i.startOffset,endContainer:i.endContainer.nodeName,endOffset:i.endOffset}}}i.d(t,{getCurrentSelectionContext:function(){return n}})},56110:function(e,t,i){"use strict";i.d(t,{deleteConversationWithCleanup:function(){return r},loadInitialData:function(){return s}});var n=i(77688),o=i(82758);function r(e,t,i,o,r){return(0,n._)(function*(){try{o.setLoading(!0),yield i.delete(t),o.removeConversation(t),r.clearConversationPermissions(t);let n=o.getCurrentConversation();(null==n?void 0:n.id)===t&&o.setCurrentConversation(null);let s=yield i.list();o.setConversations(s),o.setView(0===s.length?"welcome":"conversationList"),e.e.fire("conversationDeleted.ai-assistant-pro",t)}catch(t){e.alert(e.i18n("Failed to delete conversation")+": "+((null==t?void 0:t.message)||"Unknown error"))}finally{o.setLoading(!1)}})()}function s(e,t,i){return(0,n._)(function*(){i.setLoading(!0);try{let[o,r]=yield Promise.all([t.list().catch(()=>[]),t.getGlobalSettings().catch(()=>null)]);if(i.setConversations(o),r&&i.setSavedState(r),0===o.length)i.setView("welcome");else if(e.o.aiAssistantPro.rememberLastConversation&&(null==r?void 0:r.currentConversationId)){var n;let e=null!=(n=o.find(e=>e.id===r.currentConversationId))?n:o[0],s=yield t.get(e.id);s?i.setCurrentConversation(s):i.setView("conversationList")}else i.setView("conversationList")}catch(e){o.IS_PROD,i.setView("welcome")}finally{i.setLoading(!1)}})()}},53014:function(e,t,i){"use strict";i.d(t,{applyTheme:function(){return r}});let n=["jodit_theme_dark","jodit-ai-assistant-pro_theme_dark","jodit-dialog_theme_dark"],o=["jodit_theme_light","jodit-ai-assistant-pro_theme_light","jodit-dialog_theme_light"];function r(e,t,i,r,s){let a;if(null==r||r.classList.remove(...n),null==r||r.classList.remove(...o),"dialog"===i){let e=null==s?void 0:s.container;null==e||e.classList.remove(...n),null==e||e.classList.remove(...o)}if(a="dark"===t?n:o,null==r||r.classList.add(...a),"dialog"===i){let e=null==s?void 0:s.container;null==e||e.classList.add(...a)}}},79078:function(e,t,i){"use strict";i.d(t,{executeToolCall:function(){return s},updateToolCallInMessage:function(){return a}});var n=i(77688),o=i(56075),r=i(11886);function s(e,t,i){return(0,n._)(function*(){let n;try{let e=new AbortController().signal,s=yield i.executeTool(t.name,t.arguments,e);n=(0,r._)((0,o._)({},t),{result:{result:s},status:"executed"})}catch(i){n=(0,r._)((0,o._)({},t),{result:{error:i instanceof Error?i.message:String(i)},status:"error"}),e.e.fire("toolCallFailed.ai-assistant-pro",n)}return e.e.fire("toolCallExecuted.ai-assistant-pro",n,{toolCallId:n.id,result:n.result}),n})()}function a(e,t){var i,n;let s=null==(n=e.toolCalls)?void 0:n.findIndex(e=>e.id===t.id);if(null==s||-1===s)return e;let a=[...null!=(i=null==e?void 0:e.toolCalls)?i:[]];return a[s]=t,(0,r._)((0,o._)({},e),{toolCalls:a})}},86449:function(e,t,i){"use strict";i.d(t,{APIClient:function(){return u}});var n=i(77688),o=i(82749),r=i(56075),s=i(11886),a=i(82758),l=i(21537);class u{sendRequest(e,t,i,o,r){return(0,n._)(function*(){let{apiRequest:n,requestTimeout:s,maxRetries:u}=this.jodit.o.aiAssistantPro;if(!n)throw Error("AI Assistant Pro callback is not configured");let c=new AbortController;this.abortControllers.add(c);try{let d=this.buildRequestContext(e,t,i,o,r),h=null;for(let e=0;u>=e;e++)try{if(c.signal.aborted)throw(0,l.abort)();let e=setTimeout(()=>{c.abort()},s);try{let t=yield n(d,c.signal);return clearTimeout(e),this.validateResponse(t),t}catch(t){throw clearTimeout(e),t}}catch(t){if(h=t,a.IS_PROD,u>e){let t=this.calculateRetryDelay(e);yield this.sleep(t)}else throw t}throw h||Error("API request failed after all retries")}finally{this.abortControllers.delete(c)}}).call(this)}abort(){this.abortControllers.forEach(e=>{e.abort()}),this.abortControllers.clear()}isInProgress(){return this.abortControllers.size>0}buildRequestContext(e,t,i,n,o){let a,{apiMode:l,instructions:u}=this.jodit.o.aiAssistantPro,c={mode:l,conversationId:e,tools:this.toolRegistry.getAllTools(),selectionContexts:n,conversationOptions:o,instructions:u};if("full"===l)a=t;else if(i){let e=t.findIndex(e=>e.id===i);a=-1!==e?t.slice(e+1):t,c=(0,s._)((0,r._)({},c),{parentMessageId:i})}else a=t;return(0,s._)((0,r._)({},c),{messages:this.expandToolMessages(a,t.find(e=>e.id===i))})}expandToolMessages(e,t){let i=[];for(let t of e)i.push(t),this.expandToolResultsMessage(t,i);return t&&this.expandToolResultsMessage(t,i),i}expandToolResultsMessage(e,t){if(e.toolCalls&&e.toolCalls.length>0)for(let n of e.toolCalls){var i;let o=null!=(i=n.result)?i:{error:"result not found"};if(t.find(e=>e.id===`${n.id}-result`))continue;let r={id:`${n.id}-result`,role:"tool",content:o.error?`Error: ${o.error}`:JSON.stringify(o.result),timestamp:e.timestamp,toolResults:[{toolCallId:n.id,result:o}]};t.push(r)}}validateResponse(e){if("final"!==e.mode)return;let t=e.response;if(!t)throw Error("API returned empty response");if(!t.responseId)throw Error("API response missing responseId");if(void 0===t.content)throw Error("API response missing content");if(void 0===t.finished)throw Error("API response missing finished flag");if(t.toolCalls){if(!Array.isArray(t.toolCalls))throw Error("API response toolCalls must be an array");t.toolCalls.forEach((e,t)=>{if(!e.id)throw Error(`Tool call at index ${t} is missing id`);if(!e.name)throw Error(`Tool call at index ${t} is missing name`);if(!e.arguments||"object"!=typeof e.arguments)throw Error(`Tool call at index ${t} has invalid arguments`)})}}calculateRetryDelay(e){let{retryDelay:t}=this.jodit.o.aiAssistantPro;return t*Math.pow(2,e)+Math.random()*t}sleep(e){return new Promise(t=>setTimeout(t,e))}destruct(){this.abort()}constructor(e,t){(0,o._)(this,"jodit",void 0),(0,o._)(this,"toolRegistry",void 0),(0,o._)(this,"abortControllers",void 0),this.jodit=e,this.toolRegistry=t,this.abortControllers=new Set}}},47373:function(e,t,i){"use strict";function n(e,t,i="image/png"){let o=atob(e),r=o.length,s=new Uint8Array(r);for(let e=0;r>e;e++)s[e]=o.charCodeAt(e);return new File([new Blob([s],{type:i})],t,{type:i})}i.d(t,{base64ToFile:function(){return n}})},21020:function(e,t,i){"use strict";i.d(t,{PermissionManager:function(){return s}});var n=i(82749),o=i(56075),r=i(11886);class s{requiresPermission(e){let{autoApproveTools:t,alwaysDenyTools:i}=this.jodit.o.aiAssistantPro;if(i.includes(e))return!0;if(t.includes(e))return!1;let n=this.toolRegistry.getTool(e);return!n||n.requiresPermission}isAutoDenied(e){let{alwaysDenyTools:t}=this.jodit.o.aiAssistantPro;return t.includes(e)}isAutoApproved(e){let{autoApproveTools:t}=this.jodit.o.aiAssistantPro;return t.includes(e)}checkPermission(e,t){if(this.isAutoApproved(e))return{toolName:e,granted:!0,grantedAt:Date.now(),scope:"once"};if(this.isAutoDenied(e))return null;let i=this.permanentPermissions.get(e);return i&&i.granted?i:t.find(t=>t.toolName===e&&t.granted)||null}grantPermission(e,t){let i={toolName:e,granted:!0,grantedAt:Date.now(),scope:t};return"forever"===t&&(this.permanentPermissions.set(e,i),this.savePermanentPermissions()),i}denyPermission(e){return{toolName:e,granted:!1,grantedAt:Date.now(),scope:"once"}}filterToolCalls(e,t){let i=[],n=[],s=[];for(let a of e){if(this.isAutoDenied(a.name)){s.push((0,r._)((0,o._)({},a),{status:"denied"}));continue}if(this.isAutoApproved(a.name)){i.push((0,r._)((0,o._)({},a),{status:"approved"}));continue}let e=this.checkPermission(a.name,t);e&&e.granted?i.push((0,r._)((0,o._)({},a),{status:"approved"})):this.requiresPermission(a.name)?(this.jodit.e.fire("permissionRequested.ai-assistant-pro",a.name),n.push((0,r._)((0,o._)({},a),{status:"pending"}))):i.push((0,r._)((0,o._)({},a),{status:"approved"}))}return{approved:i,needsPermission:n,denied:s}}clearConversationPermissions(e){}loadPermanentPermissions(){try{let e=localStorage.getItem(this.PERMANENT_PERMISSIONS_KEY);e&&JSON.parse(e).forEach(e=>{"forever"===e.scope&&e.granted&&this.permanentPermissions.set(e.toolName,e)})}catch(e){}}savePermanentPermissions(){try{let e=Array.from(this.permanentPermissions.values());localStorage.setItem(this.PERMANENT_PERMISSIONS_KEY,JSON.stringify(e))}catch(e){}}clearPermanentPermissions(){this.permanentPermissions.clear(),localStorage.removeItem(this.PERMANENT_PERMISSIONS_KEY)}getPermanentPermissions(){return Array.from(this.permanentPermissions.values())}revokePermanentPermission(e){this.permanentPermissions.delete(e),this.savePermanentPermissions()}destruct(){this.permanentPermissions.clear()}constructor(e,t){(0,n._)(this,"jodit",void 0),(0,n._)(this,"toolRegistry",void 0),(0,n._)(this,"permanentPermissions",void 0),(0,n._)(this,"PERMANENT_PERMISSIONS_KEY",void 0),this.jodit=e,this.toolRegistry=t,this.permanentPermissions=new Map,this.PERMANENT_PERMISSIONS_KEY="jodit-permissions.ai-assistant-pro",this.loadPermanentPermissions()}}},46166:function(e,t,i){"use strict";i.d(t,{StateManager:function(){return s}});var n=i(82749),o=i(56075),r=i(11886);class s{createInitialState(){return{isOpen:!1,currentView:"welcome",currentConversation:null,conversations:[],isLoading:!1,error:null,pendingToolCalls:[],selectionContexts:[],abortController:null,editingMessageId:null,theme:this.jodit.o.aiAssistantPro.theme||"parent",displayMode:this.jodit.o.aiAssistantPro.displayMode,panelWidth:this.jodit.o.aiAssistantPro.panelWidth,panelHeight:this.jodit.o.aiAssistantPro.panelHeight,defaultModel:this.jodit.o.aiAssistantPro.defaultModel,defaultTemperature:this.jodit.o.aiAssistantPro.defaultTemperature}}open(){this.state.isOpen=!0,this.jodit.e.fire("open.ai-assistant-pro",this.state.currentConversation)}close(){this.state.isOpen=!1,this.jodit.e.fire("close.ai-assistant-pro")}isOpen(){return this.state.isOpen}setView(e){this.state.currentView=e,this.jodit.e.fire("viewChanged.ai-assistant-pro",e)}getView(){return this.state.currentView}setConversations(e){this.state.conversations=e}setSavedState(e){e.theme&&(this.state.theme=e.theme),e.displayMode&&(this.state.displayMode=e.displayMode),e.panelWidth&&(this.state.panelWidth=e.panelWidth),e.panelHeight&&(this.state.panelHeight=e.panelHeight),e.defaultModel&&(this.state.defaultModel=e.defaultModel),e.defaultTemperature&&(this.state.defaultTemperature=e.defaultTemperature)}getConversations(){return this.state.conversations}setCurrentConversation(e){if(this.state.currentConversation===e)throw Error("Conversation is already current");this.state.currentConversation=e||null,e&&(this.setView("conversation"),this.jodit.e.fire("conversationSwitched.ai-assistant-pro",e))}getCurrentConversation(){return this.state.currentConversation}removeConversation(e){let t=this.state.conversations.filter(t=>t.id!==e);this.setConversations(t)}setLoading(e){this.state.isLoading=e}isLoading(){return this.state.isLoading}setError(e){this.state.error=e,e&&this.jodit.e.fire("error.ai-assistant-pro",Error(e))}getError(){return this.state.error}clearError(){this.setError(null)}setPendingToolCalls(e){this.state.pendingToolCalls=e}getPendingToolCalls(){return this.state.pendingToolCalls}addPendingToolCall(e){let t=[...this.state.pendingToolCalls,e];this.setPendingToolCalls(t)}removePendingToolCall(e){let t=this.state.pendingToolCalls.filter(t=>t.id!==e);this.setPendingToolCalls(t)}updateToolCallStatus(e,t){let i=this.state.pendingToolCalls.map(i=>i.id===e?(0,r._)((0,o._)({},i),{status:t}):i);this.setPendingToolCalls(i)}setSelectionContexts(e){this.state.selectionContexts=e}getSelectionContexts(){return this.state.selectionContexts}addSelectionContext(e){let{maxContextRanges:t}=this.jodit.o.aiAssistantPro,i=[...this.state.selectionContexts,e];i.length>t&&(i=i.slice(-t)),this.setSelectionContexts(i),this.jodit.e.fire("contextAdded.ai-assistant-pro",e)}removeSelectionContext(e){let t=this.state.selectionContexts.filter((t,i)=>i!==e);this.setSelectionContexts(t),this.jodit.e.fire("contextRemoved.ai-assistant-pro",e)}clearSelectionContexts(){this.setSelectionContexts([])}setAbortController(e){this.state.abortController=e}getAbortController(){return this.state.abortController}setEditingMessageId(e){this.state.editingMessageId=e}getEditingMessageId(){return this.state.editingMessageId}isEditingMessage(){return null!=this.state.editingMessageId}clearEditingMessage(){this.setEditingMessageId(null)}reset(){this.state=this.createInitialState()}destruct(){this.state.abortController&&this.state.abortController.abort(),this.reset()}constructor(e){(0,n._)(this,"jodit",void 0),(0,n._)(this,"state",void 0),this.jodit=e,this.state=this.createInitialState()}}},62895:function(e,t,i){"use strict";i.d(t,{WebStorageConversationStorage:function(){return n.WebStorageConversationStorage},createStorageProvider:function(){return n.createStorageProvider}});var n=i(21064)},21064:function(e,t,i){"use strict";i.d(t,{WebStorageConversationStorage:function(){return a},createStorageProvider:function(){return l},generateConversationId:function(){return u},generateMessageId:function(){return c}});var n=i(77688),o=i(82749),r=i(56075),s=i(97333);class a{close(){return this.storage.close()}getConversationKey(e){return`conv:${e}`}getAllKeys(){return(0,n._)(function*(){let e=yield this.storage.get("__conversation_index__");return e&&Array.isArray(e)?e:[]}).call(this)}updateIndex(e){return(0,n._)(function*(){yield this.storage.set("__conversation_index__",e)}).call(this)}addToIndex(e){return(0,n._)(function*(){let t=yield this.getAllKeys();t.includes(e)||(t.push(e),yield this.updateIndex(t))}).call(this)}removeFromIndex(e){return(0,n._)(function*(){let t=(yield this.getAllKeys()).filter(t=>t!==e);yield this.updateIndex(t)}).call(this)}list(e){return(0,n._)(function*(){try{let n=yield this.getAllKeys(),o=[],r=null==e?void 0:e.toLowerCase().trim();for(let e of n){var t,i;let n=yield this.get(e);if(n){if(r){let e=null==(i=n.title)?void 0:i.toLowerCase().includes(r),t=!e&&n.messages.some(e=>e.content.toLowerCase().includes(r));if(!e&&!t)continue}o.push({id:n.id,title:null!=(t=n.title)?t:"",created:n.created,updated:n.updated,messageCount:n.messages.length})}}return o.sort((e,t)=>t.updated-e.updated),o}catch(e){return[]}}).call(this)}get(e){return(0,n._)(function*(){try{let t=this.getConversationKey(e);return(yield this.storage.get(t))||null}catch(e){return null}}).call(this)}save(e){return(0,n._)(function*(){try{if(0===e.messages.length)throw Error("Conversation must have at least one message.");let t=yield this.getAllKeys();t.length>=this.maxConversations&&!t.includes(e.id)&&(yield this.evictOldest());let i=this.getConversationKey(e.id);yield this.storage.set(i,e),yield this.addToIndex(e.id)}catch(t){if((null==t?void 0:t.name)==="QuotaExceededError"||(null==t?void 0:t.code)===22||(null==t?void 0:t.code)===1014){yield this.evictOldest();try{let t=this.getConversationKey(e.id);yield this.storage.set(t,e),yield this.addToIndex(e.id)}catch(e){throw Error("Storage quota exceeded. Please delete some conversations.")}}else throw Error(`Failed to save conversation: ${(null==t?void 0:t.message)||"Unknown error"}`)}}).call(this)}delete(e){return(0,n._)(function*(){try{let t=this.getConversationKey(e);yield this.storage.delete(t),yield this.removeFromIndex(e)}catch(e){}}).call(this)}clear(){return(0,n._)(function*(){try{for(let e of yield this.getAllKeys()){let t=this.getConversationKey(e);yield this.storage.delete(t)}yield this.updateIndex([])}catch(e){}}).call(this)}evictOldest(){return(0,n._)(function*(){try{let e=yield this.list();if(0===e.length)return;e.sort((e,t)=>e.updated-t.updated);let t=e[0];yield this.delete(t.id)}catch(e){}}).call(this)}getGlobalSettings(){return(0,n._)(function*(){try{return(yield this.storage.get("global-settings"))||null}catch(e){return null}}).call(this)}saveGlobalSettings(e){return(0,n._)(function*(){try{let t=yield this.getGlobalSettings(),i=(0,r._)({},t,e);yield this.storage.set("global-settings",i)}catch(e){throw Error("Failed to save global settings")}}).call(this)}constructor(e,t){(0,o._)(this,"storage",void 0),(0,o._)(this,"maxConversations",void 0),this.storage=e,this.maxConversations=t}}function l(e,t){return s.AsyncStorage.makeStorage(e,t)}function u(){return`conv_${Date.now()}_${Math.random().toString(36).substring(2,11)}`}function c(){return`msg_${Date.now()}_${Math.random().toString(36).substring(2,11)}`}},55487:function(e,t,i){"use strict";i.d(t,{ToolRegistry:function(){return a}});var n=i(77688),o=i(82749),r=i(56075),s=i(53835);class a{registerBuiltInTools(e){e.forEach(e=>{let t=s.BUILT_IN_TOOLS[e];t&&this.tools.set(e,t)})}registerCustomTools(e){e.forEach(e=>{this.validateToolDefinition(e),this.tools.set(e.name,e)})}validateToolDefinition(e){if(!e.name||"string"!=typeof e.name)throw Error("Tool must have a valid name");if(!e.description||"string"!=typeof e.description)throw Error(`Tool "${e.name}" must have a description`);if(!Array.isArray(e.parameters))throw Error(`Tool "${e.name}" must have a parameters array`);if("function"!=typeof e.execute)throw Error(`Tool "${e.name}" must have an execute function`);e.parameters.forEach(t=>{if(!t.name||"string"!=typeof t.name)throw Error(`Tool "${e.name}" has a parameter without a valid name`);if(!t.type)throw Error(`Tool "${e.name}" parameter "${t.name}" must have a type`);if("boolean"!=typeof t.required)throw Error(`Tool "${e.name}" parameter "${t.name}" must specify if it's required`)})}getAllTools(){return Array.from(this.tools.values())}getTool(e){return this.tools.get(e)}hasTool(e){return this.tools.has(e)}getToolNames(){return Array.from(this.tools.keys())}executeTool(e,t,i){return(0,n._)(function*(){let n=this.getTool(e);if(!n)throw Error(`Tool "${e}" not found`);let o=this.applyDefaults(n,t);this.validateArguments(n,o);try{return yield n.execute(this.jodit,o,i)}catch(e){if((null==e?void 0:e.name)==="AbortError"||i.aborted)throw Error("Tool execution was aborted");throw e}}).call(this)}validateArguments(e,t){let i=Object.keys(t);for(let t of e.parameters.filter(e=>e.required).map(e=>e.name))if(!i.includes(t))throw Error(`Tool "${e.name}" requires parameter "${t}"`);for(let[i,n]of Object.entries(t)){let t=e.parameters.find(e=>e.name===i);if(!t){this.jodit.o.aiAssistantPro.debug;continue}let o=Array.isArray(n)?"array":"object"==typeof n&&null!=n?"object":typeof n;if(t.type!==o&&!("number"===t.type&&"string"===o&&!isNaN(Number(n))))throw Error(`Tool "${e.name}" parameter "${i}" expects type "${t.type}" but got "${o}"`);if(t.enum&&t.enum.length>0&&!t.enum.includes(n))throw Error(`Tool "${e.name}" parameter "${i}" must be one of: ${t.enum.join(", ")}`)}}applyDefaults(e,t){let i=(0,r._)({},t);for(let t of e.parameters)void 0===i[t.name]&&void 0!==t.default&&(i[t.name]=t.default);return i}destruct(){this.tools.clear()}constructor(e){(0,o._)(this,"jodit",void 0),(0,o._)(this,"tools",void 0),this.jodit=e,this.tools=new Map,this.registerBuiltInTools(e.o.aiAssistantPro.enabledTools||[]),this.registerCustomTools(e.o.aiAssistantPro.customTools||[])}}},26612:function(e){e.exports={"AI Assistant":"AI Assistant","AI Assistant Pro":"AI Assistant Pro","Welcome to AI Assistant":"Welcome to AI Assistant","Start your first conversation":"Start your first conversation","Tip: Select text in editor to add context":"Tip: Select text in editor to add context","New Chat":"New Chat","Search conversations...":"Search conversations...","No conversations yet":"No conversations yet","Ask me anything...":"Ask me anything...","Ask a follow-up...":"Ask a follow-up...","Reply...":"Reply...","Type your message...":"Type your message...",Send:"Send",Cancel:"Cancel",Retry:"Retry",Insert:"Insert",Copy:"Copy",Edit:"Edit",Delete:"Delete",New:"New",Back:"Back","Permission Required":"Permission Required",Approve:"Approve",Deny:"Deny",Once:"Once","This conversation":"This conversation",Always:"Always","The AI wants to execute:":"The AI wants to execute:","This will modify your document content.":"This will modify your document content.","Executing...":"Executing...","Completed successfully":"Completed successfully",Failed:"Failed","Pending approval":"Pending approval","Denied by user":"Denied by user","Tool Result":"Tool Result","Tool Execution Error":"Tool Execution Error",Context:"Context",Contexts:"Contexts","Add to AI Context":"Add to AI Context",Remove:"Remove","Clear all":"Clear all","An error occurred":"An error occurred","Request failed":"Request failed","Connection error":"Connection error","AI Assistant is not configured":"AI Assistant is not configured","Thinking...":"Thinking...","Generating response...":"Generating response...",insertHTML:"Insert HTML",readDocument:"Read Document",readBlock:"Read Block",replaceInDocument:"Replace in Document",replaceInBlock:"Replace in Block",getSelection:"Get Selection","Just now":"Just now",Conversation:"Conversation","New Conversation":"New Conversation",Yesterday:"Yesterday","Delete conversation":"Delete conversation","Are you sure you want to delete this conversation?":"Are you sure you want to delete this conversation?","Failed to delete conversation":"Failed to delete conversation"}},63805:function(e,t,i){"use strict";i.r(t),i.d(t,{en:function(){return n},ru:function(){return o}});var n=i(26612),o=i(55790)},55790:function(e){e.exports={"AI Assistant":"AI Ассистент","AI Assistant Pro":"AI Ассистент Pro","Welcome to AI Assistant":"Добро пожаловать в AI Ассистент","Start your first conversation":"Начните первый диалог","Tip: Select text in editor to add context":"Подсказка: Выделите текст в редакторе для добавления контекста","New chat":"Новый чат","Search conversations...":"Поиск диалогов...","No conversations yet":"Пока нет диалогов","Ask me anything...":"Спросите меня о чем угодно...","Ask a follow-up...":"Задайте дополнительный вопрос...","Reply...":"Ответить...","Type your message...":"Введите ваше сообщение...",Send:"Отправить",Cancel:"Отмена",Retry:"Повторить",Insert:"Вставить",Copy:"Копировать",Edit:"Редактировать",Delete:"Удалить",New:"Новый",Back:"Назад","Permission Required":"Требуется разрешение",Approve:"Разрешить",Deny:"Отклонить",Once:"Один раз","This conversation":"Этот диалог",Always:"Всегда","The AI wants to execute:":"AI хочет выполнить:","This will modify your document content.":"Это изменит содержимое вашего документа.","Executing...":"Выполняется...","Completed successfully":"Успешно выполнено",Failed:"Ошибка","Pending approval":"Ожидает разрешения","Denied by user":"Отклонено пользователем","Tool Result":"Результат инструмента","Tool Execution Error":"Ошибка выполнения инструмента",Context:"Контекст",Contexts:"Контексты","Add to AI Context":"Добавить в контекст AI",Remove:"Удалить","Clear all":"Очистить все","An error occurred":"Произошла ошибка","Request failed":"Запрос не выполнен","Connection error":"Ошибка соединения","AI Assistant is not configured":"AI Ассистент не настроен","Thinking...":"Думаю...","Generating response...":"Генерирую ответ...",insertHTML:"Вставить HTML",readDocument:"Прочитать документ",readBlock:"Прочитать блок",replaceInDocument:"Заменить в документе",replaceInBlock:"Заменить в блоке",getSelection:"Получить выделение","Just now":"Только что",Conversation:"Диалог","New Conversation":"Новый диалог",Yesterday:"Вчера","Delete conversation":"Удалить диалог","Are you sure you want to delete this conversation?":"Вы уверены, что хотите удалить этот диалог?","Failed to delete conversation":"Не удалось удалить диалог",Settings:"Настройки","General Settings":"Общие настройки","Conversation Settings":"Настройки диалога","Display Mode":"Режим отображения","Panel Width":"Ширина панели",Theme:"Тема",Model:"Модель",Temperature:"Температура",Close:"Закрыть",Dialog:"Модальное окно",Left:"Левая панель",Right:"Правая панель",Top:"Верхняя панель",Bottom:"Нижняя панель",Inherit:"Наследовать от редактора",Light:"Светлая тема",Dark:"Тёмная тема","%dm ago":"%dм назад","%dh ago":"%dч назад"}},94454:function(e,t,i){"use strict";i.d(t,{getAIProviderOptions:function(){return n.getAIProviderOptions},registerAIProvider:function(){return n.registerAIProvider}}),i(82923);var n=i(58211)},82923:function(e,t,i){"use strict";var n=i(89929),o=i(77688),r=i(86127),s=i(56075),a=i(11886),l=i(25415),u=i(58211),c=i(54079);(0,u.registerAIProvider)("jodit-ai-adapter",e=>{var t;let i=e.url.replace(/\/+$/,""),u=null!=(t=e.provider)?t:"openai",d=!1!==e.stream;return{apiMode:"incremental",maxRetries:0,voiceInputEnabled:!0,voiceInputUrl:`${i.replace(/^http/,"ws")}/v1/ai/transcribe`,voiceInputApiKey:e.apiKey,textAutocompleteEnabled:!0,textAutocompleteApiRequest:(t,n,r)=>(0,o._)(function*(){var o;let s=new c.Ajax({url:`${i}/ai/autocomplete?query=${encodeURIComponent(t)}&key=${encodeURIComponent(e.apiKey)}`,method:"POST",contentType:"application/json",data:{provider:u,context:{maxSuggestions:n}}});r.addEventListener("abort",()=>s.abort(),{once:!0});let a=yield s.send(),l=yield a.json();return l.success&&(null==(o=l.result)?void 0:o.suggestions)?l.result.suggestions:[]})(),apiRequest:(t,h)=>(0,o._)(function*(){let o=new c.Ajax({url:`${i}/ai/request?key=${encodeURIComponent(e.apiKey)}`,method:"POST",contentType:"application/json",data:{provider:u,context:d?(0,a._)((0,s._)({},t),{metadata:(0,a._)((0,s._)({},t.metadata),{stream:!0})}):t}});if(h&&h.addEventListener("abort",()=>o.abort(),{once:!0}),!d){let e=yield o.send();return{mode:"final",response:(yield e.json()).result}}let p=o.stream();return{mode:"stream",stream:(0,l._)(function*(){var e,t=!1,i=!1;try{for(var o,s=(0,n._)(p);t=!(o=yield(0,r._)(s.next())).done;t=!1){let e=o.value;yield JSON.parse(e)}}catch(t){i=!0,e=t}finally{try{t&&null!=s.return&&(yield(0,r._)(s.return()))}finally{if(i)throw e}}})()}})()}})},58211:function(e,t,i){"use strict";i.d(t,{getAIProviderOptions:function(){return o},registerAIProvider:function(){return r}});let n=new Map;function o(e,t){let i=n.get(e);if(!i)throw Error(`AI provider "${e}" is not registered. Available providers: ${[...n.keys()].join(", ")}`);return i(t)}function r(e,t){n.set(e,t)}},65374:function(e,t,i){"use strict";i.r(t),i.d(t,["description",0,"Add HTML content to the beginning or end of the document","name",0,"addHTML","parameters",0,[{name:"html",type:"string",description:"HTML content to add",required:!0},{name:"position",type:"string",description:'Where to add: "start" adds at the beginning of the document, "end" appends to the end',required:!1,default:"end"}],"requiresPermission",0,!0])},686:function(e,t,i){"use strict";i.d(t,{execute:function(){return l}});var n=i(77688),o=i(6689),r=i(49459),s=i(85696),a=i(22732);function l(e,t,i){return(0,n._)(function*(){let n=(0,r.requireString)(t,"html",{allowEmpty:!0}),{position:l="end"}=t;if(!n.trim())return{success:!0,message:"Nothing to add: HTML is empty"};(0,o.throwIfAborted)(i);try{let t=e.createInside.fragment(),i=(0,s.createSanitizedContainer)(e,n);for(;i.firstChild;)t.appendChild(i.firstChild);return"start"===l?a.Dom.prepend(e.editor,t):a.Dom.append(e.editor,t),e.synchronizeValues(),{success:!0,message:`Added ${n.length} characters of HTML at the ${"start"===l?"beginning":"end"} of the document`}}catch(e){throw Error(`Failed to add HTML: ${(null==e?void 0:e.message)||"Unknown error"}`)}})()}},78907:function(e,t,i){"use strict";var n=i(56075),o=i(11886),r=i(65374),s=i(686);t.default=(0,o._)((0,n._)({},r),{execute:s.execute})},73943:function(e,t,i){"use strict";i.r(t),i.d(t,["description",0,"Apply or remove inline formatting to the current selection (bold, italic, underline, etc.) or to a specific block","name",0,"applyFormat","parameters",0,[{name:"element",type:"string",description:'HTML element to wrap selection (e.g., "strong", "em", "u", "span")',required:!1},{name:"attributes",type:"object",description:'Attributes to apply (e.g., {"className": "highlight"}, {"style": {"color": "red"}})',required:!1},{name:"remove",type:"boolean",description:"If true, remove the formatting instead of applying it",required:!1,default:!1},{name:"blockIndex",type:"number",description:"Zero-based index of the block to format (if not using current selection)",required:!1},{name:"selector",type:"string",description:"CSS selector to find the block to format (if not using current selection)",required:!1}],"requiresPermission",0,!0])},19127:function(e,t,i){"use strict";i.d(t,{execute:function(){return l}});var n=i(77688),o=i(56075),r=i(11886),s=i(6689),a=i(44526);function l(e,t,i){return(0,n._)(function*(){let{element:n,attributes:l,remove:u,blockIndex:c,selector:d}=t;if((0,s.throwIfAborted)(i),!n&&!l)throw Error('Either "element" or "attributes" must be provided');if(e.s.restore(),void 0!==c||d){let{element:t}=(0,a.resolveBlock)(e,{selector:d,index:c});e.s.select(t)}if(e.s.isCollapsed())throw Error("No selection found. Please select text to format");try{let t={};return n&&(t.element=n),l&&(t.attributes=l),u?e.s.commitStyle((0,r._)((0,o._)({},t),{mode:"remove"})):e.s.commitStyle(t),e.synchronizeValues(),{success:!0,message:u?"Formatting removed successfully":"Formatting applied successfully"}}catch(e){throw Error(`Failed to ${u?"remove":"apply"} formatting: ${e.message}`)}})()}},39296:function(e,t,i){"use strict";var n=i(56075),o=i(11886),r=i(73943),s=i(19127);t.default=(0,o._)((0,n._)({},r),{execute:s.execute})},53835:function(e,t,i){"use strict";i.d(t,{getToolNames:function(){return f}});var n=i(78907),o=i(39296),r=i(16745),s=i(78717),a=i(5618),l=i(90991),u=i(2020),c=i(12570),d=i(95323),h=i(97603);let p={readDocument:a.default,readBlocks:s.default,readSelection:l.default,writeDocument:h.default,replaceSelection:d.default,replaceBlock:u.default,replaceInDocument:c.default,insertHTML:r.default,addHTML:n.default,applyFormat:o.default};function f(){return Object.keys(p)}i.d(t,["BUILT_IN_TOOLS",0,p])},56732:function(e,t,i){"use strict";i.r(t),i.d(t,["description",0,"Insert or replace HTML content at the current cursor position in the editor","name",0,"insertHTML","parameters",0,[{name:"html",type:"string",description:"HTML content to insert",required:!0},{name:"replace",type:"boolean",description:"If true, replaces current selection. If false, inserts at cursor",required:!1,default:!1}],"requiresPermission",0,!0])},39592:function(e,t,i){"use strict";i.d(t,{execute:function(){return s}});var n=i(77688),o=i(6689),r=i(49459);function s(e,t,i){return(0,n._)(function*(){let n=(0,r.requireString)(t,"html",{allowEmpty:!0}),{replace:s}=t;if(!n.trim())return{success:!0,message:"Nothing to insert: HTML is empty"};(0,o.throwIfAborted)(i);try{return e.s.focus(),s&&!e.s.isCollapsed()&&e.s.remove(),e.s.insertHTML(n),e.synchronizeValues(),{success:!0,message:`Inserted ${n.length} characters of HTML`}}catch(e){throw Error(`Failed to insert HTML: ${(null==e?void 0:e.message)||"Unknown error"}`)}})()}},16745:function(e,t,i){"use strict";var n=i(56075),o=i(11886),r=i(56732),s=i(39592);t.default=(0,o._)((0,n._)({},r),{execute:s.execute})},75352:function(e,t,i){"use strict";i.r(t),i.d(t,["description",0,"Read blocks from the editor with optional filtering and pagination","name",0,"readBlocks","parameters",0,[{name:"offset",type:"number",description:"Number of blocks to skip from the beginning (default: 0)",required:!1,default:0},{name:"limit",type:"number",description:"Maximum number of blocks to return (default: all)",required:!1},{name:"query",type:"string",description:"Filter blocks by text content",required:!1}],"requiresPermission",0,!1])},91140:function(e,t,i){"use strict";i.d(t,{execute:function(){return s}});var n=i(77688),o=i(6689),r=i(22732);function s(e,t,i){return(0,n._)(function*(){let{offset:n,limit:s,query:a}=t;(0,o.throwIfAborted)(i);let l=[];Array.from(e.editor.children).forEach((e,t)=>{r.Dom.isElement(e)&&l.push({blockIndex:t,tagName:e.tagName.toLowerCase(),content:e.innerHTML,textContent:e.textContent||"",classList:Array.from(e.classList)})});let u=l;if(a&&"string"==typeof a){let e=a.toLowerCase();u=l.filter(t=>t.textContent.toLowerCase().includes(e)||t.tagName.includes(e)||t.content.toLowerCase().includes(e))}let c=Math.max(0,Math.min("number"==typeof n?n:0,u.length)),d=void 0!==s?Math.min(c+s,u.length):u.length;return{blocks:u.slice(c,d),total:l.length,offset:c,limit:void 0!==s?s:void 0}})()}},78717:function(e,t,i){"use strict";var n=i(56075),o=i(11886),r=i(75352),s=i(91140);t.default=(0,o._)((0,n._)({},r),{execute:s.execute})},93809:function(e,t,i){"use strict";i.r(t),i.d(t,["description",0,"Read the entire content of the editor document in HTML format","name",0,"readDocument","parameters",0,[{name:"start",type:"number",description:"Start character position (default: 0)",required:!1,default:0},{name:"end",type:"number",description:"End character position (default: length of document)",required:!1},{name:"aroundSelection",type:"boolean",description:"If true, return only the maximum block around the current selection",required:!1,default:!1}],"requiresPermission",0,!1])},28157:function(e,t,i){"use strict";i.d(t,{execute:function(){return s}});var n=i(77688),o=i(6689),r=i(22732);function s(e,t,i){return(0,n._)(function*(){let{start:n,end:s,aroundSelection:a}=t;(0,o.throwIfAborted)(i);let l=e.value,u=l.length;if(a&&!e.s.isCollapsed()){let t=e.s.range.commonAncestorContainer;for(;t&&t!==e.editor;){if(r.Dom.isElement(t)&&t.parentNode===e.editor){l=t.outerHTML;break}t=t.parentNode}return{html:l,length:u}}let c=void 0!==s?Math.min(s,u):u,d=Math.max(0,Math.min("number"==typeof n?n:0,u));return(d>0||u>c)&&(l=l.substring(d,c)),{html:l,length:u,start:d,end:c}})()}},5618:function(e,t,i){"use strict";var n=i(56075),o=i(11886),r=i(93809),s=i(28157);t.default=(0,o._)((0,n._)({},r),{execute:s.execute})},52826:function(e,t,i){"use strict";i.r(t),i.d(t,["description",0,"Get information about the current selection including HTML content and optional context","name",0,"readSelection","parameters",0,[{name:"contextCharsBefore",type:"number",description:"Number of characters to include before the selection",required:!1,default:0},{name:"contextCharsAfter",type:"number",description:"Number of characters to include after the selection",required:!1,default:0}],"requiresPermission",0,!1])},85130:function(e,t,i){"use strict";i.d(t,{execute:function(){return r}});var n=i(77688),o=i(6689);function r(e,t,i){return(0,n._)(function*(){let{contextCharsBefore:n,contextCharsAfter:r}=t;if((0,o.throwIfAborted)(i),e.s.restore(),e.s.isCollapsed())return{hasSelection:!1};let s=e.s.html,a=e.s.range,l=a.toString(),u={hasSelection:!0,html:s,text:l,startContainer:a.startContainer.nodeName,endContainer:a.endContainer.nodeName};if(n>0||r>0){let t=e.editor.textContent||"",i=t.substring(0,t.indexOf(l)),o=t.substring(t.indexOf(l)+l.length);n>0&&(u.contextBefore=i.slice(-n)),r>0&&(u.contextAfter=o.slice(0,r))}return u})()}},90991:function(e,t,i){"use strict";var n=i(56075),o=i(11886),r=i(52826),s=i(85130);t.default=(0,o._)((0,n._)({},r),{execute:s.execute})},96675:function(e,t,i){"use strict";i.r(t),i.d(t,["description",0,"Replace a specific block in the document by its index or CSS selector with new HTML content","name",0,"replaceBlock","parameters",0,[{name:"index",type:"number",description:"Zero-based index of the block to replace (use either index or selector, not both)",required:!1},{name:"selector",type:"string",description:'CSS selector to find the block to replace (e.g., "h1", ".my-class", "#my-id"). Use either selector or index, not both',required:!1},{name:"html",type:"string",description:"HTML content for the new block",required:!0}],"requiresPermission",0,!0])},3091:function(e,t,i){"use strict";i.d(t,{execute:function(){return u}});var n=i(77688),o=i(6689),r=i(49459),s=i(44526),a=i(85696),l=i(22732);function u(e,t,i){return(0,n._)(function*(){let{index:n,selector:u}=t,c=(0,r.requireString)(t,"html");if((0,o.throwIfAborted)(i),void 0===n&&!u||void 0!==n&&u)throw Error("Either index or selector must be provided, but not both");let{element:d,identifier:h}=(0,s.resolveBlock)(e,{selector:u,index:n,requireExactlyOne:!0});try{var p;let t=(0,a.createSanitizedContainer)(e,c).firstChild;if(!t||!l.Dom.isElement(t))throw Error("Invalid HTML: must contain at least one element");return null==(p=d.parentNode)||p.replaceChild(t,d),e.synchronizeValues(),{success:!0,message:`Block ${h} replaced successfully`}}catch(e){throw Error(`Failed to replace block ${h}: ${e.message}`)}})()}},2020:function(e,t,i){"use strict";var n=i(56075),o=i(11886),r=i(96675),s=i(3091);t.default=(0,o._)((0,n._)({},r),{execute:s.execute})},62553:function(e,t,i){"use strict";i.r(t),i.d(t,["description",0,"Find and replace text or HTML patterns throughout the entire document","name",0,"replaceInDocument","parameters",0,[{name:"search",type:"string",description:"Text or pattern to search for",required:!0},{name:"replace",type:"string",description:"Replacement text or HTML",required:!0},{name:"useRegex",type:"boolean",description:"If true, treats search as a regular expression",required:!1,default:!1},{name:"useSelector",type:"string",description:"CSS selector to narrow down the search scope to specific elements",required:!1}],"requiresPermission",0,!0])},56293:function(e,t,i){"use strict";i.d(t,{execute:function(){return a}});var n=i(77688),o=i(6689),r=i(49459),s=i(85696);function a(e,t,i){return(0,n._)(function*(){let n=(0,r.requireString)(t,"search"),a=(0,r.requireString)(t,"replace",{allowEmpty:!0}),{useRegex:l,useSelector:u}=t;(0,o.throwIfAborted)(i);try{let t;e.s.focus(),e.s.save();let r=0;if(u){let c=function(e,t,i,n,r,a){let l=e.editor.querySelectorAll(r);if(0===l.length)return{replacements:0,message:`No elements found matching selector "${r}"`};let u=0;return l.forEach(r=>{(0,o.throwIfAborted)(a);let l=r.innerHTML,c=l;if(n)try{let e=RegExp(t,"g");l=l.replace(e,()=>(u++,i))}catch(e){throw Error(`Invalid regex pattern: ${(null==e?void 0:e.message)||"Unknown error"}`)}else{let e=t.length,n=0;for(;-1!==(n=l.indexOf(t,n));)(0,o.throwIfAborted)(a),l=l.substring(0,n)+i+l.substring(n+e),n+=i.length,u++}l!==c&&(r.innerHTML=l,(0,s.sanitizeElement)(e,r))}),u>0&&(e.synchronizeValues(),e.s.restore()),{replacements:u}}(e,n,a,l,u,i);r=c.replacements,t=c.message}else r=function(e,t,i,n,r,s){let a=0,l=t;if(r)try{let e=RegExp(i,"g");l=l.replace(e,()=>(a++,n))}catch(e){throw Error(`Invalid regex pattern: ${(null==e?void 0:e.message)||"Unknown error"}`)}else{let e=i.length,t=0;for(;-1!==(t=l.indexOf(i,t));)(0,o.throwIfAborted)(s),l=l.substring(0,t)+n+l.substring(t+e),t+=n.length,a++}return a>0&&(e.value=l,e.s.restore(),e.synchronizeValues()),a}(e,e.value,n,a,l,i);return{replacements:r,message:t||(r>0?`Replaced ${r} occurrence(s)`:"No matches found")}}catch(t){throw e.s.restore(),Error(`Failed to replace in document: ${(null==t?void 0:t.message)||"Unknown error"}`)}})()}},12570:function(e,t,i){"use strict";var n=i(56075),o=i(11886),r=i(62553),s=i(56293);t.default=(0,o._)((0,n._)({},r),{execute:s.execute})},70750:function(e,t,i){"use strict";i.r(t),i.d(t,["description",0,"Replace the current selection with new HTML content","name",0,"replaceSelection","parameters",0,[{name:"html",type:"string",description:"HTML content to insert in place of the selection",required:!0},{name:"collapseToEnd",type:"boolean",description:"Move cursor to the end of the inserted content",required:!1,default:!0}],"requiresPermission",0,!0])},36142:function(e,t,i){"use strict";i.d(t,{execute:function(){return s}});var n=i(77688),o=i(6689),r=i(49459);function s(e,t,i){return(0,n._)(function*(){let n=(0,r.requireString)(t,"html"),{collapseToEnd:s}=t;(0,o.throwIfAborted)(i);try{if(e.s.restore(),e.s.insertHTML(n),s){let t=e.s.range;t.collapse(!1),e.s.selectRange(t)}return e.e.fire("change"),{success:!0,message:"Selection replaced successfully"}}catch(e){throw Error(`Failed to replace selection: ${e.message}`)}})()}},95323:function(e,t,i){"use strict";var n=i(56075),o=i(11886),r=i(70750),s=i(36142);t.default=(0,o._)((0,n._)({},r),{execute:s.execute})},90022:function(e,t,i){"use strict";i.r(t),i.d(t,["description",0,"Write (replace) the entire document content with new HTML","name",0,"writeDocument","parameters",0,[{name:"html",type:"string",description:"HTML content to set as the document",required:!0}],"requiresPermission",0,!0])},79766:function(e,t,i){"use strict";i.d(t,{execute:function(){return s}});var n=i(77688),o=i(6689),r=i(49459);function s(e,t,i){return(0,n._)(function*(){let n=(0,r.requireString)(t,"html",{allowEmpty:!0});(0,o.throwIfAborted)(i);try{return e.s.focus(),e.value=n,e.synchronizeValues(),{success:!0,message:`Document content was replaced with provided HTML(${n.length} characters)`}}catch(e){throw Error(`Failed to replace HTML: ${(null==e?void 0:e.message)||"Unknown error"}`)}})()}},97603:function(e,t,i){"use strict";var n=i(56075),o=i(11886),r=i(90022),s=i(79766);t.default=(0,o._)((0,n._)({},r),{execute:s.execute})},80453:function(e,t,i){"use strict";i.d(t,{UIConversationListItem:function(){return u}});var n=i(82749),o=i(31635),r=i(65478),s=i(67510),a=i(62843),l=i(80870);class u extends s.UIElement{className(){return"UIConversationListItem"}render(){return'<div class="jodit-ui-conversation-list__item"></div>'}setActive(e){this.isActive=e,this.updateContent()}updateContent(){let e=this.container;e.innerHTML="",e.setAttribute("data-id",this.conversation.id),this.isActive?e.classList.add("jodit-ui-conversation-list__item_active"):e.classList.remove("jodit-ui-conversation-list__item_active");let t=this.j.c.div("jodit-ui-conversation-list__item-avatar");t.textContent="AI",e.appendChild(t);let i=this.j.c.div("jodit-ui-conversation-list__item-wrapper"),n=this.j.c.div("jodit-ui-conversation-list__item-content"),o=this.j.c.div("jodit-ui-conversation-list__item-title");if(o.textContent=this.conversation.title,this.titleElement=o,n.appendChild(o),this.opts.showTimestamps){let e=this.j.c.div("jodit-ui-conversation-list__item-meta");e.textContent=this.opts.formatTimestamp(this.conversation.updated,this.j.i18n.bind(this.j)),n.appendChild(e)}if(i.appendChild(n),this.conversation.messageCount>0){let e=this.j.c.div("jodit-ui-conversation-list__item-badge");e.textContent=String(this.conversation.messageCount),i.appendChild(e)}e.appendChild(i),this.actionsButton||(this.actionsButton=new a.UIButton(this.j,{icon:{name:"dots"},tooltip:"Actions",name:"conversationActions",size:"tiny"}),this.actionsButton.container.classList.add("jodit-ui-conversation-list__item-actions"),this.actionsButton.onAction(e=>{e.stopPropagation(),this.showActionsMenu(e)})),e.appendChild(this.actionsButton.container)}onClick(){this.isRenaming||this.j.e.fire("selectConversation.ai-assistant-pro",this.conversation.id)}showActionsMenu(e){if(!this.contextMenu||!this.actionsButton)return;let t=this.actionsButton.container.getBoundingClientRect();this.contextMenu.show(t.left,t.bottom,[{title:"Rename",icon:"pencil",exec:()=>{this.startInlineRename()}},{title:"Delete",icon:"bin",exec:()=>{this.onDelete()}}]),e.stopPropagation()}startInlineRename(){if(this.isRenaming||!this.titleElement)return;this.isRenaming=!0;let e=this.titleElement,t=this.conversation.title,i=this.j.c.element("input");i.type="text",i.value=t,i.className="jodit-ui-conversation-list__item-title-input",e.textContent="",e.appendChild(i),i.focus(),i.select();let n=()=>{if(!this.isRenaming)return;let n=i.value.trim();this.isRenaming=!1,n&&n!==t?(e.textContent=n,this.j.e.fire("renameConversation.ai-assistant-pro",this.conversation.id,n)):e.textContent=t};this.j.e.on(i,"blur",n),this.j.e.on(i,"keydown",n=>{"Enter"===n.key&&(n.preventDefault(),i.blur()),"Escape"===n.key&&(this.isRenaming=!1,e.textContent=t)}),this.j.e.on(i,"click",e=>{e.stopPropagation()})}onDelete(){this.j.e.fire("deleteConversation.ai-assistant-pro",this.conversation.id)}destruct(){var e,t;null==(e=this.actionsButton)||e.destruct(),null==(t=this.contextMenu)||t.destruct(),super.destruct()}constructor(e,t,i=!1,o){super(e),(0,n._)(this,"opts",void 0),(0,n._)(this,"conversation",void 0),(0,n._)(this,"isActive",void 0),(0,n._)(this,"actionsButton",void 0),(0,n._)(this,"contextMenu",void 0),(0,n._)(this,"titleElement",void 0),(0,n._)(this,"isRenaming",void 0),this.opts=o,this.actionsButton=null,this.contextMenu=null,this.titleElement=null,this.isRenaming=!1,this.conversation=t,this.isActive=i,this.contextMenu=new l.ContextMenu(this.j),this.updateContent()}}(0,o.__decorate)([(0,r.watch)("container:click")],u.prototype,"onClick",null),(0,o.__decorate)([r.autobind],u.prototype,"showActionsMenu",null),(0,o.__decorate)([r.autobind],u.prototype,"startInlineRename",null),(0,o.__decorate)([r.autobind],u.prototype,"onDelete",null),u=(0,o.__decorate)([r.component],u)},68365:function(e,t,i){"use strict";i.d(t,{UIConversationList:function(){return c}});var n=i(82749),o=i(31635),r=i(31356),s=i(80453),a=i(65478),l=i(80256),u=i(62405);class c extends u.UIGroup{className(){return"UIConversationList"}render(){return`<div class="&__container">
256
+ ${r}`.trim();i?yield this.__executeQuickCommandSilent(l,r):yield this.__executeQuickCommandWithPanel(l,n)}).call(this)}__executeQuickCommandSilent(e,t){return(0,n._)(function*(){yield this.__loadData(),this.j.progressbar.show().progress(100);try{let t=(0,f.createUserMessage)(e),i=(0,f.createNewConversation)(this.j,this.state.defaultModel,this.state.defaultTemperature,[t]),n=yield this.apiClient.sendRequest(i.id,i.messages,null,[],i.options);if("final"===n.mode){let e=n.response.content;e&&this.j.s.insertHTML(e)}}catch(e){(0,y.isAbortError)(e)||this.j.e.fire("error",e)}finally{this.j.progressbar.hide()}}).call(this)}__executeQuickCommandWithPanel(e,t){return(0,n._)(function*(){yield this.__loadData();let i=this.stateManager.state.displayMode;this.stateManager.state.displayMode=t;let n=(0,f.getCurrentSelectionContext)(this.j);n&&this.stateManager.addSelectionContext(n),this.stateManager.isOpen()||(yield this.openAssistant()),yield this.sendMessage(e),this.stateManager.state.displayMode=i}).call(this)}sendMessage(e){return(0,n._)(function*(){yield this.__loadData();let t=this.stateManager.getCurrentConversation(),i=this.stateManager.getEditingMessageId();if(i&&t){let e=t.messages.findIndex(e=>e.id===i);if(-1!==e){let i=t.messages.slice(0,e),n=(0,s._)((0,r._)({},t),{messages:i,updatedAt:Date.now()});this.stateManager.setCurrentConversation(n),yield this.storage.save(n),this.stateManager.clearEditingMessage(),t=n}}t||(t=(0,f.createNewConversation)(this.j,this.state.defaultModel,this.state.defaultTemperature),this.stateManager.setCurrentConversation(t));let n=null;e.trim()&&(n=(0,f.createUserMessage)(e),t.title||(t=(0,s._)((0,r._)({},t),{title:e})),t=(0,s._)((0,r._)({},t),{updated:Date.now(),messages:[...t.messages,n]})),this.stateManager.setCurrentConversation((0,r._)({},t)),n&&this.j.e.fire("messageSent.ai-assistant-pro",n),this.stateManager.setLoading(!0),this.stateManager.clearError();try{yield this.sendRequestToAI(0),this.stateManager.clearSelectionContexts()}catch(e){if((0,y.isAbortError)(e))return;this.stateManager.setError(e instanceof Error?e.message:String(e))}finally{this.stateManager.setLoading(!1)}}).call(this)}sendRequestToAI(e=0){return(0,n._)(function*(){let t,i,n=this.j.o.aiAssistantPro.maxRecursionToolCallDepth;if(e>=n)throw Error(`Max recursion depth ${n} reached for tool calls`);let o=this.stateManager.getCurrentConversation();if(!o)return;let s=(0,f.findParentMessageId)(o),[a]=yield Promise.all([this.apiClient.sendRequest(o.id,o.messages,s,this.stateManager.getSelectionContexts(),o.options),this.storage.save(o)]);if("stream"===a.mode){let e=yield(0,f.processStreamingResponse)(this.stateManager,a,o);t=e.aiMessage,i=e.index,o=e.conversation}else{let e=(0,f.processFinalResponse)(a,o);t=e.aiMessage,i=e.index,o=e.conversation}o=yield(0,f.processArtifacts)(this.j,t,o,i),this.j.e.fire("messageReceived.ai-assistant-pro",t),this.stateManager.setCurrentConversation((0,r._)({},o)),yield this.storage.save(o),yield this.handleToolCalls(t.id,e)}).call(this)}deleteConversation(e){return(0,n._)(function*(){yield this.__loadData(),yield(0,f.deleteConversationWithCleanup)(this.j,e,this.storage,this.stateManager,this.permissionManager)}).call(this)}renameConversation(e,t){return(0,n._)(function*(){var i;let n=yield this.storage.get(e);if(!n)return;let o=(0,s._)((0,r._)({},n),{title:t,updated:Date.now()});yield this.storage.save(o),(null==(i=this.state.currentConversation)?void 0:i.id)===e&&this.stateManager.setCurrentConversation(o);let a=yield this.storage.list();this.stateManager.setConversations(a)}).call(this)}searchConversations(e){return(0,n._)(function*(){yield this.__loadData(),yield(0,f.handleConversationSearch)(e,this.storage,this.stateManager)}).call(this)}handleToolCalls(e,t=0){return(0,n._)(function*(){let i=this.stateManager.getCurrentConversation();if(!i)return;let n=i.messages.find(t=>t.id===e);if(!n)return;let o=n.toolCalls;if(!o||0===o.length)return;let r=o.filter(e=>!(0,f.isTerminalToolCallStatus)(e.status));if(0===r.length)return;let{approved:s,needsPermission:a}=this.permissionManager.filterToolCalls(r,i.permissions);for(let i of(this.stateManager.setPendingToolCalls(a),s))yield this.executeToolCall(e,i,t)}).call(this)}executeToolCall(e,t,i=0){return(0,n._)(function*(){let n=this.stateManager.getCurrentConversation();if(!n)return;let o=yield(0,f.executeToolCall)(this.j,t,this.toolRegistry),a=n.messages.findIndex(t=>t.id===e);if(-1===a)return;let l=n.messages[a],u=n.messages.slice();u[a]=(0,f.updateToolCallInMessage)(l,o),n=(0,s._)((0,r._)({},n),{messages:u,updated:Date.now()}),this.stateManager.setCurrentConversation(n),(0,f.areAllToolCallsExecuted)(n)&&(yield this.sendRequestToAI(i+1))}).call(this)}copyMessage(e){return(0,n._)(function*(){let t=this.stateManager.getCurrentConversation();if(!t)return;let i=t.messages.find(t=>t.id===e);if(i)try{yield navigator.clipboard.writeText(i.content),this.j.message.success("Message copied to clipboard")}catch(e){this.j.e.fire("error",Error("Failed to copy message"))}}).call(this)}restartFromMessage(e){return(0,n._)(function*(){let t=this.stateManager.getCurrentConversation();if(!t)return;let i=t.messages.findIndex(t=>t.id===e);if(-1===i)return;let n=t.messages[i];if("user"!==n.role)return;yield this.__loadData();let o=t.messages.slice(0,i),a=(0,s._)((0,r._)({},t),{messages:o,updatedAt:Date.now()});this.stateManager.setCurrentConversation(a),yield this.storage.save(a),yield this.sendMessage(n.content)}).call(this)}editMessage(e){return(0,n._)(function*(){let t=this.stateManager.getCurrentConversation();if(!t)return;let i=t.messages.find(t=>t.id===e);i&&"user"===i.role&&(this.stateManager.setEditingMessageId(e),this.mainPanel.inputArea.setValue(i.content),this.mainPanel.inputArea.focus())}).call(this)}cancelEditMessage(){this.stateManager.isEditingMessage()&&(this.stateManager.clearEditingMessage(),this.mainPanel.inputArea.setValue(""))}deleteMessage(e){return(0,n._)(function*(){yield this.__loadData();let t=this.stateManager.getCurrentConversation();if(!t||-1===t.messages.findIndex(t=>t.id===e))return;let i=t.messages.filter(t=>t.id!==e),n=(0,s._)((0,r._)({},t),{messages:i,updatedAt:Date.now()});this.stateManager.setCurrentConversation(n),yield this.storage.save(n)}).call(this)}beforeDestruct(){var e,t,i,n,o,r,s,a;this.textAutocompleteSource&&(this.j.e.fire("unregisterAutocompleteSource",this.textAutocompleteSource),this.textAutocompleteSource=null),this.textAutocompleteCache.clear(),this.__closeFlightMode(),null==(e=(0,b.cached)(this,"toolRegistry"))||e.destruct(),null==(t=(0,b.cached)(this,"permissionManager"))||t.destruct(),null==(i=(0,b.cached)(this,"apiClient"))||i.destruct(),null==(n=(0,b.cached)(this,"stateManager"))||n.destruct(),null==(o=(0,b.cached)(this,"mainPanel"))||o.destruct(),null==(r=(0,b.cached)(this,"dialog"))||r.destruct(),null==(a=(0,b.cached)(this,"storage"))||null==(s=a.close)||s.call(a)}constructor(...e){super(...e),(0,o._)(this,"buttons",[{name:"aiAssistantPro",group:"insert"},{name:"aiCommandsPro",group:"insert"}]),(0,o._)(this,"textAutocompleteSource",null),(0,o._)(this,"textAutocompleteCache",new Map),(0,o._)(this,"__initedPromise",null),(0,o._)(this,"__openedMode",null)}}(0,o._)(S,"requires",["license","autocomplete"]),(0,a.__decorate)([b.cache],S.prototype,"toolRegistry",null),(0,a.__decorate)([b.cache],S.prototype,"permissionManager",null),(0,a.__decorate)([b.cache],S.prototype,"apiClient",null),(0,a.__decorate)([b.cache],S.prototype,"storage",null),(0,a.__decorate)([b.cache],S.prototype,"stateManager",null),(0,a.__decorate)([b.cache],S.prototype,"mainPanel",null),(0,a.__decorate)([b.cache],S.prototype,"dialog",null),(0,a.__decorate)([(0,b.watch)("state.theme")],S.prototype,"__applyTheme",null),(0,a.__decorate)([(0,b.watch)(":openAIAssistantPro.ai-assistant-pro")],S.prototype,"openAssistant",null),(0,a.__decorate)([(0,b.watch)([":resize","state.panelWidth","state.panelHeight"])],S.prototype,"__onResizeInPanelView",null),(0,a.__decorate)([(0,b.watch)(["state.isOpen","state.displayMode","state.panelWidth","state.panelHeight","state.theme","state.defaultModel","state.defaultTemperature","state.currentConversation"]),(0,b.debounce)()],S.prototype,"__onSavedStateChange",null),(0,a.__decorate)([(0,b.watch)(":closeAIAssistantPro.ai-assistant-pro")],S.prototype,"closeAssistant",null),(0,a.__decorate)([(0,b.watch)(":addContextToAIAssistant.ai-assistant-pro")],S.prototype,"addCurrentSelectionToContext",null),(0,a.__decorate)([(0,b.watch)(":executeQuickCommand.ai-assistant-pro")],S.prototype,"executeQuickCommand",null),(0,a.__decorate)([(0,b.watch)(":sendMessage.ai-assistant-pro")],S.prototype,"sendMessage",null),(0,a.__decorate)([(0,b.watch)(":searchConversations.ai-assistant-pro")],S.prototype,"searchConversations",null),(0,a.__decorate)([(0,b.watch)(":copyMessage.ai-assistant-pro")],S.prototype,"copyMessage",null),(0,a.__decorate)([(0,b.watch)(":restartFromMessage.ai-assistant-pro")],S.prototype,"restartFromMessage",null),(0,a.__decorate)([(0,b.watch)(":editMessage.ai-assistant-pro")],S.prototype,"editMessage",null),(0,a.__decorate)([(0,b.watch)(":cancelEditMessage.ai-assistant-pro")],S.prototype,"cancelEditMessage",null),(0,a.__decorate)([(0,b.watch)(":deleteMessage.ai-assistant-pro")],S.prototype,"deleteMessage",null),S=(0,a.__decorate)([b.component],S),_.JoditPro.plugins.add("aiAssistantPro",S)},66645:function(e,t,i){"use strict";var n,o=i(77688),r=i(56075),s=i(11886),a=i(47373),l=i(94668),u=i.n(l),c=i(86428),d=i.n(c),h=i(75966),p=i.n(h),f=i(83207),m=i.n(f),g=i(99219),b=i.n(g),v=i(63674),y=i.n(v),w=i(4133),_=i.n(w),C=i(94454),k=i(53835),S=i(6441),E=i(12153),x=i(31974),F=i(72573);E.Icon.set("ai-assistant-pro",d()).set("ai-commands-pro",p()).set("ai-add-context",u()).set("send",b()).set("tool-bolt",_()).set("chevron-right",m()).set("shield",y()),S.Config.prototype.aiAssistantPro={displayMode:"right",panelWidth:400,panelHeight:500,flightPanelHeight:250,dialogFullSize:!1,resizable:!0,apiMode:"incremental",apiRequest:null,maxRetries:3,requestTimeout:3e5,retryDelay:1e3,maxRecursionToolCallDepth:1e3,enabledTools:(0,k.getToolNames)(),customTools:[],toolPermissions:{},autoApproveTools:["readDocument","readBlocks","readSelection","insertHTML","addHTML"],alwaysDenyTools:[],defaultPermissionScope:"conversation",storage:"indexedDB",maxConversations:50,storageKey:"jodit-ai-assistant-pro",showConversationList:!0,enableMarkdown:!0,enableCodeHighlight:!0,maxMessageHeight:400,placeholderText:"Ask AI assistant...",sendShortcut:"Ctrl+Enter",showTimestamps:!0,formatTimestamp:(e,t)=>{let i=new Date(e),n=new Date().getTime()-i.getTime();return n<6e4?t("Just now"):n<36e5?t("%dm ago",Math.floor(n/6e4)):n<864e5?t("%dh ago",Math.floor(n/36e5)):i.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})},formatMessageContent:(e,t)=>F.marked.parse(e,{breaks:!0,gfm:!0}),showAvatars:!0,showTypingIndicator:!0,includeSelectionByDefault:!0,maxContextRanges:5,showContextPreview:!0,sendOnEnter:!0,instructions:void 0,includeEditorMetadata:!1,autoOpen:!0,rememberLastConversation:!0,autoFocusInput:!0,voiceInputEnabled:!1,closeAfterInsert:!1,enableSoundNotifications:!1,debug:!1,textAutocompleteEnabled:!1,textAutocompleteApiRequest:null,textAutocompleteMinQueryLength:3,textAutocompleteMaxSuggestions:3,textAutocompleteDebounceMs:500,textAutocompleteCacheTTL:3e4,textAutocompleteCacheMaxSize:50,quickCommandsSilentMode:!1,quickCommandsDisplayMode:"flight",showCopyMessageAction:!0,showRestartMessageAction:!0,showEditMessageAction:!0,showDeleteMessageAction:!0,dialogSettings:{},allowEditDialogSettings:!1,allowEditDisplayMode:!0,allowEditPanelWidth:!0,initiallyOpened:!1,allowClose:!0,persistOpenState:!0,theme:"parent",allowEditTheme:!0,uploadBase64Artifact(e,t){return(0,o._)(function*(){if("image"===e.type&&e.data&&"base64"===e.data.kind)try{let i=(0,a.base64ToFile)(e.data.base64,e.id,e.mimeType),n=yield t.uploader.upload([i]);return(0,s._)((0,r._)({},e),{data:{kind:"url",url:n.baseurl+n.files[0]},metadata:(0,s._)((0,r._)({},e.metadata),{filename:n.files[0]})})}catch(e){t.e.fire("error",e)}return e})()},getAIProviderOptions(e,t){return(0,C.getAIProviderOptions)(e,t)},registerAIProvider(e,t){(0,C.registerAIProvider)(e,t)}},S.Config.prototype.controls.aiAssistantPro={icon:"ai-assistant-pro",tooltip:"AI Assistant",hotkeys:["ctrl+shift+a","cmd+shift+a"],exec(e){e.e.fire("openAIAssistantPro.ai-assistant-pro")},isDisabled(e){return!e.o.aiAssistantPro.apiRequest},getLabel(e){return e.o.aiAssistantPro.apiRequest?"AI Assistant":"AI Assistant (not configured)"}},S.Config.prototype.controls.aiAddContext={icon:"ai-add-context",tooltip:"Add to AI Context",exec(e){e.e.fire("addContextToAIAssistant")},isDisabled(e){return!e.o.aiAssistantPro.apiRequest||e.s.isCollapsed()}},S.Config.prototype.controls.aiCommandsPro={icon:"ai-commands-pro",tooltip:"AI Commands",isDisabled(e){return!e.o.aiAssistantPro.apiRequest},list:x.aiAssitentCommands,exec(e,t,{control:i}){e.e.fire("executeQuickCommand.ai-assistant-pro",i.name)}};let A=(null==(n=S.Config.prototype.tuneBlock)?void 0:n.popup)||{},D={};["p","h1","h2","h3","h4","h5","h6","div","section","article","pre","blockquote","ul","ol","li","table","tr","td","th","img","figure"].forEach(e=>{let t=A[e]||["tune.up","tune.remove","tune.down"];D[e]=[...t,"|","aiAddContext"]}),S.Config.prototype.tuneBlock&&(S.Config.prototype.tuneBlock.popup=(0,r._)({},A,D))},6689:function(e,t,i){"use strict";i.d(t,{throwIfAborted:function(){return o}});var n=i(93661);function o(e){if(e.aborted)throw(0,n.abort)()}},61872:function(e,t,i){"use strict";i.d(t,{processArtifacts:function(){return c},processFinalResponse:function(){return u},processStreamingResponse:function(){return l}});var n=i(89929),o=i(77688),r=i(56075),s=i(11886),a=i(61558);function l(e,t,i){return(0,o._)(function*(){let o=(0,a.createAIMessage)(),l=-1;var u,c=!1,d=!1;try{for(var h,p=(0,n._)(t.stream);c=!(h=yield p.next()).done;c=!1){let t=h.value;switch(t.type){case"created":o=(0,s._)((0,r._)({},o),{id:t.response.responseId,content:""}),l=i.messages.length;break;case"text-delta":o=(0,s._)((0,r._)({},o),{content:o.content+t.delta});break;case"completed":o=(0,s._)((0,r._)({},o),{id:t.response.responseId,toolCalls:t.response.toolCalls||[],artifacts:t.response.artifacts||[]});break;case"error":{let e=(0,a.createErrorMessage)(t.error);o=(0,s._)((0,r._)({},o),{id:e.id,content:e.content})}}if(o.id){let t=i.messages.slice();t[l>=0?l:i.messages.length]=o,i=(0,s._)((0,r._)({},i),{messages:t,updated:Date.now()}),e.setCurrentConversation(i)}}}catch(e){d=!0,u=e}finally{try{c&&null!=p.return&&(yield p.return())}finally{if(d)throw u}}return{aiMessage:o,index:l,conversation:i}})()}function u(e,t){let i=(0,s._)((0,r._)({},(0,a.createAIMessage)()),{id:e.response.responseId,content:e.response.content,toolCalls:e.response.toolCalls||[],artifacts:e.response.artifacts||[]}),n=t.messages.slice();return n.push(i),{aiMessage:i,index:(t=(0,s._)((0,r._)({},t),{messages:n,updated:Date.now()})).messages.length-1,conversation:t}}function c(e,t,i,n){return(0,o._)(function*(){if(t.artifacts&&t.artifacts.length>0){let o=i.messages.slice();return o[n]=(0,s._)((0,r._)({},o[n]),{artifacts:yield(0,a.uploadArtifacts)(e,t.artifacts)}),(0,s._)((0,r._)({},i),{messages:o,updated:Date.now()})}return i})()}},49459:function(e,t,i){"use strict";function n(e,t,i={}){let o=e[t];if("string"!=typeof o||!i.allowEmpty&&""===o)throw Error(`Parameter "${t}" is required and must be a${i.allowEmpty?"":" non-empty"} string`);return o}i.d(t,{requireString:function(){return n}})},44526:function(e,t,i){"use strict";i.d(t,{resolveBlock:function(){return o}});var n=i(22732);function o(e,{selector:t,index:i,requireExactlyOne:r=!1}={}){let s=null!=t&&""!==t.trim(),a=null!=i;if(r&&s===a)throw Error("Either index or selector must be provided, but not both");if(!s&&!a)throw Error("Block identifier is required");if(s){if("string"!=typeof t)throw Error("Selector must be a string");let i=e.editor.querySelector(t);if(!i)throw Error(`No element found matching selector "${t}"`);if(!n.Dom.isElement(i))throw Error(`Selector "${t}" does not point to an element node`);return{element:i,identifier:`with selector "${t}"`}}if("number"!=typeof i)throw Error("Block index must be a number");let l=Array.from(e.editor.children);if(i<0||i>=l.length)throw Error(`Block index ${i} is out of range. Document has ${l.length} blocks`);let u=l[i];if(!n.Dom.isElement(u))throw Error(`Block at index ${i} is not a valid element`);return{element:u,identifier:`at index ${i}`}}},70308:function(e,t,i){"use strict";i.d(t,{areAllToolCallsExecuted:function(){return u},createNewConversation:function(){return o},findMessagesWithPendingToolCalls:function(){return c},findParentMessageId:function(){return s},isTerminalToolCallStatus:function(){return l}});var n=i(21064);function o(e,t,i,r=[]){let s=e.o.aiAssistantPro,a={id:(0,n.generateConversationId)(),created:Date.now(),updated:Date.now(),messages:r,permissions:[],options:{model:null!=t?t:s.defaultModel,temperature:null!=i?i:s.defaultTemperature}};return e.e.fire("conversationCreated.ai-assistant-pro",a),a}let r=["error_","stream_"];function s(e){for(let t=e.messages.length-1;t>=0;t--){let i=e.messages[t];if("assistant"===i.role&&function(e){return!r.some(t=>e.startsWith(t))}(i.id))return i.id}return null}let a=new Set(["executed","denied","error"]);function l(e){return a.has(e)}function u(e){let t=e.messages[e.messages.length-1];return!!(null==t?void 0:t.toolCalls)&&t.toolCalls.every(e=>l(e.status))}function c(e){return e.messages.filter(e=>e.toolCalls&&e.toolCalls.length>0&&e.toolCalls.some(e=>!l(e.status)))}},473:function(e,t,i){"use strict";i.d(t,{handleBackToList:function(){return d},handleConversationSearch:function(){return h},handleConversationSelect:function(){return c},handleToolApproval:function(){return l},handleToolDenial:function(){return u}});var n=i(77688),o=i(56075),r=i(11886),s=i(79078),a=i(82758);function l(e,t,i,s,a){return(0,n._)(function*(){let n=i.getPendingToolCalls().find(t=>t.id===e);if(!n)return null;let l=s.grantPermission(n.name,t),u=i.getCurrentConversation();return u&&(u.permissions.push(l),yield a.save(u)),i.removePendingToolCall(e),(0,r._)((0,o._)({},n),{status:"approved"})})()}function u(e,t,i,a){return(0,n._)(function*(){let n=i.getPendingToolCalls().find(e=>e.id===t);if(!n)return;let l=i.getCurrentConversation();if(!l)return;let u=l.messages.findIndex(e=>{var i;return null==(i=e.toolCalls)?void 0:i.find(e=>e.id===t)});if(-1===u)return;let c=l.messages[u],d=(0,r._)((0,o._)({},n),{result:{error:"Tool call denied by user."},status:"denied"}),h=(0,s.updateToolCallInMessage)(c,d),p=[...l.messages];p[u]=h,l=(0,r._)((0,o._)({},l),{messages:p,updated:Date.now()}),i.setCurrentConversation(l),yield a.save(l),e.e.fire("toolCallDenied.ai-assistant-pro",n),i.removePendingToolCall(t)})()}function c(e,t,i){return(0,n._)(function*(){try{i.setLoading(!0);let n=yield t.get(e);if(!n)throw Error("Conversation not found: "+e);i.setCurrentConversation((0,o._)({},n))}catch(e){a.IS_PROD}finally{i.setLoading(!1)}})()}function d(e,t){return(0,n._)(function*(){t.setView("conversationList");try{t.setLoading(!0);let i=yield e.list().catch(()=>[]);t.setConversations(i)}finally{t.setLoading(!1)}})()}function h(e,t,i){return(0,n._)(function*(){i.setLoading(!0);try{let n=yield t.list(e||void 0);i.setConversations(n),i.setView("conversationList")}finally{i.setLoading(!1)}})()}},58579:function(e,t,i){"use strict";i.d(t,{applyTheme:function(){return c.applyTheme},areAllToolCallsExecuted:function(){return o.areAllToolCallsExecuted},createNewConversation:function(){return o.createNewConversation},createUserMessage:function(){return s.createUserMessage},deleteConversationWithCleanup:function(){return u.deleteConversationWithCleanup},executeToolCall:function(){return d.executeToolCall},findMessagesWithPendingToolCalls:function(){return o.findMessagesWithPendingToolCalls},findParentMessageId:function(){return o.findParentMessageId},getCurrentSelectionContext:function(){return l.getCurrentSelectionContext},handleBackToList:function(){return r.handleBackToList},handleConversationSearch:function(){return r.handleConversationSearch},handleConversationSelect:function(){return r.handleConversationSelect},handleToolApproval:function(){return r.handleToolApproval},handleToolDenial:function(){return r.handleToolDenial},invertMode:function(){return a.invertMode},isTerminalToolCallStatus:function(){return o.isTerminalToolCallStatus},loadInitialData:function(){return u.loadInitialData},processArtifacts:function(){return n.processArtifacts},processFinalResponse:function(){return n.processFinalResponse},processStreamingResponse:function(){return n.processStreamingResponse},resizeInPanelView:function(){return a.resizeInPanelView},updateToolCallInMessage:function(){return d.updateToolCallInMessage}});var n=i(61872),o=i(70308),r=i(473),s=i(61558),a=i(71050),l=i(15927),u=i(56110),c=i(53014),d=i(79078)},61558:function(e,t,i){"use strict";i.d(t,{createAIMessage:function(){return s},createErrorMessage:function(){return a},createUserMessage:function(){return r},uploadArtifacts:function(){return l}});var n=i(77688),o=i(21064);function r(e){return{id:(0,o.generateMessageId)(),role:"user",content:e,timestamp:Date.now()}}function s(){return{id:"",role:"assistant",content:"",artifacts:[],timestamp:Date.now(),toolCalls:[]}}function a(e){return{id:"error_"+(0,o.generateMessageId)(),role:"assistant",content:`❌ Error: ${e.message}`,timestamp:Date.now(),toolCalls:[],artifacts:[]}}function l(e,t){return(0,n._)(function*(){if(!t||0===t.length)return t;let i=e.o.aiAssistantPro.uploadBase64Artifact;return i?Promise.all(t.map(t=>{var o;return(0,n._)(function*(){return null!=(o=i(t,e))?o:t})()})):t})()}},71050:function(e,t,i){"use strict";i.d(t,{invertMode:function(){return o},resizeInPanelView:function(){return r}});var n=i(41180);function o(e){switch(e){case"left":return"right";case"right":return"left";case"top":return"bottom";case"bottom":return"top"}}function r(e,t,i,r){var s,a,l,u;if("dialog"===t||"flight"===t)return;("left"===t||"right"===t)&&(null==(l=e.currentPlace.slots[o(t)])||l.style.setProperty(`--jd-slot-${o(t)}-width`,"auto"),null==(u=e.currentPlace.slots[t])||u.style.setProperty(`--jd-slot-${t}-width`,`${i}px`));let c=null!=(s=(0,n.css)(e.currentPlace.workplace,"height"))?s:0;null==(a=e.currentPlace.slots[t])||a.style.setProperty("min-height",`${Math.min(c,r)}px`)}},85696:function(e,t,i){"use strict";function n(e,t){let i=e.createInside.div();return i.innerHTML=t,o(e,i),i}function o(e,t){e.e.fire("safeHTML",t)}i.d(t,{createSanitizedContainer:function(){return n},sanitizeElement:function(){return o}})},15927:function(e,t,i){"use strict";function n(e){if(e.s.isCollapsed())return null;let t=e.s.html,i=e.s.range;return{html:t,rangeInfo:{startContainer:i.startContainer.nodeName,startOffset:i.startOffset,endContainer:i.endContainer.nodeName,endOffset:i.endOffset}}}i.d(t,{getCurrentSelectionContext:function(){return n}})},56110:function(e,t,i){"use strict";i.d(t,{deleteConversationWithCleanup:function(){return r},loadInitialData:function(){return s}});var n=i(77688),o=i(82758);function r(e,t,i,o,r){return(0,n._)(function*(){try{o.setLoading(!0),yield i.delete(t),o.removeConversation(t),r.clearConversationPermissions(t);let n=o.getCurrentConversation();(null==n?void 0:n.id)===t&&o.setCurrentConversation(null);let s=yield i.list();o.setConversations(s),o.setView(0===s.length?"welcome":"conversationList"),e.e.fire("conversationDeleted.ai-assistant-pro",t)}catch(t){e.alert(e.i18n("Failed to delete conversation")+": "+((null==t?void 0:t.message)||"Unknown error"))}finally{o.setLoading(!1)}})()}function s(e,t,i){return(0,n._)(function*(){i.setLoading(!0);try{let[o,r]=yield Promise.all([t.list().catch(()=>[]),t.getGlobalSettings().catch(()=>null)]);if(i.setConversations(o),r&&i.setSavedState(r),0===o.length)i.setView("welcome");else if(e.o.aiAssistantPro.rememberLastConversation&&(null==r?void 0:r.currentConversationId)){var n;let e=null!=(n=o.find(e=>e.id===r.currentConversationId))?n:o[0],s=yield t.get(e.id);s?i.setCurrentConversation(s):i.setView("conversationList")}else i.setView("conversationList")}catch(e){o.IS_PROD,i.setView("welcome")}finally{i.setLoading(!1)}})()}},53014:function(e,t,i){"use strict";i.d(t,{applyTheme:function(){return r}});let n=["jodit_theme_dark","jodit-ai-assistant-pro_theme_dark","jodit-dialog_theme_dark"],o=["jodit_theme_light","jodit-ai-assistant-pro_theme_light","jodit-dialog_theme_light"];function r(e,t,i,r,s){let a;if(null==r||r.classList.remove(...n),null==r||r.classList.remove(...o),"dialog"===i){let e=null==s?void 0:s.container;null==e||e.classList.remove(...n),null==e||e.classList.remove(...o)}if(a="dark"===t?n:o,null==r||r.classList.add(...a),"dialog"===i){let e=null==s?void 0:s.container;null==e||e.classList.add(...a)}}},79078:function(e,t,i){"use strict";i.d(t,{executeToolCall:function(){return s},updateToolCallInMessage:function(){return a}});var n=i(77688),o=i(56075),r=i(11886);function s(e,t,i){return(0,n._)(function*(){let n;try{let e=new AbortController().signal,s=yield i.executeTool(t.name,t.arguments,e);n=(0,r._)((0,o._)({},t),{result:{result:s},status:"executed"})}catch(i){n=(0,r._)((0,o._)({},t),{result:{error:i instanceof Error?i.message:String(i)},status:"error"}),e.e.fire("toolCallFailed.ai-assistant-pro",n)}return e.e.fire("toolCallExecuted.ai-assistant-pro",n,{toolCallId:n.id,result:n.result}),n})()}function a(e,t){var i,n;let s=null==(n=e.toolCalls)?void 0:n.findIndex(e=>e.id===t.id);if(null==s||-1===s)return e;let a=[...null!=(i=null==e?void 0:e.toolCalls)?i:[]];return a[s]=t,(0,r._)((0,o._)({},e),{toolCalls:a})}},86449:function(e,t,i){"use strict";i.d(t,{APIClient:function(){return u}});var n=i(77688),o=i(82749),r=i(56075),s=i(11886),a=i(82758),l=i(21537);class u{sendRequest(e,t,i,o,r){return(0,n._)(function*(){let{apiRequest:n,requestTimeout:s,maxRetries:u}=this.jodit.o.aiAssistantPro;if(!n)throw Error("AI Assistant Pro callback is not configured");let c=new AbortController;this.abortControllers.add(c);try{let d=this.buildRequestContext(e,t,i,o,r),h=null;for(let e=0;u>=e;e++)try{if(c.signal.aborted)throw(0,l.abort)();let e=setTimeout(()=>{c.abort()},s);try{let t=yield n(d,c.signal);return clearTimeout(e),this.validateResponse(t),t}catch(t){throw clearTimeout(e),t}}catch(t){if(h=t,a.IS_PROD,u>e){let t=this.calculateRetryDelay(e);yield this.sleep(t)}else throw t}throw h||Error("API request failed after all retries")}finally{this.abortControllers.delete(c)}}).call(this)}abort(){this.abortControllers.forEach(e=>{e.abort()}),this.abortControllers.clear()}isInProgress(){return this.abortControllers.size>0}buildRequestContext(e,t,i,n,o){let a,{apiMode:l,instructions:u}=this.jodit.o.aiAssistantPro,c={mode:l,conversationId:e,tools:this.toolRegistry.getAllTools(),selectionContexts:n,conversationOptions:o,instructions:u};if("full"===l)a=t;else if(i){let e=t.findIndex(e=>e.id===i);a=-1!==e?t.slice(e+1):t,c=(0,s._)((0,r._)({},c),{parentMessageId:i})}else a=t;return(0,s._)((0,r._)({},c),{messages:this.expandToolMessages(a,t.find(e=>e.id===i))})}expandToolMessages(e,t){let i=[];for(let t of e)i.push(t),this.expandToolResultsMessage(t,i);return t&&this.expandToolResultsMessage(t,i),i}expandToolResultsMessage(e,t){if(e.toolCalls&&e.toolCalls.length>0)for(let n of e.toolCalls){var i;let o=null!=(i=n.result)?i:{error:"result not found"};if(t.find(e=>e.id===`${n.id}-result`))continue;let r={id:`${n.id}-result`,role:"tool",content:o.error?`Error: ${o.error}`:JSON.stringify(o.result),timestamp:e.timestamp,toolResults:[{toolCallId:n.id,result:o}]};t.push(r)}}validateResponse(e){if("final"!==e.mode)return;let t=e.response;if(!t)throw Error("API returned empty response");if(!t.responseId)throw Error("API response missing responseId");if(void 0===t.content)throw Error("API response missing content");if(void 0===t.finished)throw Error("API response missing finished flag");if(t.toolCalls){if(!Array.isArray(t.toolCalls))throw Error("API response toolCalls must be an array");t.toolCalls.forEach((e,t)=>{if(!e.id)throw Error(`Tool call at index ${t} is missing id`);if(!e.name)throw Error(`Tool call at index ${t} is missing name`);if(!e.arguments||"object"!=typeof e.arguments)throw Error(`Tool call at index ${t} has invalid arguments`)})}}calculateRetryDelay(e){let{retryDelay:t}=this.jodit.o.aiAssistantPro;return t*Math.pow(2,e)+Math.random()*t}sleep(e){return new Promise(t=>setTimeout(t,e))}destruct(){this.abort()}constructor(e,t){(0,o._)(this,"jodit",void 0),(0,o._)(this,"toolRegistry",void 0),(0,o._)(this,"abortControllers",void 0),this.jodit=e,this.toolRegistry=t,this.abortControllers=new Set}}},47373:function(e,t,i){"use strict";function n(e,t,i="image/png"){let o=atob(e),r=o.length,s=new Uint8Array(r);for(let e=0;r>e;e++)s[e]=o.charCodeAt(e);return new File([new Blob([s],{type:i})],t,{type:i})}i.d(t,{base64ToFile:function(){return n}})},21020:function(e,t,i){"use strict";i.d(t,{PermissionManager:function(){return s}});var n=i(82749),o=i(56075),r=i(11886);class s{requiresPermission(e){let{autoApproveTools:t,alwaysDenyTools:i}=this.jodit.o.aiAssistantPro;if(i.includes(e))return!0;if(t.includes(e))return!1;let n=this.toolRegistry.getTool(e);return!n||n.requiresPermission}isAutoDenied(e){let{alwaysDenyTools:t}=this.jodit.o.aiAssistantPro;return t.includes(e)}isAutoApproved(e){let{autoApproveTools:t}=this.jodit.o.aiAssistantPro;return t.includes(e)}checkPermission(e,t){if(this.isAutoApproved(e))return{toolName:e,granted:!0,grantedAt:Date.now(),scope:"once"};if(this.isAutoDenied(e))return null;let i=this.permanentPermissions.get(e);return i&&i.granted?i:t.find(t=>t.toolName===e&&t.granted)||null}grantPermission(e,t){let i={toolName:e,granted:!0,grantedAt:Date.now(),scope:t};return"forever"===t&&(this.permanentPermissions.set(e,i),this.savePermanentPermissions()),i}denyPermission(e){return{toolName:e,granted:!1,grantedAt:Date.now(),scope:"once"}}filterToolCalls(e,t){let i=[],n=[],s=[];for(let a of e){if(this.isAutoDenied(a.name)){s.push((0,r._)((0,o._)({},a),{status:"denied"}));continue}if(this.isAutoApproved(a.name)){i.push((0,r._)((0,o._)({},a),{status:"approved"}));continue}let e=this.checkPermission(a.name,t);e&&e.granted?i.push((0,r._)((0,o._)({},a),{status:"approved"})):this.requiresPermission(a.name)?(this.jodit.e.fire("permissionRequested.ai-assistant-pro",a.name),n.push((0,r._)((0,o._)({},a),{status:"pending"}))):i.push((0,r._)((0,o._)({},a),{status:"approved"}))}return{approved:i,needsPermission:n,denied:s}}clearConversationPermissions(e){}loadPermanentPermissions(){try{let e=localStorage.getItem(this.PERMANENT_PERMISSIONS_KEY);e&&JSON.parse(e).forEach(e=>{"forever"===e.scope&&e.granted&&this.permanentPermissions.set(e.toolName,e)})}catch(e){}}savePermanentPermissions(){try{let e=Array.from(this.permanentPermissions.values());localStorage.setItem(this.PERMANENT_PERMISSIONS_KEY,JSON.stringify(e))}catch(e){}}clearPermanentPermissions(){this.permanentPermissions.clear(),localStorage.removeItem(this.PERMANENT_PERMISSIONS_KEY)}getPermanentPermissions(){return Array.from(this.permanentPermissions.values())}revokePermanentPermission(e){this.permanentPermissions.delete(e),this.savePermanentPermissions()}destruct(){this.permanentPermissions.clear()}constructor(e,t){(0,n._)(this,"jodit",void 0),(0,n._)(this,"toolRegistry",void 0),(0,n._)(this,"permanentPermissions",void 0),(0,n._)(this,"PERMANENT_PERMISSIONS_KEY",void 0),this.jodit=e,this.toolRegistry=t,this.permanentPermissions=new Map,this.PERMANENT_PERMISSIONS_KEY="jodit-permissions.ai-assistant-pro",this.loadPermanentPermissions()}}},46166:function(e,t,i){"use strict";i.d(t,{StateManager:function(){return s}});var n=i(82749),o=i(56075),r=i(11886);class s{createInitialState(){return{isOpen:!1,currentView:"welcome",currentConversation:null,conversations:[],isLoading:!1,error:null,pendingToolCalls:[],selectionContexts:[],abortController:null,editingMessageId:null,theme:this.jodit.o.aiAssistantPro.theme||"parent",displayMode:this.jodit.o.aiAssistantPro.displayMode,panelWidth:this.jodit.o.aiAssistantPro.panelWidth,panelHeight:this.jodit.o.aiAssistantPro.panelHeight,defaultModel:this.jodit.o.aiAssistantPro.defaultModel,defaultTemperature:this.jodit.o.aiAssistantPro.defaultTemperature}}open(){this.state.isOpen=!0,this.jodit.e.fire("open.ai-assistant-pro",this.state.currentConversation)}close(){this.state.isOpen=!1,this.jodit.e.fire("close.ai-assistant-pro")}isOpen(){return this.state.isOpen}setView(e){this.state.currentView=e,this.jodit.e.fire("viewChanged.ai-assistant-pro",e)}getView(){return this.state.currentView}setConversations(e){this.state.conversations=e}setSavedState(e){e.theme&&(this.state.theme=e.theme),e.displayMode&&(this.state.displayMode=e.displayMode),e.panelWidth&&(this.state.panelWidth=e.panelWidth),e.panelHeight&&(this.state.panelHeight=e.panelHeight),e.defaultModel&&(this.state.defaultModel=e.defaultModel),e.defaultTemperature&&(this.state.defaultTemperature=e.defaultTemperature)}getConversations(){return this.state.conversations}setCurrentConversation(e){if(this.state.currentConversation===e)throw Error("Conversation is already current");this.state.currentConversation=e||null,e&&(this.setView("conversation"),this.jodit.e.fire("conversationSwitched.ai-assistant-pro",e))}getCurrentConversation(){return this.state.currentConversation}removeConversation(e){let t=this.state.conversations.filter(t=>t.id!==e);this.setConversations(t)}setLoading(e){this.state.isLoading=e}isLoading(){return this.state.isLoading}setError(e){this.state.error=e,e&&this.jodit.e.fire("error.ai-assistant-pro",Error(e))}getError(){return this.state.error}clearError(){this.setError(null)}setPendingToolCalls(e){this.state.pendingToolCalls=e}getPendingToolCalls(){return this.state.pendingToolCalls}addPendingToolCall(e){let t=[...this.state.pendingToolCalls,e];this.setPendingToolCalls(t)}removePendingToolCall(e){let t=this.state.pendingToolCalls.filter(t=>t.id!==e);this.setPendingToolCalls(t)}updateToolCallStatus(e,t){let i=this.state.pendingToolCalls.map(i=>i.id===e?(0,r._)((0,o._)({},i),{status:t}):i);this.setPendingToolCalls(i)}setSelectionContexts(e){this.state.selectionContexts=e}getSelectionContexts(){return this.state.selectionContexts}addSelectionContext(e){let{maxContextRanges:t}=this.jodit.o.aiAssistantPro,i=[...this.state.selectionContexts,e];i.length>t&&(i=i.slice(-t)),this.setSelectionContexts(i),this.jodit.e.fire("contextAdded.ai-assistant-pro",e)}removeSelectionContext(e){let t=this.state.selectionContexts.filter((t,i)=>i!==e);this.setSelectionContexts(t),this.jodit.e.fire("contextRemoved.ai-assistant-pro",e)}clearSelectionContexts(){this.setSelectionContexts([])}setAbortController(e){this.state.abortController=e}getAbortController(){return this.state.abortController}setEditingMessageId(e){this.state.editingMessageId=e}getEditingMessageId(){return this.state.editingMessageId}isEditingMessage(){return null!=this.state.editingMessageId}clearEditingMessage(){this.setEditingMessageId(null)}reset(){this.state=this.createInitialState()}destruct(){this.state.abortController&&this.state.abortController.abort(),this.reset()}constructor(e){(0,n._)(this,"jodit",void 0),(0,n._)(this,"state",void 0),this.jodit=e,this.state=this.createInitialState()}}},62895:function(e,t,i){"use strict";i.d(t,{WebStorageConversationStorage:function(){return n.WebStorageConversationStorage},createStorageProvider:function(){return n.createStorageProvider}});var n=i(21064)},21064:function(e,t,i){"use strict";i.d(t,{WebStorageConversationStorage:function(){return a},createStorageProvider:function(){return l},generateConversationId:function(){return u},generateMessageId:function(){return c}});var n=i(77688),o=i(82749),r=i(56075),s=i(97333);class a{close(){return this.storage.close()}getConversationKey(e){return`conv:${e}`}getAllKeys(){return(0,n._)(function*(){let e=yield this.storage.get("__conversation_index__");return e&&Array.isArray(e)?e:[]}).call(this)}updateIndex(e){return(0,n._)(function*(){yield this.storage.set("__conversation_index__",e)}).call(this)}addToIndex(e){return(0,n._)(function*(){let t=yield this.getAllKeys();t.includes(e)||(t.push(e),yield this.updateIndex(t))}).call(this)}removeFromIndex(e){return(0,n._)(function*(){let t=(yield this.getAllKeys()).filter(t=>t!==e);yield this.updateIndex(t)}).call(this)}list(e){return(0,n._)(function*(){try{let n=yield this.getAllKeys(),o=[],r=null==e?void 0:e.toLowerCase().trim();for(let e of n){var t,i;let n=yield this.get(e);if(n){if(r){let e=null==(i=n.title)?void 0:i.toLowerCase().includes(r),t=!e&&n.messages.some(e=>e.content.toLowerCase().includes(r));if(!e&&!t)continue}o.push({id:n.id,title:null!=(t=n.title)?t:"",created:n.created,updated:n.updated,messageCount:n.messages.length})}}return o.sort((e,t)=>t.updated-e.updated),o}catch(e){return[]}}).call(this)}get(e){return(0,n._)(function*(){try{let t=this.getConversationKey(e);return(yield this.storage.get(t))||null}catch(e){return null}}).call(this)}save(e){return(0,n._)(function*(){try{if(0===e.messages.length)throw Error("Conversation must have at least one message.");let t=yield this.getAllKeys();t.length>=this.maxConversations&&!t.includes(e.id)&&(yield this.evictOldest());let i=this.getConversationKey(e.id);yield this.storage.set(i,e),yield this.addToIndex(e.id)}catch(t){if((null==t?void 0:t.name)==="QuotaExceededError"||(null==t?void 0:t.code)===22||(null==t?void 0:t.code)===1014){yield this.evictOldest();try{let t=this.getConversationKey(e.id);yield this.storage.set(t,e),yield this.addToIndex(e.id)}catch(e){throw Error("Storage quota exceeded. Please delete some conversations.")}}else throw Error(`Failed to save conversation: ${(null==t?void 0:t.message)||"Unknown error"}`)}}).call(this)}delete(e){return(0,n._)(function*(){try{let t=this.getConversationKey(e);yield this.storage.delete(t),yield this.removeFromIndex(e)}catch(e){}}).call(this)}clear(){return(0,n._)(function*(){try{for(let e of yield this.getAllKeys()){let t=this.getConversationKey(e);yield this.storage.delete(t)}yield this.updateIndex([])}catch(e){}}).call(this)}evictOldest(){return(0,n._)(function*(){try{let e=yield this.list();if(0===e.length)return;e.sort((e,t)=>e.updated-t.updated);let t=e[0];yield this.delete(t.id)}catch(e){}}).call(this)}getGlobalSettings(){return(0,n._)(function*(){try{return(yield this.storage.get("global-settings"))||null}catch(e){return null}}).call(this)}saveGlobalSettings(e){return(0,n._)(function*(){try{let t=yield this.getGlobalSettings(),i=(0,r._)({},t,e);yield this.storage.set("global-settings",i)}catch(e){throw Error("Failed to save global settings")}}).call(this)}constructor(e,t){(0,o._)(this,"storage",void 0),(0,o._)(this,"maxConversations",void 0),this.storage=e,this.maxConversations=t}}function l(e,t){return s.AsyncStorage.makeStorage(e,t)}function u(){return`conv_${Date.now()}_${Math.random().toString(36).substring(2,11)}`}function c(){return`msg_${Date.now()}_${Math.random().toString(36).substring(2,11)}`}},55487:function(e,t,i){"use strict";i.d(t,{ToolRegistry:function(){return a}});var n=i(77688),o=i(82749),r=i(56075),s=i(53835);class a{registerBuiltInTools(e){e.forEach(e=>{let t=s.BUILT_IN_TOOLS[e];t&&this.tools.set(e,t)})}registerCustomTools(e){e.forEach(e=>{this.validateToolDefinition(e),this.tools.set(e.name,e)})}validateToolDefinition(e){if(!e.name||"string"!=typeof e.name)throw Error("Tool must have a valid name");if(!e.description||"string"!=typeof e.description)throw Error(`Tool "${e.name}" must have a description`);if(!Array.isArray(e.parameters))throw Error(`Tool "${e.name}" must have a parameters array`);if("function"!=typeof e.execute)throw Error(`Tool "${e.name}" must have an execute function`);e.parameters.forEach(t=>{if(!t.name||"string"!=typeof t.name)throw Error(`Tool "${e.name}" has a parameter without a valid name`);if(!t.type)throw Error(`Tool "${e.name}" parameter "${t.name}" must have a type`);if("boolean"!=typeof t.required)throw Error(`Tool "${e.name}" parameter "${t.name}" must specify if it's required`)})}getAllTools(){return Array.from(this.tools.values())}getTool(e){return this.tools.get(e)}hasTool(e){return this.tools.has(e)}getToolNames(){return Array.from(this.tools.keys())}executeTool(e,t,i){return(0,n._)(function*(){let n=this.getTool(e);if(!n)throw Error(`Tool "${e}" not found`);let o=this.applyDefaults(n,t);this.validateArguments(n,o);try{return yield n.execute(this.jodit,o,i)}catch(e){if((null==e?void 0:e.name)==="AbortError"||i.aborted)throw Error("Tool execution was aborted");throw e}}).call(this)}validateArguments(e,t){let i=Object.keys(t);for(let t of e.parameters.filter(e=>e.required).map(e=>e.name))if(!i.includes(t))throw Error(`Tool "${e.name}" requires parameter "${t}"`);for(let[i,n]of Object.entries(t)){let t=e.parameters.find(e=>e.name===i);if(!t){this.jodit.o.aiAssistantPro.debug;continue}let o=Array.isArray(n)?"array":"object"==typeof n&&null!=n?"object":typeof n;if(t.type!==o&&!("number"===t.type&&"string"===o&&!isNaN(Number(n))))throw Error(`Tool "${e.name}" parameter "${i}" expects type "${t.type}" but got "${o}"`);if(t.enum&&t.enum.length>0&&!t.enum.includes(n))throw Error(`Tool "${e.name}" parameter "${i}" must be one of: ${t.enum.join(", ")}`)}}applyDefaults(e,t){let i=(0,r._)({},t);for(let t of e.parameters)void 0===i[t.name]&&void 0!==t.default&&(i[t.name]=t.default);return i}destruct(){this.tools.clear()}constructor(e){(0,o._)(this,"jodit",void 0),(0,o._)(this,"tools",void 0),this.jodit=e,this.tools=new Map,this.registerBuiltInTools(e.o.aiAssistantPro.enabledTools||[]),this.registerCustomTools(e.o.aiAssistantPro.customTools||[])}}},26612:function(e){e.exports={"AI Assistant":"AI Assistant","AI Assistant Pro":"AI Assistant Pro","Welcome to AI Assistant":"Welcome to AI Assistant","Start your first conversation":"Start your first conversation","Tip: Select text in editor to add context":"Tip: Select text in editor to add context","New Chat":"New Chat","Search conversations...":"Search conversations...","No conversations yet":"No conversations yet","Ask me anything...":"Ask me anything...","Ask a follow-up...":"Ask a follow-up...","Reply...":"Reply...","Type your message...":"Type your message...",Send:"Send",Cancel:"Cancel",Retry:"Retry",Insert:"Insert",Copy:"Copy",Edit:"Edit",Delete:"Delete",New:"New",Back:"Back","Permission Required":"Permission Required",Approve:"Approve",Deny:"Deny",Once:"Once","This conversation":"This conversation",Always:"Always","The AI wants to execute:":"The AI wants to execute:","This will modify your document content.":"This will modify your document content.","Executing...":"Executing...","Completed successfully":"Completed successfully",Failed:"Failed","Pending approval":"Pending approval","Denied by user":"Denied by user","Tool Result":"Tool Result","Tool Execution Error":"Tool Execution Error",Context:"Context",Contexts:"Contexts","Add to AI Context":"Add to AI Context",Remove:"Remove","Clear all":"Clear all","An error occurred":"An error occurred","Request failed":"Request failed","Connection error":"Connection error","AI Assistant is not configured":"AI Assistant is not configured","Thinking...":"Thinking...","Generating response...":"Generating response...",insertHTML:"Insert HTML",readDocument:"Read Document",readBlock:"Read Block",replaceInDocument:"Replace in Document",replaceInBlock:"Replace in Block",getSelection:"Get Selection","Just now":"Just now",Conversation:"Conversation","New Conversation":"New Conversation",Yesterday:"Yesterday","Delete conversation":"Delete conversation","Are you sure you want to delete this conversation?":"Are you sure you want to delete this conversation?","Failed to delete conversation":"Failed to delete conversation"}},63805:function(e,t,i){"use strict";i.r(t),i.d(t,{en:function(){return n},ru:function(){return o}});var n=i(26612),o=i(55790)},55790:function(e){e.exports={"AI Assistant":"AI Ассистент","AI Assistant Pro":"AI Ассистент Pro","Welcome to AI Assistant":"Добро пожаловать в AI Ассистент","Start your first conversation":"Начните первый диалог","Tip: Select text in editor to add context":"Подсказка: Выделите текст в редакторе для добавления контекста","New chat":"Новый чат","Search conversations...":"Поиск диалогов...","No conversations yet":"Пока нет диалогов","Ask me anything...":"Спросите меня о чем угодно...","Ask a follow-up...":"Задайте дополнительный вопрос...","Reply...":"Ответить...","Type your message...":"Введите ваше сообщение...",Send:"Отправить",Cancel:"Отмена",Retry:"Повторить",Insert:"Вставить",Copy:"Копировать",Edit:"Редактировать",Delete:"Удалить",New:"Новый",Back:"Назад","Permission Required":"Требуется разрешение",Approve:"Разрешить",Deny:"Отклонить",Once:"Один раз","This conversation":"Этот диалог",Always:"Всегда","The AI wants to execute:":"AI хочет выполнить:","This will modify your document content.":"Это изменит содержимое вашего документа.","Executing...":"Выполняется...","Completed successfully":"Успешно выполнено",Failed:"Ошибка","Pending approval":"Ожидает разрешения","Denied by user":"Отклонено пользователем","Tool Result":"Результат инструмента","Tool Execution Error":"Ошибка выполнения инструмента",Context:"Контекст",Contexts:"Контексты","Add to AI Context":"Добавить в контекст AI",Remove:"Удалить","Clear all":"Очистить все","An error occurred":"Произошла ошибка","Request failed":"Запрос не выполнен","Connection error":"Ошибка соединения","AI Assistant is not configured":"AI Ассистент не настроен","Thinking...":"Думаю...","Generating response...":"Генерирую ответ...",insertHTML:"Вставить HTML",readDocument:"Прочитать документ",readBlock:"Прочитать блок",replaceInDocument:"Заменить в документе",replaceInBlock:"Заменить в блоке",getSelection:"Получить выделение","Just now":"Только что",Conversation:"Диалог","New Conversation":"Новый диалог",Yesterday:"Вчера","Delete conversation":"Удалить диалог","Are you sure you want to delete this conversation?":"Вы уверены, что хотите удалить этот диалог?","Failed to delete conversation":"Не удалось удалить диалог",Settings:"Настройки","General Settings":"Общие настройки","Conversation Settings":"Настройки диалога","Display Mode":"Режим отображения","Panel Width":"Ширина панели",Theme:"Тема",Model:"Модель",Temperature:"Температура",Close:"Закрыть",Dialog:"Модальное окно",Left:"Левая панель",Right:"Правая панель",Top:"Верхняя панель",Bottom:"Нижняя панель",Inherit:"Наследовать от редактора",Light:"Светлая тема",Dark:"Тёмная тема","%dm ago":"%dм назад","%dh ago":"%dч назад"}},94454:function(e,t,i){"use strict";i.d(t,{getAIProviderOptions:function(){return n.getAIProviderOptions},registerAIProvider:function(){return n.registerAIProvider}}),i(82923);var n=i(58211)},82923:function(e,t,i){"use strict";var n=i(89929),o=i(77688),r=i(86127),s=i(56075),a=i(11886),l=i(25415),u=i(58211),c=i(54079);(0,u.registerAIProvider)("jodit-ai-adapter",e=>{var t;let i=e.url.replace(/\/+$/,""),u=null!=(t=e.provider)?t:"openai",d=!1!==e.stream;return{apiMode:"incremental",maxRetries:0,voiceInputEnabled:!0,voiceInputUrl:`${i.replace(/^http/,"ws")}/v1/ai/transcribe`,voiceInputApiKey:e.apiKey,textAutocompleteEnabled:!0,textAutocompleteApiRequest:(t,n,r)=>(0,o._)(function*(){var o;let s=new c.Ajax({url:`${i}/ai/autocomplete?query=${encodeURIComponent(t)}&key=${encodeURIComponent(e.apiKey)}`,method:"POST",contentType:"application/json",data:{provider:u,context:{maxSuggestions:n}}});r.addEventListener("abort",()=>s.abort(),{once:!0});let a=yield s.send(),l=yield a.json();return l.success&&(null==(o=l.result)?void 0:o.suggestions)?l.result.suggestions:[]})(),apiRequest:(t,h)=>(0,o._)(function*(){let o=new c.Ajax({url:`${i}/ai/request?key=${encodeURIComponent(e.apiKey)}`,method:"POST",contentType:"application/json",data:{provider:u,context:d?(0,a._)((0,s._)({},t),{metadata:(0,a._)((0,s._)({},t.metadata),{stream:!0})}):t}});if(h&&h.addEventListener("abort",()=>o.abort(),{once:!0}),!d){let e=yield o.send();return{mode:"final",response:(yield e.json()).result}}let p=o.stream();return{mode:"stream",stream:(0,l._)(function*(){var e,t=!1,i=!1;try{for(var o,s=(0,n._)(p);t=!(o=yield(0,r._)(s.next())).done;t=!1){let e=o.value;yield JSON.parse(e)}}catch(t){i=!0,e=t}finally{try{t&&null!=s.return&&(yield(0,r._)(s.return()))}finally{if(i)throw e}}})()}})()}})},58211:function(e,t,i){"use strict";i.d(t,{getAIProviderOptions:function(){return o},registerAIProvider:function(){return r}});let n=new Map;function o(e,t){let i=n.get(e);if(!i)throw Error(`AI provider "${e}" is not registered. Available providers: ${[...n.keys()].join(", ")}`);return i(t)}function r(e,t){n.set(e,t)}},65374:function(e,t,i){"use strict";i.r(t),i.d(t,["description",0,"Add HTML content to the beginning or end of the document","name",0,"addHTML","parameters",0,[{name:"html",type:"string",description:"HTML content to add",required:!0},{name:"position",type:"string",description:'Where to add: "start" adds at the beginning of the document, "end" appends to the end',required:!1,default:"end"}],"requiresPermission",0,!0])},686:function(e,t,i){"use strict";i.d(t,{execute:function(){return l}});var n=i(77688),o=i(6689),r=i(49459),s=i(85696),a=i(22732);function l(e,t,i){return(0,n._)(function*(){let n=(0,r.requireString)(t,"html",{allowEmpty:!0}),{position:l="end"}=t;if(!n.trim())return{success:!0,message:"Nothing to add: HTML is empty"};(0,o.throwIfAborted)(i);try{let t=e.createInside.fragment(),i=(0,s.createSanitizedContainer)(e,n);for(;i.firstChild;)t.appendChild(i.firstChild);return"start"===l?a.Dom.prepend(e.editor,t):a.Dom.append(e.editor,t),e.synchronizeValues(),{success:!0,message:`Added ${n.length} characters of HTML at the ${"start"===l?"beginning":"end"} of the document`}}catch(e){throw Error(`Failed to add HTML: ${(null==e?void 0:e.message)||"Unknown error"}`)}})()}},78907:function(e,t,i){"use strict";var n=i(56075),o=i(11886),r=i(65374),s=i(686);t.default=(0,o._)((0,n._)({},r),{execute:s.execute})},73943:function(e,t,i){"use strict";i.r(t),i.d(t,["description",0,"Apply or remove inline formatting to the current selection (bold, italic, underline, etc.) or to a specific block","name",0,"applyFormat","parameters",0,[{name:"element",type:"string",description:'HTML element to wrap selection (e.g., "strong", "em", "u", "span")',required:!1},{name:"attributes",type:"object",description:'Attributes to apply (e.g., {"className": "highlight"}, {"style": {"color": "red"}})',required:!1},{name:"remove",type:"boolean",description:"If true, remove the formatting instead of applying it",required:!1,default:!1},{name:"blockIndex",type:"number",description:"Zero-based index of the block to format (if not using current selection)",required:!1},{name:"selector",type:"string",description:"CSS selector to find the block to format (if not using current selection)",required:!1}],"requiresPermission",0,!0])},19127:function(e,t,i){"use strict";i.d(t,{execute:function(){return l}});var n=i(77688),o=i(56075),r=i(11886),s=i(6689),a=i(44526);function l(e,t,i){return(0,n._)(function*(){let{element:n,attributes:l,remove:u,blockIndex:c,selector:d}=t;if((0,s.throwIfAborted)(i),!n&&!l)throw Error('Either "element" or "attributes" must be provided');if(e.s.restore(),void 0!==c||d){let{element:t}=(0,a.resolveBlock)(e,{selector:d,index:c});e.s.select(t)}if(e.s.isCollapsed())throw Error("No selection found. Please select text to format");try{let t={};return n&&(t.element=n),l&&(t.attributes=l),u?e.s.commitStyle((0,r._)((0,o._)({},t),{mode:"remove"})):e.s.commitStyle(t),e.synchronizeValues(),{success:!0,message:u?"Formatting removed successfully":"Formatting applied successfully"}}catch(e){throw Error(`Failed to ${u?"remove":"apply"} formatting: ${e.message}`)}})()}},39296:function(e,t,i){"use strict";var n=i(56075),o=i(11886),r=i(73943),s=i(19127);t.default=(0,o._)((0,n._)({},r),{execute:s.execute})},53835:function(e,t,i){"use strict";i.d(t,{getToolNames:function(){return f}});var n=i(78907),o=i(39296),r=i(16745),s=i(78717),a=i(5618),l=i(90991),u=i(2020),c=i(12570),d=i(95323),h=i(97603);let p={readDocument:a.default,readBlocks:s.default,readSelection:l.default,writeDocument:h.default,replaceSelection:d.default,replaceBlock:u.default,replaceInDocument:c.default,insertHTML:r.default,addHTML:n.default,applyFormat:o.default};function f(){return Object.keys(p)}i.d(t,["BUILT_IN_TOOLS",0,p])},56732:function(e,t,i){"use strict";i.r(t),i.d(t,["description",0,"Insert or replace HTML content at the current cursor position in the editor","name",0,"insertHTML","parameters",0,[{name:"html",type:"string",description:"HTML content to insert",required:!0},{name:"replace",type:"boolean",description:"If true, replaces current selection. If false, inserts at cursor",required:!1,default:!1}],"requiresPermission",0,!0])},39592:function(e,t,i){"use strict";i.d(t,{execute:function(){return s}});var n=i(77688),o=i(6689),r=i(49459);function s(e,t,i){return(0,n._)(function*(){let n=(0,r.requireString)(t,"html",{allowEmpty:!0}),{replace:s}=t;if(!n.trim())return{success:!0,message:"Nothing to insert: HTML is empty"};(0,o.throwIfAborted)(i);try{return e.s.focus(),s&&!e.s.isCollapsed()&&e.s.remove(),e.s.insertHTML(n),e.synchronizeValues(),{success:!0,message:`Inserted ${n.length} characters of HTML`}}catch(e){throw Error(`Failed to insert HTML: ${(null==e?void 0:e.message)||"Unknown error"}`)}})()}},16745:function(e,t,i){"use strict";var n=i(56075),o=i(11886),r=i(56732),s=i(39592);t.default=(0,o._)((0,n._)({},r),{execute:s.execute})},75352:function(e,t,i){"use strict";i.r(t),i.d(t,["description",0,"Read blocks from the editor with optional filtering and pagination","name",0,"readBlocks","parameters",0,[{name:"offset",type:"number",description:"Number of blocks to skip from the beginning (default: 0)",required:!1,default:0},{name:"limit",type:"number",description:"Maximum number of blocks to return (default: all)",required:!1},{name:"query",type:"string",description:"Filter blocks by text content",required:!1}],"requiresPermission",0,!1])},91140:function(e,t,i){"use strict";i.d(t,{execute:function(){return s}});var n=i(77688),o=i(6689),r=i(22732);function s(e,t,i){return(0,n._)(function*(){let{offset:n,limit:s,query:a}=t;(0,o.throwIfAborted)(i);let l=[];Array.from(e.editor.children).forEach((e,t)=>{r.Dom.isElement(e)&&l.push({blockIndex:t,tagName:e.tagName.toLowerCase(),content:e.innerHTML,textContent:e.textContent||"",classList:Array.from(e.classList)})});let u=l;if(a&&"string"==typeof a){let e=a.toLowerCase();u=l.filter(t=>t.textContent.toLowerCase().includes(e)||t.tagName.includes(e)||t.content.toLowerCase().includes(e))}let c=Math.max(0,Math.min("number"==typeof n?n:0,u.length)),d=void 0!==s?Math.min(c+s,u.length):u.length;return{blocks:u.slice(c,d),total:l.length,offset:c,limit:void 0!==s?s:void 0}})()}},78717:function(e,t,i){"use strict";var n=i(56075),o=i(11886),r=i(75352),s=i(91140);t.default=(0,o._)((0,n._)({},r),{execute:s.execute})},93809:function(e,t,i){"use strict";i.r(t),i.d(t,["description",0,"Read the entire content of the editor document in HTML format","name",0,"readDocument","parameters",0,[{name:"start",type:"number",description:"Start character position (default: 0)",required:!1,default:0},{name:"end",type:"number",description:"End character position (default: length of document)",required:!1},{name:"aroundSelection",type:"boolean",description:"If true, return only the maximum block around the current selection",required:!1,default:!1}],"requiresPermission",0,!1])},28157:function(e,t,i){"use strict";i.d(t,{execute:function(){return s}});var n=i(77688),o=i(6689),r=i(22732);function s(e,t,i){return(0,n._)(function*(){let{start:n,end:s,aroundSelection:a}=t;(0,o.throwIfAborted)(i);let l=e.value,u=l.length;if(a&&!e.s.isCollapsed()){let t=e.s.range.commonAncestorContainer;for(;t&&t!==e.editor;){if(r.Dom.isElement(t)&&t.parentNode===e.editor){l=t.outerHTML;break}t=t.parentNode}return{html:l,length:u}}let c=void 0!==s?Math.min(s,u):u,d=Math.max(0,Math.min("number"==typeof n?n:0,u));return(d>0||u>c)&&(l=l.substring(d,c)),{html:l,length:u,start:d,end:c}})()}},5618:function(e,t,i){"use strict";var n=i(56075),o=i(11886),r=i(93809),s=i(28157);t.default=(0,o._)((0,n._)({},r),{execute:s.execute})},52826:function(e,t,i){"use strict";i.r(t),i.d(t,["description",0,"Get information about the current selection including HTML content and optional context","name",0,"readSelection","parameters",0,[{name:"contextCharsBefore",type:"number",description:"Number of characters to include before the selection",required:!1,default:0},{name:"contextCharsAfter",type:"number",description:"Number of characters to include after the selection",required:!1,default:0}],"requiresPermission",0,!1])},85130:function(e,t,i){"use strict";i.d(t,{execute:function(){return r}});var n=i(77688),o=i(6689);function r(e,t,i){return(0,n._)(function*(){let{contextCharsBefore:n,contextCharsAfter:r}=t;if((0,o.throwIfAborted)(i),e.s.restore(),e.s.isCollapsed())return{hasSelection:!1};let s=e.s.html,a=e.s.range,l=a.toString(),u={hasSelection:!0,html:s,text:l,startContainer:a.startContainer.nodeName,endContainer:a.endContainer.nodeName};if(n>0||r>0){let t=e.editor.textContent||"",i=t.substring(0,t.indexOf(l)),o=t.substring(t.indexOf(l)+l.length);n>0&&(u.contextBefore=i.slice(-n)),r>0&&(u.contextAfter=o.slice(0,r))}return u})()}},90991:function(e,t,i){"use strict";var n=i(56075),o=i(11886),r=i(52826),s=i(85130);t.default=(0,o._)((0,n._)({},r),{execute:s.execute})},96675:function(e,t,i){"use strict";i.r(t),i.d(t,["description",0,"Replace a specific block in the document by its index or CSS selector with new HTML content","name",0,"replaceBlock","parameters",0,[{name:"index",type:"number",description:"Zero-based index of the block to replace (use either index or selector, not both)",required:!1},{name:"selector",type:"string",description:'CSS selector to find the block to replace (e.g., "h1", ".my-class", "#my-id"). Use either selector or index, not both',required:!1},{name:"html",type:"string",description:"HTML content for the new block",required:!0}],"requiresPermission",0,!0])},3091:function(e,t,i){"use strict";i.d(t,{execute:function(){return u}});var n=i(77688),o=i(6689),r=i(49459),s=i(44526),a=i(85696),l=i(22732);function u(e,t,i){return(0,n._)(function*(){let{index:n,selector:u}=t,c=(0,r.requireString)(t,"html");if((0,o.throwIfAborted)(i),void 0===n&&!u||void 0!==n&&u)throw Error("Either index or selector must be provided, but not both");let{element:d,identifier:h}=(0,s.resolveBlock)(e,{selector:u,index:n,requireExactlyOne:!0});try{var p;let t=(0,a.createSanitizedContainer)(e,c).firstChild;if(!t||!l.Dom.isElement(t))throw Error("Invalid HTML: must contain at least one element");return null==(p=d.parentNode)||p.replaceChild(t,d),e.synchronizeValues(),{success:!0,message:`Block ${h} replaced successfully`}}catch(e){throw Error(`Failed to replace block ${h}: ${e.message}`)}})()}},2020:function(e,t,i){"use strict";var n=i(56075),o=i(11886),r=i(96675),s=i(3091);t.default=(0,o._)((0,n._)({},r),{execute:s.execute})},62553:function(e,t,i){"use strict";i.r(t),i.d(t,["description",0,"Find and replace text or HTML patterns throughout the entire document","name",0,"replaceInDocument","parameters",0,[{name:"search",type:"string",description:"Text or pattern to search for",required:!0},{name:"replace",type:"string",description:"Replacement text or HTML",required:!0},{name:"useRegex",type:"boolean",description:"If true, treats search as a regular expression",required:!1,default:!1},{name:"useSelector",type:"string",description:"CSS selector to narrow down the search scope to specific elements",required:!1}],"requiresPermission",0,!0])},56293:function(e,t,i){"use strict";i.d(t,{execute:function(){return a}});var n=i(77688),o=i(6689),r=i(49459),s=i(85696);function a(e,t,i){return(0,n._)(function*(){let n=(0,r.requireString)(t,"search"),a=(0,r.requireString)(t,"replace",{allowEmpty:!0}),{useRegex:l,useSelector:u}=t;(0,o.throwIfAborted)(i);try{let t;e.s.focus(),e.s.save();let r=0;if(u){let c=function(e,t,i,n,r,a){let l=e.editor.querySelectorAll(r);if(0===l.length)return{replacements:0,message:`No elements found matching selector "${r}"`};let u=0;return l.forEach(r=>{(0,o.throwIfAborted)(a);let l=r.innerHTML,c=l;if(n)try{let e=RegExp(t,"g");l=l.replace(e,()=>(u++,i))}catch(e){throw Error(`Invalid regex pattern: ${(null==e?void 0:e.message)||"Unknown error"}`)}else{let e=t.length,n=0;for(;-1!==(n=l.indexOf(t,n));)(0,o.throwIfAborted)(a),l=l.substring(0,n)+i+l.substring(n+e),n+=i.length,u++}l!==c&&(r.innerHTML=l,(0,s.sanitizeElement)(e,r))}),u>0&&(e.synchronizeValues(),e.s.restore()),{replacements:u}}(e,n,a,l,u,i);r=c.replacements,t=c.message}else r=function(e,t,i,n,r,s){let a=0,l=t;if(r)try{let e=RegExp(i,"g");l=l.replace(e,()=>(a++,n))}catch(e){throw Error(`Invalid regex pattern: ${(null==e?void 0:e.message)||"Unknown error"}`)}else{let e=i.length,t=0;for(;-1!==(t=l.indexOf(i,t));)(0,o.throwIfAborted)(s),l=l.substring(0,t)+n+l.substring(t+e),t+=n.length,a++}return a>0&&(e.value=l,e.s.restore(),e.synchronizeValues()),a}(e,e.value,n,a,l,i);return{replacements:r,message:t||(r>0?`Replaced ${r} occurrence(s)`:"No matches found")}}catch(t){throw e.s.restore(),Error(`Failed to replace in document: ${(null==t?void 0:t.message)||"Unknown error"}`)}})()}},12570:function(e,t,i){"use strict";var n=i(56075),o=i(11886),r=i(62553),s=i(56293);t.default=(0,o._)((0,n._)({},r),{execute:s.execute})},70750:function(e,t,i){"use strict";i.r(t),i.d(t,["description",0,"Replace the current selection with new HTML content","name",0,"replaceSelection","parameters",0,[{name:"html",type:"string",description:"HTML content to insert in place of the selection",required:!0},{name:"collapseToEnd",type:"boolean",description:"Move cursor to the end of the inserted content",required:!1,default:!0}],"requiresPermission",0,!0])},36142:function(e,t,i){"use strict";i.d(t,{execute:function(){return s}});var n=i(77688),o=i(6689),r=i(49459);function s(e,t,i){return(0,n._)(function*(){let n=(0,r.requireString)(t,"html"),{collapseToEnd:s}=t;(0,o.throwIfAborted)(i);try{if(e.s.restore(),e.s.insertHTML(n),s){let t=e.s.range;t.collapse(!1),e.s.selectRange(t)}return e.e.fire("change"),{success:!0,message:"Selection replaced successfully"}}catch(e){throw Error(`Failed to replace selection: ${e.message}`)}})()}},95323:function(e,t,i){"use strict";var n=i(56075),o=i(11886),r=i(70750),s=i(36142);t.default=(0,o._)((0,n._)({},r),{execute:s.execute})},90022:function(e,t,i){"use strict";i.r(t),i.d(t,["description",0,"Write (replace) the entire document content with new HTML","name",0,"writeDocument","parameters",0,[{name:"html",type:"string",description:"HTML content to set as the document",required:!0}],"requiresPermission",0,!0])},79766:function(e,t,i){"use strict";i.d(t,{execute:function(){return s}});var n=i(77688),o=i(6689),r=i(49459);function s(e,t,i){return(0,n._)(function*(){let n=(0,r.requireString)(t,"html",{allowEmpty:!0});(0,o.throwIfAborted)(i);try{return e.s.focus(),e.value=n,e.synchronizeValues(),{success:!0,message:`Document content was replaced with provided HTML(${n.length} characters)`}}catch(e){throw Error(`Failed to replace HTML: ${(null==e?void 0:e.message)||"Unknown error"}`)}})()}},97603:function(e,t,i){"use strict";var n=i(56075),o=i(11886),r=i(90022),s=i(79766);t.default=(0,o._)((0,n._)({},r),{execute:s.execute})},80453:function(e,t,i){"use strict";i.d(t,{UIConversationListItem:function(){return u}});var n=i(82749),o=i(31635),r=i(65478),s=i(67510),a=i(62843),l=i(80870);class u extends s.UIElement{className(){return"UIConversationListItem"}render(){return'<div class="jodit-ui-conversation-list__item"></div>'}setActive(e){this.isActive=e,this.updateContent()}updateContent(){let e=this.container;e.innerHTML="",e.setAttribute("data-id",this.conversation.id),this.isActive?e.classList.add("jodit-ui-conversation-list__item_active"):e.classList.remove("jodit-ui-conversation-list__item_active");let t=this.j.c.div("jodit-ui-conversation-list__item-avatar");t.textContent="AI",e.appendChild(t);let i=this.j.c.div("jodit-ui-conversation-list__item-wrapper"),n=this.j.c.div("jodit-ui-conversation-list__item-content"),o=this.j.c.div("jodit-ui-conversation-list__item-title");if(o.textContent=this.conversation.title,this.titleElement=o,n.appendChild(o),this.opts.showTimestamps){let e=this.j.c.div("jodit-ui-conversation-list__item-meta");e.textContent=this.opts.formatTimestamp(this.conversation.updated,this.j.i18n.bind(this.j)),n.appendChild(e)}if(i.appendChild(n),this.conversation.messageCount>0){let e=this.j.c.div("jodit-ui-conversation-list__item-badge");e.textContent=String(this.conversation.messageCount),i.appendChild(e)}e.appendChild(i),this.actionsButton||(this.actionsButton=new a.UIButton(this.j,{icon:{name:"dots"},tooltip:"Actions",name:"conversationActions",size:"tiny"}),this.actionsButton.container.classList.add("jodit-ui-conversation-list__item-actions"),this.actionsButton.onAction(e=>{e.stopPropagation(),this.showActionsMenu(e)})),e.appendChild(this.actionsButton.container)}onClick(){this.isRenaming||this.j.e.fire("selectConversation.ai-assistant-pro",this.conversation.id)}showActionsMenu(e){if(!this.contextMenu||!this.actionsButton)return;let t=this.actionsButton.container.getBoundingClientRect();this.contextMenu.show(t.left,t.bottom,[{title:"Rename",icon:"pencil",exec:()=>{this.startInlineRename()}},{title:"Delete",icon:"bin",exec:()=>{this.onDelete()}}]),e.stopPropagation()}startInlineRename(){if(this.isRenaming||!this.titleElement)return;this.isRenaming=!0;let e=this.titleElement,t=this.conversation.title,i=this.j.c.element("input");i.type="text",i.value=t,i.className="jodit-ui-conversation-list__item-title-input",e.textContent="",e.appendChild(i),i.focus(),i.select();let n=()=>{if(!this.isRenaming)return;let n=i.value.trim();this.isRenaming=!1,n&&n!==t?(e.textContent=n,this.j.e.fire("renameConversation.ai-assistant-pro",this.conversation.id,n)):e.textContent=t};this.j.e.on(i,"blur",n),this.j.e.on(i,"keydown",n=>{"Enter"===n.key&&(n.preventDefault(),i.blur()),"Escape"===n.key&&(this.isRenaming=!1,e.textContent=t)}),this.j.e.on(i,"click",e=>{e.stopPropagation()})}onDelete(){this.j.e.fire("deleteConversation.ai-assistant-pro",this.conversation.id)}destruct(){var e,t;null==(e=this.actionsButton)||e.destruct(),null==(t=this.contextMenu)||t.destruct(),super.destruct()}constructor(e,t,i=!1,o){super(e),(0,n._)(this,"opts",void 0),(0,n._)(this,"conversation",void 0),(0,n._)(this,"isActive",void 0),(0,n._)(this,"actionsButton",void 0),(0,n._)(this,"contextMenu",void 0),(0,n._)(this,"titleElement",void 0),(0,n._)(this,"isRenaming",void 0),this.opts=o,this.actionsButton=null,this.contextMenu=null,this.titleElement=null,this.isRenaming=!1,this.conversation=t,this.isActive=i,this.contextMenu=new l.ContextMenu(this.j),this.updateContent()}}(0,o.__decorate)([(0,r.watch)("container:click")],u.prototype,"onClick",null),(0,o.__decorate)([r.autobind],u.prototype,"showActionsMenu",null),(0,o.__decorate)([r.autobind],u.prototype,"startInlineRename",null),(0,o.__decorate)([r.autobind],u.prototype,"onDelete",null),u=(0,o.__decorate)([r.component],u)},68365:function(e,t,i){"use strict";i.d(t,{UIConversationList:function(){return c}});var n=i(82749),o=i(31635),r=i(31356),s=i(80453),a=i(65478),l=i(80256),u=i(62405);class c extends u.UIGroup{className(){return"UIConversationList"}render(){return`<div class="&__container">
257
257
  <div class="&__header"></div>
258
258
  <div class="&__search">
259
259
  <div class="&__search-loader"></div>