ace-oqc 1.4.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (401) hide show
  1. package/package.json +7 -0
  2. package/src-noconflict/ace.js +21402 -0
  3. package/src-noconflict/ext-beautify.js +331 -0
  4. package/src-noconflict/ext-elastic_tabstops_lite.js +277 -0
  5. package/src-noconflict/ext-emmet.js +1331 -0
  6. package/src-noconflict/ext-error_marker.js +9 -0
  7. package/src-noconflict/ext-keybinding_menu.js +193 -0
  8. package/src-noconflict/ext-language_tools.js +2166 -0
  9. package/src-noconflict/ext-linking.js +64 -0
  10. package/src-noconflict/ext-modelist.js +248 -0
  11. package/src-noconflict/ext-options.js +799 -0
  12. package/src-noconflict/ext-prompt.js +2806 -0
  13. package/src-noconflict/ext-rtl.js +122 -0
  14. package/src-noconflict/ext-searchbox.js +514 -0
  15. package/src-noconflict/ext-settings_menu.js +820 -0
  16. package/src-noconflict/ext-spellcheck.js +73 -0
  17. package/src-noconflict/ext-split.js +207 -0
  18. package/src-noconflict/ext-static_highlight.js +229 -0
  19. package/src-noconflict/ext-statusbar.js +56 -0
  20. package/src-noconflict/ext-textarea.js +430 -0
  21. package/src-noconflict/ext-themelist.js +67 -0
  22. package/src-noconflict/ext-whitespace.js +213 -0
  23. package/src-noconflict/keybinding-emacs.js +1169 -0
  24. package/src-noconflict/keybinding-sublime.js +422 -0
  25. package/src-noconflict/keybinding-vim.js +6198 -0
  26. package/src-noconflict/mode-abap.js +221 -0
  27. package/src-noconflict/mode-abc.js +271 -0
  28. package/src-noconflict/mode-actionscript.js +275 -0
  29. package/src-noconflict/mode-ada.js +137 -0
  30. package/src-noconflict/mode-apache_conf.js +363 -0
  31. package/src-noconflict/mode-apex.js +457 -0
  32. package/src-noconflict/mode-applescript.js +278 -0
  33. package/src-noconflict/mode-aql.js +102 -0
  34. package/src-noconflict/mode-asciidoc.js +349 -0
  35. package/src-noconflict/mode-asl.js +422 -0
  36. package/src-noconflict/mode-assembly_x86.js +193 -0
  37. package/src-noconflict/mode-autohotkey.js +244 -0
  38. package/src-noconflict/mode-batchfile.js +230 -0
  39. package/src-noconflict/mode-c9search.js +293 -0
  40. package/src-noconflict/mode-c_cpp.js +503 -0
  41. package/src-noconflict/mode-cirru.js +210 -0
  42. package/src-noconflict/mode-clojure.js +315 -0
  43. package/src-noconflict/mode-cobol.js +101 -0
  44. package/src-noconflict/mode-coffee.js +400 -0
  45. package/src-noconflict/mode-coldfusion.js +2596 -0
  46. package/src-noconflict/mode-crystal.js +642 -0
  47. package/src-noconflict/mode-csharp.js +502 -0
  48. package/src-noconflict/mode-csound_document.js +4105 -0
  49. package/src-noconflict/mode-csound_orchestra.js +3035 -0
  50. package/src-noconflict/mode-csound_score.js +462 -0
  51. package/src-noconflict/mode-csp.js +59 -0
  52. package/src-noconflict/mode-css.js +720 -0
  53. package/src-noconflict/mode-curly.js +2564 -0
  54. package/src-noconflict/mode-d.js +520 -0
  55. package/src-noconflict/mode-dart.js +715 -0
  56. package/src-noconflict/mode-diff.js +147 -0
  57. package/src-noconflict/mode-django.js +2595 -0
  58. package/src-noconflict/mode-dockerfile.js +500 -0
  59. package/src-noconflict/mode-dot.js +417 -0
  60. package/src-noconflict/mode-drools.js +498 -0
  61. package/src-noconflict/mode-edifact.js +166 -0
  62. package/src-noconflict/mode-eiffel.js +135 -0
  63. package/src-noconflict/mode-ejs.js +3533 -0
  64. package/src-noconflict/mode-elixir.js +501 -0
  65. package/src-noconflict/mode-elm.js +306 -0
  66. package/src-noconflict/mode-erlang.js +1010 -0
  67. package/src-noconflict/mode-forth.js +297 -0
  68. package/src-noconflict/mode-fortran.js +430 -0
  69. package/src-noconflict/mode-fsharp.js +316 -0
  70. package/src-noconflict/mode-fsl.js +259 -0
  71. package/src-noconflict/mode-ftl.js +1193 -0
  72. package/src-noconflict/mode-gcode.js +93 -0
  73. package/src-noconflict/mode-gherkin.js +168 -0
  74. package/src-noconflict/mode-gitignore.js +59 -0
  75. package/src-noconflict/mode-glsl.js +580 -0
  76. package/src-noconflict/mode-gobstones.js +1090 -0
  77. package/src-noconflict/mode-golang.js +413 -0
  78. package/src-noconflict/mode-graphqlschema.js +214 -0
  79. package/src-noconflict/mode-groovy.js +989 -0
  80. package/src-noconflict/mode-haml.js +1873 -0
  81. package/src-noconflict/mode-handlebars.js +2622 -0
  82. package/src-noconflict/mode-haskell.js +380 -0
  83. package/src-noconflict/mode-haskell_cabal.js +141 -0
  84. package/src-noconflict/mode-haxe.js +386 -0
  85. package/src-noconflict/mode-hjson.js +353 -0
  86. package/src-noconflict/mode-html.js +2509 -0
  87. package/src-noconflict/mode-html_elixir.js +3088 -0
  88. package/src-noconflict/mode-html_ruby.js +3550 -0
  89. package/src-noconflict/mode-ini.js +162 -0
  90. package/src-noconflict/mode-io.js +248 -0
  91. package/src-noconflict/mode-jack.js +346 -0
  92. package/src-noconflict/mode-jade.js +2025 -0
  93. package/src-noconflict/mode-java.js +1038 -0
  94. package/src-noconflict/mode-javascript.js +798 -0
  95. package/src-noconflict/mode-json.js +329 -0
  96. package/src-noconflict/mode-jsoniq.js +2632 -0
  97. package/src-noconflict/mode-jsp.js +1433 -0
  98. package/src-noconflict/mode-jssm.js +325 -0
  99. package/src-noconflict/mode-jsx.js +411 -0
  100. package/src-noconflict/mode-julia.js +303 -0
  101. package/src-noconflict/mode-kotlin.js +797 -0
  102. package/src-noconflict/mode-latex.js +296 -0
  103. package/src-noconflict/mode-less.js +839 -0
  104. package/src-noconflict/mode-liquid.js +2742 -0
  105. package/src-noconflict/mode-lisp.js +112 -0
  106. package/src-noconflict/mode-livescript.js +279 -0
  107. package/src-noconflict/mode-logiql.js +317 -0
  108. package/src-noconflict/mode-logtalk.js +352 -0
  109. package/src-noconflict/mode-lsl.js +343 -0
  110. package/src-noconflict/mode-lua.js +452 -0
  111. package/src-noconflict/mode-luapage.js +3028 -0
  112. package/src-noconflict/mode-lucene.js +154 -0
  113. package/src-noconflict/mode-makefile.js +412 -0
  114. package/src-noconflict/mode-markdown.js +3194 -0
  115. package/src-noconflict/mode-mask.js +1803 -0
  116. package/src-noconflict/mode-matlab.js +263 -0
  117. package/src-noconflict/mode-maze.js +292 -0
  118. package/src-noconflict/mode-mel.js +263 -0
  119. package/src-noconflict/mode-mixal.js +122 -0
  120. package/src-noconflict/mode-mushcode.js +681 -0
  121. package/src-noconflict/mode-mysql.js +167 -0
  122. package/src-noconflict/mode-nginx.js +298 -0
  123. package/src-noconflict/mode-nim.js +363 -0
  124. package/src-noconflict/mode-nix.js +647 -0
  125. package/src-noconflict/mode-nsis.js +312 -0
  126. package/src-noconflict/mode-objectivec.js +740 -0
  127. package/src-noconflict/mode-ocaml.js +421 -0
  128. package/src-noconflict/mode-pascal.js +223 -0
  129. package/src-noconflict/mode-perl.js +381 -0
  130. package/src-noconflict/mode-pgsql.js +1743 -0
  131. package/src-noconflict/mode-php.js +13110 -0
  132. package/src-noconflict/mode-php_laravel_blade.js +13311 -0
  133. package/src-noconflict/mode-pig.js +310 -0
  134. package/src-noconflict/mode-plain_text.js +32 -0
  135. package/src-noconflict/mode-powershell.js +418 -0
  136. package/src-noconflict/mode-praat.js +478 -0
  137. package/src-noconflict/mode-prolog.js +371 -0
  138. package/src-noconflict/mode-properties.js +80 -0
  139. package/src-noconflict/mode-protobuf.js +593 -0
  140. package/src-noconflict/mode-puppet.js +368 -0
  141. package/src-noconflict/mode-python.js +508 -0
  142. package/src-noconflict/mode-r.js +312 -0
  143. package/src-noconflict/mode-razor.js +2875 -0
  144. package/src-noconflict/mode-rdoc.js +243 -0
  145. package/src-noconflict/mode-red.js +450 -0
  146. package/src-noconflict/mode-redshift.js +360 -0
  147. package/src-noconflict/mode-rhtml.js +2808 -0
  148. package/src-noconflict/mode-rst.js +257 -0
  149. package/src-noconflict/mode-ruby.js +1003 -0
  150. package/src-noconflict/mode-rust.js +282 -0
  151. package/src-noconflict/mode-sass.js +529 -0
  152. package/src-noconflict/mode-scad.js +414 -0
  153. package/src-noconflict/mode-scala.js +984 -0
  154. package/src-noconflict/mode-scheme.js +232 -0
  155. package/src-noconflict/mode-scss.js +873 -0
  156. package/src-noconflict/mode-sh.js +449 -0
  157. package/src-noconflict/mode-sjs.js +1015 -0
  158. package/src-noconflict/mode-slim.js +5240 -0
  159. package/src-noconflict/mode-smarty.js +2635 -0
  160. package/src-noconflict/mode-snippets.js +207 -0
  161. package/src-noconflict/mode-soy_template.js +2848 -0
  162. package/src-noconflict/mode-space.js +167 -0
  163. package/src-noconflict/mode-sparql.js +320 -0
  164. package/src-noconflict/mode-sql.js +271 -0
  165. package/src-noconflict/mode-sqlserver.js +445 -0
  166. package/src-noconflict/mode-stylus.js +472 -0
  167. package/src-noconflict/mode-svg.js +1582 -0
  168. package/src-noconflict/mode-swift.js +395 -0
  169. package/src-noconflict/mode-tcl.js +387 -0
  170. package/src-noconflict/mode-terraform.js +400 -0
  171. package/src-noconflict/mode-tex.js +160 -0
  172. package/src-noconflict/mode-text.js +9 -0
  173. package/src-noconflict/mode-textile.js +150 -0
  174. package/src-noconflict/mode-toml.js +153 -0
  175. package/src-noconflict/mode-tsx.js +888 -0
  176. package/src-noconflict/mode-turtle.js +296 -0
  177. package/src-noconflict/mode-twig.js +2693 -0
  178. package/src-noconflict/mode-typescript.js +869 -0
  179. package/src-noconflict/mode-vala.js +677 -0
  180. package/src-noconflict/mode-vbscript.js +635 -0
  181. package/src-noconflict/mode-velocity.js +2792 -0
  182. package/src-noconflict/mode-verilog.js +118 -0
  183. package/src-noconflict/mode-vhdl.js +116 -0
  184. package/src-noconflict/mode-visualforce.js +2640 -0
  185. package/src-noconflict/mode-wollok.js +914 -0
  186. package/src-noconflict/mode-xml.js +676 -0
  187. package/src-noconflict/mode-xquery.js +2644 -0
  188. package/src-noconflict/mode-yaml.js +330 -0
  189. package/src-noconflict/mode-zeek.js +539 -0
  190. package/src-noconflict/qurator-mode.js +120 -0
  191. package/src-noconflict/qurator-worker.js +91 -0
  192. package/src-noconflict/snippets/abap.js +9 -0
  193. package/src-noconflict/snippets/abc.js +45 -0
  194. package/src-noconflict/snippets/actionscript.js +171 -0
  195. package/src-noconflict/snippets/ada.js +9 -0
  196. package/src-noconflict/snippets/apache_conf.js +9 -0
  197. package/src-noconflict/snippets/apex.js +9 -0
  198. package/src-noconflict/snippets/applescript.js +9 -0
  199. package/src-noconflict/snippets/aql.js +9 -0
  200. package/src-noconflict/snippets/asciidoc.js +9 -0
  201. package/src-noconflict/snippets/asl.js +9 -0
  202. package/src-noconflict/snippets/assembly_x86.js +9 -0
  203. package/src-noconflict/snippets/autohotkey.js +9 -0
  204. package/src-noconflict/snippets/batchfile.js +9 -0
  205. package/src-noconflict/snippets/c9search.js +9 -0
  206. package/src-noconflict/snippets/c_cpp.js +145 -0
  207. package/src-noconflict/snippets/cirru.js +9 -0
  208. package/src-noconflict/snippets/clojure.js +104 -0
  209. package/src-noconflict/snippets/cobol.js +9 -0
  210. package/src-noconflict/snippets/coffee.js +109 -0
  211. package/src-noconflict/snippets/coldfusion.js +9 -0
  212. package/src-noconflict/snippets/crystal.js +9 -0
  213. package/src-noconflict/snippets/csharp.js +9 -0
  214. package/src-noconflict/snippets/csound_document.js +24 -0
  215. package/src-noconflict/snippets/csound_orchestra.js +61 -0
  216. package/src-noconflict/snippets/csound_score.js +9 -0
  217. package/src-noconflict/snippets/csp.js +9 -0
  218. package/src-noconflict/snippets/css.js +981 -0
  219. package/src-noconflict/snippets/curly.js +9 -0
  220. package/src-noconflict/snippets/d.js +9 -0
  221. package/src-noconflict/snippets/dart.js +97 -0
  222. package/src-noconflict/snippets/diff.js +25 -0
  223. package/src-noconflict/snippets/django.js +122 -0
  224. package/src-noconflict/snippets/dockerfile.js +9 -0
  225. package/src-noconflict/snippets/dot.js +9 -0
  226. package/src-noconflict/snippets/drools.js +33 -0
  227. package/src-noconflict/snippets/edifact.js +254 -0
  228. package/src-noconflict/snippets/eiffel.js +9 -0
  229. package/src-noconflict/snippets/ejs.js +9 -0
  230. package/src-noconflict/snippets/elixir.js +9 -0
  231. package/src-noconflict/snippets/elm.js +9 -0
  232. package/src-noconflict/snippets/erlang.js +174 -0
  233. package/src-noconflict/snippets/forth.js +9 -0
  234. package/src-noconflict/snippets/fortran.js +9 -0
  235. package/src-noconflict/snippets/fsharp.js +9 -0
  236. package/src-noconflict/snippets/fsl.js +14 -0
  237. package/src-noconflict/snippets/ftl.js +9 -0
  238. package/src-noconflict/snippets/gcode.js +9 -0
  239. package/src-noconflict/snippets/gherkin.js +9 -0
  240. package/src-noconflict/snippets/gitignore.js +9 -0
  241. package/src-noconflict/snippets/glsl.js +9 -0
  242. package/src-noconflict/snippets/gobstones.js +1718 -0
  243. package/src-noconflict/snippets/golang.js +9 -0
  244. package/src-noconflict/snippets/graphqlschema.js +46 -0
  245. package/src-noconflict/snippets/groovy.js +9 -0
  246. package/src-noconflict/snippets/haml.js +34 -0
  247. package/src-noconflict/snippets/handlebars.js +9 -0
  248. package/src-noconflict/snippets/haskell.js +96 -0
  249. package/src-noconflict/snippets/haskell_cabal.js +9 -0
  250. package/src-noconflict/snippets/haxe.js +9 -0
  251. package/src-noconflict/snippets/hjson.js +9 -0
  252. package/src-noconflict/snippets/html.js +867 -0
  253. package/src-noconflict/snippets/html_elixir.js +9 -0
  254. package/src-noconflict/snippets/html_ruby.js +9 -0
  255. package/src-noconflict/snippets/ini.js +9 -0
  256. package/src-noconflict/snippets/io.js +76 -0
  257. package/src-noconflict/snippets/jack.js +9 -0
  258. package/src-noconflict/snippets/jade.js +9 -0
  259. package/src-noconflict/snippets/java.js +254 -0
  260. package/src-noconflict/snippets/javascript.js +209 -0
  261. package/src-noconflict/snippets/json.js +9 -0
  262. package/src-noconflict/snippets/jsoniq.js +75 -0
  263. package/src-noconflict/snippets/jsp.js +113 -0
  264. package/src-noconflict/snippets/jssm.js +9 -0
  265. package/src-noconflict/snippets/jsx.js +9 -0
  266. package/src-noconflict/snippets/julia.js +9 -0
  267. package/src-noconflict/snippets/kotlin.js +9 -0
  268. package/src-noconflict/snippets/latex.js +9 -0
  269. package/src-noconflict/snippets/less.js +9 -0
  270. package/src-noconflict/snippets/liquid.js +895 -0
  271. package/src-noconflict/snippets/lisp.js +9 -0
  272. package/src-noconflict/snippets/livescript.js +9 -0
  273. package/src-noconflict/snippets/logiql.js +9 -0
  274. package/src-noconflict/snippets/logtalk.js +9 -0
  275. package/src-noconflict/snippets/lsl.js +1246 -0
  276. package/src-noconflict/snippets/lua.js +35 -0
  277. package/src-noconflict/snippets/luapage.js +9 -0
  278. package/src-noconflict/snippets/lucene.js +9 -0
  279. package/src-noconflict/snippets/makefile.js +18 -0
  280. package/src-noconflict/snippets/markdown.js +102 -0
  281. package/src-noconflict/snippets/mask.js +9 -0
  282. package/src-noconflict/snippets/matlab.js +9 -0
  283. package/src-noconflict/snippets/maze.js +23 -0
  284. package/src-noconflict/snippets/mel.js +9 -0
  285. package/src-noconflict/snippets/mixal.js +9 -0
  286. package/src-noconflict/snippets/mushcode.js +9 -0
  287. package/src-noconflict/snippets/mysql.js +9 -0
  288. package/src-noconflict/snippets/nginx.js +9 -0
  289. package/src-noconflict/snippets/nim.js +9 -0
  290. package/src-noconflict/snippets/nix.js +9 -0
  291. package/src-noconflict/snippets/nsis.js +9 -0
  292. package/src-noconflict/snippets/objectivec.js +9 -0
  293. package/src-noconflict/snippets/ocaml.js +9 -0
  294. package/src-noconflict/snippets/pascal.js +9 -0
  295. package/src-noconflict/snippets/perl.js +361 -0
  296. package/src-noconflict/snippets/pgsql.js +9 -0
  297. package/src-noconflict/snippets/php.js +397 -0
  298. package/src-noconflict/snippets/php_laravel_blade.js +9 -0
  299. package/src-noconflict/snippets/pig.js +9 -0
  300. package/src-noconflict/snippets/plain_text.js +9 -0
  301. package/src-noconflict/snippets/powershell.js +9 -0
  302. package/src-noconflict/snippets/praat.js +9 -0
  303. package/src-noconflict/snippets/prolog.js +9 -0
  304. package/src-noconflict/snippets/properties.js +9 -0
  305. package/src-noconflict/snippets/protobuf.js +9 -0
  306. package/src-noconflict/snippets/puppet.js +9 -0
  307. package/src-noconflict/snippets/python.js +172 -0
  308. package/src-noconflict/snippets/r.js +135 -0
  309. package/src-noconflict/snippets/razor.js +17 -0
  310. package/src-noconflict/snippets/rdoc.js +9 -0
  311. package/src-noconflict/snippets/red.js +9 -0
  312. package/src-noconflict/snippets/redshift.js +9 -0
  313. package/src-noconflict/snippets/rhtml.js +9 -0
  314. package/src-noconflict/snippets/rst.js +36 -0
  315. package/src-noconflict/snippets/ruby.js +942 -0
  316. package/src-noconflict/snippets/rust.js +9 -0
  317. package/src-noconflict/snippets/sass.js +9 -0
  318. package/src-noconflict/snippets/scad.js +9 -0
  319. package/src-noconflict/snippets/scala.js +9 -0
  320. package/src-noconflict/snippets/scheme.js +9 -0
  321. package/src-noconflict/snippets/scss.js +9 -0
  322. package/src-noconflict/snippets/sh.js +97 -0
  323. package/src-noconflict/snippets/sjs.js +9 -0
  324. package/src-noconflict/snippets/slim.js +9 -0
  325. package/src-noconflict/snippets/smarty.js +9 -0
  326. package/src-noconflict/snippets/snippets.js +23 -0
  327. package/src-noconflict/snippets/soy_template.js +9 -0
  328. package/src-noconflict/snippets/space.js +9 -0
  329. package/src-noconflict/snippets/sparql.js +9 -0
  330. package/src-noconflict/snippets/sql.js +40 -0
  331. package/src-noconflict/snippets/sqlserver.js +83 -0
  332. package/src-noconflict/snippets/stylus.js +9 -0
  333. package/src-noconflict/snippets/svg.js +9 -0
  334. package/src-noconflict/snippets/swift.js +9 -0
  335. package/src-noconflict/snippets/tcl.js +106 -0
  336. package/src-noconflict/snippets/terraform.js +9 -0
  337. package/src-noconflict/snippets/tex.js +204 -0
  338. package/src-noconflict/snippets/text.js +9 -0
  339. package/src-noconflict/snippets/textile.js +44 -0
  340. package/src-noconflict/snippets/toml.js +9 -0
  341. package/src-noconflict/snippets/tsx.js +9 -0
  342. package/src-noconflict/snippets/turtle.js +9 -0
  343. package/src-noconflict/snippets/twig.js +9 -0
  344. package/src-noconflict/snippets/typescript.js +9 -0
  345. package/src-noconflict/snippets/vala.js +200 -0
  346. package/src-noconflict/snippets/vbscript.js +9 -0
  347. package/src-noconflict/snippets/velocity.js +43 -0
  348. package/src-noconflict/snippets/verilog.js +9 -0
  349. package/src-noconflict/snippets/vhdl.js +9 -0
  350. package/src-noconflict/snippets/visualforce.js +9 -0
  351. package/src-noconflict/snippets/wollok.js +98 -0
  352. package/src-noconflict/snippets/xml.js +9 -0
  353. package/src-noconflict/snippets/xquery.js +75 -0
  354. package/src-noconflict/snippets/yaml.js +9 -0
  355. package/src-noconflict/snippets/zeek.js +9 -0
  356. package/src-noconflict/theme-ambiance.js +185 -0
  357. package/src-noconflict/theme-chaos.js +163 -0
  358. package/src-noconflict/theme-chrome.js +135 -0
  359. package/src-noconflict/theme-clouds.js +102 -0
  360. package/src-noconflict/theme-clouds_midnight.js +103 -0
  361. package/src-noconflict/theme-cobalt.js +120 -0
  362. package/src-noconflict/theme-crimson_editor.js +125 -0
  363. package/src-noconflict/theme-dawn.js +115 -0
  364. package/src-noconflict/theme-dracula.js +135 -0
  365. package/src-noconflict/theme-dreamweaver.js +148 -0
  366. package/src-noconflict/theme-eclipse.js +105 -0
  367. package/src-noconflict/theme-github.js +110 -0
  368. package/src-noconflict/theme-gob.js +119 -0
  369. package/src-noconflict/theme-gruvbox.js +89 -0
  370. package/src-noconflict/theme-idle_fingers.js +103 -0
  371. package/src-noconflict/theme-iplastic.js +128 -0
  372. package/src-noconflict/theme-katzenmilch.js +128 -0
  373. package/src-noconflict/theme-kr_theme.js +111 -0
  374. package/src-noconflict/theme-kuroir.js +68 -0
  375. package/src-noconflict/theme-merbivore.js +102 -0
  376. package/src-noconflict/theme-merbivore_soft.js +103 -0
  377. package/src-noconflict/theme-mono_industrial.js +114 -0
  378. package/src-noconflict/theme-monokai.js +112 -0
  379. package/src-noconflict/theme-pastel_on_dark.js +115 -0
  380. package/src-noconflict/theme-solarized_dark.js +95 -0
  381. package/src-noconflict/theme-solarized_light.js +98 -0
  382. package/src-noconflict/theme-sqlserver.js +145 -0
  383. package/src-noconflict/theme-terminal.js +121 -0
  384. package/src-noconflict/theme-textmate.js +137 -0
  385. package/src-noconflict/theme-tomorrow.js +115 -0
  386. package/src-noconflict/theme-tomorrow_night.js +115 -0
  387. package/src-noconflict/theme-tomorrow_night_blue.js +113 -0
  388. package/src-noconflict/theme-tomorrow_night_bright.js +128 -0
  389. package/src-noconflict/theme-tomorrow_night_eighties.js +115 -0
  390. package/src-noconflict/theme-twilight.js +116 -0
  391. package/src-noconflict/theme-vibrant_ink.js +101 -0
  392. package/src-noconflict/theme-xcode.js +95 -0
  393. package/src-noconflict/worker-coffee.js +1470 -0
  394. package/src-noconflict/worker-css.js +9000 -0
  395. package/src-noconflict/worker-html.js +10922 -0
  396. package/src-noconflict/worker-javascript.js +15001 -0
  397. package/src-noconflict/worker-json.js +1715 -0
  398. package/src-noconflict/worker-lua.js +3608 -0
  399. package/src-noconflict/worker-php.js +3687 -0
  400. package/src-noconflict/worker-xml.js +3208 -0
  401. package/src-noconflict/worker-xquery.js +57668 -0
@@ -0,0 +1,1715 @@
1
+ "no use strict";
2
+ !(function(window) {
3
+ if (typeof window.window != "undefined" && window.document)
4
+ return;
5
+ if (window.require && window.define)
6
+ return;
7
+
8
+ if (!window.console) {
9
+ window.console = function() {
10
+ var msgs = Array.prototype.slice.call(arguments, 0);
11
+ postMessage({type: "log", data: msgs});
12
+ };
13
+ window.console.error =
14
+ window.console.warn =
15
+ window.console.log =
16
+ window.console.trace = window.console;
17
+ }
18
+ window.window = window;
19
+ window.ace = window;
20
+
21
+ window.onerror = function(message, file, line, col, err) {
22
+ postMessage({type: "error", data: {
23
+ message: message,
24
+ data: err.data,
25
+ file: file,
26
+ line: line,
27
+ col: col,
28
+ stack: err.stack
29
+ }});
30
+ };
31
+
32
+ window.normalizeModule = function(parentId, moduleName) {
33
+ // normalize plugin requires
34
+ if (moduleName.indexOf("!") !== -1) {
35
+ var chunks = moduleName.split("!");
36
+ return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]);
37
+ }
38
+ // normalize relative requires
39
+ if (moduleName.charAt(0) == ".") {
40
+ var base = parentId.split("/").slice(0, -1).join("/");
41
+ moduleName = (base ? base + "/" : "") + moduleName;
42
+
43
+ while (moduleName.indexOf(".") !== -1 && previous != moduleName) {
44
+ var previous = moduleName;
45
+ moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, "");
46
+ }
47
+ }
48
+
49
+ return moduleName;
50
+ };
51
+
52
+ window.require = function require(parentId, id) {
53
+ if (!id) {
54
+ id = parentId;
55
+ parentId = null;
56
+ }
57
+ if (!id.charAt)
58
+ throw new Error("worker.js require() accepts only (parentId, id) as arguments");
59
+
60
+ id = window.normalizeModule(parentId, id);
61
+
62
+ var module = window.require.modules[id];
63
+ if (module) {
64
+ if (!module.initialized) {
65
+ module.initialized = true;
66
+ module.exports = module.factory().exports;
67
+ }
68
+ return module.exports;
69
+ }
70
+
71
+ if (!window.require.tlns)
72
+ return console.log("unable to load " + id);
73
+
74
+ var path = resolveModuleId(id, window.require.tlns);
75
+ if (path.slice(-3) != ".js") path += ".js";
76
+
77
+ window.require.id = id;
78
+ window.require.modules[id] = {}; // prevent infinite loop on broken modules
79
+ importScripts(path);
80
+ return window.require(parentId, id);
81
+ };
82
+ function resolveModuleId(id, paths) {
83
+ var testPath = id, tail = "";
84
+ while (testPath) {
85
+ var alias = paths[testPath];
86
+ if (typeof alias == "string") {
87
+ return alias + tail;
88
+ } else if (alias) {
89
+ return alias.location.replace(/\/*$/, "/") + (tail || alias.main || alias.name);
90
+ } else if (alias === false) {
91
+ return "";
92
+ }
93
+ var i = testPath.lastIndexOf("/");
94
+ if (i === -1) break;
95
+ tail = testPath.substr(i) + tail;
96
+ testPath = testPath.slice(0, i);
97
+ }
98
+ return id;
99
+ }
100
+ window.require.modules = {};
101
+ window.require.tlns = {};
102
+
103
+ window.define = function(id, deps, factory) {
104
+ if (arguments.length == 2) {
105
+ factory = deps;
106
+ if (typeof id != "string") {
107
+ deps = id;
108
+ id = window.require.id;
109
+ }
110
+ } else if (arguments.length == 1) {
111
+ factory = id;
112
+ deps = [];
113
+ id = window.require.id;
114
+ }
115
+
116
+ if (typeof factory != "function") {
117
+ window.require.modules[id] = {
118
+ exports: factory,
119
+ initialized: true
120
+ };
121
+ return;
122
+ }
123
+
124
+ if (!deps.length)
125
+ // If there is no dependencies, we inject "require", "exports" and
126
+ // "module" as dependencies, to provide CommonJS compatibility.
127
+ deps = ["require", "exports", "module"];
128
+
129
+ var req = function(childId) {
130
+ return window.require(id, childId);
131
+ };
132
+
133
+ window.require.modules[id] = {
134
+ exports: {},
135
+ factory: function() {
136
+ var module = this;
137
+ var returnExports = factory.apply(this, deps.slice(0, factory.length).map(function(dep) {
138
+ switch (dep) {
139
+ // Because "require", "exports" and "module" aren't actual
140
+ // dependencies, we must handle them seperately.
141
+ case "require": return req;
142
+ case "exports": return module.exports;
143
+ case "module": return module;
144
+ // But for all other dependencies, we can just go ahead and
145
+ // require them.
146
+ default: return req(dep);
147
+ }
148
+ }));
149
+ if (returnExports)
150
+ module.exports = returnExports;
151
+ return module;
152
+ }
153
+ };
154
+ };
155
+ window.define.amd = {};
156
+ require.tlns = {};
157
+ window.initBaseUrls = function initBaseUrls(topLevelNamespaces) {
158
+ for (var i in topLevelNamespaces)
159
+ require.tlns[i] = topLevelNamespaces[i];
160
+ };
161
+
162
+ window.initSender = function initSender() {
163
+
164
+ var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter;
165
+ var oop = window.require("ace/lib/oop");
166
+
167
+ var Sender = function() {};
168
+
169
+ (function() {
170
+
171
+ oop.implement(this, EventEmitter);
172
+
173
+ this.callback = function(data, callbackId) {
174
+ postMessage({
175
+ type: "call",
176
+ id: callbackId,
177
+ data: data
178
+ });
179
+ };
180
+
181
+ this.emit = function(name, data) {
182
+ postMessage({
183
+ type: "event",
184
+ name: name,
185
+ data: data
186
+ });
187
+ };
188
+
189
+ }).call(Sender.prototype);
190
+
191
+ return new Sender();
192
+ };
193
+
194
+ var main = window.main = null;
195
+ var sender = window.sender = null;
196
+
197
+ window.onmessage = function(e) {
198
+ var msg = e.data;
199
+ if (msg.event && sender) {
200
+ sender._signal(msg.event, msg.data);
201
+ }
202
+ else if (msg.command) {
203
+ if (main[msg.command])
204
+ main[msg.command].apply(main, msg.args);
205
+ else if (window[msg.command])
206
+ window[msg.command].apply(window, msg.args);
207
+ else
208
+ throw new Error("Unknown command:" + msg.command);
209
+ }
210
+ else if (msg.init) {
211
+ window.initBaseUrls(msg.tlns);
212
+ sender = window.sender = window.initSender();
213
+ var clazz = require(msg.module)[msg.classname];
214
+ main = window.main = new clazz(sender);
215
+ }
216
+ };
217
+ })(this);
218
+
219
+ ace.define("ace/lib/oop",[], function(require, exports, module) {
220
+ "use strict";
221
+
222
+ exports.inherits = function(ctor, superCtor) {
223
+ ctor.super_ = superCtor;
224
+ ctor.prototype = Object.create(superCtor.prototype, {
225
+ constructor: {
226
+ value: ctor,
227
+ enumerable: false,
228
+ writable: true,
229
+ configurable: true
230
+ }
231
+ });
232
+ };
233
+
234
+ exports.mixin = function(obj, mixin) {
235
+ for (var key in mixin) {
236
+ obj[key] = mixin[key];
237
+ }
238
+ return obj;
239
+ };
240
+
241
+ exports.implement = function(proto, mixin) {
242
+ exports.mixin(proto, mixin);
243
+ };
244
+
245
+ });
246
+
247
+ ace.define("ace/range",[], function(require, exports, module) {
248
+ "use strict";
249
+ var comparePoints = function(p1, p2) {
250
+ return p1.row - p2.row || p1.column - p2.column;
251
+ };
252
+ var Range = function(startRow, startColumn, endRow, endColumn) {
253
+ this.start = {
254
+ row: startRow,
255
+ column: startColumn
256
+ };
257
+
258
+ this.end = {
259
+ row: endRow,
260
+ column: endColumn
261
+ };
262
+ };
263
+
264
+ (function() {
265
+ this.isEqual = function(range) {
266
+ return this.start.row === range.start.row &&
267
+ this.end.row === range.end.row &&
268
+ this.start.column === range.start.column &&
269
+ this.end.column === range.end.column;
270
+ };
271
+ this.toString = function() {
272
+ return ("Range: [" + this.start.row + "/" + this.start.column +
273
+ "] -> [" + this.end.row + "/" + this.end.column + "]");
274
+ };
275
+
276
+ this.contains = function(row, column) {
277
+ return this.compare(row, column) == 0;
278
+ };
279
+ this.compareRange = function(range) {
280
+ var cmp,
281
+ end = range.end,
282
+ start = range.start;
283
+
284
+ cmp = this.compare(end.row, end.column);
285
+ if (cmp == 1) {
286
+ cmp = this.compare(start.row, start.column);
287
+ if (cmp == 1) {
288
+ return 2;
289
+ } else if (cmp == 0) {
290
+ return 1;
291
+ } else {
292
+ return 0;
293
+ }
294
+ } else if (cmp == -1) {
295
+ return -2;
296
+ } else {
297
+ cmp = this.compare(start.row, start.column);
298
+ if (cmp == -1) {
299
+ return -1;
300
+ } else if (cmp == 1) {
301
+ return 42;
302
+ } else {
303
+ return 0;
304
+ }
305
+ }
306
+ };
307
+ this.comparePoint = function(p) {
308
+ return this.compare(p.row, p.column);
309
+ };
310
+ this.containsRange = function(range) {
311
+ return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0;
312
+ };
313
+ this.intersects = function(range) {
314
+ var cmp = this.compareRange(range);
315
+ return (cmp == -1 || cmp == 0 || cmp == 1);
316
+ };
317
+ this.isEnd = function(row, column) {
318
+ return this.end.row == row && this.end.column == column;
319
+ };
320
+ this.isStart = function(row, column) {
321
+ return this.start.row == row && this.start.column == column;
322
+ };
323
+ this.setStart = function(row, column) {
324
+ if (typeof row == "object") {
325
+ this.start.column = row.column;
326
+ this.start.row = row.row;
327
+ } else {
328
+ this.start.row = row;
329
+ this.start.column = column;
330
+ }
331
+ };
332
+ this.setEnd = function(row, column) {
333
+ if (typeof row == "object") {
334
+ this.end.column = row.column;
335
+ this.end.row = row.row;
336
+ } else {
337
+ this.end.row = row;
338
+ this.end.column = column;
339
+ }
340
+ };
341
+ this.inside = function(row, column) {
342
+ if (this.compare(row, column) == 0) {
343
+ if (this.isEnd(row, column) || this.isStart(row, column)) {
344
+ return false;
345
+ } else {
346
+ return true;
347
+ }
348
+ }
349
+ return false;
350
+ };
351
+ this.insideStart = function(row, column) {
352
+ if (this.compare(row, column) == 0) {
353
+ if (this.isEnd(row, column)) {
354
+ return false;
355
+ } else {
356
+ return true;
357
+ }
358
+ }
359
+ return false;
360
+ };
361
+ this.insideEnd = function(row, column) {
362
+ if (this.compare(row, column) == 0) {
363
+ if (this.isStart(row, column)) {
364
+ return false;
365
+ } else {
366
+ return true;
367
+ }
368
+ }
369
+ return false;
370
+ };
371
+ this.compare = function(row, column) {
372
+ if (!this.isMultiLine()) {
373
+ if (row === this.start.row) {
374
+ return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0);
375
+ }
376
+ }
377
+
378
+ if (row < this.start.row)
379
+ return -1;
380
+
381
+ if (row > this.end.row)
382
+ return 1;
383
+
384
+ if (this.start.row === row)
385
+ return column >= this.start.column ? 0 : -1;
386
+
387
+ if (this.end.row === row)
388
+ return column <= this.end.column ? 0 : 1;
389
+
390
+ return 0;
391
+ };
392
+ this.compareStart = function(row, column) {
393
+ if (this.start.row == row && this.start.column == column) {
394
+ return -1;
395
+ } else {
396
+ return this.compare(row, column);
397
+ }
398
+ };
399
+ this.compareEnd = function(row, column) {
400
+ if (this.end.row == row && this.end.column == column) {
401
+ return 1;
402
+ } else {
403
+ return this.compare(row, column);
404
+ }
405
+ };
406
+ this.compareInside = function(row, column) {
407
+ if (this.end.row == row && this.end.column == column) {
408
+ return 1;
409
+ } else if (this.start.row == row && this.start.column == column) {
410
+ return -1;
411
+ } else {
412
+ return this.compare(row, column);
413
+ }
414
+ };
415
+ this.clipRows = function(firstRow, lastRow) {
416
+ if (this.end.row > lastRow)
417
+ var end = {row: lastRow + 1, column: 0};
418
+ else if (this.end.row < firstRow)
419
+ var end = {row: firstRow, column: 0};
420
+
421
+ if (this.start.row > lastRow)
422
+ var start = {row: lastRow + 1, column: 0};
423
+ else if (this.start.row < firstRow)
424
+ var start = {row: firstRow, column: 0};
425
+
426
+ return Range.fromPoints(start || this.start, end || this.end);
427
+ };
428
+ this.extend = function(row, column) {
429
+ var cmp = this.compare(row, column);
430
+
431
+ if (cmp == 0)
432
+ return this;
433
+ else if (cmp == -1)
434
+ var start = {row: row, column: column};
435
+ else
436
+ var end = {row: row, column: column};
437
+
438
+ return Range.fromPoints(start || this.start, end || this.end);
439
+ };
440
+
441
+ this.isEmpty = function() {
442
+ return (this.start.row === this.end.row && this.start.column === this.end.column);
443
+ };
444
+ this.isMultiLine = function() {
445
+ return (this.start.row !== this.end.row);
446
+ };
447
+ this.clone = function() {
448
+ return Range.fromPoints(this.start, this.end);
449
+ };
450
+ this.collapseRows = function() {
451
+ if (this.end.column == 0)
452
+ return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0);
453
+ else
454
+ return new Range(this.start.row, 0, this.end.row, 0);
455
+ };
456
+ this.toScreenRange = function(session) {
457
+ var screenPosStart = session.documentToScreenPosition(this.start);
458
+ var screenPosEnd = session.documentToScreenPosition(this.end);
459
+
460
+ return new Range(
461
+ screenPosStart.row, screenPosStart.column,
462
+ screenPosEnd.row, screenPosEnd.column
463
+ );
464
+ };
465
+ this.moveBy = function(row, column) {
466
+ this.start.row += row;
467
+ this.start.column += column;
468
+ this.end.row += row;
469
+ this.end.column += column;
470
+ };
471
+
472
+ }).call(Range.prototype);
473
+ Range.fromPoints = function(start, end) {
474
+ return new Range(start.row, start.column, end.row, end.column);
475
+ };
476
+ Range.comparePoints = comparePoints;
477
+
478
+ Range.comparePoints = function(p1, p2) {
479
+ return p1.row - p2.row || p1.column - p2.column;
480
+ };
481
+
482
+
483
+ exports.Range = Range;
484
+ });
485
+
486
+ ace.define("ace/apply_delta",[], function(require, exports, module) {
487
+ "use strict";
488
+
489
+ function throwDeltaError(delta, errorText){
490
+ console.log("Invalid Delta:", delta);
491
+ throw "Invalid Delta: " + errorText;
492
+ }
493
+
494
+ function positionInDocument(docLines, position) {
495
+ return position.row >= 0 && position.row < docLines.length &&
496
+ position.column >= 0 && position.column <= docLines[position.row].length;
497
+ }
498
+
499
+ function validateDelta(docLines, delta) {
500
+ if (delta.action != "insert" && delta.action != "remove")
501
+ throwDeltaError(delta, "delta.action must be 'insert' or 'remove'");
502
+ if (!(delta.lines instanceof Array))
503
+ throwDeltaError(delta, "delta.lines must be an Array");
504
+ if (!delta.start || !delta.end)
505
+ throwDeltaError(delta, "delta.start/end must be an present");
506
+ var start = delta.start;
507
+ if (!positionInDocument(docLines, delta.start))
508
+ throwDeltaError(delta, "delta.start must be contained in document");
509
+ var end = delta.end;
510
+ if (delta.action == "remove" && !positionInDocument(docLines, end))
511
+ throwDeltaError(delta, "delta.end must contained in document for 'remove' actions");
512
+ var numRangeRows = end.row - start.row;
513
+ var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0));
514
+ if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars)
515
+ throwDeltaError(delta, "delta.range must match delta lines");
516
+ }
517
+
518
+ exports.applyDelta = function(docLines, delta, doNotValidate) {
519
+
520
+ var row = delta.start.row;
521
+ var startColumn = delta.start.column;
522
+ var line = docLines[row] || "";
523
+ switch (delta.action) {
524
+ case "insert":
525
+ var lines = delta.lines;
526
+ if (lines.length === 1) {
527
+ docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn);
528
+ } else {
529
+ var args = [row, 1].concat(delta.lines);
530
+ docLines.splice.apply(docLines, args);
531
+ docLines[row] = line.substring(0, startColumn) + docLines[row];
532
+ docLines[row + delta.lines.length - 1] += line.substring(startColumn);
533
+ }
534
+ break;
535
+ case "remove":
536
+ var endColumn = delta.end.column;
537
+ var endRow = delta.end.row;
538
+ if (row === endRow) {
539
+ docLines[row] = line.substring(0, startColumn) + line.substring(endColumn);
540
+ } else {
541
+ docLines.splice(
542
+ row, endRow - row + 1,
543
+ line.substring(0, startColumn) + docLines[endRow].substring(endColumn)
544
+ );
545
+ }
546
+ break;
547
+ }
548
+ };
549
+ });
550
+
551
+ ace.define("ace/lib/event_emitter",[], function(require, exports, module) {
552
+ "use strict";
553
+
554
+ var EventEmitter = {};
555
+ var stopPropagation = function() { this.propagationStopped = true; };
556
+ var preventDefault = function() { this.defaultPrevented = true; };
557
+
558
+ EventEmitter._emit =
559
+ EventEmitter._dispatchEvent = function(eventName, e) {
560
+ this._eventRegistry || (this._eventRegistry = {});
561
+ this._defaultHandlers || (this._defaultHandlers = {});
562
+
563
+ var listeners = this._eventRegistry[eventName] || [];
564
+ var defaultHandler = this._defaultHandlers[eventName];
565
+ if (!listeners.length && !defaultHandler)
566
+ return;
567
+
568
+ if (typeof e != "object" || !e)
569
+ e = {};
570
+
571
+ if (!e.type)
572
+ e.type = eventName;
573
+ if (!e.stopPropagation)
574
+ e.stopPropagation = stopPropagation;
575
+ if (!e.preventDefault)
576
+ e.preventDefault = preventDefault;
577
+
578
+ listeners = listeners.slice();
579
+ for (var i=0; i<listeners.length; i++) {
580
+ listeners[i](e, this);
581
+ if (e.propagationStopped)
582
+ break;
583
+ }
584
+
585
+ if (defaultHandler && !e.defaultPrevented)
586
+ return defaultHandler(e, this);
587
+ };
588
+
589
+
590
+ EventEmitter._signal = function(eventName, e) {
591
+ var listeners = (this._eventRegistry || {})[eventName];
592
+ if (!listeners)
593
+ return;
594
+ listeners = listeners.slice();
595
+ for (var i=0; i<listeners.length; i++)
596
+ listeners[i](e, this);
597
+ };
598
+
599
+ EventEmitter.once = function(eventName, callback) {
600
+ var _self = this;
601
+ this.on(eventName, function newCallback() {
602
+ _self.off(eventName, newCallback);
603
+ callback.apply(null, arguments);
604
+ });
605
+ if (!callback) {
606
+ return new Promise(function(resolve) {
607
+ callback = resolve;
608
+ });
609
+ }
610
+ };
611
+
612
+
613
+ EventEmitter.setDefaultHandler = function(eventName, callback) {
614
+ var handlers = this._defaultHandlers;
615
+ if (!handlers)
616
+ handlers = this._defaultHandlers = {_disabled_: {}};
617
+
618
+ if (handlers[eventName]) {
619
+ var old = handlers[eventName];
620
+ var disabled = handlers._disabled_[eventName];
621
+ if (!disabled)
622
+ handlers._disabled_[eventName] = disabled = [];
623
+ disabled.push(old);
624
+ var i = disabled.indexOf(callback);
625
+ if (i != -1)
626
+ disabled.splice(i, 1);
627
+ }
628
+ handlers[eventName] = callback;
629
+ };
630
+ EventEmitter.removeDefaultHandler = function(eventName, callback) {
631
+ var handlers = this._defaultHandlers;
632
+ if (!handlers)
633
+ return;
634
+ var disabled = handlers._disabled_[eventName];
635
+
636
+ if (handlers[eventName] == callback) {
637
+ if (disabled)
638
+ this.setDefaultHandler(eventName, disabled.pop());
639
+ } else if (disabled) {
640
+ var i = disabled.indexOf(callback);
641
+ if (i != -1)
642
+ disabled.splice(i, 1);
643
+ }
644
+ };
645
+
646
+ EventEmitter.on =
647
+ EventEmitter.addEventListener = function(eventName, callback, capturing) {
648
+ this._eventRegistry = this._eventRegistry || {};
649
+
650
+ var listeners = this._eventRegistry[eventName];
651
+ if (!listeners)
652
+ listeners = this._eventRegistry[eventName] = [];
653
+
654
+ if (listeners.indexOf(callback) == -1)
655
+ listeners[capturing ? "unshift" : "push"](callback);
656
+ return callback;
657
+ };
658
+
659
+ EventEmitter.off =
660
+ EventEmitter.removeListener =
661
+ EventEmitter.removeEventListener = function(eventName, callback) {
662
+ this._eventRegistry = this._eventRegistry || {};
663
+
664
+ var listeners = this._eventRegistry[eventName];
665
+ if (!listeners)
666
+ return;
667
+
668
+ var index = listeners.indexOf(callback);
669
+ if (index !== -1)
670
+ listeners.splice(index, 1);
671
+ };
672
+
673
+ EventEmitter.removeAllListeners = function(eventName) {
674
+ if (!eventName) this._eventRegistry = this._defaultHandlers = undefined;
675
+ if (this._eventRegistry) this._eventRegistry[eventName] = undefined;
676
+ if (this._defaultHandlers) this._defaultHandlers[eventName] = undefined;
677
+ };
678
+
679
+ exports.EventEmitter = EventEmitter;
680
+
681
+ });
682
+
683
+ ace.define("ace/anchor",[], function(require, exports, module) {
684
+ "use strict";
685
+
686
+ var oop = require("./lib/oop");
687
+ var EventEmitter = require("./lib/event_emitter").EventEmitter;
688
+
689
+ var Anchor = exports.Anchor = function(doc, row, column) {
690
+ this.$onChange = this.onChange.bind(this);
691
+ this.attach(doc);
692
+
693
+ if (typeof column == "undefined")
694
+ this.setPosition(row.row, row.column);
695
+ else
696
+ this.setPosition(row, column);
697
+ };
698
+
699
+ (function() {
700
+
701
+ oop.implement(this, EventEmitter);
702
+ this.getPosition = function() {
703
+ return this.$clipPositionToDocument(this.row, this.column);
704
+ };
705
+ this.getDocument = function() {
706
+ return this.document;
707
+ };
708
+ this.$insertRight = false;
709
+ this.onChange = function(delta) {
710
+ if (delta.start.row == delta.end.row && delta.start.row != this.row)
711
+ return;
712
+
713
+ if (delta.start.row > this.row)
714
+ return;
715
+
716
+ var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight);
717
+ this.setPosition(point.row, point.column, true);
718
+ };
719
+
720
+ function $pointsInOrder(point1, point2, equalPointsInOrder) {
721
+ var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column;
722
+ return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter);
723
+ }
724
+
725
+ function $getTransformedPoint(delta, point, moveIfEqual) {
726
+ var deltaIsInsert = delta.action == "insert";
727
+ var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row);
728
+ var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column);
729
+ var deltaStart = delta.start;
730
+ var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range.
731
+ if ($pointsInOrder(point, deltaStart, moveIfEqual)) {
732
+ return {
733
+ row: point.row,
734
+ column: point.column
735
+ };
736
+ }
737
+ if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) {
738
+ return {
739
+ row: point.row + deltaRowShift,
740
+ column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0)
741
+ };
742
+ }
743
+
744
+ return {
745
+ row: deltaStart.row,
746
+ column: deltaStart.column
747
+ };
748
+ }
749
+ this.setPosition = function(row, column, noClip) {
750
+ var pos;
751
+ if (noClip) {
752
+ pos = {
753
+ row: row,
754
+ column: column
755
+ };
756
+ } else {
757
+ pos = this.$clipPositionToDocument(row, column);
758
+ }
759
+
760
+ if (this.row == pos.row && this.column == pos.column)
761
+ return;
762
+
763
+ var old = {
764
+ row: this.row,
765
+ column: this.column
766
+ };
767
+
768
+ this.row = pos.row;
769
+ this.column = pos.column;
770
+ this._signal("change", {
771
+ old: old,
772
+ value: pos
773
+ });
774
+ };
775
+ this.detach = function() {
776
+ this.document.off("change", this.$onChange);
777
+ };
778
+ this.attach = function(doc) {
779
+ this.document = doc || this.document;
780
+ this.document.on("change", this.$onChange);
781
+ };
782
+ this.$clipPositionToDocument = function(row, column) {
783
+ var pos = {};
784
+
785
+ if (row >= this.document.getLength()) {
786
+ pos.row = Math.max(0, this.document.getLength() - 1);
787
+ pos.column = this.document.getLine(pos.row).length;
788
+ }
789
+ else if (row < 0) {
790
+ pos.row = 0;
791
+ pos.column = 0;
792
+ }
793
+ else {
794
+ pos.row = row;
795
+ pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column));
796
+ }
797
+
798
+ if (column < 0)
799
+ pos.column = 0;
800
+
801
+ return pos;
802
+ };
803
+
804
+ }).call(Anchor.prototype);
805
+
806
+ });
807
+
808
+ ace.define("ace/document",[], function(require, exports, module) {
809
+ "use strict";
810
+
811
+ var oop = require("./lib/oop");
812
+ var applyDelta = require("./apply_delta").applyDelta;
813
+ var EventEmitter = require("./lib/event_emitter").EventEmitter;
814
+ var Range = require("./range").Range;
815
+ var Anchor = require("./anchor").Anchor;
816
+
817
+ var Document = function(textOrLines) {
818
+ this.$lines = [""];
819
+ if (textOrLines.length === 0) {
820
+ this.$lines = [""];
821
+ } else if (Array.isArray(textOrLines)) {
822
+ this.insertMergedLines({row: 0, column: 0}, textOrLines);
823
+ } else {
824
+ this.insert({row: 0, column:0}, textOrLines);
825
+ }
826
+ };
827
+
828
+ (function() {
829
+
830
+ oop.implement(this, EventEmitter);
831
+ this.setValue = function(text) {
832
+ var len = this.getLength() - 1;
833
+ this.remove(new Range(0, 0, len, this.getLine(len).length));
834
+ this.insert({row: 0, column: 0}, text);
835
+ };
836
+ this.getValue = function() {
837
+ return this.getAllLines().join(this.getNewLineCharacter());
838
+ };
839
+ this.createAnchor = function(row, column) {
840
+ return new Anchor(this, row, column);
841
+ };
842
+ if ("aaa".split(/a/).length === 0) {
843
+ this.$split = function(text) {
844
+ return text.replace(/\r\n|\r/g, "\n").split("\n");
845
+ };
846
+ } else {
847
+ this.$split = function(text) {
848
+ return text.split(/\r\n|\r|\n/);
849
+ };
850
+ }
851
+
852
+
853
+ this.$detectNewLine = function(text) {
854
+ var match = text.match(/^.*?(\r\n|\r|\n)/m);
855
+ this.$autoNewLine = match ? match[1] : "\n";
856
+ this._signal("changeNewLineMode");
857
+ };
858
+ this.getNewLineCharacter = function() {
859
+ switch (this.$newLineMode) {
860
+ case "windows":
861
+ return "\r\n";
862
+ case "unix":
863
+ return "\n";
864
+ default:
865
+ return this.$autoNewLine || "\n";
866
+ }
867
+ };
868
+
869
+ this.$autoNewLine = "";
870
+ this.$newLineMode = "auto";
871
+ this.setNewLineMode = function(newLineMode) {
872
+ if (this.$newLineMode === newLineMode)
873
+ return;
874
+
875
+ this.$newLineMode = newLineMode;
876
+ this._signal("changeNewLineMode");
877
+ };
878
+ this.getNewLineMode = function() {
879
+ return this.$newLineMode;
880
+ };
881
+ this.isNewLine = function(text) {
882
+ return (text == "\r\n" || text == "\r" || text == "\n");
883
+ };
884
+ this.getLine = function(row) {
885
+ return this.$lines[row] || "";
886
+ };
887
+ this.getLines = function(firstRow, lastRow) {
888
+ return this.$lines.slice(firstRow, lastRow + 1);
889
+ };
890
+ this.getAllLines = function() {
891
+ return this.getLines(0, this.getLength());
892
+ };
893
+ this.getLength = function() {
894
+ return this.$lines.length;
895
+ };
896
+ this.getTextRange = function(range) {
897
+ return this.getLinesForRange(range).join(this.getNewLineCharacter());
898
+ };
899
+ this.getLinesForRange = function(range) {
900
+ var lines;
901
+ if (range.start.row === range.end.row) {
902
+ lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)];
903
+ } else {
904
+ lines = this.getLines(range.start.row, range.end.row);
905
+ lines[0] = (lines[0] || "").substring(range.start.column);
906
+ var l = lines.length - 1;
907
+ if (range.end.row - range.start.row == l)
908
+ lines[l] = lines[l].substring(0, range.end.column);
909
+ }
910
+ return lines;
911
+ };
912
+ this.insertLines = function(row, lines) {
913
+ console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead.");
914
+ return this.insertFullLines(row, lines);
915
+ };
916
+ this.removeLines = function(firstRow, lastRow) {
917
+ console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead.");
918
+ return this.removeFullLines(firstRow, lastRow);
919
+ };
920
+ this.insertNewLine = function(position) {
921
+ console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead.");
922
+ return this.insertMergedLines(position, ["", ""]);
923
+ };
924
+ this.insert = function(position, text) {
925
+ if (this.getLength() <= 1)
926
+ this.$detectNewLine(text);
927
+
928
+ return this.insertMergedLines(position, this.$split(text));
929
+ };
930
+ this.insertInLine = function(position, text) {
931
+ var start = this.clippedPos(position.row, position.column);
932
+ var end = this.pos(position.row, position.column + text.length);
933
+
934
+ this.applyDelta({
935
+ start: start,
936
+ end: end,
937
+ action: "insert",
938
+ lines: [text]
939
+ }, true);
940
+
941
+ return this.clonePos(end);
942
+ };
943
+
944
+ this.clippedPos = function(row, column) {
945
+ var length = this.getLength();
946
+ if (row === undefined) {
947
+ row = length;
948
+ } else if (row < 0) {
949
+ row = 0;
950
+ } else if (row >= length) {
951
+ row = length - 1;
952
+ column = undefined;
953
+ }
954
+ var line = this.getLine(row);
955
+ if (column == undefined)
956
+ column = line.length;
957
+ column = Math.min(Math.max(column, 0), line.length);
958
+ return {row: row, column: column};
959
+ };
960
+
961
+ this.clonePos = function(pos) {
962
+ return {row: pos.row, column: pos.column};
963
+ };
964
+
965
+ this.pos = function(row, column) {
966
+ return {row: row, column: column};
967
+ };
968
+
969
+ this.$clipPosition = function(position) {
970
+ var length = this.getLength();
971
+ if (position.row >= length) {
972
+ position.row = Math.max(0, length - 1);
973
+ position.column = this.getLine(length - 1).length;
974
+ } else {
975
+ position.row = Math.max(0, position.row);
976
+ position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length);
977
+ }
978
+ return position;
979
+ };
980
+ this.insertFullLines = function(row, lines) {
981
+ row = Math.min(Math.max(row, 0), this.getLength());
982
+ var column = 0;
983
+ if (row < this.getLength()) {
984
+ lines = lines.concat([""]);
985
+ column = 0;
986
+ } else {
987
+ lines = [""].concat(lines);
988
+ row--;
989
+ column = this.$lines[row].length;
990
+ }
991
+ this.insertMergedLines({row: row, column: column}, lines);
992
+ };
993
+ this.insertMergedLines = function(position, lines) {
994
+ var start = this.clippedPos(position.row, position.column);
995
+ var end = {
996
+ row: start.row + lines.length - 1,
997
+ column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length
998
+ };
999
+
1000
+ this.applyDelta({
1001
+ start: start,
1002
+ end: end,
1003
+ action: "insert",
1004
+ lines: lines
1005
+ });
1006
+
1007
+ return this.clonePos(end);
1008
+ };
1009
+ this.remove = function(range) {
1010
+ var start = this.clippedPos(range.start.row, range.start.column);
1011
+ var end = this.clippedPos(range.end.row, range.end.column);
1012
+ this.applyDelta({
1013
+ start: start,
1014
+ end: end,
1015
+ action: "remove",
1016
+ lines: this.getLinesForRange({start: start, end: end})
1017
+ });
1018
+ return this.clonePos(start);
1019
+ };
1020
+ this.removeInLine = function(row, startColumn, endColumn) {
1021
+ var start = this.clippedPos(row, startColumn);
1022
+ var end = this.clippedPos(row, endColumn);
1023
+
1024
+ this.applyDelta({
1025
+ start: start,
1026
+ end: end,
1027
+ action: "remove",
1028
+ lines: this.getLinesForRange({start: start, end: end})
1029
+ }, true);
1030
+
1031
+ return this.clonePos(start);
1032
+ };
1033
+ this.removeFullLines = function(firstRow, lastRow) {
1034
+ firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1);
1035
+ lastRow = Math.min(Math.max(0, lastRow ), this.getLength() - 1);
1036
+ var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0;
1037
+ var deleteLastNewLine = lastRow < this.getLength() - 1;
1038
+ var startRow = ( deleteFirstNewLine ? firstRow - 1 : firstRow );
1039
+ var startCol = ( deleteFirstNewLine ? this.getLine(startRow).length : 0 );
1040
+ var endRow = ( deleteLastNewLine ? lastRow + 1 : lastRow );
1041
+ var endCol = ( deleteLastNewLine ? 0 : this.getLine(endRow).length );
1042
+ var range = new Range(startRow, startCol, endRow, endCol);
1043
+ var deletedLines = this.$lines.slice(firstRow, lastRow + 1);
1044
+
1045
+ this.applyDelta({
1046
+ start: range.start,
1047
+ end: range.end,
1048
+ action: "remove",
1049
+ lines: this.getLinesForRange(range)
1050
+ });
1051
+ return deletedLines;
1052
+ };
1053
+ this.removeNewLine = function(row) {
1054
+ if (row < this.getLength() - 1 && row >= 0) {
1055
+ this.applyDelta({
1056
+ start: this.pos(row, this.getLine(row).length),
1057
+ end: this.pos(row + 1, 0),
1058
+ action: "remove",
1059
+ lines: ["", ""]
1060
+ });
1061
+ }
1062
+ };
1063
+ this.replace = function(range, text) {
1064
+ if (!(range instanceof Range))
1065
+ range = Range.fromPoints(range.start, range.end);
1066
+ if (text.length === 0 && range.isEmpty())
1067
+ return range.start;
1068
+ if (text == this.getTextRange(range))
1069
+ return range.end;
1070
+
1071
+ this.remove(range);
1072
+ var end;
1073
+ if (text) {
1074
+ end = this.insert(range.start, text);
1075
+ }
1076
+ else {
1077
+ end = range.start;
1078
+ }
1079
+
1080
+ return end;
1081
+ };
1082
+ this.applyDeltas = function(deltas) {
1083
+ for (var i=0; i<deltas.length; i++) {
1084
+ this.applyDelta(deltas[i]);
1085
+ }
1086
+ };
1087
+ this.revertDeltas = function(deltas) {
1088
+ for (var i=deltas.length-1; i>=0; i--) {
1089
+ this.revertDelta(deltas[i]);
1090
+ }
1091
+ };
1092
+ this.applyDelta = function(delta, doNotValidate) {
1093
+ var isInsert = delta.action == "insert";
1094
+ if (isInsert ? delta.lines.length <= 1 && !delta.lines[0]
1095
+ : !Range.comparePoints(delta.start, delta.end)) {
1096
+ return;
1097
+ }
1098
+
1099
+ if (isInsert && delta.lines.length > 20000) {
1100
+ this.$splitAndapplyLargeDelta(delta, 20000);
1101
+ }
1102
+ else {
1103
+ applyDelta(this.$lines, delta, doNotValidate);
1104
+ this._signal("change", delta);
1105
+ }
1106
+ };
1107
+
1108
+ this.$safeApplyDelta = function(delta) {
1109
+ var docLength = this.$lines.length;
1110
+ if (
1111
+ delta.action == "remove" && delta.start.row < docLength && delta.end.row < docLength
1112
+ || delta.action == "insert" && delta.start.row <= docLength
1113
+ ) {
1114
+ this.applyDelta(delta);
1115
+ }
1116
+ };
1117
+
1118
+ this.$splitAndapplyLargeDelta = function(delta, MAX) {
1119
+ var lines = delta.lines;
1120
+ var l = lines.length - MAX + 1;
1121
+ var row = delta.start.row;
1122
+ var column = delta.start.column;
1123
+ for (var from = 0, to = 0; from < l; from = to) {
1124
+ to += MAX - 1;
1125
+ var chunk = lines.slice(from, to);
1126
+ chunk.push("");
1127
+ this.applyDelta({
1128
+ start: this.pos(row + from, column),
1129
+ end: this.pos(row + to, column = 0),
1130
+ action: delta.action,
1131
+ lines: chunk
1132
+ }, true);
1133
+ }
1134
+ delta.lines = lines.slice(from);
1135
+ delta.start.row = row + from;
1136
+ delta.start.column = column;
1137
+ this.applyDelta(delta, true);
1138
+ };
1139
+ this.revertDelta = function(delta) {
1140
+ this.$safeApplyDelta({
1141
+ start: this.clonePos(delta.start),
1142
+ end: this.clonePos(delta.end),
1143
+ action: (delta.action == "insert" ? "remove" : "insert"),
1144
+ lines: delta.lines.slice()
1145
+ });
1146
+ };
1147
+ this.indexToPosition = function(index, startRow) {
1148
+ var lines = this.$lines || this.getAllLines();
1149
+ var newlineLength = this.getNewLineCharacter().length;
1150
+ for (var i = startRow || 0, l = lines.length; i < l; i++) {
1151
+ index -= lines[i].length + newlineLength;
1152
+ if (index < 0)
1153
+ return {row: i, column: index + lines[i].length + newlineLength};
1154
+ }
1155
+ return {row: l-1, column: index + lines[l-1].length + newlineLength};
1156
+ };
1157
+ this.positionToIndex = function(pos, startRow) {
1158
+ var lines = this.$lines || this.getAllLines();
1159
+ var newlineLength = this.getNewLineCharacter().length;
1160
+ var index = 0;
1161
+ var row = Math.min(pos.row, lines.length);
1162
+ for (var i = startRow || 0; i < row; ++i)
1163
+ index += lines[i].length + newlineLength;
1164
+
1165
+ return index + pos.column;
1166
+ };
1167
+
1168
+ }).call(Document.prototype);
1169
+
1170
+ exports.Document = Document;
1171
+ });
1172
+
1173
+ ace.define("ace/lib/lang",[], function(require, exports, module) {
1174
+ "use strict";
1175
+
1176
+ exports.last = function(a) {
1177
+ return a[a.length - 1];
1178
+ };
1179
+
1180
+ exports.stringReverse = function(string) {
1181
+ return string.split("").reverse().join("");
1182
+ };
1183
+
1184
+ exports.stringRepeat = function (string, count) {
1185
+ var result = '';
1186
+ while (count > 0) {
1187
+ if (count & 1)
1188
+ result += string;
1189
+
1190
+ if (count >>= 1)
1191
+ string += string;
1192
+ }
1193
+ return result;
1194
+ };
1195
+
1196
+ var trimBeginRegexp = /^\s\s*/;
1197
+ var trimEndRegexp = /\s\s*$/;
1198
+
1199
+ exports.stringTrimLeft = function (string) {
1200
+ return string.replace(trimBeginRegexp, '');
1201
+ };
1202
+
1203
+ exports.stringTrimRight = function (string) {
1204
+ return string.replace(trimEndRegexp, '');
1205
+ };
1206
+
1207
+ exports.copyObject = function(obj) {
1208
+ var copy = {};
1209
+ for (var key in obj) {
1210
+ copy[key] = obj[key];
1211
+ }
1212
+ return copy;
1213
+ };
1214
+
1215
+ exports.copyArray = function(array){
1216
+ var copy = [];
1217
+ for (var i=0, l=array.length; i<l; i++) {
1218
+ if (array[i] && typeof array[i] == "object")
1219
+ copy[i] = this.copyObject(array[i]);
1220
+ else
1221
+ copy[i] = array[i];
1222
+ }
1223
+ return copy;
1224
+ };
1225
+
1226
+ exports.deepCopy = function deepCopy(obj) {
1227
+ if (typeof obj !== "object" || !obj)
1228
+ return obj;
1229
+ var copy;
1230
+ if (Array.isArray(obj)) {
1231
+ copy = [];
1232
+ for (var key = 0; key < obj.length; key++) {
1233
+ copy[key] = deepCopy(obj[key]);
1234
+ }
1235
+ return copy;
1236
+ }
1237
+ if (Object.prototype.toString.call(obj) !== "[object Object]")
1238
+ return obj;
1239
+
1240
+ copy = {};
1241
+ for (var key in obj)
1242
+ copy[key] = deepCopy(obj[key]);
1243
+ return copy;
1244
+ };
1245
+
1246
+ exports.arrayToMap = function(arr) {
1247
+ var map = {};
1248
+ for (var i=0; i<arr.length; i++) {
1249
+ map[arr[i]] = 1;
1250
+ }
1251
+ return map;
1252
+
1253
+ };
1254
+
1255
+ exports.createMap = function(props) {
1256
+ var map = Object.create(null);
1257
+ for (var i in props) {
1258
+ map[i] = props[i];
1259
+ }
1260
+ return map;
1261
+ };
1262
+ exports.arrayRemove = function(array, value) {
1263
+ for (var i = 0; i <= array.length; i++) {
1264
+ if (value === array[i]) {
1265
+ array.splice(i, 1);
1266
+ }
1267
+ }
1268
+ };
1269
+
1270
+ exports.escapeRegExp = function(str) {
1271
+ return str.replace(/([.*+?^${}()|[\]\/\\])/g, '\\$1');
1272
+ };
1273
+
1274
+ exports.escapeHTML = function(str) {
1275
+ return ("" + str).replace(/&/g, "&#38;").replace(/"/g, "&#34;").replace(/'/g, "&#39;").replace(/</g, "&#60;");
1276
+ };
1277
+
1278
+ exports.getMatchOffsets = function(string, regExp) {
1279
+ var matches = [];
1280
+
1281
+ string.replace(regExp, function(str) {
1282
+ matches.push({
1283
+ offset: arguments[arguments.length-2],
1284
+ length: str.length
1285
+ });
1286
+ });
1287
+
1288
+ return matches;
1289
+ };
1290
+ exports.deferredCall = function(fcn) {
1291
+ var timer = null;
1292
+ var callback = function() {
1293
+ timer = null;
1294
+ fcn();
1295
+ };
1296
+
1297
+ var deferred = function(timeout) {
1298
+ deferred.cancel();
1299
+ timer = setTimeout(callback, timeout || 0);
1300
+ return deferred;
1301
+ };
1302
+
1303
+ deferred.schedule = deferred;
1304
+
1305
+ deferred.call = function() {
1306
+ this.cancel();
1307
+ fcn();
1308
+ return deferred;
1309
+ };
1310
+
1311
+ deferred.cancel = function() {
1312
+ clearTimeout(timer);
1313
+ timer = null;
1314
+ return deferred;
1315
+ };
1316
+
1317
+ deferred.isPending = function() {
1318
+ return timer;
1319
+ };
1320
+
1321
+ return deferred;
1322
+ };
1323
+
1324
+
1325
+ exports.delayedCall = function(fcn, defaultTimeout) {
1326
+ var timer = null;
1327
+ var callback = function() {
1328
+ timer = null;
1329
+ fcn();
1330
+ };
1331
+
1332
+ var _self = function(timeout) {
1333
+ if (timer == null)
1334
+ timer = setTimeout(callback, timeout || defaultTimeout);
1335
+ };
1336
+
1337
+ _self.delay = function(timeout) {
1338
+ timer && clearTimeout(timer);
1339
+ timer = setTimeout(callback, timeout || defaultTimeout);
1340
+ };
1341
+ _self.schedule = _self;
1342
+
1343
+ _self.call = function() {
1344
+ this.cancel();
1345
+ fcn();
1346
+ };
1347
+
1348
+ _self.cancel = function() {
1349
+ timer && clearTimeout(timer);
1350
+ timer = null;
1351
+ };
1352
+
1353
+ _self.isPending = function() {
1354
+ return timer;
1355
+ };
1356
+
1357
+ return _self;
1358
+ };
1359
+ });
1360
+
1361
+ ace.define("ace/worker/mirror",[], function(require, exports, module) {
1362
+ "use strict";
1363
+
1364
+ var Range = require("../range").Range;
1365
+ var Document = require("../document").Document;
1366
+ var lang = require("../lib/lang");
1367
+
1368
+ var Mirror = exports.Mirror = function(sender) {
1369
+ this.sender = sender;
1370
+ var doc = this.doc = new Document("");
1371
+
1372
+ var deferredUpdate = this.deferredUpdate = lang.delayedCall(this.onUpdate.bind(this));
1373
+
1374
+ var _self = this;
1375
+ sender.on("change", function(e) {
1376
+ var data = e.data;
1377
+ if (data[0].start) {
1378
+ doc.applyDeltas(data);
1379
+ } else {
1380
+ for (var i = 0; i < data.length; i += 2) {
1381
+ if (Array.isArray(data[i+1])) {
1382
+ var d = {action: "insert", start: data[i], lines: data[i+1]};
1383
+ } else {
1384
+ var d = {action: "remove", start: data[i], end: data[i+1]};
1385
+ }
1386
+ doc.applyDelta(d, true);
1387
+ }
1388
+ }
1389
+ if (_self.$timeout)
1390
+ return deferredUpdate.schedule(_self.$timeout);
1391
+ _self.onUpdate();
1392
+ });
1393
+ };
1394
+
1395
+ (function() {
1396
+
1397
+ this.$timeout = 500;
1398
+
1399
+ this.setTimeout = function(timeout) {
1400
+ this.$timeout = timeout;
1401
+ };
1402
+
1403
+ this.setValue = function(value) {
1404
+ this.doc.setValue(value);
1405
+ this.deferredUpdate.schedule(this.$timeout);
1406
+ };
1407
+
1408
+ this.getValue = function(callbackId) {
1409
+ this.sender.callback(this.doc.getValue(), callbackId);
1410
+ };
1411
+
1412
+ this.onUpdate = function() {
1413
+ };
1414
+
1415
+ this.isPending = function() {
1416
+ return this.deferredUpdate.isPending();
1417
+ };
1418
+
1419
+ }).call(Mirror.prototype);
1420
+
1421
+ });
1422
+
1423
+ ace.define("ace/mode/json/json_parse",[], function(require, exports, module) {
1424
+ "use strict";
1425
+
1426
+ var at, // The index of the current character
1427
+ ch, // The current character
1428
+ escapee = {
1429
+ '"': '"',
1430
+ '\\': '\\',
1431
+ '/': '/',
1432
+ b: '\b',
1433
+ f: '\f',
1434
+ n: '\n',
1435
+ r: '\r',
1436
+ t: '\t'
1437
+ },
1438
+ text,
1439
+
1440
+ error = function (m) {
1441
+
1442
+ throw {
1443
+ name: 'SyntaxError',
1444
+ message: m,
1445
+ at: at,
1446
+ text: text
1447
+ };
1448
+ },
1449
+
1450
+ next = function (c) {
1451
+
1452
+ if (c && c !== ch) {
1453
+ error("Expected '" + c + "' instead of '" + ch + "'");
1454
+ }
1455
+
1456
+ ch = text.charAt(at);
1457
+ at += 1;
1458
+ return ch;
1459
+ },
1460
+
1461
+ number = function () {
1462
+
1463
+ var number,
1464
+ string = '';
1465
+
1466
+ if (ch === '-') {
1467
+ string = '-';
1468
+ next('-');
1469
+ }
1470
+ while (ch >= '0' && ch <= '9') {
1471
+ string += ch;
1472
+ next();
1473
+ }
1474
+ if (ch === '.') {
1475
+ string += '.';
1476
+ while (next() && ch >= '0' && ch <= '9') {
1477
+ string += ch;
1478
+ }
1479
+ }
1480
+ if (ch === 'e' || ch === 'E') {
1481
+ string += ch;
1482
+ next();
1483
+ if (ch === '-' || ch === '+') {
1484
+ string += ch;
1485
+ next();
1486
+ }
1487
+ while (ch >= '0' && ch <= '9') {
1488
+ string += ch;
1489
+ next();
1490
+ }
1491
+ }
1492
+ number = +string;
1493
+ if (isNaN(number)) {
1494
+ error("Bad number");
1495
+ } else {
1496
+ return number;
1497
+ }
1498
+ },
1499
+
1500
+ string = function () {
1501
+
1502
+ var hex,
1503
+ i,
1504
+ string = '',
1505
+ uffff;
1506
+
1507
+ if (ch === '"') {
1508
+ while (next()) {
1509
+ if (ch === '"') {
1510
+ next();
1511
+ return string;
1512
+ } else if (ch === '\\') {
1513
+ next();
1514
+ if (ch === 'u') {
1515
+ uffff = 0;
1516
+ for (i = 0; i < 4; i += 1) {
1517
+ hex = parseInt(next(), 16);
1518
+ if (!isFinite(hex)) {
1519
+ break;
1520
+ }
1521
+ uffff = uffff * 16 + hex;
1522
+ }
1523
+ string += String.fromCharCode(uffff);
1524
+ } else if (typeof escapee[ch] === 'string') {
1525
+ string += escapee[ch];
1526
+ } else {
1527
+ break;
1528
+ }
1529
+ } else if (ch == "\n" || ch == "\r") {
1530
+ break;
1531
+ } else {
1532
+ string += ch;
1533
+ }
1534
+ }
1535
+ }
1536
+ error("Bad string");
1537
+ },
1538
+
1539
+ white = function () {
1540
+
1541
+ while (ch && ch <= ' ') {
1542
+ next();
1543
+ }
1544
+ },
1545
+
1546
+ word = function () {
1547
+
1548
+ switch (ch) {
1549
+ case 't':
1550
+ next('t');
1551
+ next('r');
1552
+ next('u');
1553
+ next('e');
1554
+ return true;
1555
+ case 'f':
1556
+ next('f');
1557
+ next('a');
1558
+ next('l');
1559
+ next('s');
1560
+ next('e');
1561
+ return false;
1562
+ case 'n':
1563
+ next('n');
1564
+ next('u');
1565
+ next('l');
1566
+ next('l');
1567
+ return null;
1568
+ }
1569
+ error("Unexpected '" + ch + "'");
1570
+ },
1571
+
1572
+ value, // Place holder for the value function.
1573
+
1574
+ array = function () {
1575
+
1576
+ var array = [];
1577
+
1578
+ if (ch === '[') {
1579
+ next('[');
1580
+ white();
1581
+ if (ch === ']') {
1582
+ next(']');
1583
+ return array; // empty array
1584
+ }
1585
+ while (ch) {
1586
+ array.push(value());
1587
+ white();
1588
+ if (ch === ']') {
1589
+ next(']');
1590
+ return array;
1591
+ }
1592
+ next(',');
1593
+ white();
1594
+ }
1595
+ }
1596
+ error("Bad array");
1597
+ },
1598
+
1599
+ object = function () {
1600
+
1601
+ var key,
1602
+ object = {};
1603
+
1604
+ if (ch === '{') {
1605
+ next('{');
1606
+ white();
1607
+ if (ch === '}') {
1608
+ next('}');
1609
+ return object; // empty object
1610
+ }
1611
+ while (ch) {
1612
+ key = string();
1613
+ white();
1614
+ next(':');
1615
+ if (Object.hasOwnProperty.call(object, key)) {
1616
+ error('Duplicate key "' + key + '"');
1617
+ }
1618
+ object[key] = value();
1619
+ white();
1620
+ if (ch === '}') {
1621
+ next('}');
1622
+ return object;
1623
+ }
1624
+ next(',');
1625
+ white();
1626
+ }
1627
+ }
1628
+ error("Bad object");
1629
+ };
1630
+
1631
+ value = function () {
1632
+
1633
+ white();
1634
+ switch (ch) {
1635
+ case '{':
1636
+ return object();
1637
+ case '[':
1638
+ return array();
1639
+ case '"':
1640
+ return string();
1641
+ case '-':
1642
+ return number();
1643
+ default:
1644
+ return ch >= '0' && ch <= '9' ? number() : word();
1645
+ }
1646
+ };
1647
+
1648
+ return function (source, reviver) {
1649
+ var result;
1650
+
1651
+ text = source;
1652
+ at = 0;
1653
+ ch = ' ';
1654
+ result = value();
1655
+ white();
1656
+ if (ch) {
1657
+ error("Syntax error");
1658
+ }
1659
+
1660
+ return typeof reviver === 'function' ? function walk(holder, key) {
1661
+ var k, v, value = holder[key];
1662
+ if (value && typeof value === 'object') {
1663
+ for (k in value) {
1664
+ if (Object.hasOwnProperty.call(value, k)) {
1665
+ v = walk(value, k);
1666
+ if (v !== undefined) {
1667
+ value[k] = v;
1668
+ } else {
1669
+ delete value[k];
1670
+ }
1671
+ }
1672
+ }
1673
+ }
1674
+ return reviver.call(holder, key, value);
1675
+ }({'': result}, '') : result;
1676
+ };
1677
+ });
1678
+
1679
+ ace.define("ace/mode/json_worker",[], function(require, exports, module) {
1680
+ "use strict";
1681
+
1682
+ var oop = require("../lib/oop");
1683
+ var Mirror = require("../worker/mirror").Mirror;
1684
+ var parse = require("./json/json_parse");
1685
+
1686
+ var JsonWorker = exports.JsonWorker = function(sender) {
1687
+ Mirror.call(this, sender);
1688
+ this.setTimeout(200);
1689
+ };
1690
+
1691
+ oop.inherits(JsonWorker, Mirror);
1692
+
1693
+ (function() {
1694
+
1695
+ this.onUpdate = function() {
1696
+ var value = this.doc.getValue();
1697
+ var errors = [];
1698
+ try {
1699
+ if (value)
1700
+ parse(value);
1701
+ } catch (e) {
1702
+ var pos = this.doc.indexToPosition(e.at-1);
1703
+ errors.push({
1704
+ row: pos.row,
1705
+ column: pos.column,
1706
+ text: e.message,
1707
+ type: "error"
1708
+ });
1709
+ }
1710
+ this.sender.emit("annotate", errors);
1711
+ };
1712
+
1713
+ }).call(JsonWorker.prototype);
1714
+
1715
+ });