argous 1.2.132 → 1.2.136

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 (554) hide show
  1. package/dist/api/index.d.ts +1 -0
  2. package/dist/api/index.js +18 -1
  3. package/dist/components/AutoCompleteFavorites/AutoCompleteFavorites.d.ts +21 -0
  4. package/dist/components/AutoCompleteFavorites/AutoCompleteFavorites.js +331 -0
  5. package/dist/components/Compartilhar/Compartilhar.js +1 -1
  6. package/lib/actions/index.ts +57 -0
  7. package/lib/api/WebSocket.js +148 -0
  8. package/lib/api/index.js +402 -0
  9. package/lib/api/ws.js +27 -0
  10. package/lib/components/Alert/Alert.d.ts +8 -0
  11. package/lib/components/Alert/Alert.js +49 -0
  12. package/lib/components/Alert/index.d.ts +2 -0
  13. package/lib/components/Alert/index.js +1 -0
  14. package/lib/components/ArgousAction/ArgousAction.d.ts +8 -0
  15. package/lib/components/ArgousAction/ArgousAction.js +78 -0
  16. package/lib/components/ArgousAction/index.d.ts +2 -0
  17. package/lib/components/ArgousAction/index.js +1 -0
  18. package/lib/components/ArgousAvatar/ArgousAvatar.d.ts +14 -0
  19. package/lib/components/ArgousAvatar/ArgousAvatar.js +79 -0
  20. package/lib/components/ArgousAvatar/index.d.ts +2 -0
  21. package/lib/components/ArgousAvatar/index.js +1 -0
  22. package/lib/components/ArgousComplexPagination/ArgousComplexPagination.d.ts +76 -0
  23. package/lib/components/ArgousComplexPagination/ArgousComplexPagination.js +182 -0
  24. package/lib/components/ArgousComplexPagination/index.d.ts +2 -0
  25. package/lib/components/ArgousComplexPagination/index.js +1 -0
  26. package/lib/components/ArgousComplexTable/ArgousComplexTable.d.ts +131 -0
  27. package/lib/components/ArgousComplexTable/ArgousComplexTable.js +360 -0
  28. package/lib/components/ArgousComplexTable/index.d.ts +2 -0
  29. package/lib/components/ArgousComplexTable/index.js +1 -0
  30. package/lib/components/ArgousComplexTableBody/ArgousComplexTableBody.d.ts +177 -0
  31. package/lib/components/ArgousComplexTableBody/ArgousComplexTableBody.js +162 -0
  32. package/lib/components/ArgousComplexTableBody/index.d.ts +2 -0
  33. package/lib/components/ArgousComplexTableBody/index.js +1 -0
  34. package/lib/components/ArgousComplexTableHead/ArgousComplexTableHead.d.ts +73 -0
  35. package/lib/components/ArgousComplexTableHead/ArgousComplexTableHead.js +98 -0
  36. package/lib/components/ArgousComplexTableHead/index.d.ts +2 -0
  37. package/lib/components/ArgousComplexTableHead/index.js +1 -0
  38. package/lib/components/ArgousComplexTableToolbar/ArgousComplexTableToolBar.d.ts +58 -0
  39. package/lib/components/ArgousComplexTableToolbar/ArgousComplexTableToolBar.js +66 -0
  40. package/lib/components/ArgousComplexTableToolbar/index.d.ts +2 -0
  41. package/lib/components/ArgousComplexTableToolbar/index.js +1 -0
  42. package/lib/components/ArgousInput/ArgousInput.d.ts +8 -0
  43. package/lib/components/ArgousInput/ArgousInput.js +616 -0
  44. package/lib/components/ArgousInput/index.d.ts +2 -0
  45. package/lib/components/ArgousInput/index.js +1 -0
  46. package/lib/components/ArgousPagination/ArgousPagination.d.ts +8 -0
  47. package/lib/components/ArgousPagination/ArgousPagination.js +43 -0
  48. package/lib/components/ArgousPagination/index.d.ts +2 -0
  49. package/lib/components/ArgousPagination/index.js +1 -0
  50. package/lib/components/ArgousProgressBar/ArgousProgressBar.d.ts +22 -0
  51. package/lib/components/ArgousProgressBar/ArgousProgressBar.js +167 -0
  52. package/lib/components/ArgousProgressBar/index.d.ts +2 -0
  53. package/lib/components/ArgousProgressBar/index.js +1 -0
  54. package/lib/components/ArgousSimpleTable/ArgousSimpleTable.d.ts +8 -0
  55. package/lib/components/ArgousSimpleTable/ArgousSimpleTable.js +241 -0
  56. package/lib/components/ArgousSimpleTable/index.d.ts +2 -0
  57. package/lib/components/ArgousSimpleTable/index.js +1 -0
  58. package/lib/components/AutoComplete/AutoComplete.d.ts +8 -0
  59. package/lib/components/AutoComplete/AutoComplete.js +189 -0
  60. package/lib/components/AutoComplete/index.d.ts +2 -0
  61. package/lib/components/AutoComplete/index.js +1 -0
  62. package/lib/components/AutoCompleteFavorites/AutoCompleteFavorites.js +298 -0
  63. package/lib/components/BarChart/BarChart.d.ts +8 -0
  64. package/lib/components/BarChart/BarChart.js +92 -0
  65. package/lib/components/BarChart/index.d.ts +2 -0
  66. package/lib/components/BarChart/index.js +1 -0
  67. package/lib/components/BarraFerramentas/BarraFerramentas.d.ts +21 -0
  68. package/lib/components/BarraFerramentas/BarraFerramentas.js +277 -0
  69. package/lib/components/BarraFerramentas/index.d.ts +2 -0
  70. package/lib/components/BarraFerramentas/index.js +1 -0
  71. package/lib/components/Button/Button.d.ts +8 -0
  72. package/lib/components/Button/Button.js +135 -0
  73. package/lib/components/Button/index.d.ts +2 -0
  74. package/lib/components/Button/index.js +1 -0
  75. package/lib/components/Cabecalho/Cabecalho.d.ts +8 -0
  76. package/lib/components/Cabecalho/Cabecalho.js +245 -0
  77. package/lib/components/Cabecalho/index.d.ts +2 -0
  78. package/lib/components/Cabecalho/index.js +1 -0
  79. package/lib/components/Calendar/Calendar.d.ts +8 -0
  80. package/lib/components/Calendar/Calendar.js +156 -0
  81. package/lib/components/Calendar/index.d.ts +2 -0
  82. package/lib/components/Calendar/index.js +1 -0
  83. package/lib/components/CartaoUsuario/CartaoUsuario.d.ts +9 -0
  84. package/lib/components/CartaoUsuario/CartaoUsuario.js +108 -0
  85. package/lib/components/CartaoUsuario/index.d.ts +2 -0
  86. package/lib/components/CartaoUsuario/index.js +1 -0
  87. package/lib/components/Collapse/Collapse.d.ts +60 -0
  88. package/lib/components/Collapse/Collapse.js +317 -0
  89. package/lib/components/Collapse/index.d.ts +3 -0
  90. package/lib/components/Collapse/index.js +1 -0
  91. package/lib/components/Compartilhar/Compartilhar.d.ts +7 -0
  92. package/lib/components/Compartilhar/Compartilhar.js +314 -0
  93. package/lib/components/Compartilhar/index.d.ts +2 -0
  94. package/lib/components/Compartilhar/index.js +1 -0
  95. package/lib/components/ConfirmModal/BasicModal.tsx +63 -0
  96. package/lib/components/ConfirmModal/ModalProvider.tsx +81 -0
  97. package/lib/components/ConfirmModal/WrapperModal.tsx +33 -0
  98. package/lib/components/ConfirmModal/index.d.ts +20 -0
  99. package/lib/components/ConfirmModal/index.js +8 -0
  100. package/lib/components/DropArea/DropArea.d.ts +21 -0
  101. package/lib/components/DropArea/DropArea.js +90 -0
  102. package/lib/components/DropArea/Html5FileSelector.js +164 -0
  103. package/lib/components/DropArea/index.d.ts +2 -0
  104. package/lib/components/DropArea/index.js +1 -0
  105. package/lib/components/Editor/Events.ts +83 -0
  106. package/lib/components/Editor/ScriptLoader.ts +96 -0
  107. package/lib/components/Editor/TinyMCE.ts +19 -0
  108. package/lib/components/Editor/Utils.ts +95 -0
  109. package/lib/components/Editor/components/Editor.tsx +375 -0
  110. package/lib/components/Editor/components/EditorPropTypes.ts +106 -0
  111. package/lib/components/Editor/index.tsx +11 -0
  112. package/lib/components/Editor/skins/content/dark/content.css +72 -0
  113. package/lib/components/Editor/skins/content/dark/content.min.css +8 -0
  114. package/lib/components/Editor/skins/content/dark/content.min.css.map +1 -0
  115. package/lib/components/Editor/skins/content/default/content.css +67 -0
  116. package/lib/components/Editor/skins/content/default/content.min.css +8 -0
  117. package/lib/components/Editor/skins/content/default/content.min.css.map +1 -0
  118. package/lib/components/Editor/skins/content/document/content.css +72 -0
  119. package/lib/components/Editor/skins/content/document/content.min.css +8 -0
  120. package/lib/components/Editor/skins/content/document/content.min.css.map +1 -0
  121. package/lib/components/Editor/skins/content/writer/content.css +68 -0
  122. package/lib/components/Editor/skins/content/writer/content.min.css +8 -0
  123. package/lib/components/Editor/skins/content/writer/content.min.css.map +1 -0
  124. package/lib/components/Editor/skins/ui/dark/content.css +714 -0
  125. package/lib/components/Editor/skins/ui/dark/content.inline.css +726 -0
  126. package/lib/components/Editor/skins/ui/dark/content.inline.min.css +8 -0
  127. package/lib/components/Editor/skins/ui/dark/content.inline.min.css.map +1 -0
  128. package/lib/components/Editor/skins/ui/dark/content.min.css +8 -0
  129. package/lib/components/Editor/skins/ui/dark/content.min.css.map +1 -0
  130. package/lib/components/Editor/skins/ui/dark/content.mobile.css +29 -0
  131. package/lib/components/Editor/skins/ui/dark/content.mobile.min.css +8 -0
  132. package/lib/components/Editor/skins/ui/dark/content.mobile.min.css.map +1 -0
  133. package/lib/components/Editor/skins/ui/dark/fonts/tinymce-mobile.woff +0 -0
  134. package/lib/components/Editor/skins/ui/dark/skin.css +3034 -0
  135. package/lib/components/Editor/skins/ui/dark/skin.min.css +8 -0
  136. package/lib/components/Editor/skins/ui/dark/skin.min.css.map +1 -0
  137. package/lib/components/Editor/skins/ui/dark/skin.mobile.css +673 -0
  138. package/lib/components/Editor/skins/ui/dark/skin.mobile.min.css +8 -0
  139. package/lib/components/Editor/skins/ui/dark/skin.mobile.min.css.map +1 -0
  140. package/lib/components/Editor/skins/ui/dark/skin.shadowdom.css +37 -0
  141. package/lib/components/Editor/skins/ui/dark/skin.shadowdom.min.css +8 -0
  142. package/lib/components/Editor/skins/ui/dark/skin.shadowdom.min.css.map +1 -0
  143. package/lib/components/Editor/skins/ui/default/content.css +732 -0
  144. package/lib/components/Editor/skins/ui/default/content.inline.css +726 -0
  145. package/lib/components/Editor/skins/ui/default/content.inline.min.css +8 -0
  146. package/lib/components/Editor/skins/ui/default/content.inline.min.css.map +1 -0
  147. package/lib/components/Editor/skins/ui/default/content.min.css +8 -0
  148. package/lib/components/Editor/skins/ui/default/content.min.css.map +1 -0
  149. package/lib/components/Editor/skins/ui/default/content.mobile.css +29 -0
  150. package/lib/components/Editor/skins/ui/default/content.mobile.min.css +8 -0
  151. package/lib/components/Editor/skins/ui/default/content.mobile.min.css.map +1 -0
  152. package/lib/components/Editor/skins/ui/default/fonts/tinymce-mobile.woff +0 -0
  153. package/lib/components/Editor/skins/ui/default/skin.css +3034 -0
  154. package/lib/components/Editor/skins/ui/default/skin.min.css +8 -0
  155. package/lib/components/Editor/skins/ui/default/skin.min.css.map +1 -0
  156. package/lib/components/Editor/skins/ui/default/skin.mobile.css +673 -0
  157. package/lib/components/Editor/skins/ui/default/skin.mobile.min.css +8 -0
  158. package/lib/components/Editor/skins/ui/default/skin.mobile.min.css.map +1 -0
  159. package/lib/components/Editor/skins/ui/default/skin.shadowdom.css +37 -0
  160. package/lib/components/Editor/skins/ui/default/skin.shadowdom.min.css +8 -0
  161. package/lib/components/Editor/skins/ui/default/skin.shadowdom.min.css.map +1 -0
  162. package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/fonts/tinymce-mobile.woff +0 -0
  163. package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/plugin-tinycomments-tinymce4.css +1641 -0
  164. package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/plugin-tinycomments-tinymce4.min.css +8 -0
  165. package/lib/components/Editor/skins/ui/plugin-tinycomments-tinymce4/plugin-tinycomments-tinymce4.min.css.map +1 -0
  166. package/lib/components/Editor/tinymce/README.md +63 -0
  167. package/lib/components/Editor/tinymce/icons/default/icons.js +172 -0
  168. package/lib/components/Editor/tinymce/icons/default/icons.min.js +1 -0
  169. package/lib/components/Editor/tinymce/jquery.tinymce.min.js +92 -0
  170. package/lib/components/Editor/tinymce/langs/README.md +3 -0
  171. package/lib/components/Editor/tinymce/langs/pt_BR.js +419 -0
  172. package/lib/components/Editor/tinymce/license.txt +504 -0
  173. package/lib/components/Editor/tinymce/plugins/advlist/plugin.js +280 -0
  174. package/lib/components/Editor/tinymce/plugins/advlist/plugin.min.js +9 -0
  175. package/lib/components/Editor/tinymce/plugins/anchor/plugin.js +216 -0
  176. package/lib/components/Editor/tinymce/plugins/anchor/plugin.min.js +9 -0
  177. package/lib/components/Editor/tinymce/plugins/autolink/plugin.js +185 -0
  178. package/lib/components/Editor/tinymce/plugins/autolink/plugin.min.js +9 -0
  179. package/lib/components/Editor/tinymce/plugins/autoresize/plugin.js +171 -0
  180. package/lib/components/Editor/tinymce/plugins/autoresize/plugin.min.js +9 -0
  181. package/lib/components/Editor/tinymce/plugins/autosave/plugin.js +212 -0
  182. package/lib/components/Editor/tinymce/plugins/autosave/plugin.min.js +9 -0
  183. package/lib/components/Editor/tinymce/plugins/bbcode/plugin.js +99 -0
  184. package/lib/components/Editor/tinymce/plugins/bbcode/plugin.min.js +9 -0
  185. package/lib/components/Editor/tinymce/plugins/charmap/plugin.js +1706 -0
  186. package/lib/components/Editor/tinymce/plugins/charmap/plugin.min.js +9 -0
  187. package/lib/components/Editor/tinymce/plugins/code/plugin.js +92 -0
  188. package/lib/components/Editor/tinymce/plugins/code/plugin.min.js +9 -0
  189. package/lib/components/Editor/tinymce/plugins/codesample/plugin.js +2332 -0
  190. package/lib/components/Editor/tinymce/plugins/codesample/plugin.min.js +9 -0
  191. package/{dist/components/Editor/tinymce/plugins/textcolor → lib/components/Editor/tinymce/plugins/colorpicker}/plugin.js +8 -5
  192. package/lib/components/Editor/tinymce/plugins/colorpicker/plugin.min.js +9 -0
  193. package/{dist/components/Editor/tinymce/plugins/colorpicker → lib/components/Editor/tinymce/plugins/contextmenu}/plugin.js +8 -5
  194. package/lib/components/Editor/tinymce/plugins/contextmenu/plugin.min.js +9 -0
  195. package/lib/components/Editor/tinymce/plugins/directionality/plugin.js +320 -0
  196. package/lib/components/Editor/tinymce/plugins/directionality/plugin.min.js +9 -0
  197. package/lib/components/Editor/tinymce/plugins/emoticons/js/emojiimages.js +9424 -0
  198. package/lib/components/Editor/tinymce/plugins/emoticons/js/emojiimages.min.js +3 -0
  199. package/lib/components/Editor/tinymce/plugins/emoticons/js/emojis.js +9423 -0
  200. package/lib/components/Editor/tinymce/plugins/emoticons/js/emojis.min.js +2 -0
  201. package/lib/components/Editor/tinymce/plugins/emoticons/plugin.js +605 -0
  202. package/lib/components/Editor/tinymce/plugins/emoticons/plugin.min.js +9 -0
  203. package/lib/components/Editor/tinymce/plugins/fullpage/plugin.js +544 -0
  204. package/lib/components/Editor/tinymce/plugins/fullpage/plugin.min.js +9 -0
  205. package/lib/components/Editor/tinymce/plugins/fullscreen/plugin.js +979 -0
  206. package/lib/components/Editor/tinymce/plugins/fullscreen/plugin.min.js +9 -0
  207. package/lib/components/Editor/tinymce/plugins/help/plugin.js +873 -0
  208. package/lib/components/Editor/tinymce/plugins/help/plugin.min.js +9 -0
  209. package/lib/components/Editor/tinymce/plugins/hr/plugin.js +46 -0
  210. package/lib/components/Editor/tinymce/plugins/hr/plugin.min.js +9 -0
  211. package/lib/components/Editor/tinymce/plugins/image/plugin.js +1661 -0
  212. package/lib/components/Editor/tinymce/plugins/image/plugin.min.js +9 -0
  213. package/lib/components/Editor/tinymce/plugins/imagetools/plugin.js +1354 -0
  214. package/lib/components/Editor/tinymce/plugins/imagetools/plugin.min.js +9 -0
  215. package/lib/components/Editor/tinymce/plugins/importcss/plugin.js +343 -0
  216. package/lib/components/Editor/tinymce/plugins/importcss/plugin.min.js +9 -0
  217. package/lib/components/Editor/tinymce/plugins/insertdatetime/plugin.js +177 -0
  218. package/lib/components/Editor/tinymce/plugins/insertdatetime/plugin.min.js +9 -0
  219. package/lib/components/Editor/tinymce/plugins/legacyoutput/plugin.js +199 -0
  220. package/lib/components/Editor/tinymce/plugins/legacyoutput/plugin.min.js +9 -0
  221. package/lib/components/Editor/tinymce/plugins/link/plugin.js +1287 -0
  222. package/lib/components/Editor/tinymce/plugins/link/plugin.min.js +9 -0
  223. package/lib/components/Editor/tinymce/plugins/lists/plugin.js +2286 -0
  224. package/lib/components/Editor/tinymce/plugins/lists/plugin.min.js +9 -0
  225. package/lib/components/Editor/tinymce/plugins/media/plugin.js +1382 -0
  226. package/lib/components/Editor/tinymce/plugins/media/plugin.min.js +9 -0
  227. package/lib/components/Editor/tinymce/plugins/nonbreaking/plugin.js +101 -0
  228. package/lib/components/Editor/tinymce/plugins/nonbreaking/plugin.min.js +9 -0
  229. package/lib/components/Editor/tinymce/plugins/noneditable/plugin.js +117 -0
  230. package/lib/components/Editor/tinymce/plugins/noneditable/plugin.min.js +9 -0
  231. package/lib/components/Editor/tinymce/plugins/pagebreak/plugin.js +105 -0
  232. package/lib/components/Editor/tinymce/plugins/pagebreak/plugin.min.js +9 -0
  233. package/lib/components/Editor/tinymce/plugins/paste/plugin.js +1764 -0
  234. package/lib/components/Editor/tinymce/plugins/paste/plugin.min.js +9 -0
  235. package/lib/components/Editor/tinymce/plugins/preview/plugin.js +127 -0
  236. package/lib/components/Editor/tinymce/plugins/preview/plugin.min.js +9 -0
  237. package/lib/components/Editor/tinymce/plugins/print/plugin.js +53 -0
  238. package/lib/components/Editor/tinymce/plugins/print/plugin.min.js +9 -0
  239. package/lib/components/Editor/tinymce/plugins/quickbars/plugin.js +489 -0
  240. package/lib/components/Editor/tinymce/plugins/quickbars/plugin.min.js +9 -0
  241. package/lib/components/Editor/tinymce/plugins/save/plugin.js +119 -0
  242. package/lib/components/Editor/tinymce/plugins/save/plugin.min.js +9 -0
  243. package/lib/components/Editor/tinymce/plugins/searchreplace/plugin.js +1163 -0
  244. package/lib/components/Editor/tinymce/plugins/searchreplace/plugin.min.js +9 -0
  245. package/lib/components/Editor/tinymce/plugins/spellchecker/plugin.js +731 -0
  246. package/lib/components/Editor/tinymce/plugins/spellchecker/plugin.min.js +9 -0
  247. package/lib/components/Editor/tinymce/plugins/tabfocus/plugin.js +129 -0
  248. package/lib/components/Editor/tinymce/plugins/tabfocus/plugin.min.js +9 -0
  249. package/lib/components/Editor/tinymce/plugins/table/plugin.js +10938 -0
  250. package/lib/components/Editor/tinymce/plugins/table/plugin.min.js +9 -0
  251. package/lib/components/Editor/tinymce/plugins/template/plugin.js +577 -0
  252. package/lib/components/Editor/tinymce/plugins/template/plugin.min.js +9 -0
  253. package/{dist/components/Editor/tinymce/plugins/contextmenu → lib/components/Editor/tinymce/plugins/textcolor}/plugin.js +8 -5
  254. package/lib/components/Editor/tinymce/plugins/textcolor/plugin.min.js +9 -0
  255. package/lib/components/Editor/tinymce/plugins/textpattern/plugin.js +1394 -0
  256. package/lib/components/Editor/tinymce/plugins/textpattern/plugin.min.js +9 -0
  257. package/lib/components/Editor/tinymce/plugins/toc/plugin.js +236 -0
  258. package/lib/components/Editor/tinymce/plugins/toc/plugin.min.js +9 -0
  259. package/lib/components/Editor/tinymce/plugins/visualblocks/plugin.js +104 -0
  260. package/lib/components/Editor/tinymce/plugins/visualblocks/plugin.min.js +9 -0
  261. package/lib/components/Editor/tinymce/plugins/visualchars/plugin.js +541 -0
  262. package/lib/components/Editor/tinymce/plugins/visualchars/plugin.min.js +9 -0
  263. package/lib/components/Editor/tinymce/plugins/wordcount/plugin.js +416 -0
  264. package/lib/components/Editor/tinymce/plugins/wordcount/plugin.min.js +9 -0
  265. package/lib/components/Editor/tinymce/skins/content/dark/content.css +72 -0
  266. package/lib/components/Editor/tinymce/skins/content/dark/content.min.css +8 -0
  267. package/lib/components/Editor/tinymce/skins/content/dark/content.min.css.map +1 -0
  268. package/lib/components/Editor/tinymce/skins/content/default/content.css +67 -0
  269. package/lib/components/Editor/tinymce/skins/content/default/content.min.css +8 -0
  270. package/lib/components/Editor/tinymce/skins/content/default/content.min.css.map +1 -0
  271. package/lib/components/Editor/tinymce/skins/content/document/content.css +72 -0
  272. package/lib/components/Editor/tinymce/skins/content/document/content.min.css +8 -0
  273. package/lib/components/Editor/tinymce/skins/content/document/content.min.css.map +1 -0
  274. package/lib/components/Editor/tinymce/skins/content/writer/content.css +68 -0
  275. package/lib/components/Editor/tinymce/skins/content/writer/content.min.css +8 -0
  276. package/lib/components/Editor/tinymce/skins/content/writer/content.min.css.map +1 -0
  277. package/lib/components/Editor/tinymce/skins/ui/oxide/content.css +732 -0
  278. package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.css +726 -0
  279. package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.min.css +8 -0
  280. package/lib/components/Editor/tinymce/skins/ui/oxide/content.inline.min.css.map +1 -0
  281. package/lib/components/Editor/tinymce/skins/ui/oxide/content.min.css +8 -0
  282. package/lib/components/Editor/tinymce/skins/ui/oxide/content.min.css.map +1 -0
  283. package/lib/components/Editor/tinymce/skins/ui/oxide/content.mobile.css +29 -0
  284. package/lib/components/Editor/tinymce/skins/ui/oxide/content.mobile.min.css +8 -0
  285. package/lib/components/Editor/tinymce/skins/ui/oxide/content.mobile.min.css.map +1 -0
  286. package/lib/components/Editor/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff +0 -0
  287. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.css +3034 -0
  288. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.min.css +8 -0
  289. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.min.css.map +1 -0
  290. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.mobile.css +673 -0
  291. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.mobile.min.css +8 -0
  292. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.mobile.min.css.map +1 -0
  293. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.css +37 -0
  294. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.min.css +8 -0
  295. package/lib/components/Editor/tinymce/skins/ui/oxide/skin.shadowdom.min.css.map +1 -0
  296. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.css +714 -0
  297. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.css +726 -0
  298. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.min.css +8 -0
  299. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.inline.min.css.map +1 -0
  300. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.min.css +8 -0
  301. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.min.css.map +1 -0
  302. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.mobile.css +29 -0
  303. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.mobile.min.css +8 -0
  304. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/content.mobile.min.css.map +1 -0
  305. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/fonts/tinymce-mobile.woff +0 -0
  306. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.css +3034 -0
  307. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.min.css +8 -0
  308. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.min.css.map +1 -0
  309. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.mobile.css +673 -0
  310. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.mobile.min.css +8 -0
  311. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.mobile.min.css.map +1 -0
  312. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +37 -0
  313. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +8 -0
  314. package/lib/components/Editor/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css.map +1 -0
  315. package/lib/components/Editor/tinymce/themes/mobile/theme.js +13587 -0
  316. package/lib/components/Editor/tinymce/themes/mobile/theme.min.js +9 -0
  317. package/lib/components/Editor/tinymce/themes/silver/theme.js +32480 -0
  318. package/lib/components/Editor/tinymce/themes/silver/theme.min.js +9 -0
  319. package/lib/components/Editor/tinymce/tinymce.d.ts +2963 -0
  320. package/lib/components/Editor/tinymce/tinymce.js +30106 -0
  321. package/lib/components/Editor/tinymce/tinymce.min.js +30106 -0
  322. package/lib/components/FilePreparer/FilePreparer.d.ts +26 -0
  323. package/lib/components/FilePreparer/FilePreparer.js +247 -0
  324. package/lib/components/FilePreparer/index.d.ts +2 -0
  325. package/lib/components/FilePreparer/index.js +1 -0
  326. package/lib/components/FileUploader/FileUploader.d.ts +9 -0
  327. package/lib/components/FileUploader/FileUploader.js +318 -0
  328. package/lib/components/FileUploader/index.d.ts +2 -0
  329. package/lib/components/FileUploader/index.js +1 -0
  330. package/lib/components/FormVisualizer/FormVisualizer.d.ts +92 -0
  331. package/lib/components/FormVisualizer/FormVisualizer.js +289 -0
  332. package/lib/components/FormVisualizer/index.d.ts +2 -0
  333. package/lib/components/FormVisualizer/index.js +1 -0
  334. package/lib/components/Highlight/Highlight.d.ts +7 -0
  335. package/lib/components/Highlight/Highlight.js +51 -0
  336. package/lib/components/Highlight/index.d.ts +2 -0
  337. package/lib/components/Highlight/index.js +1 -0
  338. package/lib/components/ImageResize/ImageResize.d.ts +28 -0
  339. package/lib/components/ImageResize/ImageResize.js +479 -0
  340. package/lib/components/ImageResize/index.d.ts +2 -0
  341. package/lib/components/ImageResize/index.js +1 -0
  342. package/lib/components/ImageResizeButton/ImageResizeButton.d.ts +26 -0
  343. package/lib/components/ImageResizeButton/ImageResizeButton.js +65 -0
  344. package/lib/components/ImageResizeButton/index.d.ts +2 -0
  345. package/lib/components/ImageResizeButton/index.js +1 -0
  346. package/lib/components/Input/Input.d.ts +8 -0
  347. package/lib/components/Input/Input.js +353 -0
  348. package/lib/components/Input/index.d.ts +2 -0
  349. package/lib/components/Input/index.js +1 -0
  350. package/lib/components/InputTags/InputTags.d.ts +8 -0
  351. package/lib/components/InputTags/InputTags.js +94 -0
  352. package/lib/components/InputTags/index.d.ts +2 -0
  353. package/lib/components/InputTags/index.js +1 -0
  354. package/lib/components/ListSelect/ListSelect.d.ts +8 -0
  355. package/lib/components/ListSelect/ListSelect.js +94 -0
  356. package/lib/components/ListSelect/index.d.ts +2 -0
  357. package/lib/components/ListSelect/index.js +1 -0
  358. package/lib/components/MaterialButton/MaterialButton.d.ts +13 -0
  359. package/lib/components/MaterialButton/MaterialButton.js +177 -0
  360. package/lib/components/MaterialButton/index.d.ts +2 -0
  361. package/lib/components/MaterialButton/index.js +1 -0
  362. package/lib/components/MenuBar/MenuBar.d.ts +8 -0
  363. package/lib/components/MenuBar/MenuBar.js +139 -0
  364. package/lib/components/MenuBar/index.d.ts +2 -0
  365. package/lib/components/MenuBar/index.js +1 -0
  366. package/lib/components/MonthPicker/MonthPicker.d.ts +8 -0
  367. package/lib/components/MonthPicker/MonthPicker.js +313 -0
  368. package/lib/components/MonthPicker/index.d.ts +2 -0
  369. package/lib/components/MonthPicker/index.js +1 -0
  370. package/lib/components/MultipleSelect/MultipleSelect.d.ts +8 -0
  371. package/lib/components/MultipleSelect/MultipleSelect.js +106 -0
  372. package/lib/components/MultipleSelect/index.d.ts +2 -0
  373. package/lib/components/MultipleSelect/index.js +1 -0
  374. package/lib/components/OtpInput/OtpInput.tsx +244 -0
  375. package/lib/components/OtpInput/index.d.ts +2 -0
  376. package/lib/components/OtpInput/index.js +1 -0
  377. package/lib/components/OutputText/OutputText.d.ts +8 -0
  378. package/lib/components/OutputText/OutputText.js +57 -0
  379. package/lib/components/OutputText/index.d.ts +2 -0
  380. package/lib/components/OutputText/index.js +1 -0
  381. package/lib/components/Pagination/Pagination.d.ts +8 -0
  382. package/lib/components/Pagination/Pagination.js +32 -0
  383. package/lib/components/Pagination/index.d.ts +2 -0
  384. package/lib/components/Pagination/index.js +1 -0
  385. package/lib/components/Programa/Programa.d.ts +31 -0
  386. package/lib/components/Programa/Programa.js +172 -0
  387. package/lib/components/Programa/index.d.ts +2 -0
  388. package/lib/components/Programa/index.js +1 -0
  389. package/lib/components/ProgressBar/ProgressBar.d.ts +8 -0
  390. package/lib/components/ProgressBar/ProgressBar.js +71 -0
  391. package/lib/components/ProgressBar/index.d.ts +2 -0
  392. package/lib/components/ProgressBar/index.js +1 -0
  393. package/lib/components/Select/Select.d.ts +8 -0
  394. package/lib/components/Select/Select.js +117 -0
  395. package/lib/components/Select/index.d.ts +2 -0
  396. package/lib/components/Select/index.js +1 -0
  397. package/lib/components/SimpleTable/SimpleTable.d.ts +13 -0
  398. package/lib/components/SimpleTable/SimpleTable.js +504 -0
  399. package/lib/components/SimpleTable/index.d.ts +2 -0
  400. package/lib/components/SimpleTable/index.js +2 -0
  401. package/lib/components/Stepper/Stepper.d.ts +54 -0
  402. package/lib/components/Stepper/Stepper.js +222 -0
  403. package/lib/components/Stepper/index.d.ts +2 -0
  404. package/lib/components/Stepper/index.js +1 -0
  405. package/lib/components/TablePicker/TablePicker.d.ts +8 -0
  406. package/lib/components/TablePicker/TablePicker.js +238 -0
  407. package/lib/components/TablePicker/index.d.ts +2 -0
  408. package/lib/components/TablePicker/index.js +1 -0
  409. package/lib/components/Tabs/Tabs.d.ts +8 -0
  410. package/lib/components/Tabs/Tabs.js +59 -0
  411. package/lib/components/Tabs/index.d.ts +2 -0
  412. package/lib/components/Tabs/index.js +1 -0
  413. package/lib/components/TextArea/TextArea.d.ts +8 -0
  414. package/lib/components/TextArea/TextArea.js +123 -0
  415. package/lib/components/TextArea/index.d.ts +2 -0
  416. package/lib/components/TextArea/index.js +1 -0
  417. package/lib/components/ThreadLog/ThreadLog.d.ts +8 -0
  418. package/lib/components/ThreadLog/ThreadLog.js +189 -0
  419. package/lib/components/ThreadLog/index.d.ts +2 -0
  420. package/lib/components/ThreadLog/index.js +1 -0
  421. package/lib/components/UtilAutoComplete/UtilAutoComplete.d.ts +93 -0
  422. package/lib/components/UtilAutoComplete/UtilAutoComplete.js +130 -0
  423. package/lib/components/UtilAutoComplete/index.d.ts +2 -0
  424. package/lib/components/UtilAutoComplete/index.js +1 -0
  425. package/lib/components/index.d.ts +148 -0
  426. package/lib/components/index.js +146 -0
  427. package/lib/fieldsRedux/createField.d.ts +8 -0
  428. package/lib/fieldsRedux/createField.js +120 -0
  429. package/lib/fieldsRedux/fieldsRedux.d.ts +71 -0
  430. package/lib/fieldsRedux/fieldsRedux.js +391 -0
  431. package/lib/fieldsRedux/index.d.ts +4 -0
  432. package/lib/fieldsRedux/index.js +5 -0
  433. package/lib/fieldsRedux/passFields.d.ts +5 -0
  434. package/lib/fieldsRedux/passFields.js +76 -0
  435. package/lib/reducers/argous.ts +103 -0
  436. package/lib/reducers/index.ts +6 -0
  437. package/lib/types.d.ts +144 -0
  438. package/lib/utils/api.ts +153 -0
  439. package/lib/utils/config.ts +12 -0
  440. package/lib/utils/date.ts +63 -0
  441. package/lib/utils/index.ts +314 -0
  442. package/lib/utils/rippleEffect.js +211 -0
  443. package/lib/utils/store.ts +11 -0
  444. package/lib/utils/xmlToJson.js +117 -0
  445. package/package.json +1 -1
  446. package/dist/components/ArgousComplexTableBody/dnd/Container.d.ts +0 -55
  447. package/dist/components/ArgousComplexTableBody/dnd/Container.js +0 -173
  448. package/dist/components/ArgousComplexTableBody/dnd/Draggable.d.ts +0 -14
  449. package/dist/components/ArgousComplexTableBody/dnd/Draggable.js +0 -73
  450. package/dist/components/ArgousComplexTableBody/dnd/index.d.ts +0 -2
  451. package/dist/components/ArgousComplexTableBody/dnd/index.js +0 -10
  452. package/dist/components/ConfirmModal/useModal.d.ts +0 -2
  453. package/dist/components/ConfirmModal/useModal.js +0 -9
  454. package/dist/components/DropArea/worker.d.ts +0 -1
  455. package/dist/components/DropArea/worker.js +0 -55
  456. package/dist/components/Editor/tinymce/icons/default/icons.d.ts +0 -0
  457. package/dist/components/Editor/tinymce/icons/default/icons.js +0 -173
  458. package/dist/components/Editor/tinymce/plugins/advlist/plugin.d.ts +0 -0
  459. package/dist/components/Editor/tinymce/plugins/advlist/plugin.js +0 -271
  460. package/dist/components/Editor/tinymce/plugins/anchor/plugin.d.ts +0 -0
  461. package/dist/components/Editor/tinymce/plugins/anchor/plugin.js +0 -207
  462. package/dist/components/Editor/tinymce/plugins/autolink/plugin.d.ts +0 -0
  463. package/dist/components/Editor/tinymce/plugins/autolink/plugin.js +0 -187
  464. package/dist/components/Editor/tinymce/plugins/autoresize/plugin.d.ts +0 -0
  465. package/dist/components/Editor/tinymce/plugins/autoresize/plugin.js +0 -163
  466. package/dist/components/Editor/tinymce/plugins/autosave/plugin.d.ts +0 -0
  467. package/dist/components/Editor/tinymce/plugins/autosave/plugin.js +0 -199
  468. package/dist/components/Editor/tinymce/plugins/bbcode/plugin.d.ts +0 -0
  469. package/dist/components/Editor/tinymce/plugins/bbcode/plugin.js +0 -94
  470. package/dist/components/Editor/tinymce/plugins/charmap/plugin.d.ts +0 -0
  471. package/dist/components/Editor/tinymce/plugins/charmap/plugin.js +0 -1691
  472. package/dist/components/Editor/tinymce/plugins/code/plugin.d.ts +0 -0
  473. package/dist/components/Editor/tinymce/plugins/code/plugin.js +0 -85
  474. package/dist/components/Editor/tinymce/plugins/codesample/plugin.js +0 -2331
  475. package/dist/components/Editor/tinymce/plugins/colorpicker/plugin.d.ts +0 -0
  476. package/dist/components/Editor/tinymce/plugins/contextmenu/plugin.d.ts +0 -0
  477. package/dist/components/Editor/tinymce/plugins/directionality/plugin.d.ts +0 -0
  478. package/dist/components/Editor/tinymce/plugins/directionality/plugin.js +0 -300
  479. package/dist/components/Editor/tinymce/plugins/emoticons/js/emojiimages.d.ts +0 -0
  480. package/dist/components/Editor/tinymce/plugins/emoticons/js/emojiimages.js +0 -9425
  481. package/dist/components/Editor/tinymce/plugins/emoticons/js/emojis.d.ts +0 -0
  482. package/dist/components/Editor/tinymce/plugins/emoticons/js/emojis.js +0 -9424
  483. package/dist/components/Editor/tinymce/plugins/emoticons/plugin.d.ts +0 -0
  484. package/dist/components/Editor/tinymce/plugins/emoticons/plugin.js +0 -585
  485. package/dist/components/Editor/tinymce/plugins/fullpage/plugin.d.ts +0 -0
  486. package/dist/components/Editor/tinymce/plugins/fullpage/plugin.js +0 -539
  487. package/dist/components/Editor/tinymce/plugins/fullscreen/plugin.d.ts +0 -0
  488. package/dist/components/Editor/tinymce/plugins/fullscreen/plugin.js +0 -962
  489. package/dist/components/Editor/tinymce/plugins/help/plugin.d.ts +0 -0
  490. package/dist/components/Editor/tinymce/plugins/help/plugin.js +0 -850
  491. package/dist/components/Editor/tinymce/plugins/hr/plugin.d.ts +0 -0
  492. package/dist/components/Editor/tinymce/plugins/hr/plugin.js +0 -41
  493. package/dist/components/Editor/tinymce/plugins/image/plugin.d.ts +0 -0
  494. package/dist/components/Editor/tinymce/plugins/image/plugin.js +0 -1673
  495. package/dist/components/Editor/tinymce/plugins/imagetools/plugin.d.ts +0 -0
  496. package/dist/components/Editor/tinymce/plugins/imagetools/plugin.js +0 -1335
  497. package/dist/components/Editor/tinymce/plugins/importcss/plugin.d.ts +0 -0
  498. package/dist/components/Editor/tinymce/plugins/importcss/plugin.js +0 -346
  499. package/dist/components/Editor/tinymce/plugins/insertdatetime/plugin.d.ts +0 -0
  500. package/dist/components/Editor/tinymce/plugins/insertdatetime/plugin.js +0 -171
  501. package/dist/components/Editor/tinymce/plugins/legacyoutput/plugin.d.ts +0 -0
  502. package/dist/components/Editor/tinymce/plugins/legacyoutput/plugin.js +0 -193
  503. package/dist/components/Editor/tinymce/plugins/link/plugin.d.ts +0 -0
  504. package/dist/components/Editor/tinymce/plugins/link/plugin.js +0 -1282
  505. package/dist/components/Editor/tinymce/plugins/lists/plugin.d.ts +0 -0
  506. package/dist/components/Editor/tinymce/plugins/lists/plugin.js +0 -2256
  507. package/dist/components/Editor/tinymce/plugins/media/plugin.d.ts +0 -0
  508. package/dist/components/Editor/tinymce/plugins/media/plugin.js +0 -1374
  509. package/dist/components/Editor/tinymce/plugins/nonbreaking/plugin.d.ts +0 -0
  510. package/dist/components/Editor/tinymce/plugins/nonbreaking/plugin.js +0 -93
  511. package/dist/components/Editor/tinymce/plugins/noneditable/plugin.d.ts +0 -0
  512. package/dist/components/Editor/tinymce/plugins/noneditable/plugin.js +0 -114
  513. package/dist/components/Editor/tinymce/plugins/pagebreak/plugin.d.ts +0 -0
  514. package/dist/components/Editor/tinymce/plugins/pagebreak/plugin.js +0 -96
  515. package/dist/components/Editor/tinymce/plugins/paste/plugin.d.ts +0 -0
  516. package/dist/components/Editor/tinymce/plugins/paste/plugin.js +0 -1747
  517. package/dist/components/Editor/tinymce/plugins/preview/plugin.d.ts +0 -0
  518. package/dist/components/Editor/tinymce/plugins/preview/plugin.js +0 -119
  519. package/dist/components/Editor/tinymce/plugins/print/plugin.d.ts +0 -0
  520. package/dist/components/Editor/tinymce/plugins/print/plugin.js +0 -48
  521. package/dist/components/Editor/tinymce/plugins/quickbars/plugin.d.ts +0 -0
  522. package/dist/components/Editor/tinymce/plugins/quickbars/plugin.js +0 -475
  523. package/dist/components/Editor/tinymce/plugins/save/plugin.d.ts +0 -0
  524. package/dist/components/Editor/tinymce/plugins/save/plugin.js +0 -112
  525. package/dist/components/Editor/tinymce/plugins/searchreplace/plugin.d.ts +0 -0
  526. package/dist/components/Editor/tinymce/plugins/searchreplace/plugin.js +0 -1149
  527. package/dist/components/Editor/tinymce/plugins/spellchecker/plugin.d.ts +0 -0
  528. package/dist/components/Editor/tinymce/plugins/spellchecker/plugin.js +0 -723
  529. package/dist/components/Editor/tinymce/plugins/tabfocus/plugin.d.ts +0 -0
  530. package/dist/components/Editor/tinymce/plugins/tabfocus/plugin.js +0 -124
  531. package/dist/components/Editor/tinymce/plugins/table/plugin.d.ts +0 -0
  532. package/dist/components/Editor/tinymce/plugins/table/plugin.js +0 -10853
  533. package/dist/components/Editor/tinymce/plugins/template/plugin.d.ts +0 -0
  534. package/dist/components/Editor/tinymce/plugins/template/plugin.js +0 -561
  535. package/dist/components/Editor/tinymce/plugins/textcolor/plugin.d.ts +0 -0
  536. package/dist/components/Editor/tinymce/plugins/textpattern/plugin.d.ts +0 -0
  537. package/dist/components/Editor/tinymce/plugins/textpattern/plugin.js +0 -1393
  538. package/dist/components/Editor/tinymce/plugins/toc/plugin.d.ts +0 -0
  539. package/dist/components/Editor/tinymce/plugins/toc/plugin.js +0 -227
  540. package/dist/components/Editor/tinymce/plugins/visualblocks/plugin.d.ts +0 -0
  541. package/dist/components/Editor/tinymce/plugins/visualblocks/plugin.js +0 -94
  542. package/dist/components/Editor/tinymce/plugins/visualchars/plugin.d.ts +0 -0
  543. package/dist/components/Editor/tinymce/plugins/visualchars/plugin.js +0 -521
  544. package/dist/components/Editor/tinymce/plugins/wordcount/plugin.d.ts +0 -0
  545. package/dist/components/Editor/tinymce/plugins/wordcount/plugin.js +0 -397
  546. package/dist/components/Editor/tinymce/themes/mobile/theme.js +0 -13348
  547. package/dist/components/Editor/tinymce/themes/silver/theme.js +0 -32028
  548. package/dist/components/Editor/tinymce/tinymce.js +0 -30486
  549. package/dist/components/FilePreparer/worker.d.ts +0 -2
  550. package/dist/components/FilePreparer/worker.js +0 -31
  551. package/dist/convertReacticons.d.ts +0 -1
  552. package/dist/convertReacticons.js +0 -62
  553. package/dist/utils/Fields.d.ts +0 -0
  554. package/dist/utils/Fields.js +0 -1
@@ -0,0 +1,1764 @@
1
+ /**
2
+ * Copyright (c) Tiny Technologies, Inc. All rights reserved.
3
+ * Licensed under the LGPL or a commercial license.
4
+ * For LGPL see License.txt in the project root for license information.
5
+ * For commercial licenses see https://www.tiny.cloud/
6
+ *
7
+ * Version: 5.9.0 (TBD)
8
+ */
9
+ (function () {
10
+ 'use strict';
11
+
12
+ var Cell = function (initial) {
13
+ var value = initial;
14
+ var get = function () {
15
+ return value;
16
+ };
17
+ var set = function (v) {
18
+ value = v;
19
+ };
20
+ return {
21
+ get: get,
22
+ set: set
23
+ };
24
+ };
25
+
26
+ var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
27
+
28
+ var hasProPlugin = function (editor) {
29
+ if (editor.hasPlugin('powerpaste', true)) {
30
+ if (typeof window.console !== 'undefined' && window.console.log) {
31
+ window.console.log('PowerPaste is incompatible with Paste plugin! Remove \'paste\' from the \'plugins\' option.');
32
+ }
33
+ return true;
34
+ } else {
35
+ return false;
36
+ }
37
+ };
38
+
39
+ var get = function (clipboard, quirks) {
40
+ return {
41
+ clipboard: clipboard,
42
+ quirks: quirks
43
+ };
44
+ };
45
+
46
+ var isSimpleType = function (type) {
47
+ return function (value) {
48
+ return typeof value === type;
49
+ };
50
+ };
51
+ var isNullable = function (a) {
52
+ return a === null || a === undefined;
53
+ };
54
+ var isNonNullable = function (a) {
55
+ return !isNullable(a);
56
+ };
57
+ var isFunction = isSimpleType('function');
58
+
59
+ var noop = function () {
60
+ };
61
+ var constant = function (value) {
62
+ return function () {
63
+ return value;
64
+ };
65
+ };
66
+ var never = constant(false);
67
+ var always = constant(true);
68
+
69
+ var none = function () {
70
+ return NONE;
71
+ };
72
+ var NONE = function () {
73
+ var eq = function (o) {
74
+ return o.isNone();
75
+ };
76
+ var call = function (thunk) {
77
+ return thunk();
78
+ };
79
+ var id = function (n) {
80
+ return n;
81
+ };
82
+ var me = {
83
+ fold: function (n, _s) {
84
+ return n();
85
+ },
86
+ is: never,
87
+ isSome: never,
88
+ isNone: always,
89
+ getOr: id,
90
+ getOrThunk: call,
91
+ getOrDie: function (msg) {
92
+ throw new Error(msg || 'error: getOrDie called on none.');
93
+ },
94
+ getOrNull: constant(null),
95
+ getOrUndefined: constant(undefined),
96
+ or: id,
97
+ orThunk: call,
98
+ map: none,
99
+ each: noop,
100
+ bind: none,
101
+ exists: never,
102
+ forall: always,
103
+ filter: none,
104
+ equals: eq,
105
+ equals_: eq,
106
+ toArray: function () {
107
+ return [];
108
+ },
109
+ toString: constant('none()')
110
+ };
111
+ return me;
112
+ }();
113
+ var some = function (a) {
114
+ var constant_a = constant(a);
115
+ var self = function () {
116
+ return me;
117
+ };
118
+ var bind = function (f) {
119
+ return f(a);
120
+ };
121
+ var me = {
122
+ fold: function (n, s) {
123
+ return s(a);
124
+ },
125
+ is: function (v) {
126
+ return a === v;
127
+ },
128
+ isSome: always,
129
+ isNone: never,
130
+ getOr: constant_a,
131
+ getOrThunk: constant_a,
132
+ getOrDie: constant_a,
133
+ getOrNull: constant_a,
134
+ getOrUndefined: constant_a,
135
+ or: self,
136
+ orThunk: self,
137
+ map: function (f) {
138
+ return some(f(a));
139
+ },
140
+ each: function (f) {
141
+ f(a);
142
+ },
143
+ bind: bind,
144
+ exists: bind,
145
+ forall: bind,
146
+ filter: function (f) {
147
+ return f(a) ? me : NONE;
148
+ },
149
+ toArray: function () {
150
+ return [a];
151
+ },
152
+ toString: function () {
153
+ return 'some(' + a + ')';
154
+ },
155
+ equals: function (o) {
156
+ return o.is(a);
157
+ },
158
+ equals_: function (o, elementEq) {
159
+ return o.fold(never, function (b) {
160
+ return elementEq(a, b);
161
+ });
162
+ }
163
+ };
164
+ return me;
165
+ };
166
+ var from = function (value) {
167
+ return value === null || value === undefined ? NONE : some(value);
168
+ };
169
+ var Optional = {
170
+ some: some,
171
+ none: none,
172
+ from: from
173
+ };
174
+
175
+ var nativeSlice = Array.prototype.slice;
176
+ var exists = function (xs, pred) {
177
+ for (var i = 0, len = xs.length; i < len; i++) {
178
+ var x = xs[i];
179
+ if (pred(x, i)) {
180
+ return true;
181
+ }
182
+ }
183
+ return false;
184
+ };
185
+ var map = function (xs, f) {
186
+ var len = xs.length;
187
+ var r = new Array(len);
188
+ for (var i = 0; i < len; i++) {
189
+ var x = xs[i];
190
+ r[i] = f(x, i);
191
+ }
192
+ return r;
193
+ };
194
+ var each = function (xs, f) {
195
+ for (var i = 0, len = xs.length; i < len; i++) {
196
+ var x = xs[i];
197
+ f(x, i);
198
+ }
199
+ };
200
+ var filter = function (xs, pred) {
201
+ var r = [];
202
+ for (var i = 0, len = xs.length; i < len; i++) {
203
+ var x = xs[i];
204
+ if (pred(x, i)) {
205
+ r.push(x);
206
+ }
207
+ }
208
+ return r;
209
+ };
210
+ var foldl = function (xs, f, acc) {
211
+ each(xs, function (x) {
212
+ acc = f(acc, x);
213
+ });
214
+ return acc;
215
+ };
216
+ var from$1 = isFunction(Array.from) ? Array.from : function (x) {
217
+ return nativeSlice.call(x);
218
+ };
219
+
220
+ var value = function () {
221
+ var subject = Cell(Optional.none());
222
+ var clear = function () {
223
+ return subject.set(Optional.none());
224
+ };
225
+ var set = function (s) {
226
+ return subject.set(Optional.some(s));
227
+ };
228
+ var isSet = function () {
229
+ return subject.get().isSome();
230
+ };
231
+ var on = function (f) {
232
+ return subject.get().each(f);
233
+ };
234
+ return {
235
+ clear: clear,
236
+ set: set,
237
+ isSet: isSet,
238
+ on: on
239
+ };
240
+ };
241
+
242
+ var checkRange = function (str, substr, start) {
243
+ return substr === '' || str.length >= substr.length && str.substr(start, start + substr.length) === substr;
244
+ };
245
+ var startsWith = function (str, prefix) {
246
+ return checkRange(str, prefix, 0);
247
+ };
248
+ var endsWith = function (str, suffix) {
249
+ return checkRange(str, suffix, str.length - suffix.length);
250
+ };
251
+ var repeat = function (s, count) {
252
+ return count <= 0 ? '' : new Array(count + 1).join(s);
253
+ };
254
+
255
+ var global$1 = tinymce.util.Tools.resolve('tinymce.Env');
256
+
257
+ var global$2 = tinymce.util.Tools.resolve('tinymce.util.Delay');
258
+
259
+ var global$3 = tinymce.util.Tools.resolve('tinymce.util.Promise');
260
+
261
+ var global$4 = tinymce.util.Tools.resolve('tinymce.util.VK');
262
+
263
+ var firePastePreProcess = function (editor, html, internal, isWordHtml) {
264
+ return editor.fire('PastePreProcess', {
265
+ content: html,
266
+ internal: internal,
267
+ wordContent: isWordHtml
268
+ });
269
+ };
270
+ var firePastePostProcess = function (editor, node, internal, isWordHtml) {
271
+ return editor.fire('PastePostProcess', {
272
+ node: node,
273
+ internal: internal,
274
+ wordContent: isWordHtml
275
+ });
276
+ };
277
+ var firePastePlainTextToggle = function (editor, state) {
278
+ return editor.fire('PastePlainTextToggle', { state: state });
279
+ };
280
+ var firePaste = function (editor, ieFake) {
281
+ return editor.fire('paste', { ieFake: ieFake });
282
+ };
283
+
284
+ var global$5 = tinymce.util.Tools.resolve('tinymce.util.Tools');
285
+
286
+ var shouldBlockDrop = function (editor) {
287
+ return editor.getParam('paste_block_drop', false);
288
+ };
289
+ var shouldPasteDataImages = function (editor) {
290
+ return editor.getParam('paste_data_images', false);
291
+ };
292
+ var shouldFilterDrop = function (editor) {
293
+ return editor.getParam('paste_filter_drop', true);
294
+ };
295
+ var getPreProcess = function (editor) {
296
+ return editor.getParam('paste_preprocess');
297
+ };
298
+ var getPostProcess = function (editor) {
299
+ return editor.getParam('paste_postprocess');
300
+ };
301
+ var getWebkitStyles = function (editor) {
302
+ return editor.getParam('paste_webkit_styles');
303
+ };
304
+ var shouldRemoveWebKitStyles = function (editor) {
305
+ return editor.getParam('paste_remove_styles_if_webkit', true);
306
+ };
307
+ var shouldMergeFormats = function (editor) {
308
+ return editor.getParam('paste_merge_formats', true);
309
+ };
310
+ var isSmartPasteEnabled = function (editor) {
311
+ return editor.getParam('smart_paste', true);
312
+ };
313
+ var isPasteAsTextEnabled = function (editor) {
314
+ return editor.getParam('paste_as_text', false);
315
+ };
316
+ var getRetainStyleProps = function (editor) {
317
+ return editor.getParam('paste_retain_style_properties');
318
+ };
319
+ var getWordValidElements = function (editor) {
320
+ var defaultValidElements = '-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,' + '-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,' + 'td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody';
321
+ return editor.getParam('paste_word_valid_elements', defaultValidElements);
322
+ };
323
+ var shouldConvertWordFakeLists = function (editor) {
324
+ return editor.getParam('paste_convert_word_fake_lists', true);
325
+ };
326
+ var shouldUseDefaultFilters = function (editor) {
327
+ return editor.getParam('paste_enable_default_filters', true);
328
+ };
329
+ var getValidate = function (editor) {
330
+ return editor.getParam('validate');
331
+ };
332
+ var getAllowHtmlDataUrls = function (editor) {
333
+ return editor.getParam('allow_html_data_urls', false, 'boolean');
334
+ };
335
+ var getPasteDataImages = function (editor) {
336
+ return editor.getParam('paste_data_images', false, 'boolean');
337
+ };
338
+ var getImagesDataImgFilter = function (editor) {
339
+ return editor.getParam('images_dataimg_filter');
340
+ };
341
+ var getImagesReuseFilename = function (editor) {
342
+ return editor.getParam('images_reuse_filename');
343
+ };
344
+ var getForcedRootBlock = function (editor) {
345
+ return editor.getParam('forced_root_block');
346
+ };
347
+ var getForcedRootBlockAttrs = function (editor) {
348
+ return editor.getParam('forced_root_block_attrs');
349
+ };
350
+ var getTabSpaces = function (editor) {
351
+ return editor.getParam('paste_tab_spaces', 4, 'number');
352
+ };
353
+ var getAllowedImageFileTypes = function (editor) {
354
+ var defaultImageFileTypes = 'jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp';
355
+ return global$5.explode(editor.getParam('images_file_types', defaultImageFileTypes, 'string'));
356
+ };
357
+
358
+ var internalMimeType = 'x-tinymce/html';
359
+ var internalMark = '<!-- ' + internalMimeType + ' -->';
360
+ var mark = function (html) {
361
+ return internalMark + html;
362
+ };
363
+ var unmark = function (html) {
364
+ return html.replace(internalMark, '');
365
+ };
366
+ var isMarked = function (html) {
367
+ return html.indexOf(internalMark) !== -1;
368
+ };
369
+ var internalHtmlMime = function () {
370
+ return internalMimeType;
371
+ };
372
+
373
+ var global$6 = tinymce.util.Tools.resolve('tinymce.html.Entities');
374
+
375
+ var isPlainText = function (text) {
376
+ return !/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(text);
377
+ };
378
+ var toBRs = function (text) {
379
+ return text.replace(/\r?\n/g, '<br>');
380
+ };
381
+ var openContainer = function (rootTag, rootAttrs) {
382
+ var key;
383
+ var attrs = [];
384
+ var tag = '<' + rootTag;
385
+ if (typeof rootAttrs === 'object') {
386
+ for (key in rootAttrs) {
387
+ if (rootAttrs.hasOwnProperty(key)) {
388
+ attrs.push(key + '="' + global$6.encodeAllRaw(rootAttrs[key]) + '"');
389
+ }
390
+ }
391
+ if (attrs.length) {
392
+ tag += ' ' + attrs.join(' ');
393
+ }
394
+ }
395
+ return tag + '>';
396
+ };
397
+ var toBlockElements = function (text, rootTag, rootAttrs) {
398
+ var blocks = text.split(/\n\n/);
399
+ var tagOpen = openContainer(rootTag, rootAttrs);
400
+ var tagClose = '</' + rootTag + '>';
401
+ var paragraphs = global$5.map(blocks, function (p) {
402
+ return p.split(/\n/).join('<br />');
403
+ });
404
+ var stitch = function (p) {
405
+ return tagOpen + p + tagClose;
406
+ };
407
+ return paragraphs.length === 1 ? paragraphs[0] : global$5.map(paragraphs, stitch).join('');
408
+ };
409
+ var convert = function (text, rootTag, rootAttrs) {
410
+ return rootTag ? toBlockElements(text, rootTag === true ? 'p' : rootTag, rootAttrs) : toBRs(text);
411
+ };
412
+
413
+ var global$7 = tinymce.util.Tools.resolve('tinymce.html.DomParser');
414
+
415
+ var global$8 = tinymce.util.Tools.resolve('tinymce.html.Serializer');
416
+
417
+ var nbsp = '\xA0';
418
+
419
+ var global$9 = tinymce.util.Tools.resolve('tinymce.html.Node');
420
+
421
+ var global$a = tinymce.util.Tools.resolve('tinymce.html.Schema');
422
+
423
+ var filter$1 = function (content, items) {
424
+ global$5.each(items, function (v) {
425
+ if (v.constructor === RegExp) {
426
+ content = content.replace(v, '');
427
+ } else {
428
+ content = content.replace(v[0], v[1]);
429
+ }
430
+ });
431
+ return content;
432
+ };
433
+ var innerText = function (html) {
434
+ var schema = global$a();
435
+ var domParser = global$7({}, schema);
436
+ var text = '';
437
+ var shortEndedElements = schema.getShortEndedElements();
438
+ var ignoreElements = global$5.makeMap('script noscript style textarea video audio iframe object', ' ');
439
+ var blockElements = schema.getBlockElements();
440
+ var walk = function (node) {
441
+ var name = node.name, currentNode = node;
442
+ if (name === 'br') {
443
+ text += '\n';
444
+ return;
445
+ }
446
+ if (name === 'wbr') {
447
+ return;
448
+ }
449
+ if (shortEndedElements[name]) {
450
+ text += ' ';
451
+ }
452
+ if (ignoreElements[name]) {
453
+ text += ' ';
454
+ return;
455
+ }
456
+ if (node.type === 3) {
457
+ text += node.value;
458
+ }
459
+ if (!node.shortEnded) {
460
+ if (node = node.firstChild) {
461
+ do {
462
+ walk(node);
463
+ } while (node = node.next);
464
+ }
465
+ }
466
+ if (blockElements[name] && currentNode.next) {
467
+ text += '\n';
468
+ if (name === 'p') {
469
+ text += '\n';
470
+ }
471
+ }
472
+ };
473
+ html = filter$1(html, [/<!\[[^\]]+\]>/g]);
474
+ walk(domParser.parse(html));
475
+ return text;
476
+ };
477
+ var trimHtml = function (html) {
478
+ var trimSpaces = function (all, s1, s2) {
479
+ if (!s1 && !s2) {
480
+ return ' ';
481
+ }
482
+ return nbsp;
483
+ };
484
+ html = filter$1(html, [
485
+ /^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/ig,
486
+ /<!--StartFragment-->|<!--EndFragment-->/g,
487
+ [
488
+ /( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,
489
+ trimSpaces
490
+ ],
491
+ /<br class="Apple-interchange-newline">/g,
492
+ /<br>$/i
493
+ ]);
494
+ return html;
495
+ };
496
+ var createIdGenerator = function (prefix) {
497
+ var count = 0;
498
+ return function () {
499
+ return prefix + count++;
500
+ };
501
+ };
502
+ var getImageMimeType = function (ext) {
503
+ var lowerExt = ext.toLowerCase();
504
+ var mimeOverrides = {
505
+ jpg: 'jpeg',
506
+ jpe: 'jpeg',
507
+ jfi: 'jpeg',
508
+ jif: 'jpeg',
509
+ jfif: 'jpeg',
510
+ pjpeg: 'jpeg',
511
+ pjp: 'jpeg',
512
+ svg: 'svg+xml'
513
+ };
514
+ return global$5.hasOwn(mimeOverrides, lowerExt) ? 'image/' + mimeOverrides[lowerExt] : 'image/' + lowerExt;
515
+ };
516
+
517
+ var isWordContent = function (content) {
518
+ return /<font face="Times New Roman"|class="?Mso|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument/i.test(content) || /class="OutlineElement/.test(content) || /id="?docs\-internal\-guid\-/.test(content);
519
+ };
520
+ var isNumericList = function (text) {
521
+ var found;
522
+ var patterns = [
523
+ /^[IVXLMCD]+\.[ \u00a0]/,
524
+ /^[ivxlmcd]+\.[ \u00a0]/,
525
+ /^[a-z]{1,2}[\.\)][ \u00a0]/,
526
+ /^[A-Z]{1,2}[\.\)][ \u00a0]/,
527
+ /^[0-9]+\.[ \u00a0]/,
528
+ /^[\u3007\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]+\.[ \u00a0]/,
529
+ /^[\u58f1\u5f10\u53c2\u56db\u4f0d\u516d\u4e03\u516b\u4e5d\u62fe]+\.[ \u00a0]/
530
+ ];
531
+ text = text.replace(/^[\u00a0 ]+/, '');
532
+ global$5.each(patterns, function (pattern) {
533
+ if (pattern.test(text)) {
534
+ found = true;
535
+ return false;
536
+ }
537
+ });
538
+ return found;
539
+ };
540
+ var isBulletList = function (text) {
541
+ return /^[\s\u00a0]*[\u2022\u00b7\u00a7\u25CF]\s*/.test(text);
542
+ };
543
+ var convertFakeListsToProperLists = function (node) {
544
+ var currentListNode, prevListNode, lastLevel = 1;
545
+ var getText = function (node) {
546
+ var txt = '';
547
+ if (node.type === 3) {
548
+ return node.value;
549
+ }
550
+ if (node = node.firstChild) {
551
+ do {
552
+ txt += getText(node);
553
+ } while (node = node.next);
554
+ }
555
+ return txt;
556
+ };
557
+ var trimListStart = function (node, regExp) {
558
+ if (node.type === 3) {
559
+ if (regExp.test(node.value)) {
560
+ node.value = node.value.replace(regExp, '');
561
+ return false;
562
+ }
563
+ }
564
+ if (node = node.firstChild) {
565
+ do {
566
+ if (!trimListStart(node, regExp)) {
567
+ return false;
568
+ }
569
+ } while (node = node.next);
570
+ }
571
+ return true;
572
+ };
573
+ var removeIgnoredNodes = function (node) {
574
+ if (node._listIgnore) {
575
+ node.remove();
576
+ return;
577
+ }
578
+ if (node = node.firstChild) {
579
+ do {
580
+ removeIgnoredNodes(node);
581
+ } while (node = node.next);
582
+ }
583
+ };
584
+ var convertParagraphToLi = function (paragraphNode, listName, start) {
585
+ var level = paragraphNode._listLevel || lastLevel;
586
+ if (level !== lastLevel) {
587
+ if (level < lastLevel) {
588
+ if (currentListNode) {
589
+ currentListNode = currentListNode.parent.parent;
590
+ }
591
+ } else {
592
+ prevListNode = currentListNode;
593
+ currentListNode = null;
594
+ }
595
+ }
596
+ if (!currentListNode || currentListNode.name !== listName) {
597
+ prevListNode = prevListNode || currentListNode;
598
+ currentListNode = new global$9(listName, 1);
599
+ if (start > 1) {
600
+ currentListNode.attr('start', '' + start);
601
+ }
602
+ paragraphNode.wrap(currentListNode);
603
+ } else {
604
+ currentListNode.append(paragraphNode);
605
+ }
606
+ paragraphNode.name = 'li';
607
+ if (level > lastLevel && prevListNode) {
608
+ prevListNode.lastChild.append(currentListNode);
609
+ }
610
+ lastLevel = level;
611
+ removeIgnoredNodes(paragraphNode);
612
+ trimListStart(paragraphNode, /^\u00a0+/);
613
+ trimListStart(paragraphNode, /^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/);
614
+ trimListStart(paragraphNode, /^\u00a0+/);
615
+ };
616
+ var elements = [];
617
+ var child = node.firstChild;
618
+ while (typeof child !== 'undefined' && child !== null) {
619
+ elements.push(child);
620
+ child = child.walk();
621
+ if (child !== null) {
622
+ while (typeof child !== 'undefined' && child.parent !== node) {
623
+ child = child.walk();
624
+ }
625
+ }
626
+ }
627
+ for (var i = 0; i < elements.length; i++) {
628
+ node = elements[i];
629
+ if (node.name === 'p' && node.firstChild) {
630
+ var nodeText = getText(node);
631
+ if (isBulletList(nodeText)) {
632
+ convertParagraphToLi(node, 'ul');
633
+ continue;
634
+ }
635
+ if (isNumericList(nodeText)) {
636
+ var matches = /([0-9]+)\./.exec(nodeText);
637
+ var start = 1;
638
+ if (matches) {
639
+ start = parseInt(matches[1], 10);
640
+ }
641
+ convertParagraphToLi(node, 'ol', start);
642
+ continue;
643
+ }
644
+ if (node._listLevel) {
645
+ convertParagraphToLi(node, 'ul', 1);
646
+ continue;
647
+ }
648
+ currentListNode = null;
649
+ } else {
650
+ prevListNode = currentListNode;
651
+ currentListNode = null;
652
+ }
653
+ }
654
+ };
655
+ var filterStyles = function (editor, validStyles, node, styleValue) {
656
+ var outputStyles = {}, matches;
657
+ var styles = editor.dom.parseStyle(styleValue);
658
+ global$5.each(styles, function (value, name) {
659
+ switch (name) {
660
+ case 'mso-list':
661
+ matches = /\w+ \w+([0-9]+)/i.exec(styleValue);
662
+ if (matches) {
663
+ node._listLevel = parseInt(matches[1], 10);
664
+ }
665
+ if (/Ignore/i.test(value) && node.firstChild) {
666
+ node._listIgnore = true;
667
+ node.firstChild._listIgnore = true;
668
+ }
669
+ break;
670
+ case 'horiz-align':
671
+ name = 'text-align';
672
+ break;
673
+ case 'vert-align':
674
+ name = 'vertical-align';
675
+ break;
676
+ case 'font-color':
677
+ case 'mso-foreground':
678
+ name = 'color';
679
+ break;
680
+ case 'mso-background':
681
+ case 'mso-highlight':
682
+ name = 'background';
683
+ break;
684
+ case 'font-weight':
685
+ case 'font-style':
686
+ if (value !== 'normal') {
687
+ outputStyles[name] = value;
688
+ }
689
+ return;
690
+ case 'mso-element':
691
+ if (/^(comment|comment-list)$/i.test(value)) {
692
+ node.remove();
693
+ return;
694
+ }
695
+ break;
696
+ }
697
+ if (name.indexOf('mso-comment') === 0) {
698
+ node.remove();
699
+ return;
700
+ }
701
+ if (name.indexOf('mso-') === 0) {
702
+ return;
703
+ }
704
+ if (getRetainStyleProps(editor) === 'all' || validStyles && validStyles[name]) {
705
+ outputStyles[name] = value;
706
+ }
707
+ });
708
+ if (/(bold)/i.test(outputStyles['font-weight'])) {
709
+ delete outputStyles['font-weight'];
710
+ node.wrap(new global$9('b', 1));
711
+ }
712
+ if (/(italic)/i.test(outputStyles['font-style'])) {
713
+ delete outputStyles['font-style'];
714
+ node.wrap(new global$9('i', 1));
715
+ }
716
+ outputStyles = editor.dom.serializeStyle(outputStyles, node.name);
717
+ if (outputStyles) {
718
+ return outputStyles;
719
+ }
720
+ return null;
721
+ };
722
+ var filterWordContent = function (editor, content) {
723
+ var validStyles;
724
+ var retainStyleProperties = getRetainStyleProps(editor);
725
+ if (retainStyleProperties) {
726
+ validStyles = global$5.makeMap(retainStyleProperties.split(/[, ]/));
727
+ }
728
+ content = filter$1(content, [
729
+ /<br class="?Apple-interchange-newline"?>/gi,
730
+ /<b[^>]+id="?docs-internal-[^>]*>/gi,
731
+ /<!--[\s\S]+?-->/gi,
732
+ /<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,
733
+ [
734
+ /<(\/?)s>/gi,
735
+ '<$1strike>'
736
+ ],
737
+ [
738
+ /&nbsp;/gi,
739
+ nbsp
740
+ ],
741
+ [
742
+ /<span\s+style\s*=\s*"\s*mso-spacerun\s*:\s*yes\s*;?\s*"\s*>([\s\u00a0]*)<\/span>/gi,
743
+ function (str, spaces) {
744
+ return spaces.length > 0 ? spaces.replace(/./, ' ').slice(Math.floor(spaces.length / 2)).split('').join(nbsp) : '';
745
+ }
746
+ ]
747
+ ]);
748
+ var validElements = getWordValidElements(editor);
749
+ var schema = global$a({
750
+ valid_elements: validElements,
751
+ valid_children: '-li[p]'
752
+ });
753
+ global$5.each(schema.elements, function (rule) {
754
+ if (!rule.attributes.class) {
755
+ rule.attributes.class = {};
756
+ rule.attributesOrder.push('class');
757
+ }
758
+ if (!rule.attributes.style) {
759
+ rule.attributes.style = {};
760
+ rule.attributesOrder.push('style');
761
+ }
762
+ });
763
+ var domParser = global$7({}, schema);
764
+ domParser.addAttributeFilter('style', function (nodes) {
765
+ var i = nodes.length, node;
766
+ while (i--) {
767
+ node = nodes[i];
768
+ node.attr('style', filterStyles(editor, validStyles, node, node.attr('style')));
769
+ if (node.name === 'span' && node.parent && !node.attributes.length) {
770
+ node.unwrap();
771
+ }
772
+ }
773
+ });
774
+ domParser.addAttributeFilter('class', function (nodes) {
775
+ var i = nodes.length, node, className;
776
+ while (i--) {
777
+ node = nodes[i];
778
+ className = node.attr('class');
779
+ if (/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(className)) {
780
+ node.remove();
781
+ }
782
+ node.attr('class', null);
783
+ }
784
+ });
785
+ domParser.addNodeFilter('del', function (nodes) {
786
+ var i = nodes.length;
787
+ while (i--) {
788
+ nodes[i].remove();
789
+ }
790
+ });
791
+ domParser.addNodeFilter('a', function (nodes) {
792
+ var i = nodes.length, node, href, name;
793
+ while (i--) {
794
+ node = nodes[i];
795
+ href = node.attr('href');
796
+ name = node.attr('name');
797
+ if (href && href.indexOf('#_msocom_') !== -1) {
798
+ node.remove();
799
+ continue;
800
+ }
801
+ if (href && href.indexOf('file://') === 0) {
802
+ href = href.split('#')[1];
803
+ if (href) {
804
+ href = '#' + href;
805
+ }
806
+ }
807
+ if (!href && !name) {
808
+ node.unwrap();
809
+ } else {
810
+ if (name && !/^_?(?:toc|edn|ftn)/i.test(name)) {
811
+ node.unwrap();
812
+ continue;
813
+ }
814
+ node.attr({
815
+ href: href,
816
+ name: name
817
+ });
818
+ }
819
+ }
820
+ });
821
+ var rootNode = domParser.parse(content);
822
+ if (shouldConvertWordFakeLists(editor)) {
823
+ convertFakeListsToProperLists(rootNode);
824
+ }
825
+ content = global$8({ validate: getValidate(editor) }, schema).serialize(rootNode);
826
+ return content;
827
+ };
828
+ var preProcess = function (editor, content) {
829
+ return shouldUseDefaultFilters(editor) ? filterWordContent(editor, content) : content;
830
+ };
831
+
832
+ var preProcess$1 = function (editor, html) {
833
+ var parser = global$7({}, editor.schema);
834
+ parser.addNodeFilter('meta', function (nodes) {
835
+ global$5.each(nodes, function (node) {
836
+ node.remove();
837
+ });
838
+ });
839
+ var fragment = parser.parse(html, {
840
+ forced_root_block: false,
841
+ isRootContent: true
842
+ });
843
+ return global$8({ validate: getValidate(editor) }, editor.schema).serialize(fragment);
844
+ };
845
+ var processResult = function (content, cancelled) {
846
+ return {
847
+ content: content,
848
+ cancelled: cancelled
849
+ };
850
+ };
851
+ var postProcessFilter = function (editor, html, internal, isWordHtml) {
852
+ var tempBody = editor.dom.create('div', { style: 'display:none' }, html);
853
+ var postProcessArgs = firePastePostProcess(editor, tempBody, internal, isWordHtml);
854
+ return processResult(postProcessArgs.node.innerHTML, postProcessArgs.isDefaultPrevented());
855
+ };
856
+ var filterContent = function (editor, content, internal, isWordHtml) {
857
+ var preProcessArgs = firePastePreProcess(editor, content, internal, isWordHtml);
858
+ var filteredContent = preProcess$1(editor, preProcessArgs.content);
859
+ if (editor.hasEventListeners('PastePostProcess') && !preProcessArgs.isDefaultPrevented()) {
860
+ return postProcessFilter(editor, filteredContent, internal, isWordHtml);
861
+ } else {
862
+ return processResult(filteredContent, preProcessArgs.isDefaultPrevented());
863
+ }
864
+ };
865
+ var process = function (editor, html, internal) {
866
+ var isWordHtml = isWordContent(html);
867
+ var content = isWordHtml ? preProcess(editor, html) : html;
868
+ return filterContent(editor, content, internal, isWordHtml);
869
+ };
870
+
871
+ var pasteHtml = function (editor, html) {
872
+ editor.insertContent(html, {
873
+ merge: shouldMergeFormats(editor),
874
+ paste: true
875
+ });
876
+ return true;
877
+ };
878
+ var isAbsoluteUrl = function (url) {
879
+ return /^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(url);
880
+ };
881
+ var isImageUrl = function (editor, url) {
882
+ return isAbsoluteUrl(url) && exists(getAllowedImageFileTypes(editor), function (type) {
883
+ return endsWith(url.toLowerCase(), '.' + type.toLowerCase());
884
+ });
885
+ };
886
+ var createImage = function (editor, url, pasteHtmlFn) {
887
+ editor.undoManager.extra(function () {
888
+ pasteHtmlFn(editor, url);
889
+ }, function () {
890
+ editor.insertContent('<img src="' + url + '">');
891
+ });
892
+ return true;
893
+ };
894
+ var createLink = function (editor, url, pasteHtmlFn) {
895
+ editor.undoManager.extra(function () {
896
+ pasteHtmlFn(editor, url);
897
+ }, function () {
898
+ editor.execCommand('mceInsertLink', false, url);
899
+ });
900
+ return true;
901
+ };
902
+ var linkSelection = function (editor, html, pasteHtmlFn) {
903
+ return editor.selection.isCollapsed() === false && isAbsoluteUrl(html) ? createLink(editor, html, pasteHtmlFn) : false;
904
+ };
905
+ var insertImage = function (editor, html, pasteHtmlFn) {
906
+ return isImageUrl(editor, html) ? createImage(editor, html, pasteHtmlFn) : false;
907
+ };
908
+ var smartInsertContent = function (editor, html) {
909
+ global$5.each([
910
+ linkSelection,
911
+ insertImage,
912
+ pasteHtml
913
+ ], function (action) {
914
+ return action(editor, html, pasteHtml) !== true;
915
+ });
916
+ };
917
+ var insertContent = function (editor, html, pasteAsText) {
918
+ if (pasteAsText || isSmartPasteEnabled(editor) === false) {
919
+ pasteHtml(editor, html);
920
+ } else {
921
+ smartInsertContent(editor, html);
922
+ }
923
+ };
924
+
925
+ var isCollapsibleWhitespace = function (c) {
926
+ return ' \f\t\x0B'.indexOf(c) !== -1;
927
+ };
928
+ var isNewLineChar = function (c) {
929
+ return c === '\n' || c === '\r';
930
+ };
931
+ var isNewline = function (text, idx) {
932
+ return idx < text.length && idx >= 0 ? isNewLineChar(text[idx]) : false;
933
+ };
934
+ var normalizeWhitespace = function (editor, text) {
935
+ var tabSpace = repeat(' ', getTabSpaces(editor));
936
+ var normalizedText = text.replace(/\t/g, tabSpace);
937
+ var result = foldl(normalizedText, function (acc, c) {
938
+ if (isCollapsibleWhitespace(c) || c === nbsp) {
939
+ if (acc.pcIsSpace || acc.str === '' || acc.str.length === normalizedText.length - 1 || isNewline(normalizedText, acc.str.length + 1)) {
940
+ return {
941
+ pcIsSpace: false,
942
+ str: acc.str + nbsp
943
+ };
944
+ } else {
945
+ return {
946
+ pcIsSpace: true,
947
+ str: acc.str + ' '
948
+ };
949
+ }
950
+ } else {
951
+ return {
952
+ pcIsSpace: isNewLineChar(c),
953
+ str: acc.str + c
954
+ };
955
+ }
956
+ }, {
957
+ pcIsSpace: false,
958
+ str: ''
959
+ });
960
+ return result.str;
961
+ };
962
+
963
+ var doPaste = function (editor, content, internal, pasteAsText) {
964
+ var args = process(editor, content, internal);
965
+ if (args.cancelled === false) {
966
+ insertContent(editor, args.content, pasteAsText);
967
+ }
968
+ };
969
+ var pasteHtml$1 = function (editor, html, internalFlag) {
970
+ var internal = internalFlag ? internalFlag : isMarked(html);
971
+ doPaste(editor, unmark(html), internal, false);
972
+ };
973
+ var pasteText = function (editor, text) {
974
+ var encodedText = editor.dom.encode(text).replace(/\r\n/g, '\n');
975
+ var normalizedText = normalizeWhitespace(editor, encodedText);
976
+ var html = convert(normalizedText, getForcedRootBlock(editor), getForcedRootBlockAttrs(editor));
977
+ doPaste(editor, html, false, true);
978
+ };
979
+ var getDataTransferItems = function (dataTransfer) {
980
+ var items = {};
981
+ var mceInternalUrlPrefix = 'data:text/mce-internal,';
982
+ if (dataTransfer) {
983
+ if (dataTransfer.getData) {
984
+ var legacyText = dataTransfer.getData('Text');
985
+ if (legacyText && legacyText.length > 0) {
986
+ if (legacyText.indexOf(mceInternalUrlPrefix) === -1) {
987
+ items['text/plain'] = legacyText;
988
+ }
989
+ }
990
+ }
991
+ if (dataTransfer.types) {
992
+ for (var i = 0; i < dataTransfer.types.length; i++) {
993
+ var contentType = dataTransfer.types[i];
994
+ try {
995
+ items[contentType] = dataTransfer.getData(contentType);
996
+ } catch (ex) {
997
+ items[contentType] = '';
998
+ }
999
+ }
1000
+ }
1001
+ }
1002
+ return items;
1003
+ };
1004
+ var getClipboardContent = function (editor, clipboardEvent) {
1005
+ return getDataTransferItems(clipboardEvent.clipboardData || editor.getDoc().dataTransfer);
1006
+ };
1007
+ var hasContentType = function (clipboardContent, mimeType) {
1008
+ return mimeType in clipboardContent && clipboardContent[mimeType].length > 0;
1009
+ };
1010
+ var hasHtmlOrText = function (content) {
1011
+ return hasContentType(content, 'text/html') || hasContentType(content, 'text/plain');
1012
+ };
1013
+ var parseDataUri = function (uri) {
1014
+ var matches = /data:([^;]+);base64,([a-z0-9\+\/=]+)/i.exec(uri);
1015
+ if (matches) {
1016
+ return {
1017
+ type: matches[1],
1018
+ data: decodeURIComponent(matches[2])
1019
+ };
1020
+ } else {
1021
+ return {
1022
+ type: null,
1023
+ data: null
1024
+ };
1025
+ }
1026
+ };
1027
+ var isValidDataUriImage = function (editor, imgElm) {
1028
+ var filter = getImagesDataImgFilter(editor);
1029
+ return filter ? filter(imgElm) : true;
1030
+ };
1031
+ var extractFilename = function (editor, str) {
1032
+ var m = str.match(/([\s\S]+?)(?:\.[a-z0-9.]+)$/i);
1033
+ return isNonNullable(m) ? editor.dom.encode(m[1]) : null;
1034
+ };
1035
+ var uniqueId = createIdGenerator('mceclip');
1036
+ var pasteImage = function (editor, imageItem) {
1037
+ var _a = parseDataUri(imageItem.uri), base64 = _a.data, type = _a.type;
1038
+ var id = uniqueId();
1039
+ var file = imageItem.blob;
1040
+ var img = new Image();
1041
+ img.src = imageItem.uri;
1042
+ if (isValidDataUriImage(editor, img)) {
1043
+ var blobCache = editor.editorUpload.blobCache;
1044
+ var blobInfo = void 0;
1045
+ var existingBlobInfo = blobCache.getByData(base64, type);
1046
+ if (!existingBlobInfo) {
1047
+ var useFileName = getImagesReuseFilename(editor) && isNonNullable(file.name);
1048
+ var name_1 = useFileName ? extractFilename(editor, file.name) : id;
1049
+ var filename = useFileName ? file.name : undefined;
1050
+ blobInfo = blobCache.create(id, file, base64, name_1, filename);
1051
+ blobCache.add(blobInfo);
1052
+ } else {
1053
+ blobInfo = existingBlobInfo;
1054
+ }
1055
+ pasteHtml$1(editor, '<img src="' + blobInfo.blobUri() + '">', false);
1056
+ } else {
1057
+ pasteHtml$1(editor, '<img src="' + imageItem.uri + '">', false);
1058
+ }
1059
+ };
1060
+ var isClipboardEvent = function (event) {
1061
+ return event.type === 'paste';
1062
+ };
1063
+ var isDataTransferItem = function (item) {
1064
+ return isNonNullable(item.getAsFile);
1065
+ };
1066
+ var readFilesAsDataUris = function (items) {
1067
+ return global$3.all(map(items, function (item) {
1068
+ return new global$3(function (resolve) {
1069
+ var blob = isDataTransferItem(item) ? item.getAsFile() : item;
1070
+ var reader = new window.FileReader();
1071
+ reader.onload = function () {
1072
+ resolve({
1073
+ blob: blob,
1074
+ uri: reader.result
1075
+ });
1076
+ };
1077
+ reader.readAsDataURL(blob);
1078
+ });
1079
+ }));
1080
+ };
1081
+ var isImage = function (editor) {
1082
+ var allowedExtensions = getAllowedImageFileTypes(editor);
1083
+ return function (file) {
1084
+ return startsWith(file.type, 'image/') && exists(allowedExtensions, function (extension) {
1085
+ return getImageMimeType(extension) === file.type;
1086
+ });
1087
+ };
1088
+ };
1089
+ var getImagesFromDataTransfer = function (editor, dataTransfer) {
1090
+ var items = dataTransfer.items ? map(from$1(dataTransfer.items), function (item) {
1091
+ return item.getAsFile();
1092
+ }) : [];
1093
+ var files = dataTransfer.files ? from$1(dataTransfer.files) : [];
1094
+ return filter(items.length > 0 ? items : files, isImage(editor));
1095
+ };
1096
+ var pasteImageData = function (editor, e, rng) {
1097
+ var dataTransfer = isClipboardEvent(e) ? e.clipboardData : e.dataTransfer;
1098
+ if (getPasteDataImages(editor) && dataTransfer) {
1099
+ var images = getImagesFromDataTransfer(editor, dataTransfer);
1100
+ if (images.length > 0) {
1101
+ e.preventDefault();
1102
+ readFilesAsDataUris(images).then(function (fileResults) {
1103
+ if (rng) {
1104
+ editor.selection.setRng(rng);
1105
+ }
1106
+ each(fileResults, function (result) {
1107
+ pasteImage(editor, result);
1108
+ });
1109
+ });
1110
+ return true;
1111
+ }
1112
+ }
1113
+ return false;
1114
+ };
1115
+ var isBrokenAndroidClipboardEvent = function (e) {
1116
+ var clipboardData = e.clipboardData;
1117
+ return navigator.userAgent.indexOf('Android') !== -1 && clipboardData && clipboardData.items && clipboardData.items.length === 0;
1118
+ };
1119
+ var isKeyboardPasteEvent = function (e) {
1120
+ return global$4.metaKeyPressed(e) && e.keyCode === 86 || e.shiftKey && e.keyCode === 45;
1121
+ };
1122
+ var registerEventHandlers = function (editor, pasteBin, pasteFormat) {
1123
+ var keyboardPasteEvent = value();
1124
+ var keyboardPastePressed = value();
1125
+ var keyboardPastePlainTextState;
1126
+ editor.on('keyup', keyboardPastePressed.clear);
1127
+ editor.on('keydown', function (e) {
1128
+ var removePasteBinOnKeyUp = function (e) {
1129
+ if (isKeyboardPasteEvent(e) && !e.isDefaultPrevented()) {
1130
+ pasteBin.remove();
1131
+ }
1132
+ };
1133
+ if (isKeyboardPasteEvent(e) && !e.isDefaultPrevented()) {
1134
+ keyboardPastePlainTextState = e.shiftKey && e.keyCode === 86;
1135
+ if (keyboardPastePlainTextState && global$1.webkit && navigator.userAgent.indexOf('Version/') !== -1) {
1136
+ return;
1137
+ }
1138
+ e.stopImmediatePropagation();
1139
+ keyboardPasteEvent.set(e);
1140
+ keyboardPastePressed.set(true);
1141
+ if (global$1.ie && keyboardPastePlainTextState) {
1142
+ e.preventDefault();
1143
+ firePaste(editor, true);
1144
+ return;
1145
+ }
1146
+ pasteBin.remove();
1147
+ pasteBin.create();
1148
+ editor.once('keyup', removePasteBinOnKeyUp);
1149
+ editor.once('paste', function () {
1150
+ editor.off('keyup', removePasteBinOnKeyUp);
1151
+ });
1152
+ }
1153
+ });
1154
+ var insertClipboardContent = function (editor, clipboardContent, isKeyBoardPaste, plainTextMode, internal) {
1155
+ var content;
1156
+ if (hasContentType(clipboardContent, 'text/html')) {
1157
+ content = clipboardContent['text/html'];
1158
+ } else {
1159
+ content = pasteBin.getHtml();
1160
+ internal = internal ? internal : isMarked(content);
1161
+ if (pasteBin.isDefaultContent(content)) {
1162
+ plainTextMode = true;
1163
+ }
1164
+ }
1165
+ content = trimHtml(content);
1166
+ pasteBin.remove();
1167
+ var isPlainTextHtml = internal === false && isPlainText(content);
1168
+ var isImage = isImageUrl(editor, content);
1169
+ if (!content.length || isPlainTextHtml && !isImage) {
1170
+ plainTextMode = true;
1171
+ }
1172
+ if (plainTextMode || isImage) {
1173
+ if (hasContentType(clipboardContent, 'text/plain') && isPlainTextHtml) {
1174
+ content = clipboardContent['text/plain'];
1175
+ } else {
1176
+ content = innerText(content);
1177
+ }
1178
+ }
1179
+ if (pasteBin.isDefaultContent(content)) {
1180
+ if (!isKeyBoardPaste) {
1181
+ editor.windowManager.alert('Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents.');
1182
+ }
1183
+ return;
1184
+ }
1185
+ if (plainTextMode) {
1186
+ pasteText(editor, content);
1187
+ } else {
1188
+ pasteHtml$1(editor, content, internal);
1189
+ }
1190
+ };
1191
+ var getLastRng = function () {
1192
+ return pasteBin.getLastRng() || editor.selection.getRng();
1193
+ };
1194
+ editor.on('paste', function (e) {
1195
+ var isKeyboardPaste = keyboardPasteEvent.isSet() || keyboardPastePressed.isSet();
1196
+ if (isKeyboardPaste) {
1197
+ keyboardPasteEvent.clear();
1198
+ }
1199
+ var clipboardContent = getClipboardContent(editor, e);
1200
+ var plainTextMode = pasteFormat.get() === 'text' || keyboardPastePlainTextState;
1201
+ var internal = hasContentType(clipboardContent, internalHtmlMime());
1202
+ keyboardPastePlainTextState = false;
1203
+ if (e.isDefaultPrevented() || isBrokenAndroidClipboardEvent(e)) {
1204
+ pasteBin.remove();
1205
+ return;
1206
+ }
1207
+ if (!hasHtmlOrText(clipboardContent) && pasteImageData(editor, e, getLastRng())) {
1208
+ pasteBin.remove();
1209
+ return;
1210
+ }
1211
+ if (!isKeyboardPaste) {
1212
+ e.preventDefault();
1213
+ }
1214
+ if (global$1.ie && (!isKeyboardPaste || e.ieFake) && !hasContentType(clipboardContent, 'text/html')) {
1215
+ pasteBin.create();
1216
+ editor.dom.bind(pasteBin.getEl(), 'paste', function (e) {
1217
+ e.stopPropagation();
1218
+ });
1219
+ editor.getDoc().execCommand('Paste', false, null);
1220
+ clipboardContent['text/html'] = pasteBin.getHtml();
1221
+ }
1222
+ if (hasContentType(clipboardContent, 'text/html')) {
1223
+ e.preventDefault();
1224
+ if (!internal) {
1225
+ internal = isMarked(clipboardContent['text/html']);
1226
+ }
1227
+ insertClipboardContent(editor, clipboardContent, isKeyboardPaste, plainTextMode, internal);
1228
+ } else {
1229
+ global$2.setEditorTimeout(editor, function () {
1230
+ insertClipboardContent(editor, clipboardContent, isKeyboardPaste, plainTextMode, internal);
1231
+ }, 0);
1232
+ }
1233
+ });
1234
+ };
1235
+ var registerEventsAndFilters = function (editor, pasteBin, pasteFormat) {
1236
+ registerEventHandlers(editor, pasteBin, pasteFormat);
1237
+ var src;
1238
+ editor.parser.addNodeFilter('img', function (nodes, name, args) {
1239
+ var isPasteInsert = function (args) {
1240
+ return args.data && args.data.paste === true;
1241
+ };
1242
+ var remove = function (node) {
1243
+ if (!node.attr('data-mce-object') && src !== global$1.transparentSrc) {
1244
+ node.remove();
1245
+ }
1246
+ };
1247
+ var isWebKitFakeUrl = function (src) {
1248
+ return src.indexOf('webkit-fake-url') === 0;
1249
+ };
1250
+ var isDataUri = function (src) {
1251
+ return src.indexOf('data:') === 0;
1252
+ };
1253
+ if (!getPasteDataImages(editor) && isPasteInsert(args)) {
1254
+ var i = nodes.length;
1255
+ while (i--) {
1256
+ src = nodes[i].attr('src');
1257
+ if (!src) {
1258
+ continue;
1259
+ }
1260
+ if (isWebKitFakeUrl(src)) {
1261
+ remove(nodes[i]);
1262
+ } else if (!getAllowHtmlDataUrls(editor) && isDataUri(src)) {
1263
+ remove(nodes[i]);
1264
+ }
1265
+ }
1266
+ }
1267
+ });
1268
+ };
1269
+
1270
+ var getPasteBinParent = function (editor) {
1271
+ return global$1.ie && editor.inline ? document.body : editor.getBody();
1272
+ };
1273
+ var isExternalPasteBin = function (editor) {
1274
+ return getPasteBinParent(editor) !== editor.getBody();
1275
+ };
1276
+ var delegatePasteEvents = function (editor, pasteBinElm, pasteBinDefaultContent) {
1277
+ if (isExternalPasteBin(editor)) {
1278
+ editor.dom.bind(pasteBinElm, 'paste keyup', function (_e) {
1279
+ if (!isDefault(editor, pasteBinDefaultContent)) {
1280
+ editor.fire('paste');
1281
+ }
1282
+ });
1283
+ }
1284
+ };
1285
+ var create = function (editor, lastRngCell, pasteBinDefaultContent) {
1286
+ var dom = editor.dom, body = editor.getBody();
1287
+ lastRngCell.set(editor.selection.getRng());
1288
+ var pasteBinElm = editor.dom.add(getPasteBinParent(editor), 'div', {
1289
+ 'id': 'mcepastebin',
1290
+ 'class': 'mce-pastebin',
1291
+ 'contentEditable': true,
1292
+ 'data-mce-bogus': 'all',
1293
+ 'style': 'position: fixed; top: 50%; width: 10px; height: 10px; overflow: hidden; opacity: 0'
1294
+ }, pasteBinDefaultContent);
1295
+ if (global$1.ie || global$1.gecko) {
1296
+ dom.setStyle(pasteBinElm, 'left', dom.getStyle(body, 'direction', true) === 'rtl' ? 65535 : -65535);
1297
+ }
1298
+ dom.bind(pasteBinElm, 'beforedeactivate focusin focusout', function (e) {
1299
+ e.stopPropagation();
1300
+ });
1301
+ delegatePasteEvents(editor, pasteBinElm, pasteBinDefaultContent);
1302
+ pasteBinElm.focus();
1303
+ editor.selection.select(pasteBinElm, true);
1304
+ };
1305
+ var remove = function (editor, lastRngCell) {
1306
+ if (getEl(editor)) {
1307
+ var pasteBinClone = void 0;
1308
+ var lastRng = lastRngCell.get();
1309
+ while (pasteBinClone = editor.dom.get('mcepastebin')) {
1310
+ editor.dom.remove(pasteBinClone);
1311
+ editor.dom.unbind(pasteBinClone);
1312
+ }
1313
+ if (lastRng) {
1314
+ editor.selection.setRng(lastRng);
1315
+ }
1316
+ }
1317
+ lastRngCell.set(null);
1318
+ };
1319
+ var getEl = function (editor) {
1320
+ return editor.dom.get('mcepastebin');
1321
+ };
1322
+ var getHtml = function (editor) {
1323
+ var copyAndRemove = function (toElm, fromElm) {
1324
+ toElm.appendChild(fromElm);
1325
+ editor.dom.remove(fromElm, true);
1326
+ };
1327
+ var pasteBinClones = global$5.grep(getPasteBinParent(editor).childNodes, function (elm) {
1328
+ return elm.id === 'mcepastebin';
1329
+ });
1330
+ var pasteBinElm = pasteBinClones.shift();
1331
+ global$5.each(pasteBinClones, function (pasteBinClone) {
1332
+ copyAndRemove(pasteBinElm, pasteBinClone);
1333
+ });
1334
+ var dirtyWrappers = editor.dom.select('div[id=mcepastebin]', pasteBinElm);
1335
+ for (var i = dirtyWrappers.length - 1; i >= 0; i--) {
1336
+ var cleanWrapper = editor.dom.create('div');
1337
+ pasteBinElm.insertBefore(cleanWrapper, dirtyWrappers[i]);
1338
+ copyAndRemove(cleanWrapper, dirtyWrappers[i]);
1339
+ }
1340
+ return pasteBinElm ? pasteBinElm.innerHTML : '';
1341
+ };
1342
+ var getLastRng = function (lastRng) {
1343
+ return lastRng.get();
1344
+ };
1345
+ var isDefaultContent = function (pasteBinDefaultContent, content) {
1346
+ return content === pasteBinDefaultContent;
1347
+ };
1348
+ var isPasteBin = function (elm) {
1349
+ return elm && elm.id === 'mcepastebin';
1350
+ };
1351
+ var isDefault = function (editor, pasteBinDefaultContent) {
1352
+ var pasteBinElm = getEl(editor);
1353
+ return isPasteBin(pasteBinElm) && isDefaultContent(pasteBinDefaultContent, pasteBinElm.innerHTML);
1354
+ };
1355
+ var PasteBin = function (editor) {
1356
+ var lastRng = Cell(null);
1357
+ var pasteBinDefaultContent = '%MCEPASTEBIN%';
1358
+ return {
1359
+ create: function () {
1360
+ return create(editor, lastRng, pasteBinDefaultContent);
1361
+ },
1362
+ remove: function () {
1363
+ return remove(editor, lastRng);
1364
+ },
1365
+ getEl: function () {
1366
+ return getEl(editor);
1367
+ },
1368
+ getHtml: function () {
1369
+ return getHtml(editor);
1370
+ },
1371
+ getLastRng: function () {
1372
+ return getLastRng(lastRng);
1373
+ },
1374
+ isDefault: function () {
1375
+ return isDefault(editor, pasteBinDefaultContent);
1376
+ },
1377
+ isDefaultContent: function (content) {
1378
+ return isDefaultContent(pasteBinDefaultContent, content);
1379
+ }
1380
+ };
1381
+ };
1382
+
1383
+ var Clipboard = function (editor, pasteFormat) {
1384
+ var pasteBin = PasteBin(editor);
1385
+ editor.on('PreInit', function () {
1386
+ return registerEventsAndFilters(editor, pasteBin, pasteFormat);
1387
+ });
1388
+ return {
1389
+ pasteFormat: pasteFormat,
1390
+ pasteHtml: function (html, internalFlag) {
1391
+ return pasteHtml$1(editor, html, internalFlag);
1392
+ },
1393
+ pasteText: function (text) {
1394
+ return pasteText(editor, text);
1395
+ },
1396
+ pasteImageData: function (e, rng) {
1397
+ return pasteImageData(editor, e, rng);
1398
+ },
1399
+ getDataTransferItems: getDataTransferItems,
1400
+ hasHtmlOrText: hasHtmlOrText,
1401
+ hasContentType: hasContentType
1402
+ };
1403
+ };
1404
+
1405
+ var togglePlainTextPaste = function (editor, clipboard) {
1406
+ if (clipboard.pasteFormat.get() === 'text') {
1407
+ clipboard.pasteFormat.set('html');
1408
+ firePastePlainTextToggle(editor, false);
1409
+ } else {
1410
+ clipboard.pasteFormat.set('text');
1411
+ firePastePlainTextToggle(editor, true);
1412
+ }
1413
+ editor.focus();
1414
+ };
1415
+
1416
+ var register = function (editor, clipboard) {
1417
+ editor.addCommand('mceTogglePlainTextPaste', function () {
1418
+ togglePlainTextPaste(editor, clipboard);
1419
+ });
1420
+ editor.addCommand('mceInsertClipboardContent', function (ui, value) {
1421
+ if (value.content) {
1422
+ clipboard.pasteHtml(value.content, value.internal);
1423
+ }
1424
+ if (value.text) {
1425
+ clipboard.pasteText(value.text);
1426
+ }
1427
+ });
1428
+ };
1429
+
1430
+ var hasWorkingClipboardApi = function (clipboardData) {
1431
+ return global$1.iOS === false && typeof (clipboardData === null || clipboardData === void 0 ? void 0 : clipboardData.setData) === 'function';
1432
+ };
1433
+ var setHtml5Clipboard = function (clipboardData, html, text) {
1434
+ if (hasWorkingClipboardApi(clipboardData)) {
1435
+ try {
1436
+ clipboardData.clearData();
1437
+ clipboardData.setData('text/html', html);
1438
+ clipboardData.setData('text/plain', text);
1439
+ clipboardData.setData(internalHtmlMime(), html);
1440
+ return true;
1441
+ } catch (e) {
1442
+ return false;
1443
+ }
1444
+ } else {
1445
+ return false;
1446
+ }
1447
+ };
1448
+ var setClipboardData = function (evt, data, fallback, done) {
1449
+ if (setHtml5Clipboard(evt.clipboardData, data.html, data.text)) {
1450
+ evt.preventDefault();
1451
+ done();
1452
+ } else {
1453
+ fallback(data.html, done);
1454
+ }
1455
+ };
1456
+ var fallback = function (editor) {
1457
+ return function (html, done) {
1458
+ var markedHtml = mark(html);
1459
+ var outer = editor.dom.create('div', {
1460
+ 'contenteditable': 'false',
1461
+ 'data-mce-bogus': 'all'
1462
+ });
1463
+ var inner = editor.dom.create('div', { contenteditable: 'true' }, markedHtml);
1464
+ editor.dom.setStyles(outer, {
1465
+ position: 'fixed',
1466
+ top: '0',
1467
+ left: '-3000px',
1468
+ width: '1000px',
1469
+ overflow: 'hidden'
1470
+ });
1471
+ outer.appendChild(inner);
1472
+ editor.dom.add(editor.getBody(), outer);
1473
+ var range = editor.selection.getRng();
1474
+ inner.focus();
1475
+ var offscreenRange = editor.dom.createRng();
1476
+ offscreenRange.selectNodeContents(inner);
1477
+ editor.selection.setRng(offscreenRange);
1478
+ global$2.setTimeout(function () {
1479
+ editor.selection.setRng(range);
1480
+ outer.parentNode.removeChild(outer);
1481
+ done();
1482
+ }, 0);
1483
+ };
1484
+ };
1485
+ var getData = function (editor) {
1486
+ return {
1487
+ html: editor.selection.getContent({ contextual: true }),
1488
+ text: editor.selection.getContent({ format: 'text' })
1489
+ };
1490
+ };
1491
+ var isTableSelection = function (editor) {
1492
+ return !!editor.dom.getParent(editor.selection.getStart(), 'td[data-mce-selected],th[data-mce-selected]', editor.getBody());
1493
+ };
1494
+ var hasSelectedContent = function (editor) {
1495
+ return !editor.selection.isCollapsed() || isTableSelection(editor);
1496
+ };
1497
+ var cut = function (editor) {
1498
+ return function (evt) {
1499
+ if (hasSelectedContent(editor)) {
1500
+ setClipboardData(evt, getData(editor), fallback(editor), function () {
1501
+ if (global$1.browser.isChrome() || global$1.browser.isFirefox()) {
1502
+ var rng_1 = editor.selection.getRng();
1503
+ global$2.setEditorTimeout(editor, function () {
1504
+ editor.selection.setRng(rng_1);
1505
+ editor.execCommand('Delete');
1506
+ }, 0);
1507
+ } else {
1508
+ editor.execCommand('Delete');
1509
+ }
1510
+ });
1511
+ }
1512
+ };
1513
+ };
1514
+ var copy = function (editor) {
1515
+ return function (evt) {
1516
+ if (hasSelectedContent(editor)) {
1517
+ setClipboardData(evt, getData(editor), fallback(editor), noop);
1518
+ }
1519
+ };
1520
+ };
1521
+ var register$1 = function (editor) {
1522
+ editor.on('cut', cut(editor));
1523
+ editor.on('copy', copy(editor));
1524
+ };
1525
+
1526
+ var global$b = tinymce.util.Tools.resolve('tinymce.dom.RangeUtils');
1527
+
1528
+ var getCaretRangeFromEvent = function (editor, e) {
1529
+ return global$b.getCaretRangeFromPoint(e.clientX, e.clientY, editor.getDoc());
1530
+ };
1531
+ var isPlainTextFileUrl = function (content) {
1532
+ var plainTextContent = content['text/plain'];
1533
+ return plainTextContent ? plainTextContent.indexOf('file://') === 0 : false;
1534
+ };
1535
+ var setFocusedRange = function (editor, rng) {
1536
+ editor.focus();
1537
+ editor.selection.setRng(rng);
1538
+ };
1539
+ var setup = function (editor, clipboard, draggingInternallyState) {
1540
+ if (shouldBlockDrop(editor)) {
1541
+ editor.on('dragend dragover draggesture dragdrop drop drag', function (e) {
1542
+ e.preventDefault();
1543
+ e.stopPropagation();
1544
+ });
1545
+ }
1546
+ if (!shouldPasteDataImages(editor)) {
1547
+ editor.on('drop', function (e) {
1548
+ var dataTransfer = e.dataTransfer;
1549
+ if (dataTransfer && dataTransfer.files && dataTransfer.files.length > 0) {
1550
+ e.preventDefault();
1551
+ }
1552
+ });
1553
+ }
1554
+ editor.on('drop', function (e) {
1555
+ var rng = getCaretRangeFromEvent(editor, e);
1556
+ if (e.isDefaultPrevented() || draggingInternallyState.get()) {
1557
+ return;
1558
+ }
1559
+ var dropContent = clipboard.getDataTransferItems(e.dataTransfer);
1560
+ var internal = clipboard.hasContentType(dropContent, internalHtmlMime());
1561
+ if ((!clipboard.hasHtmlOrText(dropContent) || isPlainTextFileUrl(dropContent)) && clipboard.pasteImageData(e, rng)) {
1562
+ return;
1563
+ }
1564
+ if (rng && shouldFilterDrop(editor)) {
1565
+ var content_1 = dropContent['mce-internal'] || dropContent['text/html'] || dropContent['text/plain'];
1566
+ if (content_1) {
1567
+ e.preventDefault();
1568
+ global$2.setEditorTimeout(editor, function () {
1569
+ editor.undoManager.transact(function () {
1570
+ if (dropContent['mce-internal']) {
1571
+ editor.execCommand('Delete');
1572
+ }
1573
+ setFocusedRange(editor, rng);
1574
+ content_1 = trimHtml(content_1);
1575
+ if (!dropContent['text/html']) {
1576
+ clipboard.pasteText(content_1);
1577
+ } else {
1578
+ clipboard.pasteHtml(content_1, internal);
1579
+ }
1580
+ });
1581
+ });
1582
+ }
1583
+ }
1584
+ });
1585
+ editor.on('dragstart', function (_e) {
1586
+ draggingInternallyState.set(true);
1587
+ });
1588
+ editor.on('dragover dragend', function (e) {
1589
+ if (shouldPasteDataImages(editor) && draggingInternallyState.get() === false) {
1590
+ e.preventDefault();
1591
+ setFocusedRange(editor, getCaretRangeFromEvent(editor, e));
1592
+ }
1593
+ if (e.type === 'dragend') {
1594
+ draggingInternallyState.set(false);
1595
+ }
1596
+ });
1597
+ };
1598
+
1599
+ var setup$1 = function (editor) {
1600
+ var plugin = editor.plugins.paste;
1601
+ var preProcess = getPreProcess(editor);
1602
+ if (preProcess) {
1603
+ editor.on('PastePreProcess', function (e) {
1604
+ preProcess.call(plugin, plugin, e);
1605
+ });
1606
+ }
1607
+ var postProcess = getPostProcess(editor);
1608
+ if (postProcess) {
1609
+ editor.on('PastePostProcess', function (e) {
1610
+ postProcess.call(plugin, plugin, e);
1611
+ });
1612
+ }
1613
+ };
1614
+
1615
+ var addPreProcessFilter = function (editor, filterFunc) {
1616
+ editor.on('PastePreProcess', function (e) {
1617
+ e.content = filterFunc(editor, e.content, e.internal, e.wordContent);
1618
+ });
1619
+ };
1620
+ var addPostProcessFilter = function (editor, filterFunc) {
1621
+ editor.on('PastePostProcess', function (e) {
1622
+ filterFunc(editor, e.node);
1623
+ });
1624
+ };
1625
+ var removeExplorerBrElementsAfterBlocks = function (editor, html) {
1626
+ if (!isWordContent(html)) {
1627
+ return html;
1628
+ }
1629
+ var blockElements = [];
1630
+ global$5.each(editor.schema.getBlockElements(), function (block, blockName) {
1631
+ blockElements.push(blockName);
1632
+ });
1633
+ var explorerBlocksRegExp = new RegExp('(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*(<\\/?(' + blockElements.join('|') + ')[^>]*>)(?:<br>&nbsp;[\\s\\r\\n]+|<br>)*', 'g');
1634
+ html = filter$1(html, [[
1635
+ explorerBlocksRegExp,
1636
+ '$1'
1637
+ ]]);
1638
+ html = filter$1(html, [
1639
+ [
1640
+ /<br><br>/g,
1641
+ '<BR><BR>'
1642
+ ],
1643
+ [
1644
+ /<br>/g,
1645
+ ' '
1646
+ ],
1647
+ [
1648
+ /<BR><BR>/g,
1649
+ '<br>'
1650
+ ]
1651
+ ]);
1652
+ return html;
1653
+ };
1654
+ var removeWebKitStyles = function (editor, content, internal, isWordHtml) {
1655
+ if (isWordHtml || internal) {
1656
+ return content;
1657
+ }
1658
+ var webKitStylesSetting = getWebkitStyles(editor);
1659
+ var webKitStyles;
1660
+ if (shouldRemoveWebKitStyles(editor) === false || webKitStylesSetting === 'all') {
1661
+ return content;
1662
+ }
1663
+ if (webKitStylesSetting) {
1664
+ webKitStyles = webKitStylesSetting.split(/[, ]/);
1665
+ }
1666
+ if (webKitStyles) {
1667
+ var dom_1 = editor.dom, node_1 = editor.selection.getNode();
1668
+ content = content.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi, function (all, before, value, after) {
1669
+ var inputStyles = dom_1.parseStyle(dom_1.decode(value));
1670
+ var outputStyles = {};
1671
+ if (webKitStyles === 'none') {
1672
+ return before + after;
1673
+ }
1674
+ for (var i = 0; i < webKitStyles.length; i++) {
1675
+ var inputValue = inputStyles[webKitStyles[i]], currentValue = dom_1.getStyle(node_1, webKitStyles[i], true);
1676
+ if (/color/.test(webKitStyles[i])) {
1677
+ inputValue = dom_1.toHex(inputValue);
1678
+ currentValue = dom_1.toHex(currentValue);
1679
+ }
1680
+ if (currentValue !== inputValue) {
1681
+ outputStyles[webKitStyles[i]] = inputValue;
1682
+ }
1683
+ }
1684
+ outputStyles = dom_1.serializeStyle(outputStyles, 'span');
1685
+ if (outputStyles) {
1686
+ return before + ' style="' + outputStyles + '"' + after;
1687
+ }
1688
+ return before + after;
1689
+ });
1690
+ } else {
1691
+ content = content.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi, '$1$3');
1692
+ }
1693
+ content = content.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi, function (all, before, value, after) {
1694
+ return before + ' style="' + value + '"' + after;
1695
+ });
1696
+ return content;
1697
+ };
1698
+ var removeUnderlineAndFontInAnchor = function (editor, root) {
1699
+ editor.$('a', root).find('font,u').each(function (i, node) {
1700
+ editor.dom.remove(node, true);
1701
+ });
1702
+ };
1703
+ var setup$2 = function (editor) {
1704
+ if (global$1.webkit) {
1705
+ addPreProcessFilter(editor, removeWebKitStyles);
1706
+ }
1707
+ if (global$1.ie) {
1708
+ addPreProcessFilter(editor, removeExplorerBrElementsAfterBlocks);
1709
+ addPostProcessFilter(editor, removeUnderlineAndFontInAnchor);
1710
+ }
1711
+ };
1712
+
1713
+ var makeSetupHandler = function (editor, clipboard) {
1714
+ return function (api) {
1715
+ api.setActive(clipboard.pasteFormat.get() === 'text');
1716
+ var pastePlainTextToggleHandler = function (e) {
1717
+ return api.setActive(e.state);
1718
+ };
1719
+ editor.on('PastePlainTextToggle', pastePlainTextToggleHandler);
1720
+ return function () {
1721
+ return editor.off('PastePlainTextToggle', pastePlainTextToggleHandler);
1722
+ };
1723
+ };
1724
+ };
1725
+ var register$2 = function (editor, clipboard) {
1726
+ editor.ui.registry.addToggleButton('pastetext', {
1727
+ active: false,
1728
+ icon: 'paste-text',
1729
+ tooltip: 'Paste as text',
1730
+ onAction: function () {
1731
+ return editor.execCommand('mceTogglePlainTextPaste');
1732
+ },
1733
+ onSetup: makeSetupHandler(editor, clipboard)
1734
+ });
1735
+ editor.ui.registry.addToggleMenuItem('pastetext', {
1736
+ text: 'Paste as text',
1737
+ icon: 'paste-text',
1738
+ onAction: function () {
1739
+ return editor.execCommand('mceTogglePlainTextPaste');
1740
+ },
1741
+ onSetup: makeSetupHandler(editor, clipboard)
1742
+ });
1743
+ };
1744
+
1745
+ function Plugin () {
1746
+ global.add('paste', function (editor) {
1747
+ if (hasProPlugin(editor) === false) {
1748
+ var draggingInternallyState = Cell(false);
1749
+ var pasteFormat = Cell(isPasteAsTextEnabled(editor) ? 'text' : 'html');
1750
+ var clipboard = Clipboard(editor, pasteFormat);
1751
+ var quirks = setup$2(editor);
1752
+ register$2(editor, clipboard);
1753
+ register(editor, clipboard);
1754
+ setup$1(editor);
1755
+ register$1(editor);
1756
+ setup(editor, clipboard, draggingInternallyState);
1757
+ return get(clipboard, quirks);
1758
+ }
1759
+ });
1760
+ }
1761
+
1762
+ Plugin();
1763
+
1764
+ }());