@tabler/core 1.0.0-beta20 → 1.0.0-beta21

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 (378) hide show
  1. package/README.md +7 -6
  2. package/dist/css/demo.css +8 -8
  3. package/dist/css/demo.min.css +5 -5
  4. package/dist/css/demo.rtl.css +8 -8
  5. package/dist/css/demo.rtl.min.css +5 -5
  6. package/dist/css/tabler-flags.css +10 -10
  7. package/dist/css/tabler-flags.min.css +5 -5
  8. package/dist/css/tabler-flags.rtl.css +10 -10
  9. package/dist/css/tabler-flags.rtl.min.css +5 -5
  10. package/dist/css/tabler-payments.css +4 -4
  11. package/dist/css/tabler-payments.min.css +4 -4
  12. package/dist/css/tabler-payments.rtl.css +4 -4
  13. package/dist/css/tabler-payments.rtl.min.css +4 -4
  14. package/dist/css/tabler-social.css +4 -4
  15. package/dist/css/tabler-social.min.css +4 -4
  16. package/dist/css/tabler-social.rtl.css +4 -4
  17. package/dist/css/tabler-social.rtl.min.css +4 -4
  18. package/dist/css/tabler-vendors.css +246 -253
  19. package/dist/css/tabler-vendors.min.css +5 -5
  20. package/dist/css/tabler-vendors.rtl.css +246 -253
  21. package/dist/css/tabler-vendors.rtl.min.css +5 -5
  22. package/dist/css/tabler.css +643 -426
  23. package/dist/css/tabler.min.css +8 -8
  24. package/dist/css/tabler.rtl.css +667 -441
  25. package/dist/css/tabler.rtl.min.css +8 -8
  26. package/dist/js/demo-theme.js +4 -4
  27. package/dist/js/demo-theme.min.js +4 -4
  28. package/dist/js/demo.js +41 -42
  29. package/dist/js/demo.min.js +5 -5
  30. package/dist/js/tabler.esm.js +1949 -1248
  31. package/dist/js/tabler.esm.min.js +8 -8
  32. package/dist/js/tabler.js +1949 -1248
  33. package/dist/js/tabler.min.js +8 -8
  34. package/dist/libs/apexcharts/dist/apexcharts.amd.js +1 -1
  35. package/dist/libs/apexcharts/dist/apexcharts.common.js +5 -5
  36. package/dist/libs/apexcharts/dist/apexcharts.css +166 -65
  37. package/dist/libs/apexcharts/dist/apexcharts.esm.js +5 -5
  38. package/dist/libs/apexcharts/dist/apexcharts.js +7964 -8527
  39. package/dist/libs/apexcharts/dist/apexcharts.min.js +5 -5
  40. package/dist/libs/apexcharts/dist/locales/be-cyrl.json +55 -0
  41. package/dist/libs/apexcharts/dist/locales/be-latn.json +55 -0
  42. package/dist/libs/apexcharts/dist/locales/da.json +55 -0
  43. package/dist/libs/apexcharts/dist/locales/ms.json +63 -0
  44. package/dist/libs/apexcharts/dist/locales/pt.json +3 -3
  45. package/dist/libs/apexcharts/dist/locales/vi.json +63 -0
  46. package/dist/libs/apexcharts/dist/locales/zh-tw.json +1 -1
  47. package/dist/libs/bootstrap/dist/js/bootstrap.bundle.js +8 -8
  48. package/dist/libs/bootstrap/dist/js/bootstrap.bundle.js.map +1 -1
  49. package/dist/libs/bootstrap/dist/js/bootstrap.bundle.min.js +3 -3
  50. package/dist/libs/bootstrap/dist/js/bootstrap.bundle.min.js.map +1 -1
  51. package/dist/libs/bootstrap/dist/js/bootstrap.esm.js +8 -8
  52. package/dist/libs/bootstrap/dist/js/bootstrap.esm.js.map +1 -1
  53. package/dist/libs/bootstrap/dist/js/bootstrap.esm.min.js +3 -3
  54. package/dist/libs/bootstrap/dist/js/bootstrap.esm.min.js.map +1 -1
  55. package/dist/libs/bootstrap/dist/js/bootstrap.js +8 -8
  56. package/dist/libs/bootstrap/dist/js/bootstrap.js.map +1 -1
  57. package/dist/libs/bootstrap/dist/js/bootstrap.min.js +3 -3
  58. package/dist/libs/bootstrap/dist/js/bootstrap.min.js.map +1 -1
  59. package/dist/libs/countup.js/dist/countUp.d.ts +1 -0
  60. package/dist/libs/countup.js/dist/countUp.js +4 -1
  61. package/dist/libs/countup.js/dist/countUp.min.js +1 -1
  62. package/dist/libs/countup.js/dist/countUp.umd.js +1 -1
  63. package/dist/libs/jsvectormap/dist/jsvectormap.cjs +2279 -0
  64. package/dist/libs/jsvectormap/dist/jsvectormap.css +121 -0
  65. package/dist/libs/jsvectormap/dist/jsvectormap.esm.js +2277 -0
  66. package/dist/libs/jsvectormap/dist/jsvectormap.js +2285 -0
  67. package/dist/libs/jsvectormap/dist/jsvectormap.min.css +1 -0
  68. package/dist/libs/jsvectormap/dist/jsvectormap.min.js +1 -0
  69. package/dist/libs/jsvectormap/dist/maps/world-merc.js +1 -1
  70. package/dist/libs/jsvectormap/dist/maps/world.js +1 -1
  71. package/dist/libs/nouislider/dist/nouislider.d.ts +8 -10
  72. package/dist/libs/nouislider/dist/nouislider.js +64 -5
  73. package/dist/libs/nouislider/dist/nouislider.min.js +1 -1
  74. package/dist/libs/nouislider/dist/nouislider.min.mjs +1 -1
  75. package/dist/libs/nouislider/dist/nouislider.mjs +64 -5
  76. package/dist/libs/star-rating.js/dist/star-rating.cjs.js +5 -2
  77. package/dist/libs/star-rating.js/dist/star-rating.css +23 -20
  78. package/dist/libs/star-rating.js/dist/star-rating.esm.js +5 -2
  79. package/dist/libs/star-rating.js/dist/star-rating.js +5 -9
  80. package/dist/libs/star-rating.js/dist/star-rating.min.css +1 -8
  81. package/dist/libs/star-rating.js/dist/star-rating.min.js +1 -8
  82. package/dist/libs/tinymce/CHANGELOG.md +471 -12
  83. package/dist/libs/tinymce/README.md +16 -10
  84. package/dist/libs/tinymce/bower.json +1 -1
  85. package/dist/libs/tinymce/composer.json +2 -2
  86. package/dist/libs/tinymce/icons/default/icons.js +13 -2
  87. package/dist/libs/tinymce/icons/default/icons.min.js +1 -1
  88. package/dist/libs/tinymce/license.md +6 -0
  89. package/dist/libs/tinymce/models/dom/model.js +237 -213
  90. package/dist/libs/tinymce/models/dom/model.min.js +2 -2
  91. package/dist/libs/tinymce/package.json +2 -2
  92. package/dist/libs/tinymce/plugins/accordion/index.js +7 -0
  93. package/dist/libs/tinymce/plugins/accordion/plugin.js +1055 -0
  94. package/dist/libs/tinymce/plugins/accordion/plugin.min.js +4 -0
  95. package/dist/libs/tinymce/plugins/advlist/plugin.js +4 -4
  96. package/dist/libs/tinymce/plugins/advlist/plugin.min.js +2 -2
  97. package/dist/libs/tinymce/plugins/anchor/plugin.js +21 -3
  98. package/dist/libs/tinymce/plugins/anchor/plugin.min.js +2 -2
  99. package/dist/libs/tinymce/plugins/autolink/plugin.js +1 -1
  100. package/dist/libs/tinymce/plugins/autolink/plugin.min.js +2 -2
  101. package/dist/libs/tinymce/plugins/autoresize/plugin.js +20 -33
  102. package/dist/libs/tinymce/plugins/autoresize/plugin.min.js +2 -2
  103. package/dist/libs/tinymce/plugins/autosave/plugin.js +1 -1
  104. package/dist/libs/tinymce/plugins/autosave/plugin.min.js +1 -1
  105. package/dist/libs/tinymce/plugins/charmap/plugin.js +15 -3
  106. package/dist/libs/tinymce/plugins/charmap/plugin.min.js +2 -2
  107. package/dist/libs/tinymce/plugins/code/plugin.js +1 -1
  108. package/dist/libs/tinymce/plugins/code/plugin.min.js +1 -1
  109. package/dist/libs/tinymce/plugins/codesample/plugin.js +27 -13
  110. package/dist/libs/tinymce/plugins/codesample/plugin.min.js +2 -2
  111. package/dist/libs/tinymce/plugins/directionality/plugin.js +33 -27
  112. package/dist/libs/tinymce/plugins/directionality/plugin.min.js +2 -2
  113. package/dist/libs/tinymce/plugins/emoticons/plugin.js +17 -4
  114. package/dist/libs/tinymce/plugins/emoticons/plugin.min.js +2 -2
  115. package/dist/libs/tinymce/plugins/fullscreen/plugin.js +168 -105
  116. package/dist/libs/tinymce/plugins/fullscreen/plugin.min.js +2 -2
  117. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/ar.js +93 -0
  118. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/bg_BG.js +93 -0
  119. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/ca.js +93 -0
  120. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/cs.js +93 -0
  121. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/da.js +93 -0
  122. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/de.js +93 -0
  123. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/el.js +93 -0
  124. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/en.js +93 -0
  125. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/es.js +93 -0
  126. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/eu.js +93 -0
  127. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/fa.js +93 -0
  128. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/fi.js +93 -0
  129. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/fr_FR.js +93 -0
  130. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/he_IL.js +93 -0
  131. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/hi.js +93 -0
  132. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/hr.js +93 -0
  133. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/hu_HU.js +93 -0
  134. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/id.js +93 -0
  135. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/it.js +93 -0
  136. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/ja.js +93 -0
  137. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/kk.js +93 -0
  138. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/ko_KR.js +93 -0
  139. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/ms.js +93 -0
  140. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/nb_NO.js +93 -0
  141. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/nl.js +93 -0
  142. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/pl.js +93 -0
  143. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/pt_BR.js +93 -0
  144. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/pt_PT.js +93 -0
  145. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/ro.js +93 -0
  146. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/ru.js +93 -0
  147. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/sk.js +93 -0
  148. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/sl_SI.js +93 -0
  149. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/sv_SE.js +93 -0
  150. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/th_TH.js +93 -0
  151. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/tr.js +93 -0
  152. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/uk.js +93 -0
  153. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/vi.js +93 -0
  154. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/zh_CN.js +87 -0
  155. package/dist/libs/tinymce/plugins/help/js/i18n/keynav/zh_TW.js +93 -0
  156. package/dist/libs/tinymce/plugins/help/plugin.js +115 -135
  157. package/dist/libs/tinymce/plugins/help/plugin.min.js +2 -2
  158. package/dist/libs/tinymce/plugins/image/plugin.js +23 -5
  159. package/dist/libs/tinymce/plugins/image/plugin.min.js +2 -2
  160. package/dist/libs/tinymce/plugins/importcss/plugin.js +4 -3
  161. package/dist/libs/tinymce/plugins/importcss/plugin.min.js +2 -2
  162. package/dist/libs/tinymce/plugins/insertdatetime/plugin.js +15 -3
  163. package/dist/libs/tinymce/plugins/insertdatetime/plugin.min.js +2 -2
  164. package/dist/libs/tinymce/plugins/link/plugin.js +193 -114
  165. package/dist/libs/tinymce/plugins/link/plugin.min.js +2 -2
  166. package/dist/libs/tinymce/plugins/lists/plugin.js +290 -66
  167. package/dist/libs/tinymce/plugins/lists/plugin.min.js +2 -2
  168. package/dist/libs/tinymce/plugins/media/plugin.js +80 -33
  169. package/dist/libs/tinymce/plugins/media/plugin.min.js +2 -2
  170. package/dist/libs/tinymce/plugins/nonbreaking/plugin.js +15 -3
  171. package/dist/libs/tinymce/plugins/nonbreaking/plugin.min.js +2 -2
  172. package/dist/libs/tinymce/plugins/pagebreak/plugin.js +15 -3
  173. package/dist/libs/tinymce/plugins/pagebreak/plugin.min.js +2 -2
  174. package/dist/libs/tinymce/plugins/preview/plugin.js +1 -1
  175. package/dist/libs/tinymce/plugins/preview/plugin.min.js +1 -1
  176. package/dist/libs/tinymce/plugins/quickbars/plugin.js +19 -7
  177. package/dist/libs/tinymce/plugins/quickbars/plugin.min.js +2 -2
  178. package/dist/libs/tinymce/plugins/save/plugin.js +3 -2
  179. package/dist/libs/tinymce/plugins/save/plugin.min.js +2 -2
  180. package/dist/libs/tinymce/plugins/searchreplace/plugin.js +42 -36
  181. package/dist/libs/tinymce/plugins/searchreplace/plugin.min.js +2 -2
  182. package/dist/libs/tinymce/plugins/table/plugin.js +121 -76
  183. package/dist/libs/tinymce/plugins/table/plugin.min.js +2 -2
  184. package/dist/libs/tinymce/plugins/visualblocks/plugin.js +1 -1
  185. package/dist/libs/tinymce/plugins/visualblocks/plugin.min.js +1 -1
  186. package/dist/libs/tinymce/plugins/visualchars/plugin.js +1 -1
  187. package/dist/libs/tinymce/plugins/visualchars/plugin.min.js +1 -1
  188. package/dist/libs/tinymce/plugins/wordcount/plugin.js +27 -19
  189. package/dist/libs/tinymce/plugins/wordcount/plugin.min.js +2 -2
  190. package/dist/libs/tinymce/skins/content/dark/content.js +1 -0
  191. package/dist/libs/tinymce/skins/content/default/content.js +1 -0
  192. package/dist/libs/tinymce/skins/content/document/content.js +1 -0
  193. package/dist/libs/tinymce/skins/content/tinymce-5/content.js +1 -0
  194. package/dist/libs/tinymce/skins/content/tinymce-5-dark/content.js +1 -0
  195. package/dist/libs/tinymce/skins/content/writer/content.js +1 -0
  196. package/dist/libs/tinymce/skins/ui/oxide/content.css +32 -29
  197. package/dist/libs/tinymce/skins/ui/oxide/content.inline.css +32 -29
  198. package/dist/libs/tinymce/skins/ui/oxide/content.inline.js +1 -0
  199. package/dist/libs/tinymce/skins/ui/oxide/content.inline.min.css +1 -1
  200. package/dist/libs/tinymce/skins/ui/oxide/content.js +1 -0
  201. package/dist/libs/tinymce/skins/ui/oxide/content.min.css +1 -1
  202. package/dist/libs/tinymce/skins/ui/oxide/skin.css +1003 -105
  203. package/dist/libs/tinymce/skins/ui/oxide/skin.js +1 -0
  204. package/dist/libs/tinymce/skins/ui/oxide/skin.min.css +1 -1
  205. package/dist/libs/tinymce/skins/ui/oxide/skin.shadowdom.js +1 -0
  206. package/dist/libs/tinymce/skins/ui/oxide-dark/content.css +32 -22
  207. package/dist/libs/tinymce/skins/ui/oxide-dark/content.inline.css +32 -29
  208. package/dist/libs/tinymce/skins/ui/oxide-dark/content.inline.js +1 -0
  209. package/dist/libs/tinymce/skins/ui/oxide-dark/content.inline.min.css +1 -1
  210. package/dist/libs/tinymce/skins/ui/oxide-dark/content.js +1 -0
  211. package/dist/libs/tinymce/skins/ui/oxide-dark/content.min.css +1 -1
  212. package/dist/libs/tinymce/skins/ui/oxide-dark/skin.css +1008 -110
  213. package/dist/libs/tinymce/skins/ui/oxide-dark/skin.js +1 -0
  214. package/dist/libs/tinymce/skins/ui/oxide-dark/skin.min.css +1 -1
  215. package/dist/libs/tinymce/skins/ui/oxide-dark/skin.shadowdom.js +1 -0
  216. package/dist/libs/tinymce/skins/ui/tinymce-5/content.css +32 -29
  217. package/dist/libs/tinymce/skins/ui/tinymce-5/content.inline.css +32 -29
  218. package/dist/libs/tinymce/skins/ui/tinymce-5/content.inline.js +1 -0
  219. package/dist/libs/tinymce/skins/ui/tinymce-5/content.inline.min.css +1 -1
  220. package/dist/libs/tinymce/skins/ui/tinymce-5/content.js +1 -0
  221. package/dist/libs/tinymce/skins/ui/tinymce-5/content.min.css +1 -1
  222. package/dist/libs/tinymce/skins/ui/tinymce-5/skin.css +1003 -86
  223. package/dist/libs/tinymce/skins/ui/tinymce-5/skin.js +1 -0
  224. package/dist/libs/tinymce/skins/ui/tinymce-5/skin.min.css +1 -1
  225. package/dist/libs/tinymce/skins/ui/tinymce-5/skin.shadowdom.js +1 -0
  226. package/dist/libs/tinymce/skins/ui/tinymce-5-dark/content.css +32 -22
  227. package/dist/libs/tinymce/skins/ui/tinymce-5-dark/content.inline.css +32 -29
  228. package/dist/libs/tinymce/skins/ui/tinymce-5-dark/content.inline.js +1 -0
  229. package/dist/libs/tinymce/skins/ui/tinymce-5-dark/content.inline.min.css +1 -1
  230. package/dist/libs/tinymce/skins/ui/tinymce-5-dark/content.js +1 -0
  231. package/dist/libs/tinymce/skins/ui/tinymce-5-dark/content.min.css +1 -1
  232. package/dist/libs/tinymce/skins/ui/tinymce-5-dark/skin.css +1009 -92
  233. package/dist/libs/tinymce/skins/ui/tinymce-5-dark/skin.js +1 -0
  234. package/dist/libs/tinymce/skins/ui/tinymce-5-dark/skin.min.css +1 -1
  235. package/dist/libs/tinymce/skins/ui/tinymce-5-dark/skin.shadowdom.js +1 -0
  236. package/dist/libs/tinymce/themes/silver/theme.js +26361 -24936
  237. package/dist/libs/tinymce/themes/silver/theme.min.js +2 -2
  238. package/dist/libs/tinymce/tinymce.d.ts +205 -136
  239. package/dist/libs/tinymce/tinymce.js +4400 -2838
  240. package/dist/libs/tinymce/tinymce.min.js +2 -2
  241. package/dist/libs/tom-select/dist/js/plugins/caret_position.js +11 -16
  242. package/dist/libs/tom-select/dist/js/plugins/caret_position.js.map +1 -1
  243. package/dist/libs/tom-select/dist/js/plugins/change_listener.js +3 -2
  244. package/dist/libs/tom-select/dist/js/plugins/change_listener.js.map +1 -1
  245. package/dist/libs/tom-select/dist/js/plugins/checkbox_options.js +47 -34
  246. package/dist/libs/tom-select/dist/js/plugins/checkbox_options.js.map +1 -1
  247. package/dist/libs/tom-select/dist/js/plugins/clear_button.js +3 -13
  248. package/dist/libs/tom-select/dist/js/plugins/clear_button.js.map +1 -1
  249. package/dist/libs/tom-select/dist/js/plugins/drag_drop.js +249 -29
  250. package/dist/libs/tom-select/dist/js/plugins/drag_drop.js.map +1 -1
  251. package/dist/libs/tom-select/dist/js/plugins/dropdown_header.js +3 -11
  252. package/dist/libs/tom-select/dist/js/plugins/dropdown_header.js.map +1 -1
  253. package/dist/libs/tom-select/dist/js/plugins/dropdown_input.js +15 -24
  254. package/dist/libs/tom-select/dist/js/plugins/dropdown_input.js.map +1 -1
  255. package/dist/libs/tom-select/dist/js/plugins/input_autogrow.js +4 -6
  256. package/dist/libs/tom-select/dist/js/plugins/input_autogrow.js.map +1 -1
  257. package/dist/libs/tom-select/dist/js/plugins/no_active_items.js +2 -1
  258. package/dist/libs/tom-select/dist/js/plugins/no_active_items.js.map +1 -1
  259. package/dist/libs/tom-select/dist/js/plugins/no_backspace_delete.js +2 -2
  260. package/dist/libs/tom-select/dist/js/plugins/no_backspace_delete.js.map +1 -1
  261. package/dist/libs/tom-select/dist/js/plugins/optgroup_columns.js +3 -15
  262. package/dist/libs/tom-select/dist/js/plugins/optgroup_columns.js.map +1 -1
  263. package/dist/libs/tom-select/dist/js/plugins/remove_button.js +11 -15
  264. package/dist/libs/tom-select/dist/js/plugins/remove_button.js.map +1 -1
  265. package/dist/libs/tom-select/dist/js/plugins/restore_on_backspace.js +2 -3
  266. package/dist/libs/tom-select/dist/js/plugins/restore_on_backspace.js.map +1 -1
  267. package/dist/libs/tom-select/dist/js/plugins/virtual_scroll.js +41 -50
  268. package/dist/libs/tom-select/dist/js/plugins/virtual_scroll.js.map +1 -1
  269. package/dist/libs/tom-select/dist/js/tom-select.base.js +411 -685
  270. package/dist/libs/tom-select/dist/js/tom-select.base.js.map +1 -1
  271. package/dist/libs/tom-select/dist/js/tom-select.base.min.js +87 -78
  272. package/dist/libs/tom-select/dist/js/tom-select.base.min.js.map +1 -1
  273. package/dist/libs/tom-select/dist/js/tom-select.complete.js +614 -820
  274. package/dist/libs/tom-select/dist/js/tom-select.complete.js.map +1 -1
  275. package/dist/libs/tom-select/dist/js/tom-select.complete.min.js +195 -176
  276. package/dist/libs/tom-select/dist/js/tom-select.complete.min.js.map +1 -1
  277. package/dist/libs/tom-select/dist/js/tom-select.popular.js +436 -705
  278. package/dist/libs/tom-select/dist/js/tom-select.popular.js.map +1 -1
  279. package/dist/libs/tom-select/dist/js/tom-select.popular.min.js +87 -78
  280. package/dist/libs/tom-select/dist/js/tom-select.popular.min.js.map +1 -1
  281. package/docs/base/colors.mdx +25 -0
  282. package/docs/base/typography.mdx +296 -0
  283. package/docs/components/alerts.mdx +430 -0
  284. package/docs/components/autosize.mdx +16 -0
  285. package/docs/components/avatars.mdx +172 -0
  286. package/docs/components/badges.mdx +127 -0
  287. package/docs/components/breadcrumb.mdx +107 -0
  288. package/docs/components/buttons.mdx +863 -0
  289. package/docs/components/cards.mdx +343 -0
  290. package/docs/components/carousel.mdx +235 -0
  291. package/docs/components/charts.mdx +526 -0
  292. package/docs/components/countup.mdx +136 -0
  293. package/docs/components/datagrid.mdx +90 -0
  294. package/docs/components/divider.mdx +63 -0
  295. package/docs/components/dropdowns.mdx +245 -0
  296. package/docs/components/dropzone.mdx +63 -0
  297. package/docs/components/empty.mdx +103 -0
  298. package/docs/components/icons.mdx +120 -0
  299. package/docs/components/inline-player.mdx +31 -0
  300. package/docs/components/modals.mdx +222 -0
  301. package/docs/components/placeholder.mdx +270 -0
  302. package/docs/components/popover.mdx +55 -0
  303. package/docs/components/progress.mdx +92 -0
  304. package/docs/components/progressbg.mdx +16 -0
  305. package/docs/components/range-slider.mdx +17 -0
  306. package/docs/components/ribbons.mdx +151 -0
  307. package/docs/components/spinners.mdx +119 -0
  308. package/docs/components/statuses.mdx +285 -0
  309. package/docs/components/steps.mdx +111 -0
  310. package/docs/components/switch-icon.mdx +155 -0
  311. package/docs/components/tables.mdx +410 -0
  312. package/docs/components/tabs.mdx +243 -0
  313. package/docs/components/timelines.mdx +506 -0
  314. package/docs/components/tinymce.mdx +44 -0
  315. package/docs/components/toasts.mdx +73 -0
  316. package/docs/components/tooltips.mdx +34 -0
  317. package/docs/components/tracking.mdx +162 -0
  318. package/docs/forms/form-color-check.mdx +179 -0
  319. package/docs/forms/form-elements.mdx +498 -0
  320. package/docs/forms/form-fieldset.mdx +44 -0
  321. package/docs/forms/form-helpers.mdx +12 -0
  322. package/docs/forms/form-image-check.mdx +162 -0
  323. package/docs/forms/form-input-mask.mdx +18 -0
  324. package/docs/forms/form-selectboxes.mdx +205 -0
  325. package/docs/forms/form-validation.mdx +25 -0
  326. package/docs/getting-started/browser-support.mdx +20 -0
  327. package/docs/getting-started/customize.mdx +24 -0
  328. package/docs/getting-started/download.mdx +42 -0
  329. package/docs/getting-started/faq.mdx +28 -0
  330. package/docs/getting-started/index.mdx +40 -0
  331. package/docs/icons/eps.mdx +13 -0
  332. package/docs/icons/figma.mdx +7 -0
  333. package/docs/icons/index.mdx +103 -0
  334. package/docs/icons/pdf.mdx +13 -0
  335. package/docs/icons/png.mdx +19 -0
  336. package/docs/icons/preact.mdx +40 -0
  337. package/docs/icons/react.mdx +40 -0
  338. package/docs/icons/solidjs.mdx +39 -0
  339. package/docs/icons/svelte.mdx +40 -0
  340. package/docs/icons/svg.mdx +74 -0
  341. package/docs/icons/vue.mdx +45 -0
  342. package/docs/icons/webfont.mdx +52 -0
  343. package/docs/layout/page-headers.mdx +226 -0
  344. package/docs/layout/page-layouts.mdx +204 -0
  345. package/docs/menu.json +317 -0
  346. package/docs/plugins/flags.mdx +52 -0
  347. package/docs/plugins/payments.mdx +43 -0
  348. package/docs/utilities/borders.mdx +114 -0
  349. package/docs/utilities/cursors.mdx +92 -0
  350. package/docs/utilities/interactions.mdx +23 -0
  351. package/package.json +37 -37
  352. package/src/js/src/toast.js +9 -1
  353. package/src/scss/_variables-dark.scss +3 -3
  354. package/src/scss/_variables.scss +38 -33
  355. package/src/scss/layout/_dark.scss +10 -2
  356. package/src/scss/layout/_navbar.scss +22 -13
  357. package/src/scss/layout/_page.scss +4 -4
  358. package/src/scss/layout/_root.scss +1 -1
  359. package/src/scss/mixins/_mixins.scss +4 -4
  360. package/src/scss/ui/_alerts.scss +2 -2
  361. package/src/scss/ui/_buttons.scss +4 -4
  362. package/src/scss/ui/_dropdowns.scss +1 -0
  363. package/src/scss/ui/_empty.scss +0 -5
  364. package/src/scss/ui/_flags.scss +2 -2
  365. package/src/scss/ui/_forms.scss +5 -4
  366. package/src/scss/ui/_modals.scss +3 -3
  367. package/src/scss/ui/_ribbons.scss +1 -0
  368. package/src/scss/ui/_toasts.scss +0 -1
  369. package/src/scss/ui/_type.scss +4 -2
  370. package/src/scss/vendor/_apexcharts.scss +2 -2
  371. package/src/scss/vendor/_jsvectormap.scss +1 -1
  372. package/src/scss/vendor/_litepicker.scss +1 -1
  373. package/dist/libs/jsvectormap/dist/js/jsvectormap.js +0 -2318
  374. package/dist/libs/jsvectormap/dist/js/jsvectormap.min.js +0 -1
  375. package/dist/libs/tinymce/license.txt +0 -21
  376. package/dist/libs/tinymce/plugins/template/index.js +0 -7
  377. package/dist/libs/tinymce/plugins/template/plugin.js +0 -554
  378. package/dist/libs/tinymce/plugins/template/plugin.min.js +0 -4
@@ -1,5 +1,5 @@
1
1
  /**
2
- * TinyMCE version 6.4.2 (2023-04-26)
2
+ * TinyMCE version 7.3.0 (2024-08-07)
3
3
  */
4
4
 
5
5
  (function () {
@@ -292,53 +292,6 @@
292
292
  const allowUnsafeLinkTarget = option('allow_unsafe_link_target');
293
293
  const useQuickLink = option('link_quicklink');
294
294
 
295
- var global$4 = tinymce.util.Tools.resolve('tinymce.util.Tools');
296
-
297
- const getValue = item => isString(item.value) ? item.value : '';
298
- const getText = item => {
299
- if (isString(item.text)) {
300
- return item.text;
301
- } else if (isString(item.title)) {
302
- return item.title;
303
- } else {
304
- return '';
305
- }
306
- };
307
- const sanitizeList = (list, extractValue) => {
308
- const out = [];
309
- global$4.each(list, item => {
310
- const text = getText(item);
311
- if (item.menu !== undefined) {
312
- const items = sanitizeList(item.menu, extractValue);
313
- out.push({
314
- text,
315
- items
316
- });
317
- } else {
318
- const value = extractValue(item);
319
- out.push({
320
- text,
321
- value
322
- });
323
- }
324
- });
325
- return out;
326
- };
327
- const sanitizeWith = (extracter = getValue) => list => Optional.from(list).map(list => sanitizeList(list, extracter));
328
- const sanitize = list => sanitizeWith(getValue)(list);
329
- const createUi = (name, label) => items => ({
330
- name,
331
- type: 'listbox',
332
- label,
333
- items
334
- });
335
- const ListOptions = {
336
- sanitize,
337
- sanitizeWith,
338
- createUi,
339
- getValue
340
- };
341
-
342
295
  const keys = Object.keys;
343
296
  const hasOwnProperty = Object.hasOwnProperty;
344
297
  const each = (obj, f) => {
@@ -365,9 +318,11 @@
365
318
  const has = (obj, key) => hasOwnProperty.call(obj, key);
366
319
  const hasNonNullableKey = (obj, key) => has(obj, key) && obj[key] !== undefined && obj[key] !== null;
367
320
 
321
+ var global$4 = tinymce.util.Tools.resolve('tinymce.util.URI');
322
+
368
323
  var global$3 = tinymce.util.Tools.resolve('tinymce.dom.TreeWalker');
369
324
 
370
- var global$2 = tinymce.util.Tools.resolve('tinymce.util.URI');
325
+ var global$2 = tinymce.util.Tools.resolve('tinymce.util.Tools');
371
326
 
372
327
  const isAnchor = elm => isNonNullable(elm) && elm.nodeName.toLowerCase() === 'a';
373
328
  const isLink = elm => isAnchor(elm) && !!getHref(elm);
@@ -396,12 +351,12 @@
396
351
  const applyRelTargetRules = (rel, isUnsafe) => {
397
352
  const rules = ['noopener'];
398
353
  const rels = rel ? rel.split(/\s+/) : [];
399
- const toString = rels => global$4.trim(rels.sort().join(' '));
354
+ const toString = rels => global$2.trim(rels.sort().join(' '));
400
355
  const addTargetRules = rels => {
401
356
  rels = removeTargetRules(rels);
402
357
  return rels.length > 0 ? rels.concat(rules) : rules;
403
358
  };
404
- const removeTargetRules = rels => rels.filter(val => global$4.inArray(rules, val) === -1);
359
+ const removeTargetRules = rels => rels.filter(val => global$2.inArray(rules, val) === -1);
405
360
  const newRels = isUnsafe ? addTargetRules(rels) : removeTargetRules(rels);
406
361
  return newRels.length > 0 ? toString(newRels) : '';
407
362
  };
@@ -420,7 +375,7 @@
420
375
  return trimCaretContainers(text);
421
376
  };
422
377
  const getLinksInSelection = rng => collectNodesInRange(rng, isLink);
423
- const getLinks$1 = elements => global$4.grep(elements, isLink);
378
+ const getLinks$1 = elements => global$2.grep(elements, isLink);
424
379
  const hasLinks = elements => getLinks$1(elements).length > 0;
425
380
  const hasLinksInSelection = rng => getLinksInSelection(rng).length > 0;
426
381
  const isOnlyTextSelected = editor => {
@@ -439,6 +394,7 @@
439
394
  }
440
395
  };
441
396
  const isImageFigure = elm => isNonNullable(elm) && elm.nodeName === 'FIGURE' && /\bimage\b/i.test(elm.className);
397
+
442
398
  const getLinkAttrs = data => {
443
399
  const attrs = [
444
400
  'title',
@@ -565,7 +521,7 @@
565
521
  const href = data.href;
566
522
  return {
567
523
  ...data,
568
- href: global$2.isDomSafe(href, 'a', uriOptions) ? href : ''
524
+ href: global$4.isDomSafe(href, 'a', uriOptions) ? href : ''
569
525
  };
570
526
  };
571
527
  const link = (editor, attachState, data) => {
@@ -596,6 +552,51 @@
596
552
  }
597
553
  };
598
554
 
555
+ const getValue = item => isString(item.value) ? item.value : '';
556
+ const getText = item => {
557
+ if (isString(item.text)) {
558
+ return item.text;
559
+ } else if (isString(item.title)) {
560
+ return item.title;
561
+ } else {
562
+ return '';
563
+ }
564
+ };
565
+ const sanitizeList = (list, extractValue) => {
566
+ const out = [];
567
+ global$2.each(list, item => {
568
+ const text = getText(item);
569
+ if (item.menu !== undefined) {
570
+ const items = sanitizeList(item.menu, extractValue);
571
+ out.push({
572
+ text,
573
+ items
574
+ });
575
+ } else {
576
+ const value = extractValue(item);
577
+ out.push({
578
+ text,
579
+ value
580
+ });
581
+ }
582
+ });
583
+ return out;
584
+ };
585
+ const sanitizeWith = (extracter = getValue) => list => Optional.from(list).map(list => sanitizeList(list, extracter));
586
+ const sanitize = list => sanitizeWith(getValue)(list);
587
+ const createUi = (name, label) => items => ({
588
+ name,
589
+ type: 'listbox',
590
+ label,
591
+ items
592
+ });
593
+ const ListOptions = {
594
+ sanitize,
595
+ sanitizeWith,
596
+ createUi,
597
+ getValue
598
+ };
599
+
599
600
  const isListGroup = item => hasNonNullableKey(item, 'items');
600
601
  const findTextByValue = (value, catalog) => findMap(catalog, item => {
601
602
  if (isListGroup(item)) {
@@ -903,7 +904,8 @@
903
904
  name: 'url',
904
905
  type: 'urlinput',
905
906
  filetype: 'file',
906
- label: 'URL'
907
+ label: 'URL',
908
+ picker_text: 'Browse links'
907
909
  }];
908
910
  const displayText = settings.anchor.text.map(() => ({
909
911
  name: 'text',
@@ -960,7 +962,7 @@
960
962
  onSubmit
961
963
  };
962
964
  };
963
- const open$1 = editor => {
965
+ const open = editor => {
964
966
  const data = collectData(editor);
965
967
  data.then(info => {
966
968
  const onSubmit = handleSubmit(editor, info);
@@ -973,13 +975,62 @@
973
975
  const register = editor => {
974
976
  editor.addCommand('mceLink', (_ui, value) => {
975
977
  if ((value === null || value === void 0 ? void 0 : value.dialog) === true || !useQuickLink(editor)) {
976
- open$1(editor);
978
+ open(editor);
977
979
  } else {
978
980
  editor.dispatch('contexttoolbar-show', { toolbarKey: 'quicklink' });
979
981
  }
980
982
  });
981
983
  };
982
984
 
985
+ const setup$2 = editor => {
986
+ editor.addShortcut('Meta+K', '', () => {
987
+ editor.execCommand('mceLink');
988
+ });
989
+ };
990
+
991
+ const Cell = initial => {
992
+ let value = initial;
993
+ const get = () => {
994
+ return value;
995
+ };
996
+ const set = v => {
997
+ value = v;
998
+ };
999
+ return {
1000
+ get,
1001
+ set
1002
+ };
1003
+ };
1004
+
1005
+ const singleton = doRevoke => {
1006
+ const subject = Cell(Optional.none());
1007
+ const revoke = () => subject.get().each(doRevoke);
1008
+ const clear = () => {
1009
+ revoke();
1010
+ subject.set(Optional.none());
1011
+ };
1012
+ const isSet = () => subject.get().isSome();
1013
+ const get = () => subject.get();
1014
+ const set = s => {
1015
+ revoke();
1016
+ subject.set(Optional.some(s));
1017
+ };
1018
+ return {
1019
+ clear,
1020
+ isSet,
1021
+ get,
1022
+ set
1023
+ };
1024
+ };
1025
+ const value = () => {
1026
+ const subject = singleton(noop);
1027
+ const on = f => subject.get().each(f);
1028
+ return {
1029
+ ...subject,
1030
+ on
1031
+ };
1032
+ };
1033
+
983
1034
  var global = tinymce.util.Tools.resolve('tinymce.util.VK');
984
1035
 
985
1036
  const appendClickRemove = (link, evt) => {
@@ -987,18 +1038,19 @@
987
1038
  link.dispatchEvent(evt);
988
1039
  document.body.removeChild(link);
989
1040
  };
990
- const open = url => {
1041
+ const openLink = url => {
991
1042
  const link = document.createElement('a');
992
1043
  link.target = '_blank';
993
1044
  link.href = url;
994
1045
  link.rel = 'noreferrer noopener';
995
- const evt = document.createEvent('MouseEvents');
996
- evt.initMouseEvent('click', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
1046
+ const evt = new MouseEvent('click', {
1047
+ bubbles: true,
1048
+ cancelable: true,
1049
+ view: window
1050
+ });
1051
+ document.dispatchEvent(evt);
997
1052
  appendClickRemove(link, evt);
998
1053
  };
999
-
1000
- const getLink = (editor, elm) => editor.dom.getParent(elm, 'a[href]');
1001
- const getSelectedLink = editor => getLink(editor, editor.selection.getStart());
1002
1054
  const hasOnlyAltModifier = e => {
1003
1055
  return e.altKey === true && e.shiftKey === false && e.ctrlKey === false && e.metaKey === false;
1004
1056
  };
@@ -1011,103 +1063,127 @@
1011
1063
  editor.selection.scrollIntoView(targetEl[0], true);
1012
1064
  }
1013
1065
  } else {
1014
- open(a.href);
1066
+ openLink(a.href);
1015
1067
  }
1016
1068
  }
1017
1069
  };
1018
- const openDialog = editor => () => {
1019
- editor.execCommand('mceLink', false, { dialog: true });
1020
- };
1021
- const gotoSelectedLink = editor => () => {
1022
- gotoLink(editor, getSelectedLink(editor));
1023
- };
1024
- const setupGotoLinks = editor => {
1070
+ const isSelectionOnImageWithEmbeddedLink = editor => {
1071
+ const rng = editor.selection.getRng();
1072
+ const node = rng.startContainer;
1073
+ return isLink(node) && rng.startContainer === rng.endContainer && editor.dom.select('img', node).length === 1;
1074
+ };
1075
+ const getLinkFromElement = (editor, element) => {
1076
+ const links = getLinks$1(editor.dom.getParents(element));
1077
+ return someIf(links.length === 1, links[0]);
1078
+ };
1079
+ const getLinkInSelection = editor => {
1080
+ const links = getLinksInSelection(editor.selection.getRng());
1081
+ return someIf(links.length > 0, links[0]).or(getLinkFromElement(editor, editor.selection.getNode()));
1082
+ };
1083
+ const getLinkFromSelection = editor => editor.selection.isCollapsed() || isSelectionOnImageWithEmbeddedLink(editor) ? getLinkFromElement(editor, editor.selection.getStart()) : getLinkInSelection(editor);
1084
+ const setup$1 = editor => {
1085
+ const selectedLink = value();
1086
+ const getSelectedLink = () => selectedLink.get().or(getLinkFromSelection(editor));
1087
+ const gotoSelectedLink = () => getSelectedLink().each(link => gotoLink(editor, link));
1088
+ editor.on('contextmenu', e => {
1089
+ getLinkFromElement(editor, e.target).each(selectedLink.set);
1090
+ });
1091
+ editor.on('SelectionChange', () => {
1092
+ if (!selectedLink.isSet()) {
1093
+ getLinkFromSelection(editor).each(selectedLink.set);
1094
+ }
1095
+ });
1025
1096
  editor.on('click', e => {
1026
- const link = getLink(editor, e.target);
1027
- if (link && global.metaKeyPressed(e)) {
1097
+ selectedLink.clear();
1098
+ const links = getLinks$1(editor.dom.getParents(e.target));
1099
+ if (links.length === 1 && global.metaKeyPressed(e)) {
1028
1100
  e.preventDefault();
1029
- gotoLink(editor, link);
1101
+ gotoLink(editor, links[0]);
1030
1102
  }
1031
1103
  });
1032
1104
  editor.on('keydown', e => {
1105
+ selectedLink.clear();
1033
1106
  if (!e.isDefaultPrevented() && e.keyCode === 13 && hasOnlyAltModifier(e)) {
1034
- const link = getSelectedLink(editor);
1035
- if (link) {
1107
+ getSelectedLink().each(link => {
1036
1108
  e.preventDefault();
1037
1109
  gotoLink(editor, link);
1038
- }
1110
+ });
1039
1111
  }
1040
1112
  });
1113
+ return { gotoSelectedLink };
1114
+ };
1115
+
1116
+ const openDialog = editor => () => {
1117
+ editor.execCommand('mceLink', false, { dialog: true });
1041
1118
  };
1042
1119
  const toggleState = (editor, toggler) => {
1043
1120
  editor.on('NodeChange', toggler);
1044
1121
  return () => editor.off('NodeChange', toggler);
1045
1122
  };
1046
- const toggleActiveState = editor => api => {
1047
- const updateState = () => api.setActive(!editor.mode.isReadOnly() && isInAnchor(editor, editor.selection.getNode()));
1123
+ const toggleLinkState = editor => api => {
1124
+ const updateState = () => {
1125
+ api.setActive(!editor.mode.isReadOnly() && isInAnchor(editor, editor.selection.getNode()));
1126
+ api.setEnabled(editor.selection.isEditable());
1127
+ };
1048
1128
  updateState();
1049
1129
  return toggleState(editor, updateState);
1050
1130
  };
1051
- const hasExactlyOneLinkInSelection = editor => {
1052
- const links = editor.selection.isCollapsed() ? getLinks$1(editor.dom.getParents(editor.selection.getStart())) : getLinksInSelection(editor.selection.getRng());
1053
- return links.length === 1;
1054
- };
1055
- const toggleEnabledState = editor => api => {
1056
- const updateState = () => api.setEnabled(hasExactlyOneLinkInSelection(editor));
1131
+ const toggleLinkMenuState = editor => api => {
1132
+ const updateState = () => {
1133
+ api.setEnabled(editor.selection.isEditable());
1134
+ };
1057
1135
  updateState();
1058
1136
  return toggleState(editor, updateState);
1059
1137
  };
1060
- const toggleUnlinkState = editor => api => {
1138
+ const toggleRequiresLinkState = editor => api => {
1061
1139
  const hasLinks$1 = parents => hasLinks(parents) || hasLinksInSelection(editor.selection.getRng());
1062
1140
  const parents = editor.dom.getParents(editor.selection.getStart());
1063
- api.setEnabled(hasLinks$1(parents));
1064
- return toggleState(editor, e => api.setEnabled(hasLinks$1(e.parents)));
1065
- };
1066
-
1067
- const setup = editor => {
1068
- editor.addShortcut('Meta+K', '', () => {
1069
- editor.execCommand('mceLink');
1070
- });
1141
+ const updateEnabled = parents => {
1142
+ api.setEnabled(hasLinks$1(parents) && editor.selection.isEditable());
1143
+ };
1144
+ updateEnabled(parents);
1145
+ return toggleState(editor, e => updateEnabled(e.parents));
1071
1146
  };
1072
-
1073
- const setupButtons = editor => {
1147
+ const setupButtons = (editor, openLink) => {
1074
1148
  editor.ui.registry.addToggleButton('link', {
1075
1149
  icon: 'link',
1076
1150
  tooltip: 'Insert/edit link',
1151
+ shortcut: 'Meta+K',
1077
1152
  onAction: openDialog(editor),
1078
- onSetup: toggleActiveState(editor)
1153
+ onSetup: toggleLinkState(editor)
1079
1154
  });
1080
1155
  editor.ui.registry.addButton('openlink', {
1081
1156
  icon: 'new-tab',
1082
1157
  tooltip: 'Open link',
1083
- onAction: gotoSelectedLink(editor),
1084
- onSetup: toggleEnabledState(editor)
1158
+ onAction: openLink.gotoSelectedLink,
1159
+ onSetup: toggleRequiresLinkState(editor)
1085
1160
  });
1086
1161
  editor.ui.registry.addButton('unlink', {
1087
1162
  icon: 'unlink',
1088
1163
  tooltip: 'Remove link',
1089
1164
  onAction: () => unlink(editor),
1090
- onSetup: toggleUnlinkState(editor)
1165
+ onSetup: toggleRequiresLinkState(editor)
1091
1166
  });
1092
1167
  };
1093
- const setupMenuItems = editor => {
1168
+ const setupMenuItems = (editor, openLink) => {
1094
1169
  editor.ui.registry.addMenuItem('openlink', {
1095
1170
  text: 'Open link',
1096
1171
  icon: 'new-tab',
1097
- onAction: gotoSelectedLink(editor),
1098
- onSetup: toggleEnabledState(editor)
1172
+ onAction: openLink.gotoSelectedLink,
1173
+ onSetup: toggleRequiresLinkState(editor)
1099
1174
  });
1100
1175
  editor.ui.registry.addMenuItem('link', {
1101
1176
  icon: 'link',
1102
1177
  text: 'Link...',
1103
1178
  shortcut: 'Meta+K',
1104
- onAction: openDialog(editor)
1179
+ onAction: openDialog(editor),
1180
+ onSetup: toggleLinkMenuState(editor)
1105
1181
  });
1106
1182
  editor.ui.registry.addMenuItem('unlink', {
1107
1183
  icon: 'unlink',
1108
1184
  text: 'Remove link',
1109
1185
  onAction: () => unlink(editor),
1110
- onSetup: toggleUnlinkState(editor)
1186
+ onSetup: toggleRequiresLinkState(editor)
1111
1187
  });
1112
1188
  };
1113
1189
  const setupContextMenu = editor => {
@@ -1123,7 +1199,7 @@
1123
1199
  }
1124
1200
  });
1125
1201
  };
1126
- const setupContextToolbars = editor => {
1202
+ const setupContextToolbars = (editor, openLink) => {
1127
1203
  const collapseSelectionToEnd = editor => {
1128
1204
  editor.selection.collapse(false);
1129
1205
  };
@@ -1147,7 +1223,7 @@
1147
1223
  type: 'contextformtogglebutton',
1148
1224
  icon: 'link',
1149
1225
  tooltip: 'Link',
1150
- onSetup: toggleActiveState(editor)
1226
+ onSetup: toggleLinkState(editor)
1151
1227
  },
1152
1228
  label: 'Link',
1153
1229
  predicate: node => hasContextToolbar(editor) && isInAnchor(editor, node),
@@ -1164,7 +1240,7 @@
1164
1240
  onSetup: buttonApi => {
1165
1241
  const node = editor.selection.getNode();
1166
1242
  buttonApi.setActive(isInAnchor(editor, node));
1167
- return toggleActiveState(editor)(buttonApi);
1243
+ return toggleLinkState(editor)(buttonApi);
1168
1244
  },
1169
1245
  onAction: formApi => {
1170
1246
  const value = formApi.getValue();
@@ -1178,7 +1254,7 @@
1178
1254
  text,
1179
1255
  title: Optional.none(),
1180
1256
  rel: Optional.none(),
1181
- target: Optional.none(),
1257
+ target: Optional.from(getDefaultLinkTarget(editor)),
1182
1258
  class: Optional.none()
1183
1259
  });
1184
1260
  collapseSelectionToEnd(editor);
@@ -1201,24 +1277,27 @@
1201
1277
  tooltip: 'Open link',
1202
1278
  onSetup: onSetupLink,
1203
1279
  onAction: formApi => {
1204
- gotoSelectedLink(editor)();
1280
+ openLink.gotoSelectedLink();
1205
1281
  formApi.hide();
1206
1282
  }
1207
1283
  }
1208
1284
  ]
1209
1285
  });
1210
1286
  };
1287
+ const setup = editor => {
1288
+ const openLink = setup$1(editor);
1289
+ setupButtons(editor, openLink);
1290
+ setupMenuItems(editor, openLink);
1291
+ setupContextMenu(editor);
1292
+ setupContextToolbars(editor, openLink);
1293
+ };
1211
1294
 
1212
1295
  var Plugin = () => {
1213
1296
  global$5.add('link', editor => {
1214
1297
  register$1(editor);
1215
- setupButtons(editor);
1216
- setupMenuItems(editor);
1217
- setupContextMenu(editor);
1218
- setupContextToolbars(editor);
1219
- setupGotoLinks(editor);
1220
1298
  register(editor);
1221
1299
  setup(editor);
1300
+ setup$2(editor);
1222
1301
  });
1223
1302
  };
1224
1303
 
@@ -1,4 +1,4 @@
1
1
  /**
2
- * TinyMCE version 6.4.2 (2023-04-26)
2
+ * TinyMCE version 7.3.0 (2024-08-07)
3
3
  */
4
- !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(n=o=e,(r=String).prototype.isPrototypeOf(n)||(null===(l=o.constructor)||void 0===l?void 0:l.name)===r.name)?"string":t;var n,o,r,l})(t)===e,n=e=>t=>typeof t===e,o=t("string"),r=t("object"),l=t("array"),a=(null,e=>null===e);const i=n("boolean"),s=e=>!(e=>null==e)(e),c=n("function"),u=(e,t)=>{if(l(e)){for(let n=0,o=e.length;n<o;++n)if(!t(e[n]))return!1;return!0}return!1},g=()=>{},d=(e,t)=>e===t;class m{constructor(e,t){this.tag=e,this.value=t}static some(e){return new m(!0,e)}static none(){return m.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?m.some(e(this.value)):m.none()}bind(e){return this.tag?e(this.value):m.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:m.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return s(e)?m.some(e):m.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}m.singletonNone=new m(!1);const h=Array.prototype.indexOf,f=Array.prototype.push,p=e=>{const t=[];for(let n=0,o=e.length;n<o;++n){if(!l(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);f.apply(t,e[n])}return t},k=(e,t)=>{for(let n=0;n<e.length;n++){const o=t(e[n],n);if(o.isSome())return o}return m.none()},v=(e,t,n=d)=>e.exists((e=>n(e,t))),y=e=>{const t=[],n=e=>{t.push(e)};for(let t=0;t<e.length;t++)e[t].each(n);return t},x=(e,t)=>e?m.some(t):m.none(),b=e=>t=>t.options.get(e),_=b("link_assume_external_targets"),w=b("link_context_toolbar"),C=b("link_list"),O=b("link_default_target"),N=b("link_default_protocol"),A=b("link_target_list"),S=b("link_rel_list"),T=b("link_class_list"),E=b("link_title"),R=b("allow_unsafe_link_target"),P=b("link_quicklink");var L=tinymce.util.Tools.resolve("tinymce.util.Tools");const M=e=>o(e.value)?e.value:"",D=(e,t)=>{const n=[];return L.each(e,(e=>{const r=(e=>o(e.text)?e.text:o(e.title)?e.title:"")(e);if(void 0!==e.menu){const o=D(e.menu,t);n.push({text:r,items:o})}else{const o=t(e);n.push({text:r,value:o})}})),n},B=(e=M)=>t=>m.from(t).map((t=>D(t,e))),I=e=>B(M)(e),j=B,K=(e,t)=>n=>({name:e,type:"listbox",label:t,items:n}),U=M,q=Object.keys,F=Object.hasOwnProperty,V=(e,t)=>F.call(e,t);var $=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),z=tinymce.util.Tools.resolve("tinymce.util.URI");const G=e=>s(e)&&"a"===e.nodeName.toLowerCase(),H=e=>G(e)&&!!Q(e),J=(e,t)=>{if(e.collapsed)return[];{const n=e.cloneContents(),o=n.firstChild,r=new $(o,n),l=[];let a=o;do{t(a)&&l.push(a)}while(a=r.next());return l}},W=e=>/^\w+:/i.test(e),Q=e=>{var t,n;return null!==(n=null!==(t=e.getAttribute("data-mce-href"))&&void 0!==t?t:e.getAttribute("href"))&&void 0!==n?n:""},X=(e,t)=>{const n=["noopener"],o=e?e.split(/\s+/):[],r=e=>e.filter((e=>-1===L.inArray(n,e))),l=t?(e=>(e=r(e)).length>0?e.concat(n):n)(o):r(o);return l.length>0?(e=>L.trim(e.sort().join(" ")))(l):""},Y=(e,t)=>(t=t||te(e.selection.getRng())[0]||e.selection.getNode(),le(t)?m.from(e.dom.select("a[href]",t)[0]):m.from(e.dom.getParent(t,"a[href]"))),Z=(e,t)=>Y(e,t).isSome(),ee=(e,t)=>t.fold((()=>e.getContent({format:"text"})),(e=>e.innerText||e.textContent||"")).replace(/\uFEFF/g,""),te=e=>J(e,H),ne=e=>L.grep(e,H),oe=e=>ne(e).length>0,re=e=>{const t=e.schema.getTextInlineElements();if(Y(e).exists((e=>e.hasAttribute("data-mce-block"))))return!1;const n=e.selection.getRng();return!!n.collapsed||0===J(n,(e=>1===e.nodeType&&!G(e)&&!V(t,e.nodeName.toLowerCase()))).length},le=e=>s(e)&&"FIGURE"===e.nodeName&&/\bimage\b/i.test(e.className),ae=(e,t,n)=>{const o=e.selection.getNode(),r=Y(e,o),l=((e,t)=>{const n={...t};if(0===S(e).length&&!R(e)){const e=X(n.rel,"_blank"===n.target);n.rel=e||null}return m.from(n.target).isNone()&&!1===A(e)&&(n.target=O(e)),n.href=((e,t)=>"http"!==t&&"https"!==t||W(e)?e:t+"://"+e)(n.href,_(e)),n})(e,(e=>{return t=["title","rel","class","target"],n=(t,n)=>(e[n].each((e=>{t[n]=e.length>0?e:null})),t),o={href:e.href},((e,t)=>{for(let n=0,o=e.length;n<o;n++)t(e[n],n)})(t,((e,t)=>{o=n(o,e)})),o;var t,n,o})(n));e.undoManager.transact((()=>{n.href===t.href&&t.attach(),r.fold((()=>{((e,t,n,o)=>{const r=e.dom;le(t)?ge(r,t,o):n.fold((()=>{e.execCommand("mceInsertLink",!1,o)}),(t=>{e.insertContent(r.createHTML("a",o,r.encode(t)))}))})(e,o,n.text,l)}),(t=>{e.focus(),((e,t,n,o)=>{n.each((e=>{V(t,"innerText")?t.innerText=e:t.textContent=e})),e.dom.setAttribs(t,o),e.selection.select(t)})(e,t,n.text,l)}))}))},ie=e=>{const{class:t,href:n,rel:o,target:r,text:l,title:i}=e;return((e,t)=>{const n={};var o;return((e,t,n,o)=>{((e,t)=>{const n=q(e);for(let o=0,r=n.length;o<r;o++){const r=n[o];t(e[r],r)}})(e,((e,r)=>{(t(e,r)?n:o)(e,r)}))})(e,((e,t)=>!1===a(e)),(o=n,(e,t)=>{o[t]=e}),g),n})({class:t.getOrNull(),href:n,rel:o.getOrNull(),target:r.getOrNull(),text:l.getOrNull(),title:i.getOrNull()})},se=(e,t,n)=>{const o=((e,t)=>{const n=e.options.get,o={allow_html_data_urls:n("allow_html_data_urls"),allow_script_urls:n("allow_script_urls"),allow_svg_data_urls:n("allow_svg_data_urls")},r=t.href;return{...t,href:z.isDomSafe(r,"a",o)?r:""}})(e,n);e.hasPlugin("rtc",!0)?e.execCommand("createlink",!1,ie(o)):ae(e,t,o)},ce=e=>{e.hasPlugin("rtc",!0)?e.execCommand("unlink"):(e=>{e.undoManager.transact((()=>{const t=e.selection.getNode();le(t)?ue(e,t):(e=>{const t=e.dom,n=e.selection,o=n.getBookmark(),r=n.getRng().cloneRange(),l=t.getParent(r.startContainer,"a[href]",e.getBody()),a=t.getParent(r.endContainer,"a[href]",e.getBody());l&&r.setStartBefore(l),a&&r.setEndAfter(a),n.setRng(r),e.execCommand("unlink"),n.moveToBookmark(o)})(e),e.focus()}))})(e)},ue=(e,t)=>{var n;const o=e.dom.select("img",t)[0];if(o){const r=e.dom.getParents(o,"a[href]",t)[0];r&&(null===(n=r.parentNode)||void 0===n||n.insertBefore(o,r),e.dom.remove(r))}},ge=(e,t,n)=>{var o;const r=e.select("img",t)[0];if(r){const t=e.create("a",n);null===(o=r.parentNode)||void 0===o||o.insertBefore(t,r),t.appendChild(r)}},de=(e,t)=>k(t,(t=>(e=>{return V(t=e,n="items")&&void 0!==t[n]&&null!==t[n];var t,n})(t)?de(e,t.items):x(t.value===e,t))),me=(e,t)=>{const n={text:e.text,title:e.title},o=(e,o)=>{const r=(l=t,a=o,"link"===a?l.link:"anchor"===a?l.anchor:m.none()).getOr([]);var l,a;return((e,t,n,o)=>{const r=o[t],l=e.length>0;return void 0!==r?de(r,n).map((t=>({url:{value:t.value,meta:{text:l?e:t.text,attach:g}},text:l?e:t.text}))):m.none()})(n.text,o,r,e)};return{onChange:(e,t)=>{const r=t.name;return"url"===r?(e=>{const t=(o=e.url,x(n.text.length<=0,m.from(null===(r=o.meta)||void 0===r?void 0:r.text).getOr(o.value)));var o,r;const l=(e=>{var t;return x(n.title.length<=0,m.from(null===(t=e.meta)||void 0===t?void 0:t.title).getOr(""))})(e.url);return t.isSome()||l.isSome()?m.some({...t.map((e=>({text:e}))).getOr({}),...l.map((e=>({title:e}))).getOr({})}):m.none()})(e()):((e,t)=>h.call(e,t))(["anchor","link"],r)>-1?o(e(),r):"text"===r||"title"===r?(n[r]=e()[r],m.none()):m.none()}}};var he=tinymce.util.Tools.resolve("tinymce.util.Delay");const fe=e=>{const t=e.href;return t.indexOf("@")>0&&-1===t.indexOf("/")&&-1===t.indexOf("mailto:")?m.some({message:"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",preprocess:e=>({...e,href:"mailto:"+t})}):m.none()},pe=(e,t)=>n=>{const o=n.href;return 1===e&&!W(o)||0===e&&/^\s*www(\.|\d\.)/i.test(o)?m.some({message:`The URL you entered seems to be an external link. Do you want to add the required ${t}:// prefix?`,preprocess:e=>({...e,href:t+"://"+o})}):m.none()},ke=e=>{const t=e.dom.select("a:not([href])"),n=p(((e,t)=>{const n=e.length,o=new Array(n);for(let r=0;r<n;r++){const n=e[r];o[r]=t(n,r)}return o})(t,(e=>{const t=e.name||e.id;return t?[{text:t,value:"#"+t}]:[]})));return n.length>0?m.some([{text:"None",value:""}].concat(n)):m.none()},ve=e=>{const t=T(e);return t.length>0?I(t):m.none()},ye=e=>{try{return m.some(JSON.parse(e))}catch(e){return m.none()}},xe=(e,t)=>{const n=S(e);if(n.length>0){const o=v(t,"_blank"),r=e=>X(U(e),o);return(!1===R(e)?j(r):I)(n)}return m.none()},be=[{text:"Current window",value:""},{text:"New window",value:"_blank"}],_e=e=>{const t=A(e);return l(t)?I(t).orThunk((()=>m.some(be))):!1===t?m.none():m.some(be)},we=(e,t,n)=>{const o=e.getAttrib(t,n);return null!==o&&o.length>0?m.some(o):m.none()},Ce=(e,t)=>(e=>{const t=t=>e.convertURL(t.value||t.url||"","href"),n=C(e);return new Promise((e=>{o(n)?fetch(n).then((e=>e.ok?e.text().then(ye):Promise.reject())).then(e,(()=>e(m.none()))):c(n)?n((t=>e(m.some(t)))):e(m.from(n))})).then((e=>e.bind(j(t)).map((e=>e.length>0?[{text:"None",value:""}].concat(e):e))))})(e).then((n=>{const o=((e,t)=>{const n=e.dom,o=re(e)?m.some(ee(e.selection,t)):m.none(),r=t.bind((e=>m.from(n.getAttrib(e,"href")))),l=t.bind((e=>m.from(n.getAttrib(e,"target")))),a=t.bind((e=>we(n,e,"rel"))),i=t.bind((e=>we(n,e,"class")));return{url:r,text:o,title:t.bind((e=>we(n,e,"title"))),target:l,rel:a,linkClass:i}})(e,t);return{anchor:o,catalogs:{targets:_e(e),rels:xe(e,o.target),classes:ve(e),anchor:ke(e),link:n},optNode:t,flags:{titleEnabled:E(e)}}})),Oe=e=>{const t=(e=>{const t=Y(e);return Ce(e,t)})(e);t.then((t=>{const n=((e,t)=>n=>{const o=n.getData();if(!o.url.value)return ce(e),void n.close();const r=e=>m.from(o[e]).filter((n=>!v(t.anchor[e],n))),l={href:o.url.value,text:r("text"),target:r("target"),rel:r("rel"),class:r("linkClass"),title:r("title")},a={href:o.url.value,attach:void 0!==o.url.meta&&o.url.meta.attach?o.url.meta.attach:g};((e,t)=>k([fe,pe(_(e),N(e))],(e=>e(t))).fold((()=>Promise.resolve(t)),(n=>new Promise((o=>{((e,t,n)=>{const o=e.selection.getRng();he.setEditorTimeout(e,(()=>{e.windowManager.confirm(t,(t=>{e.selection.setRng(o),n(t)}))}))})(e,n.message,(e=>{o(e?n.preprocess(t):t)}))})))))(e,l).then((t=>{se(e,a,t)})),n.close()})(e,t);return((e,t,n)=>{const o=e.anchor.text.map((()=>({name:"text",type:"input",label:"Text to display"}))).toArray(),r=e.flags.titleEnabled?[{name:"title",type:"input",label:"Title"}]:[],l=((e,t)=>{const n=e.anchor,o=n.url.getOr("");return{url:{value:o,meta:{original:{value:o}}},text:n.text.getOr(""),title:n.title.getOr(""),anchor:o,link:o,rel:n.rel.getOr(""),target:n.target.or(t).getOr(""),linkClass:n.linkClass.getOr("")}})(e,m.from(O(n))),a=e.catalogs,i=me(l,a);return{title:"Insert/Edit Link",size:"normal",body:{type:"panel",items:p([[{name:"url",type:"urlinput",filetype:"file",label:"URL"}],o,r,y([a.anchor.map(K("anchor","Anchors")),a.rels.map(K("rel","Rel")),a.targets.map(K("target","Open link in...")),a.link.map(K("link","Link list")),a.classes.map(K("linkClass","Class"))])])},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:l,onChange:(e,{name:t})=>{i.onChange(e.getData,{name:t}).each((t=>{e.setData(t)}))},onSubmit:t}})(t,n,e)})).then((t=>{e.windowManager.open(t)}))};var Ne=tinymce.util.Tools.resolve("tinymce.util.VK");const Ae=(e,t)=>e.dom.getParent(t,"a[href]"),Se=e=>Ae(e,e.selection.getStart()),Te=(e,t)=>{if(t){const n=Q(t);if(/^#/.test(n)){const t=e.dom.select(n);t.length&&e.selection.scrollIntoView(t[0],!0)}else(e=>{const t=document.createElement("a");t.target="_blank",t.href=e,t.rel="noreferrer noopener";const n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),((e,t)=>{document.body.appendChild(e),e.dispatchEvent(t),document.body.removeChild(e)})(t,n)})(t.href)}},Ee=e=>()=>{e.execCommand("mceLink",!1,{dialog:!0})},Re=e=>()=>{Te(e,Se(e))},Pe=(e,t)=>(e.on("NodeChange",t),()=>e.off("NodeChange",t)),Le=e=>t=>{const n=()=>t.setActive(!e.mode.isReadOnly()&&Z(e,e.selection.getNode()));return n(),Pe(e,n)},Me=e=>t=>{const n=()=>t.setEnabled((e=>1===(e.selection.isCollapsed()?ne(e.dom.getParents(e.selection.getStart())):te(e.selection.getRng())).length)(e));return n(),Pe(e,n)},De=e=>t=>{const n=t=>{return oe(t)||(n=e.selection.getRng(),te(n).length>0);var n},o=e.dom.getParents(e.selection.getStart());return t.setEnabled(n(o)),Pe(e,(e=>t.setEnabled(n(e.parents))))};e.add("link",(e=>{(e=>{const t=e.options.register;t("link_assume_external_targets",{processor:e=>{const t=o(e)||i(e);return t?!0===e?{value:1,valid:t}:"http"===e||"https"===e?{value:e,valid:t}:{value:0,valid:t}:{valid:!1,message:"Must be a string or a boolean."}},default:!1}),t("link_context_toolbar",{processor:"boolean",default:!1}),t("link_list",{processor:e=>o(e)||c(e)||u(e,r)}),t("link_default_target",{processor:"string"}),t("link_default_protocol",{processor:"string",default:"https"}),t("link_target_list",{processor:e=>i(e)||u(e,r),default:!0}),t("link_rel_list",{processor:"object[]",default:[]}),t("link_class_list",{processor:"object[]",default:[]}),t("link_title",{processor:"boolean",default:!0}),t("allow_unsafe_link_target",{processor:"boolean",default:!1}),t("link_quicklink",{processor:"boolean",default:!1})})(e),(e=>{e.ui.registry.addToggleButton("link",{icon:"link",tooltip:"Insert/edit link",onAction:Ee(e),onSetup:Le(e)}),e.ui.registry.addButton("openlink",{icon:"new-tab",tooltip:"Open link",onAction:Re(e),onSetup:Me(e)}),e.ui.registry.addButton("unlink",{icon:"unlink",tooltip:"Remove link",onAction:()=>ce(e),onSetup:De(e)})})(e),(e=>{e.ui.registry.addMenuItem("openlink",{text:"Open link",icon:"new-tab",onAction:Re(e),onSetup:Me(e)}),e.ui.registry.addMenuItem("link",{icon:"link",text:"Link...",shortcut:"Meta+K",onAction:Ee(e)}),e.ui.registry.addMenuItem("unlink",{icon:"unlink",text:"Remove link",onAction:()=>ce(e),onSetup:De(e)})})(e),(e=>{e.ui.registry.addContextMenu("link",{update:t=>e.dom.isEditable(t)?oe(e.dom.getParents(t,"a"))?"link unlink openlink":"link":""})})(e),(e=>{const t=t=>{const n=e.selection.getNode();return t.setEnabled(Z(e,n)),g};e.ui.registry.addContextForm("quicklink",{launch:{type:"contextformtogglebutton",icon:"link",tooltip:"Link",onSetup:Le(e)},label:"Link",predicate:t=>w(e)&&Z(e,t),initValue:()=>Y(e).fold((()=>""),Q),commands:[{type:"contextformtogglebutton",icon:"link",tooltip:"Link",primary:!0,onSetup:t=>{const n=e.selection.getNode();return t.setActive(Z(e,n)),Le(e)(t)},onAction:t=>{const n=t.getValue(),o=(t=>{const n=Y(e),o=re(e);if(n.isNone()&&o){const o=ee(e.selection,n);return x(0===o.length,t)}return m.none()})(n);se(e,{href:n,attach:g},{href:n,text:o,title:m.none(),rel:m.none(),target:m.none(),class:m.none()}),(e=>{e.selection.collapse(!1)})(e),t.hide()}},{type:"contextformbutton",icon:"unlink",tooltip:"Remove link",onSetup:t,onAction:t=>{ce(e),t.hide()}},{type:"contextformbutton",icon:"new-tab",tooltip:"Open link",onSetup:t,onAction:t=>{Re(e)(),t.hide()}}]})})(e),(e=>{e.on("click",(t=>{const n=Ae(e,t.target);n&&Ne.metaKeyPressed(t)&&(t.preventDefault(),Te(e,n))})),e.on("keydown",(t=>{if(!t.isDefaultPrevented()&&13===t.keyCode&&(e=>!0===e.altKey&&!1===e.shiftKey&&!1===e.ctrlKey&&!1===e.metaKey)(t)){const n=Se(e);n&&(t.preventDefault(),Te(e,n))}}))})(e),(e=>{e.addCommand("mceLink",((t,n)=>{!0!==(null==n?void 0:n.dialog)&&P(e)?e.dispatch("contexttoolbar-show",{toolbarKey:"quicklink"}):Oe(e)}))})(e),(e=>{e.addShortcut("Meta+K","",(()=>{e.execCommand("mceLink")}))})(e)}))}();
4
+ !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(n=o=e,(r=String).prototype.isPrototypeOf(n)||(null===(l=o.constructor)||void 0===l?void 0:l.name)===r.name)?"string":t;var n,o,r,l})(t)===e,n=e=>t=>typeof t===e,o=t("string"),r=t("object"),l=t("array"),s=(null,e=>null===e);const a=n("boolean"),i=e=>!(e=>null==e)(e),c=n("function"),u=(e,t)=>{if(l(e)){for(let n=0,o=e.length;n<o;++n)if(!t(e[n]))return!1;return!0}return!1},g=()=>{},d=(e,t)=>e===t;class m{constructor(e,t){this.tag=e,this.value=t}static some(e){return new m(!0,e)}static none(){return m.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?m.some(e(this.value)):m.none()}bind(e){return this.tag?e(this.value):m.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:m.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return i(e)?m.some(e):m.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}m.singletonNone=new m(!1);const h=Array.prototype.indexOf,p=Array.prototype.push,f=e=>{const t=[];for(let n=0,o=e.length;n<o;++n){if(!l(e[n]))throw new Error("Arr.flatten item "+n+" was not an array, input: "+e);p.apply(t,e[n])}return t},k=(e,t)=>{for(let n=0;n<e.length;n++){const o=t(e[n],n);if(o.isSome())return o}return m.none()},v=(e,t,n=d)=>e.exists((e=>n(e,t))),x=e=>{const t=[],n=e=>{t.push(e)};for(let t=0;t<e.length;t++)e[t].each(n);return t},y=(e,t)=>e?m.some(t):m.none(),b=e=>t=>t.options.get(e),_=b("link_assume_external_targets"),w=b("link_context_toolbar"),C=b("link_list"),O=b("link_default_target"),S=b("link_default_protocol"),N=b("link_target_list"),A=b("link_rel_list"),T=b("link_class_list"),E=b("link_title"),L=b("allow_unsafe_link_target"),R=b("link_quicklink"),P=Object.keys,M=Object.hasOwnProperty,D=(e,t)=>M.call(e,t);var B=tinymce.util.Tools.resolve("tinymce.util.URI"),I=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),K=tinymce.util.Tools.resolve("tinymce.util.Tools");const j=e=>i(e)&&"a"===e.nodeName.toLowerCase(),U=e=>j(e)&&!!V(e),q=(e,t)=>{if(e.collapsed)return[];{const n=e.cloneContents(),o=n.firstChild,r=new I(o,n),l=[];let s=o;do{t(s)&&l.push(s)}while(s=r.next());return l}},F=e=>/^\w+:/i.test(e),V=e=>{var t,n;return null!==(n=null!==(t=e.getAttribute("data-mce-href"))&&void 0!==t?t:e.getAttribute("href"))&&void 0!==n?n:""},$=(e,t)=>{const n=["noopener"],o=e?e.split(/\s+/):[],r=e=>e.filter((e=>-1===K.inArray(n,e))),l=t?(e=>(e=r(e)).length>0?e.concat(n):n)(o):r(o);return l.length>0?(e=>K.trim(e.sort().join(" ")))(l):""},z=(e,t)=>(t=t||J(e.selection.getRng())[0]||e.selection.getNode(),Y(t)?m.from(e.dom.select("a[href]",t)[0]):m.from(e.dom.getParent(t,"a[href]"))),G=(e,t)=>z(e,t).isSome(),H=(e,t)=>t.fold((()=>e.getContent({format:"text"})),(e=>e.innerText||e.textContent||"")).replace(/\uFEFF/g,""),J=e=>q(e,U),W=e=>K.grep(e,U),Q=e=>W(e).length>0,X=e=>{const t=e.schema.getTextInlineElements();if(z(e).exists((e=>e.hasAttribute("data-mce-block"))))return!1;const n=e.selection.getRng();return!!n.collapsed||0===q(n,(e=>1===e.nodeType&&!j(e)&&!D(t,e.nodeName.toLowerCase()))).length},Y=e=>i(e)&&"FIGURE"===e.nodeName&&/\bimage\b/i.test(e.className),Z=(e,t,n)=>{const o=e.selection.getNode(),r=z(e,o),l=((e,t)=>{const n={...t};if(0===A(e).length&&!L(e)){const e=$(n.rel,"_blank"===n.target);n.rel=e||null}return m.from(n.target).isNone()&&!1===N(e)&&(n.target=O(e)),n.href=((e,t)=>"http"!==t&&"https"!==t||F(e)?e:t+"://"+e)(n.href,_(e)),n})(e,(e=>{return t=["title","rel","class","target"],n=(t,n)=>(e[n].each((e=>{t[n]=e.length>0?e:null})),t),o={href:e.href},((e,t)=>{for(let n=0,o=e.length;n<o;n++)t(e[n],n)})(t,((e,t)=>{o=n(o,e)})),o;var t,n,o})(n));e.undoManager.transact((()=>{n.href===t.href&&t.attach(),r.fold((()=>{((e,t,n,o)=>{const r=e.dom;Y(t)?re(r,t,o):n.fold((()=>{e.execCommand("mceInsertLink",!1,o)}),(t=>{e.insertContent(r.createHTML("a",o,r.encode(t)))}))})(e,o,n.text,l)}),(t=>{e.focus(),((e,t,n,o)=>{n.each((e=>{D(t,"innerText")?t.innerText=e:t.textContent=e})),e.dom.setAttribs(t,o),e.selection.select(t)})(e,t,n.text,l)}))}))},ee=e=>{const{class:t,href:n,rel:o,target:r,text:l,title:a}=e;return((e,t)=>{const n={};var o;return((e,t,n,o)=>{((e,t)=>{const n=P(e);for(let o=0,r=n.length;o<r;o++){const r=n[o];t(e[r],r)}})(e,((e,r)=>{(t(e,r)?n:o)(e,r)}))})(e,((e,t)=>!1===s(e)),(o=n,(e,t)=>{o[t]=e}),g),n})({class:t.getOrNull(),href:n,rel:o.getOrNull(),target:r.getOrNull(),text:l.getOrNull(),title:a.getOrNull()})},te=(e,t,n)=>{const o=((e,t)=>{const n=e.options.get,o={allow_html_data_urls:n("allow_html_data_urls"),allow_script_urls:n("allow_script_urls"),allow_svg_data_urls:n("allow_svg_data_urls")},r=t.href;return{...t,href:B.isDomSafe(r,"a",o)?r:""}})(e,n);e.hasPlugin("rtc",!0)?e.execCommand("createlink",!1,ee(o)):Z(e,t,o)},ne=e=>{e.hasPlugin("rtc",!0)?e.execCommand("unlink"):(e=>{e.undoManager.transact((()=>{const t=e.selection.getNode();Y(t)?oe(e,t):(e=>{const t=e.dom,n=e.selection,o=n.getBookmark(),r=n.getRng().cloneRange(),l=t.getParent(r.startContainer,"a[href]",e.getBody()),s=t.getParent(r.endContainer,"a[href]",e.getBody());l&&r.setStartBefore(l),s&&r.setEndAfter(s),n.setRng(r),e.execCommand("unlink"),n.moveToBookmark(o)})(e),e.focus()}))})(e)},oe=(e,t)=>{var n;const o=e.dom.select("img",t)[0];if(o){const r=e.dom.getParents(o,"a[href]",t)[0];r&&(null===(n=r.parentNode)||void 0===n||n.insertBefore(o,r),e.dom.remove(r))}},re=(e,t,n)=>{var o;const r=e.select("img",t)[0];if(r){const t=e.create("a",n);null===(o=r.parentNode)||void 0===o||o.insertBefore(t,r),t.appendChild(r)}},le=e=>o(e.value)?e.value:"",se=(e,t)=>{const n=[];return K.each(e,(e=>{const r=(e=>o(e.text)?e.text:o(e.title)?e.title:"")(e);if(void 0!==e.menu){const o=se(e.menu,t);n.push({text:r,items:o})}else{const o=t(e);n.push({text:r,value:o})}})),n},ae=(e=le)=>t=>m.from(t).map((t=>se(t,e))),ie=e=>ae(le)(e),ce=ae,ue=(e,t)=>n=>({name:e,type:"listbox",label:t,items:n}),ge=le,de=(e,t)=>k(t,(t=>(e=>{return D(t=e,n="items")&&void 0!==t[n]&&null!==t[n];var t,n})(t)?de(e,t.items):y(t.value===e,t))),me=(e,t)=>{const n={text:e.text,title:e.title},o=(e,o)=>{const r=(l=t,s=o,"link"===s?l.link:"anchor"===s?l.anchor:m.none()).getOr([]);var l,s;return((e,t,n,o)=>{const r=o[t],l=e.length>0;return void 0!==r?de(r,n).map((t=>({url:{value:t.value,meta:{text:l?e:t.text,attach:g}},text:l?e:t.text}))):m.none()})(n.text,o,r,e)};return{onChange:(e,t)=>{const r=t.name;return"url"===r?(e=>{const t=(o=e.url,y(n.text.length<=0,m.from(null===(r=o.meta)||void 0===r?void 0:r.text).getOr(o.value)));var o,r;const l=(e=>{var t;return y(n.title.length<=0,m.from(null===(t=e.meta)||void 0===t?void 0:t.title).getOr(""))})(e.url);return t.isSome()||l.isSome()?m.some({...t.map((e=>({text:e}))).getOr({}),...l.map((e=>({title:e}))).getOr({})}):m.none()})(e()):((e,t)=>h.call(e,t))(["anchor","link"],r)>-1?o(e(),r):"text"===r||"title"===r?(n[r]=e()[r],m.none()):m.none()}}};var he=tinymce.util.Tools.resolve("tinymce.util.Delay");const pe=e=>{const t=e.href;return t.indexOf("@")>0&&-1===t.indexOf("/")&&-1===t.indexOf("mailto:")?m.some({message:"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",preprocess:e=>({...e,href:"mailto:"+t})}):m.none()},fe=(e,t)=>n=>{const o=n.href;return 1===e&&!F(o)||0===e&&/^\s*www(\.|\d\.)/i.test(o)?m.some({message:`The URL you entered seems to be an external link. Do you want to add the required ${t}:// prefix?`,preprocess:e=>({...e,href:t+"://"+o})}):m.none()},ke=e=>{const t=e.dom.select("a:not([href])"),n=f(((e,t)=>{const n=e.length,o=new Array(n);for(let r=0;r<n;r++){const n=e[r];o[r]=t(n,r)}return o})(t,(e=>{const t=e.name||e.id;return t?[{text:t,value:"#"+t}]:[]})));return n.length>0?m.some([{text:"None",value:""}].concat(n)):m.none()},ve=e=>{const t=T(e);return t.length>0?ie(t):m.none()},xe=e=>{try{return m.some(JSON.parse(e))}catch(e){return m.none()}},ye=(e,t)=>{const n=A(e);if(n.length>0){const o=v(t,"_blank"),r=e=>$(ge(e),o);return(!1===L(e)?ce(r):ie)(n)}return m.none()},be=[{text:"Current window",value:""},{text:"New window",value:"_blank"}],_e=e=>{const t=N(e);return l(t)?ie(t).orThunk((()=>m.some(be))):!1===t?m.none():m.some(be)},we=(e,t,n)=>{const o=e.getAttrib(t,n);return null!==o&&o.length>0?m.some(o):m.none()},Ce=(e,t)=>(e=>{const t=t=>e.convertURL(t.value||t.url||"","href"),n=C(e);return new Promise((e=>{o(n)?fetch(n).then((e=>e.ok?e.text().then(xe):Promise.reject())).then(e,(()=>e(m.none()))):c(n)?n((t=>e(m.some(t)))):e(m.from(n))})).then((e=>e.bind(ce(t)).map((e=>e.length>0?[{text:"None",value:""}].concat(e):e))))})(e).then((n=>{const o=((e,t)=>{const n=e.dom,o=X(e)?m.some(H(e.selection,t)):m.none(),r=t.bind((e=>m.from(n.getAttrib(e,"href")))),l=t.bind((e=>m.from(n.getAttrib(e,"target")))),s=t.bind((e=>we(n,e,"rel"))),a=t.bind((e=>we(n,e,"class")));return{url:r,text:o,title:t.bind((e=>we(n,e,"title"))),target:l,rel:s,linkClass:a}})(e,t);return{anchor:o,catalogs:{targets:_e(e),rels:ye(e,o.target),classes:ve(e),anchor:ke(e),link:n},optNode:t,flags:{titleEnabled:E(e)}}})),Oe=e=>{const t=(e=>{const t=z(e);return Ce(e,t)})(e);t.then((t=>{const n=((e,t)=>n=>{const o=n.getData();if(!o.url.value)return ne(e),void n.close();const r=e=>m.from(o[e]).filter((n=>!v(t.anchor[e],n))),l={href:o.url.value,text:r("text"),target:r("target"),rel:r("rel"),class:r("linkClass"),title:r("title")},s={href:o.url.value,attach:void 0!==o.url.meta&&o.url.meta.attach?o.url.meta.attach:g};((e,t)=>k([pe,fe(_(e),S(e))],(e=>e(t))).fold((()=>Promise.resolve(t)),(n=>new Promise((o=>{((e,t,n)=>{const o=e.selection.getRng();he.setEditorTimeout(e,(()=>{e.windowManager.confirm(t,(t=>{e.selection.setRng(o),n(t)}))}))})(e,n.message,(e=>{o(e?n.preprocess(t):t)}))})))))(e,l).then((t=>{te(e,s,t)})),n.close()})(e,t);return((e,t,n)=>{const o=e.anchor.text.map((()=>({name:"text",type:"input",label:"Text to display"}))).toArray(),r=e.flags.titleEnabled?[{name:"title",type:"input",label:"Title"}]:[],l=((e,t)=>{const n=e.anchor,o=n.url.getOr("");return{url:{value:o,meta:{original:{value:o}}},text:n.text.getOr(""),title:n.title.getOr(""),anchor:o,link:o,rel:n.rel.getOr(""),target:n.target.or(t).getOr(""),linkClass:n.linkClass.getOr("")}})(e,m.from(O(n))),s=e.catalogs,a=me(l,s);return{title:"Insert/Edit Link",size:"normal",body:{type:"panel",items:f([[{name:"url",type:"urlinput",filetype:"file",label:"URL",picker_text:"Browse links"}],o,r,x([s.anchor.map(ue("anchor","Anchors")),s.rels.map(ue("rel","Rel")),s.targets.map(ue("target","Open link in...")),s.link.map(ue("link","Link list")),s.classes.map(ue("linkClass","Class"))])])},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:l,onChange:(e,{name:t})=>{a.onChange(e.getData,{name:t}).each((t=>{e.setData(t)}))},onSubmit:t}})(t,n,e)})).then((t=>{e.windowManager.open(t)}))};var Se=tinymce.util.Tools.resolve("tinymce.util.VK");const Ne=(e,t)=>{if(t){const n=V(t);if(/^#/.test(n)){const t=e.dom.select(n);t.length&&e.selection.scrollIntoView(t[0],!0)}else(e=>{const t=document.createElement("a");t.target="_blank",t.href=e,t.rel="noreferrer noopener";const n=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});document.dispatchEvent(n),((e,t)=>{document.body.appendChild(e),e.dispatchEvent(t),document.body.removeChild(e)})(t,n)})(t.href)}},Ae=(e,t)=>{const n=W(e.dom.getParents(t));return y(1===n.length,n[0])},Te=e=>e.selection.isCollapsed()||(e=>{const t=e.selection.getRng(),n=t.startContainer;return U(n)&&t.startContainer===t.endContainer&&1===e.dom.select("img",n).length})(e)?Ae(e,e.selection.getStart()):(e=>{const t=J(e.selection.getRng());return y(t.length>0,t[0]).or(Ae(e,e.selection.getNode()))})(e),Ee=e=>()=>{e.execCommand("mceLink",!1,{dialog:!0})},Le=(e,t)=>(e.on("NodeChange",t),()=>e.off("NodeChange",t)),Re=e=>t=>{const n=()=>{t.setActive(!e.mode.isReadOnly()&&G(e,e.selection.getNode())),t.setEnabled(e.selection.isEditable())};return n(),Le(e,n)},Pe=e=>t=>{const n=()=>{t.setEnabled(e.selection.isEditable())};return n(),Le(e,n)},Me=e=>t=>{const n=e.dom.getParents(e.selection.getStart()),o=n=>{t.setEnabled((t=>{return Q(t)||(n=e.selection.getRng(),J(n).length>0);var n})(n)&&e.selection.isEditable())};return o(n),Le(e,(e=>o(e.parents)))},De=e=>{const t=(e=>{const t=(()=>{const e=(e=>{const t=(e=>{let t=e;return{get:()=>t,set:e=>{t=e}}})(m.none()),n=()=>t.get().each(e);return{clear:()=>{n(),t.set(m.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:e=>{n(),t.set(m.some(e))}}})(g);return{...e,on:t=>e.get().each(t)}})(),n=()=>t.get().or(Te(e));return e.on("contextmenu",(n=>{Ae(e,n.target).each(t.set)})),e.on("SelectionChange",(()=>{t.isSet()||Te(e).each(t.set)})),e.on("click",(n=>{t.clear();const o=W(e.dom.getParents(n.target));1===o.length&&Se.metaKeyPressed(n)&&(n.preventDefault(),Ne(e,o[0]))})),e.on("keydown",(o=>{t.clear(),!o.isDefaultPrevented()&&13===o.keyCode&&(e=>!0===e.altKey&&!1===e.shiftKey&&!1===e.ctrlKey&&!1===e.metaKey)(o)&&n().each((t=>{o.preventDefault(),Ne(e,t)}))})),{gotoSelectedLink:()=>n().each((t=>Ne(e,t)))}})(e);((e,t)=>{e.ui.registry.addToggleButton("link",{icon:"link",tooltip:"Insert/edit link",shortcut:"Meta+K",onAction:Ee(e),onSetup:Re(e)}),e.ui.registry.addButton("openlink",{icon:"new-tab",tooltip:"Open link",onAction:t.gotoSelectedLink,onSetup:Me(e)}),e.ui.registry.addButton("unlink",{icon:"unlink",tooltip:"Remove link",onAction:()=>ne(e),onSetup:Me(e)})})(e,t),((e,t)=>{e.ui.registry.addMenuItem("openlink",{text:"Open link",icon:"new-tab",onAction:t.gotoSelectedLink,onSetup:Me(e)}),e.ui.registry.addMenuItem("link",{icon:"link",text:"Link...",shortcut:"Meta+K",onAction:Ee(e),onSetup:Pe(e)}),e.ui.registry.addMenuItem("unlink",{icon:"unlink",text:"Remove link",onAction:()=>ne(e),onSetup:Me(e)})})(e,t),(e=>{e.ui.registry.addContextMenu("link",{update:t=>e.dom.isEditable(t)?Q(e.dom.getParents(t,"a"))?"link unlink openlink":"link":""})})(e),((e,t)=>{const n=t=>{const n=e.selection.getNode();return t.setEnabled(G(e,n)),g};e.ui.registry.addContextForm("quicklink",{launch:{type:"contextformtogglebutton",icon:"link",tooltip:"Link",onSetup:Re(e)},label:"Link",predicate:t=>w(e)&&G(e,t),initValue:()=>z(e).fold((()=>""),V),commands:[{type:"contextformtogglebutton",icon:"link",tooltip:"Link",primary:!0,onSetup:t=>{const n=e.selection.getNode();return t.setActive(G(e,n)),Re(e)(t)},onAction:t=>{const n=t.getValue(),o=(t=>{const n=z(e),o=X(e);if(n.isNone()&&o){const o=H(e.selection,n);return y(0===o.length,t)}return m.none()})(n);te(e,{href:n,attach:g},{href:n,text:o,title:m.none(),rel:m.none(),target:m.from(O(e)),class:m.none()}),(e=>{e.selection.collapse(!1)})(e),t.hide()}},{type:"contextformbutton",icon:"unlink",tooltip:"Remove link",onSetup:n,onAction:t=>{ne(e),t.hide()}},{type:"contextformbutton",icon:"new-tab",tooltip:"Open link",onSetup:n,onAction:e=>{t.gotoSelectedLink(),e.hide()}}]})})(e,t)};e.add("link",(e=>{(e=>{const t=e.options.register;t("link_assume_external_targets",{processor:e=>{const t=o(e)||a(e);return t?!0===e?{value:1,valid:t}:"http"===e||"https"===e?{value:e,valid:t}:{value:0,valid:t}:{valid:!1,message:"Must be a string or a boolean."}},default:!1}),t("link_context_toolbar",{processor:"boolean",default:!1}),t("link_list",{processor:e=>o(e)||c(e)||u(e,r)}),t("link_default_target",{processor:"string"}),t("link_default_protocol",{processor:"string",default:"https"}),t("link_target_list",{processor:e=>a(e)||u(e,r),default:!0}),t("link_rel_list",{processor:"object[]",default:[]}),t("link_class_list",{processor:"object[]",default:[]}),t("link_title",{processor:"boolean",default:!0}),t("allow_unsafe_link_target",{processor:"boolean",default:!1}),t("link_quicklink",{processor:"boolean",default:!1})})(e),(e=>{e.addCommand("mceLink",((t,n)=>{!0!==(null==n?void 0:n.dialog)&&R(e)?e.dispatch("contexttoolbar-show",{toolbarKey:"quicklink"}):Oe(e)}))})(e),De(e),(e=>{e.addShortcut("Meta+K","",(()=>{e.execCommand("mceLink")}))})(e)}))}();