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("4",tinymce.util.Tools.resolve),g("1",["4"],function(a){return a("tinymce.PluginManager")}),g("5",["4"],function(a){return a("tinymce.util.Tools")}),g("2",["5"],function(a){var b=function(b){var c="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",d=a.explode(b.settings.font_size_style_values),e=b.schema;b.formatter.register({alignleft:{selector:c,attributes:{align:"left"}},aligncenter:{selector:c,attributes:{align:"center"}},alignright:{selector:c,attributes:{align:"right"}},alignjustify:{selector:c,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:!0}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:!0}],fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(b){return a.inArray(d,b.value)+1}}},forecolor:{inline:"font",attributes:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}}),a.each("b,i,u,strike".split(","),function(a){e.addValidElements(a+"[*]")}),e.getElementRule("font")||e.addValidElements("font[face|size|color|style]"),a.each(c.split(","),function(a){var b=e.getElementRule(a);b&&(b.attributes.align||(b.attributes.align={},b.attributesOrder.push("align")))})},c=function(a){a.settings.inline_styles=!1,a.on("init",function(){b(a)})};return{setup:c}}),g("3",[],function(){var a=function(a){a.addButton("fontsizeselect",function(){var b=[],c="8pt=1 10pt=2 12pt=3 14pt=4 18pt=5 24pt=6 36pt=7",d=a.settings.fontsizeFormats||c;return a.$.each(d.split(" "),function(a,c){var d=c,e=c,f=c.split("=");f.length>1&&(d=f[0],e=f[1]),b.push({text:d,value:e})}),{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:b,fixedWidth:!0,onPostRender:function(){var b=this;a.on("NodeChange",function(){var c;c=a.dom.getParent(a.selection.getNode(),"font"),c?b.value(c.size):b.value("")})},onclick:function(b){b.control.settings.value&&a.execCommand("FontSize",!1,b.control.settings.value)}}}),a.addButton("fontselect",function(){function b(a){a=a.replace(/;$/,"").split(";");for(var b=a.length;b--;)a[b]=a[b].split("=");return a}var c="Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats",d=[],e=b(a.settings.font_formats||c);return a.$.each(e,function(a,b){d.push({text:{raw:b[0]},value:b[1],textStyle:b[1].indexOf("dings")===-1?"font-family:"+b[1]:""})}),{type:"listbox",text:"Font Family",tooltip:"Font Family",values:d,fixedWidth:!0,onPostRender:function(){var b=this;a.on("NodeChange",function(){var c;c=a.dom.getParent(a.selection.getNode(),"font"),c?b.value(c.face):b.value("")})},onselect:function(b){b.control.settings.value&&a.execCommand("FontName",!1,b.control.settings.value)}}})};return{register:a}}),g("0",["1","2","3"],function(a,b,c){return a.add("legacyoutput",function(a){b.setup(a),c.register(a)}),function(){}}),d("0")()}();
1
+ !function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),o=tinymce.util.Tools.resolve("tinymce.util.Tools"),t=function(a){a.settings.inline_styles=!1,a.on("init",function(){var e,t,n,i;e=a,t="p,h1,h2,h3,h4,h5,h6,td,th,div,ul,ol,li,table,img",n=o.explode(e.settings.font_size_style_values),i=e.schema,e.formatter.register({alignleft:{selector:t,attributes:{align:"left"}},aligncenter:{selector:t,attributes:{align:"center"}},alignright:{selector:t,attributes:{align:"right"}},alignjustify:{selector:t,attributes:{align:"justify"}},bold:[{inline:"b",remove:"all"},{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}}],italic:[{inline:"i",remove:"all"},{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}}],underline:[{inline:"u",remove:"all"},{inline:"span",styles:{textDecoration:"underline"},exact:!0}],strikethrough:[{inline:"strike",remove:"all"},{inline:"span",styles:{textDecoration:"line-through"},exact:!0}],fontname:{inline:"font",attributes:{face:"%value"}},fontsize:{inline:"font",attributes:{size:function(e){return o.inArray(n,e.value)+1}}},forecolor:{inline:"font",attributes:{color:"%value"}},hilitecolor:{inline:"font",styles:{backgroundColor:"%value"}}}),o.each("b,i,u,strike".split(","),function(e){i.addValidElements(e+"[*]")}),i.getElementRule("font")||i.addValidElements("font[face|size|color|style]"),o.each(t.split(","),function(e){var t=i.getElementRule(e);t&&(t.attributes.align||(t.attributes.align={},t.attributesOrder.push("align")))})})},n=function(i){i.addButton("fontsizeselect",function(){var o=[],e=i.settings.fontsizeFormats||"8pt=1 10pt=2 12pt=3 14pt=4 18pt=5 24pt=6 36pt=7";return i.$.each(e.split(" "),function(e,t){var n=t,i=t,a=t.split("=");1<a.length&&(n=a[0],i=a[1]),o.push({text:n,value:i})}),{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:o,fixedWidth:!0,onPostRender:function(){var t=this;i.on("NodeChange",function(){var e;(e=i.dom.getParent(i.selection.getNode(),"font"))?t.value(e.size):t.value("")})},onclick:function(e){e.control.settings.value&&i.execCommand("FontSize",!1,e.control.settings.value)}}}),i.addButton("fontselect",function(){var n=[],e=function(e){for(var t=(e=e.replace(/;$/,"").split(";")).length;t--;)e[t]=e[t].split("=");return e}(i.settings.font_formats||"Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats");return i.$.each(e,function(e,t){n.push({text:{raw:t[0]},value:t[1],textStyle:-1===t[1].indexOf("dings")?"font-family:"+t[1]:""})}),{type:"listbox",text:"Font Family",tooltip:"Font Family",values:n,fixedWidth:!0,onPostRender:function(){var t=this;i.on("NodeChange",function(){var e;(e=i.dom.getParent(i.selection.getNode(),"font"))?t.value(e.face):t.value("")})},onselect:function(e){e.control.settings.value&&i.execCommand("FontName",!1,e.control.settings.value)}}})};e.add("legacyoutput",function(e){t(e),n(e)})}();
@@ -1,1231 +1,713 @@
1
1
  (function () {
2
+ var link = (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
- };
18
-
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
- };
7
+ var global$1 = tinymce.util.Tools.resolve('tinymce.util.VK');
32
8
 
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
9
+ var assumeExternalTargets = function (editorSettings) {
10
+ return typeof editorSettings.link_assume_external_targets === 'boolean' ? editorSettings.link_assume_external_targets : false;
11
+ };
12
+ var hasContextToolbar = function (editorSettings) {
13
+ return typeof editorSettings.link_context_toolbar === 'boolean' ? editorSettings.link_context_toolbar : false;
14
+ };
15
+ var getLinkList = function (editorSettings) {
16
+ return editorSettings.link_list;
17
+ };
18
+ var hasDefaultLinkTarget = function (editorSettings) {
19
+ return typeof editorSettings.default_link_target === 'string';
20
+ };
21
+ var getDefaultLinkTarget = function (editorSettings) {
22
+ return editorSettings.default_link_target;
23
+ };
24
+ var getTargetList = function (editorSettings) {
25
+ return editorSettings.target_list;
26
+ };
27
+ var setTargetList = function (editor, list) {
28
+ editor.settings.target_list = list;
29
+ };
30
+ var shouldShowTargetList = function (editorSettings) {
31
+ return getTargetList(editorSettings) !== false;
32
+ };
33
+ var getRelList = function (editorSettings) {
34
+ return editorSettings.rel_list;
35
+ };
36
+ var hasRelList = function (editorSettings) {
37
+ return getRelList(editorSettings) !== undefined;
38
+ };
39
+ var getLinkClassList = function (editorSettings) {
40
+ return editorSettings.link_class_list;
41
+ };
42
+ var hasLinkClassList = function (editorSettings) {
43
+ return getLinkClassList(editorSettings) !== undefined;
44
+ };
45
+ var shouldShowLinkTitle = function (editorSettings) {
46
+ return editorSettings.link_title !== false;
47
+ };
48
+ var allowUnsafeLinkTarget = function (editorSettings) {
49
+ return typeof editorSettings.allow_unsafe_link_target === 'boolean' ? editorSettings.allow_unsafe_link_target : false;
50
+ };
51
+ var $_4b6xsbfujm0ofzch = {
52
+ assumeExternalTargets: assumeExternalTargets,
53
+ hasContextToolbar: hasContextToolbar,
54
+ getLinkList: getLinkList,
55
+ hasDefaultLinkTarget: hasDefaultLinkTarget,
56
+ getDefaultLinkTarget: getDefaultLinkTarget,
57
+ getTargetList: getTargetList,
58
+ setTargetList: setTargetList,
59
+ shouldShowTargetList: shouldShowTargetList,
60
+ getRelList: getRelList,
61
+ hasRelList: hasRelList,
62
+ getLinkClassList: getLinkClassList,
63
+ hasLinkClassList: hasLinkClassList,
64
+ shouldShowLinkTitle: shouldShowLinkTitle,
65
+ allowUnsafeLinkTarget: allowUnsafeLinkTarget
44
66
  };
45
- };
46
-
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
- };
55
67
 
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
- };
68
+ var global$2 = tinymce.util.Tools.resolve('tinymce.dom.DOMUtils');
63
69
 
64
- var ephox = {};
70
+ var global$3 = tinymce.util.Tools.resolve('tinymce.Env');
65
71
 
66
- ephox.bolt = {
67
- module: {
68
- api: {
69
- define: def,
70
- require: req,
71
- demand: dem
72
+ var appendClickRemove = function (link, evt) {
73
+ document.body.appendChild(link);
74
+ link.dispatchEvent(evt);
75
+ document.body.removeChild(link);
76
+ };
77
+ var open$$1 = function (url) {
78
+ if (!global$3.ie || global$3.ie > 10) {
79
+ var link = document.createElement('a');
80
+ link.target = '_blank';
81
+ link.href = url;
82
+ link.rel = 'noreferrer noopener';
83
+ var evt = document.createEvent('MouseEvents');
84
+ evt.initMouseEvent('click', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
85
+ appendClickRemove(link, evt);
86
+ } else {
87
+ var win = window.open('', '_blank');
88
+ if (win) {
89
+ win.opener = null;
90
+ var doc = win.document;
91
+ doc.open();
92
+ doc.write('<meta http-equiv="refresh" content="0; url=' + global$2.DOM.encode(url) + '">');
93
+ doc.close();
94
+ }
72
95
  }
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.link.Plugin","tinymce.core.PluginManager","tinymce.plugins.link.api.Commands","tinymce.plugins.link.core.Actions","tinymce.plugins.link.core.Keyboard","tinymce.plugins.link.ui.Controls","global!tinymce.util.Tools.resolve","tinymce.core.util.VK","tinymce.plugins.link.api.Settings","tinymce.plugins.link.core.OpenUrl","tinymce.plugins.link.core.Utils","tinymce.plugins.link.ui.Dialog","global!document","global!window","tinymce.core.dom.DOMUtils","tinymce.core.Env","global!RegExp","tinymce.core.util.Tools","tinymce.core.util.Delay","tinymce.core.util.XHR"]
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.util.VK',
119
- [
120
- 'global!tinymce.util.Tools.resolve'
121
- ],
122
- function (resolve) {
123
- return resolve('tinymce.util.VK');
124
- }
125
- );
126
-
127
- /**
128
- * Settings.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.plugins.link.api.Settings',
139
- [
140
- ],
141
- function () {
142
- var assumeExternalTargets = function (editorSettings) {
143
- return typeof editorSettings.link_assume_external_targets === 'boolean' ? editorSettings.link_assume_external_targets : false;
144
- };
145
-
146
- var hasContextToolbar = function (editorSettings) {
147
- return typeof editorSettings.link_context_toolbar === 'boolean' ? editorSettings.link_context_toolbar : false;
148
- };
149
-
150
- var getLinkList = function (editorSettings) {
151
- return editorSettings.link_list;
152
- };
153
-
154
- var hasDefaultLinkTarget = function (editorSettings) {
155
- return typeof editorSettings.default_link_target === 'string';
156
- };
157
-
158
- var getDefaultLinkTarget = function (editorSettings) {
159
- return editorSettings.default_link_target;
160
- };
161
-
162
- var getTargetList = function (editorSettings) {
163
- return editorSettings.target_list;
164
- };
165
-
166
- var setTargetList = function (editor, list) {
167
- editor.settings.target_list = list;
168
- };
169
-
170
- var shouldShowTargetList = function (editorSettings) {
171
- return getTargetList(editorSettings) !== false;
172
- };
173
-
174
- var getRelList = function (editorSettings) {
175
- return editorSettings.rel_list;
176
- };
177
-
178
- var hasRelList = function (editorSettings) {
179
- return getRelList(editorSettings) !== undefined;
180
- };
181
-
182
- var getLinkClassList = function (editorSettings) {
183
- return editorSettings.link_class_list;
184
- };
185
-
186
- var hasLinkClassList = function (editorSettings) {
187
- return getLinkClassList(editorSettings) !== undefined;
188
- };
96
+ };
97
+ var $_evd3tpfvjm0ofzck = { open: open$$1 };
189
98
 
190
- var shouldShowLinkTitle = function (editorSettings) {
191
- return editorSettings.link_title !== false;
192
- };
99
+ var global$4 = tinymce.util.Tools.resolve('tinymce.util.Tools');
193
100
 
194
- var allowUnsafeLinkTarget = function (editorSettings) {
195
- return typeof editorSettings.allow_unsafe_link_target === 'boolean' ? editorSettings.allow_unsafe_link_target : false;
101
+ var toggleTargetRules = function (rel, isUnsafe) {
102
+ var rules = ['noopener'];
103
+ var newRel = rel ? rel.split(/\s+/) : [];
104
+ var toString = function (rel) {
105
+ return global$4.trim(rel.sort().join(' '));
196
106
  };
197
-
198
- return {
199
- assumeExternalTargets: assumeExternalTargets,
200
- hasContextToolbar: hasContextToolbar,
201
- getLinkList: getLinkList,
202
- hasDefaultLinkTarget: hasDefaultLinkTarget,
203
- getDefaultLinkTarget: getDefaultLinkTarget,
204
- getTargetList: getTargetList,
205
- setTargetList: setTargetList,
206
- shouldShowTargetList: shouldShowTargetList,
207
- getRelList: getRelList,
208
- hasRelList: hasRelList,
209
- getLinkClassList: getLinkClassList,
210
- hasLinkClassList: hasLinkClassList,
211
- shouldShowLinkTitle: shouldShowLinkTitle,
212
- allowUnsafeLinkTarget: allowUnsafeLinkTarget
107
+ var addTargetRules = function (rel) {
108
+ rel = removeTargetRules(rel);
109
+ return rel.length ? rel.concat(rules) : rules;
213
110
  };
214
- }
215
- );
216
-
217
- defineGlobal("global!document", document);
218
- defineGlobal("global!window", window);
219
- /**
220
- * ResolveGlobal.js
221
- *
222
- * Released under LGPL License.
223
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
224
- *
225
- * License: http://www.tinymce.com/license
226
- * Contributing: http://www.tinymce.com/contributing
227
- */
228
-
229
- define(
230
- 'tinymce.core.dom.DOMUtils',
231
- [
232
- 'global!tinymce.util.Tools.resolve'
233
- ],
234
- function (resolve) {
235
- return resolve('tinymce.dom.DOMUtils');
236
- }
237
- );
238
-
239
- /**
240
- * ResolveGlobal.js
241
- *
242
- * Released under LGPL License.
243
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
244
- *
245
- * License: http://www.tinymce.com/license
246
- * Contributing: http://www.tinymce.com/contributing
247
- */
248
-
249
- define(
250
- 'tinymce.core.Env',
251
- [
252
- 'global!tinymce.util.Tools.resolve'
253
- ],
254
- function (resolve) {
255
- return resolve('tinymce.Env');
256
- }
257
- );
258
-
259
- /**
260
- * OpenUrl.js
261
- *
262
- * Released under LGPL License.
263
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
264
- *
265
- * License: http://www.tinymce.com/license
266
- * Contributing: http://www.tinymce.com/contributing
267
- */
268
-
269
- define(
270
- 'tinymce.plugins.link.core.OpenUrl',
271
- [
272
- 'global!document',
273
- 'global!window',
274
- 'tinymce.core.dom.DOMUtils',
275
- 'tinymce.core.Env'
276
- ],
277
- function (document, window, DOMUtils, Env) {
278
- var appendClickRemove = function (link, evt) {
279
- document.body.appendChild(link);
280
- link.dispatchEvent(evt);
281
- document.body.removeChild(link);
111
+ var removeTargetRules = function (rel) {
112
+ return rel.filter(function (val) {
113
+ return global$4.inArray(rules, val) === -1;
114
+ });
282
115
  };
283
-
284
- var open = function (url) {
285
- // Chrome and Webkit has implemented noopener and works correctly with/without popup blocker
286
- // Firefox has it implemented noopener but when the popup blocker is activated it doesn't work
287
- // Edge has only implemented noreferrer and it seems to remove opener as well
288
- // Older IE versions pre IE 11 falls back to a window.open approach
289
- if (!Env.ie || Env.ie > 10) {
290
- var link = document.createElement('a');
291
- link.target = '_blank';
292
- link.href = url;
293
- link.rel = 'noreferrer noopener';
294
-
295
- var evt = document.createEvent('MouseEvents');
296
- evt.initMouseEvent('click', true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
297
-
298
- appendClickRemove(link, evt);
299
- } else {
300
- var win = window.open('', '_blank');
301
- if (win) {
302
- win.opener = null;
303
- var doc = win.document;
304
- doc.open();
305
- doc.write('<meta http-equiv="refresh" content="0; url=' + DOMUtils.DOM.encode(url) + '">');
306
- doc.close();
116
+ newRel = isUnsafe ? addTargetRules(newRel) : removeTargetRules(newRel);
117
+ return newRel.length ? toString(newRel) : null;
118
+ };
119
+ var trimCaretContainers = function (text) {
120
+ return text.replace(/\uFEFF/g, '');
121
+ };
122
+ var getAnchorElement = function (editor, selectedElm) {
123
+ selectedElm = selectedElm || editor.selection.getNode();
124
+ if (isImageFigure(selectedElm)) {
125
+ return editor.dom.select('a[href]', selectedElm)[0];
126
+ } else {
127
+ return editor.dom.getParent(selectedElm, 'a[href]');
128
+ }
129
+ };
130
+ var getAnchorText = function (selection, anchorElm) {
131
+ var text = anchorElm ? anchorElm.innerText || anchorElm.textContent : selection.getContent({ format: 'text' });
132
+ return trimCaretContainers(text);
133
+ };
134
+ var isLink = function (elm) {
135
+ return elm && elm.nodeName === 'A' && elm.href;
136
+ };
137
+ var hasLinks = function (elements) {
138
+ return global$4.grep(elements, isLink).length > 0;
139
+ };
140
+ var isOnlyTextSelected = function (html) {
141
+ if (/</.test(html) && (!/^<a [^>]+>[^<]+<\/a>$/.test(html) || html.indexOf('href=') === -1)) {
142
+ return false;
143
+ }
144
+ return true;
145
+ };
146
+ var isImageFigure = function (node) {
147
+ return node && node.nodeName === 'FIGURE' && /\bimage\b/i.test(node.className);
148
+ };
149
+ var link = function (editor, attachState) {
150
+ return function (data) {
151
+ editor.undoManager.transact(function () {
152
+ var selectedElm = editor.selection.getNode();
153
+ var anchorElm = getAnchorElement(editor, selectedElm);
154
+ var linkAttrs = {
155
+ href: data.href,
156
+ target: data.target ? data.target : null,
157
+ rel: data.rel ? data.rel : null,
158
+ class: data.class ? data.class : null,
159
+ title: data.title ? data.title : null
160
+ };
161
+ if (!$_4b6xsbfujm0ofzch.hasRelList(editor.settings) && $_4b6xsbfujm0ofzch.allowUnsafeLinkTarget(editor.settings) === false) {
162
+ linkAttrs.rel = toggleTargetRules(linkAttrs.rel, linkAttrs.target === '_blank');
307
163
  }
308
- }
309
- };
310
-
311
- return {
312
- open: open
313
- };
314
- }
315
- );
316
- defineGlobal("global!RegExp", RegExp);
317
- /**
318
- * ResolveGlobal.js
319
- *
320
- * Released under LGPL License.
321
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
322
- *
323
- * License: http://www.tinymce.com/license
324
- * Contributing: http://www.tinymce.com/contributing
325
- */
326
-
327
- define(
328
- 'tinymce.core.util.Tools',
329
- [
330
- 'global!tinymce.util.Tools.resolve'
331
- ],
332
- function (resolve) {
333
- return resolve('tinymce.util.Tools');
334
- }
335
- );
336
-
337
- /**
338
- * Utils.js
339
- *
340
- * Released under LGPL License.
341
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
342
- *
343
- * License: http://www.tinymce.com/license
344
- * Contributing: http://www.tinymce.com/contributing
345
- */
346
-
347
- define(
348
- 'tinymce.plugins.link.core.Utils',
349
- [
350
- 'global!RegExp',
351
- 'tinymce.core.util.Tools',
352
- 'tinymce.plugins.link.api.Settings'
353
- ],
354
- function (RegExp, Tools, Settings) {
355
- var toggleTargetRules = function (rel, isUnsafe) {
356
- var rules = ['noopener'];
357
- var newRel = rel ? rel.split(/\s+/) : [];
358
-
359
- var toString = function (rel) {
360
- return Tools.trim(rel.sort().join(' '));
361
- };
362
-
363
- var addTargetRules = function (rel) {
364
- rel = removeTargetRules(rel);
365
- return rel.length ? rel.concat(rules) : rules;
366
- };
367
-
368
- var removeTargetRules = function (rel) {
369
- return rel.filter(function (val) {
370
- return Tools.inArray(rules, val) === -1;
371
- });
372
- };
373
-
374
- newRel = isUnsafe ? addTargetRules(newRel) : removeTargetRules(newRel);
375
- return newRel.length ? toString(newRel) : null;
376
- };
377
-
378
- var trimCaretContainers = function (text) {
379
- return text.replace(/\uFEFF/g, '');
380
- };
381
-
382
- var getAnchorElement = function (editor, selectedElm) {
383
- selectedElm = selectedElm || editor.selection.getNode();
384
- if (isImageFigure(selectedElm)) {
385
- // for an image conained in a figure we look for a link inside the selected element
386
- return editor.dom.select('a[href]', selectedElm)[0];
387
- } else {
388
- return editor.dom.getParent(selectedElm, 'a[href]');
389
- }
390
- };
391
-
392
- var getAnchorText = function (selection, anchorElm) {
393
- var text = anchorElm ? (anchorElm.innerText || anchorElm.textContent) : selection.getContent({ format: 'text' });
394
- return trimCaretContainers(text);
395
- };
396
-
397
- var isLink = function (elm) {
398
- return elm && elm.nodeName === 'A' && elm.href;
399
- };
400
-
401
- var hasLinks = function (elements) {
402
- return Tools.grep(elements, isLink).length > 0;
403
- };
404
-
405
- var isOnlyTextSelected = function (html) {
406
- // Partial html and not a fully selected anchor element
407
- if (/</.test(html) && (!/^<a [^>]+>[^<]+<\/a>$/.test(html) || html.indexOf('href=') === -1)) {
408
- return false;
409
- }
410
-
411
- return true;
412
- };
413
-
414
- var isImageFigure = function (node) {
415
- return node && node.nodeName === 'FIGURE' && /\bimage\b/i.test(node.className);
416
- };
417
-
418
- var link = function (editor, attachState) {
419
- return function (data) {
420
- editor.undoManager.transact(function () {
421
- var selectedElm = editor.selection.getNode();
422
- var anchorElm = getAnchorElement(editor, selectedElm);
423
-
424
- var linkAttrs = {
425
- href: data.href,
426
- target: data.target ? data.target : null,
427
- rel: data.rel ? data.rel : null,
428
- "class": data["class"] ? data["class"] : null,
429
- title: data.title ? data.title : null
430
- };
431
-
432
- if (!Settings.hasRelList(editor.settings) && Settings.allowUnsafeLinkTarget(editor.settings) === false) {
433
- linkAttrs.rel = toggleTargetRules(linkAttrs.rel, linkAttrs.target === '_blank');
434
- }
435
-
436
- if (data.href === attachState.href) {
437
- attachState.attach();
438
- attachState = {};
439
- }
440
-
441
- if (anchorElm) {
442
- editor.focus();
443
-
444
- if (data.hasOwnProperty('text')) {
445
- if ("innerText" in anchorElm) {
446
- anchorElm.innerText = data.text;
447
- } else {
448
- anchorElm.textContent = data.text;
449
- }
450
- }
451
-
452
- editor.dom.setAttribs(anchorElm, linkAttrs);
453
-
454
- editor.selection.select(anchorElm);
455
- editor.undoManager.add();
456
- } else {
457
- if (isImageFigure(selectedElm)) {
458
- linkImageFigure(editor, selectedElm, linkAttrs);
459
- } else if (data.hasOwnProperty('text')) {
460
- editor.insertContent(editor.dom.createHTML('a', linkAttrs, editor.dom.encode(data.text)));
164
+ if (data.href === attachState.href) {
165
+ attachState.attach();
166
+ attachState = {};
167
+ }
168
+ if (anchorElm) {
169
+ editor.focus();
170
+ if (data.hasOwnProperty('text')) {
171
+ if ('innerText' in anchorElm) {
172
+ anchorElm.innerText = data.text;
461
173
  } else {
462
- editor.execCommand('mceInsertLink', false, linkAttrs);
174
+ anchorElm.textContent = data.text;
463
175
  }
464
176
  }
465
- });
466
- };
467
- };
468
-
469
- var unlink = function (editor) {
470
- return function () {
471
- editor.undoManager.transact(function () {
472
- var node = editor.selection.getNode();
473
- if (isImageFigure(node)) {
474
- unlinkImageFigure(editor, node);
177
+ editor.dom.setAttribs(anchorElm, linkAttrs);
178
+ editor.selection.select(anchorElm);
179
+ editor.undoManager.add();
180
+ } else {
181
+ if (isImageFigure(selectedElm)) {
182
+ linkImageFigure(editor, selectedElm, linkAttrs);
183
+ } else if (data.hasOwnProperty('text')) {
184
+ editor.insertContent(editor.dom.createHTML('a', linkAttrs, editor.dom.encode(data.text)));
475
185
  } else {
476
- editor.execCommand('unlink');
186
+ editor.execCommand('mceInsertLink', false, linkAttrs);
477
187
  }
478
- });
479
- };
188
+ }
189
+ });
480
190
  };
481
-
482
- var unlinkImageFigure = function (editor, fig) {
483
- var a, img;
484
- img = editor.dom.select('img', fig)[0];
485
- if (img) {
486
- a = editor.dom.getParents(img, 'a[href]', fig)[0];
487
- if (a) {
488
- a.parentNode.insertBefore(img, a);
489
- editor.dom.remove(a);
191
+ };
192
+ var unlink = function (editor) {
193
+ return function () {
194
+ editor.undoManager.transact(function () {
195
+ var node = editor.selection.getNode();
196
+ if (isImageFigure(node)) {
197
+ unlinkImageFigure(editor, node);
198
+ } else {
199
+ editor.execCommand('unlink');
490
200
  }
491
- }
201
+ });
492
202
  };
493
-
494
- var linkImageFigure = function (editor, fig, attrs) {
495
- var a, img;
496
- img = editor.dom.select('img', fig)[0];
497
- if (img) {
498
- a = editor.dom.create('a', attrs);
499
- img.parentNode.insertBefore(a, img);
500
- a.appendChild(img);
203
+ };
204
+ var unlinkImageFigure = function (editor, fig) {
205
+ var a, img;
206
+ img = editor.dom.select('img', fig)[0];
207
+ if (img) {
208
+ a = editor.dom.getParents(img, 'a[href]', fig)[0];
209
+ if (a) {
210
+ a.parentNode.insertBefore(img, a);
211
+ editor.dom.remove(a);
501
212
  }
502
- };
503
-
504
- return {
505
- link: link,
506
- unlink: unlink,
507
- isLink: isLink,
508
- hasLinks: hasLinks,
509
- isOnlyTextSelected: isOnlyTextSelected,
510
- getAnchorElement: getAnchorElement,
511
- getAnchorText: getAnchorText,
512
- toggleTargetRules: toggleTargetRules
513
- };
514
- }
515
- );
516
- /**
517
- * ResolveGlobal.js
518
- *
519
- * Released under LGPL License.
520
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
521
- *
522
- * License: http://www.tinymce.com/license
523
- * Contributing: http://www.tinymce.com/contributing
524
- */
525
-
526
- define(
527
- 'tinymce.core.util.Delay',
528
- [
529
- 'global!tinymce.util.Tools.resolve'
530
- ],
531
- function (resolve) {
532
- return resolve('tinymce.util.Delay');
533
- }
534
- );
535
-
536
- /**
537
- * ResolveGlobal.js
538
- *
539
- * Released under LGPL License.
540
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
541
- *
542
- * License: http://www.tinymce.com/license
543
- * Contributing: http://www.tinymce.com/contributing
544
- */
545
-
546
- define(
547
- 'tinymce.core.util.XHR',
548
- [
549
- 'global!tinymce.util.Tools.resolve'
550
- ],
551
- function (resolve) {
552
- return resolve('tinymce.util.XHR');
553
- }
554
- );
555
-
556
- /**
557
- * Dialog.js
558
- *
559
- * Released under LGPL License.
560
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
561
- *
562
- * License: http://www.tinymce.com/license
563
- * Contributing: http://www.tinymce.com/contributing
564
- */
213
+ }
214
+ };
215
+ var linkImageFigure = function (editor, fig, attrs) {
216
+ var a, img;
217
+ img = editor.dom.select('img', fig)[0];
218
+ if (img) {
219
+ a = editor.dom.create('a', attrs);
220
+ img.parentNode.insertBefore(a, img);
221
+ a.appendChild(img);
222
+ }
223
+ };
224
+ var $_d522tkfzjm0ofzda = {
225
+ link: link,
226
+ unlink: unlink,
227
+ isLink: isLink,
228
+ hasLinks: hasLinks,
229
+ isOnlyTextSelected: isOnlyTextSelected,
230
+ getAnchorElement: getAnchorElement,
231
+ getAnchorText: getAnchorText,
232
+ toggleTargetRules: toggleTargetRules
233
+ };
565
234
 
566
- define(
567
- 'tinymce.plugins.link.ui.Dialog',
568
- [
569
- 'tinymce.core.util.Delay',
570
- 'tinymce.core.util.Tools',
571
- 'tinymce.core.util.XHR',
572
- 'tinymce.plugins.link.api.Settings',
573
- 'tinymce.plugins.link.core.Utils'
574
- ],
575
- function (Delay, Tools, XHR, Settings, Utils) {
576
- var attachState = {};
235
+ var global$5 = tinymce.util.Tools.resolve('tinymce.util.Delay');
577
236
 
578
- var createLinkList = function (editor, callback) {
579
- var linkList = Settings.getLinkList(editor.settings);
237
+ var global$6 = tinymce.util.Tools.resolve('tinymce.util.XHR');
580
238
 
581
- if (typeof linkList === "string") {
582
- XHR.send({
583
- url: linkList,
584
- success: function (text) {
585
- callback(editor, JSON.parse(text));
239
+ var attachState = {};
240
+ var createLinkList = function (editor, callback) {
241
+ var linkList = $_4b6xsbfujm0ofzch.getLinkList(editor.settings);
242
+ if (typeof linkList === 'string') {
243
+ global$6.send({
244
+ url: linkList,
245
+ success: function (text) {
246
+ callback(editor, JSON.parse(text));
247
+ }
248
+ });
249
+ } else if (typeof linkList === 'function') {
250
+ linkList(function (list) {
251
+ callback(editor, list);
252
+ });
253
+ } else {
254
+ callback(editor, linkList);
255
+ }
256
+ };
257
+ var buildListItems = function (inputList, itemCallback, startItems) {
258
+ var appendItems = function (values, output) {
259
+ output = output || [];
260
+ global$4.each(values, function (item) {
261
+ var menuItem = { text: item.text || item.title };
262
+ if (item.menu) {
263
+ menuItem.menu = appendItems(item.menu);
264
+ } else {
265
+ menuItem.value = item.value;
266
+ if (itemCallback) {
267
+ itemCallback(menuItem);
586
268
  }
269
+ }
270
+ output.push(menuItem);
271
+ });
272
+ return output;
273
+ };
274
+ return appendItems(inputList, startItems || []);
275
+ };
276
+ var delayedConfirm = function (editor, message, callback) {
277
+ var rng = editor.selection.getRng();
278
+ global$5.setEditorTimeout(editor, function () {
279
+ editor.windowManager.confirm(message, function (state) {
280
+ editor.selection.setRng(rng);
281
+ callback(state);
282
+ });
283
+ });
284
+ };
285
+ var showDialog = function (editor, linkList) {
286
+ var data = {};
287
+ var selection = editor.selection;
288
+ var dom = editor.dom;
289
+ var anchorElm, initialText;
290
+ var win, onlyText, textListCtrl, linkListCtrl, relListCtrl, targetListCtrl, classListCtrl, linkTitleCtrl, value;
291
+ var linkListChangeHandler = function (e) {
292
+ var textCtrl = win.find('#text');
293
+ if (!textCtrl.value() || e.lastControl && textCtrl.value() === e.lastControl.text()) {
294
+ textCtrl.value(e.control.text());
295
+ }
296
+ win.find('#href').value(e.control.value());
297
+ };
298
+ var buildAnchorListControl = function (url) {
299
+ var anchorList = [];
300
+ global$4.each(editor.dom.select('a:not([href])'), function (anchor) {
301
+ var id = anchor.name || anchor.id;
302
+ if (id) {
303
+ anchorList.push({
304
+ text: id,
305
+ value: '#' + id,
306
+ selected: url.indexOf('#' + id) !== -1
307
+ });
308
+ }
309
+ });
310
+ if (anchorList.length) {
311
+ anchorList.unshift({
312
+ text: 'None',
313
+ value: ''
587
314
  });
588
- } else if (typeof linkList === "function") {
589
- linkList(function (list) {
590
- callback(editor, list);
591
- });
592
- } else {
593
- callback(editor, linkList);
315
+ return {
316
+ name: 'anchor',
317
+ type: 'listbox',
318
+ label: 'Anchors',
319
+ values: anchorList,
320
+ onselect: linkListChangeHandler
321
+ };
594
322
  }
595
323
  };
596
-
597
- var buildListItems = function (inputList, itemCallback, startItems) {
598
- var appendItems = function (values, output) {
599
- output = output || [];
600
-
601
- Tools.each(values, function (item) {
602
- var menuItem = { text: item.text || item.title };
603
-
604
- if (item.menu) {
605
- menuItem.menu = appendItems(item.menu);
606
- } else {
607
- menuItem.value = item.value;
608
-
609
- if (itemCallback) {
610
- itemCallback(menuItem);
611
- }
612
- }
613
-
614
- output.push(menuItem);
615
- });
616
-
617
- return output;
618
- };
619
-
620
- return appendItems(inputList, startItems || []);
324
+ var updateText = function () {
325
+ if (!initialText && onlyText && !data.text) {
326
+ this.parent().parent().find('#text')[0].value(this.value());
327
+ }
621
328
  };
622
-
623
- // Delay confirm since onSubmit will move focus
624
- var delayedConfirm = function (editor, message, callback) {
625
- var rng = editor.selection.getRng();
626
-
627
- Delay.setEditorTimeout(editor, function () {
628
- editor.windowManager.confirm(message, function (state) {
629
- editor.selection.setRng(rng);
630
- callback(state);
631
- });
329
+ var urlChange = function (e) {
330
+ var meta = e.meta || {};
331
+ if (linkListCtrl) {
332
+ linkListCtrl.value(editor.convertURL(this.value(), 'href'));
333
+ }
334
+ global$4.each(e.meta, function (value, key) {
335
+ var inp = win.find('#' + key);
336
+ if (key === 'text') {
337
+ if (initialText.length === 0) {
338
+ inp.value(value);
339
+ data.text = value;
340
+ }
341
+ } else {
342
+ inp.value(value);
343
+ }
632
344
  });
345
+ if (meta.attach) {
346
+ attachState = {
347
+ href: this.value(),
348
+ attach: meta.attach
349
+ };
350
+ }
351
+ if (!meta.text) {
352
+ updateText.call(this);
353
+ }
633
354
  };
634
-
635
- var showDialog = function (editor, linkList) {
636
- var data = {}, selection = editor.selection, dom = editor.dom, anchorElm, initialText;
637
- var win, onlyText, textListCtrl, linkListCtrl, relListCtrl, targetListCtrl, classListCtrl, linkTitleCtrl, value;
638
-
639
- var linkListChangeHandler = function (e) {
640
- var textCtrl = win.find('#text');
641
-
642
- if (!textCtrl.value() || (e.lastControl && textCtrl.value() === e.lastControl.text())) {
643
- textCtrl.value(e.control.text());
355
+ var onBeforeCall = function (e) {
356
+ e.meta = win.toJSON();
357
+ };
358
+ onlyText = $_d522tkfzjm0ofzda.isOnlyTextSelected(selection.getContent());
359
+ anchorElm = $_d522tkfzjm0ofzda.getAnchorElement(editor);
360
+ data.text = initialText = $_d522tkfzjm0ofzda.getAnchorText(editor.selection, anchorElm);
361
+ data.href = anchorElm ? dom.getAttrib(anchorElm, 'href') : '';
362
+ if (anchorElm) {
363
+ data.target = dom.getAttrib(anchorElm, 'target');
364
+ } else if ($_4b6xsbfujm0ofzch.hasDefaultLinkTarget(editor.settings)) {
365
+ data.target = $_4b6xsbfujm0ofzch.getDefaultLinkTarget(editor.settings);
366
+ }
367
+ if (value = dom.getAttrib(anchorElm, 'rel')) {
368
+ data.rel = value;
369
+ }
370
+ if (value = dom.getAttrib(anchorElm, 'class')) {
371
+ data.class = value;
372
+ }
373
+ if (value = dom.getAttrib(anchorElm, 'title')) {
374
+ data.title = value;
375
+ }
376
+ if (onlyText) {
377
+ textListCtrl = {
378
+ name: 'text',
379
+ type: 'textbox',
380
+ size: 40,
381
+ label: 'Text to display',
382
+ onchange: function () {
383
+ data.text = this.value();
644
384
  }
645
-
646
- win.find('#href').value(e.control.value());
647
385
  };
648
-
649
- var buildAnchorListControl = function (url) {
650
- var anchorList = [];
651
-
652
- Tools.each(editor.dom.select('a:not([href])'), function (anchor) {
653
- var id = anchor.name || anchor.id;
654
-
655
- if (id) {
656
- anchorList.push({
657
- text: id,
658
- value: '#' + id,
659
- selected: url.indexOf('#' + id) !== -1
660
- });
661
- }
662
- });
663
-
664
- if (anchorList.length) {
665
- anchorList.unshift({ text: 'None', value: '' });
666
-
667
- return {
668
- name: 'anchor',
669
- type: 'listbox',
670
- label: 'Anchors',
671
- values: anchorList,
672
- onselect: linkListChangeHandler
673
- };
386
+ }
387
+ if (linkList) {
388
+ linkListCtrl = {
389
+ type: 'listbox',
390
+ label: 'Link list',
391
+ values: buildListItems(linkList, function (item) {
392
+ item.value = editor.convertURL(item.value || item.url, 'href');
393
+ }, [{
394
+ text: 'None',
395
+ value: ''
396
+ }]),
397
+ onselect: linkListChangeHandler,
398
+ value: editor.convertURL(data.href, 'href'),
399
+ onPostRender: function () {
400
+ linkListCtrl = this;
674
401
  }
675
402
  };
676
-
677
- var updateText = function () {
678
- if (!initialText && onlyText && !data.text) {
679
- this.parent().parent().find('#text')[0].value(this.value());
680
- }
403
+ }
404
+ if ($_4b6xsbfujm0ofzch.shouldShowTargetList(editor.settings)) {
405
+ if ($_4b6xsbfujm0ofzch.getTargetList(editor.settings) === undefined) {
406
+ $_4b6xsbfujm0ofzch.setTargetList(editor, [
407
+ {
408
+ text: 'None',
409
+ value: ''
410
+ },
411
+ {
412
+ text: 'New window',
413
+ value: '_blank'
414
+ }
415
+ ]);
416
+ }
417
+ targetListCtrl = {
418
+ name: 'target',
419
+ type: 'listbox',
420
+ label: 'Target',
421
+ values: buildListItems($_4b6xsbfujm0ofzch.getTargetList(editor.settings))
681
422
  };
682
-
683
- var urlChange = function (e) {
684
- var meta = e.meta || {};
685
-
686
- if (linkListCtrl) {
687
- linkListCtrl.value(editor.convertURL(this.value(), 'href'));
688
- }
689
-
690
- Tools.each(e.meta, function (value, key) {
691
- var inp = win.find('#' + key);
692
-
693
- if (key === 'text') {
694
- if (initialText.length === 0) {
695
- inp.value(value);
696
- data.text = value;
697
- }
698
- } else {
699
- inp.value(value);
423
+ }
424
+ if ($_4b6xsbfujm0ofzch.hasRelList(editor.settings)) {
425
+ relListCtrl = {
426
+ name: 'rel',
427
+ type: 'listbox',
428
+ label: 'Rel',
429
+ values: buildListItems($_4b6xsbfujm0ofzch.getRelList(editor.settings), function (item) {
430
+ if ($_4b6xsbfujm0ofzch.allowUnsafeLinkTarget(editor.settings) === false) {
431
+ item.value = $_d522tkfzjm0ofzda.toggleTargetRules(item.value, data.target === '_blank');
700
432
  }
701
- });
702
-
703
- if (meta.attach) {
704
- attachState = {
705
- href: this.value(),
706
- attach: meta.attach
707
- };
708
- }
709
-
710
- if (!meta.text) {
711
- updateText.call(this);
712
- }
433
+ })
713
434
  };
714
-
715
- var onBeforeCall = function (e) {
716
- e.meta = win.toJSON();
435
+ }
436
+ if ($_4b6xsbfujm0ofzch.hasLinkClassList(editor.settings)) {
437
+ classListCtrl = {
438
+ name: 'class',
439
+ type: 'listbox',
440
+ label: 'Class',
441
+ values: buildListItems($_4b6xsbfujm0ofzch.getLinkClassList(editor.settings), function (item) {
442
+ if (item.value) {
443
+ item.textStyle = function () {
444
+ return editor.formatter.getCssText({
445
+ inline: 'a',
446
+ classes: [item.value]
447
+ });
448
+ };
449
+ }
450
+ })
717
451
  };
718
-
719
- onlyText = Utils.isOnlyTextSelected(selection.getContent());
720
- anchorElm = Utils.getAnchorElement(editor);
721
-
722
- data.text = initialText = Utils.getAnchorText(editor.selection, anchorElm);
723
- data.href = anchorElm ? dom.getAttrib(anchorElm, 'href') : '';
724
-
725
- if (anchorElm) {
726
- data.target = dom.getAttrib(anchorElm, 'target');
727
- } else if (Settings.hasDefaultLinkTarget(editor.settings)) {
728
- data.target = Settings.getDefaultLinkTarget(editor.settings);
729
- }
730
-
731
- if ((value = dom.getAttrib(anchorElm, 'rel'))) {
732
- data.rel = value;
733
- }
734
-
735
- if ((value = dom.getAttrib(anchorElm, 'class'))) {
736
- data['class'] = value;
737
- }
738
-
739
- if ((value = dom.getAttrib(anchorElm, 'title'))) {
740
- data.title = value;
741
- }
742
-
743
- if (onlyText) {
744
- textListCtrl = {
745
- name: 'text',
746
- type: 'textbox',
452
+ }
453
+ if ($_4b6xsbfujm0ofzch.shouldShowLinkTitle(editor.settings)) {
454
+ linkTitleCtrl = {
455
+ name: 'title',
456
+ type: 'textbox',
457
+ label: 'Title',
458
+ value: data.title
459
+ };
460
+ }
461
+ win = editor.windowManager.open({
462
+ title: 'Insert link',
463
+ data: data,
464
+ body: [
465
+ {
466
+ name: 'href',
467
+ type: 'filepicker',
468
+ filetype: 'file',
747
469
  size: 40,
748
- label: 'Text to display',
749
- onchange: function () {
750
- data.text = this.value();
751
- }
752
- };
753
- }
754
-
755
- if (linkList) {
756
- linkListCtrl = {
757
- type: 'listbox',
758
- label: 'Link list',
759
- values: buildListItems(
760
- linkList,
761
- function (item) {
762
- item.value = editor.convertURL(item.value || item.url, 'href');
763
- },
764
- [{ text: 'None', value: '' }]
765
- ),
766
- onselect: linkListChangeHandler,
767
- value: editor.convertURL(data.href, 'href'),
768
- onPostRender: function () {
769
- /*eslint consistent-this:0*/
770
- linkListCtrl = this;
771
- }
772
- };
773
- }
774
-
775
- if (Settings.shouldShowTargetList(editor.settings)) {
776
- if (Settings.getTargetList(editor.settings) === undefined) {
777
- Settings.setTargetList(editor, [
778
- { text: 'None', value: '' },
779
- { text: 'New window', value: '_blank' }
780
- ]);
470
+ autofocus: true,
471
+ label: 'Url',
472
+ onchange: urlChange,
473
+ onkeyup: updateText,
474
+ onpaste: updateText,
475
+ onbeforecall: onBeforeCall
476
+ },
477
+ textListCtrl,
478
+ linkTitleCtrl,
479
+ buildAnchorListControl(data.href),
480
+ linkListCtrl,
481
+ relListCtrl,
482
+ targetListCtrl,
483
+ classListCtrl
484
+ ],
485
+ onSubmit: function (e) {
486
+ var assumeExternalTargets = $_4b6xsbfujm0ofzch.assumeExternalTargets(editor.settings);
487
+ var insertLink = $_d522tkfzjm0ofzda.link(editor, attachState);
488
+ var removeLink = $_d522tkfzjm0ofzda.unlink(editor);
489
+ var resultData = global$4.extend({}, data, e.data);
490
+ var href = resultData.href;
491
+ if (!href) {
492
+ removeLink();
493
+ return;
781
494
  }
782
-
783
- targetListCtrl = {
784
- name: 'target',
785
- type: 'listbox',
786
- label: 'Target',
787
- values: buildListItems(Settings.getTargetList(editor.settings))
788
- };
789
- }
790
-
791
- if (Settings.hasRelList(editor.settings)) {
792
- relListCtrl = {
793
- name: 'rel',
794
- type: 'listbox',
795
- label: 'Rel',
796
- values: buildListItems(
797
- Settings.getRelList(editor.settings),
798
- function (item) {
799
- if (Settings.allowUnsafeLinkTarget(editor.settings) === false) {
800
- item.value = Utils.toggleTargetRules(item.value, data.target === '_blank');
801
- }
495
+ if (!onlyText || resultData.text === initialText) {
496
+ delete resultData.text;
497
+ }
498
+ if (href.indexOf('@') > 0 && href.indexOf('//') === -1 && href.indexOf('mailto:') === -1) {
499
+ delayedConfirm(editor, 'The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?', function (state) {
500
+ if (state) {
501
+ resultData.href = 'mailto:' + href;
802
502
  }
803
- )
804
- };
805
- }
806
-
807
- if (Settings.hasLinkClassList(editor.settings)) {
808
- classListCtrl = {
809
- name: 'class',
810
- type: 'listbox',
811
- label: 'Class',
812
- values: buildListItems(
813
- Settings.getLinkClassList(editor.settings),
814
- function (item) {
815
- if (item.value) {
816
- item.textStyle = function () {
817
- return editor.formatter.getCssText({ inline: 'a', classes: [item.value] });
818
- };
819
- }
503
+ insertLink(resultData);
504
+ });
505
+ return;
506
+ }
507
+ if (assumeExternalTargets === true && !/^\w+:/i.test(href) || assumeExternalTargets === false && /^\s*www[\.|\d\.]/i.test(href)) {
508
+ delayedConfirm(editor, 'The URL you entered seems to be an external link. Do you want to add the required http:// prefix?', function (state) {
509
+ if (state) {
510
+ resultData.href = 'http://' + href;
820
511
  }
821
- )
822
- };
823
- }
824
-
825
- if (Settings.shouldShowLinkTitle(editor.settings)) {
826
- linkTitleCtrl = {
827
- name: 'title',
828
- type: 'textbox',
829
- label: 'Title',
830
- value: data.title
831
- };
832
- }
833
-
834
- win = editor.windowManager.open({
835
- title: 'Insert link',
836
- data: data,
837
- body: [
838
- {
839
- name: 'href',
840
- type: 'filepicker',
841
- filetype: 'file',
842
- size: 40,
843
- autofocus: true,
844
- label: 'Url',
845
- onchange: urlChange,
846
- onkeyup: updateText,
847
- onbeforecall: onBeforeCall
848
- },
849
- textListCtrl,
850
- linkTitleCtrl,
851
- buildAnchorListControl(data.href),
852
- linkListCtrl,
853
- relListCtrl,
854
- targetListCtrl,
855
- classListCtrl
856
- ],
857
- onSubmit: function (e) {
858
- var assumeExternalTargets = Settings.assumeExternalTargets(editor.settings);
859
- var insertLink = Utils.link(editor, attachState);
860
- var removeLink = Utils.unlink(editor);
861
-
862
- var resultData = Tools.extend({}, data, e.data);
863
- /*eslint dot-notation: 0*/
864
- var href = resultData.href;
865
-
866
- if (!href) {
867
- removeLink();
868
- return;
869
- }
870
-
871
- if (!onlyText || resultData.text === initialText) {
872
- delete resultData.text;
873
- }
874
-
875
- // Is email and not //user@domain.com
876
- if (href.indexOf('@') > 0 && href.indexOf('//') === -1 && href.indexOf('mailto:') === -1) {
877
- delayedConfirm(
878
- editor,
879
- 'The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?',
880
- function (state) {
881
- if (state) {
882
- resultData.href = 'mailto:' + href;
883
- }
884
- insertLink(resultData);
885
- }
886
- );
887
- return;
888
- }
889
-
890
- // Is not protocol prefixed
891
- if ((assumeExternalTargets === true && !/^\w+:/i.test(href)) ||
892
- (assumeExternalTargets === false && /^\s*www[\.|\d\.]/i.test(href))) {
893
- delayedConfirm(
894
- editor,
895
- 'The URL you entered seems to be an external link. Do you want to add the required http:// prefix?',
896
- function (state) {
897
- if (state) {
898
- resultData.href = 'http://' + href;
899
- }
900
- insertLink(resultData);
901
- }
902
- );
903
- return;
904
- }
905
-
906
- insertLink(resultData);
512
+ insertLink(resultData);
513
+ });
514
+ return;
907
515
  }
908
- });
909
- };
910
-
911
- var open = function (editor) {
912
- createLinkList(editor, showDialog);
913
- };
914
-
915
- return {
916
- open: open
917
- };
918
- }
919
- );
920
- /**
921
- * Actions.js
922
- *
923
- * Released under LGPL License.
924
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
925
- *
926
- * License: http://www.tinymce.com/license
927
- * Contributing: http://www.tinymce.com/contributing
928
- */
929
-
930
- define(
931
- 'tinymce.plugins.link.core.Actions',
932
- [
933
- 'tinymce.core.util.VK',
934
- 'tinymce.plugins.link.api.Settings',
935
- 'tinymce.plugins.link.core.OpenUrl',
936
- 'tinymce.plugins.link.core.Utils',
937
- 'tinymce.plugins.link.ui.Dialog'
938
- ],
939
- function (VK, Settings, OpenUrl, Utils, Dialog) {
940
- var getLink = function (editor, elm) {
941
- return editor.dom.getParent(elm, 'a[href]');
942
- };
943
-
944
- var getSelectedLink = function (editor) {
945
- return getLink(editor, editor.selection.getStart());
946
- };
947
-
948
- var getHref = function (elm) {
949
- // Returns the real href value not the resolved a.href value
950
- var href = elm.getAttribute('data-mce-href');
951
- return href ? href : elm.getAttribute('href');
952
- };
953
-
954
- var isContextMenuVisible = function (editor) {
955
- var contextmenu = editor.plugins.contextmenu;
956
- return contextmenu ? contextmenu.isContextMenuVisible() : false;
957
- };
958
-
959
- var hasOnlyAltModifier = function (e) {
960
- return e.altKey === true && e.shiftKey === false && e.ctrlKey === false && e.metaKey === false;
961
- };
516
+ insertLink(resultData);
517
+ }
518
+ });
519
+ };
520
+ var open$1 = function (editor) {
521
+ createLinkList(editor, showDialog);
522
+ };
523
+ var $_8kb7qsg1jm0ofzdg = { open: open$1 };
962
524
 
963
- var gotoLink = function (editor, a) {
964
- if (a) {
965
- var href = getHref(a);
966
- if (/^#/.test(href)) {
967
- var targetEl = editor.$(href);
968
- if (targetEl.length) {
969
- editor.selection.scrollIntoView(targetEl[0], true);
970
- }
971
- } else {
972
- OpenUrl.open(a.href);
525
+ var getLink = function (editor, elm) {
526
+ return editor.dom.getParent(elm, 'a[href]');
527
+ };
528
+ var getSelectedLink = function (editor) {
529
+ return getLink(editor, editor.selection.getStart());
530
+ };
531
+ var getHref = function (elm) {
532
+ var href = elm.getAttribute('data-mce-href');
533
+ return href ? href : elm.getAttribute('href');
534
+ };
535
+ var isContextMenuVisible = function (editor) {
536
+ var contextmenu = editor.plugins.contextmenu;
537
+ return contextmenu ? contextmenu.isContextMenuVisible() : false;
538
+ };
539
+ var hasOnlyAltModifier = function (e) {
540
+ return e.altKey === true && e.shiftKey === false && e.ctrlKey === false && e.metaKey === false;
541
+ };
542
+ var gotoLink = function (editor, a) {
543
+ if (a) {
544
+ var href = getHref(a);
545
+ if (/^#/.test(href)) {
546
+ var targetEl = editor.$(href);
547
+ if (targetEl.length) {
548
+ editor.selection.scrollIntoView(targetEl[0], true);
973
549
  }
550
+ } else {
551
+ $_evd3tpfvjm0ofzck.open(a.href);
974
552
  }
553
+ }
554
+ };
555
+ var openDialog = function (editor) {
556
+ return function () {
557
+ $_8kb7qsg1jm0ofzdg.open(editor);
975
558
  };
976
-
977
- var openDialog = function (editor) {
978
- return function () {
979
- Dialog.open(editor);
980
- };
981
- };
982
-
983
- var gotoSelectedLink = function (editor) {
984
- return function () {
985
- gotoLink(editor, getSelectedLink(editor));
986
- };
559
+ };
560
+ var gotoSelectedLink = function (editor) {
561
+ return function () {
562
+ gotoLink(editor, getSelectedLink(editor));
987
563
  };
988
-
989
- var leftClickedOnAHref = function (editor) {
990
- return function (elm) {
991
- var sel, rng, node;
992
- if (Settings.hasContextToolbar(editor.settings) && !isContextMenuVisible(editor) && Utils.isLink(elm)) {
993
- sel = editor.selection;
994
- rng = sel.getRng();
995
- node = rng.startContainer;
996
- // ignore cursor positions at the beginning/end (to make context toolbar less noisy)
997
- if (node.nodeType === 3 && sel.isCollapsed() && rng.startOffset > 0 && rng.startOffset < node.data.length) {
998
- return true;
999
- }
564
+ };
565
+ var leftClickedOnAHref = function (editor) {
566
+ return function (elm) {
567
+ var sel, rng, node;
568
+ if ($_4b6xsbfujm0ofzch.hasContextToolbar(editor.settings) && !isContextMenuVisible(editor) && $_d522tkfzjm0ofzda.isLink(elm)) {
569
+ sel = editor.selection;
570
+ rng = sel.getRng();
571
+ node = rng.startContainer;
572
+ if (node.nodeType === 3 && sel.isCollapsed() && rng.startOffset > 0 && rng.startOffset < node.data.length) {
573
+ return true;
1000
574
  }
1001
- return false;
1002
- };
575
+ }
576
+ return false;
1003
577
  };
1004
-
1005
- var setupGotoLinks = function (editor) {
1006
- editor.on('click', function (e) {
1007
- var link = getLink(editor, e.target);
1008
- if (link && VK.metaKeyPressed(e)) {
1009
- e.preventDefault();
1010
- gotoLink(editor, link);
1011
- }
1012
- });
1013
-
1014
- editor.on('keydown', function (e) {
1015
- var link = getSelectedLink(editor);
1016
- if (link && e.keyCode === 13 && hasOnlyAltModifier(e)) {
1017
- e.preventDefault();
1018
- gotoLink(editor, link);
1019
- }
578
+ };
579
+ var setupGotoLinks = function (editor) {
580
+ editor.on('click', function (e) {
581
+ var link = getLink(editor, e.target);
582
+ if (link && global$1.metaKeyPressed(e)) {
583
+ e.preventDefault();
584
+ gotoLink(editor, link);
585
+ }
586
+ });
587
+ editor.on('keydown', function (e) {
588
+ var link = getSelectedLink(editor);
589
+ if (link && e.keyCode === 13 && hasOnlyAltModifier(e)) {
590
+ e.preventDefault();
591
+ gotoLink(editor, link);
592
+ }
593
+ });
594
+ };
595
+ var toggleActiveState = function (editor) {
596
+ return function () {
597
+ var self = this;
598
+ editor.on('nodechange', function (e) {
599
+ self.active(!editor.readonly && !!$_d522tkfzjm0ofzda.getAnchorElement(editor, e.element));
1020
600
  });
1021
601
  };
1022
-
1023
- var toggleActiveState = function (editor) {
1024
- return function () {
1025
- var self = this;
1026
- editor.on('nodechange', function (e) {
1027
- self.active(!editor.readonly && !!Utils.getAnchorElement(editor, e.element));
1028
- });
1029
- };
1030
- };
1031
-
1032
- var toggleViewLinkState = function (editor) {
1033
- return function () {
1034
- var self = this;
1035
-
1036
- var toggleVisibility = function (e) {
1037
- if (Utils.hasLinks(e.parents)) {
1038
- self.show();
1039
- } else {
1040
- self.hide();
1041
- }
1042
- };
1043
-
1044
- if (!Utils.hasLinks(editor.dom.getParents(editor.selection.getStart()))) {
602
+ };
603
+ var toggleViewLinkState = function (editor) {
604
+ return function () {
605
+ var self = this;
606
+ var toggleVisibility = function (e) {
607
+ if ($_d522tkfzjm0ofzda.hasLinks(e.parents)) {
608
+ self.show();
609
+ } else {
1045
610
  self.hide();
1046
611
  }
1047
-
1048
- editor.on('nodechange', toggleVisibility);
1049
-
1050
- self.on('remove', function () {
1051
- editor.off('nodechange', toggleVisibility);
1052
- });
1053
612
  };
1054
- };
1055
-
1056
- return {
1057
- openDialog: openDialog,
1058
- gotoSelectedLink: gotoSelectedLink,
1059
- leftClickedOnAHref: leftClickedOnAHref,
1060
- setupGotoLinks: setupGotoLinks,
1061
- toggleActiveState: toggleActiveState,
1062
- toggleViewLinkState: toggleViewLinkState
1063
- };
1064
- }
1065
- );
1066
- /**
1067
- * Commands.js
1068
- *
1069
- * Released under LGPL License.
1070
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1071
- *
1072
- * License: http://www.tinymce.com/license
1073
- * Contributing: http://www.tinymce.com/contributing
1074
- */
1075
-
1076
- define(
1077
- 'tinymce.plugins.link.api.Commands',
1078
- [
1079
- 'tinymce.plugins.link.core.Actions'
1080
- ],
1081
- function (Actions) {
1082
- var register = function (editor) {
1083
- editor.addCommand('mceLink', Actions.openDialog(editor));
1084
- };
1085
-
1086
- return {
1087
- register: register
1088
- };
1089
- }
1090
- );
1091
-
1092
- /**
1093
- * Keyboard.js
1094
- *
1095
- * Released under LGPL License.
1096
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1097
- *
1098
- * License: http://www.tinymce.com/license
1099
- * Contributing: http://www.tinymce.com/contributing
1100
- */
1101
-
1102
- define(
1103
- 'tinymce.plugins.link.core.Keyboard',
1104
- [
1105
- 'tinymce.plugins.link.core.Actions'
1106
- ],
1107
- function (Actions) {
1108
- var setup = function (editor) {
1109
- editor.addShortcut('Meta+K', '', Actions.openDialog(editor));
1110
- };
1111
-
1112
- return {
1113
- setup: setup
1114
- };
1115
- }
1116
- );
1117
-
1118
- /**
1119
- * Controls.js
1120
- *
1121
- * Released under LGPL License.
1122
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1123
- *
1124
- * License: http://www.tinymce.com/license
1125
- * Contributing: http://www.tinymce.com/contributing
1126
- */
1127
-
1128
- define(
1129
- 'tinymce.plugins.link.ui.Controls',
1130
- [
1131
- 'tinymce.plugins.link.core.Actions',
1132
- 'tinymce.plugins.link.core.Utils'
1133
- ],
1134
- function (Actions, Utils) {
1135
-
1136
- var setupButtons = function (editor) {
1137
- editor.addButton('link', {
1138
- active: false,
1139
- icon: 'link',
1140
- tooltip: 'Insert/edit link',
1141
- onclick: Actions.openDialog(editor),
1142
- onpostrender: Actions.toggleActiveState(editor)
1143
- });
1144
-
1145
- editor.addButton('unlink', {
1146
- active: false,
1147
- icon: 'unlink',
1148
- tooltip: 'Remove link',
1149
- onclick: Utils.unlink(editor),
1150
- onpostrender: Actions.toggleActiveState(editor)
1151
- });
1152
-
1153
- if (editor.addContextToolbar) {
1154
- editor.addButton('openlink', {
1155
- icon: 'newtab',
1156
- tooltip: 'Open link',
1157
- onclick: Actions.gotoSelectedLink(editor)
1158
- });
613
+ if (!$_d522tkfzjm0ofzda.hasLinks(editor.dom.getParents(editor.selection.getStart()))) {
614
+ self.hide();
1159
615
  }
616
+ editor.on('nodechange', toggleVisibility);
617
+ self.on('remove', function () {
618
+ editor.off('nodechange', toggleVisibility);
619
+ });
1160
620
  };
621
+ };
622
+ var $_c3czoyfsjm0ofzcd = {
623
+ openDialog: openDialog,
624
+ gotoSelectedLink: gotoSelectedLink,
625
+ leftClickedOnAHref: leftClickedOnAHref,
626
+ setupGotoLinks: setupGotoLinks,
627
+ toggleActiveState: toggleActiveState,
628
+ toggleViewLinkState: toggleViewLinkState
629
+ };
1161
630
 
1162
- var setupMenuItems = function (editor) {
1163
- editor.addMenuItem('openlink', {
1164
- text: 'Open link',
1165
- icon: 'newtab',
1166
- onclick: Actions.gotoSelectedLink(editor),
1167
- onPostRender: Actions.toggleViewLinkState(editor),
1168
- prependToContext: true
1169
- });
631
+ var register = function (editor) {
632
+ editor.addCommand('mceLink', $_c3czoyfsjm0ofzcd.openDialog(editor));
633
+ };
634
+ var $_17rb7bfrjm0ofzcc = { register: register };
1170
635
 
1171
- editor.addMenuItem('link', {
1172
- icon: 'link',
1173
- text: 'Link',
1174
- shortcut: 'Meta+K',
1175
- onclick: Actions.openDialog(editor),
1176
- stateSelector: 'a[href]',
1177
- context: 'insert',
1178
- prependToContext: true
636
+ var setup = function (editor) {
637
+ editor.addShortcut('Meta+K', '', $_c3czoyfsjm0ofzcd.openDialog(editor));
638
+ };
639
+ var $_bygts2g4jm0ofzdn = { setup: setup };
640
+
641
+ var setupButtons = function (editor) {
642
+ editor.addButton('link', {
643
+ active: false,
644
+ icon: 'link',
645
+ tooltip: 'Insert/edit link',
646
+ onclick: $_c3czoyfsjm0ofzcd.openDialog(editor),
647
+ onpostrender: $_c3czoyfsjm0ofzcd.toggleActiveState(editor)
648
+ });
649
+ editor.addButton('unlink', {
650
+ active: false,
651
+ icon: 'unlink',
652
+ tooltip: 'Remove link',
653
+ onclick: $_d522tkfzjm0ofzda.unlink(editor),
654
+ onpostrender: $_c3czoyfsjm0ofzcd.toggleActiveState(editor)
655
+ });
656
+ if (editor.addContextToolbar) {
657
+ editor.addButton('openlink', {
658
+ icon: 'newtab',
659
+ tooltip: 'Open link',
660
+ onclick: $_c3czoyfsjm0ofzcd.gotoSelectedLink(editor)
1179
661
  });
1180
- };
1181
-
1182
- var setupContextToolbars = function (editor) {
1183
- if (editor.addContextToolbar) {
1184
- editor.addContextToolbar(
1185
- Actions.leftClickedOnAHref(editor),
1186
- 'openlink | link unlink'
1187
- );
1188
- }
1189
- };
662
+ }
663
+ };
664
+ var setupMenuItems = function (editor) {
665
+ editor.addMenuItem('openlink', {
666
+ text: 'Open link',
667
+ icon: 'newtab',
668
+ onclick: $_c3czoyfsjm0ofzcd.gotoSelectedLink(editor),
669
+ onPostRender: $_c3czoyfsjm0ofzcd.toggleViewLinkState(editor),
670
+ prependToContext: true
671
+ });
672
+ editor.addMenuItem('link', {
673
+ icon: 'link',
674
+ text: 'Link',
675
+ shortcut: 'Meta+K',
676
+ onclick: $_c3czoyfsjm0ofzcd.openDialog(editor),
677
+ stateSelector: 'a[href]',
678
+ context: 'insert',
679
+ prependToContext: true
680
+ });
681
+ editor.addMenuItem('unlink', {
682
+ icon: 'unlink',
683
+ text: 'Remove link',
684
+ onclick: $_d522tkfzjm0ofzda.unlink(editor),
685
+ stateSelector: 'a[href]'
686
+ });
687
+ };
688
+ var setupContextToolbars = function (editor) {
689
+ if (editor.addContextToolbar) {
690
+ editor.addContextToolbar($_c3czoyfsjm0ofzcd.leftClickedOnAHref(editor), 'openlink | link unlink');
691
+ }
692
+ };
693
+ var $_5nmf4sg5jm0ofzdp = {
694
+ setupButtons: setupButtons,
695
+ setupMenuItems: setupMenuItems,
696
+ setupContextToolbars: setupContextToolbars
697
+ };
1190
698
 
1191
- return {
1192
- setupButtons: setupButtons,
1193
- setupMenuItems: setupMenuItems,
1194
- setupContextToolbars: setupContextToolbars
1195
- };
699
+ global.add('link', function (editor) {
700
+ $_5nmf4sg5jm0ofzdp.setupButtons(editor);
701
+ $_5nmf4sg5jm0ofzdp.setupMenuItems(editor);
702
+ $_5nmf4sg5jm0ofzdp.setupContextToolbars(editor);
703
+ $_c3czoyfsjm0ofzcd.setupGotoLinks(editor);
704
+ $_17rb7bfrjm0ofzcc.register(editor);
705
+ $_bygts2g4jm0ofzdn.setup(editor);
706
+ });
707
+ function Plugin () {
1196
708
  }
1197
- );
1198
- /**
1199
- * Plugin.js
1200
- *
1201
- * Released under LGPL License.
1202
- * Copyright (c) 1999-2017 Ephox Corp. All rights reserved
1203
- *
1204
- * License: http://www.tinymce.com/license
1205
- * Contributing: http://www.tinymce.com/contributing
1206
- */
1207
709
 
1208
- define(
1209
- 'tinymce.plugins.link.Plugin',
1210
- [
1211
- 'tinymce.core.PluginManager',
1212
- 'tinymce.plugins.link.api.Commands',
1213
- 'tinymce.plugins.link.core.Actions',
1214
- 'tinymce.plugins.link.core.Keyboard',
1215
- 'tinymce.plugins.link.ui.Controls'
1216
- ],
1217
- function (PluginManager, Commands, Actions, Keyboard, Controls) {
1218
- PluginManager.add('link', function (editor) {
1219
- Controls.setupButtons(editor);
1220
- Controls.setupMenuItems(editor);
1221
- Controls.setupContextToolbars(editor);
1222
- Actions.setupGotoLinks(editor);
1223
- Commands.register(editor);
1224
- Keyboard.setup(editor);
1225
- });
710
+ return Plugin;
1226
711
 
1227
- return function () { };
1228
- }
1229
- );
1230
- dem('tinymce.plugins.link.Plugin')();
712
+ }());
1231
713
  })();