bedrock_sass 0.1.9 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (534) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -5
  3. data/assets/_vendor/ace/ace.js +21635 -0
  4. data/assets/_vendor/ace/ext-beautify.js +318 -0
  5. data/assets/_vendor/ace/ext-elastic_tabstops_lite.js +277 -0
  6. data/assets/_vendor/ace/ext-emmet.js +1226 -0
  7. data/assets/_vendor/ace/ext-error_marker.js +10 -0
  8. data/assets/_vendor/ace/ext-keybinding_menu.js +189 -0
  9. data/assets/_vendor/ace/ext-language_tools.js +1997 -0
  10. data/assets/_vendor/ace/ext-linking.js +65 -0
  11. data/assets/_vendor/ace/ext-modelist.js +228 -0
  12. data/assets/_vendor/ace/ext-options.js +750 -0
  13. data/assets/_vendor/ace/ext-rtl.js +110 -0
  14. data/assets/_vendor/ace/ext-searchbox.js +512 -0
  15. data/assets/_vendor/ace/ext-settings_menu.js +771 -0
  16. data/assets/_vendor/ace/ext-spellcheck.js +75 -0
  17. data/assets/_vendor/ace/ext-split.js +208 -0
  18. data/assets/_vendor/ace/ext-static_highlight.js +226 -0
  19. data/assets/_vendor/ace/ext-statusbar.js +57 -0
  20. data/assets/_vendor/ace/ext-textarea.js +567 -0
  21. data/assets/_vendor/ace/ext-themelist.js +67 -0
  22. data/assets/_vendor/ace/ext-whitespace.js +210 -0
  23. data/assets/_vendor/ace/keybinding-emacs.js +1165 -0
  24. data/assets/_vendor/ace/keybinding-vim.js +5673 -0
  25. data/assets/_vendor/ace/mode-abap.js +222 -0
  26. data/assets/_vendor/ace/mode-abc.js +267 -0
  27. data/assets/_vendor/ace/mode-actionscript.js +274 -0
  28. data/assets/_vendor/ace/mode-ada.js +138 -0
  29. data/assets/_vendor/ace/mode-apache_conf.js +363 -0
  30. data/assets/_vendor/ace/mode-applescript.js +279 -0
  31. data/assets/_vendor/ace/mode-asciidoc.js +349 -0
  32. data/assets/_vendor/ace/mode-asl.js +422 -0
  33. data/assets/_vendor/ace/mode-assembly_x86.js +193 -0
  34. data/assets/_vendor/ace/mode-autohotkey.js +243 -0
  35. data/assets/_vendor/ace/mode-batchfile.js +230 -0
  36. data/assets/_vendor/ace/mode-bro.js +334 -0
  37. data/assets/_vendor/ace/mode-c9search.js +294 -0
  38. data/assets/_vendor/ace/mode-c_cpp.js +502 -0
  39. data/assets/_vendor/ace/mode-cirru.js +211 -0
  40. data/assets/_vendor/ace/mode-clojure.js +314 -0
  41. data/assets/_vendor/ace/mode-cobol.js +102 -0
  42. data/assets/_vendor/ace/mode-coffee.js +400 -0
  43. data/assets/_vendor/ace/mode-coldfusion.js +2596 -0
  44. data/assets/_vendor/ace/mode-csharp.js +502 -0
  45. data/assets/_vendor/ace/mode-csound_document.js +3749 -0
  46. data/assets/_vendor/ace/mode-csound_orchestra.js +2687 -0
  47. data/assets/_vendor/ace/mode-csound_score.js +454 -0
  48. data/assets/_vendor/ace/mode-csp.js +60 -0
  49. data/assets/_vendor/ace/mode-css.js +723 -0
  50. data/assets/_vendor/ace/mode-curly.js +2564 -0
  51. data/assets/_vendor/ace/mode-d.js +520 -0
  52. data/assets/_vendor/ace/mode-dart.js +703 -0
  53. data/assets/_vendor/ace/mode-diff.js +146 -0
  54. data/assets/_vendor/ace/mode-django.js +2594 -0
  55. data/assets/_vendor/ace/mode-dockerfile.js +498 -0
  56. data/assets/_vendor/ace/mode-dot.js +418 -0
  57. data/assets/_vendor/ace/mode-drools.js +496 -0
  58. data/assets/_vendor/ace/mode-edifact.js +165 -0
  59. data/assets/_vendor/ace/mode-eiffel.js +136 -0
  60. data/assets/_vendor/ace/mode-ejs.js +3026 -0
  61. data/assets/_vendor/ace/mode-elixir.js +501 -0
  62. data/assets/_vendor/ace/mode-elm.js +307 -0
  63. data/assets/_vendor/ace/mode-erlang.js +1009 -0
  64. data/assets/_vendor/ace/mode-forth.js +297 -0
  65. data/assets/_vendor/ace/mode-fortran.js +431 -0
  66. data/assets/_vendor/ace/mode-fsharp.js +314 -0
  67. data/assets/_vendor/ace/mode-ftl.js +1192 -0
  68. data/assets/_vendor/ace/mode-gcode.js +94 -0
  69. data/assets/_vendor/ace/mode-gherkin.js +172 -0
  70. data/assets/_vendor/ace/mode-gitignore.js +60 -0
  71. data/assets/_vendor/ace/mode-glsl.js +579 -0
  72. data/assets/_vendor/ace/mode-gobstones.js +929 -0
  73. data/assets/_vendor/ace/mode-golang.js +414 -0
  74. data/assets/_vendor/ace/mode-graphqlschema.js +214 -0
  75. data/assets/_vendor/ace/mode-groovy.js +986 -0
  76. data/assets/_vendor/ace/mode-haml.js +1555 -0
  77. data/assets/_vendor/ace/mode-handlebars.js +2622 -0
  78. data/assets/_vendor/ace/mode-haskell.js +379 -0
  79. data/assets/_vendor/ace/mode-haskell_cabal.js +142 -0
  80. data/assets/_vendor/ace/mode-haxe.js +386 -0
  81. data/assets/_vendor/ace/mode-hjson.js +353 -0
  82. data/assets/_vendor/ace/mode-html.js +2509 -0
  83. data/assets/_vendor/ace/mode-html_elixir.js +3087 -0
  84. data/assets/_vendor/ace/mode-html_ruby.js +3043 -0
  85. data/assets/_vendor/ace/mode-ini.js +163 -0
  86. data/assets/_vendor/ace/mode-io.js +253 -0
  87. data/assets/_vendor/ace/mode-jack.js +347 -0
  88. data/assets/_vendor/ace/mode-jade.js +2126 -0
  89. data/assets/_vendor/ace/mode-java.js +975 -0
  90. data/assets/_vendor/ace/mode-javascript.js +797 -0
  91. data/assets/_vendor/ace/mode-json.js +327 -0
  92. data/assets/_vendor/ace/mode-jsoniq.js +4940 -0
  93. data/assets/_vendor/ace/mode-jsp.js +1430 -0
  94. data/assets/_vendor/ace/mode-jssm.js +325 -0
  95. data/assets/_vendor/ace/mode-jsx.js +412 -0
  96. data/assets/_vendor/ace/mode-julia.js +303 -0
  97. data/assets/_vendor/ace/mode-kotlin.js +795 -0
  98. data/assets/_vendor/ace/mode-latex.js +297 -0
  99. data/assets/_vendor/ace/mode-less.js +841 -0
  100. data/assets/_vendor/ace/mode-liquid.js +1193 -0
  101. data/assets/_vendor/ace/mode-lisp.js +112 -0
  102. data/assets/_vendor/ace/mode-livescript.js +280 -0
  103. data/assets/_vendor/ace/mode-logiql.js +317 -0
  104. data/assets/_vendor/ace/mode-lsl.js +343 -0
  105. data/assets/_vendor/ace/mode-lua.js +432 -0
  106. data/assets/_vendor/ace/mode-luapage.js +3007 -0
  107. data/assets/_vendor/ace/mode-lucene.js +87 -0
  108. data/assets/_vendor/ace/mode-makefile.js +410 -0
  109. data/assets/_vendor/ace/mode-markdown.js +3189 -0
  110. data/assets/_vendor/ace/mode-mask.js +1802 -0
  111. data/assets/_vendor/ace/mode-matlab.js +264 -0
  112. data/assets/_vendor/ace/mode-maze.js +291 -0
  113. data/assets/_vendor/ace/mode-mel.js +263 -0
  114. data/assets/_vendor/ace/mode-mixal.js +123 -0
  115. data/assets/_vendor/ace/mode-mushcode.js +681 -0
  116. data/assets/_vendor/ace/mode-mysql.js +168 -0
  117. data/assets/_vendor/ace/mode-nix.js +646 -0
  118. data/assets/_vendor/ace/mode-nsis.js +312 -0
  119. data/assets/_vendor/ace/mode-objectivec.js +739 -0
  120. data/assets/_vendor/ace/mode-ocaml.js +422 -0
  121. data/assets/_vendor/ace/mode-pascal.js +205 -0
  122. data/assets/_vendor/ace/mode-perl.js +380 -0
  123. data/assets/_vendor/ace/mode-pgsql.js +1508 -0
  124. data/assets/_vendor/ace/mode-php.js +13088 -0
  125. data/assets/_vendor/ace/mode-php_laravel_blade.js +13289 -0
  126. data/assets/_vendor/ace/mode-pig.js +310 -0
  127. data/assets/_vendor/ace/mode-plain_text.js +33 -0
  128. data/assets/_vendor/ace/mode-powershell.js +418 -0
  129. data/assets/_vendor/ace/mode-praat.js +478 -0
  130. data/assets/_vendor/ace/mode-prolog.js +371 -0
  131. data/assets/_vendor/ace/mode-properties.js +81 -0
  132. data/assets/_vendor/ace/mode-protobuf.js +592 -0
  133. data/assets/_vendor/ace/mode-puppet.js +370 -0
  134. data/assets/_vendor/ace/mode-python.js +273 -0
  135. data/assets/_vendor/ace/mode-r.js +310 -0
  136. data/assets/_vendor/ace/mode-razor.js +2869 -0
  137. data/assets/_vendor/ace/mode-rdoc.js +243 -0
  138. data/assets/_vendor/ace/mode-red.js +450 -0
  139. data/assets/_vendor/ace/mode-redshift.js +361 -0
  140. data/assets/_vendor/ace/mode-rhtml.js +2806 -0
  141. data/assets/_vendor/ace/mode-rst.js +257 -0
  142. data/assets/_vendor/ace/mode-ruby.js +497 -0
  143. data/assets/_vendor/ace/mode-rust.js +279 -0
  144. data/assets/_vendor/ace/mode-sass.js +441 -0
  145. data/assets/_vendor/ace/mode-scad.js +414 -0
  146. data/assets/_vendor/ace/mode-scala.js +982 -0
  147. data/assets/_vendor/ace/mode-scheme.js +232 -0
  148. data/assets/_vendor/ace/mode-scss.js +606 -0
  149. data/assets/_vendor/ace/mode-sh.js +447 -0
  150. data/assets/_vendor/ace/mode-sjs.js +1014 -0
  151. data/assets/_vendor/ace/mode-slim.js +4736 -0
  152. data/assets/_vendor/ace/mode-smarty.js +2635 -0
  153. data/assets/_vendor/ace/mode-snippets.js +207 -0
  154. data/assets/_vendor/ace/mode-soy_template.js +2847 -0
  155. data/assets/_vendor/ace/mode-space.js +168 -0
  156. data/assets/_vendor/ace/mode-sparql.js +320 -0
  157. data/assets/_vendor/ace/mode-sql.js +111 -0
  158. data/assets/_vendor/ace/mode-sqlserver.js +444 -0
  159. data/assets/_vendor/ace/mode-stylus.js +471 -0
  160. data/assets/_vendor/ace/mode-svg.js +1581 -0
  161. data/assets/_vendor/ace/mode-swift.js +390 -0
  162. data/assets/_vendor/ace/mode-tcl.js +383 -0
  163. data/assets/_vendor/ace/mode-terraform.js +398 -0
  164. data/assets/_vendor/ace/mode-tex.js +159 -0
  165. data/assets/_vendor/ace/mode-text.js +10 -0
  166. data/assets/_vendor/ace/mode-textile.js +150 -0
  167. data/assets/_vendor/ace/mode-toml.js +154 -0
  168. data/assets/_vendor/ace/mode-tsx.js +887 -0
  169. data/assets/_vendor/ace/mode-turtle.js +296 -0
  170. data/assets/_vendor/ace/mode-twig.js +2693 -0
  171. data/assets/_vendor/ace/mode-typescript.js +868 -0
  172. data/assets/_vendor/ace/mode-vala.js +676 -0
  173. data/assets/_vendor/ace/mode-vbscript.js +207 -0
  174. data/assets/_vendor/ace/mode-velocity.js +2790 -0
  175. data/assets/_vendor/ace/mode-verilog.js +119 -0
  176. data/assets/_vendor/ace/mode-vhdl.js +118 -0
  177. data/assets/_vendor/ace/mode-wollok.js +911 -0
  178. data/assets/_vendor/ace/mode-xml.js +677 -0
  179. data/assets/_vendor/ace/mode-xquery.js +4922 -0
  180. data/assets/_vendor/ace/mode-yaml.js +300 -0
  181. data/assets/_vendor/ace/snippets/abap.js +15 -0
  182. data/assets/_vendor/ace/snippets/abc.js +46 -0
  183. data/assets/_vendor/ace/snippets/actionscript.js +172 -0
  184. data/assets/_vendor/ace/snippets/ada.js +15 -0
  185. data/assets/_vendor/ace/snippets/apache_conf.js +15 -0
  186. data/assets/_vendor/ace/snippets/applescript.js +15 -0
  187. data/assets/_vendor/ace/snippets/asciidoc.js +15 -0
  188. data/assets/_vendor/ace/snippets/asl.js +14 -0
  189. data/assets/_vendor/ace/snippets/assembly_x86.js +15 -0
  190. data/assets/_vendor/ace/snippets/autohotkey.js +15 -0
  191. data/assets/_vendor/ace/snippets/batchfile.js +15 -0
  192. data/assets/_vendor/ace/snippets/bro.js +15 -0
  193. data/assets/_vendor/ace/snippets/c9search.js +15 -0
  194. data/assets/_vendor/ace/snippets/c_cpp.js +146 -0
  195. data/assets/_vendor/ace/snippets/cirru.js +15 -0
  196. data/assets/_vendor/ace/snippets/clojure.js +105 -0
  197. data/assets/_vendor/ace/snippets/cobol.js +15 -0
  198. data/assets/_vendor/ace/snippets/coffee.js +110 -0
  199. data/assets/_vendor/ace/snippets/coldfusion.js +15 -0
  200. data/assets/_vendor/ace/snippets/csharp.js +15 -0
  201. data/assets/_vendor/ace/snippets/csound_document.js +25 -0
  202. data/assets/_vendor/ace/snippets/csound_orchestra.js +62 -0
  203. data/assets/_vendor/ace/snippets/csound_score.js +15 -0
  204. data/assets/_vendor/ace/snippets/csp.js +15 -0
  205. data/assets/_vendor/ace/snippets/css.js +982 -0
  206. data/assets/_vendor/ace/snippets/curly.js +15 -0
  207. data/assets/_vendor/ace/snippets/d.js +15 -0
  208. data/assets/_vendor/ace/snippets/dart.js +98 -0
  209. data/assets/_vendor/ace/snippets/diff.js +26 -0
  210. data/assets/_vendor/ace/snippets/django.js +123 -0
  211. data/assets/_vendor/ace/snippets/dockerfile.js +15 -0
  212. data/assets/_vendor/ace/snippets/dot.js +15 -0
  213. data/assets/_vendor/ace/snippets/drools.js +34 -0
  214. data/assets/_vendor/ace/snippets/edifact.js +255 -0
  215. data/assets/_vendor/ace/snippets/eiffel.js +15 -0
  216. data/assets/_vendor/ace/snippets/ejs.js +15 -0
  217. data/assets/_vendor/ace/snippets/elixir.js +15 -0
  218. data/assets/_vendor/ace/snippets/elm.js +15 -0
  219. data/assets/_vendor/ace/snippets/erlang.js +175 -0
  220. data/assets/_vendor/ace/snippets/forth.js +15 -0
  221. data/assets/_vendor/ace/snippets/fortran.js +15 -0
  222. data/assets/_vendor/ace/snippets/fsharp.js +15 -0
  223. data/assets/_vendor/ace/snippets/ftl.js +15 -0
  224. data/assets/_vendor/ace/snippets/gcode.js +15 -0
  225. data/assets/_vendor/ace/snippets/gherkin.js +15 -0
  226. data/assets/_vendor/ace/snippets/gitignore.js +15 -0
  227. data/assets/_vendor/ace/snippets/glsl.js +15 -0
  228. data/assets/_vendor/ace/snippets/gobstones.js +49 -0
  229. data/assets/_vendor/ace/snippets/golang.js +15 -0
  230. data/assets/_vendor/ace/snippets/graphqlschema.js +47 -0
  231. data/assets/_vendor/ace/snippets/groovy.js +15 -0
  232. data/assets/_vendor/ace/snippets/haml.js +35 -0
  233. data/assets/_vendor/ace/snippets/handlebars.js +15 -0
  234. data/assets/_vendor/ace/snippets/haskell.js +97 -0
  235. data/assets/_vendor/ace/snippets/haskell_cabal.js +15 -0
  236. data/assets/_vendor/ace/snippets/haxe.js +15 -0
  237. data/assets/_vendor/ace/snippets/hjson.js +15 -0
  238. data/assets/_vendor/ace/snippets/html.js +870 -0
  239. data/assets/_vendor/ace/snippets/html_elixir.js +15 -0
  240. data/assets/_vendor/ace/snippets/html_ruby.js +15 -0
  241. data/assets/_vendor/ace/snippets/ini.js +15 -0
  242. data/assets/_vendor/ace/snippets/io.js +77 -0
  243. data/assets/_vendor/ace/snippets/jack.js +15 -0
  244. data/assets/_vendor/ace/snippets/jade.js +15 -0
  245. data/assets/_vendor/ace/snippets/java.js +255 -0
  246. data/assets/_vendor/ace/snippets/javascript.js +210 -0
  247. data/assets/_vendor/ace/snippets/json.js +15 -0
  248. data/assets/_vendor/ace/snippets/jsoniq.js +76 -0
  249. data/assets/_vendor/ace/snippets/jsp.js +114 -0
  250. data/assets/_vendor/ace/snippets/jssm.js +15 -0
  251. data/assets/_vendor/ace/snippets/jsx.js +15 -0
  252. data/assets/_vendor/ace/snippets/julia.js +15 -0
  253. data/assets/_vendor/ace/snippets/kotlin.js +15 -0
  254. data/assets/_vendor/ace/snippets/latex.js +15 -0
  255. data/assets/_vendor/ace/snippets/less.js +15 -0
  256. data/assets/_vendor/ace/snippets/liquid.js +15 -0
  257. data/assets/_vendor/ace/snippets/lisp.js +15 -0
  258. data/assets/_vendor/ace/snippets/livescript.js +15 -0
  259. data/assets/_vendor/ace/snippets/logiql.js +15 -0
  260. data/assets/_vendor/ace/snippets/lsl.js +1247 -0
  261. data/assets/_vendor/ace/snippets/lua.js +36 -0
  262. data/assets/_vendor/ace/snippets/luapage.js +15 -0
  263. data/assets/_vendor/ace/snippets/lucene.js +15 -0
  264. data/assets/_vendor/ace/snippets/makefile.js +19 -0
  265. data/assets/_vendor/ace/snippets/markdown.js +103 -0
  266. data/assets/_vendor/ace/snippets/mask.js +15 -0
  267. data/assets/_vendor/ace/snippets/matlab.js +15 -0
  268. data/assets/_vendor/ace/snippets/maze.js +24 -0
  269. data/assets/_vendor/ace/snippets/mel.js +15 -0
  270. data/assets/_vendor/ace/snippets/mixal.js +15 -0
  271. data/assets/_vendor/ace/snippets/mushcode.js +15 -0
  272. data/assets/_vendor/ace/snippets/mysql.js +15 -0
  273. data/assets/_vendor/ace/snippets/nix.js +15 -0
  274. data/assets/_vendor/ace/snippets/nsis.js +15 -0
  275. data/assets/_vendor/ace/snippets/objectivec.js +15 -0
  276. data/assets/_vendor/ace/snippets/ocaml.js +15 -0
  277. data/assets/_vendor/ace/snippets/pascal.js +15 -0
  278. data/assets/_vendor/ace/snippets/perl.js +362 -0
  279. data/assets/_vendor/ace/snippets/pgsql.js +15 -0
  280. data/assets/_vendor/ace/snippets/php.js +398 -0
  281. data/assets/_vendor/ace/snippets/php_laravel_blade.js +15 -0
  282. data/assets/_vendor/ace/snippets/pig.js +15 -0
  283. data/assets/_vendor/ace/snippets/plain_text.js +15 -0
  284. data/assets/_vendor/ace/snippets/powershell.js +15 -0
  285. data/assets/_vendor/ace/snippets/praat.js +15 -0
  286. data/assets/_vendor/ace/snippets/prolog.js +15 -0
  287. data/assets/_vendor/ace/snippets/properties.js +15 -0
  288. data/assets/_vendor/ace/snippets/protobuf.js +15 -0
  289. data/assets/_vendor/ace/snippets/puppet.js +15 -0
  290. data/assets/_vendor/ace/snippets/python.js +173 -0
  291. data/assets/_vendor/ace/snippets/r.js +136 -0
  292. data/assets/_vendor/ace/snippets/razor.js +18 -0
  293. data/assets/_vendor/ace/snippets/rdoc.js +15 -0
  294. data/assets/_vendor/ace/snippets/red.js +15 -0
  295. data/assets/_vendor/ace/snippets/redshift.js +15 -0
  296. data/assets/_vendor/ace/snippets/rhtml.js +15 -0
  297. data/assets/_vendor/ace/snippets/rst.js +37 -0
  298. data/assets/_vendor/ace/snippets/ruby.js +943 -0
  299. data/assets/_vendor/ace/snippets/rust.js +15 -0
  300. data/assets/_vendor/ace/snippets/sass.js +15 -0
  301. data/assets/_vendor/ace/snippets/scad.js +15 -0
  302. data/assets/_vendor/ace/snippets/scala.js +15 -0
  303. data/assets/_vendor/ace/snippets/scheme.js +15 -0
  304. data/assets/_vendor/ace/snippets/scss.js +15 -0
  305. data/assets/_vendor/ace/snippets/sh.js +98 -0
  306. data/assets/_vendor/ace/snippets/sjs.js +15 -0
  307. data/assets/_vendor/ace/snippets/slim.js +15 -0
  308. data/assets/_vendor/ace/snippets/smarty.js +15 -0
  309. data/assets/_vendor/ace/snippets/snippets.js +24 -0
  310. data/assets/_vendor/ace/snippets/soy_template.js +15 -0
  311. data/assets/_vendor/ace/snippets/space.js +15 -0
  312. data/assets/_vendor/ace/snippets/sparql.js +15 -0
  313. data/assets/_vendor/ace/snippets/sql.js +41 -0
  314. data/assets/_vendor/ace/snippets/sqlserver.js +84 -0
  315. data/assets/_vendor/ace/snippets/stylus.js +15 -0
  316. data/assets/_vendor/ace/snippets/svg.js +15 -0
  317. data/assets/_vendor/ace/snippets/swift.js +15 -0
  318. data/assets/_vendor/ace/snippets/tcl.js +107 -0
  319. data/assets/_vendor/ace/snippets/terraform.js +15 -0
  320. data/assets/_vendor/ace/snippets/tex.js +205 -0
  321. data/assets/_vendor/ace/snippets/text.js +15 -0
  322. data/assets/_vendor/ace/snippets/textile.js +45 -0
  323. data/assets/_vendor/ace/snippets/toml.js +15 -0
  324. data/assets/_vendor/ace/snippets/tsx.js +15 -0
  325. data/assets/_vendor/ace/snippets/turtle.js +15 -0
  326. data/assets/_vendor/ace/snippets/twig.js +15 -0
  327. data/assets/_vendor/ace/snippets/typescript.js +15 -0
  328. data/assets/_vendor/ace/snippets/vala.js +201 -0
  329. data/assets/_vendor/ace/snippets/vbscript.js +15 -0
  330. data/assets/_vendor/ace/snippets/velocity.js +44 -0
  331. data/assets/_vendor/ace/snippets/verilog.js +15 -0
  332. data/assets/_vendor/ace/snippets/vhdl.js +15 -0
  333. data/assets/_vendor/ace/snippets/wollok.js +99 -0
  334. data/assets/_vendor/ace/snippets/xml.js +15 -0
  335. data/assets/_vendor/ace/snippets/xquery.js +76 -0
  336. data/assets/_vendor/ace/snippets/yaml.js +15 -0
  337. data/assets/_vendor/ace/theme-ambiance.js +185 -0
  338. data/assets/_vendor/ace/theme-chaos.js +164 -0
  339. data/assets/_vendor/ace/theme-chrome.js +136 -0
  340. data/assets/_vendor/ace/theme-clouds.js +103 -0
  341. data/assets/_vendor/ace/theme-clouds_midnight.js +104 -0
  342. data/assets/_vendor/ace/theme-cobalt.js +121 -0
  343. data/assets/_vendor/ace/theme-crimson_editor.js +126 -0
  344. data/assets/_vendor/ace/theme-dawn.js +116 -0
  345. data/assets/_vendor/ace/theme-dracula.js +136 -0
  346. data/assets/_vendor/ace/theme-dreamweaver.js +149 -0
  347. data/assets/_vendor/ace/theme-eclipse.js +106 -0
  348. data/assets/_vendor/ace/theme-github.js +110 -0
  349. data/assets/_vendor/ace/theme-gob.js +120 -0
  350. data/assets/_vendor/ace/theme-gruvbox.js +90 -0
  351. data/assets/_vendor/ace/theme-idle_fingers.js +104 -0
  352. data/assets/_vendor/ace/theme-iplastic.js +129 -0
  353. data/assets/_vendor/ace/theme-katzenmilch.js +129 -0
  354. data/assets/_vendor/ace/theme-kr_theme.js +112 -0
  355. data/assets/_vendor/ace/theme-kuroir.js +69 -0
  356. data/assets/_vendor/ace/theme-merbivore.js +103 -0
  357. data/assets/_vendor/ace/theme-merbivore_soft.js +104 -0
  358. data/assets/_vendor/ace/theme-mono_industrial.js +115 -0
  359. data/assets/_vendor/ace/theme-monokai.js +113 -0
  360. data/assets/_vendor/ace/theme-pastel_on_dark.js +116 -0
  361. data/assets/_vendor/ace/theme-solarized_dark.js +96 -0
  362. data/assets/_vendor/ace/theme-solarized_light.js +99 -0
  363. data/assets/_vendor/ace/theme-sqlserver.js +146 -0
  364. data/assets/_vendor/ace/theme-terminal.js +122 -0
  365. data/assets/_vendor/ace/theme-textmate.js +138 -0
  366. data/assets/_vendor/ace/theme-tomorrow.js +116 -0
  367. data/assets/_vendor/ace/theme-tomorrow_night.js +116 -0
  368. data/assets/_vendor/ace/theme-tomorrow_night_blue.js +114 -0
  369. data/assets/_vendor/ace/theme-tomorrow_night_bright.js +129 -0
  370. data/assets/_vendor/ace/theme-tomorrow_night_eighties.js +116 -0
  371. data/assets/_vendor/ace/theme-twilight.js +117 -0
  372. data/assets/_vendor/ace/theme-vibrant_ink.js +102 -0
  373. data/assets/_vendor/ace/theme-xcode.js +96 -0
  374. data/assets/_vendor/ace/worker-coffee.js +2165 -0
  375. data/assets/_vendor/ace/worker-css.js +8764 -0
  376. data/assets/_vendor/ace/worker-html.js +11614 -0
  377. data/assets/_vendor/ace/worker-javascript.js +12491 -0
  378. data/assets/_vendor/ace/worker-json.js +2396 -0
  379. data/assets/_vendor/ace/worker-lua.js +3637 -0
  380. data/assets/_vendor/ace/worker-php.js +4313 -0
  381. data/assets/_vendor/ace/worker-xml.js +3899 -0
  382. data/assets/_vendor/ace/worker-xquery.js +70688 -0
  383. data/assets/_vendor/motion-ui/_settings.scss +1 -0
  384. data/assets/_vendor/motion-ui/effects/_fade.scss +1 -4
  385. data/assets/_vendor/motion-ui/effects/_hinge.scss +4 -3
  386. data/assets/_vendor/motion-ui/effects/_shake.scss +1 -1
  387. data/assets/_vendor/motion-ui/effects/_slide.scss +4 -3
  388. data/assets/_vendor/motion-ui/effects/_spin.scss +4 -3
  389. data/assets/_vendor/motion-ui/effects/_wiggle.scss +1 -1
  390. data/assets/_vendor/motion-ui/effects/_zoom.scss +2 -2
  391. data/assets/_vendor/motion-ui/motion-ui.scss +2 -0
  392. data/assets/_vendor/motion-ui/transitions/_fade.scss +6 -4
  393. data/assets/_vendor/motion-ui/transitions/_hinge.scss +3 -2
  394. data/assets/_vendor/motion-ui/transitions/_slide.scss +3 -2
  395. data/assets/_vendor/motion-ui/transitions/_spin.scss +2 -1
  396. data/assets/_vendor/motion-ui/transitions/_zoom.scss +6 -4
  397. data/assets/_vendor/motion-ui/util/_animation.scss +1 -1
  398. data/assets/_vendor/motion-ui/util/_args.scss +2 -2
  399. data/assets/_vendor/motion-ui/util/_function.scss +94 -0
  400. data/assets/_vendor/motion-ui/util/_keyframe.scss +5 -5
  401. data/assets/_vendor/motion-ui/util/_series.scss +20 -17
  402. data/assets/_vendor/motion-ui/util/_string.scss +36 -0
  403. data/assets/_vendor/tinymce/plugins/advlist/plugin.js +136 -404
  404. data/assets/_vendor/tinymce/plugins/advlist/plugin.min.js +1 -1
  405. data/assets/_vendor/tinymce/plugins/anchor/plugin.js +103 -323
  406. data/assets/_vendor/tinymce/plugins/anchor/plugin.min.js +1 -1
  407. data/assets/_vendor/tinymce/plugins/autolink/plugin.js +153 -377
  408. data/assets/_vendor/tinymce/plugins/autolink/plugin.min.js +1 -1
  409. data/assets/_vendor/tinymce/plugins/autoresize/plugin.js +145 -427
  410. data/assets/_vendor/tinymce/plugins/autoresize/plugin.min.js +1 -1
  411. data/assets/_vendor/tinymce/plugins/autosave/plugin.js +197 -579
  412. data/assets/_vendor/tinymce/plugins/autosave/plugin.min.js +1 -1
  413. data/assets/_vendor/tinymce/plugins/bbcode/plugin.js +88 -251
  414. data/assets/_vendor/tinymce/plugins/bbcode/plugin.min.js +1 -1
  415. data/assets/_vendor/tinymce/plugins/charmap/plugin.js +1243 -818
  416. data/assets/_vendor/tinymce/plugins/charmap/plugin.min.js +1 -1
  417. data/assets/_vendor/tinymce/plugins/code/plugin.js +82 -326
  418. data/assets/_vendor/tinymce/plugins/code/plugin.min.js +1 -1
  419. data/assets/_vendor/tinymce/plugins/codesample/plugin.js +829 -1444
  420. data/assets/_vendor/tinymce/plugins/codesample/plugin.min.js +1 -1
  421. data/assets/_vendor/tinymce/plugins/colorpicker/plugin.js +111 -257
  422. data/assets/_vendor/tinymce/plugins/colorpicker/plugin.min.js +1 -1
  423. data/assets/_vendor/tinymce/plugins/contextmenu/plugin.js +141 -469
  424. data/assets/_vendor/tinymce/plugins/contextmenu/plugin.min.js +1 -1
  425. data/assets/_vendor/tinymce/plugins/directionality/plugin.js +57 -261
  426. data/assets/_vendor/tinymce/plugins/directionality/plugin.min.js +1 -1
  427. data/assets/_vendor/tinymce/plugins/emoticons/plugin.js +78 -247
  428. data/assets/_vendor/tinymce/plugins/emoticons/plugin.min.js +1 -1
  429. data/assets/_vendor/tinymce/plugins/fullpage/plugin.js +463 -906
  430. data/assets/_vendor/tinymce/plugins/fullpage/plugin.min.js +1 -1
  431. data/assets/_vendor/tinymce/plugins/fullscreen/plugin.js +149 -427
  432. data/assets/_vendor/tinymce/plugins/fullscreen/plugin.min.js +1 -1
  433. data/assets/_vendor/tinymce/plugins/help/plugin.js +634 -1434
  434. data/assets/_vendor/tinymce/plugins/help/plugin.min.js +1 -1
  435. data/assets/_vendor/tinymce/plugins/hr/plugin.js +29 -185
  436. data/assets/_vendor/tinymce/plugins/hr/plugin.min.js +1 -1
  437. data/assets/_vendor/tinymce/plugins/image/plugin.js +1147 -1508
  438. data/assets/_vendor/tinymce/plugins/image/plugin.min.js +1 -1
  439. data/assets/_vendor/tinymce/plugins/imagetools/plugin.js +3319 -4079
  440. data/assets/_vendor/tinymce/plugins/imagetools/plugin.min.js +1 -2
  441. data/assets/_vendor/tinymce/plugins/importcss/plugin.js +230 -543
  442. data/assets/_vendor/tinymce/plugins/importcss/plugin.min.js +1 -1
  443. data/assets/_vendor/tinymce/plugins/insertdatetime/plugin.js +151 -460
  444. data/assets/_vendor/tinymce/plugins/insertdatetime/plugin.min.js +1 -1
  445. data/assets/_vendor/tinymce/plugins/legacyoutput/plugin.js +204 -379
  446. data/assets/_vendor/tinymce/plugins/legacyoutput/plugin.min.js +1 -1
  447. data/assets/_vendor/tinymce/plugins/link/plugin.js +644 -1162
  448. data/assets/_vendor/tinymce/plugins/link/plugin.min.js +1 -1
  449. data/assets/_vendor/tinymce/plugins/lists/plugin.js +1005 -1875
  450. data/assets/_vendor/tinymce/plugins/lists/plugin.min.js +1 -1
  451. data/assets/_vendor/tinymce/plugins/media/plugin.js +1066 -1926
  452. data/assets/_vendor/tinymce/plugins/media/plugin.min.js +1 -1
  453. data/assets/_vendor/tinymce/plugins/nonbreaking/plugin.js +70 -298
  454. data/assets/_vendor/tinymce/plugins/nonbreaking/plugin.min.js +1 -1
  455. data/assets/_vendor/tinymce/plugins/noneditable/plugin.js +96 -294
  456. data/assets/_vendor/tinymce/plugins/noneditable/plugin.min.js +1 -1
  457. data/assets/_vendor/tinymce/plugins/pagebreak/plugin.js +92 -337
  458. data/assets/_vendor/tinymce/plugins/pagebreak/plugin.min.js +1 -1
  459. data/assets/_vendor/tinymce/plugins/paste/plugin.js +1363 -2801
  460. data/assets/_vendor/tinymce/plugins/paste/plugin.min.js +1 -1
  461. data/assets/_vendor/tinymce/plugins/preview/plugin.js +106 -393
  462. data/assets/_vendor/tinymce/plugins/preview/plugin.min.js +1 -1
  463. data/assets/_vendor/tinymce/plugins/print/plugin.js +29 -185
  464. data/assets/_vendor/tinymce/plugins/print/plugin.min.js +1 -1
  465. data/assets/_vendor/tinymce/plugins/save/plugin.js +100 -350
  466. data/assets/_vendor/tinymce/plugins/save/plugin.min.js +1 -1
  467. data/assets/_vendor/tinymce/plugins/searchreplace/plugin.js +491 -865
  468. data/assets/_vendor/tinymce/plugins/searchreplace/plugin.min.js +1 -1
  469. data/assets/_vendor/tinymce/plugins/spellchecker/plugin.js +630 -1292
  470. data/assets/_vendor/tinymce/plugins/spellchecker/plugin.min.js +1 -1
  471. data/assets/_vendor/tinymce/plugins/tabfocus/plugin.js +96 -391
  472. data/assets/_vendor/tinymce/plugins/tabfocus/plugin.min.js +1 -1
  473. data/assets/_vendor/tinymce/plugins/table/plugin.js +9537 -14920
  474. data/assets/_vendor/tinymce/plugins/table/plugin.min.js +1 -5
  475. data/assets/_vendor/tinymce/plugins/template/plugin.js +309 -771
  476. data/assets/_vendor/tinymce/plugins/template/plugin.min.js +1 -1
  477. data/assets/_vendor/tinymce/plugins/textcolor/plugin.js +319 -592
  478. data/assets/_vendor/tinymce/plugins/textcolor/plugin.min.js +1 -1
  479. data/assets/_vendor/tinymce/plugins/textpattern/plugin.js +326 -674
  480. data/assets/_vendor/tinymce/plugins/textpattern/plugin.min.js +1 -1
  481. data/assets/_vendor/tinymce/plugins/toc/plugin.js +199 -530
  482. data/assets/_vendor/tinymce/plugins/toc/plugin.min.js +1 -1
  483. data/assets/_vendor/tinymce/plugins/visualblocks/plugin.js +112 -436
  484. data/assets/_vendor/tinymce/plugins/visualblocks/plugin.min.js +1 -1
  485. data/assets/_vendor/tinymce/plugins/visualchars/plugin.js +428 -1248
  486. data/assets/_vendor/tinymce/plugins/visualchars/plugin.min.js +1 -1
  487. data/assets/_vendor/tinymce/plugins/wordcount/plugin.js +307 -699
  488. data/assets/_vendor/tinymce/plugins/wordcount/plugin.min.js +1 -1
  489. data/assets/_vendor/tinymce/skins/lightgray/content.inline.min.css +1 -1
  490. data/assets/_vendor/tinymce/skins/lightgray/content.min.css +1 -1
  491. data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.eot +0 -0
  492. data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.svg +1 -1
  493. data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.ttf +0 -0
  494. data/assets/_vendor/tinymce/skins/lightgray/fonts/tinymce.woff +0 -0
  495. data/assets/_vendor/tinymce/skins/lightgray/skin.min.css +1 -1
  496. data/assets/_vendor/tinymce/skins/lightgray/skin.mobile.min.css +1 -1
  497. data/assets/_vendor/tinymce/themes/inlite/theme.js +9693 -18245
  498. data/assets/_vendor/tinymce/themes/inlite/theme.min.js +1 -5
  499. data/assets/_vendor/tinymce/themes/mobile/theme.js +12629 -22467
  500. data/assets/_vendor/tinymce/themes/mobile/theme.min.js +1 -8
  501. data/assets/_vendor/tinymce/themes/modern/theme.js +9510 -17780
  502. data/assets/_vendor/tinymce/themes/modern/theme.min.js +1 -5
  503. data/assets/_vendor/tinymce/tinymce.js +25087 -42606
  504. data/assets/_vendor/yoastseo/css/_icons.scss +7 -7
  505. data/assets/_vendor/yoastseo/css/_snippet-editor.scss +1 -1
  506. data/assets/bedrock/js/bedrock.js +1 -71697
  507. data/assets/bedrock/scss/_bedrock-components.scss +20 -0
  508. data/assets/bedrock/scss/_bedrock-settings.scss +12 -4
  509. data/assets/bedrock/scss/_foundation-settings.scss +4 -2
  510. data/assets/bedrock/scss/components/ace-editor.scss +21 -0
  511. data/assets/bedrock/scss/components/attachments-grid.scss +18 -15
  512. data/assets/bedrock/scss/components/date-picker.scss +146 -0
  513. data/assets/bedrock/scss/components/dropzone-upload.scss +7 -0
  514. data/assets/bedrock/scss/components/file-input.scss +7 -0
  515. data/assets/bedrock/scss/components/file-preview.scss +36 -0
  516. data/assets/bedrock/scss/components/frame-embed.scss +23 -0
  517. data/assets/bedrock/scss/components/global.scss +27 -0
  518. data/assets/bedrock/scss/components/helper-classes.scss +1 -0
  519. data/assets/bedrock/scss/components/icon-box.scss +38 -0
  520. data/assets/bedrock/scss/components/item-list.scss +66 -0
  521. data/assets/bedrock/scss/components/lists.scss +58 -0
  522. data/assets/bedrock/scss/components/off-canvas-menu.scss +27 -15
  523. data/assets/bedrock/scss/components/place-autocomplete.scss +90 -0
  524. data/assets/bedrock/scss/components/rrule-generator.scss +102 -0
  525. data/assets/bedrock/scss/components/rrule-reveal.scss +14 -0
  526. data/assets/bedrock/scss/components/select-box.scss +1 -0
  527. data/assets/bedrock/scss/components/seo-analysis.scss +5 -0
  528. data/assets/bedrock/scss/components/textarea.scss +14 -2
  529. data/assets/bedrock/scss/components/tiny-mce-editor.scss +5 -16
  530. data/lib/bedrock_sass.rb +5 -0
  531. data/lib/bedrock_sass/version.rb +1 -1
  532. data/lib/tasks/before_assets_precompile.rake +1 -0
  533. metadata +395 -4
  534. data/CODE_OF_CONDUCT.md +0 -74
@@ -1 +1 @@
1
- !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i<g;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;f<c;++f)e[f]=d(a[f]);b.apply(null,e)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("6",tinymce.util.Tools.resolve),g("1",["6"],function(a){return a("tinymce.PluginManager")}),g("7",["6"],function(a){return a("tinymce.util.VK")}),g("8",[],function(){var a=function(a){return"boolean"==typeof a.link_assume_external_targets&&a.link_assume_external_targets},b=function(a){return"boolean"==typeof a.link_context_toolbar&&a.link_context_toolbar},c=function(a){return a.link_list},d=function(a){return"string"==typeof a.default_link_target},e=function(a){return a.default_link_target},f=function(a){return a.target_list},g=function(a,b){a.settings.target_list=b},h=function(a){return f(a)!==!1},i=function(a){return a.rel_list},j=function(a){return void 0!==i(a)},k=function(a){return a.link_class_list},l=function(a){return void 0!==k(a)},m=function(a){return a.link_title!==!1},n=function(a){return"boolean"==typeof a.allow_unsafe_link_target&&a.allow_unsafe_link_target};return{assumeExternalTargets:a,hasContextToolbar:b,getLinkList:c,hasDefaultLinkTarget:d,getDefaultLinkTarget:e,getTargetList:f,setTargetList:g,shouldShowTargetList:h,getRelList:i,hasRelList:j,getLinkClassList:k,hasLinkClassList:l,shouldShowLinkTitle:m,allowUnsafeLinkTarget:n}}),h("c",document),h("d",window),g("e",["6"],function(a){return a("tinymce.dom.DOMUtils")}),g("f",["6"],function(a){return a("tinymce.Env")}),g("9",["c","d","e","f"],function(a,b,c,d){var e=function(b,c){a.body.appendChild(b),b.dispatchEvent(c),a.body.removeChild(b)},f=function(f){if(!d.ie||d.ie>10){var g=a.createElement("a");g.target="_blank",g.href=f,g.rel="noreferrer noopener";var h=a.createEvent("MouseEvents");h.initMouseEvent("click",!0,!0,b,0,0,0,0,0,!1,!1,!1,!1,0,null),e(g,h)}else{var i=b.open("","_blank");if(i){i.opener=null;var j=i.document;j.open(),j.write('<meta http-equiv="refresh" content="0; url='+c.DOM.encode(f)+'">'),j.close()}}};return{open:f}}),h("g",RegExp),g("h",["6"],function(a){return a("tinymce.util.Tools")}),g("a",["g","h","8"],function(a,b,c){var d=function(a,c){var d=["noopener"],e=a?a.split(/\s+/):[],f=function(a){return b.trim(a.sort().join(" "))},g=function(a){return a=h(a),a.length?a.concat(d):d},h=function(a){return a.filter(function(a){return b.inArray(d,a)===-1})};return e=c?g(e):h(e),e.length?f(e):null},e=function(a){return a.replace(/\uFEFF/g,"")},f=function(a,b){return b=b||a.selection.getNode(),k(b)?a.dom.select("a[href]",b)[0]:a.dom.getParent(b,"a[href]")},g=function(a,b){var c=b?b.innerText||b.textContent:a.getContent({format:"text"});return e(c)},h=function(a){return a&&"A"===a.nodeName&&a.href},i=function(a){return b.grep(a,h).length>0},j=function(a){return!(/</.test(a)&&(!/^<a [^>]+>[^<]+<\/a>$/.test(a)||a.indexOf("href=")===-1))},k=function(a){return a&&"FIGURE"===a.nodeName&&/\bimage\b/i.test(a.className)},l=function(a,b){return function(e){a.undoManager.transact(function(){var g=a.selection.getNode(),h=f(a,g),i={href:e.href,target:e.target?e.target:null,rel:e.rel?e.rel:null,"class":e["class"]?e["class"]:null,title:e.title?e.title:null};c.hasRelList(a.settings)||c.allowUnsafeLinkTarget(a.settings)!==!1||(i.rel=d(i.rel,"_blank"===i.target)),e.href===b.href&&(b.attach(),b={}),h?(a.focus(),e.hasOwnProperty("text")&&("innerText"in h?h.innerText=e.text:h.textContent=e.text),a.dom.setAttribs(h,i),a.selection.select(h),a.undoManager.add()):k(g)?o(a,g,i):e.hasOwnProperty("text")?a.insertContent(a.dom.createHTML("a",i,a.dom.encode(e.text))):a.execCommand("mceInsertLink",!1,i)})}},m=function(a){return function(){a.undoManager.transact(function(){var b=a.selection.getNode();k(b)?n(a,b):a.execCommand("unlink")})}},n=function(a,b){var c,d;d=a.dom.select("img",b)[0],d&&(c=a.dom.getParents(d,"a[href]",b)[0],c&&(c.parentNode.insertBefore(d,c),a.dom.remove(c)))},o=function(a,b,c){var d,e;e=a.dom.select("img",b)[0],e&&(d=a.dom.create("a",c),e.parentNode.insertBefore(d,e),d.appendChild(e))};return{link:l,unlink:m,isLink:h,hasLinks:i,isOnlyTextSelected:j,getAnchorElement:f,getAnchorText:g,toggleTargetRules:d}}),g("i",["6"],function(a){return a("tinymce.util.Delay")}),g("j",["6"],function(a){return a("tinymce.util.XHR")}),g("b",["i","h","j","8","a"],function(a,b,c,d,e){var f={},g=function(a,b){var e=d.getLinkList(a.settings);"string"==typeof e?c.send({url:e,success:function(c){b(a,JSON.parse(c))}}):"function"==typeof e?e(function(c){b(a,c)}):b(a,e)},h=function(a,c,d){var e=function(a,d){return d=d||[],b.each(a,function(a){var b={text:a.text||a.title};a.menu?b.menu=e(a.menu):(b.value=a.value,c&&c(b)),d.push(b)}),d};return e(a,d||[])},i=function(b,c,d){var e=b.selection.getRng();a.setEditorTimeout(b,function(){b.windowManager.confirm(c,function(a){b.selection.setRng(e),d(a)})})},j=function(a,c){var g,j,k,l,m,n,o,p,q,r,s,t={},u=a.selection,v=a.dom,w=function(a){var b=k.find("#text");(!b.value()||a.lastControl&&b.value()===a.lastControl.text())&&b.value(a.control.text()),k.find("#href").value(a.control.value())},x=function(c){var d=[];if(b.each(a.dom.select("a:not([href])"),function(a){var b=a.name||a.id;b&&d.push({text:b,value:"#"+b,selected:c.indexOf("#"+b)!==-1})}),d.length)return d.unshift({text:"None",value:""}),{name:"anchor",type:"listbox",label:"Anchors",values:d,onselect:w}},y=function(){j||!l||t.text||this.parent().parent().find("#text")[0].value(this.value())},z=function(c){var d=c.meta||{};n&&n.value(a.convertURL(this.value(),"href")),b.each(c.meta,function(a,b){var c=k.find("#"+b);"text"===b?0===j.length&&(c.value(a),t.text=a):c.value(a)}),d.attach&&(f={href:this.value(),attach:d.attach}),d.text||y.call(this)},A=function(a){a.meta=k.toJSON()};l=e.isOnlyTextSelected(u.getContent()),g=e.getAnchorElement(a),t.text=j=e.getAnchorText(a.selection,g),t.href=g?v.getAttrib(g,"href"):"",g?t.target=v.getAttrib(g,"target"):d.hasDefaultLinkTarget(a.settings)&&(t.target=d.getDefaultLinkTarget(a.settings)),(s=v.getAttrib(g,"rel"))&&(t.rel=s),(s=v.getAttrib(g,"class"))&&(t["class"]=s),(s=v.getAttrib(g,"title"))&&(t.title=s),l&&(m={name:"text",type:"textbox",size:40,label:"Text to display",onchange:function(){t.text=this.value()}}),c&&(n={type:"listbox",label:"Link list",values:h(c,function(b){b.value=a.convertURL(b.value||b.url,"href")},[{text:"None",value:""}]),onselect:w,value:a.convertURL(t.href,"href"),onPostRender:function(){n=this}}),d.shouldShowTargetList(a.settings)&&(void 0===d.getTargetList(a.settings)&&d.setTargetList(a,[{text:"None",value:""},{text:"New window",value:"_blank"}]),p={name:"target",type:"listbox",label:"Target",values:h(d.getTargetList(a.settings))}),d.hasRelList(a.settings)&&(o={name:"rel",type:"listbox",label:"Rel",values:h(d.getRelList(a.settings),function(b){d.allowUnsafeLinkTarget(a.settings)===!1&&(b.value=e.toggleTargetRules(b.value,"_blank"===t.target))})}),d.hasLinkClassList(a.settings)&&(q={name:"class",type:"listbox",label:"Class",values:h(d.getLinkClassList(a.settings),function(b){b.value&&(b.textStyle=function(){return a.formatter.getCssText({inline:"a",classes:[b.value]})})})}),d.shouldShowLinkTitle(a.settings)&&(r={name:"title",type:"textbox",label:"Title",value:t.title}),k=a.windowManager.open({title:"Insert link",data:t,body:[{name:"href",type:"filepicker",filetype:"file",size:40,autofocus:!0,label:"Url",onchange:z,onkeyup:y,onbeforecall:A},m,r,x(t.href),n,o,p,q],onSubmit:function(c){var g=d.assumeExternalTargets(a.settings),h=e.link(a,f),k=e.unlink(a),m=b.extend({},t,c.data),n=m.href;return n?(l&&m.text!==j||delete m.text,n.indexOf("@")>0&&n.indexOf("//")===-1&&n.indexOf("mailto:")===-1?void i(a,"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",function(a){a&&(m.href="mailto:"+n),h(m)}):g===!0&&!/^\w+:/i.test(n)||g===!1&&/^\s*www[\.|\d\.]/i.test(n)?void i(a,"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(a){a&&(m.href="http://"+n),h(m)}):void h(m)):void k()}})},k=function(a){g(a,j)};return{open:k}}),g("3",["7","8","9","a","b"],function(a,b,c,d,e){var f=function(a,b){return a.dom.getParent(b,"a[href]")},g=function(a){return f(a,a.selection.getStart())},h=function(a){var b=a.getAttribute("data-mce-href");return b?b:a.getAttribute("href")},i=function(a){var b=a.plugins.contextmenu;return!!b&&b.isContextMenuVisible()},j=function(a){return a.altKey===!0&&a.shiftKey===!1&&a.ctrlKey===!1&&a.metaKey===!1},k=function(a,b){if(b){var d=h(b);if(/^#/.test(d)){var e=a.$(d);e.length&&a.selection.scrollIntoView(e[0],!0)}else c.open(b.href)}},l=function(a){return function(){e.open(a)}},m=function(a){return function(){k(a,g(a))}},n=function(a){return function(c){var e,f,g;return!!(b.hasContextToolbar(a.settings)&&!i(a)&&d.isLink(c)&&(e=a.selection,f=e.getRng(),g=f.startContainer,3===g.nodeType&&e.isCollapsed()&&f.startOffset>0&&f.startOffset<g.data.length))}},o=function(b){b.on("click",function(c){var d=f(b,c.target);d&&a.metaKeyPressed(c)&&(c.preventDefault(),k(b,d))}),b.on("keydown",function(a){var c=g(b);c&&13===a.keyCode&&j(a)&&(a.preventDefault(),k(b,c))})},p=function(a){return function(){var b=this;a.on("nodechange",function(c){b.active(!a.readonly&&!!d.getAnchorElement(a,c.element))})}},q=function(a){return function(){var b=this,c=function(a){d.hasLinks(a.parents)?b.show():b.hide()};d.hasLinks(a.dom.getParents(a.selection.getStart()))||b.hide(),a.on("nodechange",c),b.on("remove",function(){a.off("nodechange",c)})}};return{openDialog:l,gotoSelectedLink:m,leftClickedOnAHref:n,setupGotoLinks:o,toggleActiveState:p,toggleViewLinkState:q}}),g("2",["3"],function(a){var b=function(b){b.addCommand("mceLink",a.openDialog(b))};return{register:b}}),g("4",["3"],function(a){var b=function(b){b.addShortcut("Meta+K","",a.openDialog(b))};return{setup:b}}),g("5",["3","a"],function(a,b){var c=function(c){c.addButton("link",{active:!1,icon:"link",tooltip:"Insert/edit link",onclick:a.openDialog(c),onpostrender:a.toggleActiveState(c)}),c.addButton("unlink",{active:!1,icon:"unlink",tooltip:"Remove link",onclick:b.unlink(c),onpostrender:a.toggleActiveState(c)}),c.addContextToolbar&&c.addButton("openlink",{icon:"newtab",tooltip:"Open link",onclick:a.gotoSelectedLink(c)})},d=function(b){b.addMenuItem("openlink",{text:"Open link",icon:"newtab",onclick:a.gotoSelectedLink(b),onPostRender:a.toggleViewLinkState(b),prependToContext:!0}),b.addMenuItem("link",{icon:"link",text:"Link",shortcut:"Meta+K",onclick:a.openDialog(b),stateSelector:"a[href]",context:"insert",prependToContext:!0})},e=function(b){b.addContextToolbar&&b.addContextToolbar(a.leftClickedOnAHref(b),"openlink | link unlink")};return{setupButtons:c,setupMenuItems:d,setupContextToolbars:e}}),g("0",["1","2","3","4","5"],function(a,b,c,d,e){return a.add("link",function(a){e.setupButtons(a),e.setupMenuItems(a),e.setupContextToolbars(a),c.setupGotoLinks(a),b.register(a),d.setup(a)}),function(){}}),d("0")()}();
1
+ !function(){"use strict";var t=tinymce.util.Tools.resolve("tinymce.PluginManager"),n=tinymce.util.Tools.resolve("tinymce.util.VK"),e=function(t){return t.target_list},o=function(t){return t.rel_list},i=function(t){return t.link_class_list},p=function(t){return"boolean"==typeof t.link_assume_external_targets&&t.link_assume_external_targets},a=function(t){return"boolean"==typeof t.link_context_toolbar&&t.link_context_toolbar},r=function(t){return t.link_list},k=function(t){return"string"==typeof t.default_link_target},y=function(t){return t.default_link_target},b=e,_=function(t,e){t.settings.target_list=e},w=function(t){return!1!==e(t)},T=o,C=function(t){return o(t)!==undefined},M=i,O=function(t){return i(t)!==undefined},R=function(t){return!1!==t.link_title},N=function(t){return"boolean"==typeof t.allow_unsafe_link_target&&t.allow_unsafe_link_target},l=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),u=tinymce.util.Tools.resolve("tinymce.Env"),c=function(t){if(!u.ie||10<u.ie){var e=document.createElement("a");e.target="_blank",e.href=t,e.rel="noreferrer noopener";var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),r=e,a=n,document.body.appendChild(r),r.dispatchEvent(a),document.body.removeChild(r)}else{var o=window.open("","_blank");if(o){o.opener=null;var i=o.document;i.open(),i.write('<meta http-equiv="refresh" content="0; url='+l.DOM.encode(t)+'">'),i.close()}}var r,a},A=tinymce.util.Tools.resolve("tinymce.util.Tools"),s=function(t,e){var n,o,i=["noopener"],r=t?t.split(/\s+/):[],a=function(t){return t.filter(function(t){return-1===A.inArray(i,t)})};return(r=e?(n=a(n=r)).length?n.concat(i):i:a(r)).length?(o=r,A.trim(o.sort().join(" "))):null},f=function(t,e){return e=e||t.selection.getNode(),m(e)?t.dom.select("a[href]",e)[0]:t.dom.getParent(e,"a[href]")},d=function(t){return t&&"A"===t.nodeName&&t.href},m=function(t){return t&&"FIGURE"===t.nodeName&&/\bimage\b/i.test(t.className)},v=function(t,e){var n,o;(o=t.dom.select("img",e)[0])&&(n=t.dom.getParents(o,"a[href]",e)[0])&&(n.parentNode.insertBefore(o,n),t.dom.remove(n))},g=function(t,e,n){var o,i;(i=t.dom.select("img",e)[0])&&(o=t.dom.create("a",n),i.parentNode.insertBefore(o,i),o.appendChild(i))},L=function(i,r){return function(o){i.undoManager.transact(function(){var t=i.selection.getNode(),e=f(i,t),n={href:o.href,target:o.target?o.target:null,rel:o.rel?o.rel:null,"class":o["class"]?o["class"]:null,title:o.title?o.title:null};C(i.settings)||!1!==N(i.settings)||(n.rel=s(n.rel,"_blank"===n.target)),o.href===r.href&&(r.attach(),r={}),e?(i.focus(),o.hasOwnProperty("text")&&("innerText"in e?e.innerText=o.text:e.textContent=o.text),i.dom.setAttribs(e,n),i.selection.select(e),i.undoManager.add()):m(t)?g(i,t,n):o.hasOwnProperty("text")?i.insertContent(i.dom.createHTML("a",n,i.dom.encode(o.text))):i.execCommand("mceInsertLink",!1,n)})}},P=function(e){return function(){e.undoManager.transact(function(){var t=e.selection.getNode();m(t)?v(e,t):e.execCommand("unlink")})}},h=d,x=function(t){return 0<A.grep(t,d).length},E=function(t){return!(/</.test(t)&&(!/^<a [^>]+>[^<]+<\/a>$/.test(t)||-1===t.indexOf("href=")))},S=f,I=function(t,e){var n=e?e.innerText||e.textContent:t.getContent({format:"text"});return n.replace(/\uFEFF/g,"")},K=s,U=tinymce.util.Tools.resolve("tinymce.util.Delay"),D=tinymce.util.Tools.resolve("tinymce.util.XHR"),B={},F=function(t,o,e){var i=function(t,n){return n=n||[],A.each(t,function(t){var e={text:t.text||t.title};t.menu?e.menu=i(t.menu):(e.value=t.value,o&&o(e)),n.push(e)}),n};return i(t,e||[])},q=function(e,t,n){var o=e.selection.getRng();U.setEditorTimeout(e,function(){e.windowManager.confirm(t,function(t){e.selection.setRng(o),n(t)})})},V=function(a,t){var e,l,o,u,n,i,r,c,s,f,d,m={},v=a.selection,g=a.dom,h=function(t){var e=o.find("#text");(!e.value()||t.lastControl&&e.value()===t.lastControl.text())&&e.value(t.control.text()),o.find("#href").value(t.control.value())},x=function(){l||!u||m.text||this.parent().parent().find("#text")[0].value(this.value())};u=E(v.getContent()),e=S(a),m.text=l=I(a.selection,e),m.href=e?g.getAttrib(e,"href"):"",e?m.target=g.getAttrib(e,"target"):k(a.settings)&&(m.target=y(a.settings)),(d=g.getAttrib(e,"rel"))&&(m.rel=d),(d=g.getAttrib(e,"class"))&&(m["class"]=d),(d=g.getAttrib(e,"title"))&&(m.title=d),u&&(n={name:"text",type:"textbox",size:40,label:"Text to display",onchange:function(){m.text=this.value()}}),t&&(i={type:"listbox",label:"Link list",values:F(t,function(t){t.value=a.convertURL(t.value||t.url,"href")},[{text:"None",value:""}]),onselect:h,value:a.convertURL(m.href,"href"),onPostRender:function(){i=this}}),w(a.settings)&&(b(a.settings)===undefined&&_(a,[{text:"None",value:""},{text:"New window",value:"_blank"}]),c={name:"target",type:"listbox",label:"Target",values:F(b(a.settings))}),C(a.settings)&&(r={name:"rel",type:"listbox",label:"Rel",values:F(T(a.settings),function(t){!1===N(a.settings)&&(t.value=K(t.value,"_blank"===m.target))})}),O(a.settings)&&(s={name:"class",type:"listbox",label:"Class",values:F(M(a.settings),function(t){t.value&&(t.textStyle=function(){return a.formatter.getCssText({inline:"a",classes:[t.value]})})})}),R(a.settings)&&(f={name:"title",type:"textbox",label:"Title",value:m.title}),o=a.windowManager.open({title:"Insert link",data:m,body:[{name:"href",type:"filepicker",filetype:"file",size:40,autofocus:!0,label:"Url",onchange:function(t){var e=t.meta||{};i&&i.value(a.convertURL(this.value(),"href")),A.each(t.meta,function(t,e){var n=o.find("#"+e);"text"===e?0===l.length&&(n.value(t),m.text=t):n.value(t)}),e.attach&&(B={href:this.value(),attach:e.attach}),e.text||x.call(this)},onkeyup:x,onpaste:x,onbeforecall:function(t){t.meta=o.toJSON()}},n,f,function(n){var o=[];if(A.each(a.dom.select("a:not([href])"),function(t){var e=t.name||t.id;e&&o.push({text:e,value:"#"+e,selected:-1!==n.indexOf("#"+e)})}),o.length)return o.unshift({text:"None",value:""}),{name:"anchor",type:"listbox",label:"Anchors",values:o,onselect:h}}(m.href),i,r,c,s],onSubmit:function(t){var e=p(a.settings),n=L(a,B),o=P(a),i=A.extend({},m,t.data),r=i.href;r?(u&&i.text!==l||delete i.text,0<r.indexOf("@")&&-1===r.indexOf("//")&&-1===r.indexOf("mailto:")?q(a,"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",function(t){t&&(i.href="mailto:"+r),n(i)}):!0===e&&!/^\w+:/i.test(r)||!1===e&&/^\s*www[\.|\d\.]/i.test(r)?q(a,"The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(t){t&&(i.href="http://"+r),n(i)}):n(i)):o()}})},z=function(t){var e,n,o;n=V,"string"==typeof(o=r((e=t).settings))?D.send({url:o,success:function(t){n(e,JSON.parse(t))}}):"function"==typeof o?o(function(t){n(e,t)}):n(e,o)},H=function(t,e){return t.dom.getParent(e,"a[href]")},J=function(t){return H(t,t.selection.getStart())},$=function(t,e){if(e){var n=(i=e).getAttribute("data-mce-href")||i.getAttribute("href");if(/^#/.test(n)){var o=t.$(n);o.length&&t.selection.scrollIntoView(o[0],!0)}else c(e.href)}var i},j=function(t){return function(){z(t)}},G=function(t){return function(){$(t,J(t))}},X=function(r){return function(t){var e,n,o,i;return!!(a(r.settings)&&(!(i=r.plugins.contextmenu)||!i.isContextMenuVisible())&&h(t)&&3===(o=(n=(e=r.selection).getRng()).startContainer).nodeType&&e.isCollapsed()&&0<n.startOffset&&n.startOffset<o.data.length)}},Q=function(o){o.on("click",function(t){var e=H(o,t.target);e&&n.metaKeyPressed(t)&&(t.preventDefault(),$(o,e))}),o.on("keydown",function(t){var e,n=J(o);n&&13===t.keyCode&&!0===(e=t).altKey&&!1===e.shiftKey&&!1===e.ctrlKey&&!1===e.metaKey&&(t.preventDefault(),$(o,n))})},W=function(n){return function(){var e=this;n.on("nodechange",function(t){e.active(!n.readonly&&!!S(n,t.element))})}},Y=function(n){return function(){var e=this,t=function(t){x(t.parents)?e.show():e.hide()};x(n.dom.getParents(n.selection.getStart()))||e.hide(),n.on("nodechange",t),e.on("remove",function(){n.off("nodechange",t)})}},Z=function(t){t.addCommand("mceLink",j(t))},tt=function(t){t.addShortcut("Meta+K","",j(t))},et=function(t){t.addButton("link",{active:!1,icon:"link",tooltip:"Insert/edit link",onclick:j(t),onpostrender:W(t)}),t.addButton("unlink",{active:!1,icon:"unlink",tooltip:"Remove link",onclick:P(t),onpostrender:W(t)}),t.addContextToolbar&&t.addButton("openlink",{icon:"newtab",tooltip:"Open link",onclick:G(t)})},nt=function(t){t.addMenuItem("openlink",{text:"Open link",icon:"newtab",onclick:G(t),onPostRender:Y(t),prependToContext:!0}),t.addMenuItem("link",{icon:"link",text:"Link",shortcut:"Meta+K",onclick:j(t),stateSelector:"a[href]",context:"insert",prependToContext:!0}),t.addMenuItem("unlink",{icon:"unlink",text:"Remove link",onclick:P(t),stateSelector:"a[href]"})},ot=function(t){t.addContextToolbar&&t.addContextToolbar(X(t),"openlink | link unlink")};t.add("link",function(t){et(t),nt(t),ot(t),Q(t),Z(t),tt(t)})}();
@@ -1,1985 +1,1115 @@
1
1
  (function () {
2
+ var lists = (function () {
3
+ 'use strict';
2
4
 
3
- var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)}
5
+ var global = tinymce.util.Tools.resolve('tinymce.PluginManager');
4
6
 
5
- // Used when there is no 'main' module.
6
- // The name is probably (hopefully) unique so minification removes for releases.
7
- var register_3795 = function (id) {
8
- var module = dem(id);
9
- var fragments = id.split('.');
10
- var target = Function('return this;')();
11
- for (var i = 0; i < fragments.length - 1; ++i) {
12
- if (target[fragments[i]] === undefined)
13
- target[fragments[i]] = {};
14
- target = target[fragments[i]];
15
- }
16
- target[fragments[fragments.length - 1]] = module;
17
- };
7
+ var global$1 = tinymce.util.Tools.resolve('tinymce.dom.RangeUtils');
18
8
 
19
- var instantiate = function (id) {
20
- var actual = defs[id];
21
- var dependencies = actual.deps;
22
- var definition = actual.defn;
23
- var len = dependencies.length;
24
- var instances = new Array(len);
25
- for (var i = 0; i < len; ++i)
26
- instances[i] = dem(dependencies[i]);
27
- var defResult = definition.apply(null, instances);
28
- if (defResult === undefined)
29
- throw 'module [' + id + '] returned undefined';
30
- actual.instance = defResult;
31
- };
9
+ var global$2 = tinymce.util.Tools.resolve('tinymce.dom.TreeWalker');
32
10
 
33
- var def = function (id, dependencies, definition) {
34
- if (typeof id !== 'string')
35
- throw 'module id must be a string';
36
- else if (dependencies === undefined)
37
- throw 'no dependencies for ' + id;
38
- else if (definition === undefined)
39
- throw 'no definition function for ' + id;
40
- defs[id] = {
41
- deps: dependencies,
42
- defn: definition,
43
- instance: undefined
44
- };
45
- };
11
+ var global$3 = tinymce.util.Tools.resolve('tinymce.util.VK');
46
12
 
47
- var dem = function (id) {
48
- var actual = defs[id];
49
- if (actual === undefined)
50
- throw 'module [' + id + '] was undefined';
51
- else if (actual.instance === undefined)
52
- instantiate(id);
53
- return actual.instance;
54
- };
13
+ var global$4 = tinymce.util.Tools.resolve('tinymce.dom.BookmarkManager');
55
14
 
56
- var req = function (ids, callback) {
57
- var len = ids.length;
58
- var instances = new Array(len);
59
- for (var i = 0; i < len; ++i)
60
- instances[i] = dem(ids[i]);
61
- callback.apply(null, instances);
62
- };
15
+ var global$5 = tinymce.util.Tools.resolve('tinymce.util.Tools');
63
16
 
64
- var ephox = {};
17
+ var global$6 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
65
18
 
66
- ephox.bolt = {
67
- module: {
68
- api: {
69
- define: def,
70
- require: req,
71
- demand: dem
19
+ var isTextNode = function (node) {
20
+ return node && node.nodeType === 3;
21
+ };
22
+ var isListNode = function (node) {
23
+ return node && /^(OL|UL|DL)$/.test(node.nodeName);
24
+ };
25
+ var isListItemNode = function (node) {
26
+ return node && /^(LI|DT|DD)$/.test(node.nodeName);
27
+ };
28
+ var isTableCellNode = function (node) {
29
+ return node && /^(TH|TD)$/.test(node.nodeName);
30
+ };
31
+ var isBr = function (node) {
32
+ return node && node.nodeName === 'BR';
33
+ };
34
+ var isFirstChild = function (node) {
35
+ return node.parentNode.firstChild === node;
36
+ };
37
+ var isLastChild = function (node) {
38
+ return node.parentNode.lastChild === node;
39
+ };
40
+ var isTextBlock = function (editor, node) {
41
+ return node && !!editor.schema.getTextBlockElements()[node.nodeName];
42
+ };
43
+ var isBlock = function (node, blockElements) {
44
+ return node && node.nodeName in blockElements;
45
+ };
46
+ var isBogusBr = function (dom, node) {
47
+ if (!isBr(node)) {
48
+ return false;
72
49
  }
73
- }
74
- };
75
-
76
- var define = def;
77
- var require = req;
78
- var demand = dem;
79
- // this helps with minification when using a lot of global references
80
- var defineGlobal = function (id, ref) {
81
- define(id, [], function () { return ref; });
82
- };
83
- /*jsc
84
- ["tinymce.plugins.lists.Plugin","tinymce.core.PluginManager","tinymce.plugins.lists.api.Api","tinymce.plugins.lists.api.Commands","tinymce.plugins.lists.core.Keyboard","tinymce.plugins.lists.ui.Buttons","global!tinymce.util.Tools.resolve","tinymce.plugins.lists.core.Delete","tinymce.plugins.lists.actions.Indent","tinymce.plugins.lists.actions.Outdent","tinymce.plugins.lists.actions.ToggleList","tinymce.core.util.VK","tinymce.plugins.lists.api.Settings","tinymce.core.util.Tools","tinymce.plugins.lists.core.NodeType","tinymce.plugins.lists.core.Selection","tinymce.core.api.dom.RangeUtils","tinymce.core.dom.TreeWalker","tinymce.core.api.dom.BookmarkManager","tinymce.core.dom.DOMUtils","tinymce.plugins.lists.core.Bookmark","tinymce.plugins.lists.core.NormalizeLists","tinymce.core.dom.DomQuery","tinymce.plugins.lists.core.SplitList","tinymce.plugins.lists.core.TextBlock","tinymce.plugins.lists.core.Range","tinymce.core.Env"]
85
- jsc*/
86
- defineGlobal("global!tinymce.util.Tools.resolve", tinymce.util.Tools.resolve);
87
- /**
88
- * ResolveGlobal.js
89
- *
90
- * Released under LGPL License.
91
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
92
- *
93
- * License: http://www.tinymce.com/license
94
- * Contributing: http://www.tinymce.com/contributing
95
- */
96
-
97
- define(
98
- 'tinymce.core.PluginManager',
99
- [
100
- 'global!tinymce.util.Tools.resolve'
101
- ],
102
- function (resolve) {
103
- return resolve('tinymce.PluginManager');
104
- }
105
- );
106
-
107
- /**
108
- * ResolveGlobal.js
109
- *
110
- * Released under LGPL License.
111
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
112
- *
113
- * License: http://www.tinymce.com/license
114
- * Contributing: http://www.tinymce.com/contributing
115
- */
116
-
117
- define(
118
- 'tinymce.core.api.dom.RangeUtils',
119
- [
120
- 'global!tinymce.util.Tools.resolve'
121
- ],
122
- function (resolve) {
123
- return resolve('tinymce.dom.RangeUtils');
124
- }
125
- );
126
-
127
- /**
128
- * ResolveGlobal.js
129
- *
130
- * Released under LGPL License.
131
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
132
- *
133
- * License: http://www.tinymce.com/license
134
- * Contributing: http://www.tinymce.com/contributing
135
- */
136
-
137
- define(
138
- 'tinymce.core.dom.TreeWalker',
139
- [
140
- 'global!tinymce.util.Tools.resolve'
141
- ],
142
- function (resolve) {
143
- return resolve('tinymce.dom.TreeWalker');
144
- }
145
- );
146
-
147
- /**
148
- * ResolveGlobal.js
149
- *
150
- * Released under LGPL License.
151
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
152
- *
153
- * License: http://www.tinymce.com/license
154
- * Contributing: http://www.tinymce.com/contributing
155
- */
156
-
157
- define(
158
- 'tinymce.core.util.VK',
159
- [
160
- 'global!tinymce.util.Tools.resolve'
161
- ],
162
- function (resolve) {
163
- return resolve('tinymce.util.VK');
164
- }
165
- );
166
-
167
- /**
168
- * ResolveGlobal.js
169
- *
170
- * Released under LGPL License.
171
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
172
- *
173
- * License: http://www.tinymce.com/license
174
- * Contributing: http://www.tinymce.com/contributing
175
- */
176
-
177
- define(
178
- 'tinymce.core.api.dom.BookmarkManager',
179
- [
180
- 'global!tinymce.util.Tools.resolve'
181
- ],
182
- function (resolve) {
183
- return resolve('tinymce.dom.BookmarkManager');
184
- }
185
- );
186
-
187
- /**
188
- * ResolveGlobal.js
189
- *
190
- * Released under LGPL License.
191
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
192
- *
193
- * License: http://www.tinymce.com/license
194
- * Contributing: http://www.tinymce.com/contributing
195
- */
196
-
197
- define(
198
- 'tinymce.core.util.Tools',
199
- [
200
- 'global!tinymce.util.Tools.resolve'
201
- ],
202
- function (resolve) {
203
- return resolve('tinymce.util.Tools');
204
- }
205
- );
206
-
207
- /**
208
- * ResolveGlobal.js
209
- *
210
- * Released under LGPL License.
211
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
212
- *
213
- * License: http://www.tinymce.com/license
214
- * Contributing: http://www.tinymce.com/contributing
215
- */
216
-
217
- define(
218
- 'tinymce.core.dom.DOMUtils',
219
- [
220
- 'global!tinymce.util.Tools.resolve'
221
- ],
222
- function (resolve) {
223
- return resolve('tinymce.dom.DOMUtils');
224
- }
225
- );
226
-
227
- /**
228
- * NodeType.js
229
- *
230
- * Released under LGPL License.
231
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
232
- *
233
- * License: http://www.tinymce.com/license
234
- * Contributing: http://www.tinymce.com/contributing
235
- */
236
-
237
- define(
238
- 'tinymce.plugins.lists.core.NodeType',
239
- [
240
- ],
241
- function () {
242
- var isTextNode = function (node) {
243
- return node && node.nodeType === 3;
244
- };
245
-
246
- var isListNode = function (node) {
247
- return node && (/^(OL|UL|DL)$/).test(node.nodeName);
248
- };
249
-
250
- var isListItemNode = function (node) {
251
- return node && /^(LI|DT|DD)$/.test(node.nodeName);
252
- };
253
-
254
- var isTableCellNode = function (node) {
255
- return node && /^(TH|TD)$/.test(node.nodeName);
256
- };
257
-
258
- var isBr = function (node) {
259
- return node && node.nodeName === 'BR';
260
- };
261
-
262
- var isFirstChild = function (node) {
263
- return node.parentNode.firstChild === node;
264
- };
265
-
266
- var isLastChild = function (node) {
267
- return node.parentNode.lastChild === node;
268
- };
269
-
270
- var isTextBlock = function (editor, node) {
271
- return node && !!editor.schema.getTextBlockElements()[node.nodeName];
272
- };
273
-
274
- var isBlock = function (node, blockElements) {
275
- return node && node.nodeName in blockElements;
276
- };
277
-
278
- var isBogusBr = function (dom, node) {
279
- if (!isBr(node)) {
280
- return false;
281
- }
282
-
283
- if (dom.isBlock(node.nextSibling) && !isBr(node.previousSibling)) {
284
- return true;
285
- }
286
-
50
+ if (dom.isBlock(node.nextSibling) && !isBr(node.previousSibling)) {
51
+ return true;
52
+ }
53
+ return false;
54
+ };
55
+ var isEmpty = function (dom, elm, keepBookmarks) {
56
+ var empty = dom.isEmpty(elm);
57
+ if (keepBookmarks && dom.select('span[data-mce-type=bookmark]', elm).length > 0) {
287
58
  return false;
288
- };
289
-
290
- var isEmpty = function (dom, elm, keepBookmarks) {
291
- var empty = dom.isEmpty(elm);
292
-
293
- if (keepBookmarks && dom.select('span[data-mce-type=bookmark]', elm).length > 0) {
294
- return false;
295
- }
296
-
297
- return empty;
298
- };
299
-
300
- var isChildOfBody = function (dom, elm) {
301
- return dom.isChildOf(elm, dom.getRoot());
302
- };
303
-
304
- return {
305
- isTextNode: isTextNode,
306
- isListNode: isListNode,
307
- isListItemNode: isListItemNode,
308
- isTableCellNode: isTableCellNode,
309
- isBr: isBr,
310
- isFirstChild: isFirstChild,
311
- isLastChild: isLastChild,
312
- isTextBlock: isTextBlock,
313
- isBlock: isBlock,
314
- isBogusBr: isBogusBr,
315
- isEmpty: isEmpty,
316
- isChildOfBody: isChildOfBody
317
- };
318
- }
319
- );
320
-
321
-
322
- /**
323
- * Range.js
324
- *
325
- * Released under LGPL License.
326
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
327
- *
328
- * License: http://www.tinymce.com/license
329
- * Contributing: http://www.tinymce.com/contributing
330
- */
331
-
332
- define(
333
- 'tinymce.plugins.lists.core.Range',
334
- [
335
- 'tinymce.core.api.dom.RangeUtils',
336
- 'tinymce.plugins.lists.core.NodeType'
337
- ],
338
- function (RangeUtils, NodeType) {
339
- var getNormalizedEndPoint = function (container, offset) {
340
- var node = RangeUtils.getNode(container, offset);
341
-
342
- if (NodeType.isListItemNode(container) && NodeType.isTextNode(node)) {
343
- var textNodeOffset = offset >= container.childNodes.length ? node.data.length : 0;
344
- return { container: node, offset: textNodeOffset };
345
- }
346
-
347
- return { container: container, offset: offset };
348
- };
349
-
350
- var normalizeRange = function (rng) {
351
- var outRng = rng.cloneRange();
352
-
353
- var rangeStart = getNormalizedEndPoint(rng.startContainer, rng.startOffset);
354
- outRng.setStart(rangeStart.container, rangeStart.offset);
355
-
356
- var rangeEnd = getNormalizedEndPoint(rng.endContainer, rng.endOffset);
357
- outRng.setEnd(rangeEnd.container, rangeEnd.offset);
358
-
359
- return outRng;
360
- };
59
+ }
60
+ return empty;
61
+ };
62
+ var isChildOfBody = function (dom, elm) {
63
+ return dom.isChildOf(elm, dom.getRoot());
64
+ };
65
+ var $_74mztagkjm0ofzg7 = {
66
+ isTextNode: isTextNode,
67
+ isListNode: isListNode,
68
+ isListItemNode: isListItemNode,
69
+ isTableCellNode: isTableCellNode,
70
+ isBr: isBr,
71
+ isFirstChild: isFirstChild,
72
+ isLastChild: isLastChild,
73
+ isTextBlock: isTextBlock,
74
+ isBlock: isBlock,
75
+ isBogusBr: isBogusBr,
76
+ isEmpty: isEmpty,
77
+ isChildOfBody: isChildOfBody
78
+ };
361
79
 
80
+ var getNormalizedEndPoint = function (container, offset) {
81
+ var node = global$1.getNode(container, offset);
82
+ if ($_74mztagkjm0ofzg7.isListItemNode(container) && $_74mztagkjm0ofzg7.isTextNode(node)) {
83
+ var textNodeOffset = offset >= container.childNodes.length ? node.data.length : 0;
84
+ return {
85
+ container: node,
86
+ offset: textNodeOffset
87
+ };
88
+ }
362
89
  return {
363
- getNormalizedEndPoint: getNormalizedEndPoint,
364
- normalizeRange: normalizeRange
90
+ container: container,
91
+ offset: offset
365
92
  };
366
- }
367
- );
368
-
369
-
370
- /**
371
- * Bookmark.js
372
- *
373
- * Released under LGPL License.
374
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
375
- *
376
- * License: http://www.tinymce.com/license
377
- * Contributing: http://www.tinymce.com/contributing
378
- */
379
-
380
- define(
381
- 'tinymce.plugins.lists.core.Bookmark',
382
- [
383
- 'tinymce.core.dom.DOMUtils',
384
- 'tinymce.plugins.lists.core.NodeType',
385
- 'tinymce.plugins.lists.core.Range'
386
- ],
387
- function (DOMUtils, NodeType, Range) {
388
- var DOM = DOMUtils.DOM;
389
-
390
- /**
391
- * Returns a range bookmark. This will convert indexed bookmarks into temporary span elements with
392
- * index 0 so that they can be restored properly after the DOM has been modified. Text bookmarks will not have spans
393
- * added to them since they can be restored after a dom operation.
394
- *
395
- * So this: <p><b>|</b><b>|</b></p>
396
- * becomes: <p><b><span data-mce-type="bookmark">|</span></b><b data-mce-type="bookmark">|</span></b></p>
397
- *
398
- * @param {DOMRange} rng DOM Range to get bookmark on.
399
- * @return {Object} Bookmark object.
400
- */
401
- var createBookmark = function (rng) {
402
- var bookmark = {};
403
-
404
- var setupEndPoint = function (start) {
405
- var offsetNode, container, offset;
406
-
407
- container = rng[start ? 'startContainer' : 'endContainer'];
408
- offset = rng[start ? 'startOffset' : 'endOffset'];
409
-
410
- if (container.nodeType === 1) {
411
- offsetNode = DOM.create('span', { 'data-mce-type': 'bookmark' });
412
-
413
- if (container.hasChildNodes()) {
414
- offset = Math.min(offset, container.childNodes.length - 1);
93
+ };
94
+ var normalizeRange = function (rng) {
95
+ var outRng = rng.cloneRange();
96
+ var rangeStart = getNormalizedEndPoint(rng.startContainer, rng.startOffset);
97
+ outRng.setStart(rangeStart.container, rangeStart.offset);
98
+ var rangeEnd = getNormalizedEndPoint(rng.endContainer, rng.endOffset);
99
+ outRng.setEnd(rangeEnd.container, rangeEnd.offset);
100
+ return outRng;
101
+ };
102
+ var $_crui3egjjm0ofzg5 = {
103
+ getNormalizedEndPoint: getNormalizedEndPoint,
104
+ normalizeRange: normalizeRange
105
+ };
415
106
 
416
- if (start) {
417
- container.insertBefore(offsetNode, container.childNodes[offset]);
418
- } else {
419
- DOM.insertAfter(offsetNode, container.childNodes[offset]);
420
- }
107
+ var DOM = global$6.DOM;
108
+ var createBookmark = function (rng) {
109
+ var bookmark = {};
110
+ var setupEndPoint = function (start) {
111
+ var offsetNode, container, offset;
112
+ container = rng[start ? 'startContainer' : 'endContainer'];
113
+ offset = rng[start ? 'startOffset' : 'endOffset'];
114
+ if (container.nodeType === 1) {
115
+ offsetNode = DOM.create('span', { 'data-mce-type': 'bookmark' });
116
+ if (container.hasChildNodes()) {
117
+ offset = Math.min(offset, container.childNodes.length - 1);
118
+ if (start) {
119
+ container.insertBefore(offsetNode, container.childNodes[offset]);
421
120
  } else {
422
- container.appendChild(offsetNode);
121
+ DOM.insertAfter(offsetNode, container.childNodes[offset]);
423
122
  }
424
-
425
- container = offsetNode;
426
- offset = 0;
123
+ } else {
124
+ container.appendChild(offsetNode);
427
125
  }
428
-
429
- bookmark[start ? 'startContainer' : 'endContainer'] = container;
430
- bookmark[start ? 'startOffset' : 'endOffset'] = offset;
431
- };
432
-
433
- setupEndPoint(true);
434
-
435
- if (!rng.collapsed) {
436
- setupEndPoint();
126
+ container = offsetNode;
127
+ offset = 0;
437
128
  }
438
-
439
- return bookmark;
129
+ bookmark[start ? 'startContainer' : 'endContainer'] = container;
130
+ bookmark[start ? 'startOffset' : 'endOffset'] = offset;
440
131
  };
441
-
442
- var resolveBookmark = function (bookmark) {
443
- function restoreEndPoint(start) {
444
- var container, offset, node;
445
-
446
- var nodeIndex = function (container) {
447
- var node = container.parentNode.firstChild, idx = 0;
448
-
449
- while (node) {
450
- if (node === container) {
451
- return idx;
452
- }
453
-
454
- // Skip data-mce-type=bookmark nodes
455
- if (node.nodeType !== 1 || node.getAttribute('data-mce-type') !== 'bookmark') {
456
- idx++;
457
- }
458
-
459
- node = node.nextSibling;
132
+ setupEndPoint(true);
133
+ if (!rng.collapsed) {
134
+ setupEndPoint();
135
+ }
136
+ return bookmark;
137
+ };
138
+ var resolveBookmark = function (bookmark) {
139
+ function restoreEndPoint(start) {
140
+ var container, offset, node;
141
+ var nodeIndex = function (container) {
142
+ var node = container.parentNode.firstChild, idx = 0;
143
+ while (node) {
144
+ if (node === container) {
145
+ return idx;
460
146
  }
461
-
462
- return -1;
463
- };
464
-
465
- container = node = bookmark[start ? 'startContainer' : 'endContainer'];
466
- offset = bookmark[start ? 'startOffset' : 'endOffset'];
467
-
468
- if (!container) {
469
- return;
470
- }
471
-
472
- if (container.nodeType === 1) {
473
- offset = nodeIndex(container);
474
- container = container.parentNode;
475
- DOM.remove(node);
476
-
477
- if (!container.hasChildNodes() && DOM.isBlock(container)) {
478
- container.appendChild(DOM.create('br'));
147
+ if (node.nodeType !== 1 || node.getAttribute('data-mce-type') !== 'bookmark') {
148
+ idx++;
479
149
  }
150
+ node = node.nextSibling;
480
151
  }
481
-
482
- bookmark[start ? 'startContainer' : 'endContainer'] = container;
483
- bookmark[start ? 'startOffset' : 'endOffset'] = offset;
484
- }
485
-
486
- restoreEndPoint(true);
487
- restoreEndPoint();
488
-
489
- var rng = DOM.createRng();
490
-
491
- rng.setStart(bookmark.startContainer, bookmark.startOffset);
492
-
493
- if (bookmark.endContainer) {
494
- rng.setEnd(bookmark.endContainer, bookmark.endOffset);
152
+ return -1;
153
+ };
154
+ container = node = bookmark[start ? 'startContainer' : 'endContainer'];
155
+ offset = bookmark[start ? 'startOffset' : 'endOffset'];
156
+ if (!container) {
157
+ return;
495
158
  }
496
-
497
- return Range.normalizeRange(rng);
498
- };
499
-
500
- return {
501
- createBookmark: createBookmark,
502
- resolveBookmark: resolveBookmark
503
- };
504
- }
505
- );
506
-
507
-
508
- /**
509
- * NormalizeLists.js
510
- *
511
- * Released under LGPL License.
512
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
513
- *
514
- * License: http://www.tinymce.com/license
515
- * Contributing: http://www.tinymce.com/contributing
516
- */
517
-
518
- define(
519
- 'tinymce.plugins.lists.core.NormalizeLists',
520
- [
521
- 'tinymce.core.dom.DOMUtils',
522
- 'tinymce.core.util.Tools',
523
- 'tinymce.plugins.lists.core.NodeType'
524
- ],
525
- function (DOMUtils, Tools, NodeType) {
526
- var DOM = DOMUtils.DOM;
527
-
528
- var normalizeList = function (dom, ul) {
529
- var sibling, parentNode = ul.parentNode;
530
-
531
- // Move UL/OL to previous LI if it's the only child of a LI
532
- if (parentNode.nodeName === 'LI' && parentNode.firstChild === ul) {
533
- sibling = parentNode.previousSibling;
534
- if (sibling && sibling.nodeName === 'LI') {
535
- sibling.appendChild(ul);
536
-
537
- if (NodeType.isEmpty(dom, parentNode)) {
538
- DOM.remove(parentNode);
539
- }
540
- } else {
541
- DOM.setStyle(parentNode, 'listStyleType', 'none');
159
+ if (container.nodeType === 1) {
160
+ offset = nodeIndex(container);
161
+ container = container.parentNode;
162
+ DOM.remove(node);
163
+ if (!container.hasChildNodes() && DOM.isBlock(container)) {
164
+ container.appendChild(DOM.create('br'));
542
165
  }
543
166
  }
167
+ bookmark[start ? 'startContainer' : 'endContainer'] = container;
168
+ bookmark[start ? 'startOffset' : 'endOffset'] = offset;
169
+ }
170
+ restoreEndPoint(true);
171
+ restoreEndPoint();
172
+ var rng = DOM.createRng();
173
+ rng.setStart(bookmark.startContainer, bookmark.startOffset);
174
+ if (bookmark.endContainer) {
175
+ rng.setEnd(bookmark.endContainer, bookmark.endOffset);
176
+ }
177
+ return $_crui3egjjm0ofzg5.normalizeRange(rng);
178
+ };
179
+ var $_68j8lagijm0ofzg2 = {
180
+ createBookmark: createBookmark,
181
+ resolveBookmark: resolveBookmark
182
+ };
544
183
 
545
- // Append OL/UL to previous LI if it's in a parent OL/UL i.e. old HTML4
546
- if (NodeType.isListNode(parentNode)) {
547
- sibling = parentNode.previousSibling;
548
- if (sibling && sibling.nodeName === 'LI') {
549
- sibling.appendChild(ul);
184
+ var DOM$1 = global$6.DOM;
185
+ var normalizeList = function (dom, ul) {
186
+ var sibling;
187
+ var parentNode = ul.parentNode;
188
+ if (parentNode.nodeName === 'LI' && parentNode.firstChild === ul) {
189
+ sibling = parentNode.previousSibling;
190
+ if (sibling && sibling.nodeName === 'LI') {
191
+ sibling.appendChild(ul);
192
+ if ($_74mztagkjm0ofzg7.isEmpty(dom, parentNode)) {
193
+ DOM$1.remove(parentNode);
550
194
  }
551
- }
552
- };
553
-
554
- var normalizeLists = function (dom, element) {
555
- Tools.each(Tools.grep(dom.select('ol,ul', element)), function (ul) {
556
- normalizeList(dom, ul);
557
- });
558
- };
559
-
560
- return {
561
- normalizeList: normalizeList,
562
- normalizeLists: normalizeLists
563
- };
564
- }
565
- );
566
-
567
-
568
- /**
569
- * ResolveGlobal.js
570
- *
571
- * Released under LGPL License.
572
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
573
- *
574
- * License: http://www.tinymce.com/license
575
- * Contributing: http://www.tinymce.com/contributing
576
- */
577
-
578
- define(
579
- 'tinymce.core.dom.DomQuery',
580
- [
581
- 'global!tinymce.util.Tools.resolve'
582
- ],
583
- function (resolve) {
584
- return resolve('tinymce.dom.DomQuery');
585
- }
586
- );
587
-
588
- /**
589
- * Selection.js
590
- *
591
- * Released under LGPL License.
592
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
593
- *
594
- * License: http://www.tinymce.com/license
595
- * Contributing: http://www.tinymce.com/contributing
596
- */
597
-
598
- define(
599
- 'tinymce.plugins.lists.core.Selection',
600
- [
601
- 'tinymce.core.dom.DomQuery',
602
- 'tinymce.core.util.Tools',
603
- 'tinymce.plugins.lists.core.NodeType'
604
- ],
605
- function (DomQuery, Tools, NodeType) {
606
- var getParentList = function (editor) {
607
- var selectionStart = editor.selection.getStart(true);
608
-
609
- return editor.dom.getParent(selectionStart, 'OL,UL,DL', getClosestListRootElm(editor, selectionStart));
610
- };
611
-
612
- var isParentListSelected = function (parentList, selectedBlocks) {
613
- return parentList && selectedBlocks.length === 1 && selectedBlocks[0] === parentList;
614
- };
615
-
616
- var findSubLists = function (parentList) {
617
- return Tools.grep(parentList.querySelectorAll('ol,ul,dl'), function (elm) {
618
- return NodeType.isListNode(elm);
619
- });
620
- };
621
-
622
- var getSelectedSubLists = function (editor) {
623
- var parentList = getParentList(editor);
624
- var selectedBlocks = editor.selection.getSelectedBlocks();
625
-
626
- if (isParentListSelected(parentList, selectedBlocks)) {
627
- return findSubLists(parentList);
628
195
  } else {
629
- return Tools.grep(selectedBlocks, function (elm) {
630
- return NodeType.isListNode(elm) && parentList !== elm;
631
- });
196
+ DOM$1.setStyle(parentNode, 'listStyleType', 'none');
632
197
  }
633
- };
634
-
635
- var findParentListItemsNodes = function (editor, elms) {
636
- var listItemsElms = Tools.map(elms, function (elm) {
637
- var parentLi = editor.dom.getParent(elm, 'li,dd,dt', getClosestListRootElm(editor, elm));
638
-
639
- return parentLi ? parentLi : elm;
640
- });
198
+ }
199
+ if ($_74mztagkjm0ofzg7.isListNode(parentNode)) {
200
+ sibling = parentNode.previousSibling;
201
+ if (sibling && sibling.nodeName === 'LI') {
202
+ sibling.appendChild(ul);
203
+ }
204
+ }
205
+ };
206
+ var normalizeLists = function (dom, element) {
207
+ global$5.each(global$5.grep(dom.select('ol,ul', element)), function (ul) {
208
+ normalizeList(dom, ul);
209
+ });
210
+ };
211
+ var $_er8krqgljm0ofzga = {
212
+ normalizeList: normalizeList,
213
+ normalizeLists: normalizeLists
214
+ };
641
215
 
642
- return DomQuery.unique(listItemsElms);
643
- };
216
+ var global$7 = tinymce.util.Tools.resolve('tinymce.dom.DomQuery');
644
217
 
645
- var getSelectedListItems = function (editor) {
646
- var selectedBlocks = editor.selection.getSelectedBlocks();
647
- return Tools.grep(findParentListItemsNodes(editor, selectedBlocks), function (block) {
648
- return NodeType.isListItemNode(block);
218
+ var getParentList = function (editor) {
219
+ var selectionStart = editor.selection.getStart(true);
220
+ return editor.dom.getParent(selectionStart, 'OL,UL,DL', getClosestListRootElm(editor, selectionStart));
221
+ };
222
+ var isParentListSelected = function (parentList, selectedBlocks) {
223
+ return parentList && selectedBlocks.length === 1 && selectedBlocks[0] === parentList;
224
+ };
225
+ var findSubLists = function (parentList) {
226
+ return global$5.grep(parentList.querySelectorAll('ol,ul,dl'), function (elm) {
227
+ return $_74mztagkjm0ofzg7.isListNode(elm);
228
+ });
229
+ };
230
+ var getSelectedSubLists = function (editor) {
231
+ var parentList = getParentList(editor);
232
+ var selectedBlocks = editor.selection.getSelectedBlocks();
233
+ if (isParentListSelected(parentList, selectedBlocks)) {
234
+ return findSubLists(parentList);
235
+ } else {
236
+ return global$5.grep(selectedBlocks, function (elm) {
237
+ return $_74mztagkjm0ofzg7.isListNode(elm) && parentList !== elm;
649
238
  });
650
- };
651
-
652
- var getClosestListRootElm = function (editor, elm) {
653
- var parentTableCell = editor.dom.getParents(elm, 'TD,TH');
654
- var root = parentTableCell.length > 0 ? parentTableCell[0] : editor.getBody();
655
-
656
- return root;
657
- };
658
-
659
- return {
660
- getParentList: getParentList,
661
- getSelectedSubLists: getSelectedSubLists,
662
- getSelectedListItems: getSelectedListItems,
663
- getClosestListRootElm: getClosestListRootElm
664
- };
665
- }
666
- );
667
-
668
-
669
- /**
670
- * ResolveGlobal.js
671
- *
672
- * Released under LGPL License.
673
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
674
- *
675
- * License: http://www.tinymce.com/license
676
- * Contributing: http://www.tinymce.com/contributing
677
- */
678
-
679
- define(
680
- 'tinymce.core.Env',
681
- [
682
- 'global!tinymce.util.Tools.resolve'
683
- ],
684
- function (resolve) {
685
- return resolve('tinymce.Env');
686
- }
687
- );
688
-
689
- /**
690
- * TextBlock.js
691
- *
692
- * Released under LGPL License.
693
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
694
- *
695
- * License: http://www.tinymce.com/license
696
- * Contributing: http://www.tinymce.com/contributing
697
- */
698
-
699
- define(
700
- 'tinymce.plugins.lists.core.TextBlock',
701
- [
702
- 'tinymce.core.dom.DOMUtils',
703
- 'tinymce.core.Env',
704
- 'tinymce.plugins.lists.core.NodeType'
705
- ],
706
- function (DOMUtils, Env, NodeType) {
707
- var DOM = DOMUtils.DOM;
239
+ }
240
+ };
241
+ var findParentListItemsNodes = function (editor, elms) {
242
+ var listItemsElms = global$5.map(elms, function (elm) {
243
+ var parentLi = editor.dom.getParent(elm, 'li,dd,dt', getClosestListRootElm(editor, elm));
244
+ return parentLi ? parentLi : elm;
245
+ });
246
+ return global$7.unique(listItemsElms);
247
+ };
248
+ var getSelectedListItems = function (editor) {
249
+ var selectedBlocks = editor.selection.getSelectedBlocks();
250
+ return global$5.grep(findParentListItemsNodes(editor, selectedBlocks), function (block) {
251
+ return $_74mztagkjm0ofzg7.isListItemNode(block);
252
+ });
253
+ };
254
+ var getClosestListRootElm = function (editor, elm) {
255
+ var parentTableCell = editor.dom.getParents(elm, 'TD,TH');
256
+ var root = parentTableCell.length > 0 ? parentTableCell[0] : editor.getBody();
257
+ return root;
258
+ };
259
+ var $_3e5hb9gmjm0ofzgc = {
260
+ getParentList: getParentList,
261
+ getSelectedSubLists: getSelectedSubLists,
262
+ getSelectedListItems: getSelectedListItems,
263
+ getClosestListRootElm: getClosestListRootElm
264
+ };
708
265
 
709
- var createNewTextBlock = function (editor, contentNode, blockName) {
710
- var node, textBlock, fragment = DOM.createFragment(), hasContentNode;
711
- var blockElements = editor.schema.getBlockElements();
266
+ var global$8 = tinymce.util.Tools.resolve('tinymce.Env');
712
267
 
713
- if (editor.settings.forced_root_block) {
714
- blockName = blockName || editor.settings.forced_root_block;
268
+ var DOM$2 = global$6.DOM;
269
+ var createNewTextBlock = function (editor, contentNode, blockName) {
270
+ var node, textBlock;
271
+ var fragment = DOM$2.createFragment();
272
+ var hasContentNode;
273
+ var blockElements = editor.schema.getBlockElements();
274
+ if (editor.settings.forced_root_block) {
275
+ blockName = blockName || editor.settings.forced_root_block;
276
+ }
277
+ if (blockName) {
278
+ textBlock = DOM$2.create(blockName);
279
+ if (textBlock.tagName === editor.settings.forced_root_block) {
280
+ DOM$2.setAttribs(textBlock, editor.settings.forced_root_block_attrs);
715
281
  }
716
-
717
- if (blockName) {
718
- textBlock = DOM.create(blockName);
719
-
720
- if (textBlock.tagName === editor.settings.forced_root_block) {
721
- DOM.setAttribs(textBlock, editor.settings.forced_root_block_attrs);
722
- }
723
-
724
- if (!NodeType.isBlock(contentNode.firstChild, blockElements)) {
725
- fragment.appendChild(textBlock);
726
- }
282
+ if (!$_74mztagkjm0ofzg7.isBlock(contentNode.firstChild, blockElements)) {
283
+ fragment.appendChild(textBlock);
727
284
  }
728
-
729
- if (contentNode) {
730
- while ((node = contentNode.firstChild)) {
731
- var nodeName = node.nodeName;
732
-
733
- if (!hasContentNode && (nodeName !== 'SPAN' || node.getAttribute('data-mce-type') !== 'bookmark')) {
734
- hasContentNode = true;
735
- }
736
-
737
- if (NodeType.isBlock(node, blockElements)) {
738
- fragment.appendChild(node);
739
- textBlock = null;
740
- } else {
741
- if (blockName) {
742
- if (!textBlock) {
743
- textBlock = DOM.create(blockName);
744
- fragment.appendChild(textBlock);
745
- }
746
-
747
- textBlock.appendChild(node);
748
- } else {
749
- fragment.appendChild(node);
285
+ }
286
+ if (contentNode) {
287
+ while (node = contentNode.firstChild) {
288
+ var nodeName = node.nodeName;
289
+ if (!hasContentNode && (nodeName !== 'SPAN' || node.getAttribute('data-mce-type') !== 'bookmark')) {
290
+ hasContentNode = true;
291
+ }
292
+ if ($_74mztagkjm0ofzg7.isBlock(node, blockElements)) {
293
+ fragment.appendChild(node);
294
+ textBlock = null;
295
+ } else {
296
+ if (blockName) {
297
+ if (!textBlock) {
298
+ textBlock = DOM$2.create(blockName);
299
+ fragment.appendChild(textBlock);
750
300
  }
301
+ textBlock.appendChild(node);
302
+ } else {
303
+ fragment.appendChild(node);
751
304
  }
752
305
  }
753
306
  }
754
-
755
- if (!editor.settings.forced_root_block) {
756
- fragment.appendChild(DOM.create('br'));
757
- } else {
758
- // BR is needed in empty blocks on non IE browsers
759
- if (!hasContentNode && (!Env.ie || Env.ie > 10)) {
760
- textBlock.appendChild(DOM.create('br', { 'data-mce-bogus': '1' }));
761
- }
307
+ }
308
+ if (!editor.settings.forced_root_block) {
309
+ fragment.appendChild(DOM$2.create('br'));
310
+ } else {
311
+ if (!hasContentNode && (!global$8.ie || global$8.ie > 10)) {
312
+ textBlock.appendChild(DOM$2.create('br', { 'data-mce-bogus': '1' }));
313
+ }
314
+ }
315
+ return fragment;
316
+ };
317
+ var $_gboej7gpjm0ofzgh = { createNewTextBlock: createNewTextBlock };
318
+
319
+ var DOM$3 = global$6.DOM;
320
+ var splitList = function (editor, ul, li, newBlock) {
321
+ var tmpRng, fragment, bookmarks, node;
322
+ var removeAndKeepBookmarks = function (targetNode) {
323
+ global$5.each(bookmarks, function (node) {
324
+ targetNode.parentNode.insertBefore(node, li.parentNode);
325
+ });
326
+ DOM$3.remove(targetNode);
327
+ };
328
+ bookmarks = DOM$3.select('span[data-mce-type="bookmark"]', ul);
329
+ newBlock = newBlock || $_gboej7gpjm0ofzgh.createNewTextBlock(editor, li);
330
+ tmpRng = DOM$3.createRng();
331
+ tmpRng.setStartAfter(li);
332
+ tmpRng.setEndAfter(ul);
333
+ fragment = tmpRng.extractContents();
334
+ for (node = fragment.firstChild; node; node = node.firstChild) {
335
+ if (node.nodeName === 'LI' && editor.dom.isEmpty(node)) {
336
+ DOM$3.remove(node);
337
+ break;
762
338
  }
339
+ }
340
+ if (!editor.dom.isEmpty(fragment)) {
341
+ DOM$3.insertAfter(fragment, ul);
342
+ }
343
+ DOM$3.insertAfter(newBlock, ul);
344
+ if ($_74mztagkjm0ofzg7.isEmpty(editor.dom, li.parentNode)) {
345
+ removeAndKeepBookmarks(li.parentNode);
346
+ }
347
+ DOM$3.remove(li);
348
+ if ($_74mztagkjm0ofzg7.isEmpty(editor.dom, ul)) {
349
+ DOM$3.remove(ul);
350
+ }
351
+ };
352
+ var $_f3a77tgojm0ofzgf = { splitList: splitList };
763
353
 
764
- return fragment;
765
- };
766
-
767
- return {
768
- createNewTextBlock: createNewTextBlock
769
- };
770
- }
771
- );
772
-
773
- /**
774
- * SplitList.js
775
- *
776
- * Released under LGPL License.
777
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
778
- *
779
- * License: http://www.tinymce.com/license
780
- * Contributing: http://www.tinymce.com/contributing
781
- */
782
-
783
- define(
784
- 'tinymce.plugins.lists.core.SplitList',
785
- [
786
- 'tinymce.core.dom.DOMUtils',
787
- 'tinymce.plugins.lists.core.NodeType',
788
- 'tinymce.plugins.lists.core.TextBlock',
789
- 'tinymce.core.util.Tools'
790
- ],
791
- function (DOMUtils, NodeType, TextBlock, Tools) {
792
- var DOM = DOMUtils.DOM;
793
-
794
- var splitList = function (editor, ul, li, newBlock) {
795
- var tmpRng, fragment, bookmarks, node;
796
-
797
- var removeAndKeepBookmarks = function (targetNode) {
798
- Tools.each(bookmarks, function (node) {
799
- targetNode.parentNode.insertBefore(node, li.parentNode);
800
- });
801
-
802
- DOM.remove(targetNode);
803
- };
804
-
805
- bookmarks = DOM.select('span[data-mce-type="bookmark"]', ul);
806
- newBlock = newBlock || TextBlock.createNewTextBlock(editor, li);
807
- tmpRng = DOM.createRng();
808
- tmpRng.setStartAfter(li);
809
- tmpRng.setEndAfter(ul);
810
- fragment = tmpRng.extractContents();
811
-
812
- for (node = fragment.firstChild; node; node = node.firstChild) {
813
- if (node.nodeName === 'LI' && editor.dom.isEmpty(node)) {
814
- DOM.remove(node);
815
- break;
816
- }
817
- }
818
-
819
- if (!editor.dom.isEmpty(fragment)) {
820
- DOM.insertAfter(fragment, ul);
821
- }
822
-
823
- DOM.insertAfter(newBlock, ul);
824
-
825
- if (NodeType.isEmpty(editor.dom, li.parentNode)) {
826
- removeAndKeepBookmarks(li.parentNode);
827
- }
828
-
829
- DOM.remove(li);
830
-
831
- if (NodeType.isEmpty(editor.dom, ul)) {
832
- DOM.remove(ul);
833
- }
834
- };
835
-
836
- return {
837
- splitList: splitList
838
- };
839
- }
840
- );
841
-
842
-
843
- /**
844
- * Outdent.js
845
- *
846
- * Released under LGPL License.
847
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
848
- *
849
- * License: http://www.tinymce.com/license
850
- * Contributing: http://www.tinymce.com/contributing
851
- */
852
-
853
- define(
854
- 'tinymce.plugins.lists.actions.Outdent',
855
- [
856
- 'tinymce.core.dom.DOMUtils',
857
- 'tinymce.plugins.lists.core.Bookmark',
858
- 'tinymce.plugins.lists.core.NodeType',
859
- 'tinymce.plugins.lists.core.NormalizeLists',
860
- 'tinymce.plugins.lists.core.Selection',
861
- 'tinymce.plugins.lists.core.SplitList',
862
- 'tinymce.plugins.lists.core.TextBlock'
863
- ],
864
- function (DOMUtils, Bookmark, NodeType, NormalizeLists, Selection, SplitList, TextBlock) {
865
- var DOM = DOMUtils.DOM;
866
-
867
- var removeEmptyLi = function (dom, li) {
868
- if (NodeType.isEmpty(dom, li)) {
869
- DOM.remove(li);
870
- }
871
- };
872
-
873
- var outdent = function (editor, li) {
874
- var ul = li.parentNode, ulParent = ul.parentNode, newBlock;
875
-
876
- if (ul === editor.getBody()) {
877
- return true;
878
- }
879
-
880
- if (li.nodeName === 'DD') {
881
- DOM.rename(li, 'DT');
882
- return true;
354
+ var DOM$4 = global$6.DOM;
355
+ var removeEmptyLi = function (dom, li) {
356
+ if ($_74mztagkjm0ofzg7.isEmpty(dom, li)) {
357
+ DOM$4.remove(li);
358
+ }
359
+ };
360
+ var outdent = function (editor, li) {
361
+ var ul = li.parentNode;
362
+ var ulParent, newBlock;
363
+ if (ul) {
364
+ ulParent = ul.parentNode;
365
+ } else {
366
+ removeEmptyLi(editor.dom, li);
367
+ return true;
368
+ }
369
+ if (ul === editor.getBody()) {
370
+ return true;
371
+ }
372
+ if (li.nodeName === 'DD') {
373
+ DOM$4.rename(li, 'DT');
374
+ return true;
375
+ }
376
+ if ($_74mztagkjm0ofzg7.isFirstChild(li) && $_74mztagkjm0ofzg7.isLastChild(li)) {
377
+ if (ulParent.nodeName === 'LI') {
378
+ DOM$4.insertAfter(li, ulParent);
379
+ removeEmptyLi(editor.dom, ulParent);
380
+ DOM$4.remove(ul);
381
+ } else if ($_74mztagkjm0ofzg7.isListNode(ulParent)) {
382
+ DOM$4.remove(ul, true);
383
+ } else {
384
+ ulParent.insertBefore($_gboej7gpjm0ofzgh.createNewTextBlock(editor, li), ul);
385
+ DOM$4.remove(ul);
883
386
  }
884
-
885
- if (NodeType.isFirstChild(li) && NodeType.isLastChild(li)) {
886
- if (ulParent.nodeName === "LI") {
887
- DOM.insertAfter(li, ulParent);
888
- removeEmptyLi(editor.dom, ulParent);
889
- DOM.remove(ul);
890
- } else if (NodeType.isListNode(ulParent)) {
891
- DOM.remove(ul, true);
892
- } else {
893
- ulParent.insertBefore(TextBlock.createNewTextBlock(editor, li), ul);
894
- DOM.remove(ul);
895
- }
896
-
897
- return true;
898
- } else if (NodeType.isFirstChild(li)) {
899
- if (ulParent.nodeName === "LI") {
900
- DOM.insertAfter(li, ulParent);
901
- li.appendChild(ul);
902
- removeEmptyLi(editor.dom, ulParent);
903
- } else if (NodeType.isListNode(ulParent)) {
904
- ulParent.insertBefore(li, ul);
905
- } else {
906
- ulParent.insertBefore(TextBlock.createNewTextBlock(editor, li), ul);
907
- DOM.remove(li);
908
- }
909
-
910
- return true;
911
- } else if (NodeType.isLastChild(li)) {
912
- if (ulParent.nodeName === "LI") {
913
- DOM.insertAfter(li, ulParent);
914
- } else if (NodeType.isListNode(ulParent)) {
915
- DOM.insertAfter(li, ul);
916
- } else {
917
- DOM.insertAfter(TextBlock.createNewTextBlock(editor, li), ul);
918
- DOM.remove(li);
919
- }
920
-
921
- return true;
387
+ return true;
388
+ } else if ($_74mztagkjm0ofzg7.isFirstChild(li)) {
389
+ if (ulParent.nodeName === 'LI') {
390
+ DOM$4.insertAfter(li, ulParent);
391
+ li.appendChild(ul);
392
+ removeEmptyLi(editor.dom, ulParent);
393
+ } else if ($_74mztagkjm0ofzg7.isListNode(ulParent)) {
394
+ ulParent.insertBefore(li, ul);
395
+ } else {
396
+ ulParent.insertBefore($_gboej7gpjm0ofzgh.createNewTextBlock(editor, li), ul);
397
+ DOM$4.remove(li);
922
398
  }
923
-
399
+ return true;
400
+ } else if ($_74mztagkjm0ofzg7.isLastChild(li)) {
924
401
  if (ulParent.nodeName === 'LI') {
925
- ul = ulParent;
926
- newBlock = TextBlock.createNewTextBlock(editor, li, 'LI');
927
- } else if (NodeType.isListNode(ulParent)) {
928
- newBlock = TextBlock.createNewTextBlock(editor, li, 'LI');
402
+ DOM$4.insertAfter(li, ulParent);
403
+ } else if ($_74mztagkjm0ofzg7.isListNode(ulParent)) {
404
+ DOM$4.insertAfter(li, ul);
929
405
  } else {
930
- newBlock = TextBlock.createNewTextBlock(editor, li);
406
+ DOM$4.insertAfter($_gboej7gpjm0ofzgh.createNewTextBlock(editor, li), ul);
407
+ DOM$4.remove(li);
931
408
  }
932
-
933
- SplitList.splitList(editor, ul, li, newBlock);
934
- NormalizeLists.normalizeLists(editor.dom, ul.parentNode);
935
-
936
409
  return true;
937
- };
938
-
939
- var outdentSelection = function (editor) {
940
- var listElements = Selection.getSelectedListItems(editor);
941
-
942
- if (listElements.length) {
943
- var bookmark = Bookmark.createBookmark(editor.selection.getRng(true));
944
- var i, y;
945
- var root = Selection.getClosestListRootElm(editor, editor.selection.getStart(true));
946
-
947
- i = listElements.length;
948
- while (i--) {
949
- var node = listElements[i].parentNode;
950
-
951
- while (node && node !== root) {
952
- y = listElements.length;
953
- while (y--) {
954
- if (listElements[y] === node) {
955
- listElements.splice(i, 1);
956
- break;
957
- }
410
+ }
411
+ if (ulParent.nodeName === 'LI') {
412
+ ul = ulParent;
413
+ newBlock = $_gboej7gpjm0ofzgh.createNewTextBlock(editor, li, 'LI');
414
+ } else if ($_74mztagkjm0ofzg7.isListNode(ulParent)) {
415
+ newBlock = $_gboej7gpjm0ofzgh.createNewTextBlock(editor, li, 'LI');
416
+ } else {
417
+ newBlock = $_gboej7gpjm0ofzgh.createNewTextBlock(editor, li);
418
+ }
419
+ $_f3a77tgojm0ofzgf.splitList(editor, ul, li, newBlock);
420
+ $_er8krqgljm0ofzga.normalizeLists(editor.dom, ul.parentNode);
421
+ return true;
422
+ };
423
+ var outdentSelection = function (editor) {
424
+ var listElements = $_3e5hb9gmjm0ofzgc.getSelectedListItems(editor);
425
+ if (listElements.length) {
426
+ var bookmark = $_68j8lagijm0ofzg2.createBookmark(editor.selection.getRng());
427
+ var i = void 0, y = void 0;
428
+ var root = $_3e5hb9gmjm0ofzgc.getClosestListRootElm(editor, editor.selection.getStart(true));
429
+ i = listElements.length;
430
+ while (i--) {
431
+ var node = listElements[i].parentNode;
432
+ while (node && node !== root) {
433
+ y = listElements.length;
434
+ while (y--) {
435
+ if (listElements[y] === node) {
436
+ listElements.splice(i, 1);
437
+ break;
958
438
  }
959
-
960
- node = node.parentNode;
961
- }
962
- }
963
-
964
- for (i = 0; i < listElements.length; i++) {
965
- if (!outdent(editor, listElements[i]) && i === 0) {
966
- break;
967
439
  }
440
+ node = node.parentNode;
968
441
  }
969
-
970
- editor.selection.setRng(Bookmark.resolveBookmark(bookmark));
971
- editor.nodeChanged();
972
-
973
- return true;
974
- }
975
- };
976
-
977
- return {
978
- outdent: outdent,
979
- outdentSelection: outdentSelection
980
- };
981
- }
982
- );
983
-
984
-
985
- /**
986
- * ToggleList.js
987
- *
988
- * Released under LGPL License.
989
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
990
- *
991
- * License: http://www.tinymce.com/license
992
- * Contributing: http://www.tinymce.com/contributing
993
- */
994
-
995
- define(
996
- 'tinymce.plugins.lists.actions.ToggleList',
997
- [
998
- 'tinymce.core.api.dom.BookmarkManager',
999
- 'tinymce.core.util.Tools',
1000
- 'tinymce.plugins.lists.actions.Outdent',
1001
- 'tinymce.plugins.lists.core.Bookmark',
1002
- 'tinymce.plugins.lists.core.NodeType',
1003
- 'tinymce.plugins.lists.core.NormalizeLists',
1004
- 'tinymce.plugins.lists.core.Selection',
1005
- 'tinymce.plugins.lists.core.SplitList'
1006
- ],
1007
- function (BookmarkManager, Tools, Outdent, Bookmark, NodeType, NormalizeLists, Selection, SplitList) {
1008
- var updateListStyle = function (dom, el, detail) {
1009
- var type = detail['list-style-type'] ? detail['list-style-type'] : null;
1010
- dom.setStyle(el, 'list-style-type', type);
1011
- };
1012
-
1013
- var setAttribs = function (elm, attrs) {
1014
- Tools.each(attrs, function (value, key) {
1015
- elm.setAttribute(key, value);
1016
- });
1017
- };
1018
-
1019
- var updateListAttrs = function (dom, el, detail) {
1020
- setAttribs(el, detail['list-attributes']);
1021
- Tools.each(dom.select('li', el), function (li) {
1022
- setAttribs(li, detail['list-item-attributes']);
1023
- });
1024
- };
1025
-
1026
- var updateListWithDetails = function (dom, el, detail) {
1027
- updateListStyle(dom, el, detail);
1028
- updateListAttrs(dom, el, detail);
1029
- };
1030
-
1031
- var getEndPointNode = function (editor, rng, start, root) {
1032
- var container, offset;
1033
-
1034
- container = rng[start ? 'startContainer' : 'endContainer'];
1035
- offset = rng[start ? 'startOffset' : 'endOffset'];
1036
-
1037
- // Resolve node index
1038
- if (container.nodeType === 1) {
1039
- container = container.childNodes[Math.min(offset, container.childNodes.length - 1)] || container;
1040
- }
1041
-
1042
- if (!start && NodeType.isBr(container.nextSibling)) {
1043
- container = container.nextSibling;
1044
- }
1045
-
1046
- while (container.parentNode !== root) {
1047
- if (NodeType.isTextBlock(editor, container)) {
1048
- return container;
1049
- }
1050
-
1051
- if (/^(TD|TH)$/.test(container.parentNode.nodeName)) {
1052
- return container;
1053
- }
1054
-
1055
- container = container.parentNode;
1056
442
  }
1057
-
1058
- return container;
1059
- };
1060
-
1061
- var getSelectedTextBlocks = function (editor, rng, root) {
1062
- var textBlocks = [], dom = editor.dom;
1063
-
1064
- var startNode = getEndPointNode(editor, rng, true, root);
1065
- var endNode = getEndPointNode(editor, rng, false, root);
1066
- var block, siblings = [];
1067
-
1068
- for (var node = startNode; node; node = node.nextSibling) {
1069
- siblings.push(node);
1070
-
1071
- if (node === endNode) {
443
+ for (i = 0; i < listElements.length; i++) {
444
+ if (!outdent(editor, listElements[i]) && i === 0) {
1072
445
  break;
1073
446
  }
1074
447
  }
448
+ editor.selection.setRng($_68j8lagijm0ofzg2.resolveBookmark(bookmark));
449
+ editor.nodeChanged();
450
+ return true;
451
+ }
452
+ };
453
+ var $_40lbtggjm0ofzfy = {
454
+ outdent: outdent,
455
+ outdentSelection: outdentSelection
456
+ };
1075
457
 
1076
- Tools.each(siblings, function (node) {
1077
- if (NodeType.isTextBlock(editor, node)) {
1078
- textBlocks.push(node);
1079
- block = null;
1080
- return;
1081
- }
1082
-
1083
- if (dom.isBlock(node) || NodeType.isBr(node)) {
1084
- if (NodeType.isBr(node)) {
1085
- dom.remove(node);
1086
- }
1087
-
1088
- block = null;
1089
- return;
1090
- }
1091
-
1092
- var nextSibling = node.nextSibling;
1093
- if (BookmarkManager.isBookmarkNode(node)) {
1094
- if (NodeType.isTextBlock(editor, nextSibling) || (!nextSibling && node.parentNode === root)) {
1095
- block = null;
1096
- return;
1097
- }
1098
- }
1099
-
1100
- if (!block) {
1101
- block = dom.create('p');
1102
- node.parentNode.insertBefore(block, node);
1103
- textBlocks.push(block);
1104
- }
1105
-
1106
- block.appendChild(node);
1107
- });
1108
-
1109
- return textBlocks;
1110
- };
1111
-
1112
- var hasCompatibleStyle = function (dom, sib, detail) {
1113
- var sibStyle = dom.getStyle(sib, 'list-style-type');
1114
- var detailStyle = detail ? detail['list-style-type'] : '';
1115
-
1116
- detailStyle = detailStyle === null ? '' : detailStyle;
1117
-
1118
- return sibStyle === detailStyle;
1119
- };
1120
-
1121
- var applyList = function (editor, listName, detail) {
1122
- var rng = editor.selection.getRng(true), bookmark, listItemName = 'LI';
1123
- var root = Selection.getClosestListRootElm(editor, editor.selection.getStart(true));
1124
- var dom = editor.dom;
1125
-
1126
- detail = detail ? detail : {};
1127
-
1128
- if (dom.getContentEditable(editor.selection.getNode()) === "false") {
1129
- return;
1130
- }
1131
-
1132
- listName = listName.toUpperCase();
1133
-
1134
- if (listName === 'DL') {
1135
- listItemName = 'DT';
1136
- }
1137
-
1138
- bookmark = Bookmark.createBookmark(rng);
1139
-
1140
- Tools.each(getSelectedTextBlocks(editor, rng, root), function (block) {
1141
- var listBlock, sibling;
1142
-
1143
- sibling = block.previousSibling;
1144
- if (sibling && NodeType.isListNode(sibling) && sibling.nodeName === listName && hasCompatibleStyle(dom, sibling, detail)) {
1145
- listBlock = sibling;
1146
- block = dom.rename(block, listItemName);
1147
- sibling.appendChild(block);
1148
- } else {
1149
- listBlock = dom.create(listName);
1150
- block.parentNode.insertBefore(listBlock, block);
1151
- listBlock.appendChild(block);
1152
- block = dom.rename(block, listItemName);
1153
- }
1154
-
1155
- updateListWithDetails(dom, listBlock, detail);
1156
- mergeWithAdjacentLists(editor.dom, listBlock);
1157
- });
1158
-
1159
- editor.selection.setRng(Bookmark.resolveBookmark(bookmark));
1160
- };
1161
-
1162
- var removeList = function (editor) {
1163
- var bookmark = Bookmark.createBookmark(editor.selection.getRng(true));
1164
- var root = Selection.getClosestListRootElm(editor, editor.selection.getStart(true));
1165
- var listItems = Selection.getSelectedListItems(editor);
1166
- var emptyListItems = Tools.grep(listItems, function (li) {
1167
- return editor.dom.isEmpty(li);
1168
- });
1169
-
1170
- listItems = Tools.grep(listItems, function (li) {
1171
- return !editor.dom.isEmpty(li);
1172
- });
1173
-
1174
- Tools.each(emptyListItems, function (li) {
1175
- if (NodeType.isEmpty(editor.dom, li)) {
1176
- Outdent.outdent(editor, li);
1177
- return;
1178
- }
1179
- });
1180
-
1181
- Tools.each(listItems, function (li) {
1182
- var node, rootList;
1183
-
1184
- if (li.parentNode === editor.getBody()) {
1185
- return;
1186
- }
1187
-
1188
- for (node = li; node && node !== root; node = node.parentNode) {
1189
- if (NodeType.isListNode(node)) {
1190
- rootList = node;
1191
- }
1192
- }
1193
-
1194
- SplitList.splitList(editor, rootList, li);
1195
- NormalizeLists.normalizeLists(editor.dom, rootList.parentNode);
1196
- });
1197
-
1198
- editor.selection.setRng(Bookmark.resolveBookmark(bookmark));
1199
- };
1200
-
1201
- var isValidLists = function (list1, list2) {
1202
- return list1 && list2 && NodeType.isListNode(list1) && list1.nodeName === list2.nodeName;
1203
- };
1204
-
1205
- var hasSameListStyle = function (dom, list1, list2) {
1206
- var targetStyle = dom.getStyle(list1, 'list-style-type', true);
1207
- var style = dom.getStyle(list2, 'list-style-type', true);
1208
- return targetStyle === style;
1209
- };
1210
-
1211
- var hasSameClasses = function (elm1, elm2) {
1212
- return elm1.className === elm2.className;
1213
- };
1214
-
1215
- var shouldMerge = function (dom, list1, list2) {
1216
- return isValidLists(list1, list2) && hasSameListStyle(dom, list1, list2) && hasSameClasses(list1, list2);
1217
- };
1218
-
1219
- var mergeWithAdjacentLists = function (dom, listBlock) {
1220
- var sibling, node;
1221
-
1222
- sibling = listBlock.nextSibling;
1223
- if (shouldMerge(dom, listBlock, sibling)) {
1224
- while ((node = sibling.firstChild)) {
1225
- listBlock.appendChild(node);
1226
- }
1227
-
1228
- dom.remove(sibling);
1229
- }
1230
-
1231
- sibling = listBlock.previousSibling;
1232
- if (shouldMerge(dom, listBlock, sibling)) {
1233
- while ((node = sibling.lastChild)) {
1234
- listBlock.insertBefore(node, listBlock.firstChild);
1235
- }
1236
-
1237
- dom.remove(sibling);
458
+ var updateListStyle = function (dom, el, detail) {
459
+ var type = detail['list-style-type'] ? detail['list-style-type'] : null;
460
+ dom.setStyle(el, 'list-style-type', type);
461
+ };
462
+ var setAttribs = function (elm, attrs) {
463
+ global$5.each(attrs, function (value, key) {
464
+ elm.setAttribute(key, value);
465
+ });
466
+ };
467
+ var updateListAttrs = function (dom, el, detail) {
468
+ setAttribs(el, detail['list-attributes']);
469
+ global$5.each(dom.select('li', el), function (li) {
470
+ setAttribs(li, detail['list-item-attributes']);
471
+ });
472
+ };
473
+ var updateListWithDetails = function (dom, el, detail) {
474
+ updateListStyle(dom, el, detail);
475
+ updateListAttrs(dom, el, detail);
476
+ };
477
+ var removeStyles = function (dom, element, styles) {
478
+ global$5.each(styles, function (style) {
479
+ var _a;
480
+ return dom.setStyle(element, (_a = {}, _a[style] = '', _a));
481
+ });
482
+ };
483
+ var getEndPointNode = function (editor, rng, start, root) {
484
+ var container, offset;
485
+ container = rng[start ? 'startContainer' : 'endContainer'];
486
+ offset = rng[start ? 'startOffset' : 'endOffset'];
487
+ if (container.nodeType === 1) {
488
+ container = container.childNodes[Math.min(offset, container.childNodes.length - 1)] || container;
489
+ }
490
+ if (!start && $_74mztagkjm0ofzg7.isBr(container.nextSibling)) {
491
+ container = container.nextSibling;
492
+ }
493
+ while (container.parentNode !== root) {
494
+ if ($_74mztagkjm0ofzg7.isTextBlock(editor, container)) {
495
+ return container;
1238
496
  }
1239
- };
1240
-
1241
- var updateList = function (dom, list, listName, detail) {
1242
- if (list.nodeName !== listName) {
1243
- var newList = dom.rename(list, listName);
1244
- updateListWithDetails(dom, newList, detail);
1245
- } else {
1246
- updateListWithDetails(dom, list, detail);
497
+ if (/^(TD|TH)$/.test(container.parentNode.nodeName)) {
498
+ return container;
1247
499
  }
1248
- };
1249
-
1250
- var toggleMultipleLists = function (editor, parentList, lists, listName, detail) {
1251
- if (parentList.nodeName === listName && !hasListStyleDetail(detail)) {
1252
- removeList(editor, listName);
1253
- } else {
1254
- var bookmark = Bookmark.createBookmark(editor.selection.getRng(true));
1255
-
1256
- Tools.each([parentList].concat(lists), function (elm) {
1257
- updateList(editor.dom, elm, listName, detail);
1258
- });
1259
-
1260
- editor.selection.setRng(Bookmark.resolveBookmark(bookmark));
500
+ container = container.parentNode;
501
+ }
502
+ return container;
503
+ };
504
+ var getSelectedTextBlocks = function (editor, rng, root) {
505
+ var textBlocks = [], dom = editor.dom;
506
+ var startNode = getEndPointNode(editor, rng, true, root);
507
+ var endNode = getEndPointNode(editor, rng, false, root);
508
+ var block;
509
+ var siblings = [];
510
+ for (var node = startNode; node; node = node.nextSibling) {
511
+ siblings.push(node);
512
+ if (node === endNode) {
513
+ break;
1261
514
  }
1262
- };
1263
-
1264
- var hasListStyleDetail = function (detail) {
1265
- return 'list-style-type' in detail;
1266
- };
1267
-
1268
- var toggleSingleList = function (editor, parentList, listName, detail) {
1269
- if (parentList === editor.getBody()) {
515
+ }
516
+ global$5.each(siblings, function (node) {
517
+ if ($_74mztagkjm0ofzg7.isTextBlock(editor, node)) {
518
+ textBlocks.push(node);
519
+ block = null;
1270
520
  return;
1271
521
  }
1272
-
1273
- if (parentList) {
1274
- if (parentList.nodeName === listName && !hasListStyleDetail(detail)) {
1275
- removeList(editor, listName);
1276
- } else {
1277
- var bookmark = Bookmark.createBookmark(editor.selection.getRng(true));
1278
- updateListWithDetails(editor.dom, parentList, detail);
1279
- mergeWithAdjacentLists(editor.dom, editor.dom.rename(parentList, listName));
1280
- editor.selection.setRng(Bookmark.resolveBookmark(bookmark));
1281
- }
1282
- } else {
1283
- applyList(editor, listName, detail);
1284
- }
1285
- };
1286
-
1287
- var toggleList = function (editor, listName, detail) {
1288
- var parentList = Selection.getParentList(editor);
1289
- var selectedSubLists = Selection.getSelectedSubLists(editor);
1290
-
1291
- detail = detail ? detail : {};
1292
-
1293
- if (parentList && selectedSubLists.length > 0) {
1294
- toggleMultipleLists(editor, parentList, selectedSubLists, listName, detail);
1295
- } else {
1296
- toggleSingleList(editor, parentList, listName, detail);
1297
- }
1298
- };
1299
-
1300
- return {
1301
- toggleList: toggleList,
1302
- removeList: removeList,
1303
- mergeWithAdjacentLists: mergeWithAdjacentLists
1304
- };
1305
- }
1306
- );
1307
-
1308
-
1309
- /**
1310
- * Delete.js
1311
- *
1312
- * Released under LGPL License.
1313
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1314
- *
1315
- * License: http://www.tinymce.com/license
1316
- * Contributing: http://www.tinymce.com/contributing
1317
- */
1318
-
1319
- define(
1320
- 'tinymce.plugins.lists.core.Delete',
1321
- [
1322
- 'tinymce.core.api.dom.RangeUtils',
1323
- 'tinymce.core.dom.TreeWalker',
1324
- 'tinymce.core.util.VK',
1325
- 'tinymce.plugins.lists.actions.ToggleList',
1326
- 'tinymce.plugins.lists.core.Bookmark',
1327
- 'tinymce.plugins.lists.core.NodeType',
1328
- 'tinymce.plugins.lists.core.NormalizeLists',
1329
- 'tinymce.plugins.lists.core.Range',
1330
- 'tinymce.plugins.lists.core.Selection'
1331
- ],
1332
- function (RangeUtils, TreeWalker, VK, ToggleList, Bookmark, NodeType, NormalizeLists, Range, Selection) {
1333
- var findNextCaretContainer = function (editor, rng, isForward, root) {
1334
- var node = rng.startContainer, offset = rng.startOffset;
1335
- var nonEmptyBlocks, walker;
1336
-
1337
- if (node.nodeType === 3 && (isForward ? offset < node.data.length : offset > 0)) {
1338
- return node;
1339
- }
1340
-
1341
- nonEmptyBlocks = editor.schema.getNonEmptyElements();
1342
- if (node.nodeType === 1) {
1343
- node = RangeUtils.getNode(node, offset);
1344
- }
1345
-
1346
- walker = new TreeWalker(node, root);
1347
-
1348
- // Delete at <li>|<br></li> then jump over the bogus br
1349
- if (isForward) {
1350
- if (NodeType.isBogusBr(editor.dom, node)) {
1351
- walker.next();
1352
- }
1353
- }
1354
-
1355
- while ((node = walker[isForward ? 'next' : 'prev2']())) {
1356
- if (node.nodeName === 'LI' && !node.hasChildNodes()) {
1357
- return node;
1358
- }
1359
-
1360
- if (nonEmptyBlocks[node.nodeName]) {
1361
- return node;
522
+ if (dom.isBlock(node) || $_74mztagkjm0ofzg7.isBr(node)) {
523
+ if ($_74mztagkjm0ofzg7.isBr(node)) {
524
+ dom.remove(node);
1362
525
  }
1363
-
1364
- if (node.nodeType === 3 && node.data.length > 0) {
1365
- return node;
1366
- }
1367
- }
1368
- };
1369
-
1370
- var hasOnlyOneBlockChild = function (dom, elm) {
1371
- var childNodes = elm.childNodes;
1372
- return childNodes.length === 1 && !NodeType.isListNode(childNodes[0]) && dom.isBlock(childNodes[0]);
1373
- };
1374
-
1375
- var unwrapSingleBlockChild = function (dom, elm) {
1376
- if (hasOnlyOneBlockChild(dom, elm)) {
1377
- dom.remove(elm.firstChild, true);
1378
- }
1379
- };
1380
-
1381
- var moveChildren = function (dom, fromElm, toElm) {
1382
- var node, targetElm;
1383
-
1384
- targetElm = hasOnlyOneBlockChild(dom, toElm) ? toElm.firstChild : toElm;
1385
- unwrapSingleBlockChild(dom, fromElm);
1386
-
1387
- if (!NodeType.isEmpty(dom, fromElm, true)) {
1388
- while ((node = fromElm.firstChild)) {
1389
- targetElm.appendChild(node);
1390
- }
1391
- }
1392
- };
1393
-
1394
- var mergeLiElements = function (dom, fromElm, toElm) {
1395
- var node, listNode, ul = fromElm.parentNode;
1396
-
1397
- if (!NodeType.isChildOfBody(dom, fromElm) || !NodeType.isChildOfBody(dom, toElm)) {
526
+ block = null;
1398
527
  return;
1399
528
  }
1400
-
1401
- if (NodeType.isListNode(toElm.lastChild)) {
1402
- listNode = toElm.lastChild;
1403
- }
1404
-
1405
- if (ul === toElm.lastChild) {
1406
- if (NodeType.isBr(ul.previousSibling)) {
1407
- dom.remove(ul.previousSibling);
529
+ var nextSibling = node.nextSibling;
530
+ if (global$4.isBookmarkNode(node)) {
531
+ if ($_74mztagkjm0ofzg7.isTextBlock(editor, nextSibling) || !nextSibling && node.parentNode === root) {
532
+ block = null;
533
+ return;
1408
534
  }
1409
535
  }
1410
-
1411
- node = toElm.lastChild;
1412
- if (node && NodeType.isBr(node) && fromElm.hasChildNodes()) {
1413
- dom.remove(node);
1414
- }
1415
-
1416
- if (NodeType.isEmpty(dom, toElm, true)) {
1417
- dom.$(toElm).empty();
1418
- }
1419
-
1420
- moveChildren(dom, fromElm, toElm);
1421
-
1422
- if (listNode) {
1423
- toElm.appendChild(listNode);
536
+ if (!block) {
537
+ block = dom.create('p');
538
+ node.parentNode.insertBefore(block, node);
539
+ textBlocks.push(block);
1424
540
  }
1425
-
1426
- dom.remove(fromElm);
1427
-
1428
- if (NodeType.isEmpty(dom, ul) && ul !== dom.getRoot()) {
1429
- dom.remove(ul);
1430
- }
1431
- };
1432
-
1433
- var mergeIntoEmptyLi = function (editor, fromLi, toLi) {
1434
- editor.dom.$(toLi).empty();
1435
- mergeLiElements(editor.dom, fromLi, toLi);
1436
- editor.selection.setCursorLocation(toLi);
1437
- };
1438
-
1439
- var mergeForward = function (editor, rng, fromLi, toLi) {
1440
- var dom = editor.dom;
1441
-
1442
- if (dom.isEmpty(toLi)) {
1443
- mergeIntoEmptyLi(editor, fromLi, toLi);
541
+ block.appendChild(node);
542
+ });
543
+ return textBlocks;
544
+ };
545
+ var hasCompatibleStyle = function (dom, sib, detail) {
546
+ var sibStyle = dom.getStyle(sib, 'list-style-type');
547
+ var detailStyle = detail ? detail['list-style-type'] : '';
548
+ detailStyle = detailStyle === null ? '' : detailStyle;
549
+ return sibStyle === detailStyle;
550
+ };
551
+ var applyList = function (editor, listName, detail) {
552
+ if (detail === void 0) {
553
+ detail = {};
554
+ }
555
+ var rng = editor.selection.getRng(true);
556
+ var bookmark;
557
+ var listItemName = 'LI';
558
+ var root = $_3e5hb9gmjm0ofzgc.getClosestListRootElm(editor, editor.selection.getStart(true));
559
+ var dom = editor.dom;
560
+ if (dom.getContentEditable(editor.selection.getNode()) === 'false') {
561
+ return;
562
+ }
563
+ listName = listName.toUpperCase();
564
+ if (listName === 'DL') {
565
+ listItemName = 'DT';
566
+ }
567
+ bookmark = $_68j8lagijm0ofzg2.createBookmark(rng);
568
+ global$5.each(getSelectedTextBlocks(editor, rng, root), function (block) {
569
+ var listBlock, sibling;
570
+ sibling = block.previousSibling;
571
+ if (sibling && $_74mztagkjm0ofzg7.isListNode(sibling) && sibling.nodeName === listName && hasCompatibleStyle(dom, sibling, detail)) {
572
+ listBlock = sibling;
573
+ block = dom.rename(block, listItemName);
574
+ sibling.appendChild(block);
1444
575
  } else {
1445
- var bookmark = Bookmark.createBookmark(rng);
1446
- mergeLiElements(dom, fromLi, toLi);
1447
- editor.selection.setRng(Bookmark.resolveBookmark(bookmark));
1448
- }
1449
- };
1450
-
1451
- var mergeBackward = function (editor, rng, fromLi, toLi) {
1452
- var bookmark = Bookmark.createBookmark(rng);
1453
- mergeLiElements(editor.dom, fromLi, toLi);
1454
- var resolvedBookmark = Bookmark.resolveBookmark(bookmark);
1455
- editor.selection.setRng(resolvedBookmark);
1456
- };
1457
-
1458
- var backspaceDeleteFromListToListCaret = function (editor, isForward) {
1459
- var dom = editor.dom, selection = editor.selection;
1460
- var selectionStartElm = selection.getStart();
1461
- var root = Selection.getClosestListRootElm(editor, selectionStartElm);
1462
- var li = dom.getParent(selection.getStart(), 'LI', root);
1463
- var ul, rng, otherLi;
1464
-
1465
- if (li) {
1466
- ul = li.parentNode;
1467
- if (ul === editor.getBody() && NodeType.isEmpty(dom, ul)) {
1468
- return true;
1469
- }
1470
-
1471
- rng = Range.normalizeRange(selection.getRng(true));
1472
- otherLi = dom.getParent(findNextCaretContainer(editor, rng, isForward, root), 'LI', root);
1473
-
1474
- if (otherLi && otherLi !== li) {
1475
- if (isForward) {
1476
- mergeForward(editor, rng, otherLi, li);
1477
- } else {
1478
- mergeBackward(editor, rng, li, otherLi);
1479
- }
1480
-
1481
- return true;
1482
- } else if (!otherLi) {
1483
- if (!isForward && ToggleList.removeList(editor, ul.nodeName)) {
1484
- return true;
1485
- }
1486
- }
1487
- }
1488
-
1489
- return false;
1490
- };
1491
-
1492
- var removeBlock = function (dom, block, root) {
1493
- var parentBlock = dom.getParent(block.parentNode, dom.isBlock, root);
1494
-
1495
- dom.remove(block);
1496
- if (parentBlock && dom.isEmpty(parentBlock)) {
1497
- dom.remove(parentBlock);
1498
- }
1499
- };
1500
-
1501
- var backspaceDeleteIntoListCaret = function (editor, isForward) {
1502
- var dom = editor.dom;
1503
- var selectionStartElm = editor.selection.getStart();
1504
- var root = Selection.getClosestListRootElm(editor, selectionStartElm);
1505
- var block = dom.getParent(selectionStartElm, dom.isBlock, root);
1506
-
1507
- if (block && dom.isEmpty(block)) {
1508
- var rng = Range.normalizeRange(editor.selection.getRng(true));
1509
- var otherLi = dom.getParent(findNextCaretContainer(editor, rng, isForward, root), 'LI', root);
1510
-
1511
- if (otherLi) {
1512
- editor.undoManager.transact(function () {
1513
- removeBlock(dom, block, root);
1514
- ToggleList.mergeWithAdjacentLists(dom, otherLi.parentNode);
1515
- editor.selection.select(otherLi, true);
1516
- editor.selection.collapse(isForward);
1517
- });
1518
-
1519
- return true;
1520
- }
1521
- }
1522
-
1523
- return false;
1524
- };
1525
-
1526
- var backspaceDeleteCaret = function (editor, isForward) {
1527
- return backspaceDeleteFromListToListCaret(editor, isForward) || backspaceDeleteIntoListCaret(editor, isForward);
1528
- };
1529
-
1530
- var backspaceDeleteRange = function (editor) {
1531
- var selectionStartElm = editor.selection.getStart();
1532
- var root = Selection.getClosestListRootElm(editor, selectionStartElm);
1533
- var startListParent = editor.dom.getParent(selectionStartElm, 'LI,DT,DD', root);
1534
-
1535
- if (startListParent || Selection.getSelectedListItems(editor).length > 0) {
1536
- editor.undoManager.transact(function () {
1537
- editor.execCommand('Delete');
1538
- NormalizeLists.normalizeLists(editor.dom, editor.getBody());
1539
- });
1540
-
1541
- return true;
576
+ listBlock = dom.create(listName);
577
+ block.parentNode.insertBefore(listBlock, block);
578
+ listBlock.appendChild(block);
579
+ block = dom.rename(block, listItemName);
580
+ }
581
+ removeStyles(dom, block, [
582
+ 'margin',
583
+ 'margin-right',
584
+ 'margin-bottom',
585
+ 'margin-left',
586
+ 'margin-top',
587
+ 'padding',
588
+ 'padding-right',
589
+ 'padding-bottom',
590
+ 'padding-left',
591
+ 'padding-top'
592
+ ]);
593
+ updateListWithDetails(dom, listBlock, detail);
594
+ mergeWithAdjacentLists(editor.dom, listBlock);
595
+ });
596
+ editor.selection.setRng($_68j8lagijm0ofzg2.resolveBookmark(bookmark));
597
+ };
598
+ var removeList = function (editor) {
599
+ var bookmark = $_68j8lagijm0ofzg2.createBookmark(editor.selection.getRng(true));
600
+ var root = $_3e5hb9gmjm0ofzgc.getClosestListRootElm(editor, editor.selection.getStart(true));
601
+ var listItems = $_3e5hb9gmjm0ofzgc.getSelectedListItems(editor);
602
+ var emptyListItems = global$5.grep(listItems, function (li) {
603
+ return editor.dom.isEmpty(li);
604
+ });
605
+ listItems = global$5.grep(listItems, function (li) {
606
+ return !editor.dom.isEmpty(li);
607
+ });
608
+ global$5.each(emptyListItems, function (li) {
609
+ if ($_74mztagkjm0ofzg7.isEmpty(editor.dom, li)) {
610
+ $_40lbtggjm0ofzfy.outdent(editor, li);
611
+ return;
1542
612
  }
1543
-
1544
- return false;
1545
- };
1546
-
1547
- var backspaceDelete = function (editor, isForward) {
1548
- return editor.selection.isCollapsed() ? backspaceDeleteCaret(editor, isForward) : backspaceDeleteRange(editor);
1549
- };
1550
-
1551
- var setup = function (editor) {
1552
- editor.on('keydown', function (e) {
1553
- if (e.keyCode === VK.BACKSPACE) {
1554
- if (backspaceDelete(editor, false)) {
1555
- e.preventDefault();
1556
- }
1557
- } else if (e.keyCode === VK.DELETE) {
1558
- if (backspaceDelete(editor, true)) {
1559
- e.preventDefault();
1560
- }
613
+ });
614
+ global$5.each(listItems, function (li) {
615
+ var node, rootList;
616
+ if (li.parentNode === editor.getBody()) {
617
+ return;
618
+ }
619
+ for (node = li; node && node !== root; node = node.parentNode) {
620
+ if ($_74mztagkjm0ofzg7.isListNode(node)) {
621
+ rootList = node;
1561
622
  }
623
+ }
624
+ $_f3a77tgojm0ofzgf.splitList(editor, rootList, li);
625
+ $_er8krqgljm0ofzga.normalizeLists(editor.dom, rootList.parentNode);
626
+ });
627
+ editor.selection.setRng($_68j8lagijm0ofzg2.resolveBookmark(bookmark));
628
+ };
629
+ var isValidLists = function (list1, list2) {
630
+ return list1 && list2 && $_74mztagkjm0ofzg7.isListNode(list1) && list1.nodeName === list2.nodeName;
631
+ };
632
+ var hasSameListStyle = function (dom, list1, list2) {
633
+ var targetStyle = dom.getStyle(list1, 'list-style-type', true);
634
+ var style = dom.getStyle(list2, 'list-style-type', true);
635
+ return targetStyle === style;
636
+ };
637
+ var hasSameClasses = function (elm1, elm2) {
638
+ return elm1.className === elm2.className;
639
+ };
640
+ var shouldMerge = function (dom, list1, list2) {
641
+ return isValidLists(list1, list2) && hasSameListStyle(dom, list1, list2) && hasSameClasses(list1, list2);
642
+ };
643
+ var mergeWithAdjacentLists = function (dom, listBlock) {
644
+ var sibling, node;
645
+ sibling = listBlock.nextSibling;
646
+ if (shouldMerge(dom, listBlock, sibling)) {
647
+ while (node = sibling.firstChild) {
648
+ listBlock.appendChild(node);
649
+ }
650
+ dom.remove(sibling);
651
+ }
652
+ sibling = listBlock.previousSibling;
653
+ if (shouldMerge(dom, listBlock, sibling)) {
654
+ while (node = sibling.lastChild) {
655
+ listBlock.insertBefore(node, listBlock.firstChild);
656
+ }
657
+ dom.remove(sibling);
658
+ }
659
+ };
660
+ var updateList = function (dom, list, listName, detail) {
661
+ if (list.nodeName !== listName) {
662
+ var newList = dom.rename(list, listName);
663
+ updateListWithDetails(dom, newList, detail);
664
+ } else {
665
+ updateListWithDetails(dom, list, detail);
666
+ }
667
+ };
668
+ var toggleMultipleLists = function (editor, parentList, lists, listName, detail) {
669
+ if (parentList.nodeName === listName && !hasListStyleDetail(detail)) {
670
+ removeList(editor);
671
+ } else {
672
+ var bookmark = $_68j8lagijm0ofzg2.createBookmark(editor.selection.getRng(true));
673
+ global$5.each([parentList].concat(lists), function (elm) {
674
+ updateList(editor.dom, elm, listName, detail);
1562
675
  });
1563
- };
1564
-
1565
- return {
1566
- setup: setup,
1567
- backspaceDelete: backspaceDelete
1568
- };
1569
- }
1570
- );
1571
-
1572
-
1573
- /**
1574
- * Api.js
1575
- *
1576
- * Released under LGPL License.
1577
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1578
- *
1579
- * License: http://www.tinymce.com/license
1580
- * Contributing: http://www.tinymce.com/contributing
1581
- */
1582
-
1583
- define(
1584
- 'tinymce.plugins.lists.api.Api',
1585
- [
1586
- 'tinymce.plugins.lists.core.Delete'
1587
- ],
1588
- function (Delete) {
1589
- var get = function (editor) {
1590
- return {
1591
- backspaceDelete: function (isForward) {
1592
- Delete.backspaceDelete(editor, isForward);
1593
- }
1594
- };
1595
- };
1596
-
1597
- return {
1598
- get: get
1599
- };
1600
- }
1601
- );
1602
-
1603
-
1604
- /**
1605
- * Indent.js
1606
- *
1607
- * Released under LGPL License.
1608
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1609
- *
1610
- * License: http://www.tinymce.com/license
1611
- * Contributing: http://www.tinymce.com/contributing
1612
- */
1613
-
1614
- define(
1615
- 'tinymce.plugins.lists.actions.Indent',
1616
- [
1617
- 'tinymce.core.dom.DOMUtils',
1618
- 'tinymce.plugins.lists.core.Bookmark',
1619
- 'tinymce.plugins.lists.core.NodeType',
1620
- 'tinymce.plugins.lists.core.Selection'
1621
- ],
1622
- function (DOMUtils, Bookmark, NodeType, Selection) {
1623
- var DOM = DOMUtils.DOM;
1624
-
1625
- var mergeLists = function (from, to) {
1626
- var node;
1627
-
1628
- if (NodeType.isListNode(from)) {
1629
- while ((node = from.firstChild)) {
1630
- to.appendChild(node);
1631
- }
1632
-
1633
- DOM.remove(from);
676
+ editor.selection.setRng($_68j8lagijm0ofzg2.resolveBookmark(bookmark));
677
+ }
678
+ };
679
+ var hasListStyleDetail = function (detail) {
680
+ return 'list-style-type' in detail;
681
+ };
682
+ var toggleSingleList = function (editor, parentList, listName, detail) {
683
+ if (parentList === editor.getBody()) {
684
+ return;
685
+ }
686
+ if (parentList) {
687
+ if (parentList.nodeName === listName && !hasListStyleDetail(detail)) {
688
+ removeList(editor);
689
+ } else {
690
+ var bookmark = $_68j8lagijm0ofzg2.createBookmark(editor.selection.getRng(true));
691
+ updateListWithDetails(editor.dom, parentList, detail);
692
+ mergeWithAdjacentLists(editor.dom, editor.dom.rename(parentList, listName));
693
+ editor.selection.setRng($_68j8lagijm0ofzg2.resolveBookmark(bookmark));
1634
694
  }
1635
- };
1636
-
1637
- var indent = function (li) {
1638
- var sibling, newList, listStyle;
695
+ } else {
696
+ applyList(editor, listName, detail);
697
+ }
698
+ };
699
+ var toggleList = function (editor, listName, detail) {
700
+ var parentList = $_3e5hb9gmjm0ofzgc.getParentList(editor);
701
+ var selectedSubLists = $_3e5hb9gmjm0ofzgc.getSelectedSubLists(editor);
702
+ detail = detail ? detail : {};
703
+ if (parentList && selectedSubLists.length > 0) {
704
+ toggleMultipleLists(editor, parentList, selectedSubLists, listName, detail);
705
+ } else {
706
+ toggleSingleList(editor, parentList, listName, detail);
707
+ }
708
+ };
709
+ var $_9gjx41gdjm0ofzfr = {
710
+ toggleList: toggleList,
711
+ removeList: removeList,
712
+ mergeWithAdjacentLists: mergeWithAdjacentLists
713
+ };
1639
714
 
1640
- if (li.nodeName === 'DT') {
1641
- DOM.rename(li, 'DD');
1642
- return true;
715
+ var findNextCaretContainer = function (editor, rng, isForward, root) {
716
+ var node = rng.startContainer;
717
+ var offset = rng.startOffset;
718
+ var nonEmptyBlocks, walker;
719
+ if (node.nodeType === 3 && (isForward ? offset < node.data.length : offset > 0)) {
720
+ return node;
721
+ }
722
+ nonEmptyBlocks = editor.schema.getNonEmptyElements();
723
+ if (node.nodeType === 1) {
724
+ node = global$1.getNode(node, offset);
725
+ }
726
+ walker = new global$2(node, root);
727
+ if (isForward) {
728
+ if ($_74mztagkjm0ofzg7.isBogusBr(editor.dom, node)) {
729
+ walker.next();
1643
730
  }
1644
-
1645
- sibling = li.previousSibling;
1646
-
1647
- if (sibling && NodeType.isListNode(sibling)) {
1648
- sibling.appendChild(li);
1649
- return true;
731
+ }
732
+ while (node = walker[isForward ? 'next' : 'prev2']()) {
733
+ if (node.nodeName === 'LI' && !node.hasChildNodes()) {
734
+ return node;
1650
735
  }
1651
-
1652
- if (sibling && sibling.nodeName === 'LI' && NodeType.isListNode(sibling.lastChild)) {
1653
- sibling.lastChild.appendChild(li);
1654
- mergeLists(li.lastChild, sibling.lastChild);
1655
- return true;
736
+ if (nonEmptyBlocks[node.nodeName]) {
737
+ return node;
1656
738
  }
1657
-
1658
- sibling = li.nextSibling;
1659
-
1660
- if (sibling && NodeType.isListNode(sibling)) {
1661
- sibling.insertBefore(li, sibling.firstChild);
739
+ if (node.nodeType === 3 && node.data.length > 0) {
740
+ return node;
741
+ }
742
+ }
743
+ };
744
+ var hasOnlyOneBlockChild = function (dom, elm) {
745
+ var childNodes = elm.childNodes;
746
+ return childNodes.length === 1 && !$_74mztagkjm0ofzg7.isListNode(childNodes[0]) && dom.isBlock(childNodes[0]);
747
+ };
748
+ var unwrapSingleBlockChild = function (dom, elm) {
749
+ if (hasOnlyOneBlockChild(dom, elm)) {
750
+ dom.remove(elm.firstChild, true);
751
+ }
752
+ };
753
+ var moveChildren = function (dom, fromElm, toElm) {
754
+ var node, targetElm;
755
+ targetElm = hasOnlyOneBlockChild(dom, toElm) ? toElm.firstChild : toElm;
756
+ unwrapSingleBlockChild(dom, fromElm);
757
+ if (!$_74mztagkjm0ofzg7.isEmpty(dom, fromElm, true)) {
758
+ while (node = fromElm.firstChild) {
759
+ targetElm.appendChild(node);
760
+ }
761
+ }
762
+ };
763
+ var mergeLiElements = function (dom, fromElm, toElm) {
764
+ var node, listNode;
765
+ var ul = fromElm.parentNode;
766
+ if (!$_74mztagkjm0ofzg7.isChildOfBody(dom, fromElm) || !$_74mztagkjm0ofzg7.isChildOfBody(dom, toElm)) {
767
+ return;
768
+ }
769
+ if ($_74mztagkjm0ofzg7.isListNode(toElm.lastChild)) {
770
+ listNode = toElm.lastChild;
771
+ }
772
+ if (ul === toElm.lastChild) {
773
+ if ($_74mztagkjm0ofzg7.isBr(ul.previousSibling)) {
774
+ dom.remove(ul.previousSibling);
775
+ }
776
+ }
777
+ node = toElm.lastChild;
778
+ if (node && $_74mztagkjm0ofzg7.isBr(node) && fromElm.hasChildNodes()) {
779
+ dom.remove(node);
780
+ }
781
+ if ($_74mztagkjm0ofzg7.isEmpty(dom, toElm, true)) {
782
+ dom.$(toElm).empty();
783
+ }
784
+ moveChildren(dom, fromElm, toElm);
785
+ if (listNode) {
786
+ toElm.appendChild(listNode);
787
+ }
788
+ dom.remove(fromElm);
789
+ if ($_74mztagkjm0ofzg7.isEmpty(dom, ul) && ul !== dom.getRoot()) {
790
+ dom.remove(ul);
791
+ }
792
+ };
793
+ var mergeIntoEmptyLi = function (editor, fromLi, toLi) {
794
+ editor.dom.$(toLi).empty();
795
+ mergeLiElements(editor.dom, fromLi, toLi);
796
+ editor.selection.setCursorLocation(toLi);
797
+ };
798
+ var mergeForward = function (editor, rng, fromLi, toLi) {
799
+ var dom = editor.dom;
800
+ if (dom.isEmpty(toLi)) {
801
+ mergeIntoEmptyLi(editor, fromLi, toLi);
802
+ } else {
803
+ var bookmark = $_68j8lagijm0ofzg2.createBookmark(rng);
804
+ mergeLiElements(dom, fromLi, toLi);
805
+ editor.selection.setRng($_68j8lagijm0ofzg2.resolveBookmark(bookmark));
806
+ }
807
+ };
808
+ var mergeBackward = function (editor, rng, fromLi, toLi) {
809
+ var bookmark = $_68j8lagijm0ofzg2.createBookmark(rng);
810
+ mergeLiElements(editor.dom, fromLi, toLi);
811
+ var resolvedBookmark = $_68j8lagijm0ofzg2.resolveBookmark(bookmark);
812
+ editor.selection.setRng(resolvedBookmark);
813
+ };
814
+ var backspaceDeleteFromListToListCaret = function (editor, isForward) {
815
+ var dom = editor.dom, selection = editor.selection;
816
+ var selectionStartElm = selection.getStart();
817
+ var root = $_3e5hb9gmjm0ofzgc.getClosestListRootElm(editor, selectionStartElm);
818
+ var li = dom.getParent(selection.getStart(), 'LI', root);
819
+ var ul, rng, otherLi;
820
+ if (li) {
821
+ ul = li.parentNode;
822
+ if (ul === editor.getBody() && $_74mztagkjm0ofzg7.isEmpty(dom, ul)) {
1662
823
  return true;
1663
824
  }
1664
-
1665
- /*if (sibling && sibling.nodeName === 'LI' && isListNode(li.lastChild)) {
1666
- return false;
1667
- }*/
1668
-
1669
- sibling = li.previousSibling;
1670
- if (sibling && sibling.nodeName === 'LI') {
1671
- newList = DOM.create(li.parentNode.nodeName);
1672
- listStyle = DOM.getStyle(li.parentNode, 'listStyleType');
1673
- if (listStyle) {
1674
- DOM.setStyle(newList, 'listStyleType', listStyle);
825
+ rng = $_crui3egjjm0ofzg5.normalizeRange(selection.getRng(true));
826
+ otherLi = dom.getParent(findNextCaretContainer(editor, rng, isForward, root), 'LI', root);
827
+ if (otherLi && otherLi !== li) {
828
+ if (isForward) {
829
+ mergeForward(editor, rng, otherLi, li);
830
+ } else {
831
+ mergeBackward(editor, rng, li, otherLi);
1675
832
  }
1676
- sibling.appendChild(newList);
1677
- newList.appendChild(li);
1678
- mergeLists(li.lastChild, newList);
1679
833
  return true;
1680
- }
1681
-
1682
- return false;
1683
- };
1684
-
1685
- var indentSelection = function (editor) {
1686
- var listElements = Selection.getSelectedListItems(editor);
1687
-
1688
- if (listElements.length) {
1689
- var bookmark = Bookmark.createBookmark(editor.selection.getRng(true));
1690
-
1691
- for (var i = 0; i < listElements.length; i++) {
1692
- if (!indent(listElements[i]) && i === 0) {
1693
- break;
1694
- }
834
+ } else if (!otherLi) {
835
+ if (!isForward) {
836
+ $_9gjx41gdjm0ofzfr.removeList(editor);
837
+ return true;
1695
838
  }
1696
-
1697
- editor.selection.setRng(Bookmark.resolveBookmark(bookmark));
1698
- editor.nodeChanged();
1699
-
839
+ }
840
+ }
841
+ return false;
842
+ };
843
+ var removeBlock = function (dom, block, root) {
844
+ var parentBlock = dom.getParent(block.parentNode, dom.isBlock, root);
845
+ dom.remove(block);
846
+ if (parentBlock && dom.isEmpty(parentBlock)) {
847
+ dom.remove(parentBlock);
848
+ }
849
+ };
850
+ var backspaceDeleteIntoListCaret = function (editor, isForward) {
851
+ var dom = editor.dom;
852
+ var selectionStartElm = editor.selection.getStart();
853
+ var root = $_3e5hb9gmjm0ofzgc.getClosestListRootElm(editor, selectionStartElm);
854
+ var block = dom.getParent(selectionStartElm, dom.isBlock, root);
855
+ if (block && dom.isEmpty(block)) {
856
+ var rng = $_crui3egjjm0ofzg5.normalizeRange(editor.selection.getRng(true));
857
+ var otherLi_1 = dom.getParent(findNextCaretContainer(editor, rng, isForward, root), 'LI', root);
858
+ if (otherLi_1) {
859
+ editor.undoManager.transact(function () {
860
+ removeBlock(dom, block, root);
861
+ $_9gjx41gdjm0ofzfr.mergeWithAdjacentLists(dom, otherLi_1.parentNode);
862
+ editor.selection.select(otherLi_1, true);
863
+ editor.selection.collapse(isForward);
864
+ });
1700
865
  return true;
1701
866
  }
1702
- };
1703
-
1704
- return {
1705
- indentSelection: indentSelection
1706
- };
1707
- }
1708
- );
1709
-
1710
-
1711
- /**
1712
- * Commands.js
1713
- *
1714
- * Released under LGPL License.
1715
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1716
- *
1717
- * License: http://www.tinymce.com/license
1718
- * Contributing: http://www.tinymce.com/contributing
1719
- */
1720
-
1721
- define(
1722
- 'tinymce.plugins.lists.api.Commands',
1723
- [
1724
- 'tinymce.plugins.lists.actions.Indent',
1725
- 'tinymce.plugins.lists.actions.Outdent',
1726
- 'tinymce.plugins.lists.actions.ToggleList'
1727
- ],
1728
- function (Indent, Outdent, ToggleList) {
1729
- var queryListCommandState = function (editor, listName) {
1730
- return function () {
1731
- var parentList = editor.dom.getParent(editor.selection.getStart(), 'UL,OL,DL');
1732
- return parentList && parentList.nodeName === listName;
1733
- };
1734
- };
1735
-
1736
- var register = function (editor) {
1737
- editor.on('BeforeExecCommand', function (e) {
1738
- var cmd = e.command.toLowerCase(), isHandled;
1739
-
1740
- if (cmd === "indent") {
1741
- if (Indent.indentSelection(editor)) {
1742
- isHandled = true;
1743
- }
1744
- } else if (cmd === "outdent") {
1745
- if (Outdent.outdentSelection(editor)) {
1746
- isHandled = true;
1747
- }
867
+ }
868
+ return false;
869
+ };
870
+ var backspaceDeleteCaret = function (editor, isForward) {
871
+ return backspaceDeleteFromListToListCaret(editor, isForward) || backspaceDeleteIntoListCaret(editor, isForward);
872
+ };
873
+ var backspaceDeleteRange = function (editor) {
874
+ var selectionStartElm = editor.selection.getStart();
875
+ var root = $_3e5hb9gmjm0ofzgc.getClosestListRootElm(editor, selectionStartElm);
876
+ var startListParent = editor.dom.getParent(selectionStartElm, 'LI,DT,DD', root);
877
+ if (startListParent || $_3e5hb9gmjm0ofzgc.getSelectedListItems(editor).length > 0) {
878
+ editor.undoManager.transact(function () {
879
+ editor.execCommand('Delete');
880
+ $_er8krqgljm0ofzga.normalizeLists(editor.dom, editor.getBody());
881
+ });
882
+ return true;
883
+ }
884
+ return false;
885
+ };
886
+ var backspaceDelete = function (editor, isForward) {
887
+ return editor.selection.isCollapsed() ? backspaceDeleteCaret(editor, isForward) : backspaceDeleteRange(editor);
888
+ };
889
+ var setup = function (editor) {
890
+ editor.on('keydown', function (e) {
891
+ if (e.keyCode === global$3.BACKSPACE) {
892
+ if (backspaceDelete(editor, false)) {
893
+ e.preventDefault();
1748
894
  }
1749
-
1750
- if (isHandled) {
1751
- editor.fire('ExecCommand', { command: e.command });
895
+ } else if (e.keyCode === global$3.DELETE) {
896
+ if (backspaceDelete(editor, true)) {
1752
897
  e.preventDefault();
1753
- return true;
1754
898
  }
1755
- });
1756
-
1757
- editor.addCommand('InsertUnorderedList', function (ui, detail) {
1758
- ToggleList.toggleList(editor, 'UL', detail);
1759
- });
1760
-
1761
- editor.addCommand('InsertOrderedList', function (ui, detail) {
1762
- ToggleList.toggleList(editor, 'OL', detail);
1763
- });
1764
-
1765
- editor.addCommand('InsertDefinitionList', function (ui, detail) {
1766
- ToggleList.toggleList(editor, 'DL', detail);
1767
- });
1768
-
1769
- editor.addQueryStateHandler('InsertUnorderedList', queryListCommandState(editor, 'UL'));
1770
- editor.addQueryStateHandler('InsertOrderedList', queryListCommandState(editor, 'OL'));
1771
- editor.addQueryStateHandler('InsertDefinitionList', queryListCommandState(editor, 'DL'));
1772
- };
899
+ }
900
+ });
901
+ };
902
+ var $_b0poo3g9jm0ofzfi = {
903
+ setup: setup,
904
+ backspaceDelete: backspaceDelete
905
+ };
1773
906
 
907
+ var get = function (editor) {
1774
908
  return {
1775
- register: register
909
+ backspaceDelete: function (isForward) {
910
+ $_b0poo3g9jm0ofzfi.backspaceDelete(editor, isForward);
911
+ }
1776
912
  };
1777
- }
1778
- );
1779
-
1780
-
1781
- /**
1782
- * Settings.js
1783
- *
1784
- * Released under LGPL License.
1785
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1786
- *
1787
- * License: http://www.tinymce.com/license
1788
- * Contributing: http://www.tinymce.com/contributing
1789
- */
913
+ };
914
+ var $_c4ki86g8jm0ofzfg = { get: get };
1790
915
 
1791
- define(
1792
- 'tinymce.plugins.lists.api.Settings',
1793
- [
1794
- ],
1795
- function () {
1796
- var shouldIndentOnTab = function (editor) {
1797
- return editor.getParam('lists_indent_on_tab', true);
1798
- };
916
+ var DOM$5 = global$6.DOM;
917
+ var mergeLists = function (from, to) {
918
+ var node;
919
+ if ($_74mztagkjm0ofzg7.isListNode(from)) {
920
+ while (node = from.firstChild) {
921
+ to.appendChild(node);
922
+ }
923
+ DOM$5.remove(from);
924
+ }
925
+ };
926
+ var indent = function (li) {
927
+ var sibling, newList, listStyle;
928
+ if (li.nodeName === 'DT') {
929
+ DOM$5.rename(li, 'DD');
930
+ return true;
931
+ }
932
+ sibling = li.previousSibling;
933
+ if (sibling && $_74mztagkjm0ofzg7.isListNode(sibling)) {
934
+ sibling.appendChild(li);
935
+ return true;
936
+ }
937
+ if (sibling && sibling.nodeName === 'LI' && $_74mztagkjm0ofzg7.isListNode(sibling.lastChild)) {
938
+ sibling.lastChild.appendChild(li);
939
+ mergeLists(li.lastChild, sibling.lastChild);
940
+ return true;
941
+ }
942
+ sibling = li.nextSibling;
943
+ if (sibling && $_74mztagkjm0ofzg7.isListNode(sibling)) {
944
+ sibling.insertBefore(li, sibling.firstChild);
945
+ return true;
946
+ }
947
+ sibling = li.previousSibling;
948
+ if (sibling && sibling.nodeName === 'LI') {
949
+ newList = DOM$5.create(li.parentNode.nodeName);
950
+ listStyle = DOM$5.getStyle(li.parentNode, 'listStyleType');
951
+ if (listStyle) {
952
+ DOM$5.setStyle(newList, 'listStyleType', listStyle);
953
+ }
954
+ sibling.appendChild(newList);
955
+ newList.appendChild(li);
956
+ mergeLists(li.lastChild, newList);
957
+ return true;
958
+ }
959
+ return false;
960
+ };
961
+ var indentSelection = function (editor) {
962
+ var listElements = $_3e5hb9gmjm0ofzgc.getSelectedListItems(editor);
963
+ if (listElements.length) {
964
+ var bookmark = $_68j8lagijm0ofzg2.createBookmark(editor.selection.getRng(true));
965
+ for (var i = 0; i < listElements.length; i++) {
966
+ if (!indent(listElements[i]) && i === 0) {
967
+ break;
968
+ }
969
+ }
970
+ editor.selection.setRng($_68j8lagijm0ofzg2.resolveBookmark(bookmark));
971
+ editor.nodeChanged();
972
+ return true;
973
+ }
974
+ };
975
+ var $_917p8bgsjm0ofzgo = { indentSelection: indentSelection };
1799
976
 
1800
- return {
1801
- shouldIndentOnTab: shouldIndentOnTab
977
+ var queryListCommandState = function (editor, listName) {
978
+ return function () {
979
+ var parentList = editor.dom.getParent(editor.selection.getStart(), 'UL,OL,DL');
980
+ return parentList && parentList.nodeName === listName;
1802
981
  };
1803
- }
1804
- );
1805
-
1806
-
1807
- /**
1808
- * Keyboard.js
1809
- *
1810
- * Released under LGPL License.
1811
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1812
- *
1813
- * License: http://www.tinymce.com/license
1814
- * Contributing: http://www.tinymce.com/contributing
1815
- */
1816
-
1817
- define(
1818
- 'tinymce.plugins.lists.core.Keyboard',
1819
- [
1820
- 'tinymce.core.util.VK',
1821
- 'tinymce.plugins.lists.actions.Indent',
1822
- 'tinymce.plugins.lists.actions.Outdent',
1823
- 'tinymce.plugins.lists.api.Settings',
1824
- 'tinymce.plugins.lists.core.Delete'
1825
- ],
1826
- function (VK, Indent, Outdent, Settings, Delete) {
1827
- var setupTabKey = function (editor) {
1828
- editor.on('keydown', function (e) {
1829
- // Check for tab but not ctrl/cmd+tab since it switches browser tabs
1830
- if (e.keyCode !== VK.TAB || VK.metaKeyPressed(e)) {
1831
- return;
982
+ };
983
+ var register = function (editor) {
984
+ editor.on('BeforeExecCommand', function (e) {
985
+ var cmd = e.command.toLowerCase();
986
+ var isHandled;
987
+ if (cmd === 'indent') {
988
+ if ($_917p8bgsjm0ofzgo.indentSelection(editor)) {
989
+ isHandled = true;
1832
990
  }
1833
-
1834
- if (editor.dom.getParent(editor.selection.getStart(), 'LI,DT,DD')) {
1835
- e.preventDefault();
1836
-
1837
- if (e.shiftKey) {
1838
- Outdent.outdentSelection(editor);
1839
- } else {
1840
- Indent.indentSelection(editor);
1841
- }
991
+ } else if (cmd === 'outdent') {
992
+ if ($_40lbtggjm0ofzfy.outdentSelection(editor)) {
993
+ isHandled = true;
1842
994
  }
1843
- });
1844
- };
1845
-
1846
- var setup = function (editor) {
1847
- if (Settings.shouldIndentOnTab(editor)) {
1848
- setupTabKey(editor);
1849
995
  }
996
+ if (isHandled) {
997
+ editor.fire('ExecCommand', { command: e.command });
998
+ e.preventDefault();
999
+ return true;
1000
+ }
1001
+ });
1002
+ editor.addCommand('InsertUnorderedList', function (ui, detail) {
1003
+ $_9gjx41gdjm0ofzfr.toggleList(editor, 'UL', detail);
1004
+ });
1005
+ editor.addCommand('InsertOrderedList', function (ui, detail) {
1006
+ $_9gjx41gdjm0ofzfr.toggleList(editor, 'OL', detail);
1007
+ });
1008
+ editor.addCommand('InsertDefinitionList', function (ui, detail) {
1009
+ $_9gjx41gdjm0ofzfr.toggleList(editor, 'DL', detail);
1010
+ });
1011
+ editor.addQueryStateHandler('InsertUnorderedList', queryListCommandState(editor, 'UL'));
1012
+ editor.addQueryStateHandler('InsertOrderedList', queryListCommandState(editor, 'OL'));
1013
+ editor.addQueryStateHandler('InsertDefinitionList', queryListCommandState(editor, 'DL'));
1014
+ };
1015
+ var $_hekmbgrjm0ofzgm = { register: register };
1850
1016
 
1851
- Delete.setup(editor);
1852
- };
1853
-
1854
- return {
1855
- setup: setup
1856
- };
1857
- }
1858
- );
1859
-
1860
-
1861
- /**
1862
- * Buttons.js
1863
- *
1864
- * Released under LGPL License.
1865
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1866
- *
1867
- * License: http://www.tinymce.com/license
1868
- * Contributing: http://www.tinymce.com/contributing
1869
- */
1870
-
1871
- define(
1872
- 'tinymce.plugins.lists.ui.Buttons',
1873
- [
1874
- 'tinymce.core.util.Tools',
1875
- 'tinymce.plugins.lists.core.NodeType',
1876
- 'tinymce.plugins.lists.core.Selection'
1877
- ],
1878
- function (Tools, NodeType, Selection) {
1879
- var findIndex = function (list, predicate) {
1880
- for (var index = 0; index < list.length; index++) {
1881
- var element = list[index];
1017
+ var shouldIndentOnTab = function (editor) {
1018
+ return editor.getParam('lists_indent_on_tab', true);
1019
+ };
1020
+ var $_2iimujgujm0ofzgs = { shouldIndentOnTab: shouldIndentOnTab };
1882
1021
 
1883
- if (predicate(element)) {
1884
- return index;
1022
+ var setupTabKey = function (editor) {
1023
+ editor.on('keydown', function (e) {
1024
+ if (e.keyCode !== global$3.TAB || global$3.metaKeyPressed(e)) {
1025
+ return;
1026
+ }
1027
+ if (editor.dom.getParent(editor.selection.getStart(), 'LI,DT,DD')) {
1028
+ e.preventDefault();
1029
+ if (e.shiftKey) {
1030
+ $_40lbtggjm0ofzfy.outdentSelection(editor);
1031
+ } else {
1032
+ $_917p8bgsjm0ofzgo.indentSelection(editor);
1885
1033
  }
1886
1034
  }
1887
- return -1;
1888
- };
1889
- var listState = function (editor, listName) {
1890
- return function (e) {
1891
- var ctrl = e.control;
1892
-
1893
- editor.on('NodeChange', function (e) {
1894
- var tableCellIndex = findIndex(e.parents, NodeType.isTableCellNode);
1895
- var parents = tableCellIndex !== -1 ? e.parents.slice(0, tableCellIndex) : e.parents;
1896
- var lists = Tools.grep(parents, NodeType.isListNode);
1897
- ctrl.active(lists.length > 0 && lists[0].nodeName === listName);
1898
- });
1899
- };
1900
- };
1901
-
1902
- var indentPostRender = function (editor) {
1903
- return function (e) {
1904
- var ctrl = e.control;
1905
-
1906
- editor.on('nodechange', function () {
1907
- var listItemBlocks = Selection.getSelectedListItems(editor);
1908
- var disable = listItemBlocks.length > 0 && NodeType.isFirstChild(listItemBlocks[0]);
1909
- ctrl.disabled(disable);
1910
- });
1911
- };
1912
- };
1913
-
1914
- var register = function (editor) {
1915
- var hasPlugin = function (editor, plugin) {
1916
- var plugins = editor.settings.plugins ? editor.settings.plugins : '';
1917
- return Tools.inArray(plugins.split(/[ ,]/), plugin) !== -1;
1918
- };
1919
-
1920
- if (!hasPlugin(editor, 'advlist')) {
1921
- editor.addButton('numlist', {
1922
- active: false,
1923
- title: 'Numbered list',
1924
- cmd: 'InsertOrderedList',
1925
- onPostRender: listState(editor, 'OL')
1926
- });
1035
+ });
1036
+ };
1037
+ var setup$1 = function (editor) {
1038
+ if ($_2iimujgujm0ofzgs.shouldIndentOnTab(editor)) {
1039
+ setupTabKey(editor);
1040
+ }
1041
+ $_b0poo3g9jm0ofzfi.setup(editor);
1042
+ };
1043
+ var $_9so6nrgtjm0ofzgq = { setup: setup$1 };
1927
1044
 
1928
- editor.addButton('bullist', {
1929
- active: false,
1930
- title: 'Bullet list',
1931
- cmd: 'InsertUnorderedList',
1932
- onPostRender: listState(editor, 'UL')
1933
- });
1045
+ var findIndex = function (list, predicate) {
1046
+ for (var index = 0; index < list.length; index++) {
1047
+ var element = list[index];
1048
+ if (predicate(element)) {
1049
+ return index;
1934
1050
  }
1935
-
1936
- editor.addButton('indent', {
1937
- icon: 'indent',
1938
- title: 'Increase indent',
1939
- cmd: 'Indent',
1940
- onPostRender: indentPostRender(editor)
1051
+ }
1052
+ return -1;
1053
+ };
1054
+ var listState = function (editor, listName) {
1055
+ return function (e) {
1056
+ var ctrl = e.control;
1057
+ editor.on('NodeChange', function (e) {
1058
+ var tableCellIndex = findIndex(e.parents, $_74mztagkjm0ofzg7.isTableCellNode);
1059
+ var parents = tableCellIndex !== -1 ? e.parents.slice(0, tableCellIndex) : e.parents;
1060
+ var lists = global$5.grep(parents, $_74mztagkjm0ofzg7.isListNode);
1061
+ ctrl.active(lists.length > 0 && lists[0].nodeName === listName);
1941
1062
  });
1942
1063
  };
1943
-
1944
- return {
1945
- register: register
1064
+ };
1065
+ var indentPostRender = function (editor) {
1066
+ return function (e) {
1067
+ var ctrl = e.control;
1068
+ editor.on('nodechange', function () {
1069
+ var listItemBlocks = $_3e5hb9gmjm0ofzgc.getSelectedListItems(editor);
1070
+ var disable = listItemBlocks.length > 0 && $_74mztagkjm0ofzg7.isFirstChild(listItemBlocks[0]);
1071
+ ctrl.disabled(disable);
1072
+ });
1946
1073
  };
1947
- }
1948
- );
1949
-
1950
-
1951
- /**
1952
- * Plugin.js
1953
- *
1954
- * Released under LGPL License.
1955
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1956
- *
1957
- * License: http://www.tinymce.com/license
1958
- * Contributing: http://www.tinymce.com/contributing
1959
- */
1960
-
1961
- define(
1962
- 'tinymce.plugins.lists.Plugin',
1963
- [
1964
- 'tinymce.core.PluginManager',
1965
- 'tinymce.plugins.lists.api.Api',
1966
- 'tinymce.plugins.lists.api.Commands',
1967
- 'tinymce.plugins.lists.core.Keyboard',
1968
- 'tinymce.plugins.lists.ui.Buttons'
1969
- ],
1970
- function (PluginManager, Api, Commands, Keyboard, Buttons) {
1971
- PluginManager.add('lists', function (editor) {
1972
- Keyboard.setup(editor);
1973
- Buttons.register(editor);
1974
- Commands.register(editor);
1975
-
1976
- return Api.get(editor);
1074
+ };
1075
+ var register$1 = function (editor) {
1076
+ var hasPlugin = function (editor, plugin) {
1077
+ var plugins = editor.settings.plugins ? editor.settings.plugins : '';
1078
+ return global$5.inArray(plugins.split(/[ ,]/), plugin) !== -1;
1079
+ };
1080
+ if (!hasPlugin(editor, 'advlist')) {
1081
+ editor.addButton('numlist', {
1082
+ active: false,
1083
+ title: 'Numbered list',
1084
+ cmd: 'InsertOrderedList',
1085
+ onPostRender: listState(editor, 'OL')
1086
+ });
1087
+ editor.addButton('bullist', {
1088
+ active: false,
1089
+ title: 'Bullet list',
1090
+ cmd: 'InsertUnorderedList',
1091
+ onPostRender: listState(editor, 'UL')
1092
+ });
1093
+ }
1094
+ editor.addButton('indent', {
1095
+ icon: 'indent',
1096
+ title: 'Increase indent',
1097
+ cmd: 'Indent',
1098
+ onPostRender: indentPostRender(editor)
1977
1099
  });
1978
-
1979
- return function () { };
1100
+ };
1101
+ var $_cef9vxgvjm0ofzgt = { register: register$1 };
1102
+
1103
+ global.add('lists', function (editor) {
1104
+ $_9so6nrgtjm0ofzgq.setup(editor);
1105
+ $_cef9vxgvjm0ofzgt.register(editor);
1106
+ $_hekmbgrjm0ofzgm.register(editor);
1107
+ return $_c4ki86g8jm0ofzfg.get(editor);
1108
+ });
1109
+ function Plugin () {
1980
1110
  }
1981
- );
1982
1111
 
1112
+ return Plugin;
1983
1113
 
1984
- dem('tinymce.plugins.lists.Plugin')();
1114
+ }());
1985
1115
  })();