@sapui5/sap.ui.richtexteditor 1.96.41 → 1.96.42

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 (357) hide show
  1. package/package.json +1 -1
  2. package/src/sap/ui/richtexteditor/.library +1 -1
  3. package/src/sap/ui/richtexteditor/RTESplitButton.js +1 -1
  4. package/src/sap/ui/richtexteditor/RichTextEditor.js +52 -26
  5. package/src/sap/ui/richtexteditor/ToolbarWrapper.js +1 -1
  6. package/src/sap/ui/richtexteditor/js/tiny_mce7/icons/default/icons.js +234 -0
  7. package/src/sap/ui/richtexteditor/js/tiny_mce7/icons/default/icons.min.js +7 -0
  8. package/src/sap/ui/richtexteditor/js/tiny_mce7/icons/default/index.js +13 -0
  9. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/ar.js +7 -0
  10. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/bg_BG.js +7 -0
  11. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/ca.js +7 -0
  12. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/cs.js +7 -0
  13. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/cy.js +1 -0
  14. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/da.js +7 -0
  15. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/de.js +7 -0
  16. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/el.js +7 -0
  17. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/en_GB.js +261 -0
  18. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/es.js +7 -0
  19. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/es_MX.js +1 -0
  20. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/eu.js +7 -0
  21. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/fa.js +7 -0
  22. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/fi.js +7 -0
  23. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/fr_FR.js +7 -0
  24. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/he_IL.js +7 -0
  25. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/hi.js +7 -0
  26. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/hr.js +7 -0
  27. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/hu_HU.js +7 -0
  28. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/id.js +7 -0
  29. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/it.js +7 -0
  30. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/ja.js +7 -0
  31. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/kk.js +7 -0
  32. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/ko_KR.js +7 -0
  33. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/lt.js +1 -0
  34. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/lv.js +1 -0
  35. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/ms.js +7 -0
  36. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/nb_NO.js +7 -0
  37. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/nl.js +7 -0
  38. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/pl.js +7 -0
  39. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/pt_BR.js +7 -0
  40. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/pt_PT.js +7 -0
  41. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/ro.js +7 -0
  42. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/ru.js +7 -0
  43. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/sk.js +7 -0
  44. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/sl_SI.js +7 -0
  45. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/sr.js +1 -0
  46. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/sv_SE.js +7 -0
  47. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/th_TH.js +7 -0
  48. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/tr.js +7 -0
  49. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/uk.js +7 -0
  50. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/vi.js +7 -0
  51. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/zh_CN.js +7 -0
  52. package/src/sap/ui/richtexteditor/js/tiny_mce7/langs/zh_TW.js +7 -0
  53. package/src/sap/ui/richtexteditor/js/tiny_mce7/license.txt +5 -0
  54. package/src/sap/ui/richtexteditor/js/tiny_mce7/models/dom/index.js +13 -0
  55. package/src/sap/ui/richtexteditor/js/tiny_mce7/models/dom/model.js +8147 -0
  56. package/src/sap/ui/richtexteditor/js/tiny_mce7/models/dom/model.min.js +9 -0
  57. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/accordion/index.js +13 -0
  58. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/accordion/plugin.js +1062 -0
  59. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/accordion/plugin.min.js +9 -0
  60. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/CHANGELOG.md +45 -0
  61. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/codemirror.min.js +13 -0
  62. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/customeditor.js +10 -0
  63. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/customeditor.min.js +10 -0
  64. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/index.js +3 -0
  65. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/ar.js +35 -0
  66. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/bg_BG.js +35 -0
  67. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/ca.js +35 -0
  68. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/cs.js +35 -0
  69. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/da.js +35 -0
  70. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/de.js +35 -0
  71. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/el.js +35 -0
  72. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/es.js +35 -0
  73. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/eu.js +35 -0
  74. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/fa.js +35 -0
  75. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/fi.js +35 -0
  76. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/fr_FR.js +35 -0
  77. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/he_IL.js +35 -0
  78. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/hi.js +35 -0
  79. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/hr.js +35 -0
  80. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/hu_HU.js +35 -0
  81. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/id.js +35 -0
  82. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/it.js +35 -0
  83. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/ja.js +35 -0
  84. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/kk.js +35 -0
  85. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/ko_KR.js +35 -0
  86. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/ms.js +35 -0
  87. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/nb_NO.js +35 -0
  88. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/nl.js +35 -0
  89. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/pl.js +35 -0
  90. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/pt_BR.js +35 -0
  91. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/pt_PT.js +35 -0
  92. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/ro.js +35 -0
  93. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/ru.js +35 -0
  94. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/sk.js +35 -0
  95. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/sl_SI.js +35 -0
  96. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/sv_SE.js +35 -0
  97. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/th_TH.js +35 -0
  98. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/tr.js +35 -0
  99. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/uk.js +35 -0
  100. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/vi.js +35 -0
  101. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/zh_CN.js +35 -0
  102. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/langs/zh_TW.js +35 -0
  103. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/license.txt +5 -0
  104. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/plugin.js +10 -0
  105. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/plugin.min.js +10 -0
  106. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/readme.txt +10 -0
  107. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advcode/version.txt +1 -0
  108. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advlist/index.js +13 -0
  109. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advlist/plugin.js +298 -0
  110. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/advlist/plugin.min.js +9 -0
  111. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/anchor/index.js +13 -0
  112. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/anchor/plugin.js +219 -0
  113. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/anchor/plugin.min.js +9 -0
  114. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/autolink/index.js +13 -0
  115. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/autolink/plugin.js +233 -0
  116. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/autolink/plugin.min.js +9 -0
  117. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/autoresize/index.js +13 -0
  118. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/autoresize/plugin.js +184 -0
  119. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/autoresize/plugin.min.js +9 -0
  120. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/autosave/index.js +13 -0
  121. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/autosave/plugin.js +239 -0
  122. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/autosave/plugin.min.js +9 -0
  123. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/charmap/index.js +13 -0
  124. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/charmap/plugin.js +1663 -0
  125. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/charmap/plugin.min.js +9 -0
  126. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/code/index.js +13 -0
  127. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/code/plugin.js +90 -0
  128. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/code/plugin.min.js +9 -0
  129. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/codesample/index.js +13 -0
  130. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/codesample/plugin.js +2468 -0
  131. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/codesample/plugin.min.js +9 -0
  132. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/directionality/index.js +13 -0
  133. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/directionality/plugin.js +395 -0
  134. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/directionality/plugin.min.js +9 -0
  135. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/emoticons/index.js +13 -0
  136. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/emoticons/js/emojiimages.js +7 -0
  137. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/emoticons/js/emojiimages.min.js +9 -0
  138. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/emoticons/js/emojis.js +7 -0
  139. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/emoticons/js/emojis.min.js +8 -0
  140. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/emoticons/plugin.js +601 -0
  141. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/emoticons/plugin.min.js +9 -0
  142. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/fullscreen/index.js +13 -0
  143. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/fullscreen/plugin.js +1266 -0
  144. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/fullscreen/plugin.min.js +9 -0
  145. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/index.js +13 -0
  146. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/ar.js +99 -0
  147. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/bg_BG.js +99 -0
  148. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/ca.js +99 -0
  149. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/cs.js +99 -0
  150. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/da.js +99 -0
  151. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/de.js +99 -0
  152. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/el.js +99 -0
  153. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/en.js +99 -0
  154. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/es.js +99 -0
  155. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/eu.js +99 -0
  156. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/fa.js +99 -0
  157. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/fi.js +99 -0
  158. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/fr_FR.js +99 -0
  159. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/he_IL.js +99 -0
  160. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/hi.js +99 -0
  161. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/hr.js +99 -0
  162. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/hu_HU.js +99 -0
  163. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/id.js +99 -0
  164. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/it.js +99 -0
  165. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/ja.js +99 -0
  166. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/kk.js +99 -0
  167. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/ko_KR.js +99 -0
  168. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/ms.js +99 -0
  169. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/nb_NO.js +99 -0
  170. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/nl.js +99 -0
  171. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/pl.js +99 -0
  172. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/pt_BR.js +99 -0
  173. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/pt_PT.js +99 -0
  174. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/ro.js +99 -0
  175. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/ru.js +99 -0
  176. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/sk.js +99 -0
  177. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/sl_SI.js +99 -0
  178. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/sv_SE.js +99 -0
  179. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/th_TH.js +99 -0
  180. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/tr.js +99 -0
  181. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/uk.js +99 -0
  182. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/vi.js +99 -0
  183. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/zh_CN.js +93 -0
  184. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/js/i18n/keynav/zh_TW.js +99 -0
  185. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/plugin.js +931 -0
  186. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/help/plugin.min.js +9 -0
  187. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/image/index.js +13 -0
  188. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/image/plugin.js +1513 -0
  189. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/image/plugin.min.js +9 -0
  190. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/importcss/index.js +13 -0
  191. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/importcss/plugin.js +350 -0
  192. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/importcss/plugin.min.js +9 -0
  193. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/insertdatetime/index.js +13 -0
  194. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/insertdatetime/plugin.js +192 -0
  195. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/insertdatetime/plugin.min.js +9 -0
  196. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/link/index.js +13 -0
  197. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/link/plugin.js +1337 -0
  198. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/link/plugin.min.js +9 -0
  199. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/lists/index.js +13 -0
  200. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/lists/plugin.js +2186 -0
  201. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/lists/plugin.min.js +9 -0
  202. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/media/index.js +13 -0
  203. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/media/plugin.js +1229 -0
  204. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/media/plugin.min.js +9 -0
  205. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/nonbreaking/index.js +13 -0
  206. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/nonbreaking/plugin.js +128 -0
  207. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/nonbreaking/plugin.min.js +9 -0
  208. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/pagebreak/index.js +13 -0
  209. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/pagebreak/plugin.js +122 -0
  210. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/pagebreak/plugin.min.js +9 -0
  211. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/CHANGELOG.md +20 -0
  212. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/index.js +2 -0
  213. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/js/wordimport.js +23102 -0
  214. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/ar.js +19 -0
  215. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/bg_BG.js +19 -0
  216. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/ca.js +19 -0
  217. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/cs.js +19 -0
  218. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/da.js +19 -0
  219. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/de.js +19 -0
  220. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/el.js +19 -0
  221. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/es.js +19 -0
  222. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/eu.js +19 -0
  223. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/fa.js +19 -0
  224. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/fi.js +19 -0
  225. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/fr_FR.js +19 -0
  226. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/he_IL.js +19 -0
  227. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/hi.js +19 -0
  228. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/hr.js +19 -0
  229. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/hu_HU.js +19 -0
  230. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/id.js +19 -0
  231. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/it.js +19 -0
  232. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/ja.js +19 -0
  233. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/kk.js +19 -0
  234. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/ko_KR.js +19 -0
  235. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/ms.js +19 -0
  236. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/nb_NO.js +19 -0
  237. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/nl.js +19 -0
  238. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/pl.js +19 -0
  239. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/pt_BR.js +19 -0
  240. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/pt_PT.js +19 -0
  241. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/ro.js +19 -0
  242. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/ru.js +19 -0
  243. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/sk.js +19 -0
  244. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/sl_SI.js +19 -0
  245. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/sv_SE.js +19 -0
  246. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/th_TH.js +19 -0
  247. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/tr.js +19 -0
  248. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/uk.js +19 -0
  249. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/vi.js +19 -0
  250. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/zh_CN.js +19 -0
  251. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/langs/zh_TW.js +19 -0
  252. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/license.txt +5 -0
  253. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/plugin.js +10 -0
  254. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/plugin.min.js +10 -0
  255. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/readme.txt +17 -0
  256. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/powerpaste/version.txt +1 -0
  257. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/preview/index.js +13 -0
  258. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/preview/plugin.js +598 -0
  259. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/preview/plugin.min.js +9 -0
  260. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/quickbars/index.js +13 -0
  261. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/quickbars/plugin.js +463 -0
  262. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/quickbars/plugin.min.js +9 -0
  263. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/save/index.js +13 -0
  264. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/save/plugin.js +124 -0
  265. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/save/plugin.min.js +9 -0
  266. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/searchreplace/index.js +13 -0
  267. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/searchreplace/plugin.js +1103 -0
  268. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/searchreplace/plugin.min.js +9 -0
  269. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/table/index.js +13 -0
  270. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/table/plugin.js +3466 -0
  271. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/table/plugin.min.js +9 -0
  272. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/visualblocks/index.js +13 -0
  273. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/visualblocks/plugin.js +105 -0
  274. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/visualblocks/plugin.min.js +9 -0
  275. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/visualchars/index.js +13 -0
  276. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/visualchars/plugin.js +567 -0
  277. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/visualchars/plugin.min.js +9 -0
  278. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/wordcount/index.js +13 -0
  279. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/wordcount/plugin.js +420 -0
  280. package/src/sap/ui/richtexteditor/js/tiny_mce7/plugins/wordcount/plugin.min.js +9 -0
  281. package/src/sap/ui/richtexteditor/js/tiny_mce7/readme.txt +12 -0
  282. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/dark/content.css +72 -0
  283. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/dark/content.js +7 -0
  284. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/dark/content.min.css +7 -0
  285. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/default/content.css +67 -0
  286. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/default/content.js +7 -0
  287. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/default/content.min.css +7 -0
  288. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/document/content.css +72 -0
  289. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/document/content.js +7 -0
  290. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/document/content.min.css +7 -0
  291. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/tinymce-5/content.css +67 -0
  292. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/tinymce-5/content.js +7 -0
  293. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/tinymce-5/content.min.css +7 -0
  294. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/tinymce-5-dark/content.css +72 -0
  295. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/tinymce-5-dark/content.js +7 -0
  296. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/tinymce-5-dark/content.min.css +7 -0
  297. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/writer/content.css +68 -0
  298. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/writer/content.js +7 -0
  299. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/content/writer/content.min.css +7 -0
  300. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/content.css +890 -0
  301. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/content.inline.css +884 -0
  302. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/content.inline.js +7 -0
  303. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/content.inline.min.css +7 -0
  304. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/content.js +7 -0
  305. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/content.min.css +7 -0
  306. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/skin.css +4766 -0
  307. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/skin.js +7 -0
  308. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/skin.min.css +7 -0
  309. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/skin.shadowdom.css +36 -0
  310. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/skin.shadowdom.js +7 -0
  311. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide/skin.shadowdom.min.css +7 -0
  312. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/content.css +878 -0
  313. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/content.inline.css +884 -0
  314. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/content.inline.js +7 -0
  315. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/content.inline.min.css +7 -0
  316. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/content.js +7 -0
  317. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/content.min.css +7 -0
  318. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/skin.css +4769 -0
  319. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/skin.js +7 -0
  320. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/skin.min.css +7 -0
  321. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/skin.shadowdom.css +36 -0
  322. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/skin.shadowdom.js +7 -0
  323. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/oxide-dark/skin.shadowdom.min.css +7 -0
  324. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/content.css +890 -0
  325. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/content.inline.css +884 -0
  326. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/content.inline.js +7 -0
  327. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/content.inline.min.css +7 -0
  328. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/content.js +7 -0
  329. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/content.min.css +7 -0
  330. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/skin.css +4880 -0
  331. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/skin.js +7 -0
  332. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/skin.min.css +7 -0
  333. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/skin.shadowdom.css +36 -0
  334. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/skin.shadowdom.js +7 -0
  335. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5/skin.shadowdom.min.css +7 -0
  336. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/content.css +878 -0
  337. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/content.inline.css +884 -0
  338. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/content.inline.js +7 -0
  339. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/content.inline.min.css +7 -0
  340. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/content.js +7 -0
  341. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/content.min.css +7 -0
  342. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/skin.css +4880 -0
  343. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/skin.js +7 -0
  344. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/skin.min.css +7 -0
  345. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/skin.shadowdom.css +36 -0
  346. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/skin.shadowdom.js +7 -0
  347. package/src/sap/ui/richtexteditor/js/tiny_mce7/skins/ui/tinymce-5-dark/skin.shadowdom.min.css +7 -0
  348. package/src/sap/ui/richtexteditor/js/tiny_mce7/themes/silver/index.js +13 -0
  349. package/src/sap/ui/richtexteditor/js/tiny_mce7/themes/silver/theme.js +31928 -0
  350. package/src/sap/ui/richtexteditor/js/tiny_mce7/themes/silver/theme.min.js +337 -0
  351. package/src/sap/ui/richtexteditor/js/tiny_mce7/tinymce.d.ts +3313 -0
  352. package/src/sap/ui/richtexteditor/js/tiny_mce7/tinymce.js +32267 -0
  353. package/src/sap/ui/richtexteditor/js/tiny_mce7/tinymce.min.js +336 -0
  354. package/src/sap/ui/richtexteditor/js/tiny_mce7/version.txt +1 -0
  355. package/src/sap/ui/richtexteditor/library.js +10 -4
  356. package/src/sap/ui/richtexteditor/messagebundle_da.properties +1 -1
  357. package/src/sap/ui/richtexteditor/messagebundle_id.properties +1 -1
@@ -0,0 +1,1337 @@
1
+ /*!
2
+ * TinyMCE
3
+ *
4
+ * Copyright (c) 2025 Ephox Corporation DBA Tiny Technologies, Inc.
5
+ * Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/
6
+ *
7
+ * Version: 7.7.2
8
+ */
9
+
10
+ (function () {
11
+ 'use strict';
12
+
13
+ var global$5 = tinymce.util.Tools.resolve('tinymce.PluginManager');
14
+
15
+ const hasProto = (v, constructor, predicate) => {
16
+ var _a;
17
+ if (predicate(v, constructor.prototype)) {
18
+ return true;
19
+ } else {
20
+ return ((_a = v.constructor) === null || _a === void 0 ? void 0 : _a.name) === constructor.name;
21
+ }
22
+ };
23
+ const typeOf = x => {
24
+ const t = typeof x;
25
+ if (x === null) {
26
+ return 'null';
27
+ } else if (t === 'object' && Array.isArray(x)) {
28
+ return 'array';
29
+ } else if (t === 'object' && hasProto(x, String, (o, proto) => proto.isPrototypeOf(o))) {
30
+ return 'string';
31
+ } else {
32
+ return t;
33
+ }
34
+ };
35
+ const isType = type => value => typeOf(value) === type;
36
+ const isSimpleType = type => value => typeof value === type;
37
+ const eq = t => a => t === a;
38
+ const isString = isType('string');
39
+ const isObject = isType('object');
40
+ const isArray = isType('array');
41
+ const isNull = eq(null);
42
+ const isBoolean = isSimpleType('boolean');
43
+ const isNullable = a => a === null || a === undefined;
44
+ const isNonNullable = a => !isNullable(a);
45
+ const isFunction = isSimpleType('function');
46
+ const isArrayOf = (value, pred) => {
47
+ if (isArray(value)) {
48
+ for (let i = 0, len = value.length; i < len; ++i) {
49
+ if (!pred(value[i])) {
50
+ return false;
51
+ }
52
+ }
53
+ return true;
54
+ }
55
+ return false;
56
+ };
57
+
58
+ const noop = () => {
59
+ };
60
+ const constant = value => {
61
+ return () => {
62
+ return value;
63
+ };
64
+ };
65
+ const tripleEquals = (a, b) => {
66
+ return a === b;
67
+ };
68
+
69
+ class Optional {
70
+ constructor(tag, value) {
71
+ this.tag = tag;
72
+ this.value = value;
73
+ }
74
+ static some(value) {
75
+ return new Optional(true, value);
76
+ }
77
+ static none() {
78
+ return Optional.singletonNone;
79
+ }
80
+ fold(onNone, onSome) {
81
+ if (this.tag) {
82
+ return onSome(this.value);
83
+ } else {
84
+ return onNone();
85
+ }
86
+ }
87
+ isSome() {
88
+ return this.tag;
89
+ }
90
+ isNone() {
91
+ return !this.tag;
92
+ }
93
+ map(mapper) {
94
+ if (this.tag) {
95
+ return Optional.some(mapper(this.value));
96
+ } else {
97
+ return Optional.none();
98
+ }
99
+ }
100
+ bind(binder) {
101
+ if (this.tag) {
102
+ return binder(this.value);
103
+ } else {
104
+ return Optional.none();
105
+ }
106
+ }
107
+ exists(predicate) {
108
+ return this.tag && predicate(this.value);
109
+ }
110
+ forall(predicate) {
111
+ return !this.tag || predicate(this.value);
112
+ }
113
+ filter(predicate) {
114
+ if (!this.tag || predicate(this.value)) {
115
+ return this;
116
+ } else {
117
+ return Optional.none();
118
+ }
119
+ }
120
+ getOr(replacement) {
121
+ return this.tag ? this.value : replacement;
122
+ }
123
+ or(replacement) {
124
+ return this.tag ? this : replacement;
125
+ }
126
+ getOrThunk(thunk) {
127
+ return this.tag ? this.value : thunk();
128
+ }
129
+ orThunk(thunk) {
130
+ return this.tag ? this : thunk();
131
+ }
132
+ getOrDie(message) {
133
+ if (!this.tag) {
134
+ throw new Error(message !== null && message !== void 0 ? message : 'Called getOrDie on None');
135
+ } else {
136
+ return this.value;
137
+ }
138
+ }
139
+ static from(value) {
140
+ return isNonNullable(value) ? Optional.some(value) : Optional.none();
141
+ }
142
+ getOrNull() {
143
+ return this.tag ? this.value : null;
144
+ }
145
+ getOrUndefined() {
146
+ return this.value;
147
+ }
148
+ each(worker) {
149
+ if (this.tag) {
150
+ worker(this.value);
151
+ }
152
+ }
153
+ toArray() {
154
+ return this.tag ? [this.value] : [];
155
+ }
156
+ toString() {
157
+ return this.tag ? `some(${ this.value })` : 'none()';
158
+ }
159
+ }
160
+ Optional.singletonNone = new Optional(false);
161
+
162
+ const nativeIndexOf = Array.prototype.indexOf;
163
+ const nativePush = Array.prototype.push;
164
+ const rawIndexOf = (ts, t) => nativeIndexOf.call(ts, t);
165
+ const contains = (xs, x) => rawIndexOf(xs, x) > -1;
166
+ const map = (xs, f) => {
167
+ const len = xs.length;
168
+ const r = new Array(len);
169
+ for (let i = 0; i < len; i++) {
170
+ const x = xs[i];
171
+ r[i] = f(x, i);
172
+ }
173
+ return r;
174
+ };
175
+ const each$1 = (xs, f) => {
176
+ for (let i = 0, len = xs.length; i < len; i++) {
177
+ const x = xs[i];
178
+ f(x, i);
179
+ }
180
+ };
181
+ const foldl = (xs, f, acc) => {
182
+ each$1(xs, (x, i) => {
183
+ acc = f(acc, x, i);
184
+ });
185
+ return acc;
186
+ };
187
+ const flatten = xs => {
188
+ const r = [];
189
+ for (let i = 0, len = xs.length; i < len; ++i) {
190
+ if (!isArray(xs[i])) {
191
+ throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs);
192
+ }
193
+ nativePush.apply(r, xs[i]);
194
+ }
195
+ return r;
196
+ };
197
+ const bind = (xs, f) => flatten(map(xs, f));
198
+ const findMap = (arr, f) => {
199
+ for (let i = 0; i < arr.length; i++) {
200
+ const r = f(arr[i], i);
201
+ if (r.isSome()) {
202
+ return r;
203
+ }
204
+ }
205
+ return Optional.none();
206
+ };
207
+
208
+ const is = (lhs, rhs, comparator = tripleEquals) => lhs.exists(left => comparator(left, rhs));
209
+ const cat = arr => {
210
+ const r = [];
211
+ const push = x => {
212
+ r.push(x);
213
+ };
214
+ for (let i = 0; i < arr.length; i++) {
215
+ arr[i].each(push);
216
+ }
217
+ return r;
218
+ };
219
+ const someIf = (b, a) => b ? Optional.some(a) : Optional.none();
220
+
221
+ const option = name => editor => editor.options.get(name);
222
+ const register$1 = editor => {
223
+ const registerOption = editor.options.register;
224
+ registerOption('link_assume_external_targets', {
225
+ processor: value => {
226
+ const valid = isString(value) || isBoolean(value);
227
+ if (valid) {
228
+ if (value === true) {
229
+ return {
230
+ value: 1,
231
+ valid
232
+ };
233
+ } else if (value === 'http' || value === 'https') {
234
+ return {
235
+ value,
236
+ valid
237
+ };
238
+ } else {
239
+ return {
240
+ value: 0,
241
+ valid
242
+ };
243
+ }
244
+ } else {
245
+ return {
246
+ valid: false,
247
+ message: 'Must be a string or a boolean.'
248
+ };
249
+ }
250
+ },
251
+ default: false
252
+ });
253
+ registerOption('link_context_toolbar', {
254
+ processor: 'boolean',
255
+ default: false
256
+ });
257
+ registerOption('link_list', { processor: value => isString(value) || isFunction(value) || isArrayOf(value, isObject) });
258
+ registerOption('link_default_target', { processor: 'string' });
259
+ registerOption('link_default_protocol', {
260
+ processor: 'string',
261
+ default: 'https'
262
+ });
263
+ registerOption('link_target_list', {
264
+ processor: value => isBoolean(value) || isArrayOf(value, isObject),
265
+ default: true
266
+ });
267
+ registerOption('link_rel_list', {
268
+ processor: 'object[]',
269
+ default: []
270
+ });
271
+ registerOption('link_class_list', {
272
+ processor: 'object[]',
273
+ default: []
274
+ });
275
+ registerOption('link_title', {
276
+ processor: 'boolean',
277
+ default: true
278
+ });
279
+ registerOption('allow_unsafe_link_target', {
280
+ processor: 'boolean',
281
+ default: false
282
+ });
283
+ registerOption('link_quicklink', {
284
+ processor: 'boolean',
285
+ default: false
286
+ });
287
+ registerOption('link_attributes_postprocess', { processor: 'function' });
288
+ };
289
+ const assumeExternalTargets = option('link_assume_external_targets');
290
+ const hasContextToolbar = option('link_context_toolbar');
291
+ const getLinkList = option('link_list');
292
+ const getDefaultLinkTarget = option('link_default_target');
293
+ const getDefaultLinkProtocol = option('link_default_protocol');
294
+ const getTargetList = option('link_target_list');
295
+ const getRelList = option('link_rel_list');
296
+ const getLinkClassList = option('link_class_list');
297
+ const shouldShowLinkTitle = option('link_title');
298
+ const allowUnsafeLinkTarget = option('allow_unsafe_link_target');
299
+ const useQuickLink = option('link_quicklink');
300
+ const attributesPostProcess = option('link_attributes_postprocess');
301
+
302
+ const keys = Object.keys;
303
+ const hasOwnProperty = Object.hasOwnProperty;
304
+ const each = (obj, f) => {
305
+ const props = keys(obj);
306
+ for (let k = 0, len = props.length; k < len; k++) {
307
+ const i = props[k];
308
+ const x = obj[i];
309
+ f(x, i);
310
+ }
311
+ };
312
+ const objAcc = r => (x, i) => {
313
+ r[i] = x;
314
+ };
315
+ const internalFilter = (obj, pred, onTrue, onFalse) => {
316
+ each(obj, (x, i) => {
317
+ (pred(x, i) ? onTrue : onFalse)(x, i);
318
+ });
319
+ };
320
+ const filter = (obj, pred) => {
321
+ const t = {};
322
+ internalFilter(obj, pred, objAcc(t), noop);
323
+ return t;
324
+ };
325
+ const has = (obj, key) => hasOwnProperty.call(obj, key);
326
+ const hasNonNullableKey = (obj, key) => has(obj, key) && obj[key] !== undefined && obj[key] !== null;
327
+
328
+ var global$4 = tinymce.util.Tools.resolve('tinymce.util.URI');
329
+
330
+ var global$3 = tinymce.util.Tools.resolve('tinymce.dom.TreeWalker');
331
+
332
+ var global$2 = tinymce.util.Tools.resolve('tinymce.util.Tools');
333
+
334
+ const isAnchor = elm => isNonNullable(elm) && elm.nodeName.toLowerCase() === 'a';
335
+ const isLink = elm => isAnchor(elm) && !!getHref(elm);
336
+ const collectNodesInRange = (rng, predicate) => {
337
+ if (rng.collapsed) {
338
+ return [];
339
+ } else {
340
+ const contents = rng.cloneContents();
341
+ const firstChild = contents.firstChild;
342
+ const walker = new global$3(firstChild, contents);
343
+ const elements = [];
344
+ let current = firstChild;
345
+ do {
346
+ if (predicate(current)) {
347
+ elements.push(current);
348
+ }
349
+ } while (current = walker.next());
350
+ return elements;
351
+ }
352
+ };
353
+ const hasProtocol = url => /^\w+:/i.test(url);
354
+ const getHref = elm => {
355
+ var _a, _b;
356
+ return (_b = (_a = elm.getAttribute('data-mce-href')) !== null && _a !== void 0 ? _a : elm.getAttribute('href')) !== null && _b !== void 0 ? _b : '';
357
+ };
358
+ const applyRelTargetRules = (rel, isUnsafe) => {
359
+ const rules = ['noopener'];
360
+ const rels = rel ? rel.split(/\s+/) : [];
361
+ const toString = rels => global$2.trim(rels.sort().join(' '));
362
+ const addTargetRules = rels => {
363
+ rels = removeTargetRules(rels);
364
+ return rels.length > 0 ? rels.concat(rules) : rules;
365
+ };
366
+ const removeTargetRules = rels => rels.filter(val => global$2.inArray(rules, val) === -1);
367
+ const newRels = isUnsafe ? addTargetRules(rels) : removeTargetRules(rels);
368
+ return newRels.length > 0 ? toString(newRels) : '';
369
+ };
370
+ const trimCaretContainers = text => text.replace(/\uFEFF/g, '');
371
+ const getAnchorElement = (editor, selectedElm) => {
372
+ selectedElm = selectedElm || getLinksInSelection(editor.selection.getRng())[0] || editor.selection.getNode();
373
+ if (isImageFigure(selectedElm)) {
374
+ return Optional.from(editor.dom.select('a[href]', selectedElm)[0]);
375
+ } else {
376
+ return Optional.from(editor.dom.getParent(selectedElm, 'a[href]'));
377
+ }
378
+ };
379
+ const isInAnchor = (editor, selectedElm) => getAnchorElement(editor, selectedElm).isSome();
380
+ const getAnchorText = (selection, anchorElm) => {
381
+ const text = anchorElm.fold(() => selection.getContent({ format: 'text' }), anchorElm => anchorElm.innerText || anchorElm.textContent || '');
382
+ return trimCaretContainers(text);
383
+ };
384
+ const getLinksInSelection = rng => collectNodesInRange(rng, isLink);
385
+ const getLinks$1 = elements => global$2.grep(elements, isLink);
386
+ const hasLinks = elements => getLinks$1(elements).length > 0;
387
+ const hasLinksInSelection = rng => getLinksInSelection(rng).length > 0;
388
+ const isOnlyTextSelected = editor => {
389
+ const inlineTextElements = editor.schema.getTextInlineElements();
390
+ const isElement = elm => elm.nodeType === 1 && !isAnchor(elm) && !has(inlineTextElements, elm.nodeName.toLowerCase());
391
+ const isInBlockAnchor = getAnchorElement(editor).exists(anchor => anchor.hasAttribute('data-mce-block'));
392
+ if (isInBlockAnchor) {
393
+ return false;
394
+ }
395
+ const rng = editor.selection.getRng();
396
+ if (!rng.collapsed) {
397
+ const elements = collectNodesInRange(rng, isElement);
398
+ return elements.length === 0;
399
+ } else {
400
+ return true;
401
+ }
402
+ };
403
+ const isImageFigure = elm => isNonNullable(elm) && elm.nodeName === 'FIGURE' && /\bimage\b/i.test(elm.className);
404
+
405
+ const getLinkAttrs = data => {
406
+ const attrs = [
407
+ 'title',
408
+ 'rel',
409
+ 'class',
410
+ 'target'
411
+ ];
412
+ return foldl(attrs, (acc, key) => {
413
+ data[key].each(value => {
414
+ acc[key] = value.length > 0 ? value : null;
415
+ });
416
+ return acc;
417
+ }, { href: data.href });
418
+ };
419
+ const handleExternalTargets = (href, assumeExternalTargets) => {
420
+ if ((assumeExternalTargets === 'http' || assumeExternalTargets === 'https') && !hasProtocol(href)) {
421
+ return assumeExternalTargets + '://' + href;
422
+ }
423
+ return href;
424
+ };
425
+ const applyLinkOverrides = (editor, linkAttrs) => {
426
+ const newLinkAttrs = { ...linkAttrs };
427
+ if (getRelList(editor).length === 0 && !allowUnsafeLinkTarget(editor)) {
428
+ const newRel = applyRelTargetRules(newLinkAttrs.rel, newLinkAttrs.target === '_blank');
429
+ newLinkAttrs.rel = newRel ? newRel : null;
430
+ }
431
+ if (Optional.from(newLinkAttrs.target).isNone() && getTargetList(editor) === false) {
432
+ newLinkAttrs.target = getDefaultLinkTarget(editor);
433
+ }
434
+ newLinkAttrs.href = handleExternalTargets(newLinkAttrs.href, assumeExternalTargets(editor));
435
+ return newLinkAttrs;
436
+ };
437
+ const updateLink = (editor, anchorElm, text, linkAttrs) => {
438
+ text.each(text => {
439
+ if (has(anchorElm, 'innerText')) {
440
+ anchorElm.innerText = text;
441
+ } else {
442
+ anchorElm.textContent = text;
443
+ }
444
+ });
445
+ editor.dom.setAttribs(anchorElm, linkAttrs);
446
+ const rng = editor.dom.createRng();
447
+ rng.setStartAfter(anchorElm);
448
+ rng.setEndAfter(anchorElm);
449
+ editor.selection.setRng(rng);
450
+ };
451
+ const createLink = (editor, selectedElm, text, linkAttrs) => {
452
+ const dom = editor.dom;
453
+ if (isImageFigure(selectedElm)) {
454
+ linkImageFigure(dom, selectedElm, linkAttrs);
455
+ } else {
456
+ text.fold(() => {
457
+ editor.execCommand('mceInsertLink', false, linkAttrs);
458
+ const end = editor.selection.getEnd();
459
+ const rng = dom.createRng();
460
+ rng.setStartAfter(end);
461
+ rng.setEndAfter(end);
462
+ editor.selection.setRng(rng);
463
+ }, text => {
464
+ editor.insertContent(dom.createHTML('a', linkAttrs, dom.encode(text)));
465
+ });
466
+ }
467
+ };
468
+ const linkDomMutation = (editor, attachState, data) => {
469
+ const selectedElm = editor.selection.getNode();
470
+ const anchorElm = getAnchorElement(editor, selectedElm);
471
+ const linkAttrs = applyLinkOverrides(editor, getLinkAttrs(data));
472
+ const attributesPostProcess$1 = attributesPostProcess(editor);
473
+ if (isNonNullable(attributesPostProcess$1)) {
474
+ attributesPostProcess$1(linkAttrs);
475
+ }
476
+ editor.undoManager.transact(() => {
477
+ if (data.href === attachState.href) {
478
+ attachState.attach();
479
+ }
480
+ anchorElm.fold(() => {
481
+ createLink(editor, selectedElm, data.text, linkAttrs);
482
+ }, elm => {
483
+ editor.focus();
484
+ updateLink(editor, elm, data.text, linkAttrs);
485
+ });
486
+ });
487
+ };
488
+ const unlinkSelection = editor => {
489
+ const dom = editor.dom, selection = editor.selection;
490
+ const bookmark = selection.getBookmark();
491
+ const rng = selection.getRng().cloneRange();
492
+ const startAnchorElm = dom.getParent(rng.startContainer, 'a[href]', editor.getBody());
493
+ const endAnchorElm = dom.getParent(rng.endContainer, 'a[href]', editor.getBody());
494
+ if (startAnchorElm) {
495
+ rng.setStartBefore(startAnchorElm);
496
+ }
497
+ if (endAnchorElm) {
498
+ rng.setEndAfter(endAnchorElm);
499
+ }
500
+ selection.setRng(rng);
501
+ editor.execCommand('unlink');
502
+ selection.moveToBookmark(bookmark);
503
+ };
504
+ const unlinkDomMutation = editor => {
505
+ editor.undoManager.transact(() => {
506
+ const node = editor.selection.getNode();
507
+ if (isImageFigure(node)) {
508
+ unlinkImageFigure(editor, node);
509
+ } else {
510
+ unlinkSelection(editor);
511
+ }
512
+ editor.focus();
513
+ });
514
+ };
515
+ const unwrapOptions = data => {
516
+ const {
517
+ class: cls,
518
+ href,
519
+ rel,
520
+ target,
521
+ text,
522
+ title
523
+ } = data;
524
+ return filter({
525
+ class: cls.getOrNull(),
526
+ href,
527
+ rel: rel.getOrNull(),
528
+ target: target.getOrNull(),
529
+ text: text.getOrNull(),
530
+ title: title.getOrNull()
531
+ }, (v, _k) => isNull(v) === false);
532
+ };
533
+ const sanitizeData = (editor, data) => {
534
+ const getOption = editor.options.get;
535
+ const uriOptions = {
536
+ allow_html_data_urls: getOption('allow_html_data_urls'),
537
+ allow_script_urls: getOption('allow_script_urls'),
538
+ allow_svg_data_urls: getOption('allow_svg_data_urls')
539
+ };
540
+ const href = data.href;
541
+ return {
542
+ ...data,
543
+ href: global$4.isDomSafe(href, 'a', uriOptions) ? href : ''
544
+ };
545
+ };
546
+ const link = (editor, attachState, data) => {
547
+ const sanitizedData = sanitizeData(editor, data);
548
+ editor.hasPlugin('rtc', true) ? editor.execCommand('createlink', false, unwrapOptions(sanitizedData)) : linkDomMutation(editor, attachState, sanitizedData);
549
+ };
550
+ const unlink = editor => {
551
+ editor.hasPlugin('rtc', true) ? editor.execCommand('unlink') : unlinkDomMutation(editor);
552
+ };
553
+ const unlinkImageFigure = (editor, fig) => {
554
+ var _a;
555
+ const img = editor.dom.select('img', fig)[0];
556
+ if (img) {
557
+ const a = editor.dom.getParents(img, 'a[href]', fig)[0];
558
+ if (a) {
559
+ (_a = a.parentNode) === null || _a === void 0 ? void 0 : _a.insertBefore(img, a);
560
+ editor.dom.remove(a);
561
+ }
562
+ }
563
+ };
564
+ const linkImageFigure = (dom, fig, attrs) => {
565
+ var _a;
566
+ const img = dom.select('img', fig)[0];
567
+ if (img) {
568
+ const a = dom.create('a', attrs);
569
+ (_a = img.parentNode) === null || _a === void 0 ? void 0 : _a.insertBefore(a, img);
570
+ a.appendChild(img);
571
+ }
572
+ };
573
+
574
+ const getValue = item => isString(item.value) ? item.value : '';
575
+ const getText = item => {
576
+ if (isString(item.text)) {
577
+ return item.text;
578
+ } else if (isString(item.title)) {
579
+ return item.title;
580
+ } else {
581
+ return '';
582
+ }
583
+ };
584
+ const sanitizeList = (list, extractValue) => {
585
+ const out = [];
586
+ global$2.each(list, item => {
587
+ const text = getText(item);
588
+ if (item.menu !== undefined) {
589
+ const items = sanitizeList(item.menu, extractValue);
590
+ out.push({
591
+ text,
592
+ items
593
+ });
594
+ } else {
595
+ const value = extractValue(item);
596
+ out.push({
597
+ text,
598
+ value
599
+ });
600
+ }
601
+ });
602
+ return out;
603
+ };
604
+ const sanitizeWith = (extracter = getValue) => list => Optional.from(list).map(list => sanitizeList(list, extracter));
605
+ const sanitize = list => sanitizeWith(getValue)(list);
606
+ const createUi = (name, label) => items => ({
607
+ name,
608
+ type: 'listbox',
609
+ label,
610
+ items
611
+ });
612
+ const ListOptions = {
613
+ sanitize,
614
+ sanitizeWith,
615
+ createUi,
616
+ getValue
617
+ };
618
+
619
+ const isListGroup = item => hasNonNullableKey(item, 'items');
620
+ const findTextByValue = (value, catalog) => findMap(catalog, item => {
621
+ if (isListGroup(item)) {
622
+ return findTextByValue(value, item.items);
623
+ } else {
624
+ return someIf(item.value === value, item);
625
+ }
626
+ });
627
+ const getDelta = (persistentText, fieldName, catalog, data) => {
628
+ const value = data[fieldName];
629
+ const hasPersistentText = persistentText.length > 0;
630
+ return value !== undefined ? findTextByValue(value, catalog).map(i => ({
631
+ url: {
632
+ value: i.value,
633
+ meta: {
634
+ text: hasPersistentText ? persistentText : i.text,
635
+ attach: noop
636
+ }
637
+ },
638
+ text: hasPersistentText ? persistentText : i.text
639
+ })) : Optional.none();
640
+ };
641
+ const findCatalog = (catalogs, fieldName) => {
642
+ if (fieldName === 'link') {
643
+ return catalogs.link;
644
+ } else if (fieldName === 'anchor') {
645
+ return catalogs.anchor;
646
+ } else {
647
+ return Optional.none();
648
+ }
649
+ };
650
+ const init = (initialData, linkCatalog) => {
651
+ const persistentData = {
652
+ text: initialData.text,
653
+ title: initialData.title
654
+ };
655
+ const getTitleFromUrlChange = url => {
656
+ var _a;
657
+ return someIf(persistentData.title.length <= 0, Optional.from((_a = url.meta) === null || _a === void 0 ? void 0 : _a.title).getOr(''));
658
+ };
659
+ const getTextFromUrlChange = url => {
660
+ var _a;
661
+ return someIf(persistentData.text.length <= 0, Optional.from((_a = url.meta) === null || _a === void 0 ? void 0 : _a.text).getOr(url.value));
662
+ };
663
+ const onUrlChange = data => {
664
+ const text = getTextFromUrlChange(data.url);
665
+ const title = getTitleFromUrlChange(data.url);
666
+ if (text.isSome() || title.isSome()) {
667
+ return Optional.some({
668
+ ...text.map(text => ({ text })).getOr({}),
669
+ ...title.map(title => ({ title })).getOr({})
670
+ });
671
+ } else {
672
+ return Optional.none();
673
+ }
674
+ };
675
+ const onCatalogChange = (data, change) => {
676
+ const catalog = findCatalog(linkCatalog, change).getOr([]);
677
+ return getDelta(persistentData.text, change, catalog, data);
678
+ };
679
+ const onChange = (getData, change) => {
680
+ const name = change.name;
681
+ if (name === 'url') {
682
+ return onUrlChange(getData());
683
+ } else if (contains([
684
+ 'anchor',
685
+ 'link'
686
+ ], name)) {
687
+ return onCatalogChange(getData(), name);
688
+ } else if (name === 'text' || name === 'title') {
689
+ persistentData[name] = getData()[name];
690
+ return Optional.none();
691
+ } else {
692
+ return Optional.none();
693
+ }
694
+ };
695
+ return { onChange };
696
+ };
697
+ const DialogChanges = {
698
+ init,
699
+ getDelta
700
+ };
701
+
702
+ var global$1 = tinymce.util.Tools.resolve('tinymce.util.Delay');
703
+
704
+ const delayedConfirm = (editor, message, callback) => {
705
+ const rng = editor.selection.getRng();
706
+ global$1.setEditorTimeout(editor, () => {
707
+ editor.windowManager.confirm(message, state => {
708
+ editor.selection.setRng(rng);
709
+ callback(state);
710
+ });
711
+ });
712
+ };
713
+ const tryEmailTransform = data => {
714
+ const url = data.href;
715
+ const suggestMailTo = url.indexOf('@') > 0 && url.indexOf('/') === -1 && url.indexOf('mailto:') === -1;
716
+ return suggestMailTo ? Optional.some({
717
+ message: 'The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?',
718
+ preprocess: oldData => ({
719
+ ...oldData,
720
+ href: 'mailto:' + url
721
+ })
722
+ }) : Optional.none();
723
+ };
724
+ const tryProtocolTransform = (assumeExternalTargets, defaultLinkProtocol) => data => {
725
+ const url = data.href;
726
+ const suggestProtocol = assumeExternalTargets === 1 && !hasProtocol(url) || assumeExternalTargets === 0 && /^\s*www(\.|\d\.)/i.test(url);
727
+ return suggestProtocol ? Optional.some({
728
+ message: `The URL you entered seems to be an external link. Do you want to add the required ${ defaultLinkProtocol }:// prefix?`,
729
+ preprocess: oldData => ({
730
+ ...oldData,
731
+ href: defaultLinkProtocol + '://' + url
732
+ })
733
+ }) : Optional.none();
734
+ };
735
+ const preprocess = (editor, data) => findMap([
736
+ tryEmailTransform,
737
+ tryProtocolTransform(assumeExternalTargets(editor), getDefaultLinkProtocol(editor))
738
+ ], f => f(data)).fold(() => Promise.resolve(data), transform => new Promise(callback => {
739
+ delayedConfirm(editor, transform.message, state => {
740
+ callback(state ? transform.preprocess(data) : data);
741
+ });
742
+ }));
743
+ const DialogConfirms = { preprocess };
744
+
745
+ const getAnchors = editor => {
746
+ const anchorNodes = editor.dom.select('a:not([href])');
747
+ const anchors = bind(anchorNodes, anchor => {
748
+ const id = anchor.name || anchor.id;
749
+ return id ? [{
750
+ text: id,
751
+ value: '#' + id
752
+ }] : [];
753
+ });
754
+ return anchors.length > 0 ? Optional.some([{
755
+ text: 'None',
756
+ value: ''
757
+ }].concat(anchors)) : Optional.none();
758
+ };
759
+ const AnchorListOptions = { getAnchors };
760
+
761
+ const getClasses = editor => {
762
+ const list = getLinkClassList(editor);
763
+ if (list.length > 0) {
764
+ return ListOptions.sanitize(list);
765
+ }
766
+ return Optional.none();
767
+ };
768
+ const ClassListOptions = { getClasses };
769
+
770
+ const parseJson = text => {
771
+ try {
772
+ return Optional.some(JSON.parse(text));
773
+ } catch (_a) {
774
+ return Optional.none();
775
+ }
776
+ };
777
+ const getLinks = editor => {
778
+ const extractor = item => editor.convertURL(item.value || item.url || '', 'href');
779
+ const linkList = getLinkList(editor);
780
+ return new Promise(resolve => {
781
+ if (isString(linkList)) {
782
+ fetch(linkList).then(res => res.ok ? res.text().then(parseJson) : Promise.reject()).then(resolve, () => resolve(Optional.none()));
783
+ } else if (isFunction(linkList)) {
784
+ linkList(output => resolve(Optional.some(output)));
785
+ } else {
786
+ resolve(Optional.from(linkList));
787
+ }
788
+ }).then(optItems => optItems.bind(ListOptions.sanitizeWith(extractor)).map(items => {
789
+ if (items.length > 0) {
790
+ const noneItem = [{
791
+ text: 'None',
792
+ value: ''
793
+ }];
794
+ return noneItem.concat(items);
795
+ } else {
796
+ return items;
797
+ }
798
+ }));
799
+ };
800
+ const LinkListOptions = { getLinks };
801
+
802
+ const getRels = (editor, initialTarget) => {
803
+ const list = getRelList(editor);
804
+ if (list.length > 0) {
805
+ const isTargetBlank = is(initialTarget, '_blank');
806
+ const enforceSafe = allowUnsafeLinkTarget(editor) === false;
807
+ const safeRelExtractor = item => applyRelTargetRules(ListOptions.getValue(item), isTargetBlank);
808
+ const sanitizer = enforceSafe ? ListOptions.sanitizeWith(safeRelExtractor) : ListOptions.sanitize;
809
+ return sanitizer(list);
810
+ }
811
+ return Optional.none();
812
+ };
813
+ const RelOptions = { getRels };
814
+
815
+ const fallbacks = [
816
+ {
817
+ text: 'Current window',
818
+ value: ''
819
+ },
820
+ {
821
+ text: 'New window',
822
+ value: '_blank'
823
+ }
824
+ ];
825
+ const getTargets = editor => {
826
+ const list = getTargetList(editor);
827
+ if (isArray(list)) {
828
+ return ListOptions.sanitize(list).orThunk(() => Optional.some(fallbacks));
829
+ } else if (list === false) {
830
+ return Optional.none();
831
+ }
832
+ return Optional.some(fallbacks);
833
+ };
834
+ const TargetOptions = { getTargets };
835
+
836
+ const nonEmptyAttr = (dom, elem, name) => {
837
+ const val = dom.getAttrib(elem, name);
838
+ return val !== null && val.length > 0 ? Optional.some(val) : Optional.none();
839
+ };
840
+ const extractFromAnchor = (editor, anchor) => {
841
+ const dom = editor.dom;
842
+ const onlyText = isOnlyTextSelected(editor);
843
+ const text = onlyText ? Optional.some(getAnchorText(editor.selection, anchor)) : Optional.none();
844
+ const url = anchor.bind(anchorElm => Optional.from(dom.getAttrib(anchorElm, 'href')));
845
+ const target = anchor.bind(anchorElm => Optional.from(dom.getAttrib(anchorElm, 'target')));
846
+ const rel = anchor.bind(anchorElm => nonEmptyAttr(dom, anchorElm, 'rel'));
847
+ const linkClass = anchor.bind(anchorElm => nonEmptyAttr(dom, anchorElm, 'class'));
848
+ const title = anchor.bind(anchorElm => nonEmptyAttr(dom, anchorElm, 'title'));
849
+ return {
850
+ url,
851
+ text,
852
+ title,
853
+ target,
854
+ rel,
855
+ linkClass
856
+ };
857
+ };
858
+ const collect = (editor, linkNode) => LinkListOptions.getLinks(editor).then(links => {
859
+ const anchor = extractFromAnchor(editor, linkNode);
860
+ return {
861
+ anchor,
862
+ catalogs: {
863
+ targets: TargetOptions.getTargets(editor),
864
+ rels: RelOptions.getRels(editor, anchor.target),
865
+ classes: ClassListOptions.getClasses(editor),
866
+ anchor: AnchorListOptions.getAnchors(editor),
867
+ link: links
868
+ },
869
+ optNode: linkNode,
870
+ flags: { titleEnabled: shouldShowLinkTitle(editor) }
871
+ };
872
+ });
873
+ const DialogInfo = { collect };
874
+
875
+ const handleSubmit = (editor, info) => api => {
876
+ const data = api.getData();
877
+ if (!data.url.value) {
878
+ unlink(editor);
879
+ api.close();
880
+ return;
881
+ }
882
+ const getChangedValue = key => Optional.from(data[key]).filter(value => !is(info.anchor[key], value));
883
+ const changedData = {
884
+ href: data.url.value,
885
+ text: getChangedValue('text'),
886
+ target: getChangedValue('target'),
887
+ rel: getChangedValue('rel'),
888
+ class: getChangedValue('linkClass'),
889
+ title: getChangedValue('title')
890
+ };
891
+ const attachState = {
892
+ href: data.url.value,
893
+ attach: data.url.meta !== undefined && data.url.meta.attach ? data.url.meta.attach : noop
894
+ };
895
+ DialogConfirms.preprocess(editor, changedData).then(pData => {
896
+ link(editor, attachState, pData);
897
+ });
898
+ api.close();
899
+ };
900
+ const collectData = editor => {
901
+ const anchorNode = getAnchorElement(editor);
902
+ return DialogInfo.collect(editor, anchorNode);
903
+ };
904
+ const getInitialData = (info, defaultTarget) => {
905
+ const anchor = info.anchor;
906
+ const url = anchor.url.getOr('');
907
+ return {
908
+ url: {
909
+ value: url,
910
+ meta: { original: { value: url } }
911
+ },
912
+ text: anchor.text.getOr(''),
913
+ title: anchor.title.getOr(''),
914
+ anchor: url,
915
+ link: url,
916
+ rel: anchor.rel.getOr(''),
917
+ target: anchor.target.or(defaultTarget).getOr(''),
918
+ linkClass: anchor.linkClass.getOr('')
919
+ };
920
+ };
921
+ const makeDialog = (settings, onSubmit, editor) => {
922
+ const urlInput = [{
923
+ name: 'url',
924
+ type: 'urlinput',
925
+ filetype: 'file',
926
+ label: 'URL',
927
+ picker_text: 'Browse links'
928
+ }];
929
+ const displayText = settings.anchor.text.map(() => ({
930
+ name: 'text',
931
+ type: 'input',
932
+ label: 'Text to display'
933
+ })).toArray();
934
+ const titleText = settings.flags.titleEnabled ? [{
935
+ name: 'title',
936
+ type: 'input',
937
+ label: 'Title'
938
+ }] : [];
939
+ const defaultTarget = Optional.from(getDefaultLinkTarget(editor));
940
+ const initialData = getInitialData(settings, defaultTarget);
941
+ const catalogs = settings.catalogs;
942
+ const dialogDelta = DialogChanges.init(initialData, catalogs);
943
+ const body = {
944
+ type: 'panel',
945
+ items: flatten([
946
+ urlInput,
947
+ displayText,
948
+ titleText,
949
+ cat([
950
+ catalogs.anchor.map(ListOptions.createUi('anchor', 'Anchors')),
951
+ catalogs.rels.map(ListOptions.createUi('rel', 'Rel')),
952
+ catalogs.targets.map(ListOptions.createUi('target', 'Open link in...')),
953
+ catalogs.link.map(ListOptions.createUi('link', 'Link list')),
954
+ catalogs.classes.map(ListOptions.createUi('linkClass', 'Class'))
955
+ ])
956
+ ])
957
+ };
958
+ return {
959
+ title: 'Insert/Edit Link',
960
+ size: 'normal',
961
+ body,
962
+ buttons: [
963
+ {
964
+ type: 'cancel',
965
+ name: 'cancel',
966
+ text: 'Cancel'
967
+ },
968
+ {
969
+ type: 'submit',
970
+ name: 'save',
971
+ text: 'Save',
972
+ primary: true
973
+ }
974
+ ],
975
+ initialData,
976
+ onChange: (api, {name}) => {
977
+ dialogDelta.onChange(api.getData, { name }).each(newData => {
978
+ api.setData(newData);
979
+ });
980
+ },
981
+ onSubmit
982
+ };
983
+ };
984
+ const open = editor => {
985
+ const data = collectData(editor);
986
+ data.then(info => {
987
+ const onSubmit = handleSubmit(editor, info);
988
+ return makeDialog(info, onSubmit, editor);
989
+ }).then(spec => {
990
+ editor.windowManager.open(spec);
991
+ });
992
+ };
993
+
994
+ const register = editor => {
995
+ editor.addCommand('mceLink', (_ui, value) => {
996
+ if ((value === null || value === void 0 ? void 0 : value.dialog) === true || !useQuickLink(editor)) {
997
+ open(editor);
998
+ } else {
999
+ editor.dispatch('contexttoolbar-show', { toolbarKey: 'quicklink' });
1000
+ }
1001
+ });
1002
+ };
1003
+
1004
+ const setup$2 = editor => {
1005
+ editor.addShortcut('Meta+K', '', () => {
1006
+ editor.execCommand('mceLink');
1007
+ });
1008
+ };
1009
+
1010
+ const Cell = initial => {
1011
+ let value = initial;
1012
+ const get = () => {
1013
+ return value;
1014
+ };
1015
+ const set = v => {
1016
+ value = v;
1017
+ };
1018
+ return {
1019
+ get,
1020
+ set
1021
+ };
1022
+ };
1023
+
1024
+ const singleton = doRevoke => {
1025
+ const subject = Cell(Optional.none());
1026
+ const revoke = () => subject.get().each(doRevoke);
1027
+ const clear = () => {
1028
+ revoke();
1029
+ subject.set(Optional.none());
1030
+ };
1031
+ const isSet = () => subject.get().isSome();
1032
+ const get = () => subject.get();
1033
+ const set = s => {
1034
+ revoke();
1035
+ subject.set(Optional.some(s));
1036
+ };
1037
+ return {
1038
+ clear,
1039
+ isSet,
1040
+ get,
1041
+ set
1042
+ };
1043
+ };
1044
+ const value = () => {
1045
+ const subject = singleton(noop);
1046
+ const on = f => subject.get().each(f);
1047
+ return {
1048
+ ...subject,
1049
+ on
1050
+ };
1051
+ };
1052
+
1053
+ const removeFromStart = (str, numChars) => {
1054
+ return str.substring(numChars);
1055
+ };
1056
+
1057
+ const checkRange = (str, substr, start) => substr === '' || str.length >= substr.length && str.substr(start, start + substr.length) === substr;
1058
+ const removeLeading = (str, prefix) => {
1059
+ return startsWith(str, prefix) ? removeFromStart(str, prefix.length) : str;
1060
+ };
1061
+ const startsWith = (str, prefix) => {
1062
+ return checkRange(str, prefix, 0);
1063
+ };
1064
+
1065
+ var global = tinymce.util.Tools.resolve('tinymce.util.VK');
1066
+
1067
+ const appendClickRemove = (link, evt) => {
1068
+ document.body.appendChild(link);
1069
+ link.dispatchEvent(evt);
1070
+ document.body.removeChild(link);
1071
+ };
1072
+ const openLink = url => {
1073
+ const link = document.createElement('a');
1074
+ link.target = '_blank';
1075
+ link.href = url;
1076
+ link.rel = 'noreferrer noopener';
1077
+ const evt = new MouseEvent('click', {
1078
+ bubbles: true,
1079
+ cancelable: true,
1080
+ view: window
1081
+ });
1082
+ document.dispatchEvent(evt);
1083
+ appendClickRemove(link, evt);
1084
+ };
1085
+ const hasOnlyAltModifier = e => {
1086
+ return e.altKey === true && e.shiftKey === false && e.ctrlKey === false && e.metaKey === false;
1087
+ };
1088
+ const gotoLink = (editor, a) => {
1089
+ if (a) {
1090
+ const href = getHref(a);
1091
+ if (/^#/.test(href)) {
1092
+ const targetEl = editor.dom.select(`${ href },[name="${ removeLeading(href, '#') }"]`);
1093
+ if (targetEl.length) {
1094
+ editor.selection.scrollIntoView(targetEl[0], true);
1095
+ }
1096
+ } else {
1097
+ openLink(a.href);
1098
+ }
1099
+ }
1100
+ };
1101
+ const isSelectionOnImageWithEmbeddedLink = editor => {
1102
+ const rng = editor.selection.getRng();
1103
+ const node = rng.startContainer;
1104
+ return isLink(node) && rng.startContainer === rng.endContainer && editor.dom.select('img', node).length === 1;
1105
+ };
1106
+ const getLinkFromElement = (editor, element) => {
1107
+ const links = getLinks$1(editor.dom.getParents(element));
1108
+ return someIf(links.length === 1, links[0]);
1109
+ };
1110
+ const getLinkInSelection = editor => {
1111
+ const links = getLinksInSelection(editor.selection.getRng());
1112
+ return someIf(links.length > 0, links[0]).or(getLinkFromElement(editor, editor.selection.getNode()));
1113
+ };
1114
+ const getLinkFromSelection = editor => editor.selection.isCollapsed() || isSelectionOnImageWithEmbeddedLink(editor) ? getLinkFromElement(editor, editor.selection.getStart()) : getLinkInSelection(editor);
1115
+ const setup$1 = editor => {
1116
+ const selectedLink = value();
1117
+ const getSelectedLink = () => selectedLink.get().or(getLinkFromSelection(editor));
1118
+ const gotoSelectedLink = () => getSelectedLink().each(link => gotoLink(editor, link));
1119
+ editor.on('contextmenu', e => {
1120
+ getLinkFromElement(editor, e.target).each(selectedLink.set);
1121
+ });
1122
+ editor.on('SelectionChange', () => {
1123
+ if (!selectedLink.isSet()) {
1124
+ getLinkFromSelection(editor).each(selectedLink.set);
1125
+ }
1126
+ });
1127
+ editor.on('click', e => {
1128
+ selectedLink.clear();
1129
+ const links = getLinks$1(editor.dom.getParents(e.target));
1130
+ if (links.length === 1 && global.metaKeyPressed(e)) {
1131
+ e.preventDefault();
1132
+ gotoLink(editor, links[0]);
1133
+ }
1134
+ });
1135
+ editor.on('keydown', e => {
1136
+ selectedLink.clear();
1137
+ if (!e.isDefaultPrevented() && e.keyCode === 13 && hasOnlyAltModifier(e)) {
1138
+ getSelectedLink().each(link => {
1139
+ e.preventDefault();
1140
+ gotoLink(editor, link);
1141
+ });
1142
+ }
1143
+ });
1144
+ return { gotoSelectedLink };
1145
+ };
1146
+
1147
+ const openDialog = editor => () => {
1148
+ editor.execCommand('mceLink', false, { dialog: true });
1149
+ };
1150
+ const toggleState = (editor, toggler) => {
1151
+ editor.on('NodeChange', toggler);
1152
+ return () => editor.off('NodeChange', toggler);
1153
+ };
1154
+ const toggleLinkState = editor => api => {
1155
+ const updateState = () => {
1156
+ api.setActive(!editor.mode.isReadOnly() && isInAnchor(editor, editor.selection.getNode()));
1157
+ api.setEnabled(editor.selection.isEditable());
1158
+ };
1159
+ updateState();
1160
+ return toggleState(editor, updateState);
1161
+ };
1162
+ const toggleLinkMenuState = editor => api => {
1163
+ const updateState = () => {
1164
+ api.setEnabled(editor.selection.isEditable());
1165
+ };
1166
+ updateState();
1167
+ return toggleState(editor, updateState);
1168
+ };
1169
+ const toggleRequiresLinkState = editor => api => {
1170
+ const hasLinks$1 = parents => hasLinks(parents) || hasLinksInSelection(editor.selection.getRng());
1171
+ const parents = editor.dom.getParents(editor.selection.getStart());
1172
+ const updateEnabled = parents => {
1173
+ api.setEnabled(hasLinks$1(parents) && editor.selection.isEditable());
1174
+ };
1175
+ updateEnabled(parents);
1176
+ return toggleState(editor, e => updateEnabled(e.parents));
1177
+ };
1178
+ const setupButtons = (editor, openLink) => {
1179
+ editor.ui.registry.addToggleButton('link', {
1180
+ icon: 'link',
1181
+ tooltip: 'Insert/edit link',
1182
+ shortcut: 'Meta+K',
1183
+ onAction: openDialog(editor),
1184
+ onSetup: toggleLinkState(editor)
1185
+ });
1186
+ editor.ui.registry.addButton('openlink', {
1187
+ icon: 'new-tab',
1188
+ tooltip: 'Open link',
1189
+ onAction: openLink.gotoSelectedLink,
1190
+ onSetup: toggleRequiresLinkState(editor)
1191
+ });
1192
+ editor.ui.registry.addButton('unlink', {
1193
+ icon: 'unlink',
1194
+ tooltip: 'Remove link',
1195
+ onAction: () => unlink(editor),
1196
+ onSetup: toggleRequiresLinkState(editor)
1197
+ });
1198
+ };
1199
+ const setupMenuItems = (editor, openLink) => {
1200
+ editor.ui.registry.addMenuItem('openlink', {
1201
+ text: 'Open link',
1202
+ icon: 'new-tab',
1203
+ onAction: openLink.gotoSelectedLink,
1204
+ onSetup: toggleRequiresLinkState(editor)
1205
+ });
1206
+ editor.ui.registry.addMenuItem('link', {
1207
+ icon: 'link',
1208
+ text: 'Link...',
1209
+ shortcut: 'Meta+K',
1210
+ onAction: openDialog(editor),
1211
+ onSetup: toggleLinkMenuState(editor)
1212
+ });
1213
+ editor.ui.registry.addMenuItem('unlink', {
1214
+ icon: 'unlink',
1215
+ text: 'Remove link',
1216
+ onAction: () => unlink(editor),
1217
+ onSetup: toggleRequiresLinkState(editor)
1218
+ });
1219
+ };
1220
+ const setupContextMenu = editor => {
1221
+ const inLink = 'link unlink openlink';
1222
+ const noLink = 'link';
1223
+ editor.ui.registry.addContextMenu('link', {
1224
+ update: element => {
1225
+ const isEditable = editor.dom.isEditable(element);
1226
+ if (!isEditable) {
1227
+ return '';
1228
+ }
1229
+ return hasLinks(editor.dom.getParents(element, 'a')) ? inLink : noLink;
1230
+ }
1231
+ });
1232
+ };
1233
+ const setupContextToolbars = (editor, openLink) => {
1234
+ const collapseSelectionToEnd = editor => {
1235
+ editor.selection.collapse(false);
1236
+ };
1237
+ const onSetupLink = buttonApi => {
1238
+ const node = editor.selection.getNode();
1239
+ buttonApi.setEnabled(isInAnchor(editor, node) && editor.selection.isEditable());
1240
+ return noop;
1241
+ };
1242
+ const getLinkText = value => {
1243
+ const anchor = getAnchorElement(editor);
1244
+ const onlyText = isOnlyTextSelected(editor);
1245
+ if (anchor.isNone() && onlyText) {
1246
+ const text = getAnchorText(editor.selection, anchor);
1247
+ return someIf(text.length === 0, value);
1248
+ } else {
1249
+ return Optional.none();
1250
+ }
1251
+ };
1252
+ editor.ui.registry.addContextForm('quicklink', {
1253
+ launch: {
1254
+ type: 'contextformtogglebutton',
1255
+ icon: 'link',
1256
+ tooltip: 'Link',
1257
+ onSetup: toggleLinkState(editor)
1258
+ },
1259
+ label: 'Link',
1260
+ predicate: node => hasContextToolbar(editor) && isInAnchor(editor, node),
1261
+ initValue: () => {
1262
+ const elm = getAnchorElement(editor);
1263
+ return elm.fold(constant(''), getHref);
1264
+ },
1265
+ commands: [
1266
+ {
1267
+ type: 'contextformtogglebutton',
1268
+ icon: 'link',
1269
+ tooltip: 'Link',
1270
+ primary: true,
1271
+ onSetup: buttonApi => {
1272
+ const node = editor.selection.getNode();
1273
+ buttonApi.setActive(isInAnchor(editor, node));
1274
+ return toggleLinkState(editor)(buttonApi);
1275
+ },
1276
+ onAction: formApi => {
1277
+ const value = formApi.getValue();
1278
+ const text = getLinkText(value);
1279
+ const attachState = {
1280
+ href: value,
1281
+ attach: noop
1282
+ };
1283
+ link(editor, attachState, {
1284
+ href: value,
1285
+ text,
1286
+ title: Optional.none(),
1287
+ rel: Optional.none(),
1288
+ target: Optional.from(getDefaultLinkTarget(editor)),
1289
+ class: Optional.none()
1290
+ });
1291
+ collapseSelectionToEnd(editor);
1292
+ formApi.hide();
1293
+ }
1294
+ },
1295
+ {
1296
+ type: 'contextformbutton',
1297
+ icon: 'unlink',
1298
+ tooltip: 'Remove link',
1299
+ onSetup: onSetupLink,
1300
+ onAction: formApi => {
1301
+ unlink(editor);
1302
+ formApi.hide();
1303
+ }
1304
+ },
1305
+ {
1306
+ type: 'contextformbutton',
1307
+ icon: 'new-tab',
1308
+ tooltip: 'Open link',
1309
+ onSetup: onSetupLink,
1310
+ onAction: formApi => {
1311
+ openLink.gotoSelectedLink();
1312
+ formApi.hide();
1313
+ }
1314
+ }
1315
+ ]
1316
+ });
1317
+ };
1318
+ const setup = editor => {
1319
+ const openLink = setup$1(editor);
1320
+ setupButtons(editor, openLink);
1321
+ setupMenuItems(editor, openLink);
1322
+ setupContextMenu(editor);
1323
+ setupContextToolbars(editor, openLink);
1324
+ };
1325
+
1326
+ var Plugin = () => {
1327
+ global$5.add('link', editor => {
1328
+ register$1(editor);
1329
+ register(editor);
1330
+ setup(editor);
1331
+ setup$2(editor);
1332
+ });
1333
+ };
1334
+
1335
+ Plugin();
1336
+
1337
+ })();