@sapui5/sap.ui.richtexteditor 1.121.0 → 1.121.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (397) hide show
  1. package/package.json +1 -1
  2. package/src/sap/ui/richtexteditor/.library +3 -3
  3. package/src/sap/ui/richtexteditor/RTESplitButton.js +1 -1
  4. package/src/sap/ui/richtexteditor/js/tiny_mce5/icons/default/icons.js +6 -0
  5. package/src/sap/ui/richtexteditor/js/tiny_mce5/icons/default/icons.min.js +6 -0
  6. package/src/sap/ui/richtexteditor/js/tiny_mce5/jquery.tinymce.min.js +5 -2
  7. package/src/sap/ui/richtexteditor/js/tiny_mce5/langs/he_IL.js +420 -1
  8. package/src/sap/ui/richtexteditor/js/tiny_mce5/license.txt +3 -3
  9. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/advcode/license.txt +3 -3
  10. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/advlist/plugin.js +7 -2
  11. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/advlist/plugin.min.js +7 -2
  12. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/anchor/plugin.js +7 -2
  13. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/anchor/plugin.min.js +7 -2
  14. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/autolink/plugin.js +8 -3
  15. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/autolink/plugin.min.js +8 -3
  16. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/autoresize/plugin.js +7 -2
  17. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/autoresize/plugin.min.js +7 -2
  18. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/autosave/plugin.js +7 -2
  19. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/autosave/plugin.min.js +7 -2
  20. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/bbcode/plugin.js +7 -2
  21. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/bbcode/plugin.min.js +7 -2
  22. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/charmap/plugin.js +7 -2
  23. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/charmap/plugin.min.js +7 -2
  24. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/code/plugin.js +7 -2
  25. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/code/plugin.min.js +7 -2
  26. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/codesample/plugin.js +274 -146
  27. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/codesample/plugin.min.js +8 -3
  28. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/colorpicker/plugin.js +7 -2
  29. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/colorpicker/plugin.min.js +7 -2
  30. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/contextmenu/plugin.js +7 -2
  31. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/contextmenu/plugin.min.js +7 -2
  32. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/directionality/plugin.js +7 -2
  33. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/directionality/plugin.min.js +7 -2
  34. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/emoticons/js/emojiimages.js +6 -0
  35. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/emoticons/js/emojiimages.min.js +6 -0
  36. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/emoticons/js/emojis.js +6 -0
  37. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/emoticons/js/emojis.min.js +6 -0
  38. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/emoticons/plugin.js +7 -2
  39. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/emoticons/plugin.min.js +7 -2
  40. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/fullpage/plugin.js +7 -2
  41. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/fullpage/plugin.min.js +7 -2
  42. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/fullscreen/plugin.js +9 -3
  43. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/fullscreen/plugin.min.js +8 -3
  44. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/help/plugin.js +7 -2
  45. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/help/plugin.min.js +7 -2
  46. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/hr/plugin.js +7 -2
  47. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/hr/plugin.min.js +7 -2
  48. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/image/plugin.js +7 -2
  49. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/image/plugin.min.js +7 -2
  50. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/imagetools/plugin.js +7 -2
  51. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/imagetools/plugin.min.js +7 -2
  52. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/importcss/plugin.js +7 -2
  53. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/importcss/plugin.min.js +7 -2
  54. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/insertdatetime/plugin.js +7 -2
  55. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/insertdatetime/plugin.min.js +7 -2
  56. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/legacyoutput/plugin.js +7 -2
  57. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/legacyoutput/plugin.min.js +7 -2
  58. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/link/plugin.js +7 -2
  59. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/link/plugin.min.js +7 -2
  60. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/lists/plugin.js +7 -2
  61. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/lists/plugin.min.js +7 -2
  62. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/media/plugin.js +7 -2
  63. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/media/plugin.min.js +7 -2
  64. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/nonbreaking/plugin.js +7 -2
  65. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/nonbreaking/plugin.min.js +7 -2
  66. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/noneditable/plugin.js +7 -2
  67. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/noneditable/plugin.min.js +7 -2
  68. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/pagebreak/plugin.js +7 -2
  69. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/pagebreak/plugin.min.js +7 -2
  70. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/paste/plugin.js +8 -3
  71. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/paste/plugin.min.js +8 -3
  72. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/CHANGELOG.md +5 -0
  73. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/license.txt +3 -3
  74. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/plugin.js +2 -2
  75. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/plugin.min.js +2 -2
  76. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/readme.txt +1 -1
  77. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/powerpaste/version.txt +1 -1
  78. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/preview/plugin.js +7 -2
  79. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/preview/plugin.min.js +7 -2
  80. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/print/plugin.js +7 -2
  81. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/print/plugin.min.js +7 -2
  82. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/quickbars/plugin.js +7 -2
  83. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/quickbars/plugin.min.js +7 -2
  84. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/save/plugin.js +7 -2
  85. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/save/plugin.min.js +7 -2
  86. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/searchreplace/plugin.js +7 -2
  87. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/searchreplace/plugin.min.js +7 -2
  88. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/spellchecker/plugin.js +7 -2
  89. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/spellchecker/plugin.min.js +7 -2
  90. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/tabfocus/plugin.js +7 -2
  91. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/tabfocus/plugin.min.js +7 -2
  92. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/table/plugin.js +7 -2
  93. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/table/plugin.min.js +7 -2
  94. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/template/plugin.js +7 -2
  95. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/template/plugin.min.js +7 -2
  96. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/textcolor/plugin.js +7 -2
  97. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/textcolor/plugin.min.js +7 -2
  98. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/textpattern/plugin.js +8 -3
  99. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/textpattern/plugin.min.js +8 -3
  100. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/toc/plugin.js +7 -2
  101. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/toc/plugin.min.js +7 -2
  102. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/visualblocks/plugin.js +7 -2
  103. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/visualblocks/plugin.min.js +7 -2
  104. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/visualchars/plugin.js +7 -2
  105. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/visualchars/plugin.min.js +7 -2
  106. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/wordcount/plugin.js +7 -2
  107. package/src/sap/ui/richtexteditor/js/tiny_mce5/plugins/wordcount/plugin.min.js +7 -2
  108. package/src/sap/ui/richtexteditor/js/tiny_mce5/readme.txt +1 -1
  109. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/content/dark/content.css +5 -5
  110. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/content/dark/content.min.css +5 -5
  111. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/content/default/content.css +5 -5
  112. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/content/default/content.min.css +5 -5
  113. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/content/document/content.css +5 -5
  114. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/content/document/content.min.css +5 -5
  115. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/content/writer/content.css +5 -5
  116. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/content/writer/content.min.css +5 -5
  117. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/content.css +5 -5
  118. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/content.inline.css +5 -5
  119. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/content.inline.min.css +5 -5
  120. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/content.min.css +5 -5
  121. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/content.mobile.css +5 -5
  122. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/content.mobile.min.css +5 -5
  123. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/skin.css +5 -5
  124. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/skin.min.css +5 -5
  125. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/skin.mobile.css +5 -5
  126. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/skin.mobile.min.css +5 -5
  127. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/skin.shadowdom.css +5 -5
  128. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide/skin.shadowdom.min.css +5 -5
  129. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/content.css +5 -5
  130. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/content.inline.css +5 -5
  131. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/content.inline.min.css +5 -5
  132. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/content.min.css +5 -5
  133. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/content.mobile.css +5 -5
  134. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/content.mobile.min.css +5 -5
  135. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/skin.css +5 -5
  136. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/skin.min.css +5 -5
  137. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/skin.mobile.css +5 -5
  138. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/skin.mobile.min.css +5 -5
  139. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/skin.shadowdom.css +5 -5
  140. package/src/sap/ui/richtexteditor/js/tiny_mce5/skins/ui/oxide-dark/skin.shadowdom.min.css +5 -5
  141. package/src/sap/ui/richtexteditor/js/tiny_mce5/themes/mobile/theme.js +7 -2
  142. package/src/sap/ui/richtexteditor/js/tiny_mce5/themes/mobile/theme.min.js +7 -2
  143. package/src/sap/ui/richtexteditor/js/tiny_mce5/themes/silver/theme.js +1645 -84
  144. package/src/sap/ui/richtexteditor/js/tiny_mce5/themes/silver/theme.min.js +8 -3
  145. package/src/sap/ui/richtexteditor/js/tiny_mce5/tinymce.d.ts +3 -0
  146. package/src/sap/ui/richtexteditor/js/tiny_mce5/tinymce.js +1458 -1360
  147. package/src/sap/ui/richtexteditor/js/tiny_mce5/tinymce.min.js +8 -3
  148. package/src/sap/ui/richtexteditor/js/tiny_mce5/version.txt +1 -1
  149. package/src/sap/ui/richtexteditor/js/tiny_mce6/icons/default/icons.js +3 -0
  150. package/src/sap/ui/richtexteditor/js/tiny_mce6/icons/default/icons.min.js +1 -1
  151. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/ar.js +1 -1
  152. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/bg_BG.js +1 -1
  153. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/ca.js +1 -1
  154. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/cs.js +1 -1
  155. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/da.js +1 -1
  156. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/de.js +1 -1
  157. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/el.js +1 -1
  158. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/es.js +1 -1
  159. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/eu.js +1 -1
  160. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/fa.js +1 -1
  161. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/fi.js +1 -1
  162. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/fr_FR.js +1 -1
  163. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/he_IL.js +1 -1
  164. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/hi.js +1 -1
  165. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/hr.js +1 -1
  166. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/hu_HU.js +1 -1
  167. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/id.js +1 -1
  168. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/it.js +1 -1
  169. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/ja.js +1 -1
  170. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/kk.js +1 -1
  171. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/ko_KR.js +1 -1
  172. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/ms.js +1 -1
  173. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/nb_NO.js +1 -1
  174. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/nl.js +1 -1
  175. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/pl.js +1 -1
  176. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/pt_BR.js +1 -1
  177. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/pt_PT.js +1 -1
  178. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/ro.js +1 -1
  179. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/ru.js +1 -1
  180. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/sk.js +1 -1
  181. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/sl_SI.js +1 -1
  182. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/sv_SE.js +1 -1
  183. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/th_TH.js +1 -1
  184. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/tr.js +1 -1
  185. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/uk.js +1 -1
  186. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/vi.js +1 -1
  187. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/zh_CN.js +1 -1
  188. package/src/sap/ui/richtexteditor/js/tiny_mce6/langs/zh_TW.js +1 -1
  189. package/src/sap/ui/richtexteditor/js/tiny_mce6/models/dom/model.js +1 -1
  190. package/src/sap/ui/richtexteditor/js/tiny_mce6/models/dom/model.min.js +1 -1
  191. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/accordion/plugin.js +39 -18
  192. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/accordion/plugin.min.js +2 -2
  193. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/CHANGELOG.md +10 -0
  194. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/codemirror.min.css +1 -1
  195. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/codemirror.min.js +1 -1
  196. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/codemirror_css.js +13 -0
  197. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/customeditor.js +2 -2
  198. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/customeditor.min.js +2 -2
  199. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/plugin.js +2 -2
  200. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/plugin.min.js +2 -2
  201. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/readme.txt +1 -1
  202. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advcode/version.txt +1 -1
  203. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advlist/plugin.js +1 -1
  204. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/advlist/plugin.min.js +1 -1
  205. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/anchor/plugin.js +1 -1
  206. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/anchor/plugin.min.js +1 -1
  207. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autolink/plugin.js +1 -1
  208. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autolink/plugin.min.js +1 -1
  209. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autoresize/plugin.js +1 -1
  210. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autoresize/plugin.min.js +1 -1
  211. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autosave/plugin.js +1 -1
  212. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/autosave/plugin.min.js +1 -1
  213. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/charmap/plugin.js +1 -1
  214. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/charmap/plugin.min.js +1 -1
  215. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/code/plugin.js +1 -1
  216. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/code/plugin.min.js +1 -1
  217. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/codesample/plugin.js +1 -1
  218. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/codesample/plugin.min.js +1 -1
  219. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/directionality/plugin.js +1 -1
  220. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/directionality/plugin.min.js +1 -1
  221. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/emoticons/plugin.js +1 -1
  222. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/emoticons/plugin.min.js +1 -1
  223. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/fullscreen/plugin.js +1 -1
  224. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/fullscreen/plugin.min.js +1 -1
  225. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/ar.js +5 -5
  226. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/bg_BG.js +5 -5
  227. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/ca.js +5 -5
  228. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/cs.js +5 -5
  229. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/da.js +5 -5
  230. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/de.js +5 -5
  231. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/el.js +5 -5
  232. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/en.js +5 -5
  233. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/es.js +5 -5
  234. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/eu.js +6 -6
  235. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/fa.js +5 -5
  236. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/fi.js +5 -5
  237. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/fr_FR.js +5 -5
  238. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/he_IL.js +5 -5
  239. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/hi.js +5 -5
  240. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/hr.js +5 -5
  241. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/hu_HU.js +5 -5
  242. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/id.js +5 -5
  243. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/it.js +5 -5
  244. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/ja.js +5 -5
  245. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/kk.js +5 -5
  246. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/ko_KR.js +5 -5
  247. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/ms.js +5 -5
  248. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/nb_NO.js +5 -5
  249. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/nl.js +5 -5
  250. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/pl.js +5 -5
  251. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/pt_BR.js +5 -5
  252. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/pt_PT.js +5 -5
  253. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/ro.js +5 -5
  254. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/ru.js +5 -5
  255. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/sk.js +5 -5
  256. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/sl_SI.js +5 -5
  257. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/sv_SE.js +5 -5
  258. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/th_TH.js +5 -5
  259. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/tr.js +5 -5
  260. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/uk.js +5 -5
  261. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/vi.js +5 -5
  262. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/zh_CN.js +5 -5
  263. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/js/i18n/keynav/zh_TW.js +5 -5
  264. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/plugin.js +10 -5
  265. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/help/plugin.min.js +2 -2
  266. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/image/plugin.js +4 -3
  267. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/image/plugin.min.js +2 -2
  268. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/importcss/plugin.js +2 -2
  269. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/importcss/plugin.min.js +2 -2
  270. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/insertdatetime/plugin.js +1 -1
  271. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/insertdatetime/plugin.min.js +1 -1
  272. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/link/plugin.js +3 -2
  273. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/link/plugin.min.js +2 -2
  274. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/lists/plugin.js +282 -58
  275. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/lists/plugin.min.js +2 -2
  276. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/media/plugin.js +7 -25
  277. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/media/plugin.min.js +2 -2
  278. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/nonbreaking/plugin.js +1 -1
  279. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/nonbreaking/plugin.min.js +1 -1
  280. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/pagebreak/plugin.js +1 -1
  281. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/pagebreak/plugin.min.js +1 -1
  282. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/CHANGELOG.md +19 -0
  283. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/js/wordimport.js +1972 -1673
  284. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/ar.js +0 -1
  285. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/bg_BG.js +0 -1
  286. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/ca.js +0 -1
  287. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/cs.js +0 -1
  288. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/da.js +0 -1
  289. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/de.js +0 -1
  290. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/el.js +0 -1
  291. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/es.js +0 -1
  292. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/eu.js +0 -1
  293. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/fa.js +0 -1
  294. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/fi.js +0 -1
  295. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/fr_FR.js +0 -1
  296. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/he_IL.js +0 -1
  297. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/hi.js +0 -1
  298. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/hr.js +0 -1
  299. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/hu_HU.js +0 -1
  300. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/id.js +0 -1
  301. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/it.js +0 -1
  302. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/ja.js +0 -1
  303. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/kk.js +0 -1
  304. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/ko_KR.js +0 -1
  305. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/ms.js +0 -1
  306. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/nb_NO.js +0 -1
  307. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/nl.js +0 -1
  308. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/pl.js +0 -1
  309. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/pt_BR.js +0 -1
  310. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/pt_PT.js +0 -1
  311. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/ro.js +0 -1
  312. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/ru.js +0 -1
  313. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/sk.js +0 -1
  314. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/sl_SI.js +0 -1
  315. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/sv_SE.js +0 -1
  316. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/th_TH.js +0 -1
  317. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/tr.js +0 -1
  318. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/uk.js +0 -1
  319. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/vi.js +0 -1
  320. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/zh_CN.js +0 -1
  321. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/langs/zh_TW.js +0 -1
  322. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/plugin.js +2 -2
  323. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/plugin.min.js +2 -2
  324. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/readme.txt +1 -1
  325. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/powerpaste/version.txt +1 -1
  326. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/preview/plugin.js +1 -1
  327. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/preview/plugin.min.js +1 -1
  328. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/quickbars/plugin.js +13 -4
  329. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/quickbars/plugin.min.js +2 -2
  330. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/save/plugin.js +1 -1
  331. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/save/plugin.min.js +1 -1
  332. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/searchreplace/plugin.js +3 -3
  333. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/searchreplace/plugin.min.js +2 -2
  334. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/table/plugin.js +2 -2
  335. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/table/plugin.min.js +2 -2
  336. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/template/plugin.js +1 -1
  337. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/template/plugin.min.js +1 -1
  338. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/visualblocks/plugin.js +1 -1
  339. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/visualblocks/plugin.min.js +1 -1
  340. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/visualchars/plugin.js +1 -1
  341. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/visualchars/plugin.min.js +1 -1
  342. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/wordcount/plugin.js +1 -1
  343. package/src/sap/ui/richtexteditor/js/tiny_mce6/plugins/wordcount/plugin.min.js +1 -1
  344. package/src/sap/ui/richtexteditor/js/tiny_mce6/readme.txt +1 -1
  345. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/dark/content.js +8 -0
  346. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/default/content.js +8 -0
  347. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/document/content.js +8 -0
  348. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/tinymce-5/content.js +8 -0
  349. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/tinymce-5-dark/content.js +8 -0
  350. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/content/writer/content.js +8 -0
  351. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/content.css +1 -1
  352. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/content.inline.css +1 -1
  353. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/content.inline.js +8 -0
  354. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/content.inline.min.css +1 -1
  355. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/content.js +8 -0
  356. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/content.min.css +1 -1
  357. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/skin.css +86 -11
  358. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/skin.js +8 -0
  359. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/skin.min.css +1 -1
  360. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide/skin.shadowdom.js +8 -0
  361. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/content.css +1 -1
  362. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/content.inline.css +1 -1
  363. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/content.inline.js +8 -0
  364. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/content.inline.min.css +1 -1
  365. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/content.js +8 -0
  366. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/content.min.css +1 -1
  367. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/skin.css +89 -14
  368. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/skin.js +8 -0
  369. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/skin.min.css +1 -1
  370. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/oxide-dark/skin.shadowdom.js +8 -0
  371. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/content.css +1 -1
  372. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/content.inline.css +1 -1
  373. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/content.inline.js +8 -0
  374. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/content.inline.min.css +1 -1
  375. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/content.js +8 -0
  376. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/content.min.css +1 -1
  377. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/skin.css +86 -11
  378. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/skin.js +8 -0
  379. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/skin.min.css +1 -1
  380. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5/skin.shadowdom.js +8 -0
  381. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/content.css +1 -1
  382. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/content.inline.css +1 -1
  383. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/content.inline.js +8 -0
  384. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/content.inline.min.css +1 -1
  385. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/content.js +8 -0
  386. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/content.min.css +1 -1
  387. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/skin.css +86 -11
  388. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/skin.js +8 -0
  389. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/skin.min.css +1 -1
  390. package/src/sap/ui/richtexteditor/js/tiny_mce6/skins/ui/tinymce-5-dark/skin.shadowdom.js +8 -0
  391. package/src/sap/ui/richtexteditor/js/tiny_mce6/themes/silver/theme.js +20786 -20200
  392. package/src/sap/ui/richtexteditor/js/tiny_mce6/themes/silver/theme.min.js +2 -2
  393. package/src/sap/ui/richtexteditor/js/tiny_mce6/tinymce.d.ts +40 -8
  394. package/src/sap/ui/richtexteditor/js/tiny_mce6/tinymce.js +2031 -1572
  395. package/src/sap/ui/richtexteditor/js/tiny_mce6/tinymce.min.js +2 -2
  396. package/src/sap/ui/richtexteditor/js/tiny_mce6/version.txt +1 -1
  397. package/src/sap/ui/richtexteditor/library.js +1 -1
@@ -0,0 +1,13 @@
1
+ /*!
2
+ * Tiny Advanced Code Editor plugin
3
+ *
4
+ * Copyright (c) 2023 Ephox Corporation DBA Tiny Technologies, Inc.
5
+ * Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/
6
+ *
7
+ * This resource uses CSS from the codemirror package, licensed under the MIT License.
8
+ * https://github.com/codemirror/CodeMirror
9
+ *
10
+ * Version: 3.4.0-107
11
+ */
12
+
13
+ tinymce.Resource.add('advcode/css/codemirror.css', `.tox-tinymce .tox-inline-headless-codemirror{position:absolute;height:100%;left:0;top:0;width:100%;z-index:1}.tox-tinymce .tox-inline-codemirror{position:relative;height:100%}.mce-codemirror .cm-s-dracula.CodeMirror,.mce-codemirror .cm-s-dracula .CodeMirror-gutters{background-color:#282a36 !important;color:#f8f8f2 !important;border:none}.mce-codemirror .cm-s-dracula .CodeMirror-gutters{color:#282a36}.mce-codemirror .cm-s-dracula .CodeMirror-cursor{border-left:solid thin #f8f8f0}.mce-codemirror .cm-s-dracula .CodeMirror-linenumber{color:#6D8A88}.mce-codemirror .cm-s-dracula .CodeMirror-selected{background:rgba(255,255,255,0.1)}.mce-codemirror .cm-s-dracula .CodeMirror-line::selection,.mce-codemirror .cm-s-dracula .CodeMirror-line>span::selection,.mce-codemirror .cm-s-dracula .CodeMirror-line>span>span::selection{background:rgba(255,255,255,0.1)}.mce-codemirror .cm-s-dracula .CodeMirror-line::-moz-selection,.mce-codemirror .cm-s-dracula .CodeMirror-line>span::-moz-selection,.mce-codemirror .cm-s-dracula .CodeMirror-line>span>span::-moz-selection{background:rgba(255,255,255,0.1)}.mce-codemirror .cm-s-dracula span.cm-comment{color:#6272a4}.mce-codemirror .cm-s-dracula span.cm-string,.mce-codemirror .cm-s-dracula span.cm-string-2{color:#f1fa8c}.mce-codemirror .cm-s-dracula span.cm-number{color:#bd93f9}.mce-codemirror .cm-s-dracula span.cm-variable{color:#50fa7b}.mce-codemirror .cm-s-dracula span.cm-variable-2{color:white}.mce-codemirror .cm-s-dracula span.cm-def{color:#50fa7b}.mce-codemirror .cm-s-dracula span.cm-operator{color:#ff79c6}.mce-codemirror .cm-s-dracula span.cm-keyword{color:#ff79c6}.mce-codemirror .cm-s-dracula span.cm-atom{color:#bd93f9}.mce-codemirror .cm-s-dracula span.cm-meta{color:#f8f8f2}.mce-codemirror .cm-s-dracula span.cm-tag{color:#ff79c6}.mce-codemirror .cm-s-dracula span.cm-attribute{color:#50fa7b}.mce-codemirror .cm-s-dracula span.cm-qualifier{color:#50fa7b}.mce-codemirror .cm-s-dracula span.cm-property{color:#66d9ef}.mce-codemirror .cm-s-dracula span.cm-builtin{color:#50fa7b}.mce-codemirror .cm-s-dracula span.cm-variable-3,.mce-codemirror .cm-s-dracula span.cm-type{color:#ffb86c}.mce-codemirror .cm-s-dracula .CodeMirror-activeline-background{background:rgba(255,255,255,0.1)}.mce-codemirror .cm-s-dracula .CodeMirror-matchingbracket{text-decoration:underline;color:white !important}.mce-codemirror .CodeMirror-dialog{position:absolute;left:0;right:0;background:inherit;z-index:15;padding:.1em .8em;overflow:hidden;color:inherit}.mce-codemirror .CodeMirror-dialog-top{border-bottom:1px solid #eee;top:0}.mce-codemirror .CodeMirror-dialog-bottom{border-top:1px solid #eee;bottom:0}.mce-codemirror .CodeMirror-dialog input{border:none;outline:none;background:transparent;width:20em;color:inherit;font-family:monospace}.mce-codemirror .CodeMirror-dialog button{font-size:70%}.mce-codemirror .CodeMirror{font-family:monospace;height:300px;color:black;direction:ltr}.mce-codemirror .CodeMirror-lines{padding:4px 0}.mce-codemirror .CodeMirror pre.CodeMirror-line,.mce-codemirror .CodeMirror pre.CodeMirror-line-like{padding:0 4px}.mce-codemirror .CodeMirror-scrollbar-filler,.mce-codemirror .CodeMirror-gutter-filler{background-color:white}.mce-codemirror .CodeMirror-gutters{border-right:1px solid #ddd;background-color:#f7f7f7;white-space:nowrap}.mce-codemirror .CodeMirror-linenumber{padding:0 3px 0 5px;min-width:20px;text-align:right;color:#999;white-space:nowrap}.mce-codemirror .CodeMirror-guttermarker{color:black}.mce-codemirror .CodeMirror-guttermarker-subtle{color:#999}.mce-codemirror .CodeMirror-cursor{border-left:1px solid black;border-right:none;width:0}.mce-codemirror .CodeMirror div.CodeMirror-secondarycursor{border-left:1px solid silver}.mce-codemirror .cm-fat-cursor .CodeMirror-cursor{width:auto;border:0 !important;background:#7e7}.mce-codemirror .cm-fat-cursor div.CodeMirror-cursors{z-index:1}.mce-codemirror .cm-fat-cursor .CodeMirror-line::selection,.mce-codemirror .cm-fat-cursor .CodeMirror-line>span::selection,.mce-codemirror .cm-fat-cursor .CodeMirror-line>span>span::selection{background:transparent}.mce-codemirror .cm-fat-cursor .CodeMirror-line::-moz-selection,.mce-codemirror .cm-fat-cursor .CodeMirror-line>span::-moz-selection,.mce-codemirror .cm-fat-cursor .CodeMirror-line>span>span::-moz-selection{background:transparent}.mce-codemirror .cm-fat-cursor{caret-color:transparent}@-moz-keyframes blink{50%{background-color:transparent}}@-webkit-keyframes blink{50%{background-color:transparent}}@keyframes blink{50%{background-color:transparent}}.mce-codemirror .cm-tab{display:inline-block;text-decoration:inherit}.mce-codemirror .CodeMirror-rulers{position:absolute;left:0;right:0;top:-50px;bottom:0;overflow:hidden}.mce-codemirror .CodeMirror-ruler{border-left:1px solid #ccc;top:0;bottom:0;position:absolute}.mce-codemirror .cm-s-default .cm-header{color:blue}.mce-codemirror .cm-s-default .cm-quote{color:#090}.mce-codemirror .cm-negative{color:#d44}.mce-codemirror .cm-positive{color:#292}.mce-codemirror .cm-header,.mce-codemirror .cm-strong{font-weight:bold}.mce-codemirror .cm-em{font-style:italic}.mce-codemirror .cm-link{text-decoration:underline}.mce-codemirror .cm-strikethrough{text-decoration:line-through}.mce-codemirror .cm-s-default .cm-keyword{color:#708}.mce-codemirror .cm-s-default .cm-atom{color:#219}.mce-codemirror .cm-s-default .cm-number{color:#164}.mce-codemirror .cm-s-default .cm-def{color:#00f}.mce-codemirror .cm-s-default .cm-variable-2{color:#05a}.mce-codemirror .cm-s-default .cm-variable-3,.mce-codemirror .cm-s-default .cm-type{color:#085}.mce-codemirror .cm-s-default .cm-comment{color:#a50}.mce-codemirror .cm-s-default .cm-string{color:#a11}.mce-codemirror .cm-s-default .cm-string-2{color:#f50}.mce-codemirror .cm-s-default .cm-meta{color:#555}.mce-codemirror .cm-s-default .cm-qualifier{color:#555}.mce-codemirror .cm-s-default .cm-builtin{color:#30a}.mce-codemirror .cm-s-default .cm-bracket{color:#997}.mce-codemirror .cm-s-default .cm-tag{color:#170}.mce-codemirror .cm-s-default .cm-attribute{color:#00c}.mce-codemirror .cm-s-default .cm-hr{color:#999}.mce-codemirror .cm-s-default .cm-link{color:#00c}.mce-codemirror .cm-s-default .cm-error{color:#f00}.mce-codemirror .cm-invalidchar{color:#f00}.mce-codemirror .CodeMirror-composing{border-bottom:2px solid}.mce-codemirror div.CodeMirror span.CodeMirror-matchingbracket{color:#0b0}.mce-codemirror div.CodeMirror span.CodeMirror-nonmatchingbracket{color:#a22}.mce-codemirror .CodeMirror-matchingtag{background:rgba(255,150,0,0.3)}.mce-codemirror .CodeMirror-activeline-background{background:#e8f2ff}.mce-codemirror .CodeMirror{position:relative;overflow:hidden;background:white}.mce-codemirror .CodeMirror-scroll{overflow:scroll !important;margin-bottom:-50px;margin-right:-50px;padding-bottom:50px;height:100%;outline:none;position:relative;z-index:0}.mce-codemirror .CodeMirror-sizer{position:relative;border-right:50px solid transparent}.mce-codemirror .CodeMirror-vscrollbar,.mce-codemirror .CodeMirror-hscrollbar,.mce-codemirror .CodeMirror-scrollbar-filler,.mce-codemirror .CodeMirror-gutter-filler{position:absolute;z-index:6;display:none;outline:none}.mce-codemirror .CodeMirror-vscrollbar{right:0;top:0;overflow-x:hidden;overflow-y:scroll}.mce-codemirror .CodeMirror-hscrollbar{bottom:0;left:0;overflow-y:hidden;overflow-x:scroll}.mce-codemirror .CodeMirror-scrollbar-filler{right:0;bottom:0}.mce-codemirror .CodeMirror-gutter-filler{left:0;bottom:0}.mce-codemirror .CodeMirror-gutters{position:absolute;left:0;top:0;min-height:100%;z-index:3}.mce-codemirror .CodeMirror-gutter{white-space:normal;height:100%;display:inline-block;vertical-align:top;margin-bottom:-50px}.mce-codemirror .CodeMirror-gutter-wrapper{position:absolute;z-index:4;background:none !important;border:none !important}.mce-codemirror .CodeMirror-gutter-background{position:absolute;top:0;bottom:0;z-index:4}.mce-codemirror .CodeMirror-gutter-elt{position:absolute;cursor:default;z-index:4}.mce-codemirror .CodeMirror-gutter-wrapper ::selection{background-color:transparent}.mce-codemirror .CodeMirror-gutter-wrapper ::-moz-selection{background-color:transparent}.mce-codemirror .CodeMirror-lines{cursor:text;min-height:1px}.mce-codemirror .CodeMirror pre.CodeMirror-line,.mce-codemirror .CodeMirror pre.CodeMirror-line-like{-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;z-index:2;position:relative;overflow:visible;-webkit-tap-highlight-color:transparent;-webkit-font-variant-ligatures:contextual;font-variant-ligatures:contextual}.mce-codemirror .CodeMirror-wrap pre.CodeMirror-line,.mce-codemirror .CodeMirror-wrap pre.CodeMirror-line-like{word-wrap:break-word;white-space:pre-wrap;word-break:normal}.mce-codemirror .CodeMirror-linebackground{position:absolute;left:0;right:0;top:0;bottom:0;z-index:0}.mce-codemirror .CodeMirror-linewidget{position:relative;z-index:2;padding:.1px}.mce-codemirror .CodeMirror-rtl pre{direction:rtl}.mce-codemirror .CodeMirror-code{outline:none}.mce-codemirror .CodeMirror-scroll,.mce-codemirror .CodeMirror-sizer,.mce-codemirror .CodeMirror-gutter,.mce-codemirror .CodeMirror-gutters,.mce-codemirror .CodeMirror-linenumber{-moz-box-sizing:content-box;box-sizing:content-box}.mce-codemirror .CodeMirror-measure{position:absolute;width:100%;height:0;overflow:hidden;visibility:hidden}.mce-codemirror .CodeMirror-cursor{position:absolute;pointer-events:none}.mce-codemirror .CodeMirror-measure pre{position:static}.mce-codemirror div.CodeMirror-cursors{visibility:hidden;position:relative;z-index:3}.mce-codemirror div.CodeMirror-dragcursors{visibility:visible}.mce-codemirror .CodeMirror-focused div.CodeMirror-cursors{visibility:visible}.mce-codemirror .CodeMirror-selected{background:#d9d9d9}.mce-codemirror .CodeMirror-focused .CodeMirror-selected{background:#d7d4f0}.mce-codemirror .CodeMirror-crosshair{cursor:crosshair}.mce-codemirror .CodeMirror-line::selection,.mce-codemirror .CodeMirror-line>span::selection,.mce-codemirror .CodeMirror-line>span>span::selection{background:#d7d4f0}.mce-codemirror .CodeMirror-line::-moz-selection,.mce-codemirror .CodeMirror-line>span::-moz-selection,.mce-codemirror .CodeMirror-line>span>span::-moz-selection{background:#d7d4f0}.mce-codemirror .cm-searching{background-color:#ffa;background-color:rgba(255,255,0,0.4)}.mce-codemirror .cm-force-border{padding-right:.1px}@media print{.mce-codemirror .CodeMirror div.CodeMirror-cursors{visibility:hidden}}.mce-codemirror .cm-tab-wrap-hack:after{content:''}.mce-codemirror span.CodeMirror-selectedtext{background:none}.mce-codemirror .CodeMirror-foldmarker{color:blue;text-shadow:#b9f 1px 1px 2px,#b9f -1px -1px 2px,#b9f 1px -1px 2px,#b9f -1px 1px 2px;font-family:arial;line-height:.3;cursor:pointer}.mce-codemirror .CodeMirror-foldgutter{width:.7em}.mce-codemirror .CodeMirror-foldgutter-open,.mce-codemirror .CodeMirror-foldgutter-folded{cursor:pointer}.mce-codemirror .CodeMirror-foldgutter-open:after{content:\"\\25BE\"}.mce-codemirror .CodeMirror-foldgutter-folded:after{content:\"\\25B8\"}.mce-codemirror .CodeMirror{height:100%;position:absolute;top:0;bottom:0;left:0;right:0}.mce-codemirror .CodeMirror-wrap,.mce-codemirror .CodeMirror-wrap *{white-space:inherit}.mce-codemirror .CodeMirror-wrap textarea{white-space:pre-wrap}.mce-codemirror .CodeMirror-dialog button{font-size:70%;background:lightgrey;border:2px solid black;padding:0px 2px 0px 2px}.mce-codemirror .CodeMirror-dialog button:focus{background:whitesmoke}.tox .tox-custom-editor,.mce-codemirror{flex:1}.CodeMirror-hints{position:absolute;z-index:10;overflow:hidden;list-style:none;margin:0;padding:2px;-webkit-box-shadow:2px 3px 5px rgba(0,0,0,0.2);-moz-box-shadow:2px 3px 5px rgba(0,0,0,0.2);box-shadow:2px 3px 5px rgba(0,0,0,0.2);border-radius:3px;border:1px solid silver;background:white;font-size:90%;font-family:monospace;max-height:20em;overflow-y:auto;box-sizing:border-box}.CodeMirror-hint{margin:0;padding:0 4px;border-radius:2px;white-space:pre;color:black;cursor:pointer}li.CodeMirror-hint-active{background:#08f;color:white}.CodeMirror-hints{z-index:100000}.mce-codemirror .CodeMirror *,body .CodeMirror-hints *{font-family:inherit;font-size:initial;text-shadow:none;float:none;white-space:inherit;cursor:inherit;line-height:inherit;font-weight:inherit;max-width:none}.mce-codemirror .CodeMirror.inherit-font-size *,body .CodeMirror-hints *{font-size:inherit}`)
@@ -4,7 +4,7 @@
4
4
  * Copyright (c) 2023 Ephox Corporation DBA Tiny Technologies, Inc.
5
5
  * Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/
6
6
  *
7
- * Version: 3.3.0-95
7
+ * Version: 3.4.0-107
8
8
  */
9
9
 
10
- !function(){"use strict";const e=e=>t=>typeof t===e,t=e=>"string"===(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(r=o=e,(n=String).prototype.isPrototypeOf(r)||(null===(s=o.constructor)||void 0===s?void 0:s.name)===n.name)?"string":t;var r,o,n,s})(e),r=e("boolean"),o=e=>!(e=>null==e)(e),n=e("function"),s=e("number"),i=()=>{};class a{constructor(e,t){this.tag=e,this.value=t}static some(e){return new a(!0,e)}static none(){return a.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?a.some(e(this.value)):a.none()}bind(e){return this.tag?e(this.value):a.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:a.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return o(e)?a.some(e):a.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}a.singletonNone=new a(!1);const l=(e,t)=>{for(let r=0,o=e.length;r<o;r++)if(t(e[r],r))return!0;return!1},u=Object.hasOwnProperty;"undefined"!=typeof window?window:Function("return this;")();const d=e=>t=>(e=>e.dom.nodeType)(t)===e,c=d(1),m=d(3),g=d(9),h=d(11),p=(e,o)=>((e,o,n)=>{const i=((e,t)=>{const r=((e,t)=>{const r=e.dom.getAttribute(t);return null===r?void 0:r})(e,t);return void 0===r||""===r?[]:r.split(" ")})(e,o);return((e,o,n)=>{((e,o,n)=>{if(!(t(n)||r(n)||s(n)))throw console.error("Invalid call to Attribute.set. Key ",o,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(o,n+"")})(e.dom,o,n)})(e,o,i.concat([n]).join(" ")),!0})(e,"class",o),v=e=>void 0!==e.style&&n(e.style.getPropertyValue),y=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},f=(e,t)=>{const r=(t||document).createElement(e);return y(r)},w=y,S=e=>g(e)?e:w(e.dom.ownerDocument),b=e=>h(e)&&o(e.dom.host),C=n(Element.prototype.attachShadow)&&n(Node.prototype.getRootNode)?e=>w(e.dom.getRootNode()):S,E=e=>w(e.dom.host),A=e=>{const t=m(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const r=t.ownerDocument;return(e=>{const t=C(e);return b(t)?a.some(t):a.none()})(w(t)).fold((()=>r.body.contains(t)),(o=A,n=E,e=>o(n(e))));var o,n},I=()=>O(w(document)),O=e=>{const t=e.dom.body;if(null==t)throw new Error("Body is not available yet");return w(t)},N=e=>{return(t=tinymce,"get",((e,t)=>u.call(e,t))(t,"get")?a.from(t.get):a.none()).bind((t=>a.from(t.call(tinymce,e))));var t},T={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},L=(()=>{const e="[0-9]+",t="[eE][+-]?"+e,r=e=>`(?:${e})?`,o=["Infinity",e+"\\."+r(e)+r(t),"\\."+e+r(t),e+r(t)].join("|");return new RegExp(`^([+-]?(?:${o}))(.*)$`)})(),P=(e,t,r,o="",n)=>{const s=(e=>{const t=N(e).map((e=>{const t=C(w(e.getElement()));return b(r=t)?r:w(S(r).dom.body);var r})).getOrThunk(I);if(c(t))return{element:t,destroy:i};{const e=f("div");return((e,t)=>{e.dom.appendChild(t.dom)})(t,e),{element:e,destroy:()=>(e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)})(e)}}})(r.editorId),u=((e,t)=>{const r=(r,o)=>(o&&!o()||setTimeout((()=>{r.state.completionActive||r.showHint({completeSingle:!1,container:t})}),100),e.Pass);return{completeAfter:r,completeIfAfterLt:t=>r(t,(()=>{const r=t.getCursor();return"<"===t.getRange(e.Pos(r.line,r.ch-1),r)})),completeIfInTag:t=>r(t,(()=>{const r=t.getTokenAt(t.getCursor());return!!("string"!==r.type||/['"]/.test(r.string.charAt(r.string.length-1))&&1!==r.string.length)&&e.innerMode(t.getMode(),r.state).state.tagName}))}})(e,s.element.dom),d="dracula",m={lineWrapping:r.lineWrapping,lineNumbers:r.lineNumbers,foldGutter:r.foldGutter,theme:n.dark?d:r.theme,direction:r.direction,matchTags:{bothTags:!0},keyMap:"sublime",gutters:r.gutter?["CodeMirror-linenumbers","CodeMirror-foldgutter"]:[],extraKeys:{"Alt-F":"findPersistent","Ctrl-J":"toMatchingTag","Ctrl-B":"selectNextOccurrence","'<'":u.completeAfter,"'/'":u.completeIfAfterLt,"' '":u.completeIfInTag,"'='":u.completeIfInTag,"Ctrl-Q":e=>{e.foldCode(e.getCursor())}},mode:"text/html",value:o},g=e(t,m),h=e=>{27!==e.keyCode&&e.stopPropagation()};t.addEventListener("keyup",h),t.addEventListener("keydown",h),t.addEventListener("keypress",h),setTimeout((()=>{g.focus(),r.cursor&&g.doc.setCursor(r.cursor)}),0),setTimeout((()=>g.refresh()),200);const p=e=>{const t=g.getWrapperElement();e.fold((()=>{var e,r;t.classList.remove("inherit-font-size"),null===(r=null===(e=t.parentElement)||void 0===e?void 0:e.style)||void 0===r||r.removeProperty("font-size")}),(e=>{var r,o;t.classList.add("inherit-font-size"),null===(o=null===(r=t.parentElement)||void 0===r?void 0:r.style)||void 0===o||o.setProperty("font-size",e)})),g.refresh()},y={getValue:()=>g.doc.getValue(),setValue:e=>g.doc.setValue(e),setDarkMode:e=>{e?g.setOption("theme",d):g.setOption("theme",r.theme)},copyCode:()=>new Promise(((e,t)=>window.isSecureContext?e(navigator.clipboard.writeText(g.getValue())):t("context is not secure"))),setFontSize:p,changeFontSize:e=>{const t=g.getWrapperElement(),r=(d=w(t),c=".CodeMirror-scroll",((e,t)=>{const r=void 0===t?document:t.dom;return 1!==(o=r).nodeType&&9!==o.nodeType&&11!==o.nodeType||0===o.childElementCount?a.none():a.from(r.querySelector(e)).map(w);var o})(c,d)).map((e=>((e,t)=>{const r=e.dom,o=window.getComputedStyle(r).getPropertyValue(t);return""!==o||A(e)?o:((e,t)=>v(e)?e.style.getPropertyValue(t):"")(r,t)})(e,"font-size"))).getOr("0px"),o=(i=r,u=["unsupportedLength"],a.from(L.exec(i)).bind((e=>{const t=Number(e[1]),r=e[2];return((e,t)=>l(t,(t=>l(T[t],(t=>e===t)))))(r,u)?a.some({value:t,unit:r}):a.none()}))),n=o.map((e=>e.value)).getOr(0),s=o.map((e=>e.unit)).getOr("");var i,u,d,c;let m=a.none();return"increase"===e&&(m=a.some(`${n+1}${s}`)),"decrease"===e&&(m=a.some(`${n>5?n-1:n}${s}`)),p(m),m},destroy:()=>{var e,o;t.removeEventListener("keyup",h),t.removeEventListener("keydown",h),t.removeEventListener("keypress",h),e=r.editorId,o=r.advcodeInstanceId,N(e).bind((e=>a.from(e.plugins.advcode))).each((e=>{e[o]&&delete e[o]})),s.destroy()}};return y},k={},M=(e,t)=>{if(k[t])return Promise.resolve();{const n=N(t),s=n.bind((e=>{var t;return a.from(null===(t=e.ui)||void 0===t?void 0:t.styleSheetLoader)})).getOr(tinymce.DOM.styleSheetLoader);return n.each((r=>{r.on("remove",(()=>{s.unload(e),delete k[t]}))})),k[t]=!0,r=e,(null!=(o=s)?o:tinymce.DOM.styleSheetLoader).load(r)}var r,o};tinymce.Resource.add("tinymce.plugins.advcode.customeditor",((e,r)=>new Promise((o=>{const n=w(e);var s;((e,r,o)=>{((e,r,o)=>{if(!t(o))throw console.error("Invalid call to CSS.set. Property ",r,":: Value ",o,":: Element ",e),new Error("CSS value must be a string: "+o);v(e)&&e.style.setProperty(r,o)})(e.dom,r,o)})(n,"width","100%"),(s=n,a.from(s.dom.parentNode).map(w)).filter(c).each((e=>((e,t)=>{(e=>void 0!==e.dom.classList)(e)?e.dom.classList.add(t):p(e,t)})(e,"mce-codemirror")));const l=(u=r.codeMirrorScriptUrl,d=r.codeMirrorCssUrl,m=r.editorId,g=r.currentAdvStatus,Promise.all([M(d,m),("tinymce.plugins.advcode.CodeMirror",h=u,tinymce.Resource.load("tinymce.plugins.advcode.CodeMirror",h))]).then((([e,t])=>(e,r,o)=>P(t(),e,r,o,g)))).then((t=>{const{setValue:o,getValue:n,copyCode:s,setDarkMode:l,changeFontSize:u,setFontSize:d,destroy:c}=t(e,r,"",r.currentAdvStatus),m={getValue:n,setValue:o,destroy:c};return r.currentAdvStatus.fontSize.fold(i,(()=>d(r.currentAdvStatus.fontSize))),((e,t)=>N(e).bind((e=>a.from(e.plugins.advcode))).map((e=>(e[t]||(e[t]=(()=>{const e=(e=>{const t=(e=>{let t=e;return{get:()=>t,set:e=>{t=e}}})(a.none()),r=()=>t.get().each(e);return{clear:()=>{r(),t.set(a.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:e=>{r(),t.set(a.some(e))}}})(i);return{...e,on:t=>e.get().each(t)}})()),e[t]))))(r.editorId,r.advcodeInstanceId).each((e=>e.set({copyCode:s,changeFontSize:u,setFontSize:d,setDarkMode:l}))),m}));var u,d,m,g,h;o(l)}))))}();
10
+ !function(){"use strict";const e=e=>t=>typeof t===e,t=e=>"string"===(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(r=o=e,(n=String).prototype.isPrototypeOf(r)||(null===(s=o.constructor)||void 0===s?void 0:s.name)===n.name)?"string":t;var r,o,n,s})(e),r=e("boolean"),o=e=>!(e=>null==e)(e),n=e("function"),s=e("number"),i=()=>{};class a{constructor(e,t){this.tag=e,this.value=t}static some(e){return new a(!0,e)}static none(){return a.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?a.some(e(this.value)):a.none()}bind(e){return this.tag?e(this.value):a.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:a.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return o(e)?a.some(e):a.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}a.singletonNone=new a(!1);const l=(e,t)=>{for(let r=0,o=e.length;r<o;r++)if(t(e[r],r))return!0;return!1},u=Object.hasOwnProperty;"undefined"!=typeof window?window:Function("return this;")();const d=e=>t=>(e=>e.dom.nodeType)(t)===e,c=d(1),m=d(3),g=d(9),h=d(11),p=(e,o)=>((e,o,n)=>{const i=((e,t)=>{const r=((e,t)=>{const r=e.dom.getAttribute(t);return null===r?void 0:r})(e,t);return void 0===r||""===r?[]:r.split(" ")})(e,o);return((e,o,n)=>{((e,o,n)=>{if(!(t(n)||r(n)||s(n)))throw console.error("Invalid call to Attribute.set. Key ",o,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(o,n+"")})(e.dom,o,n)})(e,o,i.concat([n]).join(" ")),!0})(e,"class",o),v=e=>void 0!==e.style&&n(e.style.getPropertyValue),y=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},f=(e,t)=>{const r=(t||document).createElement(e);return y(r)},w=y,S=e=>g(e)?e:w(e.dom.ownerDocument),b=e=>h(e)&&o(e.dom.host),C=n(Element.prototype.attachShadow)&&n(Node.prototype.getRootNode)?e=>w(e.dom.getRootNode()):S,E=e=>w(e.dom.host),A=e=>{const t=m(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const r=t.ownerDocument;return(e=>{const t=C(e);return b(t)?a.some(t):a.none()})(w(t)).fold((()=>r.body.contains(t)),(o=A,n=E,e=>o(n(e))));var o,n},I=()=>O(w(document)),O=e=>{const t=e.dom.body;if(null==t)throw new Error("Body is not available yet");return w(t)},N=e=>{return(t=tinymce,"get",((e,t)=>u.call(e,t))(t,"get")?a.from(t.get):a.none()).bind((t=>a.from(t.call(tinymce,e))));var t},P={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},T=(()=>{const e="[0-9]+",t="[eE][+-]?"+e,r=e=>`(?:${e})?`,o=["Infinity",e+"\\."+r(e)+r(t),"\\."+e+r(t),e+r(t)].join("|");return new RegExp(`^([+-]?(?:${o}))(.*)$`)})(),L=(e,t,r,o="",n)=>{const s=(e=>{const t=N(e).map((e=>{const t=C(w(e.getElement()));return b(r=t)?r:w(S(r).dom.body);var r})).getOrThunk(I);if(c(t))return{element:t,destroy:i};{const e=f("div");return((e,t)=>{e.dom.appendChild(t.dom)})(t,e),{element:e,destroy:()=>(e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)})(e)}}})(r.editorId),u=((e,t)=>{const r=(r,o)=>(o&&!o()||setTimeout((()=>{r.state.completionActive||r.showHint({completeSingle:!1,container:t})}),100),e.Pass);return{completeAfter:r,completeIfAfterLt:t=>r(t,(()=>{const r=t.getCursor();return"<"===t.getRange(e.Pos(r.line,r.ch-1),r)})),completeIfInTag:t=>r(t,(()=>{const r=t.getTokenAt(t.getCursor());return!!("string"!==r.type||/['"]/.test(r.string.charAt(r.string.length-1))&&1!==r.string.length)&&e.innerMode(t.getMode(),r.state).state.tagName}))}})(e,s.element.dom),d="dracula",m={lineWrapping:r.lineWrapping,lineNumbers:r.lineNumbers,foldGutter:r.foldGutter,theme:n.dark?d:r.theme,direction:r.direction,matchTags:{bothTags:!0},keyMap:"sublime",gutters:r.gutter?["CodeMirror-linenumbers","CodeMirror-foldgutter"]:[],extraKeys:{"Alt-F":"findPersistent","Ctrl-J":"toMatchingTag","Ctrl-B":"selectNextOccurrence","'<'":u.completeAfter,"'/'":u.completeIfAfterLt,"' '":u.completeIfInTag,"'='":u.completeIfInTag,"Ctrl-Q":e=>{e.foldCode(e.getCursor())}},mode:"text/html",value:o},g=e(t,m),h=e=>{27!==e.keyCode&&e.stopPropagation()};t.addEventListener("keyup",h),t.addEventListener("keydown",h),t.addEventListener("keypress",h),setTimeout((()=>{g.focus(),r.cursor&&g.doc.setCursor(r.cursor)}),0),setTimeout((()=>g.refresh()),200);const p=e=>{const t=g.getWrapperElement();e.fold((()=>{var e,r;t.classList.remove("inherit-font-size"),null===(r=null===(e=t.parentElement)||void 0===e?void 0:e.style)||void 0===r||r.removeProperty("font-size")}),(e=>{var r,o;t.classList.add("inherit-font-size"),null===(o=null===(r=t.parentElement)||void 0===r?void 0:r.style)||void 0===o||o.setProperty("font-size",e)})),g.refresh()},y={getValue:()=>g.doc.getValue(),setValue:e=>g.doc.setValue(e),setDarkMode:e=>{e?g.setOption("theme",d):g.setOption("theme",r.theme)},copyCode:()=>new Promise(((e,t)=>window.isSecureContext?e(navigator.clipboard.writeText(g.getValue())):t("context is not secure"))),setFontSize:p,changeFontSize:e=>{const t=g.getWrapperElement(),r=(d=w(t),c=".CodeMirror-scroll",((e,t)=>{const r=void 0===t?document:t.dom;return 1!==(o=r).nodeType&&9!==o.nodeType&&11!==o.nodeType||0===o.childElementCount?a.none():a.from(r.querySelector(e)).map(w);var o})(c,d)).map((e=>((e,t)=>{const r=e.dom,o=window.getComputedStyle(r).getPropertyValue(t);return""!==o||A(e)?o:((e,t)=>v(e)?e.style.getPropertyValue(t):"")(r,t)})(e,"font-size"))).getOr("0px"),o=(i=r,u=["unsupportedLength"],a.from(T.exec(i)).bind((e=>{const t=Number(e[1]),r=e[2];return((e,t)=>l(t,(t=>l(P[t],(t=>e===t)))))(r,u)?a.some({value:t,unit:r}):a.none()}))),n=o.map((e=>e.value)).getOr(0),s=o.map((e=>e.unit)).getOr("");var i,u,d,c;let m=a.none();return"increase"===e&&(m=a.some(`${n+1}${s}`)),"decrease"===e&&(m=a.some(`${n>5?n-1:n}${s}`)),p(m),m},destroy:()=>{var e,o;t.removeEventListener("keyup",h),t.removeEventListener("keydown",h),t.removeEventListener("keypress",h),e=r.editorId,o=r.advcodeInstanceId,N(e).bind((e=>a.from(e.plugins.advcode))).each((e=>{e[o]&&delete e[o]})),s.destroy()}};return y},k={},M=(e,t)=>{if(k[t])return Promise.resolve();{const r=N(t),o=r.bind((e=>{var t;return a.from(null===(t=e.ui)||void 0===t?void 0:t.styleSheetLoader)})).getOr(tinymce.DOM.styleSheetLoader);return r.each((r=>{r.on("remove",(()=>{o.unload(e),delete k[t]}))})),k[t]=!0,((e,t)=>{const r="advcode/css/codemirror.css",o=null!=t?t:tinymce.DOM.styleSheetLoader;if(tinymce.Resource.has(r)){const t=tinymce.Resource.get(r);return o.loadRawCss(e,t),Promise.resolve()}return o.load(e)})(e,o)}};tinymce.Resource.add("tinymce.plugins.advcode.customeditor",((e,r)=>new Promise((o=>{const n=w(e);var s;((e,r,o)=>{((e,r,o)=>{if(!t(o))throw console.error("Invalid call to CSS.set. Property ",r,":: Value ",o,":: Element ",e),new Error("CSS value must be a string: "+o);v(e)&&e.style.setProperty(r,o)})(e.dom,r,o)})(n,"width","100%"),(s=n,a.from(s.dom.parentNode).map(w)).filter(c).each((e=>((e,t)=>{(e=>void 0!==e.dom.classList)(e)?e.dom.classList.add(t):p(e,t)})(e,"mce-codemirror")));const l=(u=r.codeMirrorScriptUrl,d=r.codeMirrorCssUrl,m=r.editorId,g=r.currentAdvStatus,Promise.all([M(d,m),("tinymce.plugins.advcode.CodeMirror",h=u,tinymce.Resource.load("tinymce.plugins.advcode.CodeMirror",h))]).then((([e,t])=>(e,r,o)=>L(t(),e,r,o,g)))).then((t=>{const{setValue:o,getValue:n,copyCode:s,setDarkMode:l,changeFontSize:u,setFontSize:d,destroy:c}=t(e,r,"",r.currentAdvStatus),m={getValue:n,setValue:o,destroy:c};return r.currentAdvStatus.fontSize.fold(i,(()=>d(r.currentAdvStatus.fontSize))),((e,t)=>N(e).bind((e=>a.from(e.plugins.advcode))).map((e=>(e[t]||(e[t]=(()=>{const e=(e=>{const t=(e=>{let t=e;return{get:()=>t,set:e=>{t=e}}})(a.none()),r=()=>t.get().each(e);return{clear:()=>{r(),t.set(a.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:e=>{r(),t.set(a.some(e))}}})(i);return{...e,on:t=>e.get().each(t)}})()),e[t]))))(r.editorId,r.advcodeInstanceId).each((e=>e.set({copyCode:s,changeFontSize:u,setFontSize:d,setDarkMode:l}))),m}));var u,d,m,g,h;o(l)}))))}();
@@ -4,7 +4,7 @@
4
4
  * Copyright (c) 2023 Ephox Corporation DBA Tiny Technologies, Inc.
5
5
  * Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/
6
6
  *
7
- * Version: 3.3.0-95
7
+ * Version: 3.4.0-107
8
8
  */
9
9
 
10
- !function(){"use strict";const e=e=>t=>typeof t===e,t=e=>"string"===(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(r=o=e,(n=String).prototype.isPrototypeOf(r)||(null===(s=o.constructor)||void 0===s?void 0:s.name)===n.name)?"string":t;var r,o,n,s})(e),r=e("boolean"),o=e=>!(e=>null==e)(e),n=e("function"),s=e("number"),i=()=>{};class a{constructor(e,t){this.tag=e,this.value=t}static some(e){return new a(!0,e)}static none(){return a.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?a.some(e(this.value)):a.none()}bind(e){return this.tag?e(this.value):a.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:a.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return o(e)?a.some(e):a.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}a.singletonNone=new a(!1);const l=(e,t)=>{for(let r=0,o=e.length;r<o;r++)if(t(e[r],r))return!0;return!1},u=Object.hasOwnProperty;"undefined"!=typeof window?window:Function("return this;")();const d=e=>t=>(e=>e.dom.nodeType)(t)===e,c=d(1),m=d(3),g=d(9),h=d(11),p=(e,o)=>((e,o,n)=>{const i=((e,t)=>{const r=((e,t)=>{const r=e.dom.getAttribute(t);return null===r?void 0:r})(e,t);return void 0===r||""===r?[]:r.split(" ")})(e,o);return((e,o,n)=>{((e,o,n)=>{if(!(t(n)||r(n)||s(n)))throw console.error("Invalid call to Attribute.set. Key ",o,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(o,n+"")})(e.dom,o,n)})(e,o,i.concat([n]).join(" ")),!0})(e,"class",o),v=e=>void 0!==e.style&&n(e.style.getPropertyValue),y=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},f=(e,t)=>{const r=(t||document).createElement(e);return y(r)},w=y,S=e=>g(e)?e:w(e.dom.ownerDocument),b=e=>h(e)&&o(e.dom.host),C=n(Element.prototype.attachShadow)&&n(Node.prototype.getRootNode)?e=>w(e.dom.getRootNode()):S,E=e=>w(e.dom.host),A=e=>{const t=m(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const r=t.ownerDocument;return(e=>{const t=C(e);return b(t)?a.some(t):a.none()})(w(t)).fold((()=>r.body.contains(t)),(o=A,n=E,e=>o(n(e))));var o,n},I=()=>O(w(document)),O=e=>{const t=e.dom.body;if(null==t)throw new Error("Body is not available yet");return w(t)},N=e=>{return(t=tinymce,"get",((e,t)=>u.call(e,t))(t,"get")?a.from(t.get):a.none()).bind((t=>a.from(t.call(tinymce,e))));var t},T={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},L=(()=>{const e="[0-9]+",t="[eE][+-]?"+e,r=e=>`(?:${e})?`,o=["Infinity",e+"\\."+r(e)+r(t),"\\."+e+r(t),e+r(t)].join("|");return new RegExp(`^([+-]?(?:${o}))(.*)$`)})(),P=(e,t,r,o="",n)=>{const s=(e=>{const t=N(e).map((e=>{const t=C(w(e.getElement()));return b(r=t)?r:w(S(r).dom.body);var r})).getOrThunk(I);if(c(t))return{element:t,destroy:i};{const e=f("div");return((e,t)=>{e.dom.appendChild(t.dom)})(t,e),{element:e,destroy:()=>(e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)})(e)}}})(r.editorId),u=((e,t)=>{const r=(r,o)=>(o&&!o()||setTimeout((()=>{r.state.completionActive||r.showHint({completeSingle:!1,container:t})}),100),e.Pass);return{completeAfter:r,completeIfAfterLt:t=>r(t,(()=>{const r=t.getCursor();return"<"===t.getRange(e.Pos(r.line,r.ch-1),r)})),completeIfInTag:t=>r(t,(()=>{const r=t.getTokenAt(t.getCursor());return!!("string"!==r.type||/['"]/.test(r.string.charAt(r.string.length-1))&&1!==r.string.length)&&e.innerMode(t.getMode(),r.state).state.tagName}))}})(e,s.element.dom),d="dracula",m={lineWrapping:r.lineWrapping,lineNumbers:r.lineNumbers,foldGutter:r.foldGutter,theme:n.dark?d:r.theme,direction:r.direction,matchTags:{bothTags:!0},keyMap:"sublime",gutters:r.gutter?["CodeMirror-linenumbers","CodeMirror-foldgutter"]:[],extraKeys:{"Alt-F":"findPersistent","Ctrl-J":"toMatchingTag","Ctrl-B":"selectNextOccurrence","'<'":u.completeAfter,"'/'":u.completeIfAfterLt,"' '":u.completeIfInTag,"'='":u.completeIfInTag,"Ctrl-Q":e=>{e.foldCode(e.getCursor())}},mode:"text/html",value:o},g=e(t,m),h=e=>{27!==e.keyCode&&e.stopPropagation()};t.addEventListener("keyup",h),t.addEventListener("keydown",h),t.addEventListener("keypress",h),setTimeout((()=>{g.focus(),r.cursor&&g.doc.setCursor(r.cursor)}),0),setTimeout((()=>g.refresh()),200);const p=e=>{const t=g.getWrapperElement();e.fold((()=>{var e,r;t.classList.remove("inherit-font-size"),null===(r=null===(e=t.parentElement)||void 0===e?void 0:e.style)||void 0===r||r.removeProperty("font-size")}),(e=>{var r,o;t.classList.add("inherit-font-size"),null===(o=null===(r=t.parentElement)||void 0===r?void 0:r.style)||void 0===o||o.setProperty("font-size",e)})),g.refresh()},y={getValue:()=>g.doc.getValue(),setValue:e=>g.doc.setValue(e),setDarkMode:e=>{e?g.setOption("theme",d):g.setOption("theme",r.theme)},copyCode:()=>new Promise(((e,t)=>window.isSecureContext?e(navigator.clipboard.writeText(g.getValue())):t("context is not secure"))),setFontSize:p,changeFontSize:e=>{const t=g.getWrapperElement(),r=(d=w(t),c=".CodeMirror-scroll",((e,t)=>{const r=void 0===t?document:t.dom;return 1!==(o=r).nodeType&&9!==o.nodeType&&11!==o.nodeType||0===o.childElementCount?a.none():a.from(r.querySelector(e)).map(w);var o})(c,d)).map((e=>((e,t)=>{const r=e.dom,o=window.getComputedStyle(r).getPropertyValue(t);return""!==o||A(e)?o:((e,t)=>v(e)?e.style.getPropertyValue(t):"")(r,t)})(e,"font-size"))).getOr("0px"),o=(i=r,u=["unsupportedLength"],a.from(L.exec(i)).bind((e=>{const t=Number(e[1]),r=e[2];return((e,t)=>l(t,(t=>l(T[t],(t=>e===t)))))(r,u)?a.some({value:t,unit:r}):a.none()}))),n=o.map((e=>e.value)).getOr(0),s=o.map((e=>e.unit)).getOr("");var i,u,d,c;let m=a.none();return"increase"===e&&(m=a.some(`${n+1}${s}`)),"decrease"===e&&(m=a.some(`${n>5?n-1:n}${s}`)),p(m),m},destroy:()=>{var e,o;t.removeEventListener("keyup",h),t.removeEventListener("keydown",h),t.removeEventListener("keypress",h),e=r.editorId,o=r.advcodeInstanceId,N(e).bind((e=>a.from(e.plugins.advcode))).each((e=>{e[o]&&delete e[o]})),s.destroy()}};return y},k={},M=(e,t)=>{if(k[t])return Promise.resolve();{const n=N(t),s=n.bind((e=>{var t;return a.from(null===(t=e.ui)||void 0===t?void 0:t.styleSheetLoader)})).getOr(tinymce.DOM.styleSheetLoader);return n.each((r=>{r.on("remove",(()=>{s.unload(e),delete k[t]}))})),k[t]=!0,r=e,(null!=(o=s)?o:tinymce.DOM.styleSheetLoader).load(r)}var r,o};tinymce.Resource.add("tinymce.plugins.advcode.customeditor",((e,r)=>new Promise((o=>{const n=w(e);var s;((e,r,o)=>{((e,r,o)=>{if(!t(o))throw console.error("Invalid call to CSS.set. Property ",r,":: Value ",o,":: Element ",e),new Error("CSS value must be a string: "+o);v(e)&&e.style.setProperty(r,o)})(e.dom,r,o)})(n,"width","100%"),(s=n,a.from(s.dom.parentNode).map(w)).filter(c).each((e=>((e,t)=>{(e=>void 0!==e.dom.classList)(e)?e.dom.classList.add(t):p(e,t)})(e,"mce-codemirror")));const l=(u=r.codeMirrorScriptUrl,d=r.codeMirrorCssUrl,m=r.editorId,g=r.currentAdvStatus,Promise.all([M(d,m),("tinymce.plugins.advcode.CodeMirror",h=u,tinymce.Resource.load("tinymce.plugins.advcode.CodeMirror",h))]).then((([e,t])=>(e,r,o)=>P(t(),e,r,o,g)))).then((t=>{const{setValue:o,getValue:n,copyCode:s,setDarkMode:l,changeFontSize:u,setFontSize:d,destroy:c}=t(e,r,"",r.currentAdvStatus),m={getValue:n,setValue:o,destroy:c};return r.currentAdvStatus.fontSize.fold(i,(()=>d(r.currentAdvStatus.fontSize))),((e,t)=>N(e).bind((e=>a.from(e.plugins.advcode))).map((e=>(e[t]||(e[t]=(()=>{const e=(e=>{const t=(e=>{let t=e;return{get:()=>t,set:e=>{t=e}}})(a.none()),r=()=>t.get().each(e);return{clear:()=>{r(),t.set(a.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:e=>{r(),t.set(a.some(e))}}})(i);return{...e,on:t=>e.get().each(t)}})()),e[t]))))(r.editorId,r.advcodeInstanceId).each((e=>e.set({copyCode:s,changeFontSize:u,setFontSize:d,setDarkMode:l}))),m}));var u,d,m,g,h;o(l)}))))}();
10
+ !function(){"use strict";const e=e=>t=>typeof t===e,t=e=>"string"===(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(r=o=e,(n=String).prototype.isPrototypeOf(r)||(null===(s=o.constructor)||void 0===s?void 0:s.name)===n.name)?"string":t;var r,o,n,s})(e),r=e("boolean"),o=e=>!(e=>null==e)(e),n=e("function"),s=e("number"),i=()=>{};class a{constructor(e,t){this.tag=e,this.value=t}static some(e){return new a(!0,e)}static none(){return a.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?a.some(e(this.value)):a.none()}bind(e){return this.tag?e(this.value):a.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:a.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return o(e)?a.some(e):a.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}a.singletonNone=new a(!1);const l=(e,t)=>{for(let r=0,o=e.length;r<o;r++)if(t(e[r],r))return!0;return!1},u=Object.hasOwnProperty;"undefined"!=typeof window?window:Function("return this;")();const d=e=>t=>(e=>e.dom.nodeType)(t)===e,c=d(1),m=d(3),g=d(9),h=d(11),p=(e,o)=>((e,o,n)=>{const i=((e,t)=>{const r=((e,t)=>{const r=e.dom.getAttribute(t);return null===r?void 0:r})(e,t);return void 0===r||""===r?[]:r.split(" ")})(e,o);return((e,o,n)=>{((e,o,n)=>{if(!(t(n)||r(n)||s(n)))throw console.error("Invalid call to Attribute.set. Key ",o,":: Value ",n,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(o,n+"")})(e.dom,o,n)})(e,o,i.concat([n]).join(" ")),!0})(e,"class",o),v=e=>void 0!==e.style&&n(e.style.getPropertyValue),y=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},f=(e,t)=>{const r=(t||document).createElement(e);return y(r)},w=y,S=e=>g(e)?e:w(e.dom.ownerDocument),b=e=>h(e)&&o(e.dom.host),C=n(Element.prototype.attachShadow)&&n(Node.prototype.getRootNode)?e=>w(e.dom.getRootNode()):S,E=e=>w(e.dom.host),A=e=>{const t=m(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const r=t.ownerDocument;return(e=>{const t=C(e);return b(t)?a.some(t):a.none()})(w(t)).fold((()=>r.body.contains(t)),(o=A,n=E,e=>o(n(e))));var o,n},I=()=>O(w(document)),O=e=>{const t=e.dom.body;if(null==t)throw new Error("Body is not available yet");return w(t)},N=e=>{return(t=tinymce,"get",((e,t)=>u.call(e,t))(t,"get")?a.from(t.get):a.none()).bind((t=>a.from(t.call(tinymce,e))));var t},P={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},T=(()=>{const e="[0-9]+",t="[eE][+-]?"+e,r=e=>`(?:${e})?`,o=["Infinity",e+"\\."+r(e)+r(t),"\\."+e+r(t),e+r(t)].join("|");return new RegExp(`^([+-]?(?:${o}))(.*)$`)})(),L=(e,t,r,o="",n)=>{const s=(e=>{const t=N(e).map((e=>{const t=C(w(e.getElement()));return b(r=t)?r:w(S(r).dom.body);var r})).getOrThunk(I);if(c(t))return{element:t,destroy:i};{const e=f("div");return((e,t)=>{e.dom.appendChild(t.dom)})(t,e),{element:e,destroy:()=>(e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)})(e)}}})(r.editorId),u=((e,t)=>{const r=(r,o)=>(o&&!o()||setTimeout((()=>{r.state.completionActive||r.showHint({completeSingle:!1,container:t})}),100),e.Pass);return{completeAfter:r,completeIfAfterLt:t=>r(t,(()=>{const r=t.getCursor();return"<"===t.getRange(e.Pos(r.line,r.ch-1),r)})),completeIfInTag:t=>r(t,(()=>{const r=t.getTokenAt(t.getCursor());return!!("string"!==r.type||/['"]/.test(r.string.charAt(r.string.length-1))&&1!==r.string.length)&&e.innerMode(t.getMode(),r.state).state.tagName}))}})(e,s.element.dom),d="dracula",m={lineWrapping:r.lineWrapping,lineNumbers:r.lineNumbers,foldGutter:r.foldGutter,theme:n.dark?d:r.theme,direction:r.direction,matchTags:{bothTags:!0},keyMap:"sublime",gutters:r.gutter?["CodeMirror-linenumbers","CodeMirror-foldgutter"]:[],extraKeys:{"Alt-F":"findPersistent","Ctrl-J":"toMatchingTag","Ctrl-B":"selectNextOccurrence","'<'":u.completeAfter,"'/'":u.completeIfAfterLt,"' '":u.completeIfInTag,"'='":u.completeIfInTag,"Ctrl-Q":e=>{e.foldCode(e.getCursor())}},mode:"text/html",value:o},g=e(t,m),h=e=>{27!==e.keyCode&&e.stopPropagation()};t.addEventListener("keyup",h),t.addEventListener("keydown",h),t.addEventListener("keypress",h),setTimeout((()=>{g.focus(),r.cursor&&g.doc.setCursor(r.cursor)}),0),setTimeout((()=>g.refresh()),200);const p=e=>{const t=g.getWrapperElement();e.fold((()=>{var e,r;t.classList.remove("inherit-font-size"),null===(r=null===(e=t.parentElement)||void 0===e?void 0:e.style)||void 0===r||r.removeProperty("font-size")}),(e=>{var r,o;t.classList.add("inherit-font-size"),null===(o=null===(r=t.parentElement)||void 0===r?void 0:r.style)||void 0===o||o.setProperty("font-size",e)})),g.refresh()},y={getValue:()=>g.doc.getValue(),setValue:e=>g.doc.setValue(e),setDarkMode:e=>{e?g.setOption("theme",d):g.setOption("theme",r.theme)},copyCode:()=>new Promise(((e,t)=>window.isSecureContext?e(navigator.clipboard.writeText(g.getValue())):t("context is not secure"))),setFontSize:p,changeFontSize:e=>{const t=g.getWrapperElement(),r=(d=w(t),c=".CodeMirror-scroll",((e,t)=>{const r=void 0===t?document:t.dom;return 1!==(o=r).nodeType&&9!==o.nodeType&&11!==o.nodeType||0===o.childElementCount?a.none():a.from(r.querySelector(e)).map(w);var o})(c,d)).map((e=>((e,t)=>{const r=e.dom,o=window.getComputedStyle(r).getPropertyValue(t);return""!==o||A(e)?o:((e,t)=>v(e)?e.style.getPropertyValue(t):"")(r,t)})(e,"font-size"))).getOr("0px"),o=(i=r,u=["unsupportedLength"],a.from(T.exec(i)).bind((e=>{const t=Number(e[1]),r=e[2];return((e,t)=>l(t,(t=>l(P[t],(t=>e===t)))))(r,u)?a.some({value:t,unit:r}):a.none()}))),n=o.map((e=>e.value)).getOr(0),s=o.map((e=>e.unit)).getOr("");var i,u,d,c;let m=a.none();return"increase"===e&&(m=a.some(`${n+1}${s}`)),"decrease"===e&&(m=a.some(`${n>5?n-1:n}${s}`)),p(m),m},destroy:()=>{var e,o;t.removeEventListener("keyup",h),t.removeEventListener("keydown",h),t.removeEventListener("keypress",h),e=r.editorId,o=r.advcodeInstanceId,N(e).bind((e=>a.from(e.plugins.advcode))).each((e=>{e[o]&&delete e[o]})),s.destroy()}};return y},k={},M=(e,t)=>{if(k[t])return Promise.resolve();{const r=N(t),o=r.bind((e=>{var t;return a.from(null===(t=e.ui)||void 0===t?void 0:t.styleSheetLoader)})).getOr(tinymce.DOM.styleSheetLoader);return r.each((r=>{r.on("remove",(()=>{o.unload(e),delete k[t]}))})),k[t]=!0,((e,t)=>{const r="advcode/css/codemirror.css",o=null!=t?t:tinymce.DOM.styleSheetLoader;if(tinymce.Resource.has(r)){const t=tinymce.Resource.get(r);return o.loadRawCss(e,t),Promise.resolve()}return o.load(e)})(e,o)}};tinymce.Resource.add("tinymce.plugins.advcode.customeditor",((e,r)=>new Promise((o=>{const n=w(e);var s;((e,r,o)=>{((e,r,o)=>{if(!t(o))throw console.error("Invalid call to CSS.set. Property ",r,":: Value ",o,":: Element ",e),new Error("CSS value must be a string: "+o);v(e)&&e.style.setProperty(r,o)})(e.dom,r,o)})(n,"width","100%"),(s=n,a.from(s.dom.parentNode).map(w)).filter(c).each((e=>((e,t)=>{(e=>void 0!==e.dom.classList)(e)?e.dom.classList.add(t):p(e,t)})(e,"mce-codemirror")));const l=(u=r.codeMirrorScriptUrl,d=r.codeMirrorCssUrl,m=r.editorId,g=r.currentAdvStatus,Promise.all([M(d,m),("tinymce.plugins.advcode.CodeMirror",h=u,tinymce.Resource.load("tinymce.plugins.advcode.CodeMirror",h))]).then((([e,t])=>(e,r,o)=>L(t(),e,r,o,g)))).then((t=>{const{setValue:o,getValue:n,copyCode:s,setDarkMode:l,changeFontSize:u,setFontSize:d,destroy:c}=t(e,r,"",r.currentAdvStatus),m={getValue:n,setValue:o,destroy:c};return r.currentAdvStatus.fontSize.fold(i,(()=>d(r.currentAdvStatus.fontSize))),((e,t)=>N(e).bind((e=>a.from(e.plugins.advcode))).map((e=>(e[t]||(e[t]=(()=>{const e=(e=>{const t=(e=>{let t=e;return{get:()=>t,set:e=>{t=e}}})(a.none()),r=()=>t.get().each(e);return{clear:()=>{r(),t.set(a.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:e=>{r(),t.set(a.some(e))}}})(i);return{...e,on:t=>e.get().each(t)}})()),e[t]))))(r.editorId,r.advcodeInstanceId).each((e=>e.set({copyCode:s,changeFontSize:u,setFontSize:d,setDarkMode:l}))),m}));var u,d,m,g,h;o(l)}))))}();
@@ -4,7 +4,7 @@
4
4
  * Copyright (c) 2023 Ephox Corporation DBA Tiny Technologies, Inc.
5
5
  * Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/
6
6
  *
7
- * Version: 3.3.0-95
7
+ * Version: 3.4.0-107
8
8
  */
9
9
 
10
- !function(){"use strict";const e=e=>parseInt(e,10),t=(e,t)=>{const o=e-t;return 0===o?0:o>0?1:-1},o=(e,t,o)=>({major:e,minor:t,patch:o}),n=t=>{const n=/([0-9]+)\.([0-9]+)\.([0-9]+)(?:(\-.+)?)/.exec(t);return n?o(e(n[1]),e(n[2]),e(n[3])):o(0,0,0)},r=e=>t=>typeof t===e,s=e=>"string"===(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=n=e,(r=String).prototype.isPrototypeOf(o)||(null===(s=n.constructor)||void 0===s?void 0:s.name)===r.name)?"string":t;var o,n,r,s})(e),i=r("boolean"),c=e=>!(e=>null==e)(e),a=r("function"),d=r("number");class l{constructor(e,t){this.tag=e,this.value=t}static some(e){return new l(!0,e)}static none(){return l.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?l.some(e(this.value)):l.none()}bind(e){return this.tag?e(this.value):l.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:l.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return c(e)?l.some(e):l.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}l.singletonNone=new l(!1);let u=0;const m=e=>{const t=(new Date).getTime(),o=Math.floor(1e9*Math.random());return u++,e+"_"+o+u+String(t)},g=e=>t=>t.options.get(e),p=g("codemirror_script"),h=g("codemirror_css"),v=g("codemirror_linewrapping"),f=g("codemirror_linenumbers"),y=g("codemirror_foldgutter"),b=g("codemirror_gutter"),w=g("codemirror_theme"),C=e=>"rtl"===e.getBody().dir?"rtl":"ltr",S=g("advcode_headless"),_=g("advcode_inline"),k=(e,t,o)=>({customEditorScriptUrl:t+"/customeditor.min.js",codeMirrorScriptUrl:p(e),codeMirrorCssUrl:h(e),lineWrapping:v(e),lineNumbers:f(e),foldGutter:y(e),theme:w(e),direction:C(e),gutter:b(e),editorId:e.id,advcodeInstanceId:m("advcode_instance"),currentAdvStatus:o}),x=()=>{},z=()=>!1,I=(e,t)=>{for(let o=0,n=e.length;o<n;o++)if(t(e[o],o))return!0;return!1},T=Object.hasOwnProperty,A=(e,t)=>T.call(e,t);"undefined"!=typeof window?window:Function("return this;")();const E=e=>t=>(e=>e.dom.nodeType)(t)===e,M=E(1),N=E(3),O=E(9),L=E(11),D=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},P=(e,t)=>{const o=(t||document).createElement("div");if(o.innerHTML=e,!o.hasChildNodes()||o.childNodes.length>1){const t="HTML does not have a single root node";throw console.error(t,e),new Error(t)}return D(o.childNodes[0])},V=(e,t)=>{const o=(t||document).createElement(e);return D(o)},F=D,j=e=>O(e)?e:F(e.dom.ownerDocument),B=(e,t)=>{e.dom.appendChild(t.dom)},R=e=>L(e)&&c(e.dom.host),$=a(Element.prototype.attachShadow)&&a(Node.prototype.getRootNode)?e=>F(e.dom.getRootNode()):j,W=e=>F(e.dom.host),U=e=>{const t=N(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const o=t.ownerDocument;return(e=>{const t=$(e);return R(t)?l.some(t):l.none()})(F(t)).fold((()=>o.body.contains(t)),(n=U,r=W,e=>n(r(e))));var n,r},G=()=>H(F(document)),H=e=>{const t=e.dom.body;if(null==t)throw new Error("Body is not available yet");return F(t)},q=(e,t,o)=>{let n=e.dom;const r=a(o)?o:z;for(;n.parentNode;){n=n.parentNode;const e=F(n);if(t(e))return l.some(e);if(r(e))break}return l.none()},K=e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},Q="\x3c!--mce_cursor--\x3e",J=(e,t)=>{const o=e.dom,n=e.selection,r=n.getBookmark(),s=(e=>A(e,"name"))(r)?o.select(r.name)[r.index]:o.select(`#${r.id}_start`)[0],i=l.from(s).map((t=>{const o=F(e.getBody());return((e,t)=>{const n=P(Q),r=F(e),s=((e,t,o)=>((e,t,o,n,r)=>n(o)?l.some(o):a(r)&&r(o)?l.none():t(o,n,r))(0,q,e,t,o))(r,(e=>((e,t)=>{const o=e.dom;return!(!o||!o.hasAttribute)&&o.hasAttribute("data-mce-bogus")})(e)),(e=>{return t=o,e.dom===t.dom;var t})).getOr(r);return((e,t)=>{const o=(e=>l.from(e.dom.parentNode).map(F))(e);o.each((o=>{o.dom.insertBefore(t.dom,e.dom)}))})(s,n),n})(t)})),c=t();return i.each(K),n.moveToBookmark(r),c},X=e=>{const t=(e=>{const t=e.split(/\r?\n/);return((e,t)=>{for(let o=0;o<e.length;o++){const n=t(e[o],o);if(n.isSome())return n}return l.none()})(t,((e,o)=>{const n=e.indexOf(Q);return(r=-1!==n,s=n,r?l.some(s):l.none()).map((n=>e===Q?0===o?{line:o,ch:0}:{line:o-1,ch:t[o-1].length}:{line:o,ch:n}));var r,s})).getOr({line:0,ch:0})})(J(e,(()=>e.getContent({source_view:!0}))));return{content:e.getContent({source_view:!0}),cursor:t}},Y=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}},Z=()=>{const e=(e=>{const t=Y(l.none()),o=()=>t.get().each(e);return{clear:()=>{o(),t.set(l.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:e=>{o(),t.set(l.some(e))}}})(x);return{...e,on:t=>e.get().each(t)}},ee=(e,t)=>{e.focus(),e.undoManager.transact((()=>{e.setContent(t)})),e.selection.setCursorLocation(),e.nodeChanged()},te=e=>{return(t=tinymce,"get",A(t,"get")?l.from(t.get):l.none()).bind((t=>l.from(t.call(tinymce,e))));var t},oe=(e,t)=>te(e).bind((e=>l.from(e.plugins.advcode))).map((e=>(e[t]||(e[t]=Z()),e[t]))),ne=(e,t)=>{te(e).bind((e=>l.from(e.plugins.advcode))).each((e=>{e[t]&&delete e[t]}))},re=(e,t)=>((e,t,o)=>{const n=((e,t)=>{const o=((e,t)=>{const o=e.dom.getAttribute(t);return null===o?void 0:o})(e,t);return void 0===o||""===o?[]:o.split(" ")})(e,t);return((e,t,o)=>{((e,t,o)=>{if(!(s(o)||i(o)||d(o)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,o+"")})(e.dom,t,o)})(e,t,n.concat([o]).join(" ")),!0})(e,"class",t),se={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},ie=(()=>{const e="[0-9]+",t="[eE][+-]?"+e,o=e=>`(?:${e})?`,n=["Infinity",e+"\\."+o(e)+o(t),"\\."+e+o(t),e+o(t)].join("|");return new RegExp(`^([+-]?(?:${n}))(.*)$`)})(),ce=(e,t,o,n="",r)=>{const s=(e=>{const t=te(e).map((e=>{const t=$(F(e.getElement()));return R(o=t)?o:F(j(o).dom.body);var o})).getOrThunk(G);if(M(t))return{element:t,destroy:x};{const e=V("div");return B(t,e),{element:e,destroy:()=>K(e)}}})(o.editorId),i=((e,t)=>{const o=(o,n)=>(n&&!n()||setTimeout((()=>{o.state.completionActive||o.showHint({completeSingle:!1,container:t})}),100),e.Pass);return{completeAfter:o,completeIfAfterLt:t=>o(t,(()=>{const o=t.getCursor();return"<"===t.getRange(e.Pos(o.line,o.ch-1),o)})),completeIfInTag:t=>o(t,(()=>{const o=t.getTokenAt(t.getCursor());return!!("string"!==o.type||/['"]/.test(o.string.charAt(o.string.length-1))&&1!==o.string.length)&&e.innerMode(t.getMode(),o.state).state.tagName}))}})(e,s.element.dom),c="dracula",d={lineWrapping:o.lineWrapping,lineNumbers:o.lineNumbers,foldGutter:o.foldGutter,theme:r.dark?c:o.theme,direction:o.direction,matchTags:{bothTags:!0},keyMap:"sublime",gutters:o.gutter?["CodeMirror-linenumbers","CodeMirror-foldgutter"]:[],extraKeys:{"Alt-F":"findPersistent","Ctrl-J":"toMatchingTag","Ctrl-B":"selectNextOccurrence","'<'":i.completeAfter,"'/'":i.completeIfAfterLt,"' '":i.completeIfInTag,"'='":i.completeIfInTag,"Ctrl-Q":e=>{e.foldCode(e.getCursor())}},mode:"text/html",value:n},u=e(t,d),m=e=>{27!==e.keyCode&&e.stopPropagation()};t.addEventListener("keyup",m),t.addEventListener("keydown",m),t.addEventListener("keypress",m),setTimeout((()=>{u.focus(),o.cursor&&u.doc.setCursor(o.cursor)}),0),setTimeout((()=>u.refresh()),200);const g=e=>{const t=u.getWrapperElement();e.fold((()=>{var e,o;t.classList.remove("inherit-font-size"),null===(o=null===(e=t.parentElement)||void 0===e?void 0:e.style)||void 0===o||o.removeProperty("font-size")}),(e=>{var o,n;t.classList.add("inherit-font-size"),null===(n=null===(o=t.parentElement)||void 0===o?void 0:o.style)||void 0===n||n.setProperty("font-size",e)})),u.refresh()},p={getValue:()=>u.doc.getValue(),setValue:e=>u.doc.setValue(e),setDarkMode:e=>{e?u.setOption("theme",c):u.setOption("theme",o.theme)},copyCode:()=>new Promise(((e,t)=>window.isSecureContext?e(navigator.clipboard.writeText(u.getValue())):t("context is not secure"))),setFontSize:g,changeFontSize:e=>{const t=u.getWrapperElement(),o=(d=F(t),m=".CodeMirror-scroll",((e,t)=>{const o=void 0===t?document:t.dom;return 1!==(n=o).nodeType&&9!==n.nodeType&&11!==n.nodeType||0===n.childElementCount?l.none():l.from(o.querySelector(e)).map(F);var n})(m,d)).map((e=>((e,t)=>{const o=e.dom,n=window.getComputedStyle(o).getPropertyValue(t);return""!==n||U(e)?n:((e,t)=>(e=>void 0!==e.style&&a(e.style.getPropertyValue))(e)?e.style.getPropertyValue(t):"")(o,t)})(e,"font-size"))).getOr("0px"),n=(i=o,c=["unsupportedLength"],l.from(ie.exec(i)).bind((e=>{const t=Number(e[1]),o=e[2];return((e,t)=>I(t,(t=>I(se[t],(t=>e===t)))))(o,c)?l.some({value:t,unit:o}):l.none()}))),r=n.map((e=>e.value)).getOr(0),s=n.map((e=>e.unit)).getOr("");var i,c,d,m;let p=l.none();return"increase"===e&&(p=l.some(`${r+1}${s}`)),"decrease"===e&&(p=l.some(`${r>5?r-1:r}${s}`)),g(p),p},destroy:()=>{t.removeEventListener("keyup",m),t.removeEventListener("keydown",m),t.removeEventListener("keypress",m),ne(o.editorId,o.advcodeInstanceId),s.destroy()}};return p},ae={},de=(e,t)=>{if(ae[t])return Promise.resolve();{const r=te(t),s=r.bind((e=>{var t;return l.from(null===(t=e.ui)||void 0===t?void 0:t.styleSheetLoader)})).getOr(tinymce.DOM.styleSheetLoader);return r.each((o=>{o.on("remove",(()=>{s.unload(e),delete ae[t]}))})),ae[t]=!0,o=e,(null!=(n=s)?n:tinymce.DOM.styleSheetLoader).load(o)}var o,n},le=e=>({name:"codeview",type:"customeditor",tag:"div",scriptId:"tinymce.plugins.advcode.customeditor",scriptUrl:e.customEditorScriptUrl,settings:e}),ue=(e,t)=>{const o={dark:!1,fullscreen:!1,fontSize:l.none()};e.addCommand("mceCodeEditor",(()=>{_(e)&&!e.inline?"code"===e.mode.get()?e.mode.set("design"):e.mode.set("code"):(()=>{const n=k(e,t,o);((e,t)=>{const o=X(e),n={...t,cursor:o.cursor},r=t.currentAdvStatus,s=oe(t.editorId,t.advcodeInstanceId),i=()=>{let e=[{type:"togglebutton",name:"dark_theme_toggle",text:"Dark/light mode",tooltip:"Dark/light mode",active:r.dark,align:"start"},{type:"custom",name:"increase_font_size",text:"Increase font size",icon:"text-size-increase",align:"start"},{type:"custom",name:"decrease_font_size",text:"Decrease font size",icon:"text-size-decrease",align:"start"},{type:"cancel",name:"cancel",text:"Cancel",align:"end"},{type:"submit",name:"save",text:"Save",primary:!0,align:"end"}];return window.isSecureContext?e=[{type:"custom",name:"copy_code",text:"Copy code",align:"start"}].concat(e):console.warn("Copy code is not allowed since window.isSecureContext is false"),e},c=()=>({title:"Source Code",size:"large",body:{type:"panel",items:[le(n)]},buttons:i(),initialData:{codeview:o.content},onSubmit:o=>{ee(e,o.getData().codeview),ne(t.editorId,t.advcodeInstanceId),o.close()},onClose:()=>{ne(t.editorId,t.advcodeInstanceId)},onAction:(e,t)=>{"copy_code"===t.name&&s.each((t=>t.get().each((t=>{(async()=>{const o=setTimeout((()=>{e.block("copying")}),150);await t.copyCode(),clearTimeout(o),e.unblock()})()})))),"increase_font_size"===t.name&&s.each((e=>e.get().each((e=>{r.fontSize=e.changeFontSize("increase")})))),"decrease_font_size"===t.name&&s.each((e=>e.get().each((e=>{r.fontSize=e.changeFontSize("decrease")})))),"dark_theme_toggle"===t.name&&s.each((t=>t.get().each((t=>{t.setDarkMode(!r.dark),r.dark=!r.dark,e.redial(c())}))))}});e.windowManager.open(c())})(e,n)})()}))},me=e=>e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen(),ge=(e,t,o)=>{const n=Y({dark:!1,fullscreen:!1,fontSize:l.none()}),r=Y(me(e)),s=Z(),i=Y(l.none()),c={dark:!1,fullscreen:!1,fontSize:l.none()},a=()=>i.get().bind((t=>oe(e.id,t))),d=()=>{s.get().each((({destroy:t})=>{t(),n.get().fullscreen!==r.get()&&e.execCommand("mceFullScreen")})),s.clear()};e.ui.registry.addView("code",{buttons:1===o?[{type:"group",buttons:[...e.hasPlugin("fullscreen")?[{type:"togglebutton",icon:"fullscreen",tooltip:"Fullsceen",onAction:t=>{e.execCommand("mceFullScreen",void 0,void 0,{skip_focus:!0});const o=!t.isActive();n.set({...n.get(),fullscreen:o}),t.setActive(o)}}]:[],{type:"togglebutton",icon:"copy",text:"Copy code",onAction:e=>a().each((e=>e.get().each((e=>{(async()=>{await e.copyCode()})()}))))}]},{type:"group",buttons:[{type:"togglebutton",text:"Dark/light mode",tooltip:"Dark/light mode",onAction:e=>{a().each((t=>t.get().each((t=>{n.set({...n.get(),dark:!e.isActive()}),e.setActive(n.get().dark),t.setDarkMode(n.get().dark)}))))}},{type:"togglebutton",icon:"text-size-increase",tooltip:"Increase font size",onAction:e=>a().each((e=>e.get().each((e=>n.set({...n.get(),fontSize:e.changeFontSize("increase")})))))},{type:"togglebutton",icon:"text-size-decrease",tooltip:"Decrease font size",onAction:e=>a().each((e=>e.get().each((e=>n.set({...n.get(),fontSize:e.changeFontSize("decrease")})))))}]},{type:"group",buttons:[{type:"button",text:"Cancel",onAction:()=>{s.get().each((()=>{d(),e.mode.set("design")}))}},{type:"button",text:"Save code",buttonType:"primary",onAction:()=>{s.get().each((({syncWithEditor:t})=>{t(),d(),e.mode.set("design")}))}}]}]:[],onShow:a=>{const d=a.getContainer(),u=k(e,t,c);i.set(l.some(u.advcodeInstanceId)),r.set(me(e)),e.setProgressState(!0),n.get().fullscreen!==me(e)&&e.execCommand("mceFullScreen"),((e,t,o,n)=>{return Promise.all([de(t,o),("tinymce.plugins.advcode.CodeMirror",r=e,tinymce.Resource.load("tinymce.plugins.advcode.CodeMirror",r))]).then((([e,t])=>(e,o,r)=>ce(t(),e,o,r,n)));var r})(p(e),h(e),e.id,n.get()).then((t=>{e.setProgressState(!1),s.set(((e,t,o,n,r,s)=>{const i=X(o),c={...r,cursor:i.cursor},a=V("div");var d;d=a,((e,t)=>{for(let t=0,n=e.length;t<n;t++)o=e[t],((e,t)=>{(e=>void 0!==e.dom.classList)(e)?e.dom.classList.add(t):re(e,t)})(d,o);var o})(0===t?["tox-inline-headless-codemirror","mce-codemirror"]:["tox-custom-editor","tox-inline-codemirror","mce-codemirror"]),B(F(e),a);const{getValue:l,destroy:u,copyCode:m,changeFontSize:g,setDarkMode:p,setFontSize:h}=n(a.dom,c,i.content,s);oe(r.editorId,r.advcodeInstanceId).each((e=>e.set({copyCode:m,changeFontSize:g,setDarkMode:p,setFontSize:h}))),h(s.fontSize);const v=()=>ee(o,l());return 0===t&&o.on("BeforeGetContent",v),{syncWithEditor:v,destroy:()=>{0===t&&(o.off("BeforeGetContent",v),v()),K(a),u()}}})(d,o,e,t,u,n.get()))}))},onHide:d})};tinymce.PluginManager.requireLangPack("advcode","ar,bg_BG,ca,cs,da,de,el,es,eu,fa,fi,fr_FR,he_IL,hi,hr,hu_HU,id,it,ja,kk,ko_KR,ms,nb_NO,nl,pl,pt_BR,pt_PT,ro,ru,sk,sl_SI,sv_SE,th_TH,tr,uk,vi,zh_CN,zh_TW"),tinymce.PluginManager.add("advcode",((e,o)=>{((e,o)=>!!e&&-1===((e,o)=>{const n=t(e.major,o.major);if(0!==n)return n;const r=t(e.minor,o.minor);if(0!==r)return r;const s=t(e.patch,o.patch);return 0!==s?s:0})((e=>n((e=>[e.majorVersion,e.minorVersion].join(".").split(".").slice(0,3).join("."))(e)))(e),n(o)))(tinymce,"6.3.0")?console.error("The advcode plugin requires at least version 6.3.0 of TinyMCE."):((e,t)=>{((e,t)=>{const o=e.options.register;o("codemirror_script",{processor:"string",default:t+"/codemirror.min.js"}),o("codemirror_css",{processor:"string",default:t+"/codemirror.min.css"}),o("codemirror_linewrapping",{processor:"boolean",default:!0}),o("codemirror_linenumbers",{processor:"boolean",default:!0}),o("codemirror_foldgutter",{processor:"boolean",default:!0}),o("codemirror_gutter",{processor:"boolean",default:!0}),o("codemirror_theme",{processor:"string",default:"default"}),o("advcode_headless",{processor:"boolean",default:!1}),o("advcode_inline",{processor:"boolean",default:!1})})(e,t),ue(e,t),(e=>{const t="sourcecode",o=()=>e.execCommand("mceCodeEditor");e.ui.registry.addButton("code",{icon:t,tooltip:"Source code",onAction:o}),e.ui.registry.addMenuItem("code",{icon:t,text:"Source code",onAction:o})})(e),((e,t)=>{ge(e,t,S(e)?0:1)})(e,t),(e=>{e.mode.register("code",{activate:()=>{"code"!==e.queryCommandValue("ToggleView")&&e.execCommand("ToggleView",!1,"code")},deactivate:()=>{"code"===e.queryCommandValue("ToggleView")&&e.execCommand("ToggleView",!1,"code")},editorReadOnly:!1})})(e)})(e,o)}))}();
10
+ !function(){"use strict";const e=e=>parseInt(e,10),t=(e,t)=>{const o=e-t;return 0===o?0:o>0?1:-1},o=(e,t,o)=>({major:e,minor:t,patch:o}),r=t=>{const r=/([0-9]+)\.([0-9]+)\.([0-9]+)(?:(\-.+)?)/.exec(t);return r?o(e(r[1]),e(r[2]),e(r[3])):o(0,0,0)},n=e=>t=>typeof t===e,s=e=>"string"===(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=r=e,(n=String).prototype.isPrototypeOf(o)||(null===(s=r.constructor)||void 0===s?void 0:s.name)===n.name)?"string":t;var o,r,n,s})(e),i=n("boolean"),c=e=>!(e=>null==e)(e),a=n("function"),d=n("number");class l{constructor(e,t){this.tag=e,this.value=t}static some(e){return new l(!0,e)}static none(){return l.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?l.some(e(this.value)):l.none()}bind(e){return this.tag?e(this.value):l.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:l.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return c(e)?l.some(e):l.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}l.singletonNone=new l(!1);let u=0;const m=e=>{const t=(new Date).getTime(),o=Math.floor(1e9*Math.random());return u++,e+"_"+o+u+String(t)},g=e=>t=>t.options.get(e),p=g("codemirror_script"),h=g("codemirror_css"),v=g("codemirror_linewrapping"),f=g("codemirror_linenumbers"),y=g("codemirror_foldgutter"),b=g("codemirror_gutter"),w=g("codemirror_theme"),C=e=>"rtl"===e.getBody().dir?"rtl":"ltr",S=g("advcode_headless"),_=g("advcode_inline"),k=(e,t,o)=>({customEditorScriptUrl:t+"/customeditor.min.js",codeMirrorScriptUrl:p(e),codeMirrorCssUrl:h(e),lineWrapping:v(e),lineNumbers:f(e),foldGutter:y(e),theme:w(e),direction:C(e),gutter:b(e),editorId:e.id,advcodeInstanceId:m("advcode_instance"),currentAdvStatus:o}),x=()=>{},z=()=>!1,I=(e,t)=>{for(let o=0,r=e.length;o<r;o++)if(t(e[o],o))return!0;return!1},T=Object.hasOwnProperty,A=(e,t)=>T.call(e,t);"undefined"!=typeof window?window:Function("return this;")();const E=e=>t=>(e=>e.dom.nodeType)(t)===e,M=E(1),N=E(3),O=E(9),D=E(11),L=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},P=(e,t)=>{const o=(t||document).createElement("div");if(o.innerHTML=e,!o.hasChildNodes()||o.childNodes.length>1){const t="HTML does not have a single root node";throw console.error(t,e),new Error(t)}return L(o.childNodes[0])},V=(e,t)=>{const o=(t||document).createElement(e);return L(o)},F=L,j=e=>O(e)?e:F(e.dom.ownerDocument),B=(e,t)=>{e.dom.appendChild(t.dom)},R=e=>D(e)&&c(e.dom.host),$=a(Element.prototype.attachShadow)&&a(Node.prototype.getRootNode)?e=>F(e.dom.getRootNode()):j,W=e=>F(e.dom.host),U=e=>{const t=N(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const o=t.ownerDocument;return(e=>{const t=$(e);return R(t)?l.some(t):l.none()})(F(t)).fold((()=>o.body.contains(t)),(r=U,n=W,e=>r(n(e))));var r,n},G=()=>H(F(document)),H=e=>{const t=e.dom.body;if(null==t)throw new Error("Body is not available yet");return F(t)},q=(e,t,o)=>{let r=e.dom;const n=a(o)?o:z;for(;r.parentNode;){r=r.parentNode;const e=F(r);if(t(e))return l.some(e);if(n(e))break}return l.none()},K=e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},Q="\x3c!--mce_cursor--\x3e",J=(e,t)=>{const o=e.dom,r=e.selection,n=r.getBookmark(),s=(e=>A(e,"name"))(n)?o.select(n.name)[n.index]:o.select(`#${n.id}_start`)[0],i=l.from(s).map((t=>{const o=F(e.getBody());return((e,t)=>{const r=P(Q),n=F(e),s=((e,t,o)=>((e,t,o,r,n)=>r(o)?l.some(o):a(n)&&n(o)?l.none():t(o,r,n))(0,q,e,t,o))(n,(e=>((e,t)=>{const o=e.dom;return!(!o||!o.hasAttribute)&&o.hasAttribute("data-mce-bogus")})(e)),(e=>{return t=o,e.dom===t.dom;var t})).getOr(n);return((e,t)=>{const o=(e=>l.from(e.dom.parentNode).map(F))(e);o.each((o=>{o.dom.insertBefore(t.dom,e.dom)}))})(s,r),r})(t)})),c=t();return i.each(K),r.moveToBookmark(n),c},X=e=>{const t=(e=>{const t=e.split(/\r?\n/);return((e,t)=>{for(let o=0;o<e.length;o++){const r=t(e[o],o);if(r.isSome())return r}return l.none()})(t,((e,o)=>{const r=e.indexOf(Q);return(n=-1!==r,s=r,n?l.some(s):l.none()).map((r=>e===Q?0===o?{line:o,ch:0}:{line:o-1,ch:t[o-1].length}:{line:o,ch:r}));var n,s})).getOr({line:0,ch:0})})(J(e,(()=>e.getContent({source_view:!0}))));return{content:e.getContent({source_view:!0}),cursor:t}},Y=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}},Z=()=>{const e=(e=>{const t=Y(l.none()),o=()=>t.get().each(e);return{clear:()=>{o(),t.set(l.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:e=>{o(),t.set(l.some(e))}}})(x);return{...e,on:t=>e.get().each(t)}},ee=(e,t)=>{e.focus(),e.undoManager.transact((()=>{e.setContent(t)})),e.selection.setCursorLocation(),e.nodeChanged()},te=e=>{return(t=tinymce,"get",A(t,"get")?l.from(t.get):l.none()).bind((t=>l.from(t.call(tinymce,e))));var t},oe=(e,t)=>te(e).bind((e=>l.from(e.plugins.advcode))).map((e=>(e[t]||(e[t]=Z()),e[t]))),re=(e,t)=>{te(e).bind((e=>l.from(e.plugins.advcode))).each((e=>{e[t]&&delete e[t]}))},ne=(e,t)=>((e,t,o)=>{const r=((e,t)=>{const o=((e,t)=>{const o=e.dom.getAttribute(t);return null===o?void 0:o})(e,t);return void 0===o||""===o?[]:o.split(" ")})(e,t);return((e,t,o)=>{((e,t,o)=>{if(!(s(o)||i(o)||d(o)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,o+"")})(e.dom,t,o)})(e,t,r.concat([o]).join(" ")),!0})(e,"class",t),se={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},ie=(()=>{const e="[0-9]+",t="[eE][+-]?"+e,o=e=>`(?:${e})?`,r=["Infinity",e+"\\."+o(e)+o(t),"\\."+e+o(t),e+o(t)].join("|");return new RegExp(`^([+-]?(?:${r}))(.*)$`)})(),ce=(e,t,o,r="",n)=>{const s=(e=>{const t=te(e).map((e=>{const t=$(F(e.getElement()));return R(o=t)?o:F(j(o).dom.body);var o})).getOrThunk(G);if(M(t))return{element:t,destroy:x};{const e=V("div");return B(t,e),{element:e,destroy:()=>K(e)}}})(o.editorId),i=((e,t)=>{const o=(o,r)=>(r&&!r()||setTimeout((()=>{o.state.completionActive||o.showHint({completeSingle:!1,container:t})}),100),e.Pass);return{completeAfter:o,completeIfAfterLt:t=>o(t,(()=>{const o=t.getCursor();return"<"===t.getRange(e.Pos(o.line,o.ch-1),o)})),completeIfInTag:t=>o(t,(()=>{const o=t.getTokenAt(t.getCursor());return!!("string"!==o.type||/['"]/.test(o.string.charAt(o.string.length-1))&&1!==o.string.length)&&e.innerMode(t.getMode(),o.state).state.tagName}))}})(e,s.element.dom),c="dracula",d={lineWrapping:o.lineWrapping,lineNumbers:o.lineNumbers,foldGutter:o.foldGutter,theme:n.dark?c:o.theme,direction:o.direction,matchTags:{bothTags:!0},keyMap:"sublime",gutters:o.gutter?["CodeMirror-linenumbers","CodeMirror-foldgutter"]:[],extraKeys:{"Alt-F":"findPersistent","Ctrl-J":"toMatchingTag","Ctrl-B":"selectNextOccurrence","'<'":i.completeAfter,"'/'":i.completeIfAfterLt,"' '":i.completeIfInTag,"'='":i.completeIfInTag,"Ctrl-Q":e=>{e.foldCode(e.getCursor())}},mode:"text/html",value:r},u=e(t,d),m=e=>{27!==e.keyCode&&e.stopPropagation()};t.addEventListener("keyup",m),t.addEventListener("keydown",m),t.addEventListener("keypress",m),setTimeout((()=>{u.focus(),o.cursor&&u.doc.setCursor(o.cursor)}),0),setTimeout((()=>u.refresh()),200);const g=e=>{const t=u.getWrapperElement();e.fold((()=>{var e,o;t.classList.remove("inherit-font-size"),null===(o=null===(e=t.parentElement)||void 0===e?void 0:e.style)||void 0===o||o.removeProperty("font-size")}),(e=>{var o,r;t.classList.add("inherit-font-size"),null===(r=null===(o=t.parentElement)||void 0===o?void 0:o.style)||void 0===r||r.setProperty("font-size",e)})),u.refresh()},p={getValue:()=>u.doc.getValue(),setValue:e=>u.doc.setValue(e),setDarkMode:e=>{e?u.setOption("theme",c):u.setOption("theme",o.theme)},copyCode:()=>new Promise(((e,t)=>window.isSecureContext?e(navigator.clipboard.writeText(u.getValue())):t("context is not secure"))),setFontSize:g,changeFontSize:e=>{const t=u.getWrapperElement(),o=(d=F(t),m=".CodeMirror-scroll",((e,t)=>{const o=void 0===t?document:t.dom;return 1!==(r=o).nodeType&&9!==r.nodeType&&11!==r.nodeType||0===r.childElementCount?l.none():l.from(o.querySelector(e)).map(F);var r})(m,d)).map((e=>((e,t)=>{const o=e.dom,r=window.getComputedStyle(o).getPropertyValue(t);return""!==r||U(e)?r:((e,t)=>(e=>void 0!==e.style&&a(e.style.getPropertyValue))(e)?e.style.getPropertyValue(t):"")(o,t)})(e,"font-size"))).getOr("0px"),r=(i=o,c=["unsupportedLength"],l.from(ie.exec(i)).bind((e=>{const t=Number(e[1]),o=e[2];return((e,t)=>I(t,(t=>I(se[t],(t=>e===t)))))(o,c)?l.some({value:t,unit:o}):l.none()}))),n=r.map((e=>e.value)).getOr(0),s=r.map((e=>e.unit)).getOr("");var i,c,d,m;let p=l.none();return"increase"===e&&(p=l.some(`${n+1}${s}`)),"decrease"===e&&(p=l.some(`${n>5?n-1:n}${s}`)),g(p),p},destroy:()=>{t.removeEventListener("keyup",m),t.removeEventListener("keydown",m),t.removeEventListener("keypress",m),re(o.editorId,o.advcodeInstanceId),s.destroy()}};return p},ae={},de=(e,t)=>{if(ae[t])return Promise.resolve();{const o=te(t),r=o.bind((e=>{var t;return l.from(null===(t=e.ui)||void 0===t?void 0:t.styleSheetLoader)})).getOr(tinymce.DOM.styleSheetLoader);return o.each((o=>{o.on("remove",(()=>{r.unload(e),delete ae[t]}))})),ae[t]=!0,((e,t)=>{const o="advcode/css/codemirror.css",r=null!=t?t:tinymce.DOM.styleSheetLoader;if(tinymce.Resource.has(o)){const t=tinymce.Resource.get(o);return r.loadRawCss(e,t),Promise.resolve()}return r.load(e)})(e,r)}},le=e=>({name:"codeview",type:"customeditor",tag:"div",scriptId:"tinymce.plugins.advcode.customeditor",scriptUrl:e.customEditorScriptUrl,settings:e}),ue=(e,t)=>{const o={dark:!1,fullscreen:!1,fontSize:l.none()};e.addCommand("mceCodeEditor",(()=>{_(e)&&!e.inline?"code"===e.mode.get()?e.mode.set("design"):e.mode.set("code"):(()=>{const r=k(e,t,o);((e,t)=>{const o=X(e),r={...t,cursor:o.cursor},n=t.currentAdvStatus,s=oe(t.editorId,t.advcodeInstanceId),i=()=>{let e=[{type:"togglebutton",name:"dark_theme_toggle",text:"Dark/light mode",tooltip:"Dark/light mode",active:n.dark,align:"start"},{type:"custom",name:"increase_font_size",text:"Increase font size",icon:"text-size-increase",align:"start"},{type:"custom",name:"decrease_font_size",text:"Decrease font size",icon:"text-size-decrease",align:"start"},{type:"cancel",name:"cancel",text:"Cancel",align:"end"},{type:"submit",name:"save",text:"Save",primary:!0,align:"end"}];return window.isSecureContext?e=[{type:"custom",name:"copy_code",text:"Copy code",align:"start"}].concat(e):console.warn("Copy code is not allowed since window.isSecureContext is false"),e},c=o=>({title:"Source Code",size:"large",body:{type:"panel",items:[le(r)]},buttons:i(),initialData:{codeview:o},onSubmit:o=>{ee(e,o.getData().codeview),re(t.editorId,t.advcodeInstanceId),o.close()},onClose:()=>{re(t.editorId,t.advcodeInstanceId)},onAction:(e,t)=>{"copy_code"===t.name&&s.each((t=>t.get().each((t=>{(async()=>{const o=setTimeout((()=>{e.block("copying")}),150);await t.copyCode(),clearTimeout(o),e.unblock()})()})))),"increase_font_size"===t.name&&s.each((e=>e.get().each((e=>{n.fontSize=e.changeFontSize("increase")})))),"decrease_font_size"===t.name&&s.each((e=>e.get().each((e=>{n.fontSize=e.changeFontSize("decrease")})))),"dark_theme_toggle"===t.name&&s.each((t=>t.get().each((t=>{t.setDarkMode(!n.dark),n.dark=!n.dark,e.redial(c(e.getData().codeview))}))))}});e.windowManager.open(c(o.content))})(e,r)})()}))},me=e=>e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen(),ge=(e,t,o)=>{const r=Y({dark:!1,fullscreen:!1,fontSize:l.none()}),n=Y(me(e)),s=Z(),i=Y(l.none()),c={dark:!1,fullscreen:!1,fontSize:l.none()},a=()=>i.get().bind((t=>oe(e.id,t))),d=()=>{s.get().each((({destroy:t})=>{t(),r.get().fullscreen!==n.get()&&e.execCommand("mceFullScreen")})),s.clear()};e.ui.registry.addView("code",{buttons:1===o?[{type:"group",buttons:[...e.hasPlugin("fullscreen")?[{type:"togglebutton",icon:"fullscreen",tooltip:"Fullsceen",onAction:t=>{e.execCommand("mceFullScreen",void 0,void 0,{skip_focus:!0});const o=!t.isActive();r.set({...r.get(),fullscreen:o}),t.setActive(o)}}]:[],{type:"togglebutton",icon:"copy",text:"Copy code",onAction:e=>a().each((e=>e.get().each((e=>{(async()=>{await e.copyCode()})()}))))}]},{type:"group",buttons:[{type:"togglebutton",text:"Dark/light mode",tooltip:"Dark/light mode",onAction:e=>{a().each((t=>t.get().each((t=>{r.set({...r.get(),dark:!e.isActive()}),e.setActive(r.get().dark),t.setDarkMode(r.get().dark)}))))}},{type:"togglebutton",icon:"text-size-increase",tooltip:"Increase font size",onAction:e=>a().each((e=>e.get().each((e=>r.set({...r.get(),fontSize:e.changeFontSize("increase")})))))},{type:"togglebutton",icon:"text-size-decrease",tooltip:"Decrease font size",onAction:e=>a().each((e=>e.get().each((e=>r.set({...r.get(),fontSize:e.changeFontSize("decrease")})))))}]},{type:"group",buttons:[{type:"button",text:"Cancel",onAction:()=>{s.get().each((()=>{d(),e.mode.set("design")}))}},{type:"button",text:"Save code",buttonType:"primary",onAction:()=>{s.get().each((({syncWithEditor:t})=>{t(),d(),e.mode.set("design")}))}}]}]:[],onShow:a=>{const d=a.getContainer(),u=k(e,t,c);i.set(l.some(u.advcodeInstanceId)),n.set(me(e)),e.setProgressState(!0),r.get().fullscreen!==me(e)&&e.execCommand("mceFullScreen"),((e,t,o,r)=>{return Promise.all([de(t,o),("tinymce.plugins.advcode.CodeMirror",n=e,tinymce.Resource.load("tinymce.plugins.advcode.CodeMirror",n))]).then((([e,t])=>(e,o,n)=>ce(t(),e,o,n,r)));var n})(p(e),h(e),e.id,r.get()).then((t=>{e.setProgressState(!1),s.set(((e,t,o,r,n,s)=>{const i=X(o),c={...n,cursor:i.cursor},a=V("div");var d;d=a,((e,t)=>{for(let t=0,r=e.length;t<r;t++)o=e[t],((e,t)=>{(e=>void 0!==e.dom.classList)(e)?e.dom.classList.add(t):ne(e,t)})(d,o);var o})(0===t?["tox-inline-headless-codemirror","mce-codemirror"]:["tox-custom-editor","tox-inline-codemirror","mce-codemirror"]),B(F(e),a);const{getValue:l,destroy:u,copyCode:m,changeFontSize:g,setDarkMode:p,setFontSize:h}=r(a.dom,c,i.content,s);oe(n.editorId,n.advcodeInstanceId).each((e=>e.set({copyCode:m,changeFontSize:g,setDarkMode:p,setFontSize:h}))),h(s.fontSize);const v=()=>ee(o,l());return 0===t&&o.on("BeforeGetContent",v),{syncWithEditor:v,destroy:()=>{0===t&&(o.off("BeforeGetContent",v),v()),K(a),u()}}})(d,o,e,t,u,r.get()))}))},onHide:d})};tinymce.PluginManager.requireLangPack("advcode","ar,bg_BG,ca,cs,da,de,el,es,eu,fa,fi,fr_FR,he_IL,hi,hr,hu_HU,id,it,ja,kk,ko_KR,ms,nb_NO,nl,pl,pt_BR,pt_PT,ro,ru,sk,sl_SI,sv_SE,th_TH,tr,uk,vi,zh_CN,zh_TW"),tinymce.PluginManager.add("advcode",((e,o)=>{((e,o)=>!!e&&-1===((e,o)=>{const r=t(e.major,o.major);if(0!==r)return r;const n=t(e.minor,o.minor);if(0!==n)return n;const s=t(e.patch,o.patch);return 0!==s?s:0})((e=>r((e=>[e.majorVersion,e.minorVersion].join(".").split(".").slice(0,3).join("."))(e)))(e),r(o)))(tinymce,"6.8.0")?console.error("The advcode plugin requires at least version 6.8.0 of TinyMCE."):((e,t)=>{((e,t)=>{const o=e.options.register;o("codemirror_script",{processor:"string",default:t+"/codemirror.min.js"}),o("codemirror_css",{processor:"string",default:t+"/codemirror.min.css"}),o("codemirror_linewrapping",{processor:"boolean",default:!0}),o("codemirror_linenumbers",{processor:"boolean",default:!0}),o("codemirror_foldgutter",{processor:"boolean",default:!0}),o("codemirror_gutter",{processor:"boolean",default:!0}),o("codemirror_theme",{processor:"string",default:"default"}),o("advcode_headless",{processor:"boolean",default:!1}),o("advcode_inline",{processor:"boolean",default:!1})})(e,t),ue(e,t),(e=>{const t="sourcecode",o=()=>e.execCommand("mceCodeEditor");e.ui.registry.addButton("code",{icon:t,tooltip:"Source code",onAction:o}),e.ui.registry.addMenuItem("code",{icon:t,text:"Source code",onAction:o})})(e),((e,t)=>{ge(e,t,S(e)?0:1)})(e,t),(e=>{e.mode.register("code",{activate:()=>{"code"!==e.queryCommandValue("ToggleView")&&e.execCommand("ToggleView",!1,"code")},deactivate:()=>{"code"===e.queryCommandValue("ToggleView")&&e.execCommand("ToggleView",!1,"code")},editorReadOnly:!1})})(e)})(e,o)}))}();
@@ -4,7 +4,7 @@
4
4
  * Copyright (c) 2023 Ephox Corporation DBA Tiny Technologies, Inc.
5
5
  * Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/
6
6
  *
7
- * Version: 3.3.0-95
7
+ * Version: 3.4.0-107
8
8
  */
9
9
 
10
- !function(){"use strict";const e=e=>parseInt(e,10),t=(e,t)=>{const o=e-t;return 0===o?0:o>0?1:-1},o=(e,t,o)=>({major:e,minor:t,patch:o}),n=t=>{const n=/([0-9]+)\.([0-9]+)\.([0-9]+)(?:(\-.+)?)/.exec(t);return n?o(e(n[1]),e(n[2]),e(n[3])):o(0,0,0)},r=e=>t=>typeof t===e,s=e=>"string"===(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=n=e,(r=String).prototype.isPrototypeOf(o)||(null===(s=n.constructor)||void 0===s?void 0:s.name)===r.name)?"string":t;var o,n,r,s})(e),i=r("boolean"),c=e=>!(e=>null==e)(e),a=r("function"),d=r("number");class l{constructor(e,t){this.tag=e,this.value=t}static some(e){return new l(!0,e)}static none(){return l.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?l.some(e(this.value)):l.none()}bind(e){return this.tag?e(this.value):l.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:l.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return c(e)?l.some(e):l.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}l.singletonNone=new l(!1);let u=0;const m=e=>{const t=(new Date).getTime(),o=Math.floor(1e9*Math.random());return u++,e+"_"+o+u+String(t)},g=e=>t=>t.options.get(e),p=g("codemirror_script"),h=g("codemirror_css"),v=g("codemirror_linewrapping"),f=g("codemirror_linenumbers"),y=g("codemirror_foldgutter"),b=g("codemirror_gutter"),w=g("codemirror_theme"),C=e=>"rtl"===e.getBody().dir?"rtl":"ltr",S=g("advcode_headless"),_=g("advcode_inline"),k=(e,t,o)=>({customEditorScriptUrl:t+"/customeditor.min.js",codeMirrorScriptUrl:p(e),codeMirrorCssUrl:h(e),lineWrapping:v(e),lineNumbers:f(e),foldGutter:y(e),theme:w(e),direction:C(e),gutter:b(e),editorId:e.id,advcodeInstanceId:m("advcode_instance"),currentAdvStatus:o}),x=()=>{},z=()=>!1,I=(e,t)=>{for(let o=0,n=e.length;o<n;o++)if(t(e[o],o))return!0;return!1},T=Object.hasOwnProperty,A=(e,t)=>T.call(e,t);"undefined"!=typeof window?window:Function("return this;")();const E=e=>t=>(e=>e.dom.nodeType)(t)===e,M=E(1),N=E(3),O=E(9),L=E(11),D=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},P=(e,t)=>{const o=(t||document).createElement("div");if(o.innerHTML=e,!o.hasChildNodes()||o.childNodes.length>1){const t="HTML does not have a single root node";throw console.error(t,e),new Error(t)}return D(o.childNodes[0])},V=(e,t)=>{const o=(t||document).createElement(e);return D(o)},F=D,j=e=>O(e)?e:F(e.dom.ownerDocument),B=(e,t)=>{e.dom.appendChild(t.dom)},R=e=>L(e)&&c(e.dom.host),$=a(Element.prototype.attachShadow)&&a(Node.prototype.getRootNode)?e=>F(e.dom.getRootNode()):j,W=e=>F(e.dom.host),U=e=>{const t=N(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const o=t.ownerDocument;return(e=>{const t=$(e);return R(t)?l.some(t):l.none()})(F(t)).fold((()=>o.body.contains(t)),(n=U,r=W,e=>n(r(e))));var n,r},G=()=>H(F(document)),H=e=>{const t=e.dom.body;if(null==t)throw new Error("Body is not available yet");return F(t)},q=(e,t,o)=>{let n=e.dom;const r=a(o)?o:z;for(;n.parentNode;){n=n.parentNode;const e=F(n);if(t(e))return l.some(e);if(r(e))break}return l.none()},K=e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},Q="\x3c!--mce_cursor--\x3e",J=(e,t)=>{const o=e.dom,n=e.selection,r=n.getBookmark(),s=(e=>A(e,"name"))(r)?o.select(r.name)[r.index]:o.select(`#${r.id}_start`)[0],i=l.from(s).map((t=>{const o=F(e.getBody());return((e,t)=>{const n=P(Q),r=F(e),s=((e,t,o)=>((e,t,o,n,r)=>n(o)?l.some(o):a(r)&&r(o)?l.none():t(o,n,r))(0,q,e,t,o))(r,(e=>((e,t)=>{const o=e.dom;return!(!o||!o.hasAttribute)&&o.hasAttribute("data-mce-bogus")})(e)),(e=>{return t=o,e.dom===t.dom;var t})).getOr(r);return((e,t)=>{const o=(e=>l.from(e.dom.parentNode).map(F))(e);o.each((o=>{o.dom.insertBefore(t.dom,e.dom)}))})(s,n),n})(t)})),c=t();return i.each(K),n.moveToBookmark(r),c},X=e=>{const t=(e=>{const t=e.split(/\r?\n/);return((e,t)=>{for(let o=0;o<e.length;o++){const n=t(e[o],o);if(n.isSome())return n}return l.none()})(t,((e,o)=>{const n=e.indexOf(Q);return(r=-1!==n,s=n,r?l.some(s):l.none()).map((n=>e===Q?0===o?{line:o,ch:0}:{line:o-1,ch:t[o-1].length}:{line:o,ch:n}));var r,s})).getOr({line:0,ch:0})})(J(e,(()=>e.getContent({source_view:!0}))));return{content:e.getContent({source_view:!0}),cursor:t}},Y=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}},Z=()=>{const e=(e=>{const t=Y(l.none()),o=()=>t.get().each(e);return{clear:()=>{o(),t.set(l.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:e=>{o(),t.set(l.some(e))}}})(x);return{...e,on:t=>e.get().each(t)}},ee=(e,t)=>{e.focus(),e.undoManager.transact((()=>{e.setContent(t)})),e.selection.setCursorLocation(),e.nodeChanged()},te=e=>{return(t=tinymce,"get",A(t,"get")?l.from(t.get):l.none()).bind((t=>l.from(t.call(tinymce,e))));var t},oe=(e,t)=>te(e).bind((e=>l.from(e.plugins.advcode))).map((e=>(e[t]||(e[t]=Z()),e[t]))),ne=(e,t)=>{te(e).bind((e=>l.from(e.plugins.advcode))).each((e=>{e[t]&&delete e[t]}))},re=(e,t)=>((e,t,o)=>{const n=((e,t)=>{const o=((e,t)=>{const o=e.dom.getAttribute(t);return null===o?void 0:o})(e,t);return void 0===o||""===o?[]:o.split(" ")})(e,t);return((e,t,o)=>{((e,t,o)=>{if(!(s(o)||i(o)||d(o)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,o+"")})(e.dom,t,o)})(e,t,n.concat([o]).join(" ")),!0})(e,"class",t),se={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},ie=(()=>{const e="[0-9]+",t="[eE][+-]?"+e,o=e=>`(?:${e})?`,n=["Infinity",e+"\\."+o(e)+o(t),"\\."+e+o(t),e+o(t)].join("|");return new RegExp(`^([+-]?(?:${n}))(.*)$`)})(),ce=(e,t,o,n="",r)=>{const s=(e=>{const t=te(e).map((e=>{const t=$(F(e.getElement()));return R(o=t)?o:F(j(o).dom.body);var o})).getOrThunk(G);if(M(t))return{element:t,destroy:x};{const e=V("div");return B(t,e),{element:e,destroy:()=>K(e)}}})(o.editorId),i=((e,t)=>{const o=(o,n)=>(n&&!n()||setTimeout((()=>{o.state.completionActive||o.showHint({completeSingle:!1,container:t})}),100),e.Pass);return{completeAfter:o,completeIfAfterLt:t=>o(t,(()=>{const o=t.getCursor();return"<"===t.getRange(e.Pos(o.line,o.ch-1),o)})),completeIfInTag:t=>o(t,(()=>{const o=t.getTokenAt(t.getCursor());return!!("string"!==o.type||/['"]/.test(o.string.charAt(o.string.length-1))&&1!==o.string.length)&&e.innerMode(t.getMode(),o.state).state.tagName}))}})(e,s.element.dom),c="dracula",d={lineWrapping:o.lineWrapping,lineNumbers:o.lineNumbers,foldGutter:o.foldGutter,theme:r.dark?c:o.theme,direction:o.direction,matchTags:{bothTags:!0},keyMap:"sublime",gutters:o.gutter?["CodeMirror-linenumbers","CodeMirror-foldgutter"]:[],extraKeys:{"Alt-F":"findPersistent","Ctrl-J":"toMatchingTag","Ctrl-B":"selectNextOccurrence","'<'":i.completeAfter,"'/'":i.completeIfAfterLt,"' '":i.completeIfInTag,"'='":i.completeIfInTag,"Ctrl-Q":e=>{e.foldCode(e.getCursor())}},mode:"text/html",value:n},u=e(t,d),m=e=>{27!==e.keyCode&&e.stopPropagation()};t.addEventListener("keyup",m),t.addEventListener("keydown",m),t.addEventListener("keypress",m),setTimeout((()=>{u.focus(),o.cursor&&u.doc.setCursor(o.cursor)}),0),setTimeout((()=>u.refresh()),200);const g=e=>{const t=u.getWrapperElement();e.fold((()=>{var e,o;t.classList.remove("inherit-font-size"),null===(o=null===(e=t.parentElement)||void 0===e?void 0:e.style)||void 0===o||o.removeProperty("font-size")}),(e=>{var o,n;t.classList.add("inherit-font-size"),null===(n=null===(o=t.parentElement)||void 0===o?void 0:o.style)||void 0===n||n.setProperty("font-size",e)})),u.refresh()},p={getValue:()=>u.doc.getValue(),setValue:e=>u.doc.setValue(e),setDarkMode:e=>{e?u.setOption("theme",c):u.setOption("theme",o.theme)},copyCode:()=>new Promise(((e,t)=>window.isSecureContext?e(navigator.clipboard.writeText(u.getValue())):t("context is not secure"))),setFontSize:g,changeFontSize:e=>{const t=u.getWrapperElement(),o=(d=F(t),m=".CodeMirror-scroll",((e,t)=>{const o=void 0===t?document:t.dom;return 1!==(n=o).nodeType&&9!==n.nodeType&&11!==n.nodeType||0===n.childElementCount?l.none():l.from(o.querySelector(e)).map(F);var n})(m,d)).map((e=>((e,t)=>{const o=e.dom,n=window.getComputedStyle(o).getPropertyValue(t);return""!==n||U(e)?n:((e,t)=>(e=>void 0!==e.style&&a(e.style.getPropertyValue))(e)?e.style.getPropertyValue(t):"")(o,t)})(e,"font-size"))).getOr("0px"),n=(i=o,c=["unsupportedLength"],l.from(ie.exec(i)).bind((e=>{const t=Number(e[1]),o=e[2];return((e,t)=>I(t,(t=>I(se[t],(t=>e===t)))))(o,c)?l.some({value:t,unit:o}):l.none()}))),r=n.map((e=>e.value)).getOr(0),s=n.map((e=>e.unit)).getOr("");var i,c,d,m;let p=l.none();return"increase"===e&&(p=l.some(`${r+1}${s}`)),"decrease"===e&&(p=l.some(`${r>5?r-1:r}${s}`)),g(p),p},destroy:()=>{t.removeEventListener("keyup",m),t.removeEventListener("keydown",m),t.removeEventListener("keypress",m),ne(o.editorId,o.advcodeInstanceId),s.destroy()}};return p},ae={},de=(e,t)=>{if(ae[t])return Promise.resolve();{const r=te(t),s=r.bind((e=>{var t;return l.from(null===(t=e.ui)||void 0===t?void 0:t.styleSheetLoader)})).getOr(tinymce.DOM.styleSheetLoader);return r.each((o=>{o.on("remove",(()=>{s.unload(e),delete ae[t]}))})),ae[t]=!0,o=e,(null!=(n=s)?n:tinymce.DOM.styleSheetLoader).load(o)}var o,n},le=e=>({name:"codeview",type:"customeditor",tag:"div",scriptId:"tinymce.plugins.advcode.customeditor",scriptUrl:e.customEditorScriptUrl,settings:e}),ue=(e,t)=>{const o={dark:!1,fullscreen:!1,fontSize:l.none()};e.addCommand("mceCodeEditor",(()=>{_(e)&&!e.inline?"code"===e.mode.get()?e.mode.set("design"):e.mode.set("code"):(()=>{const n=k(e,t,o);((e,t)=>{const o=X(e),n={...t,cursor:o.cursor},r=t.currentAdvStatus,s=oe(t.editorId,t.advcodeInstanceId),i=()=>{let e=[{type:"togglebutton",name:"dark_theme_toggle",text:"Dark/light mode",tooltip:"Dark/light mode",active:r.dark,align:"start"},{type:"custom",name:"increase_font_size",text:"Increase font size",icon:"text-size-increase",align:"start"},{type:"custom",name:"decrease_font_size",text:"Decrease font size",icon:"text-size-decrease",align:"start"},{type:"cancel",name:"cancel",text:"Cancel",align:"end"},{type:"submit",name:"save",text:"Save",primary:!0,align:"end"}];return window.isSecureContext?e=[{type:"custom",name:"copy_code",text:"Copy code",align:"start"}].concat(e):console.warn("Copy code is not allowed since window.isSecureContext is false"),e},c=()=>({title:"Source Code",size:"large",body:{type:"panel",items:[le(n)]},buttons:i(),initialData:{codeview:o.content},onSubmit:o=>{ee(e,o.getData().codeview),ne(t.editorId,t.advcodeInstanceId),o.close()},onClose:()=>{ne(t.editorId,t.advcodeInstanceId)},onAction:(e,t)=>{"copy_code"===t.name&&s.each((t=>t.get().each((t=>{(async()=>{const o=setTimeout((()=>{e.block("copying")}),150);await t.copyCode(),clearTimeout(o),e.unblock()})()})))),"increase_font_size"===t.name&&s.each((e=>e.get().each((e=>{r.fontSize=e.changeFontSize("increase")})))),"decrease_font_size"===t.name&&s.each((e=>e.get().each((e=>{r.fontSize=e.changeFontSize("decrease")})))),"dark_theme_toggle"===t.name&&s.each((t=>t.get().each((t=>{t.setDarkMode(!r.dark),r.dark=!r.dark,e.redial(c())}))))}});e.windowManager.open(c())})(e,n)})()}))},me=e=>e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen(),ge=(e,t,o)=>{const n=Y({dark:!1,fullscreen:!1,fontSize:l.none()}),r=Y(me(e)),s=Z(),i=Y(l.none()),c={dark:!1,fullscreen:!1,fontSize:l.none()},a=()=>i.get().bind((t=>oe(e.id,t))),d=()=>{s.get().each((({destroy:t})=>{t(),n.get().fullscreen!==r.get()&&e.execCommand("mceFullScreen")})),s.clear()};e.ui.registry.addView("code",{buttons:1===o?[{type:"group",buttons:[...e.hasPlugin("fullscreen")?[{type:"togglebutton",icon:"fullscreen",tooltip:"Fullsceen",onAction:t=>{e.execCommand("mceFullScreen",void 0,void 0,{skip_focus:!0});const o=!t.isActive();n.set({...n.get(),fullscreen:o}),t.setActive(o)}}]:[],{type:"togglebutton",icon:"copy",text:"Copy code",onAction:e=>a().each((e=>e.get().each((e=>{(async()=>{await e.copyCode()})()}))))}]},{type:"group",buttons:[{type:"togglebutton",text:"Dark/light mode",tooltip:"Dark/light mode",onAction:e=>{a().each((t=>t.get().each((t=>{n.set({...n.get(),dark:!e.isActive()}),e.setActive(n.get().dark),t.setDarkMode(n.get().dark)}))))}},{type:"togglebutton",icon:"text-size-increase",tooltip:"Increase font size",onAction:e=>a().each((e=>e.get().each((e=>n.set({...n.get(),fontSize:e.changeFontSize("increase")})))))},{type:"togglebutton",icon:"text-size-decrease",tooltip:"Decrease font size",onAction:e=>a().each((e=>e.get().each((e=>n.set({...n.get(),fontSize:e.changeFontSize("decrease")})))))}]},{type:"group",buttons:[{type:"button",text:"Cancel",onAction:()=>{s.get().each((()=>{d(),e.mode.set("design")}))}},{type:"button",text:"Save code",buttonType:"primary",onAction:()=>{s.get().each((({syncWithEditor:t})=>{t(),d(),e.mode.set("design")}))}}]}]:[],onShow:a=>{const d=a.getContainer(),u=k(e,t,c);i.set(l.some(u.advcodeInstanceId)),r.set(me(e)),e.setProgressState(!0),n.get().fullscreen!==me(e)&&e.execCommand("mceFullScreen"),((e,t,o,n)=>{return Promise.all([de(t,o),("tinymce.plugins.advcode.CodeMirror",r=e,tinymce.Resource.load("tinymce.plugins.advcode.CodeMirror",r))]).then((([e,t])=>(e,o,r)=>ce(t(),e,o,r,n)));var r})(p(e),h(e),e.id,n.get()).then((t=>{e.setProgressState(!1),s.set(((e,t,o,n,r,s)=>{const i=X(o),c={...r,cursor:i.cursor},a=V("div");var d;d=a,((e,t)=>{for(let t=0,n=e.length;t<n;t++)o=e[t],((e,t)=>{(e=>void 0!==e.dom.classList)(e)?e.dom.classList.add(t):re(e,t)})(d,o);var o})(0===t?["tox-inline-headless-codemirror","mce-codemirror"]:["tox-custom-editor","tox-inline-codemirror","mce-codemirror"]),B(F(e),a);const{getValue:l,destroy:u,copyCode:m,changeFontSize:g,setDarkMode:p,setFontSize:h}=n(a.dom,c,i.content,s);oe(r.editorId,r.advcodeInstanceId).each((e=>e.set({copyCode:m,changeFontSize:g,setDarkMode:p,setFontSize:h}))),h(s.fontSize);const v=()=>ee(o,l());return 0===t&&o.on("BeforeGetContent",v),{syncWithEditor:v,destroy:()=>{0===t&&(o.off("BeforeGetContent",v),v()),K(a),u()}}})(d,o,e,t,u,n.get()))}))},onHide:d})};tinymce.PluginManager.requireLangPack("advcode","ar,bg_BG,ca,cs,da,de,el,es,eu,fa,fi,fr_FR,he_IL,hi,hr,hu_HU,id,it,ja,kk,ko_KR,ms,nb_NO,nl,pl,pt_BR,pt_PT,ro,ru,sk,sl_SI,sv_SE,th_TH,tr,uk,vi,zh_CN,zh_TW"),tinymce.PluginManager.add("advcode",((e,o)=>{((e,o)=>!!e&&-1===((e,o)=>{const n=t(e.major,o.major);if(0!==n)return n;const r=t(e.minor,o.minor);if(0!==r)return r;const s=t(e.patch,o.patch);return 0!==s?s:0})((e=>n((e=>[e.majorVersion,e.minorVersion].join(".").split(".").slice(0,3).join("."))(e)))(e),n(o)))(tinymce,"6.3.0")?console.error("The advcode plugin requires at least version 6.3.0 of TinyMCE."):((e,t)=>{((e,t)=>{const o=e.options.register;o("codemirror_script",{processor:"string",default:t+"/codemirror.min.js"}),o("codemirror_css",{processor:"string",default:t+"/codemirror.min.css"}),o("codemirror_linewrapping",{processor:"boolean",default:!0}),o("codemirror_linenumbers",{processor:"boolean",default:!0}),o("codemirror_foldgutter",{processor:"boolean",default:!0}),o("codemirror_gutter",{processor:"boolean",default:!0}),o("codemirror_theme",{processor:"string",default:"default"}),o("advcode_headless",{processor:"boolean",default:!1}),o("advcode_inline",{processor:"boolean",default:!1})})(e,t),ue(e,t),(e=>{const t="sourcecode",o=()=>e.execCommand("mceCodeEditor");e.ui.registry.addButton("code",{icon:t,tooltip:"Source code",onAction:o}),e.ui.registry.addMenuItem("code",{icon:t,text:"Source code",onAction:o})})(e),((e,t)=>{ge(e,t,S(e)?0:1)})(e,t),(e=>{e.mode.register("code",{activate:()=>{"code"!==e.queryCommandValue("ToggleView")&&e.execCommand("ToggleView",!1,"code")},deactivate:()=>{"code"===e.queryCommandValue("ToggleView")&&e.execCommand("ToggleView",!1,"code")},editorReadOnly:!1})})(e)})(e,o)}))}();
10
+ !function(){"use strict";const e=e=>parseInt(e,10),t=(e,t)=>{const o=e-t;return 0===o?0:o>0?1:-1},o=(e,t,o)=>({major:e,minor:t,patch:o}),r=t=>{const r=/([0-9]+)\.([0-9]+)\.([0-9]+)(?:(\-.+)?)/.exec(t);return r?o(e(r[1]),e(r[2]),e(r[3])):o(0,0,0)},n=e=>t=>typeof t===e,s=e=>"string"===(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=r=e,(n=String).prototype.isPrototypeOf(o)||(null===(s=r.constructor)||void 0===s?void 0:s.name)===n.name)?"string":t;var o,r,n,s})(e),i=n("boolean"),c=e=>!(e=>null==e)(e),a=n("function"),d=n("number");class l{constructor(e,t){this.tag=e,this.value=t}static some(e){return new l(!0,e)}static none(){return l.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?l.some(e(this.value)):l.none()}bind(e){return this.tag?e(this.value):l.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:l.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return c(e)?l.some(e):l.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}l.singletonNone=new l(!1);let u=0;const m=e=>{const t=(new Date).getTime(),o=Math.floor(1e9*Math.random());return u++,e+"_"+o+u+String(t)},g=e=>t=>t.options.get(e),p=g("codemirror_script"),h=g("codemirror_css"),v=g("codemirror_linewrapping"),f=g("codemirror_linenumbers"),y=g("codemirror_foldgutter"),b=g("codemirror_gutter"),w=g("codemirror_theme"),C=e=>"rtl"===e.getBody().dir?"rtl":"ltr",S=g("advcode_headless"),_=g("advcode_inline"),k=(e,t,o)=>({customEditorScriptUrl:t+"/customeditor.min.js",codeMirrorScriptUrl:p(e),codeMirrorCssUrl:h(e),lineWrapping:v(e),lineNumbers:f(e),foldGutter:y(e),theme:w(e),direction:C(e),gutter:b(e),editorId:e.id,advcodeInstanceId:m("advcode_instance"),currentAdvStatus:o}),x=()=>{},z=()=>!1,I=(e,t)=>{for(let o=0,r=e.length;o<r;o++)if(t(e[o],o))return!0;return!1},T=Object.hasOwnProperty,A=(e,t)=>T.call(e,t);"undefined"!=typeof window?window:Function("return this;")();const E=e=>t=>(e=>e.dom.nodeType)(t)===e,M=E(1),N=E(3),O=E(9),D=E(11),L=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},P=(e,t)=>{const o=(t||document).createElement("div");if(o.innerHTML=e,!o.hasChildNodes()||o.childNodes.length>1){const t="HTML does not have a single root node";throw console.error(t,e),new Error(t)}return L(o.childNodes[0])},V=(e,t)=>{const o=(t||document).createElement(e);return L(o)},F=L,j=e=>O(e)?e:F(e.dom.ownerDocument),B=(e,t)=>{e.dom.appendChild(t.dom)},R=e=>D(e)&&c(e.dom.host),$=a(Element.prototype.attachShadow)&&a(Node.prototype.getRootNode)?e=>F(e.dom.getRootNode()):j,W=e=>F(e.dom.host),U=e=>{const t=N(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const o=t.ownerDocument;return(e=>{const t=$(e);return R(t)?l.some(t):l.none()})(F(t)).fold((()=>o.body.contains(t)),(r=U,n=W,e=>r(n(e))));var r,n},G=()=>H(F(document)),H=e=>{const t=e.dom.body;if(null==t)throw new Error("Body is not available yet");return F(t)},q=(e,t,o)=>{let r=e.dom;const n=a(o)?o:z;for(;r.parentNode;){r=r.parentNode;const e=F(r);if(t(e))return l.some(e);if(n(e))break}return l.none()},K=e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},Q="\x3c!--mce_cursor--\x3e",J=(e,t)=>{const o=e.dom,r=e.selection,n=r.getBookmark(),s=(e=>A(e,"name"))(n)?o.select(n.name)[n.index]:o.select(`#${n.id}_start`)[0],i=l.from(s).map((t=>{const o=F(e.getBody());return((e,t)=>{const r=P(Q),n=F(e),s=((e,t,o)=>((e,t,o,r,n)=>r(o)?l.some(o):a(n)&&n(o)?l.none():t(o,r,n))(0,q,e,t,o))(n,(e=>((e,t)=>{const o=e.dom;return!(!o||!o.hasAttribute)&&o.hasAttribute("data-mce-bogus")})(e)),(e=>{return t=o,e.dom===t.dom;var t})).getOr(n);return((e,t)=>{const o=(e=>l.from(e.dom.parentNode).map(F))(e);o.each((o=>{o.dom.insertBefore(t.dom,e.dom)}))})(s,r),r})(t)})),c=t();return i.each(K),r.moveToBookmark(n),c},X=e=>{const t=(e=>{const t=e.split(/\r?\n/);return((e,t)=>{for(let o=0;o<e.length;o++){const r=t(e[o],o);if(r.isSome())return r}return l.none()})(t,((e,o)=>{const r=e.indexOf(Q);return(n=-1!==r,s=r,n?l.some(s):l.none()).map((r=>e===Q?0===o?{line:o,ch:0}:{line:o-1,ch:t[o-1].length}:{line:o,ch:r}));var n,s})).getOr({line:0,ch:0})})(J(e,(()=>e.getContent({source_view:!0}))));return{content:e.getContent({source_view:!0}),cursor:t}},Y=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}},Z=()=>{const e=(e=>{const t=Y(l.none()),o=()=>t.get().each(e);return{clear:()=>{o(),t.set(l.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:e=>{o(),t.set(l.some(e))}}})(x);return{...e,on:t=>e.get().each(t)}},ee=(e,t)=>{e.focus(),e.undoManager.transact((()=>{e.setContent(t)})),e.selection.setCursorLocation(),e.nodeChanged()},te=e=>{return(t=tinymce,"get",A(t,"get")?l.from(t.get):l.none()).bind((t=>l.from(t.call(tinymce,e))));var t},oe=(e,t)=>te(e).bind((e=>l.from(e.plugins.advcode))).map((e=>(e[t]||(e[t]=Z()),e[t]))),re=(e,t)=>{te(e).bind((e=>l.from(e.plugins.advcode))).each((e=>{e[t]&&delete e[t]}))},ne=(e,t)=>((e,t,o)=>{const r=((e,t)=>{const o=((e,t)=>{const o=e.dom.getAttribute(t);return null===o?void 0:o})(e,t);return void 0===o||""===o?[]:o.split(" ")})(e,t);return((e,t,o)=>{((e,t,o)=>{if(!(s(o)||i(o)||d(o)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,o+"")})(e.dom,t,o)})(e,t,r.concat([o]).join(" ")),!0})(e,"class",t),se={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]},ie=(()=>{const e="[0-9]+",t="[eE][+-]?"+e,o=e=>`(?:${e})?`,r=["Infinity",e+"\\."+o(e)+o(t),"\\."+e+o(t),e+o(t)].join("|");return new RegExp(`^([+-]?(?:${r}))(.*)$`)})(),ce=(e,t,o,r="",n)=>{const s=(e=>{const t=te(e).map((e=>{const t=$(F(e.getElement()));return R(o=t)?o:F(j(o).dom.body);var o})).getOrThunk(G);if(M(t))return{element:t,destroy:x};{const e=V("div");return B(t,e),{element:e,destroy:()=>K(e)}}})(o.editorId),i=((e,t)=>{const o=(o,r)=>(r&&!r()||setTimeout((()=>{o.state.completionActive||o.showHint({completeSingle:!1,container:t})}),100),e.Pass);return{completeAfter:o,completeIfAfterLt:t=>o(t,(()=>{const o=t.getCursor();return"<"===t.getRange(e.Pos(o.line,o.ch-1),o)})),completeIfInTag:t=>o(t,(()=>{const o=t.getTokenAt(t.getCursor());return!!("string"!==o.type||/['"]/.test(o.string.charAt(o.string.length-1))&&1!==o.string.length)&&e.innerMode(t.getMode(),o.state).state.tagName}))}})(e,s.element.dom),c="dracula",d={lineWrapping:o.lineWrapping,lineNumbers:o.lineNumbers,foldGutter:o.foldGutter,theme:n.dark?c:o.theme,direction:o.direction,matchTags:{bothTags:!0},keyMap:"sublime",gutters:o.gutter?["CodeMirror-linenumbers","CodeMirror-foldgutter"]:[],extraKeys:{"Alt-F":"findPersistent","Ctrl-J":"toMatchingTag","Ctrl-B":"selectNextOccurrence","'<'":i.completeAfter,"'/'":i.completeIfAfterLt,"' '":i.completeIfInTag,"'='":i.completeIfInTag,"Ctrl-Q":e=>{e.foldCode(e.getCursor())}},mode:"text/html",value:r},u=e(t,d),m=e=>{27!==e.keyCode&&e.stopPropagation()};t.addEventListener("keyup",m),t.addEventListener("keydown",m),t.addEventListener("keypress",m),setTimeout((()=>{u.focus(),o.cursor&&u.doc.setCursor(o.cursor)}),0),setTimeout((()=>u.refresh()),200);const g=e=>{const t=u.getWrapperElement();e.fold((()=>{var e,o;t.classList.remove("inherit-font-size"),null===(o=null===(e=t.parentElement)||void 0===e?void 0:e.style)||void 0===o||o.removeProperty("font-size")}),(e=>{var o,r;t.classList.add("inherit-font-size"),null===(r=null===(o=t.parentElement)||void 0===o?void 0:o.style)||void 0===r||r.setProperty("font-size",e)})),u.refresh()},p={getValue:()=>u.doc.getValue(),setValue:e=>u.doc.setValue(e),setDarkMode:e=>{e?u.setOption("theme",c):u.setOption("theme",o.theme)},copyCode:()=>new Promise(((e,t)=>window.isSecureContext?e(navigator.clipboard.writeText(u.getValue())):t("context is not secure"))),setFontSize:g,changeFontSize:e=>{const t=u.getWrapperElement(),o=(d=F(t),m=".CodeMirror-scroll",((e,t)=>{const o=void 0===t?document:t.dom;return 1!==(r=o).nodeType&&9!==r.nodeType&&11!==r.nodeType||0===r.childElementCount?l.none():l.from(o.querySelector(e)).map(F);var r})(m,d)).map((e=>((e,t)=>{const o=e.dom,r=window.getComputedStyle(o).getPropertyValue(t);return""!==r||U(e)?r:((e,t)=>(e=>void 0!==e.style&&a(e.style.getPropertyValue))(e)?e.style.getPropertyValue(t):"")(o,t)})(e,"font-size"))).getOr("0px"),r=(i=o,c=["unsupportedLength"],l.from(ie.exec(i)).bind((e=>{const t=Number(e[1]),o=e[2];return((e,t)=>I(t,(t=>I(se[t],(t=>e===t)))))(o,c)?l.some({value:t,unit:o}):l.none()}))),n=r.map((e=>e.value)).getOr(0),s=r.map((e=>e.unit)).getOr("");var i,c,d,m;let p=l.none();return"increase"===e&&(p=l.some(`${n+1}${s}`)),"decrease"===e&&(p=l.some(`${n>5?n-1:n}${s}`)),g(p),p},destroy:()=>{t.removeEventListener("keyup",m),t.removeEventListener("keydown",m),t.removeEventListener("keypress",m),re(o.editorId,o.advcodeInstanceId),s.destroy()}};return p},ae={},de=(e,t)=>{if(ae[t])return Promise.resolve();{const o=te(t),r=o.bind((e=>{var t;return l.from(null===(t=e.ui)||void 0===t?void 0:t.styleSheetLoader)})).getOr(tinymce.DOM.styleSheetLoader);return o.each((o=>{o.on("remove",(()=>{r.unload(e),delete ae[t]}))})),ae[t]=!0,((e,t)=>{const o="advcode/css/codemirror.css",r=null!=t?t:tinymce.DOM.styleSheetLoader;if(tinymce.Resource.has(o)){const t=tinymce.Resource.get(o);return r.loadRawCss(e,t),Promise.resolve()}return r.load(e)})(e,r)}},le=e=>({name:"codeview",type:"customeditor",tag:"div",scriptId:"tinymce.plugins.advcode.customeditor",scriptUrl:e.customEditorScriptUrl,settings:e}),ue=(e,t)=>{const o={dark:!1,fullscreen:!1,fontSize:l.none()};e.addCommand("mceCodeEditor",(()=>{_(e)&&!e.inline?"code"===e.mode.get()?e.mode.set("design"):e.mode.set("code"):(()=>{const r=k(e,t,o);((e,t)=>{const o=X(e),r={...t,cursor:o.cursor},n=t.currentAdvStatus,s=oe(t.editorId,t.advcodeInstanceId),i=()=>{let e=[{type:"togglebutton",name:"dark_theme_toggle",text:"Dark/light mode",tooltip:"Dark/light mode",active:n.dark,align:"start"},{type:"custom",name:"increase_font_size",text:"Increase font size",icon:"text-size-increase",align:"start"},{type:"custom",name:"decrease_font_size",text:"Decrease font size",icon:"text-size-decrease",align:"start"},{type:"cancel",name:"cancel",text:"Cancel",align:"end"},{type:"submit",name:"save",text:"Save",primary:!0,align:"end"}];return window.isSecureContext?e=[{type:"custom",name:"copy_code",text:"Copy code",align:"start"}].concat(e):console.warn("Copy code is not allowed since window.isSecureContext is false"),e},c=o=>({title:"Source Code",size:"large",body:{type:"panel",items:[le(r)]},buttons:i(),initialData:{codeview:o},onSubmit:o=>{ee(e,o.getData().codeview),re(t.editorId,t.advcodeInstanceId),o.close()},onClose:()=>{re(t.editorId,t.advcodeInstanceId)},onAction:(e,t)=>{"copy_code"===t.name&&s.each((t=>t.get().each((t=>{(async()=>{const o=setTimeout((()=>{e.block("copying")}),150);await t.copyCode(),clearTimeout(o),e.unblock()})()})))),"increase_font_size"===t.name&&s.each((e=>e.get().each((e=>{n.fontSize=e.changeFontSize("increase")})))),"decrease_font_size"===t.name&&s.each((e=>e.get().each((e=>{n.fontSize=e.changeFontSize("decrease")})))),"dark_theme_toggle"===t.name&&s.each((t=>t.get().each((t=>{t.setDarkMode(!n.dark),n.dark=!n.dark,e.redial(c(e.getData().codeview))}))))}});e.windowManager.open(c(o.content))})(e,r)})()}))},me=e=>e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen(),ge=(e,t,o)=>{const r=Y({dark:!1,fullscreen:!1,fontSize:l.none()}),n=Y(me(e)),s=Z(),i=Y(l.none()),c={dark:!1,fullscreen:!1,fontSize:l.none()},a=()=>i.get().bind((t=>oe(e.id,t))),d=()=>{s.get().each((({destroy:t})=>{t(),r.get().fullscreen!==n.get()&&e.execCommand("mceFullScreen")})),s.clear()};e.ui.registry.addView("code",{buttons:1===o?[{type:"group",buttons:[...e.hasPlugin("fullscreen")?[{type:"togglebutton",icon:"fullscreen",tooltip:"Fullsceen",onAction:t=>{e.execCommand("mceFullScreen",void 0,void 0,{skip_focus:!0});const o=!t.isActive();r.set({...r.get(),fullscreen:o}),t.setActive(o)}}]:[],{type:"togglebutton",icon:"copy",text:"Copy code",onAction:e=>a().each((e=>e.get().each((e=>{(async()=>{await e.copyCode()})()}))))}]},{type:"group",buttons:[{type:"togglebutton",text:"Dark/light mode",tooltip:"Dark/light mode",onAction:e=>{a().each((t=>t.get().each((t=>{r.set({...r.get(),dark:!e.isActive()}),e.setActive(r.get().dark),t.setDarkMode(r.get().dark)}))))}},{type:"togglebutton",icon:"text-size-increase",tooltip:"Increase font size",onAction:e=>a().each((e=>e.get().each((e=>r.set({...r.get(),fontSize:e.changeFontSize("increase")})))))},{type:"togglebutton",icon:"text-size-decrease",tooltip:"Decrease font size",onAction:e=>a().each((e=>e.get().each((e=>r.set({...r.get(),fontSize:e.changeFontSize("decrease")})))))}]},{type:"group",buttons:[{type:"button",text:"Cancel",onAction:()=>{s.get().each((()=>{d(),e.mode.set("design")}))}},{type:"button",text:"Save code",buttonType:"primary",onAction:()=>{s.get().each((({syncWithEditor:t})=>{t(),d(),e.mode.set("design")}))}}]}]:[],onShow:a=>{const d=a.getContainer(),u=k(e,t,c);i.set(l.some(u.advcodeInstanceId)),n.set(me(e)),e.setProgressState(!0),r.get().fullscreen!==me(e)&&e.execCommand("mceFullScreen"),((e,t,o,r)=>{return Promise.all([de(t,o),("tinymce.plugins.advcode.CodeMirror",n=e,tinymce.Resource.load("tinymce.plugins.advcode.CodeMirror",n))]).then((([e,t])=>(e,o,n)=>ce(t(),e,o,n,r)));var n})(p(e),h(e),e.id,r.get()).then((t=>{e.setProgressState(!1),s.set(((e,t,o,r,n,s)=>{const i=X(o),c={...n,cursor:i.cursor},a=V("div");var d;d=a,((e,t)=>{for(let t=0,r=e.length;t<r;t++)o=e[t],((e,t)=>{(e=>void 0!==e.dom.classList)(e)?e.dom.classList.add(t):ne(e,t)})(d,o);var o})(0===t?["tox-inline-headless-codemirror","mce-codemirror"]:["tox-custom-editor","tox-inline-codemirror","mce-codemirror"]),B(F(e),a);const{getValue:l,destroy:u,copyCode:m,changeFontSize:g,setDarkMode:p,setFontSize:h}=r(a.dom,c,i.content,s);oe(n.editorId,n.advcodeInstanceId).each((e=>e.set({copyCode:m,changeFontSize:g,setDarkMode:p,setFontSize:h}))),h(s.fontSize);const v=()=>ee(o,l());return 0===t&&o.on("BeforeGetContent",v),{syncWithEditor:v,destroy:()=>{0===t&&(o.off("BeforeGetContent",v),v()),K(a),u()}}})(d,o,e,t,u,r.get()))}))},onHide:d})};tinymce.PluginManager.requireLangPack("advcode","ar,bg_BG,ca,cs,da,de,el,es,eu,fa,fi,fr_FR,he_IL,hi,hr,hu_HU,id,it,ja,kk,ko_KR,ms,nb_NO,nl,pl,pt_BR,pt_PT,ro,ru,sk,sl_SI,sv_SE,th_TH,tr,uk,vi,zh_CN,zh_TW"),tinymce.PluginManager.add("advcode",((e,o)=>{((e,o)=>!!e&&-1===((e,o)=>{const r=t(e.major,o.major);if(0!==r)return r;const n=t(e.minor,o.minor);if(0!==n)return n;const s=t(e.patch,o.patch);return 0!==s?s:0})((e=>r((e=>[e.majorVersion,e.minorVersion].join(".").split(".").slice(0,3).join("."))(e)))(e),r(o)))(tinymce,"6.8.0")?console.error("The advcode plugin requires at least version 6.8.0 of TinyMCE."):((e,t)=>{((e,t)=>{const o=e.options.register;o("codemirror_script",{processor:"string",default:t+"/codemirror.min.js"}),o("codemirror_css",{processor:"string",default:t+"/codemirror.min.css"}),o("codemirror_linewrapping",{processor:"boolean",default:!0}),o("codemirror_linenumbers",{processor:"boolean",default:!0}),o("codemirror_foldgutter",{processor:"boolean",default:!0}),o("codemirror_gutter",{processor:"boolean",default:!0}),o("codemirror_theme",{processor:"string",default:"default"}),o("advcode_headless",{processor:"boolean",default:!1}),o("advcode_inline",{processor:"boolean",default:!1})})(e,t),ue(e,t),(e=>{const t="sourcecode",o=()=>e.execCommand("mceCodeEditor");e.ui.registry.addButton("code",{icon:t,tooltip:"Source code",onAction:o}),e.ui.registry.addMenuItem("code",{icon:t,text:"Source code",onAction:o})})(e),((e,t)=>{ge(e,t,S(e)?0:1)})(e,t),(e=>{e.mode.register("code",{activate:()=>{"code"!==e.queryCommandValue("ToggleView")&&e.execCommand("ToggleView",!1,"code")},deactivate:()=>{"code"===e.queryCommandValue("ToggleView")&&e.execCommand("ToggleView",!1,"code")},editorReadOnly:!1})})(e)})(e,o)}))}();
@@ -1,4 +1,4 @@
1
- advcode - build: 3.3.0-95
1
+ advcode - build: 3.4.0-107
2
2
 
3
3
  Documentation
4
4
  -----------------
@@ -1 +1 @@
1
- 3.3.0-95
1
+ 3.4.0-107
@@ -4,7 +4,7 @@
4
4
  * Copyright (c) 2023 Ephox Corporation DBA Tiny Technologies, Inc.
5
5
  * Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/
6
6
  *
7
- * Version: 6.5.1
7
+ * Version: 6.8.2
8
8
  */
9
9
 
10
10
  (function () {
@@ -4,6 +4,6 @@
4
4
  * Copyright (c) 2023 Ephox Corporation DBA Tiny Technologies, Inc.
5
5
  * Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/
6
6
  *
7
- * Version: 6.5.1
7
+ * Version: 6.8.2
8
8
  */
9
9
  !function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=(t,e,s)=>{const r="UL"===e?"InsertUnorderedList":"InsertOrderedList";t.execCommand(r,!1,!1===s?null:{"list-style-type":s})},s=t=>e=>e.options.get(t),r=s("advlist_number_styles"),n=s("advlist_bullet_styles"),i=t=>null==t,l=t=>!i(t);var o=tinymce.util.Tools.resolve("tinymce.util.Tools");class a{constructor(t,e){this.tag=t,this.value=e}static some(t){return new a(!0,t)}static none(){return a.singletonNone}fold(t,e){return this.tag?e(this.value):t()}isSome(){return this.tag}isNone(){return!this.tag}map(t){return this.tag?a.some(t(this.value)):a.none()}bind(t){return this.tag?t(this.value):a.none()}exists(t){return this.tag&&t(this.value)}forall(t){return!this.tag||t(this.value)}filter(t){return!this.tag||t(this.value)?this:a.none()}getOr(t){return this.tag?this.value:t}or(t){return this.tag?this:t}getOrThunk(t){return this.tag?this.value:t()}orThunk(t){return this.tag?this:t()}getOrDie(t){if(this.tag)return this.value;throw new Error(null!=t?t:"Called getOrDie on None")}static from(t){return l(t)?a.some(t):a.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(t){this.tag&&t(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}a.singletonNone=new a(!1);const u=t=>e=>l(e)&&t.test(e.nodeName),d=u(/^(OL|UL|DL)$/),g=u(/^(TH|TD)$/),c=t=>i(t)||"default"===t?"":t,h=(t,e)=>s=>((t,e)=>{const s=t.selection.getNode();return e({parents:t.dom.getParents(s),element:s}),t.on("NodeChange",e),()=>t.off("NodeChange",e)})(t,(r=>((t,r)=>{const n=t.selection.getStart(!0);s.setActive(((t,e,s)=>((t,e,s)=>{for(let e=0,n=t.length;e<n;e++){const n=t[e];if(d(r=n)&&!/\btox\-/.test(r.className))return a.some(n);if(s(n,e))break}var r;return a.none()})(e,0,g).exists((e=>e.nodeName===s&&((t,e)=>t.dom.isChildOf(e,t.getBody()))(t,e))))(t,r,e)),s.setEnabled(!((t,e)=>{const s=t.dom.getParent(e,"ol,ul,dl");return((t,e)=>null!==e&&!t.dom.isEditable(e))(t,s)&&t.selection.isEditable()})(t,n)&&t.selection.isEditable())})(t,r.parents))),m=(t,s,r,n,i,l)=>{l.length>1?((t,s,r,n,i,l)=>{t.ui.registry.addSplitButton(s,{tooltip:r,icon:"OL"===i?"ordered-list":"unordered-list",presets:"listpreview",columns:3,fetch:t=>{t(o.map(l,(t=>{const e="OL"===i?"num":"bull",s="disc"===t||"decimal"===t?"default":t,r=c(t),n=(t=>t.replace(/\-/g," ").replace(/\b\w/g,(t=>t.toUpperCase())))(t);return{type:"choiceitem",value:r,icon:"list-"+e+"-"+s,text:n}})))},onAction:()=>t.execCommand(n),onItemAction:(s,r)=>{e(t,i,r)},select:e=>{const s=(t=>{const e=t.dom.getParent(t.selection.getNode(),"ol,ul"),s=t.dom.getStyle(e,"listStyleType");return a.from(s)})(t);return s.map((t=>e===t)).getOr(!1)},onSetup:h(t,i)})})(t,s,r,n,i,l):((t,s,r,n,i,l)=>{t.ui.registry.addToggleButton(s,{active:!1,tooltip:r,icon:"OL"===i?"ordered-list":"unordered-list",onSetup:h(t,i),onAction:()=>t.queryCommandState(n)||""===l?t.execCommand(n):e(t,i,l)})})(t,s,r,n,i,c(l[0]))};t.add("advlist",(t=>{t.hasPlugin("lists")?((t=>{const e=t.options.register;e("advlist_number_styles",{processor:"string[]",default:"default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman".split(",")}),e("advlist_bullet_styles",{processor:"string[]",default:"default,circle,square".split(",")})})(t),(t=>{m(t,"numlist","Numbered list","InsertOrderedList","OL",r(t)),m(t,"bullist","Bullet list","InsertUnorderedList","UL",n(t))})(t),(t=>{t.addCommand("ApplyUnorderedListStyle",((s,r)=>{e(t,"UL",r["list-style-type"])})),t.addCommand("ApplyOrderedListStyle",((s,r)=>{e(t,"OL",r["list-style-type"])}))})(t)):console.error("Please use the Lists plugin together with the Advanced List plugin.")}))}();
@@ -4,7 +4,7 @@
4
4
  * Copyright (c) 2023 Ephox Corporation DBA Tiny Technologies, Inc.
5
5
  * Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/
6
6
  *
7
- * Version: 6.5.1
7
+ * Version: 6.8.2
8
8
  */
9
9
 
10
10
  (function () {
@@ -4,6 +4,6 @@
4
4
  * Copyright (c) 2023 Ephox Corporation DBA Tiny Technologies, Inc.
5
5
  * Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/
6
6
  *
7
- * Version: 6.5.1
7
+ * Version: 6.8.2
8
8
  */
9
9
  !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),o=tinymce.util.Tools.resolve("tinymce.util.Tools");const n=("allow_html_in_named_anchor",e=>e.options.get("allow_html_in_named_anchor"));const a="a:not([href])",r=e=>!e,i=e=>e.getAttribute("id")||e.getAttribute("name")||"",l=e=>(e=>"a"===e.nodeName.toLowerCase())(e)&&!e.getAttribute("href")&&""!==i(e),s=e=>e.dom.getParent(e.selection.getStart(),a),d=(e,a)=>{const r=s(e);r?((e,t,o)=>{o.removeAttribute("name"),o.id=t,e.addVisual(),e.undoManager.add()})(e,a,r):((e,a)=>{e.undoManager.transact((()=>{n(e)||e.selection.collapse(!0),e.selection.isCollapsed()?e.insertContent(e.dom.createHTML("a",{id:a})):((e=>{const n=e.dom;t(n).walk(e.selection.getRng(),(e=>{o.each(e,(e=>{var t;l(t=e)&&!t.firstChild&&n.remove(e,!1)}))}))})(e),e.formatter.remove("namedAnchor",void 0,void 0,!0),e.formatter.apply("namedAnchor",{value:a}),e.addVisual())}))})(e,a),e.focus()},c=e=>(e=>r(e.attr("href"))&&!r(e.attr("id")||e.attr("name")))(e)&&!e.firstChild,m=e=>t=>{for(let o=0;o<t.length;o++){const n=t[o];c(n)&&n.attr("contenteditable",e)}},u=e=>t=>{const o=()=>{t.setEnabled(e.selection.isEditable())};return e.on("NodeChange",o),o(),()=>{e.off("NodeChange",o)}};e.add("anchor",(e=>{(e=>{(0,e.options.register)("allow_html_in_named_anchor",{processor:"boolean",default:!1})})(e),(e=>{e.on("PreInit",(()=>{e.parser.addNodeFilter("a",m("false")),e.serializer.addNodeFilter("a",m(null))}))})(e),(e=>{e.addCommand("mceAnchor",(()=>{(e=>{const t=(e=>{const t=s(e);return t?i(t):""})(e);e.windowManager.open({title:"Anchor",size:"normal",body:{type:"panel",items:[{name:"id",type:"input",label:"ID",placeholder:"example"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{id:t},onSubmit:t=>{((e,t)=>/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(t)?(d(e,t),!0):(e.windowManager.alert("ID should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),!1))(e,t.getData().id)&&t.close()}})})(e)}))})(e),(e=>{const t=()=>e.execCommand("mceAnchor");e.ui.registry.addToggleButton("anchor",{icon:"bookmark",tooltip:"Anchor",onAction:t,onSetup:t=>{const o=e.selection.selectorChangedWithUnbind("a:not([href])",t.setActive).unbind,n=u(e)(t);return()=>{o(),n()}}}),e.ui.registry.addMenuItem("anchor",{icon:"bookmark",text:"Anchor...",onAction:t,onSetup:u(e)})})(e),e.on("PreInit",(()=>{(e=>{e.formatter.register("namedAnchor",{inline:"a",selector:a,remove:"all",split:!0,deep:!0,attributes:{id:"%value"},onmatch:(e,t,o)=>l(e)})})(e)}))}))}();
@@ -4,7 +4,7 @@
4
4
  * Copyright (c) 2023 Ephox Corporation DBA Tiny Technologies, Inc.
5
5
  * Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/
6
6
  *
7
- * Version: 6.5.1
7
+ * Version: 6.8.2
8
8
  */
9
9
 
10
10
  (function () {
@@ -4,6 +4,6 @@
4
4
  * Copyright (c) 2023 Ephox Corporation DBA Tiny Technologies, Inc.
5
5
  * Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/
6
6
  *
7
- * Version: 6.5.1
7
+ * Version: 6.8.2
8
8
  */
9
9
  !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>t.options.get(e),n=t("autolink_pattern"),o=t("link_default_target"),r=t("link_default_protocol"),a=t("allow_unsafe_link_target"),s=("string",e=>"string"===(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(n=o=e,(r=String).prototype.isPrototypeOf(n)||(null===(a=o.constructor)||void 0===a?void 0:a.name)===r.name)?"string":t;var n,o,r,a})(e));const l=(void 0,e=>undefined===e);const i=e=>!(e=>null==e)(e),c=Object.hasOwnProperty,d=e=>"\ufeff"===e;var u=tinymce.util.Tools.resolve("tinymce.dom.TextSeeker");const f=e=>/^[(\[{ \u00a0]$/.test(e),g=(e,t,n)=>{for(let o=t-1;o>=0;o--){const t=e.charAt(o);if(!d(t)&&n(t))return o}return-1},m=(e,t)=>{var o;const a=e.schema.getVoidElements(),s=n(e),{dom:i,selection:d}=e;if(null!==i.getParent(d.getNode(),"a[href]"))return null;const m=d.getRng(),k=u(i,(e=>{return i.isBlock(e)||(t=a,n=e.nodeName.toLowerCase(),c.call(t,n))||"false"===i.getContentEditable(e);var t,n})),{container:p,offset:y}=((e,t)=>{let n=e,o=t;for(;1===n.nodeType&&n.childNodes[o];)n=n.childNodes[o],o=3===n.nodeType?n.data.length:n.childNodes.length;return{container:n,offset:o}})(m.endContainer,m.endOffset),w=null!==(o=i.getParent(p,i.isBlock))&&void 0!==o?o:i.getRoot(),h=k.backwards(p,y+t,((e,t)=>{const n=e.data,o=g(n,t,(r=f,e=>!r(e)));var r,a;return-1===o||(a=n[o],/[?!,.;:]/.test(a))?o:o+1}),w);if(!h)return null;let v=h.container;const _=k.backwards(h.container,h.offset,((e,t)=>{v=e;const n=g(e.data,t,f);return-1===n?n:n+1}),w),A=i.createRng();_?A.setStart(_.container,_.offset):A.setStart(v,0),A.setEnd(h.container,h.offset);const C=A.toString().replace(/\uFEFF/g,"").match(s);if(C){let t=C[0];return $="www.",(b=t).length>=4&&b.substr(0,4)===$?t=r(e)+"://"+t:((e,t,n=0,o)=>{const r=e.indexOf(t,n);return-1!==r&&(!!l(o)||r+t.length<=o)})(t,"@")&&!(e=>/^([A-Za-z][A-Za-z\d.+-]*:\/\/)|mailto:/.test(e))(t)&&(t="mailto:"+t),{rng:A,url:t}}var b,$;return null},k=(e,t)=>{const{dom:n,selection:r}=e,{rng:l,url:i}=t,c=r.getBookmark();r.setRng(l);const d="createlink",u={command:d,ui:!1,value:i};if(!e.dispatch("BeforeExecCommand",u).isDefaultPrevented()){e.getDoc().execCommand(d,!1,i),e.dispatch("ExecCommand",u);const t=o(e);if(s(t)){const o=r.getNode();n.setAttrib(o,"target",t),"_blank"!==t||a(e)||n.setAttrib(o,"rel","noopener")}}r.moveToBookmark(c),e.nodeChanged()},p=e=>{const t=m(e,-1);i(t)&&k(e,t)},y=p;e.add("autolink",(e=>{(e=>{const t=e.options.register;t("autolink_pattern",{processor:"regexp",default:new RegExp("^"+/(?:[A-Za-z][A-Za-z\d.+-]{0,14}:\/\/(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?|www\.|[-;:&=+$,.\w]+@)[A-Za-z\d-]+(?:\.[A-Za-z\d-]+)*(?::\d+)?(?:\/(?:[-.~*+=!;:'%@$(),\/\w]*[-~*+=%@$()\/\w])?)?(?:\?(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?(?:#(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?/g.source+"$","i")}),t("link_default_target",{processor:"string"}),t("link_default_protocol",{processor:"string",default:"https"})})(e),(e=>{e.on("keydown",(t=>{13!==t.keyCode||t.isDefaultPrevented()||(e=>{const t=m(e,0);i(t)&&k(e,t)})(e)})),e.on("keyup",(t=>{32===t.keyCode?p(e):(48===t.keyCode&&t.shiftKey||221===t.keyCode)&&y(e)}))})(e)}))}();
@@ -4,7 +4,7 @@
4
4
  * Copyright (c) 2023 Ephox Corporation DBA Tiny Technologies, Inc.
5
5
  * Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/
6
6
  *
7
- * Version: 6.5.1
7
+ * Version: 6.8.2
8
8
  */
9
9
 
10
10
  (function () {
@@ -4,6 +4,6 @@
4
4
  * Copyright (c) 2023 Ephox Corporation DBA Tiny Technologies, Inc.
5
5
  * Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/
6
6
  *
7
- * Version: 6.5.1
7
+ * Version: 6.8.2
8
8
  */
9
9
  !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.Env");const o=e=>t=>t.options.get(e),s=o("min_height"),i=o("max_height"),n=o("autoresize_overflow_padding"),r=o("autoresize_bottom_margin"),l=(e,t)=>{const o=e.getBody();o&&(o.style.overflowY=t?"":"hidden",t||(o.scrollTop=0))},g=(e,t,o,s)=>{var i;const n=parseInt(null!==(i=e.getStyle(t,o,s))&&void 0!==i?i:"",10);return isNaN(n)?0:n},a=(e,o,r,c)=>{var d;const f=e.dom,u=e.getDoc();if(!u)return;if((e=>e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen())(e))return void l(e,!0);const m=u.documentElement,h=c?c():n(e),p=null!==(d=s(e))&&void 0!==d?d:e.getElement().offsetHeight;let y=p;const S=g(f,m,"margin-top",!0),v=g(f,m,"margin-bottom",!0);let C=m.offsetHeight+S+v+h;C<0&&(C=0);const b=e.getContainer().offsetHeight-e.getContentAreaContainer().offsetHeight;C+b>p&&(y=C+b);const w=i(e);if(w&&y>w?(y=w,l(e,!0)):l(e,!1),y!==o.get()){const s=y-o.get();if(f.setStyle(e.getContainer(),"height",y+"px"),o.set(y),(e=>{e.dispatch("ResizeEditor")})(e),t.browser.isSafari()&&(t.os.isMacOS()||t.os.isiOS())){const t=e.getWin();t.scrollTo(t.pageXOffset,t.pageYOffset)}e.hasFocus()&&(e=>{if("setcontent"===(null==e?void 0:e.type.toLowerCase())){const t=e;return!0===t.selection||!0===t.paste}return!1})(r)&&e.selection.scrollIntoView(),(t.browser.isSafari()||t.browser.isChromium())&&s<0&&a(e,o,r,c)}};e.add("autoresize",(e=>{if((e=>{const t=e.options.register;t("autoresize_overflow_padding",{processor:"number",default:1}),t("autoresize_bottom_margin",{processor:"number",default:50})})(e),e.options.isSet("resize")||e.options.set("resize",!1),!e.inline){const o=(e=>{let t=0;return{get:()=>t,set:e=>{t=e}}})();((e,t)=>{e.addCommand("mceAutoResize",(()=>{a(e,t)}))})(e,o),((e,o)=>{let s,i,l=()=>r(e);e.on("init",(i=>{s=0;const r=n(e),g=e.dom;g.setStyles(e.getDoc().documentElement,{height:"auto"}),t.browser.isEdge()||t.browser.isIE()?g.setStyles(e.getBody(),{paddingLeft:r,paddingRight:r,"min-height":0}):g.setStyles(e.getBody(),{paddingLeft:r,paddingRight:r}),a(e,o,i,l),s+=1})),e.on("NodeChange SetContent keyup FullscreenStateChanged ResizeContent",(t=>{if(1===s)i=e.getContainer().offsetHeight,a(e,o,t,l),s+=1;else if(2===s){const t=i<e.getContainer().offsetHeight;if(t){const t=e.dom,o=e.getDoc();t.setStyles(o.documentElement,{"min-height":0}),t.setStyles(e.getBody(),{"min-height":"inherit"})}l=t?(0,()=>0):l,s+=1}else a(e,o,t,l)}))})(e,o)}}))}();
@@ -4,7 +4,7 @@
4
4
  * Copyright (c) 2023 Ephox Corporation DBA Tiny Technologies, Inc.
5
5
  * Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/
6
6
  *
7
- * Version: 6.5.1
7
+ * Version: 6.8.2
8
8
  */
9
9
 
10
10
  (function () {
@@ -4,6 +4,6 @@
4
4
  * Copyright (c) 2023 Ephox Corporation DBA Tiny Technologies, Inc.
5
5
  * Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/
6
6
  *
7
- * Version: 6.5.1
7
+ * Version: 6.8.2
8
8
  */
9
9
  !function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const e=("string",t=>"string"===(t=>{const e=typeof t;return null===t?"null":"object"===e&&Array.isArray(t)?"array":"object"===e&&(r=o=t,(a=String).prototype.isPrototypeOf(r)||(null===(s=o.constructor)||void 0===s?void 0:s.name)===a.name)?"string":e;var r,o,a,s})(t));const r=(void 0,t=>undefined===t);var o=tinymce.util.Tools.resolve("tinymce.util.Delay"),a=tinymce.util.Tools.resolve("tinymce.util.LocalStorage"),s=tinymce.util.Tools.resolve("tinymce.util.Tools");const n=t=>{const e=/^(\d+)([ms]?)$/.exec(t);return(e&&e[2]?{s:1e3,m:6e4}[e[2]]:1)*parseInt(t,10)},i=t=>e=>e.options.get(t),u=i("autosave_ask_before_unload"),l=i("autosave_restore_when_empty"),c=i("autosave_interval"),d=i("autosave_retention"),m=t=>{const e=document.location;return t.options.get("autosave_prefix").replace(/{path}/g,e.pathname).replace(/{query}/g,e.search).replace(/{hash}/g,e.hash).replace(/{id}/g,t.id)},v=(t,e)=>{if(r(e))return t.dom.isEmpty(t.getBody());{const r=s.trim(e);if(""===r)return!0;{const e=(new DOMParser).parseFromString(r,"text/html");return t.dom.isEmpty(e)}}},f=t=>{var e;const r=parseInt(null!==(e=a.getItem(m(t)+"time"))&&void 0!==e?e:"0",10)||0;return!((new Date).getTime()-r>d(t)&&(p(t,!1),1))},p=(t,e)=>{const r=m(t);a.removeItem(r+"draft"),a.removeItem(r+"time"),!1!==e&&(t=>{t.dispatch("RemoveDraft")})(t)},g=t=>{const e=m(t);!v(t)&&t.isDirty()&&(a.setItem(e+"draft",t.getContent({format:"raw",no_events:!0})),a.setItem(e+"time",(new Date).getTime().toString()),(t=>{t.dispatch("StoreDraft")})(t))},y=t=>{var e;const r=m(t);f(t)&&(t.setContent(null!==(e=a.getItem(r+"draft"))&&void 0!==e?e:"",{format:"raw"}),(t=>{t.dispatch("RestoreDraft")})(t))};var D=tinymce.util.Tools.resolve("tinymce.EditorManager");const h=t=>e=>{e.setEnabled(f(t));const r=()=>e.setEnabled(f(t));return t.on("StoreDraft RestoreDraft RemoveDraft",r),()=>t.off("StoreDraft RestoreDraft RemoveDraft",r)};t.add("autosave",(t=>((t=>{const r=t.options.register,o=t=>{const r=e(t);return r?{value:n(t),valid:r}:{valid:!1,message:"Must be a string."}};r("autosave_ask_before_unload",{processor:"boolean",default:!0}),r("autosave_prefix",{processor:"string",default:"tinymce-autosave-{path}{query}{hash}-{id}-"}),r("autosave_restore_when_empty",{processor:"boolean",default:!1}),r("autosave_interval",{processor:o,default:"30s"}),r("autosave_retention",{processor:o,default:"20m"})})(t),(t=>{t.editorManager.on("BeforeUnload",(t=>{let e;s.each(D.get(),(t=>{t.plugins.autosave&&t.plugins.autosave.storeDraft(),!e&&t.isDirty()&&u(t)&&(e=t.translate("You have unsaved changes are you sure you want to navigate away?"))})),e&&(t.preventDefault(),t.returnValue=e)}))})(t),(t=>{(t=>{const e=c(t);o.setEditorInterval(t,(()=>{g(t)}),e)})(t);const e=()=>{(t=>{t.undoManager.transact((()=>{y(t),p(t)})),t.focus()})(t)};t.ui.registry.addButton("restoredraft",{tooltip:"Restore last draft",icon:"restore-draft",onAction:e,onSetup:h(t)}),t.ui.registry.addMenuItem("restoredraft",{text:"Restore last draft",icon:"restore-draft",onAction:e,onSetup:h(t)})})(t),t.on("init",(()=>{l(t)&&t.dom.isEmpty(t.getBody())&&y(t)})),(t=>({hasDraft:()=>f(t),storeDraft:()=>g(t),restoreDraft:()=>y(t),removeDraft:e=>p(t,e),isEmpty:e=>v(t,e)}))(t))))}();
@@ -4,7 +4,7 @@
4
4
  * Copyright (c) 2023 Ephox Corporation DBA Tiny Technologies, Inc.
5
5
  * Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/
6
6
  *
7
- * Version: 6.5.1
7
+ * Version: 6.8.2
8
8
  */
9
9
 
10
10
  (function () {
@@ -4,6 +4,6 @@
4
4
  * Copyright (c) 2023 Ephox Corporation DBA Tiny Technologies, Inc.
5
5
  * Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/
6
6
  *
7
- * Version: 6.5.1
7
+ * Version: 6.8.2
8
8
  */
9
9
  !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=(e,t)=>{const r=((e,t)=>e.dispatch("insertCustomChar",{chr:t}))(e,t).chr;e.execCommand("mceInsertContent",!1,r)},r=e=>t=>e===t,a=("array",e=>"array"===(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(r=a=e,(n=String).prototype.isPrototypeOf(r)||(null===(i=a.constructor)||void 0===i?void 0:i.name)===n.name)?"string":t;var r,a,n,i})(e));const n=r(null),i=r(void 0),o=e=>"function"==typeof e,s=(!1,()=>false);class l{constructor(e,t){this.tag=e,this.value=t}static some(e){return new l(!0,e)}static none(){return l.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?l.some(e(this.value)):l.none()}bind(e){return this.tag?e(this.value):l.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:l.none()}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(this.tag)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return null==e?l.none():l.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}l.singletonNone=new l(!1);const c=Array.prototype.push,u=(e,t)=>{const r=e.length,a=new Array(r);for(let n=0;n<r;n++){const r=e[n];a[n]=t(r,n)}return a};var g=tinymce.util.Tools.resolve("tinymce.util.Tools");const h=e=>t=>t.options.get(e),m=h("charmap"),p=h("charmap_append"),d=g.isArray,f="User Defined",y=e=>{return d(e)?(t=e,g.grep(t,(e=>d(e)&&2===e.length))):"function"==typeof e?e():[];var t},b=e=>{const t=((e,t)=>{const r=m(e);r&&(t=[{name:f,characters:y(r)}]);const a=p(e);if(a){const e=g.grep(t,(e=>e.name===f));return e.length?(e[0].characters=[...e[0].characters,...y(a)],t):t.concat({name:f,characters:y(a)})}return t})(e,[{name:"Currency",characters:[[36,"dollar sign"],[162,"cent sign"],[8364,"euro sign"],[163,"pound sign"],[165,"yen sign"],[164,"currency sign"],[8352,"euro-currency sign"],[8353,"colon sign"],[8354,"cruzeiro sign"],[8355,"french franc sign"],[8356,"lira sign"],[8357,"mill sign"],[8358,"naira sign"],[8359,"peseta sign"],[8360,"rupee sign"],[8361,"won sign"],[8362,"new sheqel sign"],[8363,"dong sign"],[8365,"kip sign"],[8366,"tugrik sign"],[8367,"drachma sign"],[8368,"german penny symbol"],[8369,"peso sign"],[8370,"guarani sign"],[8371,"austral sign"],[8372,"hryvnia sign"],[8373,"cedi sign"],[8374,"livre tournois sign"],[8375,"spesmilo sign"],[8376,"tenge sign"],[8377,"indian rupee sign"],[8378,"turkish lira sign"],[8379,"nordic mark sign"],[8380,"manat sign"],[8381,"ruble sign"],[20870,"yen character"],[20803,"yuan character"],[22291,"yuan character, in hong kong and taiwan"],[22278,"yen/yuan character variant one"]]},{name:"Text",characters:[[169,"copyright sign"],[174,"registered sign"],[8482,"trade mark sign"],[8240,"per mille sign"],[181,"micro sign"],[183,"middle dot"],[8226,"bullet"],[8230,"three dot leader"],[8242,"minutes / feet"],[8243,"seconds / inches"],[167,"section sign"],[182,"paragraph sign"],[223,"sharp s / ess-zed"]]},{name:"Quotations",characters:[[8249,"single left-pointing angle quotation mark"],[8250,"single right-pointing angle quotation mark"],[171,"left pointing guillemet"],[187,"right pointing guillemet"],[8216,"left single quotation mark"],[8217,"right single quotation mark"],[8220,"left double quotation mark"],[8221,"right double quotation mark"],[8218,"single low-9 quotation mark"],[8222,"double low-9 quotation mark"],[60,"less-than sign"],[62,"greater-than sign"],[8804,"less-than or equal to"],[8805,"greater-than or equal to"],[8211,"en dash"],[8212,"em dash"],[175,"macron"],[8254,"overline"],[164,"currency sign"],[166,"broken bar"],[168,"diaeresis"],[161,"inverted exclamation mark"],[191,"turned question mark"],[710,"circumflex accent"],[732,"small tilde"],[176,"degree sign"],[8722,"minus sign"],[177,"plus-minus sign"],[247,"division sign"],[8260,"fraction slash"],[215,"multiplication sign"],[185,"superscript one"],[178,"superscript two"],[179,"superscript three"],[188,"fraction one quarter"],[189,"fraction one half"],[190,"fraction three quarters"]]},{name:"Mathematical",characters:[[402,"function / florin"],[8747,"integral"],[8721,"n-ary sumation"],[8734,"infinity"],[8730,"square root"],[8764,"similar to"],[8773,"approximately equal to"],[8776,"almost equal to"],[8800,"not equal to"],[8801,"identical to"],[8712,"element of"],[8713,"not an element of"],[8715,"contains as member"],[8719,"n-ary product"],[8743,"logical and"],[8744,"logical or"],[172,"not sign"],[8745,"intersection"],[8746,"union"],[8706,"partial differential"],[8704,"for all"],[8707,"there exists"],[8709,"diameter"],[8711,"backward difference"],[8727,"asterisk operator"],[8733,"proportional to"],[8736,"angle"]]},{name:"Extended Latin",characters:[[192,"A - grave"],[193,"A - acute"],[194,"A - circumflex"],[195,"A - tilde"],[196,"A - diaeresis"],[197,"A - ring above"],[256,"A - macron"],[198,"ligature AE"],[199,"C - cedilla"],[200,"E - grave"],[201,"E - acute"],[202,"E - circumflex"],[203,"E - diaeresis"],[274,"E - macron"],[204,"I - grave"],[205,"I - acute"],[206,"I - circumflex"],[207,"I - diaeresis"],[298,"I - macron"],[208,"ETH"],[209,"N - tilde"],[210,"O - grave"],[211,"O - acute"],[212,"O - circumflex"],[213,"O - tilde"],[214,"O - diaeresis"],[216,"O - slash"],[332,"O - macron"],[338,"ligature OE"],[352,"S - caron"],[217,"U - grave"],[218,"U - acute"],[219,"U - circumflex"],[220,"U - diaeresis"],[362,"U - macron"],[221,"Y - acute"],[376,"Y - diaeresis"],[562,"Y - macron"],[222,"THORN"],[224,"a - grave"],[225,"a - acute"],[226,"a - circumflex"],[227,"a - tilde"],[228,"a - diaeresis"],[229,"a - ring above"],[257,"a - macron"],[230,"ligature ae"],[231,"c - cedilla"],[232,"e - grave"],[233,"e - acute"],[234,"e - circumflex"],[235,"e - diaeresis"],[275,"e - macron"],[236,"i - grave"],[237,"i - acute"],[238,"i - circumflex"],[239,"i - diaeresis"],[299,"i - macron"],[240,"eth"],[241,"n - tilde"],[242,"o - grave"],[243,"o - acute"],[244,"o - circumflex"],[245,"o - tilde"],[246,"o - diaeresis"],[248,"o slash"],[333,"o macron"],[339,"ligature oe"],[353,"s - caron"],[249,"u - grave"],[250,"u - acute"],[251,"u - circumflex"],[252,"u - diaeresis"],[363,"u - macron"],[253,"y - acute"],[254,"thorn"],[255,"y - diaeresis"],[563,"y - macron"],[913,"Alpha"],[914,"Beta"],[915,"Gamma"],[916,"Delta"],[917,"Epsilon"],[918,"Zeta"],[919,"Eta"],[920,"Theta"],[921,"Iota"],[922,"Kappa"],[923,"Lambda"],[924,"Mu"],[925,"Nu"],[926,"Xi"],[927,"Omicron"],[928,"Pi"],[929,"Rho"],[931,"Sigma"],[932,"Tau"],[933,"Upsilon"],[934,"Phi"],[935,"Chi"],[936,"Psi"],[937,"Omega"],[945,"alpha"],[946,"beta"],[947,"gamma"],[948,"delta"],[949,"epsilon"],[950,"zeta"],[951,"eta"],[952,"theta"],[953,"iota"],[954,"kappa"],[955,"lambda"],[956,"mu"],[957,"nu"],[958,"xi"],[959,"omicron"],[960,"pi"],[961,"rho"],[962,"final sigma"],[963,"sigma"],[964,"tau"],[965,"upsilon"],[966,"phi"],[967,"chi"],[968,"psi"],[969,"omega"]]},{name:"Symbols",characters:[[8501,"alef symbol"],[982,"pi symbol"],[8476,"real part symbol"],[978,"upsilon - hook symbol"],[8472,"Weierstrass p"],[8465,"imaginary part"]]},{name:"Arrows",characters:[[8592,"leftwards arrow"],[8593,"upwards arrow"],[8594,"rightwards arrow"],[8595,"downwards arrow"],[8596,"left right arrow"],[8629,"carriage return"],[8656,"leftwards double arrow"],[8657,"upwards double arrow"],[8658,"rightwards double arrow"],[8659,"downwards double arrow"],[8660,"left right double arrow"],[8756,"therefore"],[8834,"subset of"],[8835,"superset of"],[8836,"not a subset of"],[8838,"subset of or equal to"],[8839,"superset of or equal to"],[8853,"circled plus"],[8855,"circled times"],[8869,"perpendicular"],[8901,"dot operator"],[8968,"left ceiling"],[8969,"right ceiling"],[8970,"left floor"],[8971,"right floor"],[9001,"left-pointing angle bracket"],[9002,"right-pointing angle bracket"],[9674,"lozenge"],[9824,"black spade suit"],[9827,"black club suit"],[9829,"black heart suit"],[9830,"black diamond suit"],[8194,"en space"],[8195,"em space"],[8201,"thin space"],[8204,"zero width non-joiner"],[8205,"zero width joiner"],[8206,"left-to-right mark"],[8207,"right-to-left mark"]]}]);return t.length>1?[{name:"All",characters:(r=t,n=e=>e.characters,(e=>{const t=[];for(let r=0,n=e.length;r<n;++r){if(!a(e[r]))throw new Error("Arr.flatten item "+r+" was not an array, input: "+e);c.apply(t,e[r])}return t})(u(r,n)))}].concat(t):t;var r,n},w=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}},v=(e,t,r=0,a)=>{const n=e.indexOf(t,r);return-1!==n&&(!!i(a)||n+t.length<=a)},k=String.fromCodePoint,C=(e,t)=>{const r=[],a=t.toLowerCase();return((e,t)=>{for(let t=0,i=e.length;t<i;t++)((e,t,r)=>!!v(k(e).toLowerCase(),r)||v(t.toLowerCase(),r)||v(t.toLowerCase().replace(/\s+/g,""),r))((n=e[t])[0],n[1],a)&&r.push(n);var n})(e.characters),u(r,(e=>({text:e[1],value:k(e[0]),icon:k(e[0])})))},x="pattern",A=(e,r)=>{const a=()=>[{label:"Search",type:"input",name:x},{type:"collection",name:"results"}],i=1===r.length?w(f):w("All"),o=((e,t)=>{let r=null;const a=()=>{n(r)||(clearTimeout(r),r=null)};return{cancel:a,throttle:(...t)=>{a(),r=setTimeout((()=>{r=null,e.apply(null,t)}),40)}}})((e=>{const t=e.getData().pattern;((e,t)=>{var a,n;(a=r,n=e=>e.name===i.get(),((e,t,r)=>{for(let a=0,n=e.length;a<n;a++){const n=e[a];if(t(n,a))return l.some(n);if(r(n,a))break}return l.none()})(a,n,s)).each((r=>{const a=C(r,t);e.setData({results:a})}))})(e,t)})),c={title:"Special Character",size:"normal",body:1===r.length?{type:"panel",items:a()}:{type:"tabpanel",tabs:u(r,(e=>({title:e.name,name:e.name,items:a()})))},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{pattern:"",results:C(r[0],"")},onAction:(r,a)=>{"results"===a.name&&(t(e,a.value),r.close())},onTabChange:(e,t)=>{i.set(t.newTabName),o.throttle(e)},onChange:(e,t)=>{t.name===x&&o.throttle(e)}};e.windowManager.open(c).focus(x)},q=e=>t=>{const r=()=>{t.setEnabled(e.selection.isEditable())};return e.on("NodeChange",r),r(),()=>{e.off("NodeChange",r)}};e.add("charmap",(e=>{(e=>{const t=e.options.register,r=e=>o(e)||a(e);t("charmap",{processor:r}),t("charmap_append",{processor:r})})(e);const r=b(e);return((e,t)=>{e.addCommand("mceShowCharmap",(()=>{A(e,t)}))})(e,r),(e=>{const t=()=>e.execCommand("mceShowCharmap");e.ui.registry.addButton("charmap",{icon:"insert-character",tooltip:"Special character",onAction:t,onSetup:q(e)}),e.ui.registry.addMenuItem("charmap",{icon:"insert-character",text:"Special character...",onAction:t,onSetup:q(e)})})(e),((e,t)=>{e.ui.registry.addAutocompleter("charmap",{trigger:":",columns:"auto",minChars:2,fetch:(e,r)=>new Promise(((r,a)=>{r(C(t,e))})),onAction:(t,r,a)=>{e.selection.setRng(r),e.insertContent(a),t.hide()}})})(e,r[0]),(e=>({getCharMap:()=>b(e),insertChar:r=>{t(e,r)}}))(e)}))}();
@@ -4,7 +4,7 @@
4
4
  * Copyright (c) 2023 Ephox Corporation DBA Tiny Technologies, Inc.
5
5
  * Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/
6
6
  *
7
- * Version: 6.5.1
7
+ * Version: 6.8.2
8
8
  */
9
9
 
10
10
  (function () {
@@ -4,6 +4,6 @@
4
4
  * Copyright (c) 2023 Ephox Corporation DBA Tiny Technologies, Inc.
5
5
  * Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/
6
6
  *
7
- * Version: 6.5.1
7
+ * Version: 6.8.2
8
8
  */
9
9
  !function(){"use strict";tinymce.util.Tools.resolve("tinymce.PluginManager").add("code",(e=>((e=>{e.addCommand("mceCodeEditor",(()=>{(e=>{const o=(e=>e.getContent({source_view:!0}))(e);e.windowManager.open({title:"Source Code",size:"large",body:{type:"panel",items:[{type:"textarea",name:"code"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{code:o},onSubmit:o=>{((e,o)=>{e.focus(),e.undoManager.transact((()=>{e.setContent(o)})),e.selection.setCursorLocation(),e.nodeChanged()})(e,o.getData().code),o.close()}})})(e)}))})(e),(e=>{const o=()=>e.execCommand("mceCodeEditor");e.ui.registry.addButton("code",{icon:"sourcecode",tooltip:"Source code",onAction:o}),e.ui.registry.addMenuItem("code",{icon:"sourcecode",text:"Source code",onAction:o})})(e),{})))}();
@@ -4,7 +4,7 @@
4
4
  * Copyright (c) 2023 Ephox Corporation DBA Tiny Technologies, Inc.
5
5
  * Licensed under the Tiny commercial license. See https://www.tiny.cloud/legal/
6
6
  *
7
- * Version: 6.5.1
7
+ * Version: 6.8.2
8
8
  */
9
9
 
10
10
  (function () {